@brandsync/wc 1.9.0 → 1.10.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 (229) hide show
  1. package/custom-elements.json +4520 -3613
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/{p-c4de155c.entry.js → p-0132a2d1.entry.js} +1 -1
  4. package/dist/brandsync-wc/{p-051d3064.entry.js → p-041776c0.entry.js} +1 -1
  5. package/dist/brandsync-wc/{p-a09e157f.entry.js → p-08c99a60.entry.js} +1 -1
  6. package/dist/brandsync-wc/{p-70f64b25.entry.js → p-18c3c22c.entry.js} +1 -1
  7. package/dist/brandsync-wc/p-1c3a43c7.entry.js +1 -0
  8. package/dist/brandsync-wc/{p-fddc7bd1.entry.js → p-1c427ffb.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-29027559.entry.js → p-2e958566.entry.js} +1 -1
  10. package/dist/brandsync-wc/{p-235ae012.entry.js → p-301b2455.entry.js} +1 -1
  11. package/dist/brandsync-wc/{p-8ee0153b.entry.js → p-32cd69f1.entry.js} +1 -1
  12. package/dist/brandsync-wc/p-4f2c4929.entry.js +1 -0
  13. package/dist/brandsync-wc/{p-a0d5a620.entry.js → p-50a251a4.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-0e39b9cc.entry.js → p-5f3cd501.entry.js} +1 -1
  15. package/dist/brandsync-wc/{p-fc240aa0.entry.js → p-701ebf4a.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-0eed6813.entry.js → p-763876f5.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-f7d47c17.entry.js → p-76e1c295.entry.js} +1 -1
  18. package/dist/brandsync-wc/p-790db8b3.entry.js +1 -0
  19. package/dist/brandsync-wc/{p-4e5dcaff.entry.js → p-796a1860.entry.js} +1 -1
  20. package/dist/brandsync-wc/{p-36bf37d9.entry.js → p-806a5347.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-6331de9c.entry.js → p-8eba7f90.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-6fd7dd6a.entry.js → p-96ed9386.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-cfcf3f0a.entry.js → p-9e88f19c.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-de7c946d.entry.js → p-a71d2811.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-33e44094.entry.js → p-a8e2a829.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-3b64e3cd.entry.js → p-addfa0a0.entry.js} +1 -1
  27. package/dist/brandsync-wc/{p-4574a707.entry.js → p-af2bf957.entry.js} +1 -1
  28. package/dist/brandsync-wc/{p-6bf2f116.entry.js → p-b2074a32.entry.js} +1 -1
  29. package/dist/brandsync-wc/{p-7c94e6ae.entry.js → p-c99b6a66.entry.js} +1 -1
  30. package/dist/brandsync-wc/{p-2891d40b.entry.js → p-c9a72416.entry.js} +1 -1
  31. package/dist/brandsync-wc/{p-9f65f998.entry.js → p-d3f44cb7.entry.js} +1 -1
  32. package/dist/brandsync-wc/p-d42b1c2b.entry.js +1 -0
  33. package/dist/brandsync-wc/{p-3ec74d35.entry.js → p-daab6b22.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-107b1c5d.entry.js → p-dbcbe682.entry.js} +1 -1
  35. package/dist/brandsync-wc/{p-3176d1d3.entry.js → p-e8a5b8eb.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-062cfa34.entry.js → p-ea4e20ef.entry.js} +1 -1
  37. package/dist/brandsync-wc/{p-27bbed83.entry.js → p-f370b8fa.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-05c7de28.entry.js → p-f89de457.entry.js} +1 -1
  39. package/dist/brandsync-wc/{p-114d2fd8.entry.js → p-fd254972.entry.js} +1 -1
  40. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  41. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  42. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  43. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  44. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  45. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  46. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  47. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  48. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  49. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  50. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
  51. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  52. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  53. package/dist/cjs/bs-datepicker.cjs.entry.js +410 -0
  54. package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
  55. package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
  56. package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
  57. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  58. package/dist/cjs/{bs-input.cjs.entry.js → bs-input_2.cjs.entry.js} +37 -4
  59. package/dist/cjs/bs-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  61. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
  62. package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
  63. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  64. package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
  65. package/dist/cjs/bs-progress.cjs.entry.js +2 -2
  66. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  67. package/dist/cjs/bs-slider.cjs.entry.js +1 -1
  68. package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
  69. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  70. package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
  71. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  72. package/dist/cjs/bs-switch.cjs.entry.js +1 -1
  73. package/dist/cjs/bs-tab.cjs.entry.js +1 -1
  74. package/dist/cjs/bs-tabs.cjs.entry.js +1 -1
  75. package/dist/cjs/bs-timepicker.cjs.entry.js +209 -0
  76. package/dist/cjs/bs-toast.cjs.entry.js +1 -1
  77. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  78. package/dist/cjs/loader.cjs.js +1 -1
  79. package/dist/collection/collection-manifest.json +2 -0
  80. package/dist/collection/components/bs-a11y.cmp.test.js +4 -0
  81. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  82. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  83. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  84. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  85. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  86. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
  87. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  88. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  89. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  90. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  91. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  92. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  93. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  94. package/dist/collection/components/bs-datepicker/bs-datepicker.cmp.test.js +182 -0
  95. package/dist/collection/components/bs-datepicker/bs-datepicker.css +315 -0
  96. package/dist/collection/components/bs-datepicker/bs-datepicker.js +782 -0
  97. package/dist/collection/components/bs-datepicker/bs-datepicker.stories.js +63 -0
  98. package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
  99. package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
  100. package/dist/collection/components/bs-input/bs-input.js +7 -4
  101. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  102. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  103. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  104. package/dist/collection/components/bs-progress/bs-progress.js +2 -2
  105. package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
  106. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  107. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  108. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  109. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  110. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  111. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  112. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  113. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  114. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  115. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  116. package/dist/collection/components/bs-timepicker/bs-timepicker.cmp.test.js +141 -0
  117. package/dist/collection/components/bs-timepicker/bs-timepicker.css +200 -0
  118. package/dist/collection/components/bs-timepicker/bs-timepicker.js +509 -0
  119. package/dist/collection/components/bs-timepicker/bs-timepicker.stories.js +44 -0
  120. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  121. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  122. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  123. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  124. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  125. package/dist/components/bs-ai-disclaimer.js +1 -1
  126. package/dist/components/bs-ai-greeting.js +1 -1
  127. package/dist/components/bs-ai-thinking.js +1 -1
  128. package/dist/components/bs-attachment-list.js +1 -1
  129. package/dist/components/bs-attachment.js +1 -1
  130. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  131. package/dist/components/bs-breadcrumbs.js +1 -1
  132. package/dist/components/bs-button-skeleton.js +1 -1
  133. package/dist/components/bs-carousel.js +1 -1
  134. package/dist/components/bs-chatbot-feedback.js +1 -1
  135. package/dist/components/bs-chatbot-header.js +1 -1
  136. package/dist/components/bs-chatbot-response-action.js +1 -1
  137. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  138. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  139. package/dist/components/bs-checkbox-skeleton.js +1 -1
  140. package/dist/components/bs-datepicker.d.ts +11 -0
  141. package/dist/components/bs-datepicker.js +1 -0
  142. package/dist/components/bs-dialog.js +1 -1
  143. package/dist/components/bs-file-upload-item.js +1 -1
  144. package/dist/components/bs-file-upload.js +1 -1
  145. package/dist/components/bs-icon-button.js +1 -1
  146. package/dist/components/bs-inline-tab.js +1 -1
  147. package/dist/components/bs-input.js +1 -1
  148. package/dist/components/bs-menu-item.js +1 -1
  149. package/dist/components/bs-menu.js +1 -1
  150. package/dist/components/bs-navigation-drawer-item.js +1 -1
  151. package/dist/components/bs-navigation-drawer.js +1 -1
  152. package/dist/components/bs-navigation-header.js +1 -1
  153. package/dist/components/bs-pagination.js +1 -1
  154. package/dist/components/bs-progress-linear.js +1 -1
  155. package/dist/components/bs-progress.js +1 -1
  156. package/dist/components/bs-radio.js +1 -1
  157. package/dist/components/bs-slider.js +1 -1
  158. package/dist/components/bs-snackbar.js +1 -1
  159. package/dist/components/bs-source-link.js +1 -1
  160. package/dist/components/bs-stepper-step.js +1 -1
  161. package/dist/components/bs-stepper.js +1 -1
  162. package/dist/components/bs-switch.js +1 -1
  163. package/dist/components/bs-tab.js +1 -1
  164. package/dist/components/bs-tabs.js +1 -1
  165. package/dist/components/bs-timepicker.d.ts +11 -0
  166. package/dist/components/bs-timepicker.js +1 -0
  167. package/dist/components/bs-toast.js +1 -1
  168. package/dist/components/bs-tooltip.js +1 -1
  169. package/dist/components/{p-BA3c9Rom.js → p-B7Icv1ho.js} +1 -1
  170. package/dist/components/{p-wei0Ija2.js → p-BTvme8CE.js} +1 -1
  171. package/dist/components/{p-BoeorHNv.js → p-BYR_ZC8v.js} +1 -1
  172. package/dist/components/p-Ba860ej1.js +1 -0
  173. package/dist/components/p-CPvqZNO8.js +1 -0
  174. package/dist/components/{p-EtXc94lJ.js → p-DkIVyFOP.js} +1 -1
  175. package/dist/components/{p-BfEyD6Ku.js → p-ZK8p5zax.js} +1 -1
  176. package/dist/components/p-jDO25SfF.js +1 -0
  177. package/dist/esm/brandsync-wc.js +1 -1
  178. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  179. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  180. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  181. package/dist/esm/bs-attachment-list.entry.js +1 -1
  182. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  183. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  184. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  185. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  186. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  187. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  188. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  189. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  190. package/dist/esm/bs-datepicker.entry.js +408 -0
  191. package/dist/esm/bs-file-upload-item.entry.js +1 -1
  192. package/dist/esm/bs-file-upload.entry.js +1 -1
  193. package/dist/esm/bs-icon-button.entry.js +1 -1
  194. package/dist/esm/bs-inline-tab.entry.js +1 -1
  195. package/dist/esm/{bs-input.entry.js → bs-input_2.entry.js} +37 -5
  196. package/dist/esm/bs-menu.entry.js +1 -1
  197. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  198. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  199. package/dist/esm/bs-navigation-header.entry.js +1 -1
  200. package/dist/esm/bs-pagination.entry.js +1 -1
  201. package/dist/esm/bs-progress-linear.entry.js +2 -2
  202. package/dist/esm/bs-progress.entry.js +2 -2
  203. package/dist/esm/bs-radio.entry.js +1 -1
  204. package/dist/esm/bs-slider.entry.js +1 -1
  205. package/dist/esm/bs-snackbar.entry.js +1 -1
  206. package/dist/esm/bs-source-link.entry.js +2 -2
  207. package/dist/esm/bs-stepper-step.entry.js +1 -1
  208. package/dist/esm/bs-stepper.entry.js +1 -1
  209. package/dist/esm/bs-switch.entry.js +1 -1
  210. package/dist/esm/bs-tab.entry.js +1 -1
  211. package/dist/esm/bs-tabs.entry.js +1 -1
  212. package/dist/esm/bs-timepicker.entry.js +207 -0
  213. package/dist/esm/bs-toast.entry.js +1 -1
  214. package/dist/esm/bs-tooltip.entry.js +1 -1
  215. package/dist/esm/loader.js +1 -1
  216. package/dist/types/components/bs-datepicker/bs-datepicker.cmp.test.d.ts +1 -0
  217. package/dist/types/components/bs-datepicker/bs-datepicker.d.ts +136 -0
  218. package/dist/types/components/bs-datepicker/bs-datepicker.stories.d.ts +20 -0
  219. package/dist/types/components/bs-timepicker/bs-timepicker.cmp.test.d.ts +1 -0
  220. package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +101 -0
  221. package/dist/types/components/bs-timepicker/bs-timepicker.stories.d.ts +14 -0
  222. package/dist/types/components.d.ts +515 -0
  223. package/package.json +1 -1
  224. package/dist/brandsync-wc/p-7b00dd36.entry.js +0 -1
  225. package/dist/brandsync-wc/p-ae978c9a.entry.js +0 -1
  226. package/dist/brandsync-wc/p-c10d2529.entry.js +0 -1
  227. package/dist/cjs/bs-menu-item.cjs.entry.js +0 -34
  228. package/dist/components/p-Buly0d5G.js +0 -1
  229. package/dist/esm/bs-menu-item.entry.js +0 -32
@@ -0,0 +1,509 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * An inline time picker: hour and minute spinners (up/down carets, or the arrow keys on the value),
4
+ * an AM/PM dropdown in 12-hour mode, a 24h switch, and Cancel/Confirm buttons. Matches the Figma
5
+ * "Time picker" component's two formats (12h with AM/PM, and 24h).
6
+ *
7
+ * The picker works on a draft: nothing is committed until the user presses Confirm, which updates
8
+ * `value` and fires `bsChange`. Cancel discards the draft and fires `bsCancel`.
9
+ *
10
+ * `value` is always 24-hour `HH:mm` (e.g. `"14:30"`), regardless of the displayed `format`.
11
+ *
12
+ * The picker renders inline at a fixed width; to show it as a popover, put it in your own overlay
13
+ * and close that overlay from `bsChange`/`bsCancel`.
14
+ *
15
+ * ## When to use
16
+ * - Picking a time of day where the user steps through hours and minutes.
17
+ *
18
+ * ## When not to use
19
+ * - A time the user can type faster than step to -- a plain `bs-input` is quicker.
20
+ *
21
+ * ## Keyboard
22
+ * Tab to the hour or minute value, then ArrowUp/ArrowDown step it (wrapping), Home/End jump to the
23
+ * first/last value, and typing digits sets it directly.
24
+ *
25
+ * @part container - The outer card.
26
+ * @part header - The title row.
27
+ * @part title - The heading text.
28
+ * @part format-toggle - The 24h switch.
29
+ * @part selector - The row of spinners.
30
+ * @part spinner - Each hour/minute column.
31
+ * @part step - Each up/down caret button.
32
+ * @part value - Each hour/minute value (a `spinbutton`).
33
+ * @part separator - The colon between hours and minutes.
34
+ * @part period - The AM/PM dropdown (12h only).
35
+ * @part footer - The Cancel/Confirm row.
36
+ * @part cancel - The Cancel button.
37
+ * @part confirm - The Confirm button.
38
+ */
39
+ export class BsTimepicker {
40
+ el;
41
+ internals;
42
+ initialValue = '';
43
+ typed = '';
44
+ /** The `name` the confirmed value is submitted under in a surrounding `<form>`. */
45
+ name;
46
+ /** The confirmed time, 24-hour `HH:mm`. Empty means no time chosen yet (the picker opens on
47
+ * 00:00). Mutable so Confirm updates it directly; `bsChange` still fires. */
48
+ value = '';
49
+ /** Display format: `12h` (with an AM/PM dropdown) or `24h`. The user can switch it with the
50
+ * 24h switch. Does not change `value`, which is always 24-hour. */
51
+ format = '12h';
52
+ /** Step, in minutes, of the minute spinner's carets and arrow keys. Typing is not constrained. */
53
+ minuteStep = 1;
54
+ /** Heading text. */
55
+ heading = 'Select Time';
56
+ /** Label of the 24h switch. */
57
+ formatLabel = '24h';
58
+ /** Label of the Confirm button. */
59
+ confirmLabel = 'Confirm';
60
+ /** Label of the Cancel button. */
61
+ cancelLabel = 'Cancel';
62
+ /** Accessible name of the hour spinner. */
63
+ hourLabel = 'Hour';
64
+ /** Accessible name of the minute spinner. */
65
+ minuteLabel = 'Minute';
66
+ /** Accessible name of the AM/PM dropdown. */
67
+ periodLabel = 'AM/PM';
68
+ /** Fires when the user presses Confirm: `{ value }` as 24-hour `HH:mm`. Not fired when `value` is
69
+ * set programmatically. */
70
+ bsChange;
71
+ /** Fires when the user presses Cancel. The draft is reset to `value`. */
72
+ bsCancel;
73
+ /** Draft hour, 0-23. */
74
+ hour = 0;
75
+ /** Draft minute, 0-59. */
76
+ minute = 0;
77
+ componentWillLoad() {
78
+ this.initialValue = this.value;
79
+ this.resetDraft();
80
+ this.syncFormValue();
81
+ }
82
+ onValueChange() {
83
+ this.resetDraft();
84
+ this.syncFormValue();
85
+ }
86
+ onNameChange() {
87
+ this.syncFormValue();
88
+ }
89
+ /** Called by the browser when the surrounding `<form>` is reset. */
90
+ formResetCallback() {
91
+ this.value = this.initialValue;
92
+ }
93
+ resetDraft() {
94
+ const t = parseTime(this.value);
95
+ this.hour = t ? t.hour : 0;
96
+ this.minute = t ? t.minute : 0;
97
+ }
98
+ syncFormValue() {
99
+ if (!this.internals?.setFormValue)
100
+ return;
101
+ this.internals.setFormValue(this.value ?? '');
102
+ }
103
+ get step() {
104
+ const n = Math.trunc(Number(this.minuteStep));
105
+ return Number.isFinite(n) && n >= 1 && n <= 59 ? n : 1;
106
+ }
107
+ get is12h() {
108
+ return this.format !== '24h';
109
+ }
110
+ get isPm() {
111
+ return this.hour >= 12;
112
+ }
113
+ // --- stepping ----------------------------------------------------------------------------
114
+ /** The number shown in a column. In 12h mode the hour reads 1-12. */
115
+ shown(col) {
116
+ if (col === 'minute')
117
+ return this.minute;
118
+ return this.is12h ? this.hour % 12 || 12 : this.hour;
119
+ }
120
+ bounds(col) {
121
+ if (col === 'minute')
122
+ return [0, 59];
123
+ return this.is12h ? [1, 12] : [0, 23];
124
+ }
125
+ setShown(col, n) {
126
+ if (col === 'minute') {
127
+ this.minute = n;
128
+ }
129
+ else {
130
+ // 12h keeps the current AM/PM; 12 AM is hour 0 and 12 PM is hour 12.
131
+ this.hour = this.is12h ? (n % 12) + (this.isPm ? 12 : 0) : n;
132
+ }
133
+ }
134
+ stepBy(col, dir) {
135
+ const [min, max] = this.bounds(col);
136
+ const size = max - min + 1;
137
+ const by = col === 'minute' ? this.step : 1;
138
+ let next = this.shown(col) + dir * by;
139
+ if (col === 'minute') {
140
+ // Snap onto the step grid when leaving an off-grid value (e.g. typed 07 with step 15).
141
+ const cur = this.shown(col);
142
+ next = dir === 1 ? Math.floor(cur / by) * by + by : Math.ceil(cur / by) * by - by;
143
+ }
144
+ this.setShown(col, ((((next - min) % size) + size) % size) + min);
145
+ }
146
+ onKeyDown = (col) => (ev) => {
147
+ const [min, max] = this.bounds(col);
148
+ if (ev.key === 'ArrowUp')
149
+ this.stepBy(col, 1);
150
+ else if (ev.key === 'ArrowDown')
151
+ this.stepBy(col, -1);
152
+ else if (ev.key === 'Home')
153
+ this.setShown(col, min);
154
+ else if (ev.key === 'End')
155
+ this.setShown(col, max);
156
+ else if (/^\d$/.test(ev.key)) {
157
+ // Two digits make a value; a lone digit that can't start a valid two-digit value commits
158
+ // immediately.
159
+ const candidate = Number((this.typed + ev.key).slice(-2));
160
+ this.typed = (this.typed + ev.key).slice(-2);
161
+ if (candidate >= min && candidate <= max)
162
+ this.setShown(col, candidate);
163
+ else {
164
+ this.typed = ev.key;
165
+ const single = Number(ev.key);
166
+ if (single >= min && single <= max)
167
+ this.setShown(col, single);
168
+ }
169
+ if (this.typed.length === 2)
170
+ this.typed = '';
171
+ ev.preventDefault();
172
+ return;
173
+ }
174
+ else
175
+ return;
176
+ this.typed = '';
177
+ ev.preventDefault();
178
+ };
179
+ // --- actions -----------------------------------------------------------------------------
180
+ confirm = () => {
181
+ const value = `${pad(this.hour)}:${pad(this.minute)}`;
182
+ this.value = value;
183
+ this.bsChange.emit({ value });
184
+ };
185
+ cancel = () => {
186
+ this.resetDraft();
187
+ this.bsCancel.emit();
188
+ };
189
+ // --- rendering ---------------------------------------------------------------------------
190
+ renderColumn(col, label) {
191
+ const [min, max] = this.bounds(col);
192
+ const n = this.shown(col);
193
+ const stepLabel = (dir) => `${dir} ${label.toLowerCase()}`;
194
+ return (h("div", { part: "spinner", class: "bs-timepicker__spinner" }, h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel('Increase'), 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('Decrease'), 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" })))));
195
+ }
196
+ render() {
197
+ return (h("div", { key: 'a2e5fe098763d32468ffc0bdd3c2df153385dfd7', part: "container", class: "bs-timepicker" }, h("div", { key: 'd7a3bcdb9585480d2f58b27d8499f6ef9c8d21e0', part: "header", class: "bs-timepicker__header" }, h("div", { key: '6183e6243df377936ddc2d5a92238720efc7a671', part: "title", class: "bs-timepicker__title" }, this.heading), h("label", { key: '4e95425e9f67d6575ef9572a9c385b9a5c887359', class: "bs-timepicker__format" }, h("span", { key: '29771986229fd68af07078e3528a12d75f4a5794' }, this.formatLabel), h("bs-switch", { key: '946ea660ff659d71ca2c3e024bff8eb05afdcfe8', part: "format-toggle", size: "md", ariaLabel: this.formatLabel, checked: !this.is12h, onBsChange: (ev) => (this.format = ev.detail ? '24h' : '12h') }))), h("div", { key: 'e6367ea101ae0981224129bc6c70c7bf5d2b6db9', class: "bs-timepicker__divider" }), h("div", { key: '20ab9cfd9702dae8bf097de642e61439489f6fb5', part: "selector", class: "bs-timepicker__selector" }, this.renderColumn('hour', this.hourLabel), h("div", { key: '5780f3fb2eb6f5b2e6d29ed4cd1585190051e3fd', part: "separator", class: "bs-timepicker__separator", "aria-hidden": "true" }, h("svg", { key: 'd35956df0f6f18f1472cc720f4ab876bbc41e515', viewBox: "0 0 4 32", fill: "currentColor" }, h("circle", { key: '4e6083df833bc3bf6390c80d7911219e61a51d37', cx: "2", cy: "10", r: "2" }), h("circle", { key: 'e3dea9bb879e7b4b09b9d37a0becbfd54f803169', cx: "2", cy: "22", r: "2" }))), this.renderColumn('minute', this.minuteLabel), this.is12h && (h("bs-input", { key: 'a9fb9ef6ff16d5c3f4aa4e067e3795a7ddc7d1e7', part: "period", class: "bs-timepicker__period", type: "dropdown", label: this.periodLabel, value: this.isPm ? 'PM' : 'AM', options: [
198
+ { label: 'AM', value: 'AM' },
199
+ { label: 'PM', value: 'PM' },
200
+ ], onBsChange: (ev) => {
201
+ const pm = ev.detail === 'PM';
202
+ if (pm !== this.isPm)
203
+ this.hour = (this.hour + 12) % 24;
204
+ } }))), h("div", { key: 'e4256dede407bec46c5da8e967001472ccd0f49b', class: "bs-timepicker__divider" }), h("div", { key: '9be6cade11a25c92c77f4313827f49ee8d89dfb4', part: "footer", class: "bs-timepicker__footer" }, h("bs-button", { key: '6ded59a284b389b5e4a259b1a238296ec83d6c27', part: "cancel", variant: "subtle", onClick: this.cancel }, this.cancelLabel), h("bs-button", { key: 'e1f566c9c34b3371783206910d91a9d49f8cdc41', part: "confirm", variant: "primary", onClick: this.confirm }, this.confirmLabel))));
205
+ }
206
+ static get is() { return "bs-timepicker"; }
207
+ static get encapsulation() { return "shadow"; }
208
+ static get formAssociated() { return true; }
209
+ static get originalStyleUrls() {
210
+ return {
211
+ "$": ["bs-timepicker.css"]
212
+ };
213
+ }
214
+ static get styleUrls() {
215
+ return {
216
+ "$": ["bs-timepicker.css"]
217
+ };
218
+ }
219
+ static get properties() {
220
+ return {
221
+ "name": {
222
+ "type": "string",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "string",
226
+ "resolved": "string",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": true,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "The `name` the confirmed value is submitted under in a surrounding `<form>`."
234
+ },
235
+ "getter": false,
236
+ "setter": false,
237
+ "reflect": true,
238
+ "attribute": "name"
239
+ },
240
+ "value": {
241
+ "type": "string",
242
+ "mutable": true,
243
+ "complexType": {
244
+ "original": "string",
245
+ "resolved": "string",
246
+ "references": {}
247
+ },
248
+ "required": false,
249
+ "optional": false,
250
+ "docs": {
251
+ "tags": [],
252
+ "text": "The confirmed time, 24-hour `HH:mm`. Empty means no time chosen yet (the picker opens on\n00:00). Mutable so Confirm updates it directly; `bsChange` still fires."
253
+ },
254
+ "getter": false,
255
+ "setter": false,
256
+ "reflect": true,
257
+ "attribute": "value",
258
+ "defaultValue": "''"
259
+ },
260
+ "format": {
261
+ "type": "string",
262
+ "mutable": true,
263
+ "complexType": {
264
+ "original": "'12h' | '24h'",
265
+ "resolved": "\"12h\" | \"24h\"",
266
+ "references": {}
267
+ },
268
+ "required": false,
269
+ "optional": false,
270
+ "docs": {
271
+ "tags": [],
272
+ "text": "Display format: `12h` (with an AM/PM dropdown) or `24h`. The user can switch it with the\n24h switch. Does not change `value`, which is always 24-hour."
273
+ },
274
+ "getter": false,
275
+ "setter": false,
276
+ "reflect": true,
277
+ "attribute": "format",
278
+ "defaultValue": "'12h'"
279
+ },
280
+ "minuteStep": {
281
+ "type": "number",
282
+ "mutable": false,
283
+ "complexType": {
284
+ "original": "number",
285
+ "resolved": "number",
286
+ "references": {}
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Step, in minutes, of the minute spinner's carets and arrow keys. Typing is not constrained."
293
+ },
294
+ "getter": false,
295
+ "setter": false,
296
+ "reflect": false,
297
+ "attribute": "minute-step",
298
+ "defaultValue": "1"
299
+ },
300
+ "heading": {
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": "Heading text."
313
+ },
314
+ "getter": false,
315
+ "setter": false,
316
+ "reflect": false,
317
+ "attribute": "heading",
318
+ "defaultValue": "'Select Time'"
319
+ },
320
+ "formatLabel": {
321
+ "type": "string",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "string",
325
+ "resolved": "string",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Label of the 24h switch."
333
+ },
334
+ "getter": false,
335
+ "setter": false,
336
+ "reflect": false,
337
+ "attribute": "format-label",
338
+ "defaultValue": "'24h'"
339
+ },
340
+ "confirmLabel": {
341
+ "type": "string",
342
+ "mutable": false,
343
+ "complexType": {
344
+ "original": "string",
345
+ "resolved": "string",
346
+ "references": {}
347
+ },
348
+ "required": false,
349
+ "optional": false,
350
+ "docs": {
351
+ "tags": [],
352
+ "text": "Label of the Confirm button."
353
+ },
354
+ "getter": false,
355
+ "setter": false,
356
+ "reflect": false,
357
+ "attribute": "confirm-label",
358
+ "defaultValue": "'Confirm'"
359
+ },
360
+ "cancelLabel": {
361
+ "type": "string",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string",
365
+ "resolved": "string",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": "Label of the Cancel button."
373
+ },
374
+ "getter": false,
375
+ "setter": false,
376
+ "reflect": false,
377
+ "attribute": "cancel-label",
378
+ "defaultValue": "'Cancel'"
379
+ },
380
+ "hourLabel": {
381
+ "type": "string",
382
+ "mutable": false,
383
+ "complexType": {
384
+ "original": "string",
385
+ "resolved": "string",
386
+ "references": {}
387
+ },
388
+ "required": false,
389
+ "optional": false,
390
+ "docs": {
391
+ "tags": [],
392
+ "text": "Accessible name of the hour spinner."
393
+ },
394
+ "getter": false,
395
+ "setter": false,
396
+ "reflect": false,
397
+ "attribute": "hour-label",
398
+ "defaultValue": "'Hour'"
399
+ },
400
+ "minuteLabel": {
401
+ "type": "string",
402
+ "mutable": false,
403
+ "complexType": {
404
+ "original": "string",
405
+ "resolved": "string",
406
+ "references": {}
407
+ },
408
+ "required": false,
409
+ "optional": false,
410
+ "docs": {
411
+ "tags": [],
412
+ "text": "Accessible name of the minute spinner."
413
+ },
414
+ "getter": false,
415
+ "setter": false,
416
+ "reflect": false,
417
+ "attribute": "minute-label",
418
+ "defaultValue": "'Minute'"
419
+ },
420
+ "periodLabel": {
421
+ "type": "string",
422
+ "mutable": false,
423
+ "complexType": {
424
+ "original": "string",
425
+ "resolved": "string",
426
+ "references": {}
427
+ },
428
+ "required": false,
429
+ "optional": false,
430
+ "docs": {
431
+ "tags": [],
432
+ "text": "Accessible name of the AM/PM dropdown."
433
+ },
434
+ "getter": false,
435
+ "setter": false,
436
+ "reflect": false,
437
+ "attribute": "period-label",
438
+ "defaultValue": "'AM/PM'"
439
+ }
440
+ };
441
+ }
442
+ static get states() {
443
+ return {
444
+ "hour": {},
445
+ "minute": {}
446
+ };
447
+ }
448
+ static get events() {
449
+ return [{
450
+ "method": "bsChange",
451
+ "name": "bsChange",
452
+ "bubbles": true,
453
+ "cancelable": true,
454
+ "composed": true,
455
+ "docs": {
456
+ "tags": [],
457
+ "text": "Fires when the user presses Confirm: `{ value }` as 24-hour `HH:mm`. Not fired when `value` is\nset programmatically."
458
+ },
459
+ "complexType": {
460
+ "original": "BsTimepickerChange",
461
+ "resolved": "BsTimepickerChange",
462
+ "references": {
463
+ "BsTimepickerChange": {
464
+ "location": "local",
465
+ "path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-timepicker/bs-timepicker.tsx",
466
+ "id": "src/components/bs-timepicker/bs-timepicker.tsx::BsTimepickerChange"
467
+ }
468
+ }
469
+ }
470
+ }, {
471
+ "method": "bsCancel",
472
+ "name": "bsCancel",
473
+ "bubbles": true,
474
+ "cancelable": true,
475
+ "composed": true,
476
+ "docs": {
477
+ "tags": [],
478
+ "text": "Fires when the user presses Cancel. The draft is reset to `value`."
479
+ },
480
+ "complexType": {
481
+ "original": "void",
482
+ "resolved": "void",
483
+ "references": {}
484
+ }
485
+ }];
486
+ }
487
+ static get elementRef() { return "el"; }
488
+ static get watchers() {
489
+ return [{
490
+ "propName": "value",
491
+ "methodName": "onValueChange"
492
+ }, {
493
+ "propName": "name",
494
+ "methodName": "onNameChange"
495
+ }];
496
+ }
497
+ static get attachInternalsMemberName() { return "internals"; }
498
+ }
499
+ function pad(n) {
500
+ return String(n).padStart(2, '0');
501
+ }
502
+ function parseTime(s) {
503
+ const m = /^(\d{1,2}):(\d{2})$/.exec((s ?? '').trim());
504
+ if (!m)
505
+ return undefined;
506
+ const hour = Number(m[1]);
507
+ const minute = Number(m[2]);
508
+ return hour <= 23 && minute <= 59 ? { hour, minute } : undefined;
509
+ }
@@ -0,0 +1,44 @@
1
+ import { html } from "lit";
2
+ import { componentDescription, propDescription } from "../../stories-utils";
3
+ const meta = {
4
+ title: 'Components/bs-timepicker',
5
+ parameters: { docs: { description: { component: componentDescription('bs-timepicker') } } },
6
+ render: args => html `
7
+ <bs-timepicker
8
+ value=${args.value}
9
+ format=${args.format}
10
+ minute-step=${args.minuteStep}
11
+ heading=${args.heading}
12
+ @bsChange=${(ev) => console.log('bsChange', ev.detail)}
13
+ @bsCancel=${() => console.log('bsCancel')}
14
+ ></bs-timepicker>
15
+ `,
16
+ argTypes: {
17
+ value: { control: 'text', description: propDescription('bs-timepicker', 'value') },
18
+ format: { control: 'inline-radio', options: ['12h', '24h'], description: propDescription('bs-timepicker', 'format') },
19
+ minuteStep: { control: { type: 'number', min: 1, max: 59 }, description: propDescription('bs-timepicker', 'minuteStep') },
20
+ heading: { control: 'text', description: propDescription('bs-timepicker', 'heading') },
21
+ },
22
+ args: {
23
+ value: '',
24
+ format: '12h',
25
+ minuteStep: 1,
26
+ heading: 'Select Time',
27
+ },
28
+ };
29
+ export default meta;
30
+ // Figma "12h" format: hour and minute spinners plus an AM/PM dropdown.
31
+ export const Default = {};
32
+ // Figma "24h" format: the 24h switch on, no AM/PM.
33
+ export const TwentyFourHour = {
34
+ name: '24h',
35
+ args: { format: '24h' },
36
+ };
37
+ export const WithValue = {
38
+ name: 'With a value',
39
+ args: { value: '14:30' },
40
+ };
41
+ export const FifteenMinuteStep = {
42
+ name: '15-minute step',
43
+ args: { value: '09:00', minuteStep: 15 },
44
+ };
@@ -25,7 +25,7 @@ export class BsToast {
25
25
  this.bsDismiss.emit();
26
26
  };
27
27
  render() {
28
- return (h("div", { key: '238f177a44aa2bd735432fe8f3fd1d761065d023', part: "container", class: `bs-toast bs-toast--${this.state}`, role: "status", "aria-live": this.state === 'error' ? 'assertive' : 'polite' }, h("div", { key: '717e222c7b271db0ff5aa57db8ce0efa15bfaf50', class: "bs-toast__content" }, h("span", { key: '316106f6efbcc8abe6bb155e77ec21343b93287c', part: "icon", class: "bs-toast__icon", "aria-hidden": "true" }, h(StateIcon, { key: '5973febbe8d7be889fd14cac847c417a22acb111', state: this.state })), h("span", { key: '1d16db1ba5c010ac5af237b4b399e0dda6f6df59', part: "message", class: "bs-toast__message" }, h("slot", { key: '40e97271fec790a850491be58ae87e54b4765a6a' }))), h("div", { key: '16744b9b6ad79d13aec16afa6593ab0de1ec5ee2', class: "bs-toast__actions" }, h("button", { key: '87adace9953b2dca831543132f3fe5590bc4c52f', part: "close", type: "button", class: "bs-toast__close", "aria-label": "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: 'dcf5ffe7a5553ec2792d801c7f62ed367d1454ef' })))));
28
+ return (h("div", { key: 'e8da15f45d0491a0eb8568a8fc31e2b802cf30c3', part: "container", class: `bs-toast bs-toast--${this.state}`, role: "status", "aria-live": this.state === 'error' ? 'assertive' : 'polite' }, h("div", { key: '703099dfc85c56997a2cf6e5e86bd559d1a9d971', class: "bs-toast__content" }, h("span", { key: 'dacb887b5e7bdae27100399a80f9c2cc7a9970d6', part: "icon", class: "bs-toast__icon", "aria-hidden": "true" }, h(StateIcon, { key: '5d71c6abf0c68673c20de54162557a224cffd66b', state: this.state })), h("span", { key: '6587834edfbdf0188a8780ee0c5b93a572956da4', part: "message", class: "bs-toast__message" }, h("slot", { key: '559c2a397c140532185da397a7cab18f484fad19' }))), h("div", { key: '87f868f1b541432798de1f511f92091434c41e0f', class: "bs-toast__actions" }, h("button", { key: '6267c6dcc3114af0d9fecd250097416f80f661b1', part: "close", type: "button", class: "bs-toast__close", "aria-label": "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '8b6a5b9e2ce36d5cbbec7801df81fd125c7d0f27' })))));
29
29
  }
30
30
  static get is() { return "bs-toast"; }
31
31
  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: 'b7c2ee57db3a4e36cdd106d78f0f8d54c45a04c6', class: "bs-tooltip" }, h("span", { key: '22b738a760e9967233052ce4540c77da4ac9563e', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: '69a8b07711478e699be4c8151d9f7dfd2e4e0bf4', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: 'b32c75a06582b8e8f99b973889450e9100b75323' }))));
45
+ return (h("div", { key: '6fdabb24080aa3e58a1054aa63f43878da2d0787', class: "bs-tooltip" }, h("span", { key: 'ec139068fd7714642215b47ffbd91318062cbb84', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: 'c1e18985eeb5263b6faf9c14c1f6c93cfe6c1062', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: 'f521333b359cb1b30457753ee28379a064aeeae2' }))));
46
46
  }
47
47
  static get is() { return "bs-tooltip"; }
48
48
  static get encapsulation() { return "shadow"; }
@@ -228,11 +228,11 @@ export class BsNavigationDrawer {
228
228
  };
229
229
  render() {
230
230
  const classes = ['bs-navigation-drawer', this.mobile ? 'bs-navigation-drawer--overlay' : '', this.overlayOpen ? 'bs-navigation-drawer--open' : ''].filter(Boolean).join(' ');
231
- return (h(Host, { key: '94c3fbfb2d9826979f2f90ec0c9571aadc484450', "data-overlay": this.mobile ? '' : undefined }, this.mobile && h("div", { key: 'cc8b62b02a561dfbb0a15918e4bbbf241919ea7d', part: "backdrop", class: "bs-navigation-drawer__backdrop", onClick: this.requestClose }), h("nav", { key: 'ad3e970438fca27636992cc434584bfae7888895', ref: el => (this.navRef = el), class: classes, "aria-label": this.heading,
231
+ return (h(Host, { key: 'c1e563e7b2a9474286671a3f6e1f2d3aed312620', "data-overlay": this.mobile ? '' : undefined }, this.mobile && h("div", { key: 'f6885e88df1607bb9e85a27c4e1cb616ce6b6c0d', part: "backdrop", class: "bs-navigation-drawer__backdrop", onClick: this.requestClose }), h("nav", { key: 'a3086b5203fd3724fce5fe82be394a77a6d9a1e1', ref: el => (this.navRef = el), class: classes, "aria-label": this.heading,
232
232
  // Stays a plain <nav> landmark in every state: ARIA does not allow role="dialog" on <nav>
233
233
  // (axe: aria-allowed-role). Modality is behavioral -- focus is held inside, the page behind is
234
234
  // scrimmed, Escape closes -- rather than announced through aria-modal.
235
- tabIndex: this.mobile ? -1 : undefined }, this.showLogo && (h("div", { key: '41552cc9bc1fd33081119b6b6a475e9a81281e97', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '96503cee7e467c535747171f46ab8b36f2d9262a', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: '6b4e91b0296772ea492a2e12c1f81933be1af02b', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: '72c4cae8f25aebef923d2b346ee3a3224a1a4550', variant: "mark", background: this.logoBackground }))), h("div", { key: '2fde5f92e629d34321e0e0e6eaf776027614836a', class: "bs-navigation-drawer__title-row" }, h("span", { key: 'fde5717eeec30bbade48f574e44f9eec841bab36', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '59d514aec296c5b4eb459de259aa29d77a435ecf', 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: 'a992c1fcaa3e143ee9f1469958eeab12e03bce03' })))), h("div", { key: '1a74885abe2e50b3a6eccd7d4cacca4582dc5fa9', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: 'ac98f9ca62a289e21fcbf0f005c6c0f7e02d9967', name: "search" })), h("button", { key: 'c7c50e5cf2c81ec8445a557505faf2ea40add094', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: '538bcfc474036d2c79fe821011490bf7cbd4d018' })), h("div", { key: '1a7aa824a99823b2d06309c5192a200afe378a7b', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '1a79d4f0e809b16a9d19efb06d36052c0539bba2' })))));
235
+ tabIndex: this.mobile ? -1 : undefined }, this.showLogo && (h("div", { key: 'c1b8700d6936ae14acf900d3cc83c6a8a7d79a20', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '27f4205dcdd609c4709a09dbeb7d4d59a41340db', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: 'b8474734a50dbd690a9a8d8febd6cda084498d02', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: 'c89909a16f7255d24ddaae54ddd2c6cfca361572', variant: "mark", background: this.logoBackground }))), h("div", { key: '83b7641c3c1f8b8307bf8006bbef147ccfdc917c', class: "bs-navigation-drawer__title-row" }, h("span", { key: '97075d0df805b02f3f520c42ef4eceaa377e7064', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '184f4f2f35f74f145621d2854a6a50e52006ebd1', 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: '168c4a4f30f9cf92afd5cffc63e989e0a3d4e45a' })))), h("div", { key: 'd93ec72e4f6ba6f01d4fdc8fc3d9e0c9f0649242', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: '3441fb753d206b84e68bb777e60ec849185882b9', name: "search" })), h("button", { key: '98b3bf5e4807afb1ba5a91e2b5238d917f584ab8', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: 'c61c32465503084caab0b3741bc95e3f0f274214' })), h("div", { key: 'f75111a609795d6ed83e3e843a433440a932b730', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '50f7cee1ae4e352b56561740bfc6ff035d521354' })))));
236
236
  }
237
237
  static get is() { return "bs-navigation-drawer"; }
238
238
  static get encapsulation() { return "shadow"; }
@@ -131,7 +131,7 @@ export class BsNavigationDrawerItem {
131
131
  // incorrectly also toggle this parent row on every child click. Both are wrapped in a
132
132
  // `display: contents` container so render() still returns a single root node (this codebase's
133
133
  // convention, e.g. bs-input.tsx) without that wrapper affecting layout at all.
134
- return (h("div", { key: '34d31ff7c612fa135b6dc14b757d66d4b00f99e4', class: "bs-navigation-drawer-item__root" }, h("button", { key: '08e244c8ada605dc7705df5b1d45ebce80165f3e', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: 'a6e09b5edb35ec8f76ed6d6a78ddd1eb141f87b6', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '851289379dacae965639ed7963d800c8a92472c2', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: '4b46c2ca6a5bf4d5e777ae72c9ea826ffcffea02', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: 'df214a2bcea435a678c18d0f461d9011c767a995' })), this.expandable && (h("span", { key: 'd12e91043617e96567acd5497a53dd98c612c6af', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: 'c278774ae33cf86e7d1b3f70f4e99b8c7afc4d68' })))), this.expandable && (h("span", { key: '85081ed698d078b94225c7b984eaee1edfd22b49', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '85c22788467a67f18b9cca6018c179a28d06fa19', name: "children" })))));
134
+ return (h("div", { key: 'a62142391a3302dd6379135af11aa3215786df60', class: "bs-navigation-drawer-item__root" }, h("button", { key: '859f32bb1588ec661fea55d405a60a20e803b969', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: '0191eb506a8fa145732fb250d52d1ad650ea9a0f', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '29bfc6b85d32172ac4f92ca482ffcbf71ed2158c', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: 'd5e681c8dfc6b8517a01caea2daa49089ef73994', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: '6f60e5831a064caae85747d6c6b735912abc9a3c' })), this.expandable && (h("span", { key: '37eebaa53518961ac10e37abe8a6f68e1066b173', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: '5c212defdf0226202d710f799dbf380aca087ff6' })))), this.expandable && (h("span", { key: 'abc9eb5ca2161706511b3691c71d5fedd33ee74f', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '9b501d624d2bd055e4a71848d08dfb7198e17ece', name: "children" })))));
135
135
  }
136
136
  static get is() { return "bs-navigation-drawer-item"; }
137
137
  static get encapsulation() { return "shadow"; }
@@ -61,7 +61,7 @@ export class BsNavigationHeader {
61
61
  render() {
62
62
  const showLogo = this.alignment !== 'with-navigation-drawer';
63
63
  const rootClasses = `bs-navigation-header bs-navigation-header--${this.alignment}`;
64
- return (h("header", { key: '0dc99abb8f2db96f0befe1b838a2db037636a75c', class: rootClasses, "aria-label": this.ariaLabel ?? undefined }, this.skipToContentHref && (h("a", { key: '1f906366d5398aa62d2485afdb1c9cf350354f05', part: "skip-link", class: "bs-navigation-header__skip-link", href: this.skipToContentHref }, this.skipToContentLabel)), showLogo && (h("bs-logo", { key: 'c735b4647acc92ff5b6725dc72bfbab421230a9c', part: "logo", class: "bs-navigation-header__logo", variant: "full", background: this.logoBackground })), h("div", { key: '845c1d60319daf2aa7aa57f0f8ba71e0f633598e', part: "left", class: "bs-navigation-header__left" }, h("slot", { key: '67436745b63a843e86a79163f927f2b563b6e2e4', name: "left" })), h("div", { key: '4c6d514d7cf238b5be8476f9fede7292b1dc1c10', part: "right", class: "bs-navigation-header__right" }, h("slot", { key: 'a6c12231c6cc728314fdfc076a48fd1ce0f79ede', name: "right" }))));
64
+ return (h("header", { key: '8df6952f56af87f50c453d923d579a873565f340', class: rootClasses, "aria-label": this.ariaLabel ?? undefined }, this.skipToContentHref && (h("a", { key: 'fc18af20e2900ad6ae6c84e48bf34cbb1a5a256a', part: "skip-link", class: "bs-navigation-header__skip-link", href: this.skipToContentHref }, this.skipToContentLabel)), showLogo && (h("bs-logo", { key: '8b903db4bf61de487379378bf7ed241b7bfe588a', part: "logo", class: "bs-navigation-header__logo", variant: "full", background: this.logoBackground })), h("div", { key: '16db4c45690961fe6f362204f97969375a6fda7c', part: "left", class: "bs-navigation-header__left" }, h("slot", { key: '96b0d128230c694f104d1d0578d3dfb81cd3f3c1', name: "left" })), h("div", { key: 'e5250ad7e8ad58d0305ee5a41259704ec4a00a4a', part: "right", class: "bs-navigation-header__right" }, h("slot", { key: 'd2620bea8d01c0abc1751e44ed9bdd8e5ce36d6b', name: "right" }))));
65
65
  }
66
66
  static get is() { return "bs-navigation-header"; }
67
67
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- import{t as i,p as e,H as s,h as a}from"./p-JYlmcxBn.js";const t=e(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}render(){return a("div",{key:"2df50141b934d044d68015cc40b0cc525f374ec7",class:"bs-ai-disclaimer"},a("p",{key:"42e735a432c16d16c4daa786bbd3e2757d298e68",part:"text",class:"bs-ai-disclaimer__text"},a("slot",{key:"fe037a3b1bd4bf6135448abd6ce2de8aa4cec6d5"})))}static get style(){return":host{display:block;--bs-ai-disclaimer-padding-x:var(--bs-spacing-200);--bs-ai-disclaimer-text-color:var(--bs-text-secondary);--bs-ai-disclaimer-font-size:var(--bs-font-size-sm);--bs-ai-disclaimer-line-height:var(--bs-line-height-body-sm)}.bs-ai-disclaimer{box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 var(--bs-ai-disclaimer-padding-x);font-family:inherit}.bs-ai-disclaimer__text{margin:0;flex:1 0 0;min-width:0;color:var(--bs-ai-disclaimer-text-color);font-size:var(--bs-ai-disclaimer-font-size);line-height:calc(var(--bs-ai-disclaimer-line-height) * 1px);text-align:center;word-break:break-word}"}},[257,"bs-ai-disclaimer"]);function r(){"undefined"!=typeof customElements&&["bs-ai-disclaimer"].forEach((e=>{"bs-ai-disclaimer"===e&&(customElements.get(i(e))||customElements.define(i(e),t))}))}r();const c=t,d=r;export{c as BsAiDisclaimer,d as defineCustomElement}
1
+ import{t as i,p as e,H as s,h as a}from"./p-JYlmcxBn.js";const t=e(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}render(){return a("div",{key:"94efc8f14ad853f5e04c5d0b1d7630138bb6a8f6",class:"bs-ai-disclaimer"},a("p",{key:"e19407ceb6f9dbf00f68eb120d1bb371683468c2",part:"text",class:"bs-ai-disclaimer__text"},a("slot",{key:"68148e0251aeb03d082c64315860a4a683bebad0"})))}static get style(){return":host{display:block;--bs-ai-disclaimer-padding-x:var(--bs-spacing-200);--bs-ai-disclaimer-text-color:var(--bs-text-secondary);--bs-ai-disclaimer-font-size:var(--bs-font-size-sm);--bs-ai-disclaimer-line-height:var(--bs-line-height-body-sm)}.bs-ai-disclaimer{box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 var(--bs-ai-disclaimer-padding-x);font-family:inherit}.bs-ai-disclaimer__text{margin:0;flex:1 0 0;min-width:0;color:var(--bs-ai-disclaimer-text-color);font-size:var(--bs-ai-disclaimer-font-size);line-height:calc(var(--bs-ai-disclaimer-line-height) * 1px);text-align:center;word-break:break-word}"}},[257,"bs-ai-disclaimer"]);function r(){"undefined"!=typeof customElements&&["bs-ai-disclaimer"].forEach((e=>{"bs-ai-disclaimer"===e&&(customElements.get(i(e))||customElements.define(i(e),t))}))}r();const c=t,d=r;export{c as BsAiDisclaimer,d as defineCustomElement}