@brightspot/ui 6.7.1-pr.405.2026.10.26 → 6.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.
- package/dist/components/radio/Radio.d.ts +112 -0
- package/dist/components/radio/Radio.d.ts.map +1 -0
- package/dist/components/radio/Radio.js +228 -0
- package/dist/components/radio/Radio.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +94 -0
- package/dist/components/radio/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio/RadioGroup.js +249 -0
- package/dist/components/radio/RadioGroup.js.map +1 -0
- package/dist/custom-elements.json +840 -0
- package/dist/storybook/assets/{ActionBar.stories-h4LZnjPi.js → ActionBar.stories-CJBn-mku.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-DrtiuK_q.js → ActionItem.stories-DXzC9C1u.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-vyk5EN2Y.js → AiSparkle.stories-BfjT5jrJ.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-y9T1MrQQ.js → Avatar.stories-D8lnIZaY.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-52-tqOb2.js → AvatarGroup.stories-Cz9oVah0.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-oHJYKBIM.js → Badge.stories-DEpoJpUZ.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-BXYde1iZ.js → Banner.stories--jeU6fKq.js} +1 -1
- package/dist/storybook/assets/{Button-CAMYBU_U.js → Button-2ucj5lUP.js} +1 -1
- package/dist/storybook/assets/{Button.stories-DSDjifLT.js → Button.stories-ndl1RJd7.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-Ch1Tu6Kj.js → ButtonGroup.stories-CerE_0AC.js} +1 -1
- package/dist/storybook/assets/{Card.stories-Nl10FlTb.js → Card.stories-5SxHtU3Y.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-Ds1-srNO.js → Celebrate.stories-COS789GX.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-Bk9fNdcL.js → Checkbox.stories-DuQu38Gv.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-DzhTWHYN.js → CircularProgress.stories-Lf2Ws46Y.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BnFXCiFJ.js → ClipboardMixin.stories-BT5KfLZ_.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-BntnPWZM.js → Color-6BZIO3FS-BNBxjqrS.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-0AeeEVVw.js → Colors.stories-Ck6bXbd0.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-kjjXfgj6.js → CombinedEffects.stories-DLELdAMr.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-Bf5gvpXs.js → ComponentStatesMixin-B6uJL_2c.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BwDY3N5N.js → ComponentStatesMixin.stories-fiyrALkY.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-DHz4lvAk.js → CopyToClipboard.stories-2OfBH19_.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-3QSaZZAP.js → Debounce.stories-C9qo3lIN.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-DvuqJl5p.js → DocsRenderer-LL677BLK-CBVYZYjR.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-B_SUX4kQ.js → Dropdown.stories-15ZDMkRz.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-EL9oDdMl.js → EmptyState.stories-Bjb8hzYj.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-CckR2oJo.js → EscaAvatar.stories-Rc2MSzCX.js} +1 -1
- package/dist/storybook/assets/{Events.stories-BijV4stG.js → Events.stories-BV0vMF2I.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-BEWjqFbE.js → Heading.stories-CEUJqUbQ.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-Z4lM_TPD.js → HueRipple.stories-CwvtcOM_.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-DAMHb2XQ.js → Icon.stories-AB_v-61c.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DQ7WseyR.js → IconButton.stories-BHuHsM3k.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-v9OOfaD3.js → LinearProgress.stories-BNN5SXe3.js} +1 -1
- package/dist/storybook/assets/{Message.stories-0GFTbybz.js → Message.stories-DdLhMXnb.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-DbGsd7N-.js → OnFindMixin.stories-B-5TeBOF.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-W-Fg9qDN.js → Pagination.stories-C9zsOdb2.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CvB5GueC.js → Popover.stories-BiqIwebU.js} +1 -1
- package/dist/storybook/assets/Radio.stories-BmrEdPkm.js +71 -0
- package/dist/storybook/assets/RadioGroup.stories-ChARVXs3.js +221 -0
- package/dist/storybook/assets/{ReadyMixin-Br9owaZV.js → ReadyMixin-BbuzH3uO.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-anjAbAzC.js → RovingTabindexMixin.stories-xm4b394_.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-VHR68JiM.js → Rtc.stories-DdcMaELA.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-D_D-r-JK.js → ScrollShadow.stories-CI67Ougx.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-BBc3Ddok.js → Switch.stories-DOqrRkxc.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-Co1bcV-c.js → Tab.stories-DN8o4cf_.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-uhbYgv3l.js → Tabs.stories-BEowfCcl.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-Lq5D5WmY.js → Throttle.stories-BZ_nsuw1.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-CJ8sPHvm.js → Tooltip.stories-3bar43ZN.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-CLtYPw8U.js → Upload.stories-sAEiabwq.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-CsikX2BV.js → UploadItem.stories-C19JMfmB.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-Dgl9qFjv.js → Welcome.stories-C30jg0r1.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-Dmg4GwlK.js → Widget.stories-9-1XpZNl.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-tGrEodOE.js → WithTooltip-65CFNBJE-PFRy5maL.js} +1 -1
- package/dist/storybook/assets/{blocks-BXvz9yPY.js → blocks-DLjjvsFT.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-D4wnoi50.js → formatter-EIJCOSYU-D39uscG_.js} +1 -1
- package/dist/storybook/assets/if-defined-BwWBCoAU.js +1 -0
- package/dist/storybook/assets/{iframe-BJAXLO__.js → iframe-B9buZjP7.js} +153 -153
- package/dist/storybook/assets/{iframe-DM45AEWn.css → iframe-BzrT7trF.css} +1 -1
- package/dist/storybook/assets/{index-Vq-HO77I.js → index-BdEHup-4.js} +1 -1
- package/dist/storybook/assets/{onFind-DvWzOs0i.js → onFind-CGzSFqNN.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-CYhYy57J.js → onFind.stories-Dq71qO14.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-BGlN20MR.js → onRemove.stories-B1GqLH_U.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-g7Yr3k3S.js → onVisible.stories-BNKxOfLw.js} +1 -1
- package/dist/storybook/assets/{style-map-B-NBwRI-.js → style-map-qCiIYcp5.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CiAkaRF_.js → syntaxhighlighter-ED5Y7EFY-CUM-CaRF.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-radio.d.ts +2 -0
- package/dist/tailwind-plugin-radio.d.ts.map +1 -0
- package/dist/tailwind-plugin-radio.js +264 -0
- package/dist/tailwind-plugin-radio.js.map +1 -0
- package/dist/tailwind-plugin-radio.ts +301 -0
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +2 -0
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +2 -0
- package/dist/util/EventEmitterMixin.d.ts +9 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/docs/components/README.md +2 -0
- package/docs/components/Radio.md +105 -0
- package/docs/components/RadioGroup.md +63 -0
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/AnalyticsWidget.ts +19 -9
- package/src/legacy/tool-ui/src/ContentInputGroup.ts +18 -13
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.e4f881c67b2f3865776b.js → RTEProseMirror.8773fe3756519d83608e.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.94878a2d8b5c7787df69.js → v4.5311585e2e77268a6386.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.990bf181d01e0cbb18e8.css +140 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.de9169aefaf9fc4323ff.js → v5.c96a164f24a2a102bde0.js} +4 -4
- package/dist/storybook/assets/if-defined-BqGMNNFr.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.367effd3850ba2b3ccb2.css +0 -140
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.e4f881c67b2f3865776b.js.LICENSE.txt → RTEProseMirror.8773fe3756519d83608e.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.94878a2d8b5c7787df69.js.LICENSE.txt → v4.5311585e2e77268a6386.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.de9169aefaf9fc4323ff.js.LICENSE.txt → v5.c96a164f24a2a102bde0.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-B9buZjP7.js";import{o as f}from"./style-map-qCiIYcp5.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-EL9oDdMl.js → EmptyState.stories-Bjb8hzYj.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-B9buZjP7.js";import{o as m}from"./if-defined-BwWBCoAU.js";import{o as h}from"./style-map-qCiIYcp5.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-CckR2oJo.js → EscaAvatar.stories-Rc2MSzCX.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-B9buZjP7.js";import{o as x}from"./style-map-qCiIYcp5.js";import"./preload-helper-PPVm8Dsz.js";const{events:w,args:z,argTypes:m}=f("btu-esca-avatar"),g=["idle","wave","search","complete","glow"],y=["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-B9buZjP7.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-B9buZjP7.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-Z4lM_TPD.js → HueRipple.stories-CwvtcOM_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as i}from"./iframe-
|
|
1
|
+
import{x as i}from"./iframe-B9buZjP7.js";import{b as l}from"./ripple-CedcTXtA.js";import{B as e}from"./Button-2ucj5lUP.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 as v,x as s}from"./iframe-
|
|
1
|
+
import{g as v,x as s}from"./iframe-B9buZjP7.js";import{o as x}from"./if-defined-BwWBCoAU.js";import{o as f}from"./style-map-qCiIYcp5.js";import{L as g}from"./LucideDynamicLoader-BuoNL33C.js";import"./preload-helper-PPVm8Dsz.js";const h={facebook:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="100 100 500 500" fill="currentColor"><path d="M600.0,350.0C600.0,211.929 488.071,100.0 350.0,100.0C211.929,100.0 100.0,211.929 100.0,350.0C100.0,467.245 180.715,565.622 289.606,592.638L289.606,426.396L238.054,426.396L238.054,350.0L289.606,350.0L289.606,317.081C289.606,231.989 328.114,192.549 411.654,192.549C427.492,192.549 454.821,195.654 466.001,198.76L466.001,268.014C460.1,267.393 449.852,267.082 437.119,267.082C396.126,267.082 380.287,282.61 380.287,322.982L380.287,350.0L461.946,350.0L447.918,426.396L380.287,426.396L380.287,598.169C504.073,583.218 600.0,477.818 600.0,350.0Z"/></svg>',instagram:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" fill="currentColor"><path d="M295.42,6c-53.2,2.51-89.53,11-121.29,23.48-32.87,12.81-60.73,30-88.45,57.82S40.89,143,28.17,175.92c-12.31,31.83-20.65,68.19-23,121.42S2.3,367.68,2.56,503.46,3.42,656.26,6,709.6c2.54,53.19,11,89.51,23.48,121.28,12.83,32.87,30,60.72,57.83,88.45S143,964.09,176,976.83c31.8,12.29,68.17,20.67,121.39,23s70.35,2.87,206.09,2.61,152.83-.86,206.16-3.39S799.1,988,830.88,975.58c32.87-12.86,60.74-30,88.45-57.84S964.1,862,976.81,829.06c12.32-31.8,20.69-68.17,23-121.35,2.33-53.37,2.88-70.41,2.62-206.17s-.87-152.78-3.4-206.1-11-89.53-23.47-121.32c-12.85-32.87-30-60.7-57.82-88.45S862,40.87,829.07,28.19c-31.82-12.31-68.17-20.7-121.39-23S637.33,2.3,501.54,2.56,348.75,3.4,295.42,6m5.84,903.88c-48.75-2.12-75.22-10.22-92.86-17-23.36-9-40-19.88-57.58-37.29s-28.38-34.11-37.5-57.42c-6.85-17.64-15.1-44.08-17.38-92.83-2.48-52.69-3-68.51-3.29-202s.22-149.29,2.53-202c2.08-48.71,10.23-75.21,17-92.84,9-23.39,19.84-40,37.29-57.57s34.1-28.39,57.43-37.51c17.62-6.88,44.06-15.06,92.79-17.38,52.73-2.5,68.53-3,202-3.29s149.31.21,202.06,2.53c48.71,2.12,75.22,10.19,92.83,17,23.37,9,40,19.81,57.57,37.29s28.4,34.07,37.52,57.45c6.89,17.57,15.07,44,17.37,92.76,2.51,52.73,3.08,68.54,3.32,202s-.23,149.31-2.54,202c-2.13,48.75-10.21,75.23-17,92.89-9,23.35-19.85,40-37.31,57.56s-34.09,28.38-57.43,37.5c-17.6,6.87-44.07,15.07-92.76,17.39-52.73,2.48-68.53,3-202.05,3.29s-149.27-.25-202-2.53m407.6-674.61a60,60,0,1,0,59.88-60.1,60,60,0,0,0-59.88,60.1M245.77,503c.28,141.8,115.44,256.49,257.21,256.22S759.52,643.8,759.25,502,643.79,245.48,502,245.76,245.5,361.22,245.77,503m90.06-.18a166.67,166.67,0,1,1,167,166.34,166.65,166.65,0,0,1-167-166.34"/></svg>',slack:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="73.6 73.6 122.8 122.8" fill="currentColor"><path d="M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9s-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z"/><path d="M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9s-12.9-5.8-12.9-12.9 C105.9,183.5,105.9,151.2,105.9,151.2z"/><path d="M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9s5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z"/><path d="M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9s5.8-12.9,12.9-12.9 C86.5,105.9,118.8,105.9,118.8,105.9z"/><path d="M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z"/><path d="M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9 c7.1,0,12.9,5.8,12.9,12.9V118.8z"/><path d="M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z"/><path d="M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9 c0,7.1-5.8,12.9-12.9,12.9H151.2z"/></svg>',x:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1227" fill="currentColor"><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/></svg>'},{events:y,args:z,argTypes:n}=v("btu-icon"),u=["xs","sm","md","lg","xl"],w=["ai","error","gray","primary","purple","rose","success","teal","warning"],T={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-DQ7WseyR.js → IconButton.stories-BHuHsM3k.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-B9buZjP7.js";import{o as b}from"./if-defined-BwWBCoAU.js";import{L as d}from"./LucideDynamicLoader-BuoNL33C.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-B9buZjP7.js";import{o as A}from"./style-map-qCiIYcp5.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-B9buZjP7.js";import{o as f}from"./if-defined-BwWBCoAU.js";import{o as w}from"./style-map-qCiIYcp5.js";import{L as k}from"./LucideDynamicLoader-BuoNL33C.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-DbGsd7N-.js → OnFindMixin.stories-B-5TeBOF.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-B9buZjP7.js";import{o as k}from"./onFind-CGzSFqNN.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-W-Fg9qDN.js → Pagination.stories-C9zsOdb2.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-B9buZjP7.js";import{o as g}from"./style-map-qCiIYcp5.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 f,x as a}from"./iframe-
|
|
1
|
+
import{g as f,x as a}from"./iframe-B9buZjP7.js";import{o as y}from"./if-defined-BwWBCoAU.js";import{o as x}from"./style-map-qCiIYcp5.js";import"./preload-helper-PPVm8Dsz.js";const{expect:s,waitFor:h}=__STORYBOOK_MODULE_TEST__,{events:k,args:w,argTypes:r}=f("btu-popover"),P={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>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import{g as h,x as m}from"./iframe-B9buZjP7.js";import{o}from"./if-defined-BwWBCoAU.js";import{o as g}from"./style-map-qCiIYcp5.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:S,argTypes:u}=h("btu-radio"),f={customColorPrimary:"--radio-color-primary",customColorBorder:"--radio-color-border",customColorError:"--radio-color-error",customLabelSpacing:"--radio-label-spacing"},v=e=>Object.entries(f).reduce((d,[p,b])=>(e[p]&&(d[b]=e[p]),d),{}),$={title:"Components/Radio",component:"btu-radio",tags:["autodocs"],parameters:{docs:{subtitle:"A single option within a radio group",description:{component:"\nA single radio option. Place several inside a `btu-radio-group`, which owns the shared\n`name`, selection state, and keyboard navigation. See the <strong>Radio Group</strong> stories\nfor the full pattern — the stories here show a single option's visual states.\n "}},actions:{handles:y},controls:{expanded:!0}},args:{...S,label:"Pro",checked:!1},argTypes:{...u,"--radio-color-primary":{table:{disable:!0}},"--radio-color-border":{table:{disable:!0}},"--radio-color-error":{table:{disable:!0}},"--radio-label-spacing":{table:{disable:!0}},"--radio-box-size":{table:{disable:!0}},"--radio-dot-size":{table:{disable:!0}},size:{...u.size,control:{type:"select"},options:["sm","md"]},customColorPrimary:{name:"--radio-color-primary",control:{type:"color"},description:"Fill and border color when selected",table:{category:"CSS Properties"}},customColorBorder:{name:"--radio-color-border",control:{type:"color"},description:"Border color in the unselected state",table:{category:"CSS Properties"}},customColorError:{name:"--radio-color-error",control:{type:"color"},description:"Border and text color in the error state",table:{category:"CSS Properties"}},customLabelSpacing:{name:"--radio-label-spacing",control:{type:"text"},description:"Distance between the radio and the label (default: 0.75rem)",table:{category:"CSS Properties"}}},render:e=>m`
|
|
2
|
+
<btu-radio
|
|
3
|
+
size=${o(e.size)}
|
|
4
|
+
label=${o(e.label)}
|
|
5
|
+
description=${o(e.description)}
|
|
6
|
+
error=${o(e.error)}
|
|
7
|
+
name=${o(e.name)}
|
|
8
|
+
value=${o(e.value)}
|
|
9
|
+
tooltip=${o(e.tooltip)}
|
|
10
|
+
tooltip-position=${o(e.tooltipPosition)}
|
|
11
|
+
.checked=${e.checked??!1}
|
|
12
|
+
?disabled=${e.disabled}
|
|
13
|
+
?invalid=${e.invalid}
|
|
14
|
+
style=${g(v(e))}
|
|
15
|
+
></btu-radio>
|
|
16
|
+
`},r={args:{}},t={args:{checked:!0,label:"Pro"}},a={args:{label:"Pro",description:"For professionals who need more power.",checked:!0}},s={args:{label:"Team (coming soon)",disabled:!0}},i={args:{label:"Current plan",disabled:!0,checked:!0}},n={args:{label:"Accept the terms",invalid:!0,error:"You must choose an option to continue."}},l={args:{label:"Pro",tooltip:"Includes priority support and higher limits.",tooltipPosition:"right"},parameters:{docs:{description:{story:"Hover or focus the option to reveal a tooltip. Provided by `TooltipMixin` (`tooltip`, `tooltip-position`, …)."}}}},c={render:()=>m`
|
|
17
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
18
|
+
<btu-radio size="sm" label="Small (default)" checked></btu-radio>
|
|
19
|
+
<btu-radio size="md" label="Medium" checked></btu-radio>
|
|
20
|
+
</div>
|
|
21
|
+
`};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
22
|
+
args: {}
|
|
23
|
+
}`,...r.parameters?.docs?.source}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
|
|
24
|
+
args: {
|
|
25
|
+
checked: true,
|
|
26
|
+
label: 'Pro'
|
|
27
|
+
}
|
|
28
|
+
}`,...t.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
29
|
+
args: {
|
|
30
|
+
label: 'Pro',
|
|
31
|
+
description: 'For professionals who need more power.',
|
|
32
|
+
checked: true
|
|
33
|
+
}
|
|
34
|
+
}`,...a.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
35
|
+
args: {
|
|
36
|
+
label: 'Team (coming soon)',
|
|
37
|
+
disabled: true
|
|
38
|
+
}
|
|
39
|
+
}`,...s.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
40
|
+
args: {
|
|
41
|
+
label: 'Current plan',
|
|
42
|
+
disabled: true,
|
|
43
|
+
checked: true
|
|
44
|
+
}
|
|
45
|
+
}`,...i.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
46
|
+
args: {
|
|
47
|
+
label: 'Accept the terms',
|
|
48
|
+
invalid: true,
|
|
49
|
+
error: 'You must choose an option to continue.'
|
|
50
|
+
}
|
|
51
|
+
}`,...n.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
52
|
+
args: {
|
|
53
|
+
label: 'Pro',
|
|
54
|
+
tooltip: 'Includes priority support and higher limits.',
|
|
55
|
+
tooltipPosition: 'right'
|
|
56
|
+
},
|
|
57
|
+
parameters: {
|
|
58
|
+
docs: {
|
|
59
|
+
description: {
|
|
60
|
+
story: 'Hover or focus the option to reveal a tooltip. Provided by \`TooltipMixin\` (\`tooltip\`, \`tooltip-position\`, …).'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}`,...l.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
65
|
+
render: () => html\`
|
|
66
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
67
|
+
<btu-radio size="sm" label="Small (default)" checked></btu-radio>
|
|
68
|
+
<btu-radio size="md" label="Medium" checked></btu-radio>
|
|
69
|
+
</div>
|
|
70
|
+
\`
|
|
71
|
+
}`,...c.parameters?.docs?.source}}};const z=["Default","Checked","WithDescription","Disabled","DisabledChecked","InvalidWithError","WithTooltip","Sizes"];export{t as Checked,r as Default,s as Disabled,i as DisabledChecked,n as InvalidWithError,c as Sizes,a as WithDescription,l as WithTooltip,z as __namedExportsOrder,$ as default};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import{g as w,x as n}from"./iframe-B9buZjP7.js";import{o as l}from"./if-defined-BwWBCoAU.js";import{o as x}from"./style-map-qCiIYcp5.js";import"./preload-helper-PPVm8Dsz.js";const{expect:o,userEvent:h,waitFor:i}=__STORYBOOK_MODULE_TEST__,{events:S,args:q,argTypes:f}=w("btu-radio-group"),B={customColorPrimary:"--radio-color-primary",customColorBorder:"--radio-color-border",customLabelSpacing:"--radio-label-spacing"},k=e=>Object.entries(B).reduce((r,[t,a])=>(e[t]&&(r[a]=e[t]),r),{}),T={title:"Components/Radio Group",component:"btu-radio-group",tags:["autodocs"],parameters:{docs:{subtitle:"A set of mutually exclusive options",description:{component:`
|
|
2
|
+
<h3>When to use:</h3>
|
|
3
|
+
<ul>
|
|
4
|
+
<li>For selecting exactly one option from a small, visible set</li>
|
|
5
|
+
<li>In forms, settings, and filters where the choices should all be shown</li>
|
|
6
|
+
</ul>
|
|
7
|
+
|
|
8
|
+
<h3>Keyboard navigation (WAI-ARIA radio group):</h3>
|
|
9
|
+
<ul>
|
|
10
|
+
<li><strong>Arrow keys</strong> — move focus and select in one step (Down/Right or Up/Left, following <code>orientation</code>)</li>
|
|
11
|
+
<li><strong>Home / End</strong> — jump to the first / last option</li>
|
|
12
|
+
<li><strong>Tab</strong> — enter and exit the group (a single roving tabstop)</li>
|
|
13
|
+
</ul>
|
|
14
|
+
`}},actions:{handles:S},controls:{expanded:!0}},args:{...q,name:"plan",value:"pro",orientation:"vertical",size:"sm"},argTypes:{...f,"--radio-color-primary":{table:{disable:!0}},"--radio-color-border":{table:{disable:!0}},"--radio-label-spacing":{table:{disable:!0}},orientation:{...f.orientation,control:{type:"select"},options:["vertical","horizontal"]},size:{...f.size,control:{type:"select"},options:["sm","md"]},customColorPrimary:{name:"--radio-color-primary",control:{type:"color"},description:"Fill and border color when an option is selected",table:{category:"CSS Properties"}},customColorBorder:{name:"--radio-color-border",control:{type:"color"},description:"Border color in the unselected state",table:{category:"CSS Properties"}},customLabelSpacing:{name:"--radio-label-spacing",control:{type:"text"},description:"Distance between an option control and its label (default: 0.75rem)",table:{category:"CSS Properties"}}},render:e=>n`
|
|
15
|
+
<form>
|
|
16
|
+
<btu-radio-group
|
|
17
|
+
name=${l(e.name)}
|
|
18
|
+
value=${l(e.value)}
|
|
19
|
+
orientation=${l(e.orientation)}
|
|
20
|
+
size=${l(e.size)}
|
|
21
|
+
?required=${e.required}
|
|
22
|
+
?disabled=${e.disabled}
|
|
23
|
+
style=${x(k(e))}
|
|
24
|
+
>
|
|
25
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
26
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
27
|
+
<btu-radio value="team" label="Team"></btu-radio>
|
|
28
|
+
</btu-radio-group>
|
|
29
|
+
</form>
|
|
30
|
+
`},u={},d={render:()=>n`
|
|
31
|
+
<btu-radio-group name="plan-desc" value="pro">
|
|
32
|
+
<btu-radio value="free" label="Free" description="For personal projects and evaluation."></btu-radio>
|
|
33
|
+
<btu-radio value="pro" label="Pro" description="For professionals who need more power."></btu-radio>
|
|
34
|
+
<btu-radio value="team" label="Team" description="Best for growing teams and collaboration."></btu-radio>
|
|
35
|
+
</btu-radio-group>
|
|
36
|
+
`},p={args:{orientation:"horizontal"}},c={render:()=>n`
|
|
37
|
+
<btu-radio-group name="plan-disabled-option" value="free">
|
|
38
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
39
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
40
|
+
<btu-radio value="team" label="Team (coming soon)" disabled></btu-radio>
|
|
41
|
+
</btu-radio-group>
|
|
42
|
+
`,play:async({canvasElement:e,step:r})=>{const t=e.querySelector("btu-radio-group"),a=Array.from(e.querySelectorAll(".btu-radio-input"));await r("the selected option is the sole tabstop",async()=>{await i(()=>o(a[0].getAttribute("tabindex")).toBe("0")),o(a[1].getAttribute("tabindex")).toBe("-1")}),await r("ArrowDown moves focus to the next option and selects it",async()=>{a[0].focus(),await h.keyboard("{ArrowDown}"),await i(()=>o(t.value).toBe("pro")),o(a[1].checked).toBe(!0)}),await r("the disabled option is skipped — ArrowDown wraps back to the first",async()=>{await h.keyboard("{ArrowDown}"),await i(()=>o(t.value).toBe("free")),o(a[2].checked).toBe(!1)})},parameters:{docs:{description:{story:"A single option can be disabled; it is skipped during keyboard navigation."}}}},b={args:{disabled:!0},parameters:{docs:{description:{story:"Setting `disabled` on the group disables every option."}}}},m={render:()=>n`
|
|
43
|
+
<div style="display: flex; gap: 3rem;">
|
|
44
|
+
<btu-radio-group name="plan-sm" value="pro" size="sm">
|
|
45
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
46
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
47
|
+
</btu-radio-group>
|
|
48
|
+
<btu-radio-group name="plan-md" value="pro" size="md">
|
|
49
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
50
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
51
|
+
</btu-radio-group>
|
|
52
|
+
</div>
|
|
53
|
+
`},g={args:{name:"plan-required",value:"",required:!0},play:async({canvasElement:e,step:r})=>{const t=e.querySelector("form"),a=e.querySelector("btu-radio-group"),s=Array.from(e.querySelectorAll(".btu-radio-input"));await r("with nothing selected, the form is invalid and submits no value",async()=>{await i(()=>o(s.every(y=>y.required)).toBe(!0)),o(t.checkValidity()).toBe(!1),o(new FormData(t).get("plan-required")).toBeNull()}),await r("once an option is selected, the form validates and submits its value",async()=>{s[1].focus(),await h.click(s[1]),await i(()=>o(a.value).toBe("pro")),o(t.checkValidity()).toBe(!0),o(new FormData(t).get("plan-required")).toBe("pro")}),await r("reset to the unselected state",async()=>{a.value="",await i(()=>o(s.every(y=>!y.checked)).toBe(!0))})},parameters:{docs:{description:{story:"`required` blocks form submission until an option is selected, mirroring a native required radio set."}}}},v={render:()=>n`
|
|
54
|
+
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
|
|
55
|
+
<btu-radio-group
|
|
56
|
+
name="plan-events"
|
|
57
|
+
value="free"
|
|
58
|
+
@btu-radio-group-change=${e=>{const r=e.target.parentElement?.querySelector("#radio-group-event-output");r&&(r.textContent=`value: ${e.detail.value}`)}}
|
|
59
|
+
>
|
|
60
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
61
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
62
|
+
<btu-radio value="team" label="Team"></btu-radio>
|
|
63
|
+
</btu-radio-group>
|
|
64
|
+
<span
|
|
65
|
+
id="radio-group-event-output"
|
|
66
|
+
style="font-size: 0.75rem; font-family: monospace; color: oklch(var(--btu-theme-gray-500));"
|
|
67
|
+
>—</span
|
|
68
|
+
>
|
|
69
|
+
</div>
|
|
70
|
+
`,parameters:{docs:{description:{story:"Demonstrates the `btu-radio-group-change` event, which provides `{ value: string }` in its detail."}}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:"{}",...u.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
71
|
+
render: () => html\`
|
|
72
|
+
<btu-radio-group name="plan-desc" value="pro">
|
|
73
|
+
<btu-radio value="free" label="Free" description="For personal projects and evaluation."></btu-radio>
|
|
74
|
+
<btu-radio value="pro" label="Pro" description="For professionals who need more power."></btu-radio>
|
|
75
|
+
<btu-radio value="team" label="Team" description="Best for growing teams and collaboration."></btu-radio>
|
|
76
|
+
</btu-radio-group>
|
|
77
|
+
\`
|
|
78
|
+
}`,...d.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
79
|
+
args: {
|
|
80
|
+
orientation: 'horizontal'
|
|
81
|
+
}
|
|
82
|
+
}`,...p.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
83
|
+
render: () => html\`
|
|
84
|
+
<btu-radio-group name="plan-disabled-option" value="free">
|
|
85
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
86
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
87
|
+
<btu-radio value="team" label="Team (coming soon)" disabled></btu-radio>
|
|
88
|
+
</btu-radio-group>
|
|
89
|
+
\`,
|
|
90
|
+
play: async ({
|
|
91
|
+
canvasElement,
|
|
92
|
+
step
|
|
93
|
+
}) => {
|
|
94
|
+
const group = canvasElement.querySelector('btu-radio-group') as HTMLElement & {
|
|
95
|
+
value?: string;
|
|
96
|
+
};
|
|
97
|
+
const inputs = Array.from(canvasElement.querySelectorAll<HTMLInputElement>('.btu-radio-input'));
|
|
98
|
+
await step('the selected option is the sole tabstop', async () => {
|
|
99
|
+
await waitFor(() => expect(inputs[0].getAttribute('tabindex')).toBe('0'));
|
|
100
|
+
expect(inputs[1].getAttribute('tabindex')).toBe('-1');
|
|
101
|
+
});
|
|
102
|
+
await step('ArrowDown moves focus to the next option and selects it', async () => {
|
|
103
|
+
inputs[0].focus();
|
|
104
|
+
await userEvent.keyboard('{ArrowDown}');
|
|
105
|
+
await waitFor(() => expect(group.value).toBe('pro'));
|
|
106
|
+
expect(inputs[1].checked).toBe(true);
|
|
107
|
+
});
|
|
108
|
+
await step('the disabled option is skipped — ArrowDown wraps back to the first', async () => {
|
|
109
|
+
await userEvent.keyboard('{ArrowDown}');
|
|
110
|
+
await waitFor(() => expect(group.value).toBe('free'));
|
|
111
|
+
expect(inputs[2].checked).toBe(false);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
parameters: {
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
story: 'A single option can be disabled; it is skipped during keyboard navigation.'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}`,...c.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
|
|
122
|
+
args: {
|
|
123
|
+
disabled: true
|
|
124
|
+
},
|
|
125
|
+
parameters: {
|
|
126
|
+
docs: {
|
|
127
|
+
description: {
|
|
128
|
+
story: 'Setting \`disabled\` on the group disables every option.'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}`,...b.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
133
|
+
render: () => html\`
|
|
134
|
+
<div style="display: flex; gap: 3rem;">
|
|
135
|
+
<btu-radio-group name="plan-sm" value="pro" size="sm">
|
|
136
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
137
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
138
|
+
</btu-radio-group>
|
|
139
|
+
<btu-radio-group name="plan-md" value="pro" size="md">
|
|
140
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
141
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
142
|
+
</btu-radio-group>
|
|
143
|
+
</div>
|
|
144
|
+
\`
|
|
145
|
+
}`,...m.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
146
|
+
// Inherit the meta render so the Controls (value, required, …) drive this story.
|
|
147
|
+
// Start with an empty value (not undefined — Storybook ignores undefined overrides
|
|
148
|
+
// and would fall back to the meta default) so nothing is selected out of the box.
|
|
149
|
+
args: {
|
|
150
|
+
name: 'plan-required',
|
|
151
|
+
value: '',
|
|
152
|
+
required: true
|
|
153
|
+
},
|
|
154
|
+
play: async ({
|
|
155
|
+
canvasElement,
|
|
156
|
+
step
|
|
157
|
+
}) => {
|
|
158
|
+
const form = canvasElement.querySelector('form') as HTMLFormElement;
|
|
159
|
+
const group = canvasElement.querySelector('btu-radio-group') as HTMLElement & {
|
|
160
|
+
value?: string;
|
|
161
|
+
};
|
|
162
|
+
const inputs = Array.from(canvasElement.querySelectorAll<HTMLInputElement>('.btu-radio-input'));
|
|
163
|
+
await step('with nothing selected, the form is invalid and submits no value', async () => {
|
|
164
|
+
await waitFor(() => expect(inputs.every(i => i.required)).toBe(true));
|
|
165
|
+
expect(form.checkValidity()).toBe(false);
|
|
166
|
+
expect(new FormData(form).get('plan-required')).toBeNull();
|
|
167
|
+
});
|
|
168
|
+
await step('once an option is selected, the form validates and submits its value', async () => {
|
|
169
|
+
inputs[1].focus();
|
|
170
|
+
await userEvent.click(inputs[1]);
|
|
171
|
+
await waitFor(() => expect(group.value).toBe('pro'));
|
|
172
|
+
expect(form.checkValidity()).toBe(true);
|
|
173
|
+
expect(new FormData(form).get('plan-required')).toBe('pro');
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// Leave the story in its unselected starting state so it stays a clean
|
|
177
|
+
// surface for manually exercising the required constraint.
|
|
178
|
+
await step('reset to the unselected state', async () => {
|
|
179
|
+
group.value = '';
|
|
180
|
+
await waitFor(() => expect(inputs.every(i => !i.checked)).toBe(true));
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
parameters: {
|
|
184
|
+
docs: {
|
|
185
|
+
description: {
|
|
186
|
+
story: '\`required\` blocks form submission until an option is selected, mirroring a native required radio set.'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}`,...g.parameters?.docs?.source}}};v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
191
|
+
render: () => html\`
|
|
192
|
+
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
|
|
193
|
+
<btu-radio-group
|
|
194
|
+
name="plan-events"
|
|
195
|
+
value="free"
|
|
196
|
+
@btu-radio-group-change=\${(e: CustomEvent<{
|
|
197
|
+
value: string;
|
|
198
|
+
}>) => {
|
|
199
|
+
const output = (e.target as HTMLElement).parentElement?.querySelector('#radio-group-event-output');
|
|
200
|
+
if (output) output.textContent = \`value: \${e.detail.value}\`;
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
<btu-radio value="free" label="Free"></btu-radio>
|
|
204
|
+
<btu-radio value="pro" label="Pro"></btu-radio>
|
|
205
|
+
<btu-radio value="team" label="Team"></btu-radio>
|
|
206
|
+
</btu-radio-group>
|
|
207
|
+
<span
|
|
208
|
+
id="radio-group-event-output"
|
|
209
|
+
style="font-size: 0.75rem; font-family: monospace; color: oklch(var(--btu-theme-gray-500));"
|
|
210
|
+
>—</span
|
|
211
|
+
>
|
|
212
|
+
</div>
|
|
213
|
+
\`,
|
|
214
|
+
parameters: {
|
|
215
|
+
docs: {
|
|
216
|
+
description: {
|
|
217
|
+
story: 'Demonstrates the \`btu-radio-group-change\` event, which provides \`{ value: string }\` in its detail.'
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}`,...v.parameters?.docs?.source}}};const z=["Default","WithDescriptions","Horizontal","DisabledOption","DisabledGroup","Sizes","Required","Events"];export{u as Default,b as DisabledGroup,c as DisabledOption,v as Events,p as Horizontal,g as Required,m as Sizes,d as WithDescriptions,z as __namedExportsOrder,T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-B9buZjP7.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-B9buZjP7.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-B9buZjP7.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-D_D-r-JK.js → ScrollShadow.stories-CI67Ougx.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as a}from"./iframe-
|
|
1
|
+
import{x as a}from"./iframe-B9buZjP7.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-B9buZjP7.js";import{o as s}from"./if-defined-BwWBCoAU.js";import{o as f}from"./style-map-qCiIYcp5.js";import{L as w}from"./LucideDynamicLoader-BuoNL33C.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-B9buZjP7.js";import{o as d}from"./style-map-qCiIYcp5.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-B9buZjP7.js";import{o as c}from"./style-map-qCiIYcp5.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-B9buZjP7.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-B9buZjP7.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-BwWBCoAU.js";import{o as k}from"./style-map-qCiIYcp5.js";import{E as C,R as L}from"./ReadyMixin-BbuzH3uO.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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as C,x as S}from"./iframe-
|
|
1
|
+
import{g as C,x as S}from"./iframe-B9buZjP7.js";import{o as E}from"./if-defined-BwWBCoAU.js";import{o as x}from"./style-map-qCiIYcp5.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-CsikX2BV.js → UploadItem.stories-C19JMfmB.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-B9buZjP7.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\`.
|