@brightspot/ui 5.0.3-toggleable-fix.0 → 5.1.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/button-group/ButtonGroup.d.ts +21 -6
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.js +37 -20
- package/dist/components/button-group/ButtonGroup.js.map +1 -1
- package/dist/components/card/Card.css +7 -0
- package/dist/components/card/Card.d.ts +244 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +512 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/circular-progress/CircularProgress.js +2 -2
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownItem.js +3 -4
- package/dist/components/dropdown/DropdownItem.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +11 -2
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.js +19 -8
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +7 -4
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/linear-progress/LinearProgress.js +1 -1
- package/dist/components/tabs/Tab.js +1 -1
- package/dist/components/tabs/Tab.js.map +1 -1
- package/dist/components/upload/UploadItem.js +1 -1
- package/dist/components/upload/UploadItem.js.map +1 -1
- package/dist/components/widget/Widget.css +1 -1
- package/dist/components/widget/Widget.d.ts +11 -2
- package/dist/components/widget/Widget.d.ts.map +1 -1
- package/dist/components/widget/Widget.js +22 -11
- package/dist/components/widget/Widget.js.map +1 -1
- package/dist/custom-elements.json +2576 -2080
- package/dist/storybook/assets/{ActionBar.stories-CTrEOJBH.js → ActionBar.stories-D9ok2eVg.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-Cm3zQeMa.js → ActionItem.stories-DjPfYpgA.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-DSltfj-_.js → Avatar.stories-Di3s5wxK.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-BjL-l4VH.js → AvatarGroup.stories-CT7lYX_U.js} +5 -5
- package/dist/storybook/assets/{Badge.stories-DLNO3rOl.js → Badge.stories-9unZqfhH.js} +1 -1
- package/dist/storybook/assets/{Button-TUtCVpwY.js → Button-DuuAvVjP.js} +1 -1
- package/dist/storybook/assets/{Button.stories-3HjoUoaq.js → Button.stories-KDBmJ9xt.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-GF1UFxbr.js → ButtonGroup.stories-BeWYMkDy.js} +48 -48
- package/dist/storybook/assets/Card.stories-BNMJ-H5I.js +556 -0
- package/dist/storybook/assets/{Celebrate.stories-KtFU9NEQ.js → Celebrate.stories-Cue8O4hb.js} +7 -7
- package/dist/storybook/assets/{Checkbox.stories-CDg2caKU.js → Checkbox.stories-DLe4npId.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-C0OdRoxU.js → CircularProgress.stories-BHB2K82M.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-B6gIxMuH.js → ClipboardMixin.stories-mU-JGoHp.js} +2 -2
- package/dist/storybook/assets/{Color-6BZIO3FS-DDAuf4ms.js → Color-6BZIO3FS-D3GAvUXG.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-tJVgPDrl.js → Colors.stories-a83X2cLQ.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-BwrWmInr.js → CombinedEffects.stories-sLTopxBQ.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-B9_GeVBN.js → ComponentStatesMixin-CJ9pmXHc.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BAn1JPCN.js → ComponentStatesMixin.stories-DSkFzAxR.js} +3 -3
- package/dist/storybook/assets/{CopyToClipboard.stories-YgaScv3O.js → CopyToClipboard.stories-DqMxtd4b.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-y-toLkyr.js → Debounce.stories-DV30whKw.js} +3 -3
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-BUwAiHkt.js → DocsRenderer-LL677BLK-DmVtYsJx.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-DAVkpuM5.js → Dropdown.stories-sCz8_Hkw.js} +3 -3
- package/dist/storybook/assets/{EmptyState.stories-Buexv2C4.js → EmptyState.stories-kBKfr87C.js} +15 -15
- package/dist/storybook/assets/{Events.stories-SjSVTFwA.js → Events.stories-BXdHEFJR.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-F7pp5AO4.js → Heading.stories-B2XJMBD8.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-Dt-QniLc.js → HueRipple.stories-BfzsAQYM.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-Cxknci9d.js → Icon.stories--pcHe1x-.js} +7 -7
- package/dist/storybook/assets/{IconButton.stories-C7nbDmmd.js → IconButton.stories-dbXfrgH3.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DgP2rsiS.js → LinearProgress.stories-CApOBX0x.js} +1 -1
- package/dist/storybook/assets/OnFindMixin.stories-df6ckqw3.js +300 -0
- package/dist/storybook/assets/{Pagination.stories-DbLKeykx.js → Pagination.stories-_MiDRipW.js} +3 -3
- package/dist/storybook/assets/{Popover.stories-CbmWs7x-.js → Popover.stories-9hVZFeMx.js} +18 -18
- package/dist/storybook/assets/{ReadyMixin-BSMJuM5x.js → ReadyMixin-HHwtCrVi.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-DPojZp67.js → RovingTabindexMixin.stories-B6MPGbVh.js} +6 -6
- package/dist/storybook/assets/{Rtc.stories-BF7lM0fa.js → Rtc.stories-D3tZOSkM.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-DwVglPfj.js → ScrollShadow.stories-B1dTcJR4.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-DjjlIvXU.js → Switch.stories-Bp-Guy3z.js} +5 -5
- package/dist/storybook/assets/{Tab.stories-zUdDTEwX.js → Tab.stories-Caxi7G_1.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-yWCAVVnG.js → Tabs.stories-g5Nb7YDi.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BrcbOwZL.js → Throttle.stories-BzWv-mzN.js} +5 -5
- package/dist/storybook/assets/{Tooltip.stories-B4sykiPz.js → Tooltip.stories-BlaTc14X.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-DHE43_Zz.js → Upload.stories-a9edmUmW.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-jqjcXP_N.js → UploadItem.stories-BOIu5j_i.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-C3rGMIU7.js → Welcome.stories-D33npbIl.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-D7rHrfAr.js → Widget.stories-D0vHPAyP.js} +12 -12
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-CYrPgwaa.js → WithTooltip-65CFNBJE-WOhnQufs.js} +1 -1
- package/dist/storybook/assets/{blocks-D8JszFZh.js → blocks-B17JEOI8.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-CGZPdVNG.js → formatter-EIJCOSYU-QKmiwKu7.js} +1 -1
- package/dist/storybook/assets/if-defined-0srVwUDm.js +1 -0
- package/dist/storybook/assets/iframe-BqpRijx3.js +1104 -0
- package/dist/storybook/assets/iframe-DfU9RLLj.css +1 -0
- package/dist/storybook/assets/{index-BZyp3DsT.js → index-CpksO7cK.js} +1 -1
- package/dist/storybook/assets/onFind-C_VPLxg8.js +1 -0
- package/dist/storybook/assets/{onFind.stories-BvaTMiWN.js → onFind.stories-BuZMC3tk.js} +38 -38
- package/dist/storybook/assets/{onRemove.stories-BPSyS2GE.js → onRemove.stories-HDkMhdmO.js} +3 -3
- package/dist/storybook/assets/{onVisible.stories-1lKUeGbt.js → onVisible.stories-CRCllRfN.js} +1 -1
- package/dist/storybook/assets/{style-map-ADugLljH.js → style-map-DukvFNCc.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CBLos5mJ.js → syntaxhighlighter-ED5Y7EFY-BUo_WYvV.js} +1 -1
- package/dist/storybook/iframe.html +48 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-button-group.js +43 -44
- package/dist/tailwind-plugin-button-group.js.map +1 -1
- package/dist/tailwind-plugin-button-group.ts +43 -43
- package/dist/tailwind-plugin-button.js +22 -2
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +22 -2
- package/dist/tailwind-plugin-card.d.ts +2 -0
- package/dist/tailwind-plugin-card.d.ts.map +1 -0
- package/dist/tailwind-plugin-card.js +438 -0
- package/dist/tailwind-plugin-card.js.map +1 -0
- package/dist/tailwind-plugin-card.ts +515 -0
- package/dist/tailwind-plugin-dropdown.js +6 -2
- package/dist/tailwind-plugin-dropdown.js.map +1 -1
- package/dist/tailwind-plugin-dropdown.ts +6 -2
- package/dist/tailwind-plugin-pagination.js +12 -8
- package/dist/tailwind-plugin-pagination.js.map +1 -1
- package/dist/tailwind-plugin-pagination.ts +12 -8
- package/dist/tailwind-plugin-upload.js +3 -2
- package/dist/tailwind-plugin-upload.js.map +1 -1
- package/dist/tailwind-plugin-upload.ts +3 -2
- package/dist/tailwind.config.d.ts +1 -4
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +76 -6
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +76 -6
- package/dist/util/EventEmitterMixin.d.ts +1 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/OnFindMixin.d.ts +55 -0
- package/dist/util/OnFindMixin.d.ts.map +1 -0
- package/dist/util/OnFindMixin.js +70 -0
- package/dist/util/OnFindMixin.js.map +1 -0
- package/dist/util/onFind.d.ts +4 -2
- package/dist/util/onFind.d.ts.map +1 -1
- package/dist/util/onFind.js +12 -0
- package/dist/util/onFind.js.map +1 -1
- package/docs/components/ButtonGroup.md +22 -15
- package/docs/components/Card.md +83 -0
- package/docs/components/EmptyState.md +10 -6
- package/docs/components/README.md +1 -0
- package/docs/components/Widget.md +18 -14
- package/package.json +4 -3
- package/src/legacy/tool-ui/src/AIInline.css +2 -2
- package/src/legacy/tool-ui/src/Admin.css +2 -2
- package/src/legacy/tool-ui/src/Base.css +1 -1
- package/src/legacy/tool-ui/src/BulkUpload.css +1 -1
- package/src/legacy/tool-ui/src/CIGCluster.css +1 -1
- package/src/legacy/tool-ui/src/Card.css +1 -1
- package/src/legacy/tool-ui/src/CodeMirror.css +4 -4
- package/src/legacy/tool-ui/src/ColorInputSpectrum.css +2 -2
- package/src/legacy/tool-ui/src/ComboInput.css +3 -3
- package/src/legacy/tool-ui/src/Compat.css +6 -4
- package/src/legacy/tool-ui/src/ContentEdit.css +12 -12
- package/src/legacy/tool-ui/src/ContentEditDrawer.css +6 -6
- package/src/legacy/tool-ui/src/ContentInputGroup.css +1 -1
- package/src/legacy/tool-ui/src/ContentReporting.css +2 -2
- package/src/legacy/tool-ui/src/ContentSelector.css +5 -5
- package/src/legacy/tool-ui/src/ContentSummary.css +1 -1
- package/src/legacy/tool-ui/src/ContentTemplatesWidget.css +1 -1
- package/src/legacy/tool-ui/src/ContentTools.css +1 -1
- package/src/legacy/tool-ui/src/Conversation.css +2 -2
- package/src/legacy/tool-ui/src/Crosslinker.css +3 -3
- package/src/legacy/tool-ui/src/DashboardWidget.css +1 -1
- package/src/legacy/tool-ui/src/Dialog.css +4 -2
- package/src/legacy/tool-ui/src/Diff.css +1 -1
- package/src/legacy/tool-ui/src/Dropdown.css +2 -2
- package/src/legacy/tool-ui/src/Enhancement.css +1 -1
- package/src/legacy/tool-ui/src/FileInput.css +2 -2
- package/src/legacy/tool-ui/src/FormFilter.css +3 -3
- package/src/legacy/tool-ui/src/FullscreenView.css +4 -4
- package/src/legacy/tool-ui/src/Guide.css +6 -6
- package/src/legacy/tool-ui/src/Hierarchy.css +4 -4
- package/src/legacy/tool-ui/src/ImageEditor.css +13 -13
- package/src/legacy/tool-ui/src/LinkCarousel.css +1 -1
- package/src/legacy/tool-ui/src/LiveBlog.css +2 -2
- package/src/legacy/tool-ui/src/LocationMap.css +1 -1
- package/src/legacy/tool-ui/src/MailPublishing.css +1 -1
- package/src/legacy/tool-ui/src/MenuView.css +4 -4
- package/src/legacy/tool-ui/src/Message.css +1 -1
- package/src/legacy/tool-ui/src/Page.css +35 -16
- package/src/legacy/tool-ui/src/Popup.css +8 -3
- package/src/legacy/tool-ui/src/ProseMirror.css +1 -1
- package/src/legacy/tool-ui/src/ProseMirrorContainer.css +1 -1
- package/src/legacy/tool-ui/src/ProseMirrorEnhancementMenu.css +2 -2
- package/src/legacy/tool-ui/src/ProseMirrorFindReplace.css +2 -2
- package/src/legacy/tool-ui/src/QueryField.css +1 -1
- package/src/legacy/tool-ui/src/RepeatableContentInputGroup.css +1 -1
- package/src/legacy/tool-ui/src/RepeatableContentSelector.css +1 -1
- package/src/legacy/tool-ui/src/RichText.css +1 -1
- package/src/legacy/tool-ui/src/SearchFields.css +3 -2
- package/src/legacy/tool-ui/src/SearchResult.css +3 -3
- package/src/legacy/tool-ui/src/SearchWidget.css +1 -1
- package/src/legacy/tool-ui/src/SearchWidget.ts +10 -1
- package/src/legacy/tool-ui/src/SearchWidgetAdvanced.css +1 -1
- package/src/legacy/tool-ui/src/StyleEmbeddedContent.css +3 -3
- package/src/legacy/tool-ui/src/TabBar.css +1 -1
- package/src/legacy/tool-ui/src/Table.css +1 -1
- package/src/legacy/tool-ui/src/Taxonomy.css +4 -4
- package/src/legacy/tool-ui/src/ThemeBundleEditor.css +1 -1
- package/src/legacy/tool-ui/src/TimedContent.css +2 -2
- package/src/legacy/tool-ui/src/ViewWatchers.css +1 -1
- package/src/legacy/tool-ui/src/Widget.css +1 -1
- package/src/legacy/tool-ui/src/Workflow.css +3 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.945bd28778b1a3e937c7.js → RTEProseMirror.e8344eaeea387c600257.js} +12 -12
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.c5bcef50efdfa2d2e35f.js → v4.b892feb8ec199202fd18.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.86effb9bf858ae7b0640.js → v5.493c3ddf65c4fa599ff0.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.d49a759cb0b7cffd76e4.css +5 -0
- package/src/legacy/tool-ui/src/v5.ts +3 -1
- package/dist/storybook/assets/if-defined-BkzXcv-a.js +0 -1
- package/dist/storybook/assets/iframe-C3TUQi31.js +0 -1104
- package/dist/storybook/assets/iframe-D0roG0J-.css +0 -1
- package/dist/storybook/assets/onFind-9HPhEfV5.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.d6cc2743243cadb90492.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.945bd28778b1a3e937c7.js.LICENSE.txt → RTEProseMirror.e8344eaeea387c600257.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.c5bcef50efdfa2d2e35f.js.LICENSE.txt → v4.b892feb8ec199202fd18.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.86effb9bf858ae7b0640.js.LICENSE.txt → v5.493c3ddf65c4fa599ff0.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as p,x as l}from"./iframe-
|
|
1
|
+
import{g as p,x as l}from"./iframe-BqpRijx3.js";import{o as a}from"./if-defined-0srVwUDm.js";import{o as c}from"./style-map-DukvFNCc.js";import"./preload-helper-PPVm8Dsz.js";const{events:d,args:u,argTypes:t}=p("btu-popover"),h={title:"Components/Popover",component:"btu-popover",tags:["autodocs"],parameters:{docs:{subtitle:"Rich interactive content anchored to a trigger element",description:{component:`
|
|
2
2
|
\`btu-popover\` displays rich interactive content anchored to a trigger element using CSS anchor positioning and the native Popover API.
|
|
3
3
|
|
|
4
4
|
<h3>When to use:</h3>
|
|
@@ -35,7 +35,7 @@ import{g as p,x as l}from"./iframe-C3TUQi31.js";import{o as a}from"./if-defined-
|
|
|
35
35
|
?no-arrow="${o.noArrow}"
|
|
36
36
|
?open="${o.open}"
|
|
37
37
|
>
|
|
38
|
-
<button class="btu-button
|
|
38
|
+
<button class="btu-button btu-button-gray btu-button-sm" slot="trigger">
|
|
39
39
|
${o.trigger==="hover"?"Hover me":o.trigger==="focus"?"Focus me":"Click me"}
|
|
40
40
|
</button>
|
|
41
41
|
<div slot="content">
|
|
@@ -51,19 +51,19 @@ import{g as p,x as l}from"./iframe-C3TUQi31.js";import{o as a}from"./if-defined-
|
|
|
51
51
|
`}},n={args:{noArrow:!1,offset:void 0}},r={render:()=>l`
|
|
52
52
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
53
53
|
<btu-popover position="top">
|
|
54
|
-
<button class="btu-button
|
|
54
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Top</button>
|
|
55
55
|
<div slot="content">Popover positioned above the trigger</div>
|
|
56
56
|
</btu-popover>
|
|
57
57
|
<btu-popover position="bottom">
|
|
58
|
-
<button class="btu-button
|
|
58
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Bottom</button>
|
|
59
59
|
<div slot="content">Popover positioned below the trigger</div>
|
|
60
60
|
</btu-popover>
|
|
61
61
|
<btu-popover position="left">
|
|
62
|
-
<button class="btu-button
|
|
62
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Left</button>
|
|
63
63
|
<div slot="content">Popover positioned left of the trigger</div>
|
|
64
64
|
</btu-popover>
|
|
65
65
|
<btu-popover position="right">
|
|
66
|
-
<button class="btu-button
|
|
66
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Right</button>
|
|
67
67
|
<div slot="content">Popover positioned right of the trigger</div>
|
|
68
68
|
</btu-popover>
|
|
69
69
|
</div>
|
|
@@ -118,20 +118,20 @@ import{g as p,x as l}from"./iframe-C3TUQi31.js";import{o as a}from"./if-defined-
|
|
|
118
118
|
</style>
|
|
119
119
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
120
120
|
<btu-popover position="bottom">
|
|
121
|
-
<button class="btu-button
|
|
121
|
+
<button class="btu-button btu-button-error" slot="trigger">Delete item</button>
|
|
122
122
|
<div slot="content">
|
|
123
123
|
<div class="popover-custom-content">
|
|
124
124
|
<h3>Confirm Delete</h3>
|
|
125
125
|
<p>Are you sure you want to delete this item? This action cannot be undone.</p>
|
|
126
126
|
<div class="actions">
|
|
127
|
-
<button class="btu-button
|
|
128
|
-
<button class="btu-button
|
|
127
|
+
<button class="btu-button btu-button-warning btu-button-xs">Cancel</button>
|
|
128
|
+
<button class="btu-button btu-button-fill-none btu-button-error btu-button-xs">Delete</button>
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
132
132
|
</btu-popover>
|
|
133
133
|
<btu-popover trigger="hover" delay="200" position="bottom">
|
|
134
|
-
<button class="btu-button
|
|
134
|
+
<button class="btu-button btu-button-primary" slot="trigger">Hover for chart data</button>
|
|
135
135
|
<div slot="content">
|
|
136
136
|
<div
|
|
137
137
|
style="font-weight: 500; font-size: 0.75rem; line-height: 1.125rem; color: oklch(var(--btu-theme-gray-900)); margin-bottom: 8px;"
|
|
@@ -210,19 +210,19 @@ import{g as p,x as l}from"./iframe-C3TUQi31.js";import{o as a}from"./if-defined-
|
|
|
210
210
|
render: () => html\`
|
|
211
211
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
212
212
|
<btu-popover position="top">
|
|
213
|
-
<button class="btu-button
|
|
213
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Top</button>
|
|
214
214
|
<div slot="content">Popover positioned above the trigger</div>
|
|
215
215
|
</btu-popover>
|
|
216
216
|
<btu-popover position="bottom">
|
|
217
|
-
<button class="btu-button
|
|
217
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Bottom</button>
|
|
218
218
|
<div slot="content">Popover positioned below the trigger</div>
|
|
219
219
|
</btu-popover>
|
|
220
220
|
<btu-popover position="left">
|
|
221
|
-
<button class="btu-button
|
|
221
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Left</button>
|
|
222
222
|
<div slot="content">Popover positioned left of the trigger</div>
|
|
223
223
|
</btu-popover>
|
|
224
224
|
<btu-popover position="right">
|
|
225
|
-
<button class="btu-button
|
|
225
|
+
<button class="btu-button btu-button-primary btu-button-sm" slot="trigger">Right</button>
|
|
226
226
|
<div slot="content">Popover positioned right of the trigger</div>
|
|
227
227
|
</btu-popover>
|
|
228
228
|
</div>
|
|
@@ -286,20 +286,20 @@ import{g as p,x as l}from"./iframe-C3TUQi31.js";import{o as a}from"./if-defined-
|
|
|
286
286
|
</style>
|
|
287
287
|
<div style="display: flex; gap: 2rem; justify-content: center; padding: 6rem 2rem; flex-wrap: wrap;">
|
|
288
288
|
<btu-popover position="bottom">
|
|
289
|
-
<button class="btu-button
|
|
289
|
+
<button class="btu-button btu-button-error" slot="trigger">Delete item</button>
|
|
290
290
|
<div slot="content">
|
|
291
291
|
<div class="popover-custom-content">
|
|
292
292
|
<h3>Confirm Delete</h3>
|
|
293
293
|
<p>Are you sure you want to delete this item? This action cannot be undone.</p>
|
|
294
294
|
<div class="actions">
|
|
295
|
-
<button class="btu-button
|
|
296
|
-
<button class="btu-button
|
|
295
|
+
<button class="btu-button btu-button-warning btu-button-xs">Cancel</button>
|
|
296
|
+
<button class="btu-button btu-button-fill-none btu-button-error btu-button-xs">Delete</button>
|
|
297
297
|
</div>
|
|
298
298
|
</div>
|
|
299
299
|
</div>
|
|
300
300
|
</btu-popover>
|
|
301
301
|
<btu-popover trigger="hover" delay="200" position="bottom">
|
|
302
|
-
<button class="btu-button
|
|
302
|
+
<button class="btu-button btu-button-primary" slot="trigger">Hover for chart data</button>
|
|
303
303
|
<div slot="content">
|
|
304
304
|
<div
|
|
305
305
|
style="font-weight: 500; font-size: 0.75rem; line-height: 1.125rem; color: oklch(var(--btu-theme-gray-900)); margin-bottom: 8px;"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-BqpRijx3.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-BqpRijx3.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.
|
|
@@ -109,11 +109,11 @@ class MyComponent extends RovingTabindexMixin(EventEmitterMixin(ReadyMixin(LitEl
|
|
|
109
109
|
\`\`\`
|
|
110
110
|
`}}}};let g=class extends h(v){constructor(){super(...arguments),this._handleKeydown=n=>{switch(n.key){case"ArrowRight":n.preventDefault(),this._rovingNext();break;case"ArrowLeft":n.preventDefault(),this._rovingPrev();break;case"Home":n.preventDefault(),this._rovingFirst();break;case"End":n.preventDefault(),this._rovingLast();break}}}createRenderRoot(){return this}_getRovingTargets(){return Array.from(this.querySelectorAll(".roving-demo-btn"))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown)}render(){return l`
|
|
111
111
|
<div role="toolbar" aria-label="Demo toolbar" style="display: flex; gap: 0.5rem;">
|
|
112
|
-
<button class="roving-demo-btn btu-button
|
|
113
|
-
<button class="roving-demo-btn btu-button
|
|
114
|
-
<button class="roving-demo-btn btu-button
|
|
115
|
-
<button class="roving-demo-btn btu-button
|
|
116
|
-
<button class="roving-demo-btn btu-button
|
|
112
|
+
<button class="roving-demo-btn btu-button btu-button-gray btu-button-md" tabindex="0">Item 1</button>
|
|
113
|
+
<button class="roving-demo-btn btu-button btu-button-gray btu-button-md" tabindex="-1">Item 2</button>
|
|
114
|
+
<button class="roving-demo-btn btu-button btu-button-gray btu-button-md" tabindex="-1">Item 3</button>
|
|
115
|
+
<button class="roving-demo-btn btu-button btu-button-gray btu-button-md" tabindex="-1">Item 4</button>
|
|
116
|
+
<button class="roving-demo-btn btu-button btu-button-gray btu-button-md" tabindex="-1">Item 5</button>
|
|
117
117
|
</div>
|
|
118
118
|
`}};g=f([m("roving-demo")],g);const s={render:()=>l(c||(c=y([`<div class="flex flex-col gap-4">
|
|
119
119
|
<div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as o}from"./iframe-
|
|
1
|
+
import{x as o}from"./iframe-BqpRijx3.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-DwVglPfj.js → ScrollShadow.stories-B1dTcJR4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as a}from"./iframe-
|
|
1
|
+
import{x as a}from"./iframe-BqpRijx3.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-BqpRijx3.js";import{o as s}from"./if-defined-0srVwUDm.js";import{o as f}from"./style-map-DukvFNCc.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>
|
|
@@ -71,7 +71,7 @@ import{g as k,x as c}from"./iframe-C3TUQi31.js";import{o as s}from"./if-defined-
|
|
|
71
71
|
<btu-switch label="Email notifications" name="email" checked></btu-switch>
|
|
72
72
|
<btu-switch label="SMS notifications" name="sms"></btu-switch>
|
|
73
73
|
<btu-switch label="Push notifications" name="push" checked></btu-switch>
|
|
74
|
-
<button type="submit" class="btu-button
|
|
74
|
+
<button type="submit" class="btu-button btu-button-sm w-fit">Submit</button>
|
|
75
75
|
<pre class="form-output text-xs text-gray-600"></pre>
|
|
76
76
|
</form>
|
|
77
77
|
</div>
|
|
@@ -90,7 +90,7 @@ import{g as k,x as c}from"./iframe-C3TUQi31.js";import{o as s}from"./if-defined-
|
|
|
90
90
|
<div class="flex items-center gap-4">
|
|
91
91
|
<btu-switch id="programmatic-switch" label="Controlled switch" size="md"></btu-switch>
|
|
92
92
|
<button
|
|
93
|
-
class="btu-button
|
|
93
|
+
class="btu-button btu-button-sm"
|
|
94
94
|
@click=${()=>{const e=document.getElementById("programmatic-switch");e&&(e.checked=!e.checked)}}
|
|
95
95
|
>
|
|
96
96
|
Toggle externally
|
|
@@ -264,7 +264,7 @@ import{g as k,x as c}from"./iframe-C3TUQi31.js";import{o as s}from"./if-defined-
|
|
|
264
264
|
<btu-switch label="Email notifications" name="email" checked></btu-switch>
|
|
265
265
|
<btu-switch label="SMS notifications" name="sms"></btu-switch>
|
|
266
266
|
<btu-switch label="Push notifications" name="push" checked></btu-switch>
|
|
267
|
-
<button type="submit" class="btu-button
|
|
267
|
+
<button type="submit" class="btu-button btu-button-sm w-fit">Submit</button>
|
|
268
268
|
<pre class="form-output text-xs text-gray-600"></pre>
|
|
269
269
|
</form>
|
|
270
270
|
</div>
|
|
@@ -283,7 +283,7 @@ import{g as k,x as c}from"./iframe-C3TUQi31.js";import{o as s}from"./if-defined-
|
|
|
283
283
|
<div class="flex items-center gap-4">
|
|
284
284
|
<btu-switch id="programmatic-switch" label="Controlled switch" size="md"></btu-switch>
|
|
285
285
|
<button
|
|
286
|
-
class="btu-button
|
|
286
|
+
class="btu-button btu-button-sm"
|
|
287
287
|
@click=\${() => {
|
|
288
288
|
const sw = document.getElementById('programmatic-switch') as HTMLElement & {
|
|
289
289
|
checked: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as u,x as e}from"./iframe-
|
|
1
|
+
import{g as u,x as e}from"./iframe-BqpRijx3.js";import{o as d}from"./style-map-DukvFNCc.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-BqpRijx3.js";import{o as c}from"./style-map-DukvFNCc.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-BqpRijx3.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">
|
|
@@ -25,7 +25,7 @@ import{x as u}from"./iframe-C3TUQi31.js";import"./preload-helper-PPVm8Dsz.js";fu
|
|
|
25
25
|
|
|
26
26
|
<button
|
|
27
27
|
@click=${()=>{n=0,o=0,r()}}
|
|
28
|
-
class="btu-button
|
|
28
|
+
class="btu-button btu-button-gray btu-button-sm"
|
|
29
29
|
>
|
|
30
30
|
Reset Counters
|
|
31
31
|
</button>
|
|
@@ -58,7 +58,7 @@ import{x as u}from"./iframe-C3TUQi31.js";import"./preload-helper-PPVm8Dsz.js";fu
|
|
|
58
58
|
|
|
59
59
|
<button
|
|
60
60
|
@click=${()=>{t=0,n=0,o()}}
|
|
61
|
-
class="btu-button
|
|
61
|
+
class="btu-button btu-button-gray btu-button-sm"
|
|
62
62
|
>
|
|
63
63
|
Reset Counters
|
|
64
64
|
</button>
|
|
@@ -163,7 +163,7 @@ window.addEventListener('scroll', handleScroll)</code></pre>
|
|
|
163
163
|
throttledCount = 0;
|
|
164
164
|
updateCounts();
|
|
165
165
|
}}
|
|
166
|
-
class="btu-button
|
|
166
|
+
class="btu-button btu-button-gray btu-button-sm"
|
|
167
167
|
>
|
|
168
168
|
Reset Counters
|
|
169
169
|
</button>
|
|
@@ -231,7 +231,7 @@ window.addEventListener('scroll', handleScroll)</code></pre>
|
|
|
231
231
|
throttledScrollCount = 0;
|
|
232
232
|
updateScrollCounts();
|
|
233
233
|
}}
|
|
234
|
-
class="btu-button
|
|
234
|
+
class="btu-button btu-button-gray btu-button-sm"
|
|
235
235
|
>
|
|
236
236
|
Reset Counters
|
|
237
237
|
</button>
|
|
@@ -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-BqpRijx3.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-0srVwUDm.js";import{o as k}from"./style-map-DukvFNCc.js";import{E as C,R as L}from"./ReadyMixin-HHwtCrVi.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-BqpRijx3.js";import{o as E}from"./if-defined-0srVwUDm.js";import{o as x}from"./style-map-DukvFNCc.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-jqjcXP_N.js → UploadItem.stories-BOIu5j_i.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-BqpRijx3.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-B17JEOI8.js";import{e as X,f as _,E as B,r as j,x as A}from"./iframe-BqpRijx3.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-BqpRijx3.js";import{o as m}from"./style-map-DukvFNCc.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>
|
|
@@ -21,7 +21,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
21
21
|
style=${m(t)}
|
|
22
22
|
>
|
|
23
23
|
<button
|
|
24
|
-
class="btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-xs
|
|
24
|
+
class="btu-button btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-xs"
|
|
25
25
|
slot="controls"
|
|
26
26
|
>
|
|
27
27
|
<btu-icon symbol="ellipsis"></btu-icon>
|
|
@@ -36,8 +36,8 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
36
36
|
?fullscreenable=${e.fullscreenable}
|
|
37
37
|
>
|
|
38
38
|
<div class="action-bar flex justify-between" slot="footer">
|
|
39
|
-
<button class="btu-button
|
|
40
|
-
<button class="btu-button
|
|
39
|
+
<button class="btu-button btu-button-error">Delete</button>
|
|
40
|
+
<button class="btu-button btu-button-success">Save</button>
|
|
41
41
|
</div>
|
|
42
42
|
<div>Body content with heading and an action bar in the footer.</div>
|
|
43
43
|
</btu-widget>
|
|
@@ -49,7 +49,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
49
49
|
?fullscreenable=${e.fullscreenable}
|
|
50
50
|
style="--widget-background: oklch(var(--btu-theme-purple-100)); --widget-border: 1px solid oklch(var(--btu-theme-purple-800)); --header-background: oklch(var(--btu-theme-purple-300));"
|
|
51
51
|
>
|
|
52
|
-
<button class="btu-button
|
|
52
|
+
<button class="btu-button btu-button-purple" slot="controls">Action</button>
|
|
53
53
|
<div>
|
|
54
54
|
<p>Customized!</p>
|
|
55
55
|
</div>
|
|
@@ -72,7 +72,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
72
72
|
`,parameters:{docs:{description:{story:"Widget that starts in a collapsed state."}}}},b={render:e=>{const t=["pencil","gear","trash","star","heart","bell"];let p=0;const g=n=>{const o=document.createElement("btu-icon");o.setAttribute("symbol",t[p%t.length]),o.setAttribute("slot","controls"),p++,n.appendChild(o);const r=document.createElement("p");r.textContent="This paragraph was added dynamically and automatically redistributed to the body!",r.style.color="#16a34a",r.style.fontWeight="600",n.appendChild(r);const s=document.createElement("button");s.className="btu-button btu-button-purple",s.textContent="Button",s.setAttribute("slot","footer"),n.appendChild(s)};return l`
|
|
73
73
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
74
74
|
<button
|
|
75
|
-
class="btu-button
|
|
75
|
+
class="btu-button btu-button-primary"
|
|
76
76
|
@click="${n=>{const o=n.target.parentElement?.querySelector("btu-widget");o&&g(o)}}"
|
|
77
77
|
>
|
|
78
78
|
Add Dynamic Content
|
|
@@ -83,7 +83,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
83
83
|
?collapsed=${e.collapsed}
|
|
84
84
|
?fullscreenable=${e.fullscreenable}
|
|
85
85
|
>
|
|
86
|
-
<button class="btu-button
|
|
86
|
+
<button class="btu-button btu-button-primary" slot="controls">Initial Button</button>
|
|
87
87
|
<div style="padding: 1rem;">
|
|
88
88
|
<p>Click the "Add Dynamic Content" button above to demonstrate:</p>
|
|
89
89
|
<ul>
|
|
@@ -108,8 +108,8 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
108
108
|
?fullscreenable=\${args.fullscreenable}
|
|
109
109
|
>
|
|
110
110
|
<div class="action-bar flex justify-between" slot="footer">
|
|
111
|
-
<button class="btu-button
|
|
112
|
-
<button class="btu-button
|
|
111
|
+
<button class="btu-button btu-button-error">Delete</button>
|
|
112
|
+
<button class="btu-button btu-button-success">Save</button>
|
|
113
113
|
</div>
|
|
114
114
|
<div>Body content with heading and an action bar in the footer.</div>
|
|
115
115
|
</btu-widget>
|
|
@@ -130,7 +130,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
130
130
|
?fullscreenable=\${args.fullscreenable}
|
|
131
131
|
style="--widget-background: oklch(var(--btu-theme-purple-100)); --widget-border: 1px solid oklch(var(--btu-theme-purple-800)); --header-background: oklch(var(--btu-theme-purple-300));"
|
|
132
132
|
>
|
|
133
|
-
<button class="btu-button
|
|
133
|
+
<button class="btu-button btu-button-purple" slot="controls">Action</button>
|
|
134
134
|
<div>
|
|
135
135
|
<p>Customized!</p>
|
|
136
136
|
</div>
|
|
@@ -195,7 +195,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
195
195
|
return html\`
|
|
196
196
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
197
197
|
<button
|
|
198
|
-
class="btu-button
|
|
198
|
+
class="btu-button btu-button-primary"
|
|
199
199
|
@click="\${(e: Event) => {
|
|
200
200
|
const widget = (e.target as HTMLElement).parentElement?.querySelector('btu-widget');
|
|
201
201
|
if (widget) addContent(widget);
|
|
@@ -209,7 +209,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
|
|
|
209
209
|
?collapsed=\${args.collapsed}
|
|
210
210
|
?fullscreenable=\${args.fullscreenable}
|
|
211
211
|
>
|
|
212
|
-
<button class="btu-button
|
|
212
|
+
<button class="btu-button btu-button-primary" slot="controls">Initial Button</button>
|
|
213
213
|
<div style="padding: 1rem;">
|
|
214
214
|
<p>Click the "Add Dynamic Content" button above to demonstrate:</p>
|
|
215
215
|
<ul>
|