@brightspot/ui 5.6.0 → 5.7.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.
- package/dist/components/ai-sparkle/AiSparkle.js +2 -2
- package/dist/components/ai-sparkle/AiSparkle.js.map +1 -1
- package/dist/components/ai-sparkle/animations/ai-sparkle.json +1 -1
- package/dist/components/badge/Badge.d.ts +11 -0
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +14 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/popover/Popover.d.ts +9 -2
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/Popover.js +17 -3
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/custom-elements.json +42 -2
- package/dist/storybook/assets/{ActionBar.stories-BcwPhWTp.js → ActionBar.stories-CtNg8OWD.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-By6op0BA.js → ActionItem.stories-DHxjFRqy.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-C6pbkiaj.js → AiSparkle.stories-CMe_3Y0A.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-CoN9BeMg.js → Avatar.stories-BTYF9Udo.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-CDtAKpp7.js → AvatarGroup.stories-CxD-EgtC.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-Ba4aSN2L.js → Badge.stories-xU-A2gIi.js} +69 -12
- package/dist/storybook/assets/{Banner.stories-SWy-GP0E.js → Banner.stories-Bc81CKsh.js} +1 -1
- package/dist/storybook/assets/{Button-B2GtGOY8.js → Button-DbgKu4cc.js} +1 -1
- package/dist/storybook/assets/{Button.stories-DxwUc2WJ.js → Button.stories-DF2lfYpK.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-C_ifrkC4.js → ButtonGroup.stories-C-M77ns-.js} +1 -1
- package/dist/storybook/assets/{Card.stories-F_mniaVn.js → Card.stories-HGXh7qIC.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-DVsxThX4.js → Celebrate.stories-CH-XsVlQ.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-DKJoUdxG.js → Checkbox.stories-CsNt2BM9.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-Pkwfd77c.js → CircularProgress.stories-DK9d1P49.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-a2gktsoh.js → ClipboardMixin.stories-Bku7X5_w.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-CCCBnCm6.js → Color-6BZIO3FS-EoGfq1T7.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-CNz6eg3K.js → Colors.stories-qceHlbcE.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-4jdfRqZE.js → CombinedEffects.stories-CEshjIR7.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-B7XkFXgp.js → ComponentStatesMixin-D9Pixe5d.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BJ3ZqyXI.js → ComponentStatesMixin.stories-B9-Zzqrs.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-D6bMqU-q.js → CopyToClipboard.stories-B-HhDvPf.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-DhoqLX4y.js → Debounce.stories-DuQMn4C2.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-BYjEnPrT.js → DocsRenderer-LL677BLK-DNH4xGdf.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-L_Z9aO7x.js → Dropdown.stories-DZA_FgyB.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-BSLvm3b3.js → EmptyState.stories-BPXr0JGC.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-CSFvomuS.js → EscaAvatar.stories-DEANJleg.js} +1 -1
- package/dist/storybook/assets/{Events.stories-mlD9cGXl.js → Events.stories-DIa_7CR8.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CeltMZBW.js → Heading.stories-CdfSlUKV.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-D6oOT5mx.js → HueRipple.stories-D4Tnu6C3.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-DLZkdPX9.js → Icon.stories-DRzpmWPD.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DvZli4HK.js → IconButton.stories-B4MwUqS9.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DcFalhI-.js → LinearProgress.stories-0jMi3ixH.js} +1 -1
- package/dist/storybook/assets/{Message.stories-PNFAOkz4.js → Message.stories-FsrGgPyB.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-D23Ao9By.js → OnFindMixin.stories-B7wQ3wAd.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-xdBz75X-.js → Pagination.stories-CORs2cY3.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-D3XhSzT6.js → Popover.stories-DYBxEyMB.js} +63 -19
- package/dist/storybook/assets/{ReadyMixin-rEChco5O.js → ReadyMixin-B1macwQ1.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-DeNfRaNO.js → RovingTabindexMixin.stories-Bzg9Htwx.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-D1gY4S_b.js → Rtc.stories-nM5_HZXY.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-_G3D0pCc.js → ScrollShadow.stories-DxFf0TeI.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-DGohQ8pW.js → Switch.stories-Bl9aVDwn.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-DSLwNhta.js → Tab.stories-DjMCNkRq.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-Cyrpryu9.js → Tabs.stories-BB1q-9R2.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-CqX5SmUI.js → Throttle.stories-Ctc18aNC.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-BQoBH6id.js → Tooltip.stories-CKajF5sl.js} +6 -2
- package/dist/storybook/assets/{Upload.stories-DU_6vIjx.js → Upload.stories-B7Iw53Qq.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-KcYrFAxk.js → UploadItem.stories-Cb4ePAYx.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-OD3NhqCu.js → Welcome.stories-AzE22T6_.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-_E8gZ37q.js → Widget.stories-CXN5G1We.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-i1BxKTdF.js → WithTooltip-65CFNBJE-61jzENSu.js} +1 -1
- package/dist/storybook/assets/{blocks-BqMMHYPv.js → blocks-J_f2D33t.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-Bw1O6PwW.js → formatter-EIJCOSYU-C15zBrnA.js} +1 -1
- package/dist/storybook/assets/if-defined-BbMdp3t8.js +1 -0
- package/dist/storybook/assets/{iframe-BsOwdi_g.js → iframe-BX01Fo1V.js} +4 -4
- package/dist/storybook/assets/iframe-DIm-6NO3.css +1 -0
- package/dist/storybook/assets/{index-BhXD9uil.js → index-CzcFKTkD.js} +1 -1
- package/dist/storybook/assets/{onFind-C3lkFNdJ.js → onFind-BUzFtt2i.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-DdjhyHcg.js → onFind.stories-DMci1Pj-.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-ClAAbD4Y.js → onRemove.stories-C6c-zZfV.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-tTpm9eku.js → onVisible.stories-7t2U3KRP.js} +1 -1
- package/dist/storybook/assets/{style-map-cpVeTpyC.js → style-map-Dbe8ACrE.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-LmzzJIPF.js → syntaxhighlighter-ED5Y7EFY-BbcaScWF.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-badge.js +23 -0
- package/dist/tailwind-plugin-badge.js.map +1 -1
- package/dist/tailwind-plugin-badge.ts +27 -0
- package/dist/tailwind-plugin-popover.js +16 -0
- package/dist/tailwind-plugin-popover.js.map +1 -1
- package/dist/tailwind-plugin-popover.ts +17 -0
- package/dist/tailwind-plugin-tooltip.js +15 -5
- package/dist/tailwind-plugin-tooltip.js.map +1 -1
- package/dist/tailwind-plugin-tooltip.ts +15 -5
- package/dist/util/TooltipMixin.d.ts +5 -2
- package/dist/util/TooltipMixin.d.ts.map +1 -1
- package/dist/util/TooltipMixin.js +5 -2
- package/dist/util/TooltipMixin.js.map +1 -1
- package/docs/components/Badge.md +2 -0
- package/docs/components/Popover.md +9 -7
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.c6f3142a97caa5cd3c21.js → RTEProseMirror.fc1de55d1266c48d23bd.js} +3 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.8e8117e9ff9cf0df81c7.js → v4.4d9c0699efd774ce2c74.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c2a71fa443dcb2d49dd8.js → v5.4fa224e94f996271ca30.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.78d65c560f25b56d84cb.css +5 -0
- package/dist/storybook/assets/if-defined-CvGEL0gQ.js +0 -1
- package/dist/storybook/assets/iframe-Bsa4H6Fe.css +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.e927095bfd14d91c35b3.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.c6f3142a97caa5cd3c21.js.LICENSE.txt → RTEProseMirror.fc1de55d1266c48d23bd.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.8e8117e9ff9cf0df81c7.js.LICENSE.txt → v4.4d9c0699efd774ce2c74.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c2a71fa443dcb2d49dd8.js.LICENSE.txt → v5.4fa224e94f996271ca30.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as S,x as t}from"./iframe-
|
|
1
|
+
import{g as S,x as t}from"./iframe-BX01Fo1V.js";import{o as f}from"./style-map-Dbe8ACrE.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
|
|
package/dist/storybook/assets/{EmptyState.stories-BSLvm3b3.js → EmptyState.stories-BPXr0JGC.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as u,x as e}from"./iframe-
|
|
1
|
+
import{g as u,x as e}from"./iframe-BX01Fo1V.js";import{o as m}from"./if-defined-BbMdp3t8.js";import{o as h}from"./style-map-Dbe8ACrE.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>
|
package/dist/storybook/assets/{EscaAvatar.stories-CSFvomuS.js → EscaAvatar.stories-DEANJleg.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as f,x as a}from"./iframe-
|
|
1
|
+
import{g as f,x as a}from"./iframe-BX01Fo1V.js";import{o as x}from"./style-map-Dbe8ACrE.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-
|
|
1
|
+
import{x as d}from"./iframe-BX01Fo1V.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-
|
|
1
|
+
import{x as s}from"./iframe-BX01Fo1V.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};
|
package/dist/storybook/assets/{HueRipple.stories-D6oOT5mx.js → HueRipple.stories-D4Tnu6C3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as i}from"./iframe-
|
|
1
|
+
import{x as i}from"./iframe-BX01Fo1V.js";import{b as l}from"./ripple-DQbyyRUw.js";import{B as e}from"./Button-DbgKu4cc.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-
|
|
1
|
+
import{g,x as s}from"./iframe-BX01Fo1V.js";import{o as h}from"./style-map-Dbe8ACrE.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>
|
package/dist/storybook/assets/{IconButton.stories-DvZli4HK.js → IconButton.stories-B4MwUqS9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as p,x as e}from"./iframe-
|
|
1
|
+
import{g as p,x as e}from"./iframe-BX01Fo1V.js";import{o as b}from"./if-defined-BbMdp3t8.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-
|
|
1
|
+
import{g as D,E as h,x as T}from"./iframe-BX01Fo1V.js";import{o as A}from"./style-map-Dbe8ACrE.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>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as S,E as v,x as s}from"./iframe-
|
|
1
|
+
import{g as S,E as v,x as s}from"./iframe-BX01Fo1V.js";import{o as f}from"./if-defined-BbMdp3t8.js";import{o as w}from"./style-map-Dbe8ACrE.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
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>Communicate messages or provide feedback that is not tied to the user's current action or task</li>
|
package/dist/storybook/assets/{OnFindMixin.stories-D23Ao9By.js → OnFindMixin.stories-B7wQ3wAd.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as h,i as v}from"./iframe-
|
|
1
|
+
import{x as h,i as v}from"./iframe-BX01Fo1V.js";import{o as k}from"./onFind-BUzFtt2i.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.
|
package/dist/storybook/assets/{Pagination.stories-xdBz75X-.js → Pagination.stories-CORs2cY3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as m,x as u}from"./iframe-
|
|
1
|
+
import{g as m,x as u}from"./iframe-BX01Fo1V.js";import{o as g}from"./style-map-Dbe8ACrE.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
|
|
1
|
+
import{g as p,x as n}from"./iframe-BX01Fo1V.js";import{o as c}from"./if-defined-BbMdp3t8.js";import{o as d}from"./style-map-Dbe8ACrE.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:g,argTypes:o}=p("btu-popover"),f={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,31 +24,32 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}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:
|
|
27
|
+
`}},actions:{handles:u},controls:{expanded:!0}},args:{...g,position:"bottom",trigger:"click",delay:300,open:!1,inverted:!1},argTypes:{...o,position:{...o.position,control:{type:"select"},options:["top","bottom","left","right"]},trigger:{...o.trigger,control:{type:"select"},options:["click","hover","focus"]},delay:{...o.delay,control:{type:"number"},description:"Show delay in ms (hover trigger only)"},offset:{...o.offset,control:{type:"select"},options:["sm","md","lg","xl"],description:"Gap between trigger and popover (sm=4px, md=8px, lg=12px, xl=16px)"},open:{...o.open,control:{type:"boolean"},description:"Programmatic open/close (reflected)"},inverted:{...o.inverted,control:{type:"boolean"},description:"Invert the panel surface (dark on light pages, light on dark pages)"},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:t=>{const e={};return t.customBg&&(e["--popover-color-background"]=t.customBg),t.customTitleColor&&(e["--popover-color-title"]=t.customTitleColor),t.customContentColor&&(e["--popover-color-content"]=t.customContentColor),t.customRadius&&(e["--popover-border-radius"]=t.customRadius),n`
|
|
28
28
|
<div style="display: flex; justify-content: center; padding: 6rem 2rem;">
|
|
29
|
-
<div style=${
|
|
29
|
+
<div style=${d(e)}>
|
|
30
30
|
<btu-popover
|
|
31
|
-
position="${
|
|
32
|
-
trigger="${
|
|
33
|
-
delay="${
|
|
34
|
-
offset="${
|
|
35
|
-
?no-arrow="${
|
|
36
|
-
?open="${
|
|
31
|
+
position="${t.position}"
|
|
32
|
+
trigger="${t.trigger}"
|
|
33
|
+
delay="${t.delay}"
|
|
34
|
+
offset="${c(t.offset)}"
|
|
35
|
+
?no-arrow="${t.noArrow}"
|
|
36
|
+
?open="${t.open}"
|
|
37
|
+
?inverted="${t.inverted}"
|
|
37
38
|
>
|
|
38
39
|
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">
|
|
39
|
-
${
|
|
40
|
+
${t.trigger==="hover"?"Hover me":t.trigger==="focus"?"Focus me":"Click me"}
|
|
40
41
|
</button>
|
|
41
42
|
<div slot="content">
|
|
42
43
|
<div style="font-weight: 500; margin-bottom: 4px; color: var(--popover-color-title);">Popover Title</div>
|
|
43
44
|
<div style="color: var(--popover-color-content, oklch(var(--btu-theme-gray-900)));">
|
|
44
45
|
This is a popover with rich content.
|
|
45
|
-
${
|
|
46
|
+
${t.trigger==="click"?"Click outside or press Escape to dismiss.":""}
|
|
46
47
|
</div>
|
|
47
48
|
</div>
|
|
48
49
|
</btu-popover>
|
|
49
50
|
</div>
|
|
50
51
|
</div>
|
|
51
|
-
`}},
|
|
52
|
+
`}},r={args:{noArrow:!1,offset:void 0}},i={render:()=>n`
|
|
52
53
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
53
54
|
<btu-popover position="top">
|
|
54
55
|
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Top</button>
|
|
@@ -67,7 +68,7 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
67
68
|
<div slot="content">Popover positioned right of the trigger</div>
|
|
68
69
|
</btu-popover>
|
|
69
70
|
</div>
|
|
70
|
-
`,parameters:{docs:{description:{story:"Popovers support four positions: `top`, `bottom`, `left`, and `right`. Each auto-flips if constrained by the viewport."}}}},
|
|
71
|
+
`,parameters:{docs:{description:{story:"Popovers support four positions: `top`, `bottom`, `left`, and `right`. Each auto-flips if constrained by the viewport."}}}},s={render:()=>n`
|
|
71
72
|
<style>
|
|
72
73
|
.popover-custom-content {
|
|
73
74
|
display: flex;
|
|
@@ -159,7 +160,24 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
159
160
|
</div>
|
|
160
161
|
</btu-popover>
|
|
161
162
|
</div>
|
|
162
|
-
`,parameters:{docs:{description:{story:"Two examples of rich popover content: a confirmation dialog with action buttons (click trigger), and a chart legend with colored series data (hover trigger)."}}}},
|
|
163
|
+
`,parameters:{docs:{description:{story:"Two examples of rich popover content: a confirmation dialog with action buttons (click trigger), and a chart legend with colored series data (hover trigger)."}}}},l={render:()=>n`
|
|
164
|
+
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
165
|
+
<btu-popover position="bottom">
|
|
166
|
+
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">Default surface</button>
|
|
167
|
+
<div slot="content">
|
|
168
|
+
<div style="font-weight: 500; margin-bottom: 4px;">Default</div>
|
|
169
|
+
<div>Light panel — matches the page surface.</div>
|
|
170
|
+
</div>
|
|
171
|
+
</btu-popover>
|
|
172
|
+
<btu-popover position="bottom" inverted>
|
|
173
|
+
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">Inverted surface</button>
|
|
174
|
+
<div slot="content">
|
|
175
|
+
<div style="font-weight: 500; margin-bottom: 4px;">Inverted</div>
|
|
176
|
+
<div>Dark panel on light pages, light panel on dark pages.</div>
|
|
177
|
+
</div>
|
|
178
|
+
</btu-popover>
|
|
179
|
+
</div>
|
|
180
|
+
`,parameters:{docs:{description:{story:"The `inverted` attribute flips the panel surface to the inverse of the page — a dark panel on light pages and a light panel on dark pages — using the mode-flipping black/white tokens. It's opt-in because the panel holds arbitrary rich content that may assume a light surface."}}}},a={render:()=>n`
|
|
163
181
|
<style>
|
|
164
182
|
.custom-popover-trigger {
|
|
165
183
|
display: inline-flex;
|
|
@@ -201,12 +219,12 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
201
219
|
</btu-popover>
|
|
202
220
|
</div>
|
|
203
221
|
</div>
|
|
204
|
-
`,parameters:{docs:{description:{story:"Demonstrates full customization of all CSS custom properties. Set these on a parent element or directly on the component:\n\n- `--popover-color-background` — Background color\n- `--popover-color-title` — Title text color\n- `--popover-color-content` — Content text color\n- `--popover-border-radius` — Border radius"}}}};
|
|
222
|
+
`,parameters:{docs:{description:{story:"Demonstrates full customization of all CSS custom properties. Set these on a parent element or directly on the component:\n\n- `--popover-color-background` — Background color\n- `--popover-color-title` — Title text color\n- `--popover-color-content` — Content text color\n- `--popover-border-radius` — Border radius"}}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
205
223
|
args: {
|
|
206
224
|
noArrow: false,
|
|
207
225
|
offset: undefined
|
|
208
226
|
}
|
|
209
|
-
}`,...
|
|
227
|
+
}`,...r.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
210
228
|
render: () => html\`
|
|
211
229
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
212
230
|
<btu-popover position="top">
|
|
@@ -234,7 +252,7 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
234
252
|
}
|
|
235
253
|
}
|
|
236
254
|
}
|
|
237
|
-
}`,...
|
|
255
|
+
}`,...i.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
238
256
|
render: () => html\`
|
|
239
257
|
<style>
|
|
240
258
|
.popover-custom-content {
|
|
@@ -335,7 +353,33 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
335
353
|
}
|
|
336
354
|
}
|
|
337
355
|
}
|
|
338
|
-
}`,...
|
|
356
|
+
}`,...s.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
357
|
+
render: () => html\`
|
|
358
|
+
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
359
|
+
<btu-popover position="bottom">
|
|
360
|
+
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">Default surface</button>
|
|
361
|
+
<div slot="content">
|
|
362
|
+
<div style="font-weight: 500; margin-bottom: 4px;">Default</div>
|
|
363
|
+
<div>Light panel — matches the page surface.</div>
|
|
364
|
+
</div>
|
|
365
|
+
</btu-popover>
|
|
366
|
+
<btu-popover position="bottom" inverted>
|
|
367
|
+
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">Inverted surface</button>
|
|
368
|
+
<div slot="content">
|
|
369
|
+
<div style="font-weight: 500; margin-bottom: 4px;">Inverted</div>
|
|
370
|
+
<div>Dark panel on light pages, light panel on dark pages.</div>
|
|
371
|
+
</div>
|
|
372
|
+
</btu-popover>
|
|
373
|
+
</div>
|
|
374
|
+
\`,
|
|
375
|
+
parameters: {
|
|
376
|
+
docs: {
|
|
377
|
+
description: {
|
|
378
|
+
story: \`The \\\`inverted\\\` attribute flips the panel surface to the inverse of the page — a dark panel on light pages and a light panel on dark pages — using the mode-flipping black/white tokens. It's opt-in because the panel holds arbitrary rich content that may assume a light surface.\`
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}`,...l.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
339
383
|
render: () => html\`
|
|
340
384
|
<style>
|
|
341
385
|
.custom-popover-trigger {
|
|
@@ -391,4 +435,4 @@ import{g as p,x as l}from"./iframe-BsOwdi_g.js";import{o as a}from"./if-defined-
|
|
|
391
435
|
}
|
|
392
436
|
}
|
|
393
437
|
}
|
|
394
|
-
}`,...
|
|
438
|
+
}`,...a.parameters?.docs?.source}}};const y=["Default","Positions","RichContent","Inverted","AdvancedUsage"];export{a as AdvancedUsage,r as Default,l as Inverted,i as Positions,s as RichContent,y as __namedExportsOrder,f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-BX01Fo1V.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-
|
|
1
|
+
import{x as l,i as v}from"./iframe-BX01Fo1V.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-
|
|
1
|
+
import{x as o}from"./iframe-BX01Fo1V.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>
|
package/dist/storybook/assets/{ScrollShadow.stories-_G3D0pCc.js → ScrollShadow.stories-DxFf0TeI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as a}from"./iframe-
|
|
1
|
+
import{x as a}from"./iframe-BX01Fo1V.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-
|
|
1
|
+
import{g as k,x as c}from"./iframe-BX01Fo1V.js";import{o as s}from"./if-defined-BbMdp3t8.js";import{o as f}from"./style-map-Dbe8ACrE.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-
|
|
1
|
+
import{g as u,x as e}from"./iframe-BX01Fo1V.js";import{o as d}from"./style-map-Dbe8ACrE.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-
|
|
1
|
+
import{g as b,E as i,x as s}from"./iframe-BX01Fo1V.js";import{o as c}from"./style-map-Dbe8ACrE.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>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as u}from"./iframe-
|
|
1
|
+
import{x as u}from"./iframe-BX01Fo1V.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 m=document.getElementById(`${t}-normal-count`),h=document.getElementById(`${t}-throttled-count`);m&&(m.textContent=String(n)),h&&(h.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">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ah as v,ai as x,x as c,i as w}from"./iframe-
|
|
1
|
+
import{ah as v,ai as x,x as c,i as w}from"./iframe-BX01Fo1V.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-BbMdp3t8.js";import{o as k}from"./style-map-Dbe8ACrE.js";import{E as C,R as L}from"./ReadyMixin-B1macwQ1.js";import"./preload-helper-PPVm8Dsz.js";const D={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v},S=(o=D,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"?S(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";const s=this._isVisible?"btu-tooltip-show":"btu-tooltip-hide",r=new CustomEvent(s,{bubbles:!0,composed:!0});this.dispatchEvent(r)}_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
2
|
.tooltip-demo {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -27,6 +27,10 @@ class MyComponent extends TooltipMixin(EventEmitterMixin(ReadyMixin(LitElement))
|
|
|
27
27
|
<my-component tooltip="Hello!" tooltip-position="bottom"></my-component>
|
|
28
28
|
\`\`\`
|
|
29
29
|
|
|
30
|
+
<h3>Appearance</h3>
|
|
31
|
+
|
|
32
|
+
The tooltip surface is inverted by default — a dark chip on light pages and a light chip on dark pages — using the mode-flipping black/white tokens. Recolor a specific tooltip via <code>--tooltip-color-background</code> / <code>--tooltip-color-text</code>.
|
|
33
|
+
|
|
30
34
|
<h3>Accessibility</h3>
|
|
31
35
|
<ul>
|
|
32
36
|
<li><code>role="tooltip"</code> on tooltip element</li>
|
|
@@ -34,7 +38,7 @@ class MyComponent extends TooltipMixin(EventEmitterMixin(ReadyMixin(LitElement))
|
|
|
34
38
|
<li>Shows on <code>focusin</code>, hides on <code>focusout</code> and <code>Escape</code></li>
|
|
35
39
|
<li><code>prefers-reduced-motion: reduce</code> disables slide animation</li>
|
|
36
40
|
</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:"
|
|
41
|
+
`}},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 (default: inverted surface)",table:{category:"css properties",defaultValue:{summary:"var(--btu-theme-black)"}}},customTextColor:{name:"--tooltip-color-text",control:{type:"color"},description:"Text color (default: inverted surface)",table:{category:"css properties",defaultValue:{summary:"var(--btu-theme-white)"}}},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
42
|
<style>
|
|
39
43
|
${f}
|
|
40
44
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as C,x as S}from"./iframe-
|
|
1
|
+
import{g as C,x as S}from"./iframe-BX01Fo1V.js";import{o as E}from"./if-defined-BbMdp3t8.js";import{o as x}from"./style-map-Dbe8ACrE.js";import"./preload-helper-PPVm8Dsz.js";const{events:B,args:U,argTypes:c}=C("btu-upload"),F=e=>{const o={};return e.dropzoneBg&&(o["--upload-dropzone-bg"]=e.dropzoneBg),e.dropzoneBorderColor&&(o["--upload-dropzone-border-color"]=e.dropzoneBorderColor),e.dropzoneBorderRadius&&(o["--upload-dropzone-border-radius"]=e.dropzoneBorderRadius),e.dropzoneHoverBg&&(o["--upload-dropzone-hover-bg"]=e.dropzoneHoverBg),e.dropzoneHoverBorderColor&&(o["--upload-dropzone-hover-border-color"]=e.dropzoneHoverBorderColor),e.dropzoneFocusRingColor&&(o["--upload-dropzone-focus-ring-color"]=e.dropzoneFocusRingColor),e.itemBg&&(o["--upload-item-bg"]=e.itemBg),e.itemBorderColor&&(o["--upload-item-border-color"]=e.itemBorderColor),e.itemActiveBorderColor&&(o["--upload-item-active-border-color"]=e.itemActiveBorderColor),e.itemCompleteBorderColor&&(o["--upload-item-complete-border-color"]=e.itemCompleteBorderColor),e.itemErrorBg&&(o["--upload-item-error-bg"]=e.itemErrorBg),e.itemErrorBorderColor&&(o["--upload-item-error-border-color"]=e.itemErrorBorderColor),o},T={title:"Components/Upload",component:"btu-upload",tags:["autodocs"],parameters:{docs:{subtitle:"btu-upload",description:{component:`
|
|
2
2
|
A file upload component with drop zone and file list.
|
|
3
3
|
|
|
4
4
|
The component is **presentation + file-selection only**. It handles file browsing
|
package/dist/storybook/assets/{UploadItem.stories-KcYrFAxk.js → UploadItem.stories-Cb4ePAYx.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as y,x as c}from"./iframe-
|
|
1
|
+
import{g as y,x as c}from"./iframe-BX01Fo1V.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:f,argTypes:h}=y("btu-upload-item"),e=r=>{const l=`upload-item-${crypto.randomUUID().slice(0,8)}`;return setTimeout(()=>{const m=document.getElementById(l)?.querySelector("btu-upload-item");if(!m)return;const u=new File([""],r.name,{type:r.mimeType??""});Object.defineProperty(u,"size",{value:r.size??0});const p=r.status??"uploading",d={id:crypto.randomUUID().slice(0,8),file:u,symbol:r.symbol},g=p==="pending"?{...d,status:"pending",progress:0}:p==="complete"?{...d,status:"complete",progress:100}:p==="error"?{...d,status:"error",progress:r.progress??0,errorMessage:r.errorMessage??""}:{...d,status:"uploading",progress:r.progress??0};m._configure(g)},50),c`<div id="${l}" style="max-width: 480px;"><btu-upload-item></btu-upload-item></div>`},k={title:"Components/Upload/Upload Item",component:"btu-upload-item",tags:["autodocs"],parameters:{docs:{subtitle:"Individual file row rendered inside btu-upload",description:{component:`
|
|
2
2
|
\`btu-upload-item\` renders a single file's state inside a \`btu-upload\` file list. It is an **internal sub-component** — consumers should not create, query, or modify items directly. All interaction goes through \`btu-upload\` methods (\`setFileProgress\`, \`setFileStatus\`, \`setFileSymbol\`, \`removeFile\`).
|
|
3
3
|
|
|
4
4
|
These stories exist for design documentation and visual QA of each status state in isolation. In practice, items are always created, configured, and destroyed by their parent \`btu-upload\`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as U}from"./blocks-
|
|
1
|
+
import{S as U}from"./blocks-J_f2D33t.js";import{e as X,f as _,E as B,r as j,x as A}from"./iframe-BX01Fo1V.js";import"./preload-helper-PPVm8Dsz.js";const C=()=>new J;class J{}const w=new WeakMap,k=X(class extends _{render(e){return B}update(e,[o]){const t=o!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=o,this.ht=e.options?.host,this.rt(this.ct=e.element)),B}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const o=this.ht??globalThis;let t=w.get(o);t===void 0&&(t=new WeakMap,w.set(o,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?w.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),ee={title:"Welcome",tags:["autodocs","!dev"],parameters:{layout:"fullscreen",controls:{disable:!0},actions:{disable:!0},options:{showPanel:!1},docs:{page:()=>j.createElement("div",{className:"welcome-docs"},j.createElement(U))}}},$=[[13,52,158],[19,183,158],[99,43,176],[95,233,208],[240,67,62],[83,36,148]],d=(e,o)=>e+Math.random()*(o-e),M=e=>e[Math.floor(Math.random()*e.length)];function I(e,o){if(matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=e.getContext("2d"),l=Array.from({length:3},()=>({x:0,y:0,rgb:M($),opacity:0,radius:d(250,350)}));let h=null;function O(){const s=5*devicePixelRatio,n=Object.assign(document.createElement("canvas"),{width:s,height:s}),r=n.getContext("2d");r.fillStyle="#000",r.arc(s/2,s/2,1.6*devicePixelRatio,0,Math.PI*2),r.fill(),h=t.createPattern(n,"repeat")}function R(){const{width:s,height:n}=e.getBoundingClientRect();e.width=s*devicePixelRatio,e.height=n*devicePixelRatio,t.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0),O()}R(),addEventListener("resize",R);const a=o?l[0]:null;a&&(a.rgb=M($),a.radius=300),(function s(){if(!e.isConnected)return;const n=e.width/devicePixelRatio,r=e.height/devicePixelRatio;t.clearRect(0,0,n,r),a&&o&&(o.active?(a.x+=(o.tx-a.x)*.06,a.y+=(o.ty-a.y)*.06,a.opacity+=(.35-a.opacity)*.08):a.opacity+=(0-a.opacity)*.04);for(const i of l){if(i.opacity<=0)continue;const[u,p,b]=i.rgb,c=t.createRadialGradient(i.x,i.y,0,i.x,i.y,i.radius);c.addColorStop(0,`rgba(${u},${p},${b},${i.opacity})`),c.addColorStop(1,`rgba(${u},${p},${b},0)`),t.fillStyle=c,t.fillRect(i.x-i.radius,i.y-i.radius,i.radius*2,i.radius*2)}h&&(t.globalCompositeOperation="destination-in",t.fillStyle=h,t.fillRect(0,0,n,r),t.globalCompositeOperation="source-over"),requestAnimationFrame(s)})();function S(s){if(!e.isConnected)return;const{width:n,height:r}=e.getBoundingClientRect(),i=300,u=m=>m<2?{x:d(.15*n,.85*n),y:m===0?-i:r+i}:{x:m===2?-i:n+i,y:d(.15*r,.85*r)},p=Math.floor(Math.random()*4),b=(p+(Math.random()<.5?2:[1,3][Math.floor(Math.random()*2)]))%4,c=u(p),z=u(b),y=z.x-c.x,x=z.y-c.y,E=Math.hypot(y,x)||1,Y=Math.min(n,r)*d(.15,.35),D=d(1.2,2.2);s.rgb=M($),s.radius=d(250,350);let P=null;const F=d(6e3,7500);(function m(G){if(!e.isConnected)return;P??=G;const f=Math.min((G-P)/F,1),L=.5-.5*Math.cos(f*Math.PI),T=Math.sin(f*D*Math.PI)*Y;s.x=c.x+y*L+-x/E*T,s.y=c.y+x*L+y/E*T,s.opacity=.35*Math.min(f/.2,1)*Math.min((1-f)/.2,1),f<1?requestAnimationFrame(m):s.opacity=0})(performance.now())}(o?l.slice(1):l).forEach((s,n)=>setTimeout(()=>{S(s),setInterval(()=>e.isConnected&&S(s),7500)},1e3+n*2500))}const q="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",N=C(),W=C(),H=C(),v={active:!1,tx:0,ty:0},g={render:()=>(queueMicrotask(()=>{const e=N.value;e&&!e.dataset.init&&(e.dataset.init="1",I(e));const o=W.value;o&&!o.dataset.init&&(o.dataset.init="1",I(o,v));const t=H.value;t&&!t.dataset.init&&(t.dataset.init="1",t.addEventListener("mousemove",l=>{const h=t.getBoundingClientRect();v.tx=l.clientX-h.left,v.ty=l.clientY-h.top,v.active=!0}),t.addEventListener("mouseleave",()=>{v.active=!1}))}),A`
|
|
2
2
|
<div
|
|
3
3
|
${k(H)}
|
|
4
4
|
style="
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as h,x as l}from"./iframe-
|
|
1
|
+
import{g as h,x as l}from"./iframe-BX01Fo1V.js";import{o as m}from"./style-map-Dbe8ACrE.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>
|