@brightspot/ui 1.10.0 → 1.11.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/action-bar/ActionBar.d.ts +163 -0
- package/dist/components/action-bar/ActionBar.d.ts.map +1 -0
- package/dist/components/action-bar/ActionBar.js +479 -0
- package/dist/components/action-bar/ActionBar.js.map +1 -0
- package/dist/components/action-bar/ActionItem.d.ts +103 -0
- package/dist/components/action-bar/ActionItem.d.ts.map +1 -0
- package/dist/components/action-bar/ActionItem.js +237 -0
- package/dist/components/action-bar/ActionItem.js.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +3 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.js +22 -6
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/dropdown/DropdownItem.d.ts +14 -1
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownItem.js +20 -1
- package/dist/components/dropdown/DropdownItem.js.map +1 -1
- package/dist/components/dropdown/DropdownMenu.d.ts +3 -5
- package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownMenu.js +17 -32
- package/dist/components/dropdown/DropdownMenu.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +33 -4
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +80 -16
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/tabs/Tab.d.ts +108 -0
- package/dist/components/tabs/Tab.d.ts.map +1 -0
- package/dist/components/tabs/Tab.js +152 -0
- package/dist/components/tabs/Tab.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +126 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +390 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/custom-elements.json +2635 -1591
- package/dist/storybook/assets/ActionBar.stories--nAeDC-G.js +408 -0
- package/dist/storybook/assets/ActionItem.stories-BHrGjk-P.js +203 -0
- package/dist/storybook/assets/{Avatar.stories-B26mRkkZ.js → Avatar.stories-Da-mRj6_.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-J7lVGsMY.js → AvatarGroup.stories-BQlaC_yl.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BpTIV61M.js → Badge.stories-DnVnOrnF.js} +1 -1
- package/dist/storybook/assets/{Button-Dg-fIrzT.js → Button-CFLAI1H9.js} +1 -1
- package/dist/storybook/assets/{Button.stories-gPKRVbxk.js → Button.stories-DxaBOjwv.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-DbY-sKEe.js → Celebrate.stories-CuMm15Nr.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-DeH5JYX_.js → CircularProgress.stories-DRN8Mtvj.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-C-lZ4uuw.js → ClipboardMixin.stories-DR7Ou2Av.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-Cu6zVIuG.js → Color-6BZIO3FS-Die62Y0Z.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-D6XYMrTD.js → Colors.stories-bIq_ssbI.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-jFekKTYg.js → CombinedEffects.stories-CtKzOUZn.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-g50hRCPT.js → ComponentStatesMixin-DMLCk9fE.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-D3Q5pR38.js → ComponentStatesMixin.stories-D8UI9o-d.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-COZZ1VC2.js → CopyToClipboard.stories-ti6CpJNp.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-Dl10LAnx.js → Debounce.stories-DzZUSvbk.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-CFLtMbUx.js → DocsRenderer-LL677BLK-CIRGv5IX.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-Drwq-0Z2.js → Dropdown.stories-Lt4cY0Re.js} +41 -14
- package/dist/storybook/assets/{Events.stories-dODeR-g-.js → Events.stories-B1ddcgpT.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CH7_-_q3.js → Heading.stories-DI4w61cf.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-CH1Y739k.js → HueRipple.stories-DjhoxxEw.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CPjM-jTU.js → Icon.stories-CpziAhae.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DuzqvcnN.js → IconButton.stories-KjN28hfc.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-C7IdnJd3.js → LinearProgress.stories-DcIpdz6R.js} +1 -1
- package/dist/storybook/assets/Pagination.stories-BBkLEwoP.js +252 -0
- package/dist/storybook/assets/{Popover.stories-Ca1F-wrI.js → Popover.stories-DLv48c2h.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-DNZ5dCsZ.js → ReadyMixin-Cw2Dfbu2.js} +1 -1
- package/dist/storybook/assets/RovingTabindexMixin.stories-BWaFx9mu.js +192 -0
- package/dist/storybook/assets/{Rtc.stories-BVJc1vCA.js → Rtc.stories-Ve7Bwo_l.js} +1 -1
- package/dist/storybook/assets/ScrollShadow.stories-C6XmrRLm.js +17 -0
- package/dist/storybook/assets/{Switch.stories-BEEHP8mD.js → Switch.stories-Cf8WM1LG.js} +1 -1
- package/dist/storybook/assets/Tab.stories-CEtdEtOx.js +218 -0
- package/dist/storybook/assets/Tabs.stories-CIAO1bPO.js +211 -0
- package/dist/storybook/assets/{Throttle.stories-C4xsYeAb.js → Throttle.stories-BqxVIb-r.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-Ccm4AnSv.js → Tooltip.stories-B6fw6875.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-Degjk-M0.js → Welcome.stories-CfJtSM19.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-OKnZ9sDs.js → Widget.stories-CiOho7lO.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-CXL3TyJ2.js → WithTooltip-65CFNBJE-PGcopp73.js} +2 -2
- package/dist/storybook/assets/{blocks-DLdUKG_W.js → blocks-dP2DwISI.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-29NCxjfM.js → formatter-EIJCOSYU-CZSAC3tg.js} +1 -1
- package/dist/storybook/assets/if-defined-B1RdczOE.js +1 -0
- package/dist/storybook/assets/{iframe-BqvwP3or.js → iframe-DloIUNZz.js} +161 -161
- package/dist/storybook/assets/iframe-bJgLXZKK.css +1 -0
- package/dist/storybook/assets/{index-BIyTv1BF.js → index-DKF0ypu5.js} +1 -1
- package/dist/storybook/assets/onFind-C0l4Gew0.js +1 -0
- package/dist/storybook/assets/{onFind.stories-D64-QZqf.js → onFind.stories-DOTt9puO.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-BICsnIJL.js → onRemove.stories-CQ9ZC5dm.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DpDZP9_5.js → onVisible.stories-Cbj5_Vz0.js} +1 -1
- package/dist/storybook/assets/style-map-DLXysq3r.js +1 -0
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-Bz_DuQj8.js → syntaxhighlighter-ED5Y7EFY-Bjjbl9ca.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-action-bar.d.ts +2 -0
- package/dist/tailwind-plugin-action-bar.d.ts.map +1 -0
- package/dist/tailwind-plugin-action-bar.js +120 -0
- package/dist/tailwind-plugin-action-bar.js.map +1 -0
- package/dist/tailwind-plugin-action-bar.ts +134 -0
- package/dist/tailwind-plugin-badge.js +4 -5
- package/dist/tailwind-plugin-badge.js.map +1 -1
- package/dist/tailwind-plugin-badge.ts +4 -5
- package/dist/tailwind-plugin-button.js +1 -0
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +1 -0
- package/dist/tailwind-plugin-pagination.js +13 -23
- package/dist/tailwind-plugin-pagination.js.map +1 -1
- package/dist/tailwind-plugin-pagination.ts +15 -25
- package/dist/tailwind-plugin-tabs.d.ts +2 -0
- package/dist/tailwind-plugin-tabs.d.ts.map +1 -0
- package/dist/tailwind-plugin-tabs.js +151 -0
- package/dist/tailwind-plugin-tabs.js.map +1 -0
- package/dist/tailwind-plugin-tabs.ts +162 -0
- package/dist/util/EventEmitterMixin.d.ts +16 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/RovingTabindexMixin.d.ts +38 -0
- package/dist/util/RovingTabindexMixin.d.ts.map +1 -0
- package/dist/util/RovingTabindexMixin.js +83 -0
- package/dist/util/RovingTabindexMixin.js.map +1 -0
- package/docs/components/ActionBar.md +71 -0
- package/docs/components/ActionItem.md +76 -0
- package/docs/components/Dropdown.md +7 -7
- package/docs/components/DropdownItem.md +9 -5
- package/docs/components/DropdownMenu.md +12 -12
- package/docs/components/Pagination.md +37 -34
- package/docs/components/README.md +4 -0
- package/docs/components/Tab.md +73 -0
- package/docs/components/Tabs.md +77 -0
- package/package.json +1 -1
- package/dist/storybook/assets/Pagination.stories-C4cLjS_9.js +0 -272
- package/dist/storybook/assets/ScrollShadow.stories-C3W5o9ZW.js +0 -17
- package/dist/storybook/assets/if-defined-BZFPaJjl.js +0 -1
- package/dist/storybook/assets/iframe-C5bIZMJ5.css +0 -1
- package/dist/storybook/assets/onFind-1l3EPW-I.js +0 -1
- package/dist/storybook/assets/style-map-CBrSnxRe.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as
|
|
1
|
+
import{g as S,x as t}from"./iframe-DloIUNZz.js";import{o as f}from"./style-map-DLXysq3r.js";import"./preload-helper-PPVm8Dsz.js";const{events:O,args:C,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
|
|
|
@@ -21,9 +21,9 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
21
21
|
<li><strong>Home / End</strong> — Jump to first/last item</li>
|
|
22
22
|
<li><strong>Type characters</strong> — Typeahead search matching item labels</li>
|
|
23
23
|
</ul>
|
|
24
|
-
`}},actions:{handles:
|
|
24
|
+
`}},actions:{handles:O},controls:{expanded:!0}},args:{...C,label:"Actions",variant:"secondary",size:"medium",placement:"bottom-start",disabled:!1,"icon-only":!1,"stay-open-on-select":!1,"no-chevron":!1,"icon-symbol":"settings","icon-position":"leading"},argTypes:{...n,label:{...n.label,control:{type:"text"},description:"Trigger button text"},variant:{...n.variant,control:{type:"select"},options:["primary","secondary","tertiary","primary-clear","secondary-clear","tertiary-clear"],description:"Button variant"},size:{...n.size,control:{type:"select"},options:["small","medium","large"],description:"Button size"},placement:{...n.placement,control:{type:"select"},options:["bottom-start","bottom-end","top-start","top-end"],description:"Panel placement relative to trigger"},disabled:{...n.disabled,control:{type:"boolean"},description:"Prevents opening the dropdown"},"icon-only":{...n["icon-only"],control:{type:"boolean"},description:"Hides label, shows icon only"},"stay-open-on-select":{...n["stay-open-on-select"],control:{type:"boolean"},description:"Keeps panel open when an item is selected"},"icon-symbol":{...n["icon-symbol"],control:{type:"text"},description:"Lucide icon symbol for the trigger button"},"icon-position":{...n["icon-position"],control:{type:"select"},options:["leading","trailing"],description:"Icon position relative to label text (requires `icon-symbol` to be set)"},"no-chevron":{...n["no-chevron"],control:{type:"boolean"},description:"Hides the chevron icon on the trigger button"},open:{table:{disable:!0}},"tooltip-delay":{table:{disable:!0}},"tooltip-offset":{table:{disable:!0}},"tooltip-no-arrow":{table:{disable:!0}},"tooltip-trigger":{table:{disable:!0}},"tooltip-position":{table:{disable:!0}},"--tooltip-color-background":{table:{disable:!0}},"--tooltip-color-text":{table:{disable:!0}},"--tooltip-border-radius":{table:{disable:!0}},"--dropdown-panel-background":{table:{disable:!0}},"--dropdown-panel-border-color":{table:{disable:!0}},"--dropdown-panel-border-radius":{table:{disable:!0}},"--dropdown-panel-min-width":{table:{disable:!0}},"--dropdown-item-background":{table:{disable:!0}},"--dropdown-item-color":{table:{disable:!0}},"--dropdown-item-hover-background":{table:{disable:!0}},"--dropdown-item-hover-color":{table:{disable:!0}},"--dropdown-item-selected-background":{table:{disable:!0}},"--dropdown-item-selected-color":{table:{disable:!0}},"--dropdown-item-font-size":{table:{disable:!0}},"--dropdown-divider-color":{table:{disable:!0}},"--dropdown-empty-color":{table:{disable:!0}},panelBackground:{name:"--dropdown-panel-background",control:{type:"color"},description:"Panel background color (default: white)",table:{category:"CSS Properties"}},panelBorderColor:{name:"--dropdown-panel-border-color",control:{type:"color"},description:"Panel border color (default: gray-200)",table:{category:"CSS Properties"}},panelBorderRadius:{name:"--dropdown-panel-border-radius",control:{type:"text"},description:"Panel border radius (default: borderRadius.lg)",table:{category:"CSS Properties"}},panelMinWidth:{name:"--dropdown-panel-min-width",control:{type:"text"},description:"Panel minimum width (default: max(12rem, anchor-size(width)))",table:{category:"CSS Properties"}},itemBackground:{name:"--dropdown-item-background",control:{type:"color"},description:"Item background color (default: transparent)",table:{category:"CSS Properties"}},itemColor:{name:"--dropdown-item-color",control:{type:"color"},description:"Item text color (default: gray-700)",table:{category:"CSS Properties"}},itemHoverBackground:{name:"--dropdown-item-hover-background",control:{type:"color"},description:"Item hover background (default: gray-100)",table:{category:"CSS Properties"}},itemHoverColor:{name:"--dropdown-item-hover-color",control:{type:"color"},description:"Item hover text color (default: gray-900)",table:{category:"CSS Properties"}},itemSelectedBackground:{name:"--dropdown-item-selected-background",control:{type:"color"},description:"Selected item background (default: primary-50)",table:{category:"CSS Properties"}},itemSelectedColor:{name:"--dropdown-item-selected-color",control:{type:"color"},description:"Selected item text color (default: primary-700)",table:{category:"CSS Properties"}},itemFontSize:{name:"--dropdown-item-font-size",control:{type:"text"},description:"Item font size (default: fontSize.sm)",table:{category:"CSS Properties"}},dividerColor:{name:"--dropdown-divider-color",control:{type:"color"},description:"Divider line color (default: gray-200)",table:{category:"CSS Properties"}},emptyColor:{name:"--dropdown-empty-color",control:{type:"color"},description:"Empty state text color (default: gray-400)",table:{category:"CSS Properties"}}},render:o=>{const e={};return o.panelBackground&&(e["--dropdown-panel-background"]=o.panelBackground),o.panelBorderColor&&(e["--dropdown-panel-border-color"]=o.panelBorderColor),o.panelBorderRadius&&(e["--dropdown-panel-border-radius"]=o.panelBorderRadius),o.panelMinWidth&&(e["--dropdown-panel-min-width"]=o.panelMinWidth),o.itemBackground&&(e["--dropdown-item-background"]=o.itemBackground),o.itemColor&&(e["--dropdown-item-color"]=o.itemColor),o.itemHoverBackground&&(e["--dropdown-item-hover-background"]=o.itemHoverBackground),o.itemHoverColor&&(e["--dropdown-item-hover-color"]=o.itemHoverColor),o.itemSelectedBackground&&(e["--dropdown-item-selected-background"]=o.itemSelectedBackground),o.itemSelectedColor&&(e["--dropdown-item-selected-color"]=o.itemSelectedColor),o.itemFontSize&&(e["--dropdown-item-font-size"]=o.itemFontSize),o.dividerColor&&(e["--dropdown-divider-color"]=o.dividerColor),o.emptyColor&&(e["--dropdown-empty-color"]=o.emptyColor),t`
|
|
25
25
|
<btu-dropdown
|
|
26
|
-
style=${
|
|
26
|
+
style=${f(e)}
|
|
27
27
|
label="${o.label}"
|
|
28
28
|
variant="${o.variant}"
|
|
29
29
|
size="${o.size}"
|
|
@@ -217,6 +217,15 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
217
217
|
</btu-dropdown>
|
|
218
218
|
</div>
|
|
219
219
|
`,parameters:{docs:{description:{story:'A disabled trigger prevents opening. Disabled items within an open menu are focusable (per WAI-ARIA) but non-activatable, announced with `aria-disabled="true"`.'}}}},c={render:()=>t`
|
|
220
|
+
<btu-dropdown label="Actions" variant="secondary">
|
|
221
|
+
<btu-dropdown-menu>
|
|
222
|
+
<btu-dropdown-item label="Publish"></btu-dropdown-item>
|
|
223
|
+
<btu-dropdown-item label="SEO" error></btu-dropdown-item>
|
|
224
|
+
<btu-dropdown-item label="Archive"></btu-dropdown-item>
|
|
225
|
+
<btu-dropdown-item label="Overrides" error></btu-dropdown-item>
|
|
226
|
+
</btu-dropdown-menu>
|
|
227
|
+
</btu-dropdown>
|
|
228
|
+
`,parameters:{docs:{description:{story:"Set `error` on a `btu-dropdown-item` to show an error badge alongside the label. Used by the `btu-tabs` `menu` variant to surface validation errors on tab items."}}}},w={render:()=>t`
|
|
220
229
|
<btu-dropdown label="Filters" variant="secondary" icon-symbol="filter" stay-open-on-select>
|
|
221
230
|
<btu-dropdown-menu name="Apply Filters" header>
|
|
222
231
|
<btu-dropdown-item label="Published" selected></btu-dropdown-item>
|
|
@@ -225,7 +234,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
225
234
|
<btu-dropdown-item label="Deleted"></btu-dropdown-item>
|
|
226
235
|
</btu-dropdown-menu>
|
|
227
236
|
</btu-dropdown>
|
|
228
|
-
`,parameters:{docs:{description:{story:"When `stay-open-on-select` is set, the panel remains open after item activation. Useful for filter menus where users select multiple options."}}}},
|
|
237
|
+
`,parameters:{docs:{description:{story:"When `stay-open-on-select` is set, the panel remains open after item activation. Useful for filter menus where users select multiple options."}}}},y={render:()=>t`
|
|
229
238
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
230
239
|
<btu-dropdown label="More actions" variant="tertiary" icon-symbol="ellipsis" icon-only tooltip="More actions">
|
|
231
240
|
<btu-dropdown-menu>
|
|
@@ -249,7 +258,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
249
258
|
</btu-dropdown-menu>
|
|
250
259
|
</btu-dropdown>
|
|
251
260
|
</div>
|
|
252
|
-
`,parameters:{docs:{description:{story:"Icon-only dropdowns can display a tooltip on hover/focus via `TooltipMixin`. The tooltip hides automatically when the dropdown panel opens."}}}},
|
|
261
|
+
`,parameters:{docs:{description:{story:"Icon-only dropdowns can display a tooltip on hover/focus via `TooltipMixin`. The tooltip hides automatically when the dropdown panel opens."}}}},g={render:()=>t`
|
|
253
262
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
254
263
|
<btu-dropdown label="Default Message" variant="secondary">
|
|
255
264
|
<btu-dropdown-menu name="Results" header> </btu-dropdown-menu>
|
|
@@ -259,7 +268,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
259
268
|
<btu-dropdown-menu name="Search Results" header empty-message="No results found"> </btu-dropdown-menu>
|
|
260
269
|
</btu-dropdown>
|
|
261
270
|
</div>
|
|
262
|
-
`,parameters:{docs:{description:{story:'When a menu has no focusable items, an empty state message is displayed. Customize with the `empty-message` attribute (default: "No items available").'}}}},
|
|
271
|
+
`,parameters:{docs:{description:{story:'When a menu has no focusable items, an empty state message is displayed. Customize with the `empty-message` attribute (default: "No items available").'}}}},h={render:()=>t`
|
|
263
272
|
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
264
273
|
<button
|
|
265
274
|
class="btu-button btu-button-primary btu-button-md"
|
|
@@ -275,12 +284,12 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
275
284
|
</btu-dropdown-menu>
|
|
276
285
|
</btu-dropdown>
|
|
277
286
|
</div>
|
|
278
|
-
`,parameters:{docs:{description:{story:"The `open` property can be set programmatically to open/close the dropdown from external code (e.g., tour UIs, keyboard shortcuts). It syncs to the native Popover API."}}}},
|
|
287
|
+
`,parameters:{docs:{description:{story:"The `open` property can be set programmatically to open/close the dropdown from external code (e.g., tour UIs, keyboard shortcuts). It syncs to the native Popover API."}}}},v={render:()=>t`
|
|
279
288
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
280
289
|
<btu-dropdown
|
|
281
290
|
label="Rounded Trigger"
|
|
282
291
|
variant="secondary"
|
|
283
|
-
style=${
|
|
292
|
+
style=${f({"--button-border-radius":"9999px"})}
|
|
284
293
|
>
|
|
285
294
|
<btu-dropdown-menu>
|
|
286
295
|
<btu-dropdown-item label="Option A"></btu-dropdown-item>
|
|
@@ -291,7 +300,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
291
300
|
<btu-dropdown
|
|
292
301
|
label="Custom Panel"
|
|
293
302
|
variant="secondary"
|
|
294
|
-
style=${
|
|
303
|
+
style=${f({"--dropdown-panel-border-radius":"1rem","--dropdown-item-hover-background":"oklch(0.95 0.02 250)","--dropdown-item-hover-color":"oklch(0.3 0.1 250)"})}
|
|
295
304
|
>
|
|
296
305
|
<btu-dropdown-menu>
|
|
297
306
|
<btu-dropdown-item label="Option A"></btu-dropdown-item>
|
|
@@ -557,6 +566,24 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
557
566
|
}
|
|
558
567
|
}
|
|
559
568
|
}`,...m.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
569
|
+
render: () => html\`
|
|
570
|
+
<btu-dropdown label="Actions" variant="secondary">
|
|
571
|
+
<btu-dropdown-menu>
|
|
572
|
+
<btu-dropdown-item label="Publish"></btu-dropdown-item>
|
|
573
|
+
<btu-dropdown-item label="SEO" error></btu-dropdown-item>
|
|
574
|
+
<btu-dropdown-item label="Archive"></btu-dropdown-item>
|
|
575
|
+
<btu-dropdown-item label="Overrides" error></btu-dropdown-item>
|
|
576
|
+
</btu-dropdown-menu>
|
|
577
|
+
</btu-dropdown>
|
|
578
|
+
\`,
|
|
579
|
+
parameters: {
|
|
580
|
+
docs: {
|
|
581
|
+
description: {
|
|
582
|
+
story: 'Set \`error\` on a \`btu-dropdown-item\` to show an error badge alongside the label. Used by the \`btu-tabs\` \`menu\` variant to surface validation errors on tab items.'
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}`,...c.parameters?.docs?.source}}};w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
|
|
560
587
|
render: () => html\`
|
|
561
588
|
<btu-dropdown label="Filters" variant="secondary" icon-symbol="filter" stay-open-on-select>
|
|
562
589
|
<btu-dropdown-menu name="Apply Filters" header>
|
|
@@ -574,7 +601,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
574
601
|
}
|
|
575
602
|
}
|
|
576
603
|
}
|
|
577
|
-
}`,...
|
|
604
|
+
}`,...w.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
578
605
|
render: () => html\`
|
|
579
606
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
580
607
|
<btu-dropdown label="More actions" variant="tertiary" icon-symbol="ellipsis" icon-only tooltip="More actions">
|
|
@@ -607,7 +634,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
607
634
|
}
|
|
608
635
|
}
|
|
609
636
|
}
|
|
610
|
-
}`,...
|
|
637
|
+
}`,...y.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
611
638
|
render: () => html\`
|
|
612
639
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
613
640
|
<btu-dropdown label="Default Message" variant="secondary">
|
|
@@ -626,7 +653,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
626
653
|
}
|
|
627
654
|
}
|
|
628
655
|
}
|
|
629
|
-
}`,...
|
|
656
|
+
}`,...g.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
630
657
|
render: () => html\`
|
|
631
658
|
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
632
659
|
<button
|
|
@@ -654,7 +681,7 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
654
681
|
}
|
|
655
682
|
}
|
|
656
683
|
}
|
|
657
|
-
}`,...
|
|
684
|
+
}`,...h.parameters?.docs?.source}}};v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
658
685
|
render: () => html\`
|
|
659
686
|
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
|
660
687
|
<btu-dropdown
|
|
@@ -694,4 +721,4 @@ Follows the WAI-ARIA Menu Button Pattern for keyboard navigation and accessibili
|
|
|
694
721
|
}
|
|
695
722
|
}
|
|
696
723
|
}
|
|
697
|
-
}`,...
|
|
724
|
+
}`,...v.parameters?.docs?.source}}};const P=["Default","Variants","Sizes","WithIcons","Placements","Selection","Checkboxes","FavoritesAndShortcuts","DividersAndSubheads","Disabled","WithError","StayOpenOnSelect","Tooltip","EmptyState","ProgrammaticOpen","CustomStyling"];export{b as Checkboxes,v as CustomStyling,d as Default,m as Disabled,s as DividersAndSubheads,g as EmptyState,u as FavoritesAndShortcuts,l as Placements,h as ProgrammaticOpen,p as Selection,i as Sizes,w as StayOpenOnSelect,y as Tooltip,r as Variants,c as WithError,a as WithIcons,P as __namedExportsOrder,B as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as d}from"./iframe-
|
|
1
|
+
import{x as d}from"./iframe-DloIUNZz.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-DloIUNZz.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-CH1Y739k.js → HueRipple.stories-DjhoxxEw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as i}from"./iframe-
|
|
1
|
+
import{x as i}from"./iframe-DloIUNZz.js";import{b as l}from"./ripple-DQbyyRUw.js";import{B as e}from"./Button-CFLAI1H9.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 d,x as t}from"./iframe-
|
|
1
|
+
import{g as d,x as t}from"./iframe-DloIUNZz.js";import{o as p}from"./style-map-DLXysq3r.js";import{L as c}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:b,argTypes:s}=d("btu-icon"),m=["xs","sm","md","lg","xl"],g=["ai","error","gray","primary","purple","rose","success","teal","warning"],v={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-DuzqvcnN.js → IconButton.stories-KjN28hfc.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-DloIUNZz.js";import{o as b}from"./if-defined-B1RdczOE.js";import{L as d}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:y,argTypes:o}=p("btu-icon-button"),x={title:"Components/Icon Button",component:"btu-icon-button",tags:["autodocs"],parameters:{docs:{subtitle:"Combines button styles with the icon component along with an opinionated API",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>For actions in compact or space-constrained interfaces (toolbars, tables, cards)</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as D,E as h,x as T}from"./iframe-
|
|
1
|
+
import{g as D,E as h,x as T}from"./iframe-DloIUNZz.js";import{o as A}from"./style-map-DLXysq3r.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:P,argTypes:g}=D("btu-linear-progress"),W={title:"Components/Linear Progress",component:"btu-linear-progress",tags:["autodocs"],parameters:{docs:{subtitle:"A horizontal progress bar for showing task completion",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>To show progress of a specific task with known completion percentage</li>
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import{g as m,x as u}from"./iframe-DloIUNZz.js";import{o as g}from"./style-map-DLXysq3r.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
|
+
<h3>When to use:</h3>
|
|
3
|
+
<ul>
|
|
4
|
+
<li>To navigate through large sets of data</li>
|
|
5
|
+
<li>For search results, tables, and lists</li>
|
|
6
|
+
<li>In widgets and calendar views</li>
|
|
7
|
+
</ul>
|
|
8
|
+
|
|
9
|
+
<h3>Variants:</h3>
|
|
10
|
+
<ul>
|
|
11
|
+
<li><strong>Widget</strong> (default): Built-in page size dropdown + total display + navigation</li>
|
|
12
|
+
<li><strong>Search</strong>: With page jumper dropdown (auto-managed by Pagination)</li>
|
|
13
|
+
<li><strong>Widget Small</strong>: Without first/last page buttons</li>
|
|
14
|
+
<li><strong>Calendar</strong>: Custom page-size slot (consumer-managed) + jumper slot</li>
|
|
15
|
+
</ul>
|
|
16
|
+
|
|
17
|
+
<h3>Page size modes:</h3>
|
|
18
|
+
<ul>
|
|
19
|
+
<li><strong>Built-in</strong>: No <code>slot="page-size"</code> — Pagination renders its own <code>btu-dropdown</code> from <code>page-size-options</code> and manages everything automatically.</li>
|
|
20
|
+
<li><strong>Custom</strong>: Provide <code>slot="page-size"</code> — built-in dropdown is suppressed. Consumer owns all behavior (events, label sync, etc.).</li>
|
|
21
|
+
</ul>
|
|
22
|
+
`}},actions:{handles:b},controls:{expanded:!0}},args:{...h,"total-items":200,"boundary-buttons":!0,"hide-on-single-page":!0,"page-size-changer":!0},argTypes:{...y,"--pagination-color-background":{table:{disable:!0}},"--pagination-color-foreground":{table:{disable:!0}},customBackgroundColor:{name:"--pagination-color-background",control:{type:"color"},description:"Custom background color for buttons and dropdowns",table:{category:"CSS Properties"}},customForegroundColor:{name:"--pagination-color-foreground",control:{type:"color"},description:"Custom foreground (text/icon) color",table:{category:"CSS Properties"}}},render:e=>u`
|
|
23
|
+
<btu-pagination
|
|
24
|
+
total-items="${e["total-items"]??200}"
|
|
25
|
+
page="${e.page??1}"
|
|
26
|
+
page-size="${e["page-size"]??0}"
|
|
27
|
+
page-size-options="${e["page-size-options"]??"10, 20, 50"}"
|
|
28
|
+
?disabled="${e.disabled}"
|
|
29
|
+
?loading="${e.loading}"
|
|
30
|
+
.hideOnSinglePage=${e["hide-on-single-page"]??!0}
|
|
31
|
+
.pageSizeChanger=${e["page-size-changer"]??!0}
|
|
32
|
+
.boundaryButtons=${e["boundary-buttons"]??!0}
|
|
33
|
+
.pageJumper=${e["page-jumper"]??!1}
|
|
34
|
+
?hide-total-count=${e["hide-total-count"]}
|
|
35
|
+
style=${g(c(e))}
|
|
36
|
+
></btu-pagination>
|
|
37
|
+
`},a={args:{},parameters:{docs:{description:{story:"Default Widget variant with page size selector, total display, and full navigation controls."}}}},o={args:{"total-items":500,"page-size-options":"10, 25, 50, 100","page-jumper":!0},parameters:{docs:{description:{story:'Search variant with `page-jumper` enabled. The built-in dropdown renders "Page 1" through "Page N" and updates automatically when page size or total items change.'}}}},s={args:{"total-items":100,"boundary-buttons":!1},parameters:{docs:{description:{story:"Compact widget variant without first/last page buttons. Suitable for tight spaces."}}}},i={args:{"total-items":52},render:e=>u`
|
|
38
|
+
<btu-pagination
|
|
39
|
+
total-items="${e["total-items"]??52}"
|
|
40
|
+
page="${e.page??1}"
|
|
41
|
+
page-size="1"
|
|
42
|
+
?disabled="${e.disabled}"
|
|
43
|
+
?loading="${e.loading}"
|
|
44
|
+
.hideOnSinglePage=${e["hide-on-single-page"]??!0}
|
|
45
|
+
.pageSizeChanger=${!1}
|
|
46
|
+
.boundaryButtons=${e["boundary-buttons"]??!0}
|
|
47
|
+
?hide-total-count=${e["hide-total-count"]}
|
|
48
|
+
style=${g(c(e))}
|
|
49
|
+
>
|
|
50
|
+
<btu-dropdown
|
|
51
|
+
slot="page-size"
|
|
52
|
+
label="Week"
|
|
53
|
+
variant="secondary"
|
|
54
|
+
size="small"
|
|
55
|
+
aria-label="View type"
|
|
56
|
+
@btu-dropdown-item-select=${t=>{t.currentTarget.label=t.detail.label}}
|
|
57
|
+
>
|
|
58
|
+
<btu-dropdown-menu>
|
|
59
|
+
<btu-dropdown-item label="Week" value="week" selected></btu-dropdown-item>
|
|
60
|
+
<btu-dropdown-item label="Month" value="month"></btu-dropdown-item>
|
|
61
|
+
</btu-dropdown-menu>
|
|
62
|
+
</btu-dropdown>
|
|
63
|
+
<button
|
|
64
|
+
slot="jumper"
|
|
65
|
+
class="btu-button btu-button-sm"
|
|
66
|
+
@click=${t=>{const n=t.target.closest("btu-pagination");n&&(n.page=1)}}
|
|
67
|
+
>
|
|
68
|
+
Today
|
|
69
|
+
</button>
|
|
70
|
+
</btu-pagination>
|
|
71
|
+
`,parameters:{docs:{description:{story:'Calendar variant using `slot="page-size"` with a consumer-managed `btu-dropdown` for week/month selection and `slot="jumper"` for a Today button. The page-size dropdown is fully consumer-owned — Pagination does not manage its events or label.'}}}},r={args:{"total-items":200,loading:!0},parameters:{docs:{description:{story:"Loading state shows a spinner and dims the navigation controls. The `aria-busy` attribute is set on the live region."}}}},l={args:{"total-items":200,disabled:!0,page:3},parameters:{docs:{description:{story:"Disabled state prevents all interaction. All buttons and dropdowns receive the native `disabled` attribute."}}}},d={render:()=>{const e=t=>{const n=t.target;n.loading=!0,setTimeout(()=>{n.loading=!1},1e3)};return u`
|
|
72
|
+
<div class="flex flex-col gap-4">
|
|
73
|
+
<div class="flex items-center gap-2">
|
|
74
|
+
<label for="total-input" class="text-sm font-medium">Total Items:</label>
|
|
75
|
+
<input
|
|
76
|
+
id="total-input"
|
|
77
|
+
type="number"
|
|
78
|
+
value="200"
|
|
79
|
+
min="0"
|
|
80
|
+
class="w-24 rounded border px-2 py-1 text-sm"
|
|
81
|
+
@input=${t=>{const n=t.target,p=n.closest(".flex.flex-col")?.querySelector("btu-pagination");p&&(p.totalItems=parseInt(n.value,10)||0)}}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<btu-pagination
|
|
85
|
+
total-items="200"
|
|
86
|
+
@btu-pagination-change=${e}
|
|
87
|
+
@btu-pagination-page-size-change=${e}
|
|
88
|
+
></btu-pagination>
|
|
89
|
+
</div>
|
|
90
|
+
`},parameters:{docs:{description:{story:"Interactive example demonstrating dynamic `totalItems` changes at runtime. Navigation triggers a simulated 1s loading state."}}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
91
|
+
args: {},
|
|
92
|
+
parameters: {
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
story: 'Default Widget variant with page size selector, total display, and full navigation controls.'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}`,...a.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
100
|
+
args: {
|
|
101
|
+
'total-items': 500,
|
|
102
|
+
'page-size-options': '10, 25, 50, 100',
|
|
103
|
+
'page-jumper': true
|
|
104
|
+
},
|
|
105
|
+
parameters: {
|
|
106
|
+
docs: {
|
|
107
|
+
description: {
|
|
108
|
+
story: 'Search variant with \`page-jumper\` enabled. The built-in dropdown renders "Page 1" through "Page N" and updates automatically when page size or total items change.'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}`,...o.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
113
|
+
args: {
|
|
114
|
+
'total-items': 100,
|
|
115
|
+
'boundary-buttons': false
|
|
116
|
+
},
|
|
117
|
+
parameters: {
|
|
118
|
+
docs: {
|
|
119
|
+
description: {
|
|
120
|
+
story: 'Compact widget variant without first/last page buttons. Suitable for tight spaces.'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}`,...s.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
125
|
+
args: {
|
|
126
|
+
'total-items': 52
|
|
127
|
+
},
|
|
128
|
+
render: args => html\`
|
|
129
|
+
<btu-pagination
|
|
130
|
+
total-items="\${args['total-items'] ?? 52}"
|
|
131
|
+
page="\${args.page ?? 1}"
|
|
132
|
+
page-size="1"
|
|
133
|
+
?disabled="\${args.disabled}"
|
|
134
|
+
?loading="\${args.loading}"
|
|
135
|
+
.hideOnSinglePage=\${args['hide-on-single-page'] ?? true}
|
|
136
|
+
.pageSizeChanger=\${false}
|
|
137
|
+
.boundaryButtons=\${args['boundary-buttons'] ?? true}
|
|
138
|
+
?hide-total-count=\${args['hide-total-count']}
|
|
139
|
+
style=\${styleMap(paginationStyles(args))}
|
|
140
|
+
>
|
|
141
|
+
<btu-dropdown
|
|
142
|
+
slot="page-size"
|
|
143
|
+
label="Week"
|
|
144
|
+
variant="secondary"
|
|
145
|
+
size="small"
|
|
146
|
+
aria-label="View type"
|
|
147
|
+
@btu-dropdown-item-select=\${(e: CustomEvent<{
|
|
148
|
+
label: string;
|
|
149
|
+
value: string;
|
|
150
|
+
selected: boolean;
|
|
151
|
+
}>) => {
|
|
152
|
+
;
|
|
153
|
+
(e.currentTarget as HTMLElement & {
|
|
154
|
+
label: string;
|
|
155
|
+
}).label = e.detail.label;
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<btu-dropdown-menu>
|
|
159
|
+
<btu-dropdown-item label="Week" value="week" selected></btu-dropdown-item>
|
|
160
|
+
<btu-dropdown-item label="Month" value="month"></btu-dropdown-item>
|
|
161
|
+
</btu-dropdown-menu>
|
|
162
|
+
</btu-dropdown>
|
|
163
|
+
<button
|
|
164
|
+
slot="jumper"
|
|
165
|
+
class="btu-button btu-button-sm"
|
|
166
|
+
@click=\${(e: Event) => {
|
|
167
|
+
const pagination = (e.target as HTMLElement).closest('btu-pagination');
|
|
168
|
+
if (pagination) pagination.page = 1;
|
|
169
|
+
}}
|
|
170
|
+
>
|
|
171
|
+
Today
|
|
172
|
+
</button>
|
|
173
|
+
</btu-pagination>
|
|
174
|
+
\`,
|
|
175
|
+
parameters: {
|
|
176
|
+
docs: {
|
|
177
|
+
description: {
|
|
178
|
+
story: 'Calendar variant using \`slot="page-size"\` with a consumer-managed \`btu-dropdown\` for week/month selection and \`slot="jumper"\` for a Today button. The page-size dropdown is fully consumer-owned — Pagination does not manage its events or label.'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}`,...i.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
183
|
+
args: {
|
|
184
|
+
'total-items': 200,
|
|
185
|
+
loading: true
|
|
186
|
+
},
|
|
187
|
+
parameters: {
|
|
188
|
+
docs: {
|
|
189
|
+
description: {
|
|
190
|
+
story: 'Loading state shows a spinner and dims the navigation controls. The \`aria-busy\` attribute is set on the live region.'
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}`,...r.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
195
|
+
args: {
|
|
196
|
+
'total-items': 200,
|
|
197
|
+
disabled: true,
|
|
198
|
+
page: 3
|
|
199
|
+
},
|
|
200
|
+
parameters: {
|
|
201
|
+
docs: {
|
|
202
|
+
description: {
|
|
203
|
+
story: 'Disabled state prevents all interaction. All buttons and dropdowns receive the native \`disabled\` attribute.'
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}`,...l.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
208
|
+
render: () => {
|
|
209
|
+
const simulateLoading = (e: CustomEvent) => {
|
|
210
|
+
const pagination = e.target as HTMLElement & {
|
|
211
|
+
loading: boolean;
|
|
212
|
+
};
|
|
213
|
+
pagination.loading = true;
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
pagination.loading = false;
|
|
216
|
+
}, 1000);
|
|
217
|
+
};
|
|
218
|
+
return html\`
|
|
219
|
+
<div class="flex flex-col gap-4">
|
|
220
|
+
<div class="flex items-center gap-2">
|
|
221
|
+
<label for="total-input" class="text-sm font-medium">Total Items:</label>
|
|
222
|
+
<input
|
|
223
|
+
id="total-input"
|
|
224
|
+
type="number"
|
|
225
|
+
value="200"
|
|
226
|
+
min="0"
|
|
227
|
+
class="w-24 rounded border px-2 py-1 text-sm"
|
|
228
|
+
@input=\${(e: Event) => {
|
|
229
|
+
const input = e.target as HTMLInputElement;
|
|
230
|
+
const pagination = (input.closest('.flex.flex-col') as HTMLElement)?.querySelector('btu-pagination') as HTMLElement & {
|
|
231
|
+
totalItems: number;
|
|
232
|
+
};
|
|
233
|
+
if (pagination) pagination.totalItems = parseInt(input.value, 10) || 0;
|
|
234
|
+
}}
|
|
235
|
+
/>
|
|
236
|
+
</div>
|
|
237
|
+
<btu-pagination
|
|
238
|
+
total-items="200"
|
|
239
|
+
@btu-pagination-change=\${simulateLoading}
|
|
240
|
+
@btu-pagination-page-size-change=\${simulateLoading}
|
|
241
|
+
></btu-pagination>
|
|
242
|
+
</div>
|
|
243
|
+
\`;
|
|
244
|
+
},
|
|
245
|
+
parameters: {
|
|
246
|
+
docs: {
|
|
247
|
+
description: {
|
|
248
|
+
story: 'Interactive example demonstrating dynamic \`totalItems\` changes at runtime. Navigation triggers a simulated 1s loading state.'
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}`,...d.parameters?.docs?.source}}};const z=["Default","Search","WidgetSmall","Calendar","Loading","Disabled","DynamicTotal"];export{i as Calendar,a as Default,l as Disabled,d as DynamicTotal,r as Loading,o as Search,s as WidgetSmall,z as __namedExportsOrder,$ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as a,x as r}from"./iframe-
|
|
1
|
+
import{g as a,x as r}from"./iframe-DloIUNZz.js";import{o as c}from"./if-defined-B1RdczOE.js";import{o as d}from"./style-map-DLXysq3r.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:g,argTypes:e}=a("btu-popover"),y={title:"Components/Popover",component:"btu-popover",tags:["autodocs"],parameters:{docs:{subtitle:"Rich interactive content anchored to a trigger element",description:{component:`
|
|
2
2
|
\`btu-popover\` displays rich interactive content anchored to a trigger element using CSS anchor positioning and the native Popover API.
|
|
3
3
|
|
|
4
4
|
<h3>When to use:</h3>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-DloIUNZz.js";const i=t=>{class n extends t{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-element-connected",{}),e=>this.emit("btu-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-element-disconnected")}emit(e,c){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c}))}}return n},l=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{i as E,l as R};
|