@brightspot/ui 5.3.2 → 5.4.1

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 (106) hide show
  1. package/README.md +113 -150
  2. package/dist/components/banner/Banner.css +32 -0
  3. package/dist/components/banner/Banner.d.ts +56 -0
  4. package/dist/components/banner/Banner.d.ts.map +1 -0
  5. package/dist/components/banner/Banner.js +94 -0
  6. package/dist/components/banner/Banner.js.map +1 -0
  7. package/dist/components/banner/Message.css +4 -0
  8. package/dist/components/banner/Message.d.ts +103 -0
  9. package/dist/components/banner/Message.d.ts.map +1 -0
  10. package/dist/components/banner/Message.js +235 -0
  11. package/dist/components/banner/Message.js.map +1 -0
  12. package/dist/custom-elements.json +319 -0
  13. package/dist/storybook/assets/{ActionBar.stories-1Iqfy4PV.js → ActionBar.stories-BJcrfF0X.js} +1 -1
  14. package/dist/storybook/assets/{ActionItem.stories-DjKyE7m_.js → ActionItem.stories-xLR-VN2Q.js} +1 -1
  15. package/dist/storybook/assets/{Avatar.stories-Dy36fKQN.js → Avatar.stories-Cj5Q2yEp.js} +1 -1
  16. package/dist/storybook/assets/{AvatarGroup.stories-Bh8TY9-P.js → AvatarGroup.stories-DLWAQHFa.js} +1 -1
  17. package/dist/storybook/assets/{Badge.stories-Bn0aBHka.js → Badge.stories-DGSKAf9D.js} +1 -1
  18. package/dist/storybook/assets/Banner.stories-BZ3LLa4I.js +203 -0
  19. package/dist/storybook/assets/{Button-D8Sr8A-v.js → Button-ffu9dnxC.js} +1 -1
  20. package/dist/storybook/assets/{Button.stories-CtRBI4gv.js → Button.stories-DB-uDcVu.js} +1 -1
  21. package/dist/storybook/assets/{ButtonGroup.stories-CVjQWgMD.js → ButtonGroup.stories-eGya8Uts.js} +1 -1
  22. package/dist/storybook/assets/{Card.stories-DXTqqbXb.js → Card.stories-B_hhKmQB.js} +1 -1
  23. package/dist/storybook/assets/{Celebrate.stories-DwQeQ1VN.js → Celebrate.stories-DqKwiwly.js} +1 -1
  24. package/dist/storybook/assets/{Checkbox.stories-D4AyVy-V.js → Checkbox.stories-Bly8OVzf.js} +1 -1
  25. package/dist/storybook/assets/{CircularProgress.stories-D6dHpD70.js → CircularProgress.stories-BZUNNkMK.js} +1 -1
  26. package/dist/storybook/assets/{ClipboardMixin.stories-CvYj7bwY.js → ClipboardMixin.stories-D2XMhwIg.js} +1 -1
  27. package/dist/storybook/assets/{Color-6BZIO3FS-o6fp9dCO.js → Color-6BZIO3FS-BPcC43iH.js} +1 -1
  28. package/dist/storybook/assets/{Colors.stories-Bg-Xuo05.js → Colors.stories-DveV04we.js} +1 -1
  29. package/dist/storybook/assets/{CombinedEffects.stories-C4SNTP9M.js → CombinedEffects.stories-Dl_MhHhl.js} +1 -1
  30. package/dist/storybook/assets/{ComponentStatesMixin-Dj1V-e8c.js → ComponentStatesMixin-CmZnizKN.js} +1 -1
  31. package/dist/storybook/assets/{ComponentStatesMixin.stories-CUoagWLT.js → ComponentStatesMixin.stories-BrAFoGDu.js} +1 -1
  32. package/dist/storybook/assets/{CopyToClipboard.stories-ynkFni9d.js → CopyToClipboard.stories-CiKbtpBJ.js} +1 -1
  33. package/dist/storybook/assets/{Debounce.stories-xAZ6AOUR.js → Debounce.stories-BQ7W_yTX.js} +1 -1
  34. package/dist/storybook/assets/{DocsRenderer-LL677BLK-DeoiTMLA.js → DocsRenderer-LL677BLK-DiDzi0rZ.js} +3 -3
  35. package/dist/storybook/assets/{Dropdown.stories-BQzwsyHE.js → Dropdown.stories-LYd0-ypG.js} +1 -1
  36. package/dist/storybook/assets/{EmptyState.stories-CrckJlBX.js → EmptyState.stories-DjKyE0h3.js} +1 -1
  37. package/dist/storybook/assets/{EscaAvatar.stories-BikckAep.js → EscaAvatar.stories-D3v91UKv.js} +1 -1
  38. package/dist/storybook/assets/{Events.stories-DC0XMBhF.js → Events.stories-CTe5eZa6.js} +1 -1
  39. package/dist/storybook/assets/{Heading.stories-7YtY0gNK.js → Heading.stories-DKt-wgRB.js} +1 -1
  40. package/dist/storybook/assets/{HueRipple.stories-hRstwRnF.js → HueRipple.stories-B3SVSdL8.js} +1 -1
  41. package/dist/storybook/assets/{Icon.stories-4-2N4UlX.js → Icon.stories-B5tDsd--.js} +1 -1
  42. package/dist/storybook/assets/{IconButton.stories-ClpNoAT9.js → IconButton.stories-DOV4zFAP.js} +1 -1
  43. package/dist/storybook/assets/{LinearProgress.stories-BlH24bsJ.js → LinearProgress.stories-ai3UD-xw.js} +1 -1
  44. package/dist/storybook/assets/Message.stories-CzqIe49h.js +432 -0
  45. package/dist/storybook/assets/{OnFindMixin.stories-CKoPIaks.js → OnFindMixin.stories-CUaE6pX1.js} +1 -1
  46. package/dist/storybook/assets/{Pagination.stories-CER9zwKW.js → Pagination.stories-CXCbChNW.js} +1 -1
  47. package/dist/storybook/assets/{Popover.stories-CO7t4Pl8.js → Popover.stories-DyptvVL3.js} +1 -1
  48. package/dist/storybook/assets/{ReadyMixin-C_H-s0cp.js → ReadyMixin-BUpBkgED.js} +1 -1
  49. package/dist/storybook/assets/{RovingTabindexMixin.stories-0Sny7BQc.js → RovingTabindexMixin.stories-DzEH38Tn.js} +1 -1
  50. package/dist/storybook/assets/{Rtc.stories-Ci7CnFM6.js → Rtc.stories-DxQWkudF.js} +1 -1
  51. package/dist/storybook/assets/{ScrollShadow.stories-CSbM9xdE.js → ScrollShadow.stories-DbMdNLKA.js} +1 -1
  52. package/dist/storybook/assets/{Switch.stories-D-SGY0dL.js → Switch.stories-CvSwuR0Z.js} +1 -1
  53. package/dist/storybook/assets/{Tab.stories-DXeloL5R.js → Tab.stories-CI6m8NXD.js} +1 -1
  54. package/dist/storybook/assets/{Tabs.stories-KGjrQHnj.js → Tabs.stories-BMat3ubI.js} +1 -1
  55. package/dist/storybook/assets/{Throttle.stories-SjszmCVX.js → Throttle.stories-PEUZoXfI.js} +1 -1
  56. package/dist/storybook/assets/{Tooltip.stories-DZty4zmq.js → Tooltip.stories-kDJ5PbGO.js} +1 -1
  57. package/dist/storybook/assets/{Upload.stories-CoM7bgt1.js → Upload.stories-Bb5KBlh7.js} +1 -1
  58. package/dist/storybook/assets/{UploadItem.stories-CRrp-ZTV.js → UploadItem.stories-VZVWc52f.js} +1 -1
  59. package/dist/storybook/assets/{Welcome.stories-lQ_IWtd1.js → Welcome.stories-BgzaFbT1.js} +1 -1
  60. package/dist/storybook/assets/{Widget.stories-rY-A2yAZ.js → Widget.stories-Bbczy09Q.js} +1 -1
  61. package/dist/storybook/assets/{WithTooltip-65CFNBJE-asVkTqyz.js → WithTooltip-65CFNBJE-BoKgPPcr.js} +1 -1
  62. package/dist/storybook/assets/{blocks-D-cAwpi5.js → blocks-j0yzxuDk.js} +5 -5
  63. package/dist/storybook/assets/{formatter-EIJCOSYU-CaSK-GPg.js → formatter-EIJCOSYU-B5-4vV2C.js} +1 -1
  64. package/dist/storybook/assets/if-defined-DBQP12ek.js +1 -0
  65. package/dist/storybook/assets/iframe-Ce3XRnL4.css +1 -0
  66. package/dist/storybook/assets/{iframe-DpPeZoRd.js → iframe-DUmd7GbF.js} +86 -86
  67. package/dist/storybook/assets/{index-Eb_LP-gw.js → index-ACSvfrQi.js} +1 -1
  68. package/dist/storybook/assets/{onFind-D8gPkhwL.js → onFind-t_5Bmfio.js} +1 -1
  69. package/dist/storybook/assets/{onFind.stories-C_2tTxBq.js → onFind.stories-CQWcRPFY.js} +1 -1
  70. package/dist/storybook/assets/{onRemove.stories-D-gjr3kA.js → onRemove.stories-B9_DDB2B.js} +1 -1
  71. package/dist/storybook/assets/{onVisible.stories-DGfzNLoX.js → onVisible.stories-G0qjGum_.js} +1 -1
  72. package/dist/storybook/assets/{style-map-WEdc6AkA.js → style-map-D_jXmlQ4.js} +1 -1
  73. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CCM2wmJ3.js → syntaxhighlighter-ED5Y7EFY-7_fYNYDB.js} +1 -1
  74. package/dist/storybook/iframe.html +2 -2
  75. package/dist/storybook/index.json +1 -1
  76. package/dist/storybook/project.json +1 -1
  77. package/dist/tailwind-plugin-message.d.ts +2 -0
  78. package/dist/tailwind-plugin-message.d.ts.map +1 -0
  79. package/dist/tailwind-plugin-message.js +168 -0
  80. package/dist/tailwind-plugin-message.js.map +1 -0
  81. package/dist/tailwind-plugin-message.ts +226 -0
  82. package/dist/tailwind.config.d.ts.map +1 -1
  83. package/dist/tailwind.config.js +2 -0
  84. package/dist/tailwind.config.js.map +1 -1
  85. package/dist/tailwind.config.ts +2 -0
  86. package/dist/util/EventEmitterMixin.d.ts +3 -0
  87. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  88. package/dist/util/EventEmitterMixin.js.map +1 -1
  89. package/docs/components/Banner.md +49 -0
  90. package/docs/components/Message.md +75 -0
  91. package/docs/components/README.md +2 -0
  92. package/package.json +1 -1
  93. package/src/legacy/tool-ui/src/ContentInputGroup.css +4 -0
  94. package/src/legacy/tool-ui/src/Hierarchy.css +4 -11
  95. package/src/legacy/tool-ui/src/MenuView.css +9 -0
  96. package/src/legacy/tool-ui/src/Page.css +1 -1
  97. package/src/legacy/tool-ui/src/PrePublish.ts +0 -24
  98. package/src/legacy/tool-ui/src/ThemeBundleEditor.css +4 -0
  99. package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js → v4.ba601ff96a3370471a41.js} +3 -3
  100. package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js → v5.4cdf07db0213a5d2f97e.js} +3 -3
  101. package/src/legacy/tool-ui/src/main/webapp/dist/v5.553c18f29cb4a71c3577.css +5 -0
  102. package/dist/storybook/assets/if-defined-aps73Iby.js +0 -1
  103. package/dist/storybook/assets/iframe-1F7Ef_8q.css +0 -1
  104. package/src/legacy/tool-ui/src/main/webapp/dist/v5.9b40c96064a0f8a10b53.css +0 -5
  105. /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js.LICENSE.txt → v4.ba601ff96a3370471a41.js.LICENSE.txt} +0 -0
  106. /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js.LICENSE.txt → v5.4cdf07db0213a5d2f97e.js.LICENSE.txt} +0 -0
@@ -1,4 +1,4 @@
1
- import{g as S,x as t}from"./iframe-DpPeZoRd.js";import{o as f}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:O,args:A,argTypes:n}=S("btu-dropdown"),B={title:"Components/Dropdown",component:"btu-dropdown",tags:["autodocs"],parameters:{docs:{subtitle:"btu-dropdown",description:{component:`
1
+ import{g as S,x as t}from"./iframe-DUmd7GbF.js";import{o as f}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:O,args:A,argTypes:n}=S("btu-dropdown"),B={title:"Components/Dropdown",component:"btu-dropdown",tags:["autodocs"],parameters:{docs:{subtitle:"btu-dropdown",description:{component:`
2
2
  A dropdown menu component that renders a trigger button and manages a floating panel
3
3
  containing a \`btu-dropdown-menu\` with \`btu-dropdown-item\` children.
4
4
 
@@ -1,4 +1,4 @@
1
- import{g as u,x as e}from"./iframe-DpPeZoRd.js";import{o as m}from"./if-defined-aps73Iby.js";import{o as h}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:g,argTypes:s}=u("btu-empty-state"),y=["sm","md","lg"],v=[1,2,3,4,5,6],k={title:"Components/Empty State",component:"btu-empty-state",tags:["autodocs"],parameters:{docs:{subtitle:"A standardized component for communicating the absence of content.",description:{component:`
1
+ import{g as u,x as e}from"./iframe-DUmd7GbF.js";import{o as m}from"./if-defined-DBQP12ek.js";import{o as h}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:g,argTypes:s}=u("btu-empty-state"),y=["sm","md","lg"],v=[1,2,3,4,5,6],k={title:"Components/Empty State",component:"btu-empty-state",tags:["autodocs"],parameters:{docs:{subtitle:"A standardized component for communicating the absence of content.",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>To communicate the absence of content in tables, lists, or search results</li>
@@ -1,4 +1,4 @@
1
- import{g as f,x as a}from"./iframe-DpPeZoRd.js";import{o as x}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:w,args:z,argTypes:m}=f("btu-esca-avatar"),y=["idle","wave","search","complete"],g=["xs","sm","md","lg","xl"],$={title:"Components/Esca/Avatar",component:"btu-esca-avatar",tags:["autodocs"],parameters:{docs:{subtitle:"The animated avatar for the Esca AI assistant",description:{component:`
1
+ import{g as f,x as a}from"./iframe-DUmd7GbF.js";import{o as x}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:w,args:z,argTypes:m}=f("btu-esca-avatar"),y=["idle","wave","search","complete"],g=["xs","sm","md","lg","xl"],$={title:"Components/Esca/Avatar",component:"btu-esca-avatar",tags:["autodocs"],parameters:{docs:{subtitle:"The animated avatar for the Esca AI assistant",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>Alongside the Esca assistant's messages, in any chat surface</li>
@@ -1,4 +1,4 @@
1
- import{x as d}from"./iframe-DpPeZoRd.js";import"./preload-helper-PPVm8Dsz.js";var n=Object.freeze,r=Object.defineProperty,s=(t,i)=>n(r(t,"raw",{value:n(t.slice())})),o;const l={title:"Mixins/Events",tags:["autodocs"],parameters:{docs:{subtitle:"Events inherited from EventEmitterMixin",description:{component:`
1
+ import{x as d}from"./iframe-DUmd7GbF.js";import"./preload-helper-PPVm8Dsz.js";var n=Object.freeze,r=Object.defineProperty,s=(t,i)=>n(r(t,"raw",{value:n(t.slice())})),o;const l={title:"Mixins/Events",tags:["autodocs"],parameters:{docs:{subtitle:"Events inherited from EventEmitterMixin",description:{component:`
2
2
  <h3>EventEmitterMixin Events</h3>
3
3
 
4
4
  <p>All Brightspot UI components that extend EventEmitterMixin emit the following lifecycle events in addition to those inherited from LitElement. These events use CustomEvent and bubble through the DOM with <code>composed: true</code>, meaning they cross shadow DOM boundaries.</p>
@@ -1,3 +1,3 @@
1
- import{x as s}from"./iframe-DpPeZoRd.js";import"./preload-helper-PPVm8Dsz.js";const r=({size:t})=>s` <div class=${[`btu-heading-${t}`].join(" ")}>Heading</div> `,o={title:"CSS Plugins/Heading",component:"btu-heading",tags:["autodocs"],parameters:{docs:{subtitle:"This Tailwind CSS plugin provides the `.btu-heading` utility class for styling headings. It supports five different sizes, from 1 (largest) to 5 (smallest). Apply the class to `<h1>` through `<h5>` elements to style them accordingly."},controls:{expanded:!0}},render:t=>r(t),argTypes:{size:{control:{type:"range",min:1,max:5,step:1},description:"Heading size from 1 to 5, where 1 is the largest and 5 is the smallest."}},args:{size:1}},e={args:{}};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:`{
1
+ import{x as s}from"./iframe-DUmd7GbF.js";import"./preload-helper-PPVm8Dsz.js";const r=({size:t})=>s` <div class=${[`btu-heading-${t}`].join(" ")}>Heading</div> `,o={title:"CSS Plugins/Heading",component:"btu-heading",tags:["autodocs"],parameters:{docs:{subtitle:"This Tailwind CSS plugin provides the `.btu-heading` utility class for styling headings. It supports five different sizes, from 1 (largest) to 5 (smallest). Apply the class to `<h1>` through `<h5>` elements to style them accordingly."},controls:{expanded:!0}},render:t=>r(t),argTypes:{size:{control:{type:"range",min:1,max:5,step:1},description:"Heading size from 1 to 5, where 1 is the largest and 5 is the smallest."}},args:{size:1}},e={args:{}};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:`{
2
2
  args: {}
3
3
  }`,...e.parameters?.docs?.source}}};const n=["Default"];export{e as Default,n as __namedExportsOrder,o as default};
@@ -1,4 +1,4 @@
1
- import{x as i}from"./iframe-DpPeZoRd.js";import{b as l}from"./ripple-DQbyyRUw.js";import{B as e}from"./Button-D8Sr8A-v.js";import"./preload-helper-PPVm8Dsz.js";import"./position-CFNQy3J6.js";const m={title:"Effects/Hue Ripple",tags:["autodocs"],parameters:{docs:{subtitle:"Click anywhere to send a hue-shifting ripple across the viewport",description:{component:`
1
+ import{x as i}from"./iframe-DUmd7GbF.js";import{b as l}from"./ripple-DQbyyRUw.js";import{B as e}from"./Button-ffu9dnxC.js";import"./preload-helper-PPVm8Dsz.js";import"./position-CFNQy3J6.js";const m={title:"Effects/Hue Ripple",tags:["autodocs"],parameters:{docs:{subtitle:"Click anywhere to send a hue-shifting ripple across the viewport",description:{component:`
2
2
  Uses the **View Transition API** to create an expanding ring that reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal.
3
3
 
4
4
  ### Usage
@@ -1,4 +1,4 @@
1
- import{g,x as s}from"./iframe-DpPeZoRd.js";import{o as h}from"./style-map-WEdc6AkA.js";import{L as u}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:x,args:v,argTypes:i}=g("btu-icon"),b=["xs","sm","md","lg","xl"],f=["ai","error","gray","primary","purple","rose","success","teal","warning"],C={title:"Components/Icon",component:"btu-icon",tags:["autodocs"],parameters:{docs:{subtitle:"An icon component using Lucide icons with built-in support for custom colors and sizes.",description:{component:`
1
+ import{g,x as s}from"./iframe-DUmd7GbF.js";import{o as h}from"./style-map-D_jXmlQ4.js";import{L as u}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:x,args:v,argTypes:i}=g("btu-icon"),b=["xs","sm","md","lg","xl"],f=["ai","error","gray","primary","purple","rose","success","teal","warning"],C={title:"Components/Icon",component:"btu-icon",tags:["autodocs"],parameters:{docs:{subtitle:"An icon component using Lucide icons with built-in support for custom colors and sizes.",description:{component:`
2
2
  <strong>When to use:</strong>
3
3
  <ul>
4
4
  <li>To visually reinforce actions, states, or categories</li>
@@ -1,4 +1,4 @@
1
- import{g as p,x as e}from"./iframe-DpPeZoRd.js";import{o as b}from"./if-defined-aps73Iby.js";import{L as d}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:y,argTypes:o}=p("btu-icon-button"),x={title:"Components/Icon Button",component:"btu-icon-button",tags:["autodocs"],parameters:{docs:{subtitle:"Combines button styles with the icon component along with an opinionated API",description:{component:`
1
+ import{g as p,x as e}from"./iframe-DUmd7GbF.js";import{o as b}from"./if-defined-DBQP12ek.js";import{L as d}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:y,argTypes:o}=p("btu-icon-button"),x={title:"Components/Icon Button",component:"btu-icon-button",tags:["autodocs"],parameters:{docs:{subtitle:"Combines button styles with the icon component along with an opinionated API",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>For actions in compact or space-constrained interfaces (toolbars, tables, cards)</li>
@@ -1,4 +1,4 @@
1
- import{g as D,E as h,x as T}from"./iframe-DpPeZoRd.js";import{o as A}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:k,argTypes:g}=D("btu-linear-progress"),W={title:"Components/Linear Progress",component:"btu-linear-progress",tags:["autodocs"],parameters:{docs:{subtitle:"A horizontal progress bar for showing task completion",description:{component:`
1
+ import{g as D,E as h,x as T}from"./iframe-DUmd7GbF.js";import{o as A}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:k,argTypes:g}=D("btu-linear-progress"),W={title:"Components/Linear Progress",component:"btu-linear-progress",tags:["autodocs"],parameters:{docs:{subtitle:"A horizontal progress bar for showing task completion",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>To show progress of a specific task with known completion percentage</li>
@@ -0,0 +1,432 @@
1
+ import{g as S,E as v,x as s}from"./iframe-DUmd7GbF.js";import{o as f}from"./if-defined-DBQP12ek.js";import{o as w}from"./style-map-D_jXmlQ4.js";import{L as k}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:x,args:L,argTypes:o}=S("btu-message"),T=["primary","info","warning","error","success"],C=[{variant:"primary",label:"Scheduled maintenance on Saturday",description:"Expect up to 30 minutes of downtime starting at 02:00 UTC."},{variant:"info",label:"New feature released",description:"The redesigned editor is now available for all workspaces."},{variant:"warning",label:"API rate limits were updated",description:"Review your usage dashboard to make sure your integrations are still within limits."},{variant:"success",label:"Billing anomaly resolved",description:"All affected invoices have been corrected — no action needed."}],$=(e,t)=>{e.setAttribute("variant",t.variant),e.setAttribute("label",t.label);const n=e.querySelector(".btu-message-description");n&&(n.textContent=t.description??"")},D={title:"Components/Message",component:"btu-message",tags:["autodocs"],parameters:{docs:{subtitle:"High-visibility messages and persistent status anchored to a page or container",description:{component:`
2
+ <h3>When to use:</h3>
3
+ <ul>
4
+ <li>Communicate messages or provide feedback that is not tied to the user's current action or task</li>
5
+ <li>Announce breaking news, site-wide alerts, or system status</li>
6
+ <li>Show persistent informational, warning, error, or success states</li>
7
+ </ul>
8
+
9
+ <h3>Structure:</h3>
10
+ <p>Every message has a leading icon and a required label. Slot a <code>&lt;span slot="description"&gt;</code> for supporting text beneath the label, or a <code>&lt;btu-badge slot="badge"&gt;</code> for a leading status tag. Enable <code>dismissible</code> for a close button. Slot CTA buttons or <code>&lt;btu-pagination&gt;</code> into the <code>actions</code> slot — in wide containers they stay pinned on the right; in narrow containers with a description they wrap below.</p>
11
+
12
+ <h3>Full width:</h3>
13
+ <p>On its own a message is a contained, rounded, bordered card. To pin it full-width to the top of a page (e.g., above the CMS content area), wrap it in a <code>&lt;btu-banner&gt;</code> — that strips the rounding and spans it edge-to-edge. See the <a href="?path=/docs/components-banner--docs">Banner</a> component.</p>
14
+
15
+ <h3>Accessibility:</h3>
16
+ <ul>
17
+ <li><code>role</code>/<code>aria-live</code>: <code>alert</code>/<code>assertive</code> for <code>error</code> and <code>primary</code>; <code>status</code>/<code>polite</code> for others. <code>aria-atomic="true"</code> is always set</li>
18
+ <li>The leading icon is decorative (<code>aria-hidden</code>); the dismiss button carries an explicit <code>aria-label</code></li>
19
+ </ul>
20
+ `}},actions:{handles:x},controls:{expanded:!0}},args:{...L,variant:"primary",label:"Lorem ipsum dolor sit amet consectetur adipisicing elit.",symbol:"",dismissible:!1,"badge-slot":"","description-slot":""},argTypes:{...o,"--message-color-background":{table:{disable:!0}},"--message-color-foreground":{table:{disable:!0}},"--message-color-border":{table:{disable:!0}},"--message-padding":{table:{disable:!0}},"--message-border-radius":{table:{disable:!0}},"actions-slot":{table:{disable:!0}},variant:{...o.variant,control:{type:"select"},options:T},label:{...o.label,control:{type:"text"}},symbol:{...o.symbol,control:{type:"text"},description:'<a href="https://lucide.dev/icons/" target="_blank">Lucide</a> icon name. Only icons available in Lucide v'+k+' are supported. When empty, the message picks a sensible default based on the variant (e.g., "triangle-alert" for warning).'},dismissible:{...o.dismissible,control:{type:"boolean"}},customBackground:{name:"--message-color-background",control:{type:"color"},description:"Override the background color.",table:{category:"CSS Properties"}},customForeground:{name:"--message-color-foreground",control:{type:"color"},description:"Override the text and icon color.",table:{category:"CSS Properties"}},customBorderColor:{name:"--message-color-border",control:{type:"color"},description:"Override the border color (defaults to the variant's 300 shade).",table:{category:"CSS Properties"}},customPadding:{name:"--message-padding",control:{type:"text"},description:"Override the internal padding (default: 1rem).",table:{category:"CSS Properties"}},customBorderRadius:{name:"--message-border-radius",control:{type:"text"},description:"Override the corner rounding (default: 8px).",table:{category:"CSS Properties"}}},render:e=>{const t={};return e.customBackground&&(t["--message-color-background"]=e.customBackground),e.customForeground&&(t["--message-color-foreground"]=e.customForeground),e.customBorderColor&&(t["--message-color-border"]=e.customBorderColor),e.customPadding&&(t["--message-padding"]=e.customPadding),e.customBorderRadius&&(t["--message-border-radius"]=e.customBorderRadius),s`
21
+ <btu-message
22
+ variant="${e.variant}"
23
+ label=${f(e.label||void 0)}
24
+ symbol=${f(e.symbol||void 0)}
25
+ ?dismissible="${e.dismissible}"
26
+ style=${w(t)}
27
+ >
28
+ ${e["badge-slot"]?s`<btu-badge slot="badge" variant="${e.variant}" size="sm">${e["badge-slot"]}</btu-badge>`:v}
29
+ ${e["description-slot"]?s`<span slot="description">${e["description-slot"]}</span>`:v}
30
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
31
+ Learn more
32
+ </button>
33
+ </btu-message>
34
+ `}},i={parameters:{docs:{description:{story:"The interactive playground. A sample `actions` button is always rendered for illustration (the `actions` slot takes elements, so it has no text control); use the other controls to explore variant, label, icon, badge, description, and dismissibility."}}}},l={render:()=>s`
35
+ <div class="flex flex-col gap-3">
36
+ <btu-message variant="primary" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
37
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
38
+ Learn more
39
+ </button>
40
+ </btu-message>
41
+ <btu-message variant="info" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
42
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
43
+ Learn more
44
+ </button>
45
+ </btu-message>
46
+ <btu-message variant="warning" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
47
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
48
+ Learn more
49
+ </button>
50
+ </btu-message>
51
+ <btu-message variant="error" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
52
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
53
+ Learn more
54
+ </button>
55
+ </btu-message>
56
+ <btu-message variant="success" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
57
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
58
+ Learn more
59
+ </button>
60
+ </btu-message>
61
+ </div>
62
+ `,parameters:{controls:{disable:!0},docs:{description:{story:"All five variants stacked. `primary` uses the primary color for emphasis. The remaining variants use tinted backgrounds that match their semantic color."}}}},u={render:()=>s`
63
+ <btu-message
64
+ variant="info"
65
+ label="Lorem ipsum dolor sit amet consectetur adipisicing elit."
66
+ dismissible
67
+ @btu-message-dismiss=${t=>{const a=t.currentTarget.parentElement?.querySelector("[data-replay]");a&&(a.hidden=!1)}}
68
+ ></btu-message>
69
+ `,decorators:[e=>{const t=n=>{const a=n.currentTarget,r=a.parentElement?.querySelector("btu-message");r&&(r.hidden=!1),a.hidden=!0};return s`
70
+ <div class="flex flex-col gap-3">
71
+ ${e()}
72
+ <button
73
+ type="button"
74
+ data-replay
75
+ hidden
76
+ class="btu-button btu-button-fill-none btu-button-gray btu-button-sm self-start"
77
+ @click=${t}
78
+ >
79
+ <btu-icon symbol="rotate-ccw" size="sm"></btu-icon>
80
+ Replay demo
81
+ </button>
82
+ </div>
83
+ `}],parameters:{controls:{disable:!0},docs:{description:{story:"Setting `dismissible` adds a close button that emits `btu-message-dismiss` and hides the message (sets `hidden`). The event is cancelable — call `event.preventDefault()` in your listener to override the auto-hide and manage visibility yourself (e.g., to animate out or persist the dismissed state). Click **Replay demo** to restore the message."},source:{code:`<btu-message
84
+ variant="info"
85
+ label="Lorem ipsum dolor sit amet consectetur adipisicing elit."
86
+ dismissible
87
+ ></btu-message>`}}}},c={render:()=>{const e=[...C],t=a=>{const r=a,h=a.currentTarget.closest("btu-message"),y=e[r.detail.page-1];h&&y&&$(h,y)},n=e[0];return s`
88
+ <btu-message variant="${n.variant}" label="${n.label}">
89
+ <span slot="description">${n.description??""}</span>
90
+ <btu-pagination
91
+ slot="actions"
92
+ total-items="${e.length}"
93
+ page-size="1"
94
+ page-size-options="1"
95
+ hide-total-count
96
+ .pageSizeChanger=${!1}
97
+ .boundaryButtons=${!1}
98
+ @btu-pagination-change=${t}
99
+ ></btu-pagination>
100
+ </btu-message>
101
+ `},parameters:{controls:{disable:!0},docs:{description:{story:"The message has no built-in pagination — slot a `<btu-pagination>` into the `actions` slot and react to its `btu-pagination-change` event to swap message content. This demo cycles through 4 messages."}}}},d={render:()=>s`
102
+ <div class="flex flex-col gap-3">
103
+ <btu-message variant="primary" label="Scheduled maintenance">
104
+ <btu-badge slot="badge" variant="primary" size="sm" dot>Live</btu-badge>
105
+ <span slot="description">A status dot keeps the badge concise for ongoing states.</span>
106
+ </btu-message>
107
+ <btu-message variant="success" label="Deploy succeeded">
108
+ <btu-badge slot="badge" variant="success" size="sm">
109
+ <btu-icon symbol="check" size="xs"></btu-icon>
110
+ v3.1.0
111
+ </btu-badge>
112
+ <span slot="description">Slot a Lucide icon inside the badge for richer composition.</span>
113
+ </btu-message>
114
+ <btu-message variant="warning" label="Beta feature">
115
+ <btu-badge slot="badge" variant="primary" size="sm">Beta</btu-badge>
116
+ <span slot="description"
117
+ >The badge variant is independent — pair a primary "Beta" tag with a warning message.</span
118
+ >
119
+ </btu-message>
120
+ </div>
121
+ `,parameters:{controls:{disable:!0},docs:{description:{story:"The `badge` slot accepts a full `<btu-badge>`, so consumers control its `variant`, `size`, `dot` affordance, and inner content (e.g., an icon). The badge variant does not have to match the message variant — choose what reads best for the content."}}}},b={render:()=>s`
122
+ <btu-message variant="warning" label="API rate limits were updated">
123
+ <span slot="description">
124
+ Review your <a href="#" class="underline">usage dashboard</a> to make sure your integrations stay within the new
125
+ limits. <strong>Existing keys keep working through May&nbsp;31</strong>; after that, requests above the cap will
126
+ return <code>429 Too Many Requests</code>.
127
+ </span>
128
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
129
+ Open dashboard
130
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
131
+ </button>
132
+ </btu-message>
133
+ `,parameters:{controls:{disable:!0},docs:{description:{story:"Because `description` is a slot rather than an attribute, you can include rich inline content — links, `<strong>`, `<code>`, or any other markup — directly in the description text."}}}},m={args:{variant:"info",symbol:"megaphone",label:"Maintenance window scheduled for Saturday."},parameters:{docs:{description:{story:"Override the default icon per variant by passing any [Lucide](https://lucide.dev/icons/) icon name via the `symbol` attribute."}}}},p={render:()=>s`
134
+ <div class="flex flex-col gap-3">
135
+ <btu-message variant="primary" label="Scheduled maintenance on Saturday.">
136
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
137
+ Learn more
138
+ </button>
139
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
140
+ View changes
141
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
142
+ </button>
143
+ </btu-message>
144
+ <btu-message variant="warning" label="API rate limits were updated">
145
+ <span slot="description"
146
+ >Review your usage dashboard to make sure your integrations are still within limits.</span
147
+ >
148
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
149
+ Open dashboard
150
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
151
+ </button>
152
+ </btu-message>
153
+ </div>
154
+ `,parameters:{controls:{disable:!0},docs:{description:{story:"Slot CTA buttons into the `actions` slot — they pin to the trailing edge and wrap below the text in narrow containers. For cycling paginated content, see the Paginated story."}}}},g={render:()=>s`
155
+ <btu-message
156
+ variant="info"
157
+ label="Custom styled message"
158
+ style=${w({"--message-color-background":"oklch(0.25 0.05 260)","--message-color-foreground":"oklch(0.95 0.02 260)","--message-border-radius":"0.75rem","--message-padding":"1.25rem 1.75rem"})}
159
+ >
160
+ <span slot="description">Override theme colors and shape with CSS custom properties.</span>
161
+ </btu-message>
162
+ `,parameters:{controls:{disable:!0},docs:{description:{story:"CSS custom properties allow full visual customization. Use the controls panel in the Default story to experiment with `--message-*` properties interactively."}}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
163
+ parameters: {
164
+ docs: {
165
+ description: {
166
+ story: 'The interactive playground. A sample \`actions\` button is always rendered for illustration (the \`actions\` slot takes elements, so it has no text control); use the other controls to explore variant, label, icon, badge, description, and dismissibility.'
167
+ }
168
+ }
169
+ }
170
+ }`,...i.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
171
+ render: () => html\`
172
+ <div class="flex flex-col gap-3">
173
+ <btu-message variant="primary" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
174
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
175
+ Learn more
176
+ </button>
177
+ </btu-message>
178
+ <btu-message variant="info" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
179
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
180
+ Learn more
181
+ </button>
182
+ </btu-message>
183
+ <btu-message variant="warning" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
184
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
185
+ Learn more
186
+ </button>
187
+ </btu-message>
188
+ <btu-message variant="error" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
189
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
190
+ Learn more
191
+ </button>
192
+ </btu-message>
193
+ <btu-message variant="success" label="Lorem ipsum dolor sit amet consectetur adipisicing elit.">
194
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
195
+ Learn more
196
+ </button>
197
+ </btu-message>
198
+ </div>
199
+ \`,
200
+ parameters: {
201
+ controls: {
202
+ disable: true
203
+ },
204
+ docs: {
205
+ description: {
206
+ story: 'All five variants stacked. \`primary\` uses the primary color for emphasis. The remaining variants use tinted backgrounds that match their semantic color.'
207
+ }
208
+ }
209
+ }
210
+ }`,...l.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
211
+ render: () => {
212
+ const onDismiss = (e: Event) => {
213
+ const message = e.currentTarget as HTMLElement;
214
+ const replay = message.parentElement?.querySelector<HTMLElement>('[data-replay]');
215
+ if (replay) replay.hidden = false;
216
+ };
217
+ return html\`
218
+ <btu-message
219
+ variant="info"
220
+ label="Lorem ipsum dolor sit amet consectetur adipisicing elit."
221
+ dismissible
222
+ @btu-message-dismiss=\${onDismiss}
223
+ ></btu-message>
224
+ \`;
225
+ },
226
+ decorators: [story => {
227
+ const onReplay = (e: Event) => {
228
+ const btn = e.currentTarget as HTMLElement;
229
+ const message = btn.parentElement?.querySelector<HTMLElement>('btu-message');
230
+ if (message) message.hidden = false;
231
+ btn.hidden = true;
232
+ };
233
+ return html\`
234
+ <div class="flex flex-col gap-3">
235
+ \${story()}
236
+ <button
237
+ type="button"
238
+ data-replay
239
+ hidden
240
+ class="btu-button btu-button-fill-none btu-button-gray btu-button-sm self-start"
241
+ @click=\${onReplay}
242
+ >
243
+ <btu-icon symbol="rotate-ccw" size="sm"></btu-icon>
244
+ Replay demo
245
+ </button>
246
+ </div>
247
+ \`;
248
+ }],
249
+ parameters: {
250
+ controls: {
251
+ disable: true
252
+ },
253
+ docs: {
254
+ description: {
255
+ story: 'Setting \`dismissible\` adds a close button that emits \`btu-message-dismiss\` and hides the message (sets \`hidden\`). The event is cancelable — call \`event.preventDefault()\` in your listener to override the auto-hide and manage visibility yourself (e.g., to animate out or persist the dismissed state). Click **Replay demo** to restore the message.'
256
+ },
257
+ source: {
258
+ code: \`<btu-message
259
+ variant="info"
260
+ label="Lorem ipsum dolor sit amet consectetur adipisicing elit."
261
+ dismissible
262
+ ></btu-message>\`
263
+ }
264
+ }
265
+ }
266
+ }`,...u.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
267
+ render: () => {
268
+ const messages: MessageData[] = [...DEMO_MESSAGES];
269
+ const onPageChange = (e: Event) => {
270
+ const ce = e as CustomEvent<{
271
+ page: number;
272
+ pageSize: number;
273
+ }>;
274
+ const message = (e.currentTarget as HTMLElement).closest<HTMLElement>('btu-message');
275
+ const msg = messages[ce.detail.page - 1];
276
+ if (message && msg) applyMessage(message, msg);
277
+ };
278
+ const first = messages[0];
279
+ return html\`
280
+ <btu-message variant="\${first.variant}" label="\${first.label}">
281
+ <span slot="description">\${first.description ?? ''}</span>
282
+ <btu-pagination
283
+ slot="actions"
284
+ total-items="\${messages.length}"
285
+ page-size="1"
286
+ page-size-options="1"
287
+ hide-total-count
288
+ .pageSizeChanger=\${false}
289
+ .boundaryButtons=\${false}
290
+ @btu-pagination-change=\${onPageChange}
291
+ ></btu-pagination>
292
+ </btu-message>
293
+ \`;
294
+ },
295
+ parameters: {
296
+ controls: {
297
+ disable: true
298
+ },
299
+ docs: {
300
+ description: {
301
+ story: 'The message has no built-in pagination — slot a \`<btu-pagination>\` into the \`actions\` slot and react to its \`btu-pagination-change\` event to swap message content. This demo cycles through 4 messages.'
302
+ }
303
+ }
304
+ }
305
+ }`,...c.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
306
+ render: () => html\`
307
+ <div class="flex flex-col gap-3">
308
+ <btu-message variant="primary" label="Scheduled maintenance">
309
+ <btu-badge slot="badge" variant="primary" size="sm" dot>Live</btu-badge>
310
+ <span slot="description">A status dot keeps the badge concise for ongoing states.</span>
311
+ </btu-message>
312
+ <btu-message variant="success" label="Deploy succeeded">
313
+ <btu-badge slot="badge" variant="success" size="sm">
314
+ <btu-icon symbol="check" size="xs"></btu-icon>
315
+ v3.1.0
316
+ </btu-badge>
317
+ <span slot="description">Slot a Lucide icon inside the badge for richer composition.</span>
318
+ </btu-message>
319
+ <btu-message variant="warning" label="Beta feature">
320
+ <btu-badge slot="badge" variant="primary" size="sm">Beta</btu-badge>
321
+ <span slot="description"
322
+ >The badge variant is independent — pair a primary "Beta" tag with a warning message.</span
323
+ >
324
+ </btu-message>
325
+ </div>
326
+ \`,
327
+ parameters: {
328
+ controls: {
329
+ disable: true
330
+ },
331
+ docs: {
332
+ description: {
333
+ story: 'The \`badge\` slot accepts a full \`<btu-badge>\`, so consumers control its \`variant\`, \`size\`, \`dot\` affordance, and inner content (e.g., an icon). The badge variant does not have to match the message variant — choose what reads best for the content.'
334
+ }
335
+ }
336
+ }
337
+ }`,...d.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
338
+ render: () => html\`
339
+ <btu-message variant="warning" label="API rate limits were updated">
340
+ <span slot="description">
341
+ Review your <a href="#" class="underline">usage dashboard</a> to make sure your integrations stay within the new
342
+ limits. <strong>Existing keys keep working through May&nbsp;31</strong>; after that, requests above the cap will
343
+ return <code>429 Too Many Requests</code>.
344
+ </span>
345
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
346
+ Open dashboard
347
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
348
+ </button>
349
+ </btu-message>
350
+ \`,
351
+ parameters: {
352
+ controls: {
353
+ disable: true
354
+ },
355
+ docs: {
356
+ description: {
357
+ story: 'Because \`description\` is a slot rather than an attribute, you can include rich inline content — links, \`<strong>\`, \`<code>\`, or any other markup — directly in the description text.'
358
+ }
359
+ }
360
+ }
361
+ }`,...b.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
362
+ args: {
363
+ variant: 'info',
364
+ symbol: 'megaphone',
365
+ label: 'Maintenance window scheduled for Saturday.'
366
+ },
367
+ parameters: {
368
+ docs: {
369
+ description: {
370
+ story: 'Override the default icon per variant by passing any [Lucide](https://lucide.dev/icons/) icon name via the \`symbol\` attribute.'
371
+ }
372
+ }
373
+ }
374
+ }`,...m.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
375
+ render: () => html\`
376
+ <div class="flex flex-col gap-3">
377
+ <btu-message variant="primary" label="Scheduled maintenance on Saturday.">
378
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
379
+ Learn more
380
+ </button>
381
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
382
+ View changes
383
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
384
+ </button>
385
+ </btu-message>
386
+ <btu-message variant="warning" label="API rate limits were updated">
387
+ <span slot="description"
388
+ >Review your usage dashboard to make sure your integrations are still within limits.</span
389
+ >
390
+ <button slot="actions" type="button" class="btu-button btu-button-fill-none btu-button-gray btu-button-sm">
391
+ Open dashboard
392
+ <btu-icon symbol="arrow-right" size="sm"></btu-icon>
393
+ </button>
394
+ </btu-message>
395
+ </div>
396
+ \`,
397
+ parameters: {
398
+ controls: {
399
+ disable: true
400
+ },
401
+ docs: {
402
+ description: {
403
+ story: 'Slot CTA buttons into the \`actions\` slot — they pin to the trailing edge and wrap below the text in narrow containers. For cycling paginated content, see the Paginated story.'
404
+ }
405
+ }
406
+ }
407
+ }`,...p.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
408
+ render: () => html\`
409
+ <btu-message
410
+ variant="info"
411
+ label="Custom styled message"
412
+ style=\${styleMap({
413
+ '--message-color-background': 'oklch(0.25 0.05 260)',
414
+ '--message-color-foreground': 'oklch(0.95 0.02 260)',
415
+ '--message-border-radius': '0.75rem',
416
+ '--message-padding': '1.25rem 1.75rem'
417
+ })}
418
+ >
419
+ <span slot="description">Override theme colors and shape with CSS custom properties.</span>
420
+ </btu-message>
421
+ \`,
422
+ parameters: {
423
+ controls: {
424
+ disable: true
425
+ },
426
+ docs: {
427
+ description: {
428
+ story: 'CSS custom properties allow full visual customization. Use the controls panel in the Default story to experiment with \`--message-*\` properties interactively.'
429
+ }
430
+ }
431
+ }
432
+ }`,...g.parameters?.docs?.source}}};const O=["Default","Variants","Dismissible","Paginated","BadgeSlot","DescriptionSlot","CustomIcon","WithActions","CustomStyling"];export{d as BadgeSlot,m as CustomIcon,g as CustomStyling,i as Default,b as DescriptionSlot,u as Dismissible,c as Paginated,l as Variants,p as WithActions,O as __namedExportsOrder,D as default};
@@ -1,4 +1,4 @@
1
- import{x as h,i as v}from"./iframe-DpPeZoRd.js";import{o as k}from"./onFind-D8gPkhwL.js";import"./preload-helper-PPVm8Dsz.js";const x=e=>{class n extends e{#t=[];onFindRegistration(){return null}#e(){if(this.#t.length)return;const i=this.onFindRegistration();if(!i)return;const d=Array.isArray(i)?i:[i];this.#t=d.map(c=>k(this,c.selectors,c.callback))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.#e()}firstUpdated(i){super.firstUpdated(i),this.#e()}disconnectedCallback(){super.disconnectedCallback(),this.#t.forEach(i=>i()),this.#t=[]}}return n},{expect:a,userEvent:l,waitFor:r,within:w}=__STORYBOOK_MODULE_TEST__,b="ofm-demo";if(!customElements.get(b)){class e extends x(v){onFindRegistration(){return{selectors:":scope > .ofm-item",callback:t=>t.classList.add("ring-2","ring-success-500")}}render(){return h`<slot></slot>`}}customElements.define(b,e)}const p="ofm-multi";if(!customElements.get(p)){class e extends x(v){onFindRegistration(){return[{selectors:":scope > .ofm-a",callback:t=>t.classList.add("ring-2","ring-success-500")},{selectors:":scope > .ofm-b",callback:t=>t.classList.add("ring-2","ring-primary-500")}]}render(){return h`<slot></slot>`}}customElements.define(p,e)}function g(){return globalThis[Symbol.for("brightspot.onFind")]?.callbacks?.length??0}const M={title:"Mixins/OnFind Mixin",tags:["autodocs"],parameters:{docs:{description:{component:`
1
+ import{x as h,i as v}from"./iframe-DUmd7GbF.js";import{o as k}from"./onFind-t_5Bmfio.js";import"./preload-helper-PPVm8Dsz.js";const x=e=>{class n extends e{#t=[];onFindRegistration(){return null}#e(){if(this.#t.length)return;const i=this.onFindRegistration();if(!i)return;const d=Array.isArray(i)?i:[i];this.#t=d.map(c=>k(this,c.selectors,c.callback))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.#e()}firstUpdated(i){super.firstUpdated(i),this.#e()}disconnectedCallback(){super.disconnectedCallback(),this.#t.forEach(i=>i()),this.#t=[]}}return n},{expect:a,userEvent:l,waitFor:r,within:w}=__STORYBOOK_MODULE_TEST__,b="ofm-demo";if(!customElements.get(b)){class e extends x(v){onFindRegistration(){return{selectors:":scope > .ofm-item",callback:t=>t.classList.add("ring-2","ring-success-500")}}render(){return h`<slot></slot>`}}customElements.define(b,e)}const p="ofm-multi";if(!customElements.get(p)){class e extends x(v){onFindRegistration(){return[{selectors:":scope > .ofm-a",callback:t=>t.classList.add("ring-2","ring-success-500")},{selectors:":scope > .ofm-b",callback:t=>t.classList.add("ring-2","ring-primary-500")}]}render(){return h`<slot></slot>`}}customElements.define(p,e)}function g(){return globalThis[Symbol.for("brightspot.onFind")]?.callbacks?.length??0}const M={title:"Mixins/OnFind Mixin",tags:["autodocs"],parameters:{docs:{description:{component:`
2
2
  \`OnFindMixin\` registers an \`onFind\` child-redistribution callback and
3
3
  **tears it down on disconnect**, so a detached component is garbage-collectable
4
4
  and stops being visited on every document mutation.
@@ -1,4 +1,4 @@
1
- import{g as m,x as u}from"./iframe-DpPeZoRd.js";import{o as g}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),c=e=>{const t={};return e.customBackgroundColor&&(t["--pagination-color-background"]=e.customBackgroundColor),e.customForegroundColor&&(t["--pagination-color-foreground"]=e.customForegroundColor),t},$={title:"Components/Pagination",component:"btu-pagination",tags:["autodocs"],parameters:{docs:{subtitle:"A component for navigating through paged content",description:{component:`
1
+ import{g as m,x as u}from"./iframe-DUmd7GbF.js";import{o as g}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),c=e=>{const t={};return e.customBackgroundColor&&(t["--pagination-color-background"]=e.customBackgroundColor),e.customForegroundColor&&(t["--pagination-color-foreground"]=e.customForegroundColor),t},$={title:"Components/Pagination",component:"btu-pagination",tags:["autodocs"],parameters:{docs:{subtitle:"A component for navigating through paged content",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>To navigate through large sets of data</li>
@@ -1,4 +1,4 @@
1
- import{g as p,x as l}from"./iframe-DpPeZoRd.js";import{o as a}from"./if-defined-aps73Iby.js";import{o as c}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:d,args:u,argTypes:t}=p("btu-popover"),h={title:"Components/Popover",component:"btu-popover",tags:["autodocs"],parameters:{docs:{subtitle:"Rich interactive content anchored to a trigger element",description:{component:`
1
+ import{g as p,x as l}from"./iframe-DUmd7GbF.js";import{o as a}from"./if-defined-DBQP12ek.js";import{o as c}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:d,args:u,argTypes:t}=p("btu-popover"),h={title:"Components/Popover",component:"btu-popover",tags:["autodocs"],parameters:{docs:{subtitle:"Rich interactive content anchored to a trigger element",description:{component:`
2
2
  \`btu-popover\` displays rich interactive content anchored to a trigger element using CSS anchor positioning and the native Popover API.
3
3
 
4
4
  <h3>When to use:</h3>
@@ -1 +1 @@
1
- import"./iframe-DpPeZoRd.js";const l=t=>{class n extends t{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-element-connected",{}),e=>this.emit("btu-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-element-disconnected")}emit(e,c){const a=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c});return this.dispatchEvent(a)}}return n},d=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{l as E,d as R};
1
+ import"./iframe-DUmd7GbF.js";const l=t=>{class n extends t{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-element-connected",{}),e=>this.emit("btu-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-element-disconnected")}emit(e,c){const a=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c});return this.dispatchEvent(a)}}return n},d=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{l as E,d as R};
@@ -1,4 +1,4 @@
1
- import{x as l,i as v}from"./iframe-DpPeZoRd.js";import{t as m}from"./custom-element-UsVr97OX.js";import"./preload-helper-PPVm8Dsz.js";const h=n=>{class i extends n{constructor(){super(...arguments),this._rovingIndex=0}_getRovingTargets(){return[]}_rovingFocus(t,e=!0){const o=this._getRovingTargets();if(o.length===0)return;const r=Math.max(0,Math.min(t,o.length-1));o.forEach((u,b)=>u.setAttribute("tabindex",b===r?"0":"-1")),e&&o[r]?.focus(),this._rovingIndex=r}_rovingNext(){const t=this._getRovingTargets();if(t.length===0)return;const e=this._rovingCurrentIndex(),o=e<t.length-1?e+1:0;this._rovingFocus(o)}_rovingPrev(){const t=this._getRovingTargets();if(t.length===0)return;const e=this._rovingCurrentIndex(),o=e>0?e-1:t.length-1;this._rovingFocus(o)}_rovingFirst(){this._rovingFocus(0)}_rovingLast(){const t=this._getRovingTargets();t.length>0&&this._rovingFocus(t.length-1)}_rovingCurrentIndex(){const t=document.activeElement;return this._getRovingTargets().findIndex(e=>e===t||e.contains(t))}}return i};var a=Object.freeze,x=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=(n,i,d,t)=>{for(var e=t>1?void 0:t?p(i,d):i,o=n.length-1,r;o>=0;o--)(r=n[o])&&(e=r(e)||e);return e},y=(n,i)=>a(x(n,"raw",{value:a(n.slice())})),c;const T={title:"Mixins/Roving Tabindex",tags:["autodocs"],parameters:{docs:{description:{component:`
1
+ import{x as l,i as v}from"./iframe-DUmd7GbF.js";import{t as m}from"./custom-element-UsVr97OX.js";import"./preload-helper-PPVm8Dsz.js";const h=n=>{class i extends n{constructor(){super(...arguments),this._rovingIndex=0}_getRovingTargets(){return[]}_rovingFocus(t,e=!0){const o=this._getRovingTargets();if(o.length===0)return;const r=Math.max(0,Math.min(t,o.length-1));o.forEach((u,b)=>u.setAttribute("tabindex",b===r?"0":"-1")),e&&o[r]?.focus(),this._rovingIndex=r}_rovingNext(){const t=this._getRovingTargets();if(t.length===0)return;const e=this._rovingCurrentIndex(),o=e<t.length-1?e+1:0;this._rovingFocus(o)}_rovingPrev(){const t=this._getRovingTargets();if(t.length===0)return;const e=this._rovingCurrentIndex(),o=e>0?e-1:t.length-1;this._rovingFocus(o)}_rovingFirst(){this._rovingFocus(0)}_rovingLast(){const t=this._getRovingTargets();t.length>0&&this._rovingFocus(t.length-1)}_rovingCurrentIndex(){const t=document.activeElement;return this._getRovingTargets().findIndex(e=>e===t||e.contains(t))}}return i};var a=Object.freeze,x=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=(n,i,d,t)=>{for(var e=t>1?void 0:t?p(i,d):i,o=n.length-1,r;o>=0;o--)(r=n[o])&&(e=r(e)||e);return e},y=(n,i)=>a(x(n,"raw",{value:a(n.slice())})),c;const T={title:"Mixins/Roving Tabindex",tags:["autodocs"],parameters:{docs:{description:{component:`
2
2
  \`RovingTabindexMixin\` provides **roving tabindex** navigation primitives for toolbar and menu components following the <a href="https://www.w3.org/WAI/ARIA/apd/practices/keyboard-interface/#kbd_roving_tabindex" target="_blank">WAI-ARIA Keyboard Interface Pattern</a>.
3
3
 
4
4
  In a roving tabindex, only one element in the group has \`tabindex="0"\` (reachable via Tab), while all others have \`tabindex="-1"\`. Arrow keys move focus between items, wrapping at both ends.
@@ -1,4 +1,4 @@
1
- import{x as o}from"./iframe-DpPeZoRd.js";import"./preload-helper-PPVm8Dsz.js";const r={title:"Utilities/RTC",tags:["autodocs"],parameters:{docs:{subtitle:"The `rtc` module provides real-time communication between browser tabs and the Brightspot CMS server. Uses BroadcastChannel for cross-tab coordination with leader election, and Server-Sent Events for server communication."},controls:{expanded:!0}}},e={render:()=>o`
1
+ import{x as o}from"./iframe-DUmd7GbF.js";import"./preload-helper-PPVm8Dsz.js";const r={title:"Utilities/RTC",tags:["autodocs"],parameters:{docs:{subtitle:"The `rtc` module provides real-time communication between browser tabs and the Brightspot CMS server. Uses BroadcastChannel for cross-tab coordination with leader election, and Server-Sent Events for server communication."},controls:{expanded:!0}}},e={render:()=>o`
2
2
  <div class="space-y-6 text-sm">
3
3
  <div>
4
4
  <h3 class="mb-2 font-bold">Overview</h3>
@@ -1,4 +1,4 @@
1
- import{x as a}from"./iframe-DpPeZoRd.js";import"./preload-helper-PPVm8Dsz.js";const l=({theme:e="btu-scrollshadow-25"})=>{const r=new Array(100).fill(0).map((s,t)=>`Item ${t+1}`);return a`
1
+ import{x as a}from"./iframe-DUmd7GbF.js";import"./preload-helper-PPVm8Dsz.js";const l=({theme:e="btu-scrollshadow-25"})=>{const r=new Array(100).fill(0).map((s,t)=>`Item ${t+1}`);return a`
2
2
  <style>
3
3
  :root {
4
4
  --can-scroll: ;
@@ -1,4 +1,4 @@
1
- import{g as k,x as c}from"./iframe-DpPeZoRd.js";import{o as s}from"./if-defined-aps73Iby.js";import{o as f}from"./style-map-WEdc6AkA.js";import{L as w}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:v,args:y,argTypes:g}=k("btu-switch"),x={customColorOn:"--switch-color-track-on",customColorOff:"--switch-color-track-off",customKnobColor:"--switch-color-knob",customLabelSpacing:"--switch-label-spacing",customIconSize:"--switch-track-icon-size"},S=e=>Object.entries(x).reduce((o,[t,n])=>(e[t]&&(o[n]=e[t]),o),{}),L={title:"Components/Switch",component:"btu-switch",tags:["autodocs"],parameters:{docs:{subtitle:"A toggle switch for binary on/off states",description:{component:`
1
+ import{g as k,x as c}from"./iframe-DUmd7GbF.js";import{o as s}from"./if-defined-DBQP12ek.js";import{o as f}from"./style-map-D_jXmlQ4.js";import{L as w}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:v,args:y,argTypes:g}=k("btu-switch"),x={customColorOn:"--switch-color-track-on",customColorOff:"--switch-color-track-off",customKnobColor:"--switch-color-knob",customLabelSpacing:"--switch-label-spacing",customIconSize:"--switch-track-icon-size"},S=e=>Object.entries(x).reduce((o,[t,n])=>(e[t]&&(o[n]=e[t]),o),{}),L={title:"Components/Switch",component:"btu-switch",tags:["autodocs"],parameters:{docs:{subtitle:"A toggle switch for binary on/off states",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>For toggling a setting or preference on/off</li>
@@ -1,4 +1,4 @@
1
- import{g as u,x as e}from"./iframe-DpPeZoRd.js";import{o as d}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:c,args:m,argTypes:t}=u("btu-tab"),y={title:"Components/Tabs/Tab",component:"btu-tab",tags:["autodocs"],parameters:{docs:{subtitle:"btu-tab",description:{component:`
1
+ import{g as u,x as e}from"./iframe-DUmd7GbF.js";import{o as d}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:c,args:m,argTypes:t}=u("btu-tab"),y={title:"Components/Tabs/Tab",component:"btu-tab",tags:["autodocs"],parameters:{docs:{subtitle:"btu-tab",description:{component:`
2
2
  An individual tab within a \`btu-tabs\` group.
3
3
 
4
4
  Renders a button with \`role="tab"\` that participates in keyboard navigation and selection state managed by the parent \`btu-tabs\` container.
@@ -1,4 +1,4 @@
1
- import{g as b,E as i,x as s}from"./iframe-DpPeZoRd.js";import{o as c}from"./style-map-WEdc6AkA.js";import"./preload-helper-PPVm8Dsz.js";const{events:d,args:u,argTypes:a}=b("btu-tabs"),h={title:"Components/Tabs",component:"btu-tabs",tags:["autodocs"],parameters:{docs:{subtitle:"btu-tabs",description:{component:`
1
+ import{g as b,E as i,x as s}from"./iframe-DUmd7GbF.js";import{o as c}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:d,args:u,argTypes:a}=b("btu-tabs"),h={title:"Components/Tabs",component:"btu-tabs",tags:["autodocs"],parameters:{docs:{subtitle:"btu-tabs",description:{component:`
2
2
  A tab group component that manages selection state across a set of \`btu-tab\` children.
3
3
 
4
4
  <h3>When to use:</h3>