@brightspot/ui 1.6.0 → 1.8.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 (97) hide show
  1. package/dist/components/dropdown/Dropdown.d.ts +172 -0
  2. package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
  3. package/dist/components/dropdown/Dropdown.js +407 -0
  4. package/dist/components/dropdown/Dropdown.js.map +1 -0
  5. package/dist/components/dropdown/DropdownItem.d.ts +108 -0
  6. package/dist/components/dropdown/DropdownItem.d.ts.map +1 -0
  7. package/dist/components/dropdown/DropdownItem.js +210 -0
  8. package/dist/components/dropdown/DropdownItem.js.map +1 -0
  9. package/dist/components/dropdown/DropdownMenu.d.ts +117 -0
  10. package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -0
  11. package/dist/components/dropdown/DropdownMenu.js +295 -0
  12. package/dist/components/dropdown/DropdownMenu.js.map +1 -0
  13. package/dist/components/icon-button/IconButton.d.ts +85 -0
  14. package/dist/components/icon-button/IconButton.d.ts.map +1 -0
  15. package/dist/components/icon-button/IconButton.js +171 -0
  16. package/dist/components/icon-button/IconButton.js.map +1 -0
  17. package/dist/components/pagination/Pagination.d.ts +0 -1
  18. package/dist/components/pagination/Pagination.d.ts.map +1 -1
  19. package/dist/components/pagination/Pagination.js +22 -22
  20. package/dist/components/pagination/Pagination.js.map +1 -1
  21. package/dist/custom-elements.json +1212 -1
  22. package/dist/storybook/assets/Avatar.stories-XfJUoW42.js +213 -0
  23. package/dist/storybook/assets/{AvatarGroup.stories-BBkQuFKk.js → AvatarGroup.stories-CPkv0mVI.js} +1 -1
  24. package/dist/storybook/assets/{Badge.stories-mFZsls7i.js → Badge.stories-Z42hQyzK.js} +3 -3
  25. package/dist/storybook/assets/{Button.stories-CAWX17L1.js → Button.stories-DTcnCrp-.js} +1 -1
  26. package/dist/storybook/assets/{CircularProgress.stories-DBVt4Cg2.js → CircularProgress.stories-B59nHh_k.js} +6 -6
  27. package/dist/storybook/assets/{ClipboardMixin.stories-BH9E-OI6.js → ClipboardMixin.stories-C6DraZ93.js} +1 -1
  28. package/dist/storybook/assets/{Color-6BZIO3FS-CVnTzq2p.js → Color-6BZIO3FS-BuNGIaf5.js} +1 -1
  29. package/dist/storybook/assets/{Colors.stories-BFYmP0LL.js → Colors.stories-B3Capc8F.js} +1 -1
  30. package/dist/storybook/assets/{ComponentStatesMixin-Cu7YXkU8.js → ComponentStatesMixin-DRalOmcW.js} +1 -1
  31. package/dist/storybook/assets/{ComponentStatesMixin.stories-CAvyYt0H.js → ComponentStatesMixin.stories-TKD7YrVe.js} +1 -1
  32. package/dist/storybook/assets/{CopyToClipboard.stories-DbJZsp_L.js → CopyToClipboard.stories-Bv8jZ7TL.js} +1 -1
  33. package/dist/storybook/assets/{Debounce.stories-BiFiH1K9.js → Debounce.stories-CLwXI3OZ.js} +1 -1
  34. package/dist/storybook/assets/{DocsRenderer-LL677BLK-Bq6G4eeC.js → DocsRenderer-LL677BLK-DjMDalQg.js} +6 -6
  35. package/dist/storybook/assets/Dropdown.stories-D7X0Dbnt.js +697 -0
  36. package/dist/storybook/assets/{Events.stories-BsDBxh8_.js → Events.stories-Dgn1N8jT.js} +1 -1
  37. package/dist/storybook/assets/{Heading.stories-zGzWgHVO.js → Heading.stories-BcciQ3Ug.js} +1 -1
  38. package/dist/storybook/assets/{Icon.stories-B4T6sSwf.js → Icon.stories-BWqJoZUM.js} +11 -11
  39. package/dist/storybook/assets/IconButton.stories-BrMDAi9q.js +748 -0
  40. package/dist/storybook/assets/{LinearProgress.stories-qzqmUUwY.js → LinearProgress.stories-INijWBr_.js} +7 -7
  41. package/dist/storybook/assets/LucideDynamicLoader-jmdq8YDM.js +1 -0
  42. package/dist/storybook/assets/{Pagination.stories-B6Q-7taJ.js → Pagination.stories-CrExaWpC.js} +1 -1
  43. package/dist/storybook/assets/{Popover.stories-CGkU0SGv.js → Popover.stories-Bh6IUPG_.js} +5 -5
  44. package/dist/storybook/assets/{ReadyMixin-3YCzoG6W.js → ReadyMixin-C1lZU7vt.js} +1 -1
  45. package/dist/storybook/assets/{Rtc.stories-Y1MYTWAt.js → Rtc.stories-BHqFwgR7.js} +1 -1
  46. package/dist/storybook/assets/{ScrollShadow.stories-B9kSpLT1.js → ScrollShadow.stories-DnIj5cZF.js} +1 -1
  47. package/dist/storybook/assets/{Throttle.stories-BgvLDrS3.js → Throttle.stories-Dilsv90H.js} +1 -1
  48. package/dist/storybook/assets/Tooltip.stories-Dnb76OXa.js +143 -0
  49. package/dist/storybook/assets/{Widget.stories--JpqVyJe.js → Widget.stories-Cl-3dv15.js} +13 -13
  50. package/dist/storybook/assets/{WithTooltip-65CFNBJE-DNbD9hAX.js → WithTooltip-65CFNBJE-Bq21jhKM.js} +1 -1
  51. package/dist/storybook/assets/{formatter-EIJCOSYU-Cy8KIxab.js → formatter-EIJCOSYU-CwrejIu0.js} +1 -1
  52. package/dist/storybook/assets/if-defined-D1UQmdjo.js +1 -0
  53. package/dist/storybook/assets/iframe-CNxIA3cQ.css +1 -0
  54. package/dist/storybook/assets/{iframe-Dz6CxatW.js → iframe-CsKt54V3.js} +154 -154
  55. package/dist/storybook/assets/{index-CebChkmF.js → index-DQ0xe06s.js} +1 -1
  56. package/dist/storybook/assets/{onFind.stories-nHDImx0x.js → onFind.stories-CGeGoVR6.js} +1 -1
  57. package/dist/storybook/assets/{onRemove.stories-CBxYVPwd.js → onRemove.stories-DXOwfv14.js} +1 -1
  58. package/dist/storybook/assets/{onVisible.stories-D4Qewc9Y.js → onVisible.stories-DNzXceKW.js} +1 -1
  59. package/dist/storybook/assets/{style-map-BgW9piaW.js → style-map-kcS06w9f.js} +1 -1
  60. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CROW1475.js → syntaxhighlighter-ED5Y7EFY-BnpaJz4a.js} +1 -1
  61. package/dist/storybook/iframe.html +2 -2
  62. package/dist/storybook/index.json +1 -1
  63. package/dist/storybook/project.json +1 -1
  64. package/dist/tailwind-plugin-button.js +10 -0
  65. package/dist/tailwind-plugin-button.js.map +1 -1
  66. package/dist/tailwind-plugin-button.ts +10 -0
  67. package/dist/tailwind-plugin-dropdown.d.ts +2 -0
  68. package/dist/tailwind-plugin-dropdown.d.ts.map +1 -0
  69. package/dist/tailwind-plugin-dropdown.js +223 -0
  70. package/dist/tailwind-plugin-dropdown.js.map +1 -0
  71. package/dist/tailwind-plugin-dropdown.ts +249 -0
  72. package/dist/tailwind-plugin-pagination.js +9 -21
  73. package/dist/tailwind-plugin-pagination.js.map +1 -1
  74. package/dist/tailwind-plugin-pagination.ts +10 -21
  75. package/dist/util/EventEmitterMixin.d.ts +17 -0
  76. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  77. package/dist/util/EventEmitterMixin.js.map +1 -1
  78. package/docs/components/Avatar.md +62 -0
  79. package/docs/components/AvatarGroup.md +52 -0
  80. package/docs/components/Badge.md +58 -0
  81. package/docs/components/CircularProgress.md +55 -0
  82. package/docs/components/CopyToClipboard.md +54 -0
  83. package/docs/components/Dropdown.md +100 -0
  84. package/docs/components/DropdownItem.md +64 -0
  85. package/docs/components/DropdownMenu.md +81 -0
  86. package/docs/components/Icon.md +61 -0
  87. package/docs/components/IconButton.md +63 -0
  88. package/docs/components/LinearProgress.md +40 -0
  89. package/docs/components/Pagination.md +95 -0
  90. package/docs/components/Popover.md +71 -0
  91. package/docs/components/README.md +25 -0
  92. package/docs/components/Widget.md +79 -0
  93. package/package.json +3 -2
  94. package/dist/storybook/assets/Avatar.stories-CafEcy4T.js +0 -214
  95. package/dist/storybook/assets/Tooltip.stories-POo1M-ew.js +0 -143
  96. package/dist/storybook/assets/if-defined-CngSGyRu.js +0 -1
  97. package/dist/storybook/assets/iframe-DiT9Iz2T.css +0 -1
@@ -1,11 +1,11 @@
1
- import{g as I,E as h,x as T}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz.js";const{events:D,args:V,argTypes:g}=I("btu-linear-progress"),k={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-CsKt54V3.js";import{o as A}from"./style-map-kcS06w9f.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:P,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>
5
5
  <li>For file uploads, downloads, or processing steps</li>
6
6
  <li>When progress needs to be communicated numerically</li>
7
7
  </ul>
8
- `}},actions:{handles:D},controls:{expanded:!0}},args:{...V,color:"primary",thickness:8,progress:0,initialAnimation:!0},argTypes:{...g,"--progress-color":{table:{disable:!0}},"--track-color":{table:{disable:!0}},size:{table:{disable:!0}},customSize:{table:{disable:!0}},color:{...g.color,control:{type:"select"},options:["black","white","primary","teal","gray","purple","rose","error","warning","success"],description:"Theme color of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"primary"}}},thickness:{...g.thickness,control:{type:"number",min:1,max:10},description:"Height of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"8"}}},progress:{...g.progress,control:{type:"range",min:0,max:100,step:1},description:"Progress value between 0 and 100.",table:{category:"Attributes",defaultValue:{summary:"0"}}},label:{...g.label,control:{type:"text"},description:"Optional label text to display to the right of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},initialAnimation:{...g.initialAnimation,control:{type:"boolean"},description:"Whether to animate progress from 0 to target value when component first becomes visible in viewport. Defaults to true.",table:{category:"Attributes",defaultValue:{summary:"true"}}},ariaLabel:{...g.ariaLabel,control:{type:"text"},description:'Optional aria-label attribute for screen readers. Describes what the progress indicator represents (e.g., "File upload progress").',table:{category:"Attributes",defaultValue:{summary:"undefined"}}},ariaLabelledBy:{...g.ariaLabelledBy,control:{type:"text"},description:"Optional aria-labelledby attribute for screen readers. References the ID of an element that labels the progress indicator.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},ariaValueText:{...g.ariaValueText,control:{type:"text"},description:"Optional aria-valuetext attribute for screen readers. Provides human-readable text alternative for the progress value.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},completionAnnouncement:{...g.completionAnnouncement,control:{type:"text"},description:"Optional message to announce to screen readers when progress reaches 100%. If not provided, no announcement will be made on completion.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},customColor:{name:"--progress-color",control:{type:"color"},description:"Custom progress bar color - overrides the theme color",table:{category:"CSS Properties"}},customTrackColor:{name:"--track-color",control:{type:"color"},description:"Custom track/background color - overrides default gray-100",table:{category:"CSS Properties"}}},render:e=>{const t=[];e.customColor&&t.push(`--progress-color: ${e.customColor}`),e.customTrackColor&&t.push(`--track-color: ${e.customTrackColor}`);const r=t.length>0?t.join("; "):"";return T`<btu-linear-progress
8
+ `}},actions:{handles:V},controls:{expanded:!0}},args:{...P,color:"primary",thickness:8,progress:0,"initial-animation":!0},argTypes:{...g,"--progress-color":{table:{disable:!0}},"--track-color":{table:{disable:!0}},size:{table:{disable:!0}},customSize:{table:{disable:!0}},color:{...g.color,control:{type:"select"},options:["black","white","primary","teal","gray","purple","rose","error","warning","success"],description:"Theme color of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"primary"}}},thickness:{...g.thickness,control:{type:"number",min:1,max:10},description:"Height of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"8"}}},progress:{...g.progress,control:{type:"range",min:0,max:100,step:1},description:"Progress value between 0 and 100.",table:{category:"Attributes",defaultValue:{summary:"0"}}},label:{...g.label,control:{type:"text"},description:"Optional label text to display to the right of the progress bar.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},"initial-animation":{...g["initial-animation"],control:{type:"boolean"},description:"Whether to animate progress from 0 to target value when component first becomes visible in viewport. Defaults to true.",table:{category:"Attributes",defaultValue:{summary:"true"}}},ariaLabel:{...g.ariaLabel,control:{type:"text"},description:'Optional aria-label attribute for screen readers. Describes what the progress indicator represents (e.g., "File upload progress").',table:{category:"Attributes",defaultValue:{summary:"undefined"}}},ariaLabelledBy:{...g.ariaLabelledBy,control:{type:"text"},description:"Optional aria-labelledby attribute for screen readers. References the ID of an element that labels the progress indicator.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},ariaValueText:{...g.ariaValueText,control:{type:"text"},description:"Optional aria-valuetext attribute for screen readers. Provides human-readable text alternative for the progress value.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},completionAnnouncement:{...g.completionAnnouncement,control:{type:"text"},description:"Optional message to announce to screen readers when progress reaches 100%. If not provided, no announcement will be made on completion.",table:{category:"Attributes",defaultValue:{summary:"undefined"}}},customColor:{name:"--progress-color",control:{type:"color"},description:"Custom progress bar color - overrides the theme color",table:{category:"CSS Properties"}},customTrackColor:{name:"--track-color",control:{type:"color"},description:"Custom track/background color - overrides default gray-100",table:{category:"CSS Properties"}}},render:e=>{const t={};return e.customColor&&(t["--progress-color"]=e.customColor),e.customTrackColor&&(t["--track-color"]=e.customTrackColor),T`<btu-linear-progress
9
9
  color="${e.color}"
10
10
  thickness="${e.thickness}"
11
11
  progress="${e.progress}"
@@ -14,19 +14,19 @@ import{g as I,E as h,x as T}from"./iframe-Dz6CxatW.js";import"./preload-helper-P
14
14
  aria-labelledby="${e.ariaLabelledBy||h}"
15
15
  aria-valuetext="${e.ariaValueText||h}"
16
16
  completion-announcement="${e.completionAnnouncement||h}"
17
- ?initial-animation="${e.initialAnimation}"
18
- style="${r}"
17
+ ?initial-animation="${e["initial-animation"]}"
18
+ style=${A(t)}
19
19
  ></btu-linear-progress>`}},v={args:{progress:25},parameters:{docs:{description:{story:"Default horizontal progress bar with primary color. Width fills the container (100%)."}}}},f={render:()=>T`<div class="flex flex-col gap-4">
20
20
  <btu-linear-progress progress="25" color="primary"></btu-linear-progress>
21
21
  <btu-linear-progress progress="50" color="teal"></btu-linear-progress>
22
22
  <btu-linear-progress progress="75" color="warning"></btu-linear-progress>
23
23
  <btu-linear-progress progress="100" color="success"></btu-linear-progress>
24
- </div>`,parameters:{docs:{description:{story:"Progress bars at various completion levels (25%, 50%, 75%, 100%) with different colors. Each bar fills the container width."}}}},x={render:()=>{const e=document.createElement("div");e.className="flex flex-col gap-8";let t=0;const r=document.createElement("btu-linear-progress");r.progress=0,r.color="primary",r.label="0%";const o=setInterval(()=>{t=(t+1)%101,r.progress=t,r.label=`${t}%`,t===100&&setTimeout(()=>{t=0},1e3)},100);let s=0;const n=document.createElement("btu-linear-progress");n.progress=0,n.color="teal",n.label="0/5 files",n.ariaValueText="0 of 5 files uploaded";const l=setInterval(()=>{s=(s+1)%6,n.progress=s*20,n.label=`${s}/5 files`,n.ariaValueText=`${s} of 5 files uploaded`,s===5&&setTimeout(()=>{s=0},3e3)},3e3),a=new MutationObserver(i=>{i.forEach(p=>{p.removedNodes.forEach(d=>{(d===e||d.contains(e))&&(clearInterval(o),clearInterval(l),a.disconnect())})})});return setTimeout(()=>{e.parentNode&&a.observe(e.parentNode,{childList:!0})},0),e.appendChild(r),e.appendChild(n),e},parameters:{docs:{description:{story:`
24
+ </div>`,parameters:{docs:{description:{story:"Progress bars at various completion levels (25%, 50%, 75%, 100%) with different colors. Each bar fills the container width."}}}},x={render:()=>{const e=document.createElement("div");e.className="flex flex-col gap-8";let t=0;const n=document.createElement("btu-linear-progress");n.progress=0,n.color="primary",n.label="0%";const o=setInterval(()=>{t=(t+1)%101,n.progress=t,n.label=`${t}%`,t===100&&setTimeout(()=>{t=0},1e3)},100);let s=0;const r=document.createElement("btu-linear-progress");r.progress=0,r.color="teal",r.label="0/5 files",r.ariaValueText="0 of 5 files uploaded";const l=setInterval(()=>{s=(s+1)%6,r.progress=s*20,r.label=`${s}/5 files`,r.ariaValueText=`${s} of 5 files uploaded`,s===5&&setTimeout(()=>{s=0},3e3)},3e3),a=new MutationObserver(i=>{i.forEach(p=>{p.removedNodes.forEach(d=>{(d===e||d.contains(e))&&(clearInterval(o),clearInterval(l),a.disconnect())})})});return setTimeout(()=>{e.parentNode&&a.observe(e.parentNode,{childList:!0})},0),e.appendChild(n),e.appendChild(r),e},parameters:{docs:{description:{story:`
25
25
  Animated progress bars.
26
26
 
27
27
  Top: continuous percentage increments.
28
28
 
29
- Bottom: step-based progress with 20% increments every 3 seconds and \`aria-valuetext\` for accessibility (e.g., "3 of 5 files uploaded").`}}}},y={render:()=>{let e;const t=()=>{const r=document.createElement("div"),o=document.createElement("div");o.className="flex flex-col mb-4 items-center";const s=document.createElement("h3");s.className="text-lg font-semibold mb-2",s.textContent="Scroll within the container to see progress bars animate in";const n=document.createElement("button");n.textContent="Reset",n.className="px-4 py-2 bg-primary-500 text-white rounded hover:bg-primary-600",n.onclick=()=>{e.innerHTML="",e.appendChild(t())},o.appendChild(s),o.appendChild(n),r.appendChild(o);const l=document.createElement("div");l.style.height="150px",l.style.overflowY="auto",l.style.border="1px solid #e5e7eb",l.style.borderRadius="4px",l.style.padding="1rem";const a=document.createElement("div");a.className="flex flex-col gap-8",a.style.minHeight="150vh";const i=document.createElement("btu-linear-progress");i.progress=30,i.color="primary",i.label="30%",a.appendChild(i);const p=document.createElement("div");p.style.marginTop="30vh";const d=document.createElement("btu-linear-progress");d.progress=50,d.color="teal",d.label="50%",p.appendChild(d),a.appendChild(p);const b=document.createElement("div");b.style.marginTop="30vh";const m=document.createElement("btu-linear-progress");m.progress=75,m.color="purple",m.label="75%",b.appendChild(m),a.appendChild(b);const u=document.createElement("div");u.style.marginTop="30vh";const c=document.createElement("btu-linear-progress");return c.progress=100,c.color="success",c.label="100%",u.appendChild(c),a.appendChild(u),l.appendChild(a),r.appendChild(l),r};return e=t(),e},parameters:{docs:{description:{story:'Demonstrates the viewport animation - progress bars animate from 0 to their target value when they become visible. Scroll within the container to see each progress bar animate in. Click "Reset" to restart.'}}}},C={render:()=>{const e=document.createElement("div");e.className="flex flex-col items-start gap-4";let t=0;const r=document.createElement("btu-linear-progress");r.progress=0,r.color="primary",r.label="0%";const o=document.createElement("div");o.className="text-sm text-gray-600",o.textContent="Status: In Progress...";const s=document.createElement("div");s.className="text-xs text-gray-500 mt-2",s.textContent="Event Log: (waiting for completion)",r.addEventListener("btu-progress-complete",()=>{o.textContent="Status: Complete! ✓",o.className="text-sm text-green-600 font-semibold",s.textContent=`Event Log: btu-progress-complete fired at ${new Date().toLocaleTimeString()}`,s.className="text-xs text-green-600 mt-2"});let n=!1;const l=setInterval(()=>{n||(t=t+1,r.progress=t,r.label=`${t}%`,t<100&&(o.textContent="Status: In Progress...",o.className="text-sm text-gray-600"),t===100&&(n=!0,setTimeout(()=>{t=0,n=!1},3e3)))},50),a=new MutationObserver(i=>{i.forEach(p=>{p.removedNodes.forEach(d=>{(d===e||d.contains(e))&&(clearInterval(l),a.disconnect())})})});return setTimeout(()=>{e.parentNode&&a.observe(e.parentNode,{childList:!0})},0),e.appendChild(r),e.appendChild(o),e.appendChild(s),e},parameters:{docs:{description:{story:"Demonstrates the btu-progress-complete event that fires when progress reaches 100%. The event fires each time progress completes a cycle."}}}},E={render:()=>{const e=document.createElement("div");e.className="flex flex-col gap-8";const t=document.createElement("div");t.className="flex flex-col gap-2";const r=document.createElement("h4");r.className="text-sm font-semibold text-gray-900",r.textContent="Progress bar with aria-label";const o=document.createElement("p");o.className="text-xs text-gray-600 mb-2",o.textContent='Screen readers announce: "Page loading progress"';const s=document.createElement("btu-linear-progress");s.progress=40,s.color="primary",s.ariaLabel="Page loading progress",t.appendChild(r),t.appendChild(o),t.appendChild(s);const n=document.createElement("div");n.className="flex flex-col gap-2";const l=document.createElement("h4");l.className="text-sm font-semibold text-gray-900",l.textContent="With custom aria-valuetext";const a=document.createElement("p");a.className="text-xs text-gray-600 mb-2",a.textContent='Screen readers announce: "File upload progress, 3 of 5 files uploaded"';const i=document.createElement("btu-linear-progress");i.progress=60,i.color="teal",i.label="3/5 files",i.ariaLabel="File upload progress",i.ariaValueText="3 of 5 files uploaded",n.appendChild(l),n.appendChild(a),n.appendChild(i);const p=document.createElement("div");p.className="flex flex-col gap-2";const d=document.createElement("h4");d.className="text-sm font-semibold text-gray-900",d.textContent="With completion announcement";const b=document.createElement("p");b.className="text-xs text-gray-600 mb-2",b.textContent='Screen readers auto-announce when complete: "Installation complete!"';const m=document.createElement("div");m.className="text-xs text-gray-500 mt-2",m.textContent="Announcement status: (waiting...)";let u=0;const c=document.createElement("btu-linear-progress");c.progress=0,c.color="success",c.label="0%",c.ariaLabel="Installation progress",c.completionAnnouncement="Installation complete!",c.addEventListener("btu-progress-complete",()=>{m.textContent='Announcement status: "Installation complete!" announced at '+new Date().toLocaleTimeString(),m.className="text-xs text-green-600 mt-2"});const w=setInterval(()=>{u<100?(u+=2,c.progress=u,c.label=`${u}%`,c.ariaValueText=`${u} percent complete`):clearInterval(w)},100);p.appendChild(d),p.appendChild(b),p.appendChild(c),p.appendChild(m);const N=new MutationObserver(S=>{S.forEach(A=>{A.removedNodes.forEach(L=>{(L===e||L.contains(e))&&(clearInterval(w),N.disconnect())})})});return setTimeout(()=>{e.parentNode&&N.observe(e.parentNode,{childList:!0})},0),e.appendChild(t),e.appendChild(n),e.appendChild(p),e},parameters:{docs:{description:{story:`
29
+ Bottom: step-based progress with 20% increments every 3 seconds and \`aria-valuetext\` for accessibility (e.g., "3 of 5 files uploaded").`}}}},y={render:()=>{let e;const t=()=>{const n=document.createElement("div"),o=document.createElement("div");o.className="flex flex-col mb-4 items-center";const s=document.createElement("h3");s.className="text-lg font-semibold mb-2",s.textContent="Scroll within the container to see progress bars animate in";const r=document.createElement("button");r.textContent="Reset",r.className="px-4 py-2 bg-primary-500 text-white rounded hover:bg-primary-600",r.onclick=()=>{e.innerHTML="",e.appendChild(t())},o.appendChild(s),o.appendChild(r),n.appendChild(o);const l=document.createElement("div");l.style.height="150px",l.style.overflowY="auto",l.style.border="1px solid #e5e7eb",l.style.borderRadius="4px",l.style.padding="1rem";const a=document.createElement("div");a.className="flex flex-col gap-8",a.style.minHeight="150vh";const i=document.createElement("btu-linear-progress");i.progress=30,i.color="primary",i.label="30%",a.appendChild(i);const p=document.createElement("div");p.style.marginTop="30vh";const d=document.createElement("btu-linear-progress");d.progress=50,d.color="teal",d.label="50%",p.appendChild(d),a.appendChild(p);const b=document.createElement("div");b.style.marginTop="30vh";const m=document.createElement("btu-linear-progress");m.progress=75,m.color="purple",m.label="75%",b.appendChild(m),a.appendChild(b);const u=document.createElement("div");u.style.marginTop="30vh";const c=document.createElement("btu-linear-progress");return c.progress=100,c.color="success",c.label="100%",u.appendChild(c),a.appendChild(u),l.appendChild(a),n.appendChild(l),n};return e=t(),e},parameters:{docs:{description:{story:'Demonstrates the viewport animation - progress bars animate from 0 to their target value when they become visible. Scroll within the container to see each progress bar animate in. Click "Reset" to restart.'}}}},C={render:()=>{const e=document.createElement("div");e.className="flex flex-col items-start gap-4";let t=0;const n=document.createElement("btu-linear-progress");n.progress=0,n.color="primary",n.label="0%";const o=document.createElement("div");o.className="text-sm text-gray-600",o.textContent="Status: In Progress...";const s=document.createElement("div");s.className="text-xs text-gray-500 mt-2",s.textContent="Event Log: (waiting for completion)",n.addEventListener("btu-progress-complete",()=>{o.textContent="Status: Complete! ✓",o.className="text-sm text-green-600 font-semibold",s.textContent=`Event Log: btu-progress-complete fired at ${new Date().toLocaleTimeString()}`,s.className="text-xs text-green-600 mt-2"});let r=!1;const l=setInterval(()=>{r||(t=t+1,n.progress=t,n.label=`${t}%`,t<100&&(o.textContent="Status: In Progress...",o.className="text-sm text-gray-600"),t===100&&(r=!0,setTimeout(()=>{t=0,r=!1},3e3)))},50),a=new MutationObserver(i=>{i.forEach(p=>{p.removedNodes.forEach(d=>{(d===e||d.contains(e))&&(clearInterval(l),a.disconnect())})})});return setTimeout(()=>{e.parentNode&&a.observe(e.parentNode,{childList:!0})},0),e.appendChild(n),e.appendChild(o),e.appendChild(s),e},parameters:{docs:{description:{story:"Demonstrates the btu-progress-complete event that fires when progress reaches 100%. The event fires each time progress completes a cycle."}}}},E={render:()=>{const e=document.createElement("div");e.className="flex flex-col gap-8";const t=document.createElement("div");t.className="flex flex-col gap-2";const n=document.createElement("h4");n.className="text-sm font-semibold text-gray-900",n.textContent="Progress bar with aria-label";const o=document.createElement("p");o.className="text-xs text-gray-600 mb-2",o.textContent='Screen readers announce: "Page loading progress"';const s=document.createElement("btu-linear-progress");s.progress=40,s.color="primary",s.ariaLabel="Page loading progress",t.appendChild(n),t.appendChild(o),t.appendChild(s);const r=document.createElement("div");r.className="flex flex-col gap-2";const l=document.createElement("h4");l.className="text-sm font-semibold text-gray-900",l.textContent="With custom aria-valuetext";const a=document.createElement("p");a.className="text-xs text-gray-600 mb-2",a.textContent='Screen readers announce: "File upload progress, 3 of 5 files uploaded"';const i=document.createElement("btu-linear-progress");i.progress=60,i.color="teal",i.label="3/5 files",i.ariaLabel="File upload progress",i.ariaValueText="3 of 5 files uploaded",r.appendChild(l),r.appendChild(a),r.appendChild(i);const p=document.createElement("div");p.className="flex flex-col gap-2";const d=document.createElement("h4");d.className="text-sm font-semibold text-gray-900",d.textContent="With completion announcement";const b=document.createElement("p");b.className="text-xs text-gray-600 mb-2",b.textContent='Screen readers auto-announce when complete: "Installation complete!"';const m=document.createElement("div");m.className="text-xs text-gray-500 mt-2",m.textContent="Announcement status: (waiting...)";let u=0;const c=document.createElement("btu-linear-progress");c.progress=0,c.color="success",c.label="0%",c.ariaLabel="Installation progress",c.completionAnnouncement="Installation complete!",c.addEventListener("btu-progress-complete",()=>{m.textContent='Announcement status: "Installation complete!" announced at '+new Date().toLocaleTimeString(),m.className="text-xs text-green-600 mt-2"});const w=setInterval(()=>{u<100?(u+=2,c.progress=u,c.label=`${u}%`,c.ariaValueText=`${u} percent complete`):clearInterval(w)},100);p.appendChild(d),p.appendChild(b),p.appendChild(c),p.appendChild(m);const N=new MutationObserver(S=>{S.forEach(I=>{I.removedNodes.forEach(L=>{(L===e||L.contains(e))&&(clearInterval(w),N.disconnect())})})});return setTimeout(()=>{e.parentNode&&N.observe(e.parentNode,{childList:!0})},0),e.appendChild(t),e.appendChild(r),e.appendChild(p),e},parameters:{docs:{description:{story:`
30
30
  Demonstrates accessibility best practices for screen reader users:
31
31
 
32
32
  **1. Basic usage:** Set \`ariaLabel\` to describe what's progressing.
@@ -394,4 +394,4 @@ Demonstrates accessibility best practices for screen reader users:
394
394
  }
395
395
  }
396
396
  }
397
- }`,...E.parameters?.docs?.source}}};const B=["Default","DeterminateProgress","AnimatedProgress","InitialAnimation","CompletionEvent","Accessibility"];export{E as Accessibility,x as AnimatedProgress,C as CompletionEvent,v as Default,f as DeterminateProgress,y as InitialAnimation,B as __namedExportsOrder,k as default};
397
+ }`,...E.parameters?.docs?.source}}};const O=["Default","DeterminateProgress","AnimatedProgress","InitialAnimation","CompletionEvent","Accessibility"];export{E as Accessibility,x as AnimatedProgress,C as CompletionEvent,v as Default,f as DeterminateProgress,y as InitialAnimation,O as __namedExportsOrder,W as default};
@@ -0,0 +1 @@
1
+ const o="0.508.0",s={version:o},c=s.version;export{c as L};
@@ -1,4 +1,4 @@
1
- import{g as m,x as o}from"./iframe-Dz6CxatW.js";import{o as c}from"./style-map-BgW9piaW.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),u=t=>{const a={};return t.customBackgroundColor&&(a["--pagination-color-background"]=t.customBackgroundColor),t.customForegroundColor&&(a["--pagination-color-foreground"]=t.customForegroundColor),a},S={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 o}from"./iframe-CsKt54V3.js";import{o as c}from"./style-map-kcS06w9f.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),u=t=>{const a={};return t.customBackgroundColor&&(a["--pagination-color-background"]=t.customBackgroundColor),t.customForegroundColor&&(a["--pagination-color-foreground"]=t.customForegroundColor),a},S={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 c,x as r}from"./iframe-Dz6CxatW.js";import{o as d}from"./if-defined-CngSGyRu.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:g,argTypes:t}=c("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 a,x as r}from"./iframe-CsKt54V3.js";import{o as c}from"./if-defined-D1UQmdjo.js";import{o as d}from"./style-map-kcS06w9f.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:g,argTypes:e}=a("btu-popover"),y={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>
@@ -24,14 +24,14 @@ import{g as c,x as r}from"./iframe-Dz6CxatW.js";import{o as d}from"./if-defined-
24
24
  <li>Focus restored to trigger on close</li>
25
25
  <li>Add <code>autofocus</code> to an element inside <code>slot="content"</code> for auto-focus on open</li>
26
26
  </ul>
27
- `}},actions:{handles:u},controls:{expanded:!0}},args:{...g,position:"bottom",trigger:"click",delay:300,open:!1},argTypes:{...t,position:{...t.position,control:{type:"select"},options:["top","bottom","left","right"]},trigger:{...t.trigger,control:{type:"select"},options:["click","hover","focus"]},delay:{...t.delay,control:{type:"number"},description:"Show delay in ms (hover trigger only)"},offset:{...t.offset,control:{type:"select"},options:["sm","md","lg","xl"],description:"Gap between trigger and popover (sm=4px, md=8px, lg=12px, xl=16px)"},open:{...t.open,control:{type:"boolean"},description:"Programmatic open/close (reflected)"},customBg:{name:"--popover-color-background",description:"Background color",control:{type:"color"},table:{category:"CSS Custom Properties",defaultValue:{summary:"white"}}},customTitleColor:{name:"--popover-color-title",description:"Title text color",control:{type:"color"},table:{category:"CSS Custom Properties",defaultValue:{summary:"oklch(var(--btu-theme-gray-900))"}}},customContentColor:{name:"--popover-color-content",description:"Content text color",control:{type:"color"},table:{category:"CSS Custom Properties",defaultValue:{summary:"oklch(var(--btu-theme-gray-900))"}}},customRadius:{name:"--popover-border-radius",description:"Border radius",control:{type:"select"},options:["0px","0.125rem","0.25rem","0.375rem","0.5rem","0.75rem","1rem","1.5rem","9999px"],labels:{"0px":"none (0px)","0.125rem":"sm (0.125rem)","0.25rem":"DEFAULT (0.25rem)","0.375rem":"md (0.375rem)","0.5rem":"lg (0.5rem)","0.75rem":"xl (0.75rem)","1rem":"2xl (1rem)","1.5rem":"3xl (1.5rem)","9999px":"full (9999px)"},table:{category:"CSS Custom Properties",defaultValue:{summary:"0.5rem (lg)"}}}},render:o=>{const e=[];o.customBg&&e.push(`--popover-color-background: ${o.customBg}`),o.customTitleColor&&e.push(`--popover-color-title: ${o.customTitleColor}`),o.customContentColor&&e.push(`--popover-color-content: ${o.customContentColor}`),o.customRadius&&e.push(`--popover-border-radius: ${o.customRadius}`);const a=e.length>0?e.join("; "):"";return r`
27
+ `}},actions:{handles:u},controls:{expanded:!0}},args:{...g,position:"bottom",trigger:"click",delay:300,open:!1},argTypes:{...e,position:{...e.position,control:{type:"select"},options:["top","bottom","left","right"]},trigger:{...e.trigger,control:{type:"select"},options:["click","hover","focus"]},delay:{...e.delay,control:{type:"number"},description:"Show delay in ms (hover trigger only)"},offset:{...e.offset,control:{type:"select"},options:["sm","md","lg","xl"],description:"Gap between trigger and popover (sm=4px, md=8px, lg=12px, xl=16px)"},open:{...e.open,control:{type:"boolean"},description:"Programmatic open/close (reflected)"},customBg:{name:"--popover-color-background",description:"Background color",control:{type:"color"},table:{category:"CSS Properties",defaultValue:{summary:"white"}}},customTitleColor:{name:"--popover-color-title",description:"Title text color",control:{type:"color"},table:{category:"CSS Properties",defaultValue:{summary:"oklch(var(--btu-theme-gray-900))"}}},customContentColor:{name:"--popover-color-content",description:"Content text color",control:{type:"color"},table:{category:"CSS Properties",defaultValue:{summary:"oklch(var(--btu-theme-gray-900))"}}},customRadius:{name:"--popover-border-radius",description:"Border radius",control:{type:"select"},options:["0px","0.125rem","0.25rem","0.375rem","0.5rem","0.75rem","1rem","1.5rem","9999px"],labels:{"0px":"none (0px)","0.125rem":"sm (0.125rem)","0.25rem":"DEFAULT (0.25rem)","0.375rem":"md (0.375rem)","0.5rem":"lg (0.5rem)","0.75rem":"xl (0.75rem)","1rem":"2xl (1rem)","1.5rem":"3xl (1.5rem)","9999px":"full (9999px)"},table:{category:"CSS Properties",defaultValue:{summary:"0.5rem (lg)"}}}},render:o=>{const t={};return o.customBg&&(t["--popover-color-background"]=o.customBg),o.customTitleColor&&(t["--popover-color-title"]=o.customTitleColor),o.customContentColor&&(t["--popover-color-content"]=o.customContentColor),o.customRadius&&(t["--popover-border-radius"]=o.customRadius),r`
28
28
  <div style="display: flex; justify-content: center; padding: 6rem 2rem;">
29
- <div style="${a}">
29
+ <div style=${d(t)}>
30
30
  <btu-popover
31
31
  position="${o.position}"
32
32
  trigger="${o.trigger}"
33
33
  delay="${o.delay}"
34
- offset="${d(o.offset)}"
34
+ offset="${c(o.offset)}"
35
35
  ?no-arrow="${o.noArrow}"
36
36
  ?open="${o.open}"
37
37
  >
@@ -428,4 +428,4 @@ import{g as c,x as r}from"./iframe-Dz6CxatW.js";import{o as d}from"./if-defined-
428
428
  }
429
429
  }
430
430
  }
431
- }`,...l.parameters?.docs?.source}}};const y=["Default","Positions","RichContent","AdvancedUsage"];export{l as AdvancedUsage,n as Default,i as Positions,s as RichContent,y as __namedExportsOrder,h as default};
431
+ }`,...l.parameters?.docs?.source}}};const f=["Default","Positions","RichContent","AdvancedUsage"];export{l as AdvancedUsage,n as Default,i as Positions,s as RichContent,f as __namedExportsOrder,y as default};
@@ -1 +1 @@
1
- import"./iframe-Dz6CxatW.js";const i=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){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c}))}}return n},l=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{i as E,l as R};
1
+ import"./iframe-CsKt54V3.js";const i=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){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c}))}}return n},l=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{i as E,l as R};
@@ -1,4 +1,4 @@
1
- import{x as o}from"./iframe-Dz6CxatW.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-CsKt54V3.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-Dz6CxatW.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-CsKt54V3.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{x as u}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz.js";function v(e,t){if(e<=0)return t;let n,o=0;return function(){if(n)return;const r=Date.now(),s=e-r+o;s<=0?(o=r,t.apply(this,[...arguments])):n=setTimeout(()=>{o=r,n=void 0,t.apply(this,[...arguments])},s)}}const x={title:"Utilities/Throttle",tags:["autodocs"],parameters:{docs:{subtitle:"The `throttle` utility function limits how often a function can execute, ensuring it runs at most once per specified interval. Useful for high-frequency events like scroll, resize, or mousemove."},controls:{expanded:!0}},argTypes:{interval:{control:{type:"number",min:0,max:2e3,step:50},description:"Throttle interval in milliseconds"}},args:{interval:200}},d={render:e=>{const t=`throttle-${Math.random().toString(36).substring(2,9)}`;let n=0,o=0;const r=()=>{const h=document.getElementById(`${t}-normal-count`),m=document.getElementById(`${t}-throttled-count`);h&&(h.textContent=String(n)),m&&(m.textContent=String(o))},s=v(e.interval,()=>{o++,r()}),a=()=>{n++,r()},l=()=>{a(),s()};return u`
1
+ import{x as u}from"./iframe-CsKt54V3.js";import"./preload-helper-PPVm8Dsz.js";function v(e,t){if(e<=0)return t;let n,o=0;return function(){if(n)return;const r=Date.now(),s=e-r+o;s<=0?(o=r,t.apply(this,[...arguments])):n=setTimeout(()=>{o=r,n=void 0,t.apply(this,[...arguments])},s)}}const x={title:"Utilities/Throttle",tags:["autodocs"],parameters:{docs:{subtitle:"The `throttle` utility function limits how often a function can execute, ensuring it runs at most once per specified interval. Useful for high-frequency events like scroll, resize, or mousemove."},controls:{expanded:!0}},argTypes:{interval:{control:{type:"number",min:0,max:2e3,step:50},description:"Throttle interval in milliseconds"}},args:{interval:200}},d={render:e=>{const t=`throttle-${Math.random().toString(36).substring(2,9)}`;let n=0,o=0;const r=()=>{const h=document.getElementById(`${t}-normal-count`),m=document.getElementById(`${t}-throttled-count`);h&&(h.textContent=String(n)),m&&(m.textContent=String(o))},s=v(e.interval,()=>{o++,r()}),a=()=>{n++,r()},l=()=>{a(),s()};return u`
2
2
  <div class="space-y-4">
3
3
  <div class="text-base">
4
4
  <p class="mb-2">
@@ -0,0 +1,143 @@
1
+ import{f as v,u as x,x as c,i as w}from"./iframe-CsKt54V3.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-D1UQmdjo.js";import{o as k}from"./style-map-kcS06w9f.js";import{E as C,R as L}from"./ReadyMixin-C1lZU7vt.js";import"./preload-helper-PPVm8Dsz.js";const S={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v},D=(o=S,i,l)=>{const{kind:t,metadata:e}=l;let s=globalThis.litPropertyMetadata.get(e);if(s===void 0&&globalThis.litPropertyMetadata.set(e,s=new Map),t==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(l.name,o),t==="accessor"){const{name:r}=l;return{set(n){const g=i.get.call(this);i.set.call(this,n),this.requestUpdate(r,g,o)},init(n){return n!==void 0&&this.C(r,void 0,o,n),n}}}if(t==="setter"){const{name:r}=l;return function(n){const g=this[r];i.call(this,n),this.requestUpdate(r,g,o)}}throw Error("Unsupported decorator location: "+t)};function p(o){return(i,l)=>typeof l=="object"?D(o,i,l):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(o,i,l)}var A=Object.defineProperty,a=(o,i,l,t)=>{for(var e=void 0,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=r(i,l,e)||e);return e&&A(i,l,e),e};const M={top:"btu-tooltip-top",bottom:"btu-tooltip-bottom",left:"btu-tooltip-left",right:"btu-tooltip-right"},_={sm:"btu-tooltip-offset-sm",md:"btu-tooltip-offset-md",lg:"btu-tooltip-offset-lg",xl:"btu-tooltip-offset-xl"},O=o=>{class i extends o{constructor(){super(...arguments),this.tooltip="",this.tooltipPosition="top",this.tooltipDelay=300,this.tooltipOffset=null,this.tooltipNoArrow=!1,this.tooltipTrigger="hover focus",this._tooltipEl=null,this._tooltipId=`btu-tooltip-${crypto.randomUUID()}`,this._anchorName=`--btu-trigger-${crypto.randomUUID()}`,this._showTimer=null,this._isVisible=!1,this._activeTriggers=new Set,this._onMouseEnter=this._handleMouseEnter.bind(this),this._onMouseLeave=this._handleMouseLeave.bind(this),this._onFocusIn=this._handleFocusIn.bind(this),this._onFocusOut=this._handleFocusOut.bind(this),this._onClick=this._handleClick.bind(this),this._onNativeToggle=this._handleNativeToggle.bind(this),this._onKeyDown=this._handleKeyDown.bind(this),this._onDocumentClick=null}connectedCallback(){super.connectedCallback(),this._bindTriggerListeners()}disconnectedCallback(){if(this._clearShowTimer(),this._removeDocumentClickListener(),this._unbindTriggerListeners(),this._tooltipEl){try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip during disconnect:",t)}this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null}this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),this._isVisible=!1,super.disconnectedCallback()}updated(t){super.updated(t),t.has("tooltipTrigger")&&(this._unbindTriggerListeners(),this._bindTriggerListeners(),this._tooltipEl&&(this._isVisible&&this._hide(),this._tooltipEl.setAttribute("popover",this._getPopoverMode()))),(t.has("tooltip")||t.has("tooltipPosition")||t.has("tooltipDelay")||t.has("tooltipOffset")||t.has("tooltipNoArrow"))&&this._syncTooltipElement()}_getPopoverMode(){return"manual"}_syncTooltipElement(){if(!this.tooltip){this._tooltipEl&&(this._hide(),this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null,this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),document.removeEventListener("keydown",this._onKeyDown));return}this.style.setProperty("anchor-name",this._anchorName),this._tooltipEl||(this._tooltipEl=this._createTooltipElement(),this.appendChild(this._tooltipEl),this._appendAriaDescribedBy(),document.addEventListener("keydown",this._onKeyDown)),this._tooltipEl.textContent=this.tooltip,this._tooltipEl.className=this._buildTooltipClasses()}_createTooltipElement(){const t=document.createElement("div");return t.id=this._tooltipId,t.className=this._buildTooltipClasses(),t.setAttribute("role","tooltip"),t.setAttribute("data-tooltip-internal",""),t.setAttribute("popover",this._getPopoverMode()),t.style.setProperty("position-anchor",this._anchorName),t.textContent=this.tooltip,t.addEventListener("toggle",this._onNativeToggle),t}_buildTooltipClasses(){const t=["btu-tooltip",M[this.tooltipPosition]];return this.tooltipOffset&&_[this.tooltipOffset]&&t.push(_[this.tooltipOffset]),this.tooltipNoArrow&&t.push("btu-tooltip-no-arrow"),t.join(" ")}_hasTrigger(t){return this._activeTriggers.has(t)}_bindTriggerListeners(){const t=new Set(["hover","focus","click"]);this._activeTriggers=new Set(this.tooltipTrigger.trim().split(/\s+/));for(const e of this._activeTriggers)t.has(e)||console.warn(`[btu-tooltip] Unrecognized tooltip-trigger value: "${e}". Valid values: hover, focus, click.`);this._hasTrigger("hover")&&(this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave)),this._hasTrigger("focus")&&(this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)),this._hasTrigger("click")&&this.addEventListener("click",this._onClick)}_unbindTriggerListeners(){this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("click",this._onClick),document.removeEventListener("keydown",this._onKeyDown)}_show(){if(!(this._isVisible||!this._tooltipEl)){try{this._tooltipEl.showPopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to show tooltip:",t)}this._hasTrigger("click")&&setTimeout(()=>{this._removeDocumentClickListener(),this._onDocumentClick=t=>{const e=t.composedPath();!e.includes(this)&&(!this._tooltipEl||!e.includes(this._tooltipEl))&&this._hide()},document.addEventListener("click",this._onDocumentClick)},0)}}_hide(){if(this._clearShowTimer(),this._removeDocumentClickListener(),!(!this._isVisible||!this._tooltipEl))try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip:",t)}}_removeDocumentClickListener(){this._onDocumentClick&&(document.removeEventListener("click",this._onDocumentClick),this._onDocumentClick=null)}_handleNativeToggle(t){const{newState:e}=t;this._isVisible=e==="open",this.dispatchEvent(new CustomEvent(this._isVisible?"btu-tooltip-show":"btu-tooltip-hide",{bubbles:!0,composed:!0}))}_handleKeyDown(t){t.key==="Escape"&&(this._clearShowTimer(),this._hide())}_clearShowTimer(){this._showTimer!==null&&(clearTimeout(this._showTimer),this._showTimer=null)}_handleMouseEnter(){this._clearShowTimer(),this._showTimer=setTimeout(()=>{this._show()},this.tooltipDelay)}_handleMouseLeave(){this._clearShowTimer(),this._hide()}_handleFocusIn(){this._clearShowTimer(),this._show()}_handleFocusOut(){this._clearShowTimer(),this._hide()}_handleClick(){this._clearShowTimer(),this._isVisible?this._hide():this._show()}_appendAriaDescribedBy(){const t=this.getAttribute("aria-describedby");t?t.includes(this._tooltipId)||this.setAttribute("aria-describedby",`${t} ${this._tooltipId}`):this.setAttribute("aria-describedby",this._tooltipId)}_removeAriaDescribedBy(){const t=this.getAttribute("aria-describedby");if(!t)return;const e=t.split(/\s+/).filter(s=>s!==this._tooltipId).join(" ").trim();e?this.setAttribute("aria-describedby",e):this.removeAttribute("aria-describedby")}}return a([p({attribute:"tooltip"})],i.prototype,"tooltip"),a([p({attribute:"tooltip-position"})],i.prototype,"tooltipPosition"),a([p({attribute:"tooltip-delay",type:Number})],i.prototype,"tooltipDelay"),a([p({attribute:"tooltip-offset"})],i.prototype,"tooltipOffset"),a([p({attribute:"tooltip-no-arrow",type:Boolean})],i.prototype,"tooltipNoArrow"),a([p({attribute:"tooltip-trigger"})],i.prototype,"tooltipTrigger"),i};var P=Object.defineProperty,$=Object.getOwnPropertyDescriptor,y=(o,i,l,t)=>{for(var e=t>1?void 0:t?$(i,l):i,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=(t?r(i,l,e):r(e))||e);return t&&e&&P(i,l,e),e};let b=class extends O(C(L(w))){constructor(){super(...arguments),this.label="Hover me",this.initialClasses=[]}connectedCallback(){super.connectedCallback(),this.className&&(this.initialClasses=this.className.split(" ").filter(o=>o.trim()))}createRenderRoot(){return this}willUpdate(){const o=[...this.initialClasses,"tooltip-demo"];this.className=o.filter(Boolean).join(" ")}render(){return c`${this.label}`}};y([p({type:String})],b.prototype,"label",2);b=y([E("tooltip-demo")],b);const f=`
2
+ .tooltip-demo {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ padding: 0.5rem 1rem;
7
+ border-radius: 0.375rem;
8
+ background-color: oklch(var(--btu-theme-gray-100));
9
+ color: oklch(var(--btu-theme-gray-700));
10
+ font-weight: 500;
11
+ font-size: 0.875rem;
12
+ cursor: default;
13
+ user-select: none;
14
+ }
15
+ `,V={title:"Mixins/Tooltip",tags:["autodocs"],parameters:{docs:{subtitle:"Declarative tooltip support for any LitElement component",description:{component:`
16
+ \`TooltipMixin\` adds declarative tooltip support to any LitElement component using CSS anchor positioning and the Popover API.
17
+
18
+ <h3>Opt-in Pattern</h3>
19
+
20
+ \`\`\`typescript
21
+ class MyComponent extends TooltipMixin(EventEmitterMixin(ReadyMixin(LitElement))) {
22
+ // Component now supports tooltip attributes
23
+ }
24
+ \`\`\`
25
+
26
+ \`\`\`html
27
+ <my-component tooltip="Hello!" tooltip-position="bottom"></my-component>
28
+ \`\`\`
29
+
30
+ <h3>Accessibility</h3>
31
+ <ul>
32
+ <li><code>role="tooltip"</code> on tooltip element</li>
33
+ <li><code>aria-describedby</code> on host links to tooltip (appends to existing value)</li>
34
+ <li>Shows on <code>focusin</code>, hides on <code>focusout</code> and <code>Escape</code></li>
35
+ <li><code>prefers-reduced-motion: reduce</code> disables slide animation</li>
36
+ </ul>
37
+ `}},controls:{expanded:!0}},args:{tooltip:"This is a tooltip","tooltip-position":"top","tooltip-delay":300,"tooltip-no-arrow":!1,"tooltip-trigger":"hover focus",label:"Hover me"},argTypes:{tooltip:{control:{type:"text"},description:"Tooltip text. No tooltip rendered when empty.",table:{category:"Attributes"}},"tooltip-position":{control:{type:"select"},options:["top","bottom","left","right"],description:"Preferred placement (auto-flips if viewport constrained)",table:{category:"Attributes"}},"tooltip-delay":{control:{type:"number"},description:"Delay before showing tooltip on hover (ms)",table:{category:"Attributes"}},"tooltip-offset":{control:{type:"select"},options:["sm","md","lg","xl"],description:"Gap between trigger and tooltip (sm=4px, md=8px, lg=12px, xl=16px)",table:{category:"Attributes"}},"tooltip-no-arrow":{control:{type:"boolean"},description:"Hide the arrow pseudo-element",table:{category:"Attributes"}},"tooltip-trigger":{control:{type:"select"},options:["hover focus","hover","focus","click","hover click"],description:"How the tooltip is activated (combinable triggers)",table:{category:"Attributes"}},label:{control:{type:"text"},description:"Demo button label text",table:{category:"Demo"}},customBg:{name:"--tooltip-color-background",control:{type:"color"},description:"Background color",table:{category:"CSS Properties",defaultValue:{summary:"white"}}},customTextColor:{name:"--tooltip-color-text",control:{type:"color"},description:"Text color",table:{category:"CSS Properties",defaultValue:{summary:"oklch(var(--btu-theme-gray-900))"}}},customRadius:{name:"--tooltip-border-radius",control:{type:"select"},options:["0px","0.125rem","0.25rem","0.375rem","0.5rem","0.75rem","1rem","1.5rem","9999px"],labels:{"0px":"none (0px)","0.125rem":"sm (0.125rem)","0.25rem":"DEFAULT (0.25rem)","0.375rem":"md (0.375rem)","0.5rem":"lg (0.5rem)","0.75rem":"xl (0.75rem)","1rem":"2xl (1rem)","1.5rem":"3xl (1.5rem)","9999px":"full (9999px)"},description:"Border radius",table:{category:"CSS Properties",defaultValue:{summary:"0.5rem (lg)"}}}},render:o=>{const i={};return o.customBg&&(i["--tooltip-color-background"]=o.customBg),o.customTextColor&&(i["--tooltip-color-text"]=o.customTextColor),o.customRadius&&(i["--tooltip-border-radius"]=o.customRadius),c`
38
+ <style>
39
+ ${f}
40
+ </style>
41
+ <div style="display: flex; justify-content: center; padding: 6rem 2rem;">
42
+ <div style=${k(i)}>
43
+ <tooltip-demo
44
+ tooltip="${o.tooltip}"
45
+ tooltip-position="${o["tooltip-position"]}"
46
+ tooltip-delay="${o["tooltip-delay"]}"
47
+ tooltip-offset="${T(o["tooltip-offset"])}"
48
+ ?tooltip-no-arrow="${o["tooltip-no-arrow"]}"
49
+ tooltip-trigger="${o["tooltip-trigger"]}"
50
+ label="${o.label}"
51
+ ></tooltip-demo>
52
+ </div>
53
+ </div>
54
+ `}},d={args:{}},h={render:()=>c`
55
+ <style>
56
+ ${f}
57
+ </style>
58
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
59
+ <tooltip-demo tooltip="Top tooltip" tooltip-position="top" label="Top"></tooltip-demo>
60
+ <tooltip-demo tooltip="Bottom tooltip" tooltip-position="bottom" label="Bottom"></tooltip-demo>
61
+ <tooltip-demo tooltip="Left tooltip" tooltip-position="left" label="Left"></tooltip-demo>
62
+ <tooltip-demo tooltip="Right tooltip" tooltip-position="right" label="Right"></tooltip-demo>
63
+ </div>
64
+ `,parameters:{docs:{description:{story:"Tooltips support four positions: `top`, `bottom`, `left`, and `right`. Each position auto-flips to the opposite side if constrained by the viewport."},story:{inline:!1,iframeHeight:300}}}},m={render:()=>c`
65
+ <style>
66
+ ${f}
67
+ </style>
68
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 4rem 2rem; flex-wrap: wrap;">
69
+ <tooltip-demo tooltip="Small offset (4px)" tooltip-offset="sm" label="sm"></tooltip-demo>
70
+ <tooltip-demo tooltip="Medium offset (8px)" tooltip-offset="md" label="md"></tooltip-demo>
71
+ <tooltip-demo tooltip="Large offset (12px)" tooltip-offset="lg" label="lg"></tooltip-demo>
72
+ <tooltip-demo tooltip="Extra large offset (16px)" tooltip-offset="xl" label="xl"></tooltip-demo>
73
+ </div>
74
+ `,parameters:{docs:{description:{story:"The `tooltip-offset` attribute controls the gap between trigger and tooltip using named sizes: `sm` (4px), `md` (8px), `lg` (12px), `xl` (16px)."}}}},u={render:()=>c`
75
+ <style>
76
+ ${f}
77
+ </style>
78
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 4rem 2rem; flex-wrap: wrap;">
79
+ <tooltip-demo tooltip="Click-triggered tooltip" tooltip-trigger="click" label="Click me"></tooltip-demo>
80
+ <tooltip-demo tooltip="Hover or click" tooltip-trigger="hover click" label="Hover or click"></tooltip-demo>
81
+ </div>
82
+ `,parameters:{docs:{description:{story:"The `tooltip-trigger` attribute controls how the tooltip is activated. `click` toggles on click and dismisses on Escape. Triggers can be combined with spaces."}}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
83
+ args: {}
84
+ }`,...d.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
85
+ render: () => html\`
86
+ <style>
87
+ \${demoStyle}
88
+ </style>
89
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
90
+ <tooltip-demo tooltip="Top tooltip" tooltip-position="top" label="Top"></tooltip-demo>
91
+ <tooltip-demo tooltip="Bottom tooltip" tooltip-position="bottom" label="Bottom"></tooltip-demo>
92
+ <tooltip-demo tooltip="Left tooltip" tooltip-position="left" label="Left"></tooltip-demo>
93
+ <tooltip-demo tooltip="Right tooltip" tooltip-position="right" label="Right"></tooltip-demo>
94
+ </div>
95
+ \`,
96
+ parameters: {
97
+ docs: {
98
+ description: {
99
+ story: 'Tooltips support four positions: \`top\`, \`bottom\`, \`left\`, and \`right\`. Each position auto-flips to the opposite side if constrained by the viewport.'
100
+ },
101
+ story: {
102
+ inline: false,
103
+ iframeHeight: 300
104
+ }
105
+ }
106
+ }
107
+ }`,...h.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
108
+ render: () => html\`
109
+ <style>
110
+ \${demoStyle}
111
+ </style>
112
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 4rem 2rem; flex-wrap: wrap;">
113
+ <tooltip-demo tooltip="Small offset (4px)" tooltip-offset="sm" label="sm"></tooltip-demo>
114
+ <tooltip-demo tooltip="Medium offset (8px)" tooltip-offset="md" label="md"></tooltip-demo>
115
+ <tooltip-demo tooltip="Large offset (12px)" tooltip-offset="lg" label="lg"></tooltip-demo>
116
+ <tooltip-demo tooltip="Extra large offset (16px)" tooltip-offset="xl" label="xl"></tooltip-demo>
117
+ </div>
118
+ \`,
119
+ parameters: {
120
+ docs: {
121
+ description: {
122
+ story: 'The \`tooltip-offset\` attribute controls the gap between trigger and tooltip using named sizes: \`sm\` (4px), \`md\` (8px), \`lg\` (12px), \`xl\` (16px).'
123
+ }
124
+ }
125
+ }
126
+ }`,...m.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
127
+ render: () => html\`
128
+ <style>
129
+ \${demoStyle}
130
+ </style>
131
+ <div style="display: flex; gap: 2rem; justify-content: center; padding: 4rem 2rem; flex-wrap: wrap;">
132
+ <tooltip-demo tooltip="Click-triggered tooltip" tooltip-trigger="click" label="Click me"></tooltip-demo>
133
+ <tooltip-demo tooltip="Hover or click" tooltip-trigger="hover click" label="Hover or click"></tooltip-demo>
134
+ </div>
135
+ \`,
136
+ parameters: {
137
+ docs: {
138
+ description: {
139
+ story: 'The \`tooltip-trigger\` attribute controls how the tooltip is activated. \`click\` toggles on click and dismisses on Escape. Triggers can be combined with spaces.'
140
+ }
141
+ }
142
+ }
143
+ }`,...u.parameters?.docs?.source}}};const H=["Default","Positions","Offset","ClickTrigger"];export{u as ClickTrigger,d as Default,m as Offset,h as Positions,H as __namedExportsOrder,V as default};
@@ -1,4 +1,4 @@
1
- import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz.js";const{events:m,args:y,argTypes:a}=h("btu-widget"),v={title:"Components/Widget",component:"btu-widget",tags:["autodocs"],parameters:{docs:{subtitle:"btu-widget",description:{component:`
1
+ import{g as h,x as l}from"./iframe-CsKt54V3.js";import{o as m}from"./style-map-kcS06w9f.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:w,argTypes:a}=h("btu-widget"),$={title:"Components/Widget",component:"btu-widget",tags:["autodocs"],parameters:{docs:{subtitle:"btu-widget",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>To display content in a structured widget layout</li>
@@ -12,13 +12,13 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
12
12
  <li>Content Edit History Panel</li>
13
13
  <li>Global search filters</li>
14
14
  </ul>
15
- `}},actions:{handles:m},controls:{expanded:!0}},args:{...y,heading:"Widget Title",collapsible:!0},argTypes:{...a,"--header-background":{table:{disable:!0}},"--widget-background":{table:{disable:!0}},"--widget-border":{table:{disable:!0}},isFullscreen:{table:{disable:!0}},heading:{...a.heading,control:{type:"text"},description:"Heading text displayed in the header."},collapsible:{...a.collapsible,control:{type:"boolean"},description:"Whether the widget can be collapsed/expanded. Adds chevron toggle button."},collapsed:{...a.collapsed,control:{type:"boolean"},description:"Whether the widget is currently collapsed (body and footer hidden)."},fullscreenable:{...a.fullscreenable,control:{type:"boolean"},description:"Whether the widget can enter fullscreen mode. Adds fullscreen toggle button."},customWidgetBackground:{name:"--widget-background",control:{type:"color"},description:"Widget background color (default: #ffffff)",table:{category:"CSS Properties"}},customWidgetBorder:{name:"--widget-border",control:{type:"text"},description:'Widget border (e.g., "2px solid #ccc", default: "1px solid #e0e0e0")',table:{category:"CSS Properties"}},customHeaderBackground:{name:"--header-background",control:{type:"color"},description:"Header background color (default: transparent)",table:{category:"CSS Properties"}}},render:e=>{const t=[];e.customWidgetBackground&&t.push(`--widget-background: ${e.customWidgetBackground}`),e.customWidgetBorder&&t.push(`--widget-border: ${e.customWidgetBorder}`),e.customHeaderBackground&&t.push(`--header-background: ${e.customHeaderBackground}`);const r=t.length>0?t.join("; "):"";return l`
15
+ `}},actions:{handles:y},controls:{expanded:!0}},args:{...w,heading:"Widget Title",collapsible:!0},argTypes:{...a,"--header-background":{table:{disable:!0}},"--widget-background":{table:{disable:!0}},"--widget-border":{table:{disable:!0}},isFullscreen:{table:{disable:!0}},heading:{...a.heading,control:{type:"text"},description:"Heading text displayed in the header."},collapsible:{...a.collapsible,control:{type:"boolean"},description:"Whether the widget can be collapsed/expanded. Adds chevron toggle button."},collapsed:{...a.collapsed,control:{type:"boolean"},description:"Whether the widget is currently collapsed (body and footer hidden)."},fullscreenable:{...a.fullscreenable,control:{type:"boolean"},description:"Whether the widget can enter fullscreen mode. Adds fullscreen toggle button."},customWidgetBackground:{name:"--widget-background",control:{type:"color"},description:"Widget background color (default: #ffffff)",table:{category:"CSS Properties"}},customWidgetBorder:{name:"--widget-border",control:{type:"text"},description:'Widget border (e.g., "2px solid #ccc", default: "1px solid #e0e0e0")',table:{category:"CSS Properties"}},customHeaderBackground:{name:"--header-background",control:{type:"color"},description:"Header background color (default: transparent)",table:{category:"CSS Properties"}}},render:e=>{const t={};return e.customWidgetBackground&&(t["--widget-background"]=e.customWidgetBackground),e.customWidgetBorder&&(t["--widget-border"]=e.customWidgetBorder),e.customHeaderBackground&&(t["--header-background"]=e.customHeaderBackground),l`
16
16
  <btu-widget
17
17
  .heading=${e.heading??""}
18
18
  ?collapsible=${e.collapsible}
19
19
  ?collapsed=${e.collapsed}
20
20
  ?fullscreenable=${e.fullscreenable}
21
- style=${r}
21
+ style=${m(t)}
22
22
  >
23
23
  <button
24
24
  class="btu-button btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-xs"
@@ -28,7 +28,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
28
28
  </button>
29
29
  <div>This is the main body content of the widget.</div>
30
30
  </btu-widget>
31
- `}},d={args:{fullscreenable:!0}},c={render:e=>l`
31
+ `}},i={args:{fullscreenable:!0}},d={render:e=>l`
32
32
  <btu-widget
33
33
  .heading=${e.heading??"Widget with Controls"}
34
34
  ?collapsible=${e.collapsible??!0}
@@ -41,7 +41,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
41
41
  </div>
42
42
  <div>Body content with heading and an action bar in the footer.</div>
43
43
  </btu-widget>
44
- `,parameters:{docs:{description:{story:"Widget demonstrating how easy it is to add an action bar component to the footer of a widget."}}}},u={render:e=>l`
44
+ `,parameters:{docs:{description:{story:"Widget demonstrating how easy it is to add an action bar component to the footer of a widget."}}}},c={render:e=>l`
45
45
  <btu-widget
46
46
  .heading=${e.heading??"Fully Themed Widget"}
47
47
  ?collapsible=${e.collapsible}
@@ -57,7 +57,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
57
57
  <small>Footer content (hidden when collapsed)</small>
58
58
  </div>
59
59
  </btu-widget>
60
- `,parameters:{docs:{description:{story:"Widget with complete theming using all available CSS variables. Demonstrates full control over widget and header appearance."}}}},b={args:{collapsible:!0,collapsed:!0},render:e=>l`
60
+ `,parameters:{docs:{description:{story:"Widget with complete theming using all available CSS variables. Demonstrates full control over widget and header appearance."}}}},u={args:{collapsible:!0,collapsed:!0},render:e=>l`
61
61
  <btu-widget
62
62
  .heading=${e.heading??"Initially Collapsed"}
63
63
  ?collapsible=${e.collapsible??!0}
@@ -69,7 +69,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
69
69
  <p>Click the chevron to expand and see this content.</p>
70
70
  </div>
71
71
  </btu-widget>
72
- `,parameters:{docs:{description:{story:"Widget that starts in a collapsed state."}}}},p={render:e=>{const t=["pencil","gear","trash","star","heart","bell"];let r=0;const g=n=>{const o=document.createElement("btu-icon");o.setAttribute("symbol",t[r%t.length]),o.setAttribute("slot","controls"),r++,n.appendChild(o);const s=document.createElement("p");s.textContent="This paragraph was added dynamically and automatically redistributed to the body!",s.style.color="#16a34a",s.style.fontWeight="600",n.appendChild(s);const i=document.createElement("button");i.className="btu-button btu-button-purple",i.textContent="Button",i.setAttribute("slot","footer"),n.appendChild(i)};return l`
72
+ `,parameters:{docs:{description:{story:"Widget that starts in a collapsed state."}}}},b={render:e=>{const t=["pencil","gear","trash","star","heart","bell"];let p=0;const g=n=>{const o=document.createElement("btu-icon");o.setAttribute("symbol",t[p%t.length]),o.setAttribute("slot","controls"),p++,n.appendChild(o);const r=document.createElement("p");r.textContent="This paragraph was added dynamically and automatically redistributed to the body!",r.style.color="#16a34a",r.style.fontWeight="600",n.appendChild(r);const s=document.createElement("button");s.className="btu-button btu-button-purple",s.textContent="Button",s.setAttribute("slot","footer"),n.appendChild(s)};return l`
73
73
  <div style="display: flex; flex-direction: column; gap: 1rem;">
74
74
  <button
75
75
  class="btu-button btu-button-primary"
@@ -95,11 +95,11 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
95
95
  </div>
96
96
  </btu-widget>
97
97
  </div>
98
- `},parameters:{docs:{description:{story:"Demonstrates the Manager Pattern's MutationObserver: Content added dynamically is automatically redistributed to the correct containers based on slot attributes."}}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
98
+ `},parameters:{docs:{description:{story:"Demonstrates the Manager Pattern's MutationObserver: Content added dynamically is automatically redistributed to the correct containers based on slot attributes."}}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
99
99
  args: {
100
100
  fullscreenable: true
101
101
  }
102
- }`,...d.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
102
+ }`,...i.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
103
103
  render: args => html\`
104
104
  <btu-widget
105
105
  .heading=\${args.heading ?? 'Widget with Controls'}
@@ -121,7 +121,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
121
121
  }
122
122
  }
123
123
  }
124
- }`,...c.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
124
+ }`,...d.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
125
125
  render: args => html\`
126
126
  <btu-widget
127
127
  .heading=\${args.heading ?? 'Fully Themed Widget'}
@@ -146,7 +146,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
146
146
  }
147
147
  }
148
148
  }
149
- }`,...u.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
149
+ }`,...c.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
150
150
  args: {
151
151
  collapsible: true,
152
152
  collapsed: true
@@ -171,7 +171,7 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
171
171
  }
172
172
  }
173
173
  }
174
- }`,...b.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
174
+ }`,...u.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
175
175
  render: args => {
176
176
  const icons = ['pencil', 'gear', 'trash', 'star', 'heart', 'bell'];
177
177
  let iconIndex = 0;
@@ -230,4 +230,4 @@ import{g as h,x as l}from"./iframe-Dz6CxatW.js";import"./preload-helper-PPVm8Dsz
230
230
  }
231
231
  }
232
232
  }
233
- }`,...p.parameters?.docs?.source}}};const C=["Default","WithFooter","CustomizedWithCSSVariables","CollapsedByDefault","DynamicContentRedistribution"];export{b as CollapsedByDefault,u as CustomizedWithCSSVariables,d as Default,p as DynamicContentRedistribution,c as WithFooter,C as __namedExportsOrder,v as default};
233
+ }`,...b.parameters?.docs?.source}}};const k=["Default","WithFooter","CustomizedWithCSSVariables","CollapsedByDefault","DynamicContentRedistribution"];export{u as CollapsedByDefault,c as CustomizedWithCSSVariables,i as Default,b as DynamicContentRedistribution,d as WithFooter,k as __namedExportsOrder,$ as default};