@brightspot/ui 1.9.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/copy-to-clipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/CopyToClipboard.js +4 -0
- package/dist/components/copy-to-clipboard/CopyToClipboard.js.map +1 -1
- 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/switch/Switch.d.ts +92 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +189 -0
- package/dist/components/switch/Switch.js.map +1 -0
- 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 +2736 -1390
- package/dist/effects/celebrate.d.ts +18 -0
- package/dist/effects/celebrate.d.ts.map +1 -0
- package/dist/effects/celebrate.js +81 -0
- package/dist/effects/celebrate.js.map +1 -0
- package/dist/effects/ripple.d.ts +31 -0
- package/dist/effects/ripple.d.ts.map +1 -0
- package/dist/effects/ripple.js +131 -0
- package/dist/effects/ripple.js.map +1 -0
- package/dist/effects/sparkle-worklet.d.ts +7 -0
- package/dist/effects/sparkle-worklet.d.ts.map +1 -0
- package/dist/effects/sparkle-worklet.js +211 -0
- package/dist/effects/sparkle-worklet.js.map +1 -0
- package/dist/effects/sparkle.d.ts +6 -0
- package/dist/effects/sparkle.d.ts.map +1 -0
- package/dist/effects/sparkle.js +91 -0
- package/dist/effects/sparkle.js.map +1 -0
- package/dist/storybook/BSPLogoMark.svg +3 -0
- package/dist/storybook/WelcomeBG.svg +292 -0
- 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-Du1qM73U.js → Avatar.stories-Da-mRj6_.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-DxwZQE-q.js → AvatarGroup.stories-BQlaC_yl.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-CfvkMIx2.js → Badge.stories-DnVnOrnF.js} +1 -1
- package/dist/storybook/assets/Button-CFLAI1H9.js +10 -0
- package/dist/storybook/assets/Button.stories-DxaBOjwv.js +54 -0
- package/dist/storybook/assets/Celebrate.stories-CuMm15Nr.js +184 -0
- package/dist/storybook/assets/{CircularProgress.stories-rPzKwQYD.js → CircularProgress.stories-DRN8Mtvj.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BlUeYDSi.js → ClipboardMixin.stories-DR7Ou2Av.js} +1 -1
- package/dist/storybook/assets/Color-6BZIO3FS-Die62Y0Z.js +1 -0
- package/dist/storybook/assets/{Colors.stories-BspfjZ5q.js → Colors.stories-bIq_ssbI.js} +1 -1
- package/dist/storybook/assets/CombinedEffects.stories-CtKzOUZn.js +355 -0
- package/dist/storybook/assets/{ComponentStatesMixin-eTV7XXqB.js → ComponentStatesMixin-DMLCk9fE.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BbLSY3df.js → ComponentStatesMixin.stories-D8UI9o-d.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-B2ailiFF.js → CopyToClipboard.stories-ti6CpJNp.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-DJmp4eNo.js → Debounce.stories-DzZUSvbk.js} +1 -1
- package/dist/storybook/assets/DocsRenderer-LL677BLK-CIRGv5IX.js +10 -0
- package/dist/storybook/assets/{Dropdown.stories-Dd6vKiDd.js → Dropdown.stories-Lt4cY0Re.js} +41 -14
- package/dist/storybook/assets/{Events.stories-Byj-VOM9.js → Events.stories-B1ddcgpT.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-Dqw-wzpx.js → Heading.stories-DI4w61cf.js} +1 -1
- package/dist/storybook/assets/HueRipple.stories-DjhoxxEw.js +310 -0
- package/dist/storybook/assets/{Icon.stories-Bp1nvWER.js → Icon.stories-CpziAhae.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-o9g9mGdh.js → IconButton.stories-KjN28hfc.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DnXQVpzX.js → LinearProgress.stories-DcIpdz6R.js} +1 -1
- package/dist/storybook/assets/Pagination.stories-BBkLEwoP.js +252 -0
- package/dist/storybook/assets/{Popover.stories-BvavsRfq.js → Popover.stories-DLv48c2h.js} +3 -11
- package/dist/storybook/assets/{ReadyMixin-6On1MFFr.js → ReadyMixin-Cw2Dfbu2.js} +1 -1
- package/dist/storybook/assets/RovingTabindexMixin.stories-BWaFx9mu.js +192 -0
- package/dist/storybook/assets/{Rtc.stories-Bb5Y-908.js → Rtc.stories-Ve7Bwo_l.js} +1 -1
- package/dist/storybook/assets/ScrollShadow.stories-C6XmrRLm.js +17 -0
- package/dist/storybook/assets/Switch.stories-Cf8WM1LG.js +312 -0
- 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-DmP-yKke.js → Throttle.stories-BqxVIb-r.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-Dl6xHBaM.js → Tooltip.stories-B6fw6875.js} +3 -7
- package/dist/storybook/assets/Welcome.stories-CfJtSM19.js +215 -0
- package/dist/storybook/assets/{Widget.stories-BjXfgNjZ.js → Widget.stories-CiOho7lO.js} +1 -1
- package/dist/storybook/assets/WithTooltip-65CFNBJE-PGcopp73.js +9 -0
- package/dist/storybook/assets/blocks-dP2DwISI.js +707 -0
- package/dist/storybook/assets/celebrate-KwPoF1K3.js +21 -0
- package/dist/storybook/assets/formatter-EIJCOSYU-CZSAC3tg.js +1 -0
- package/dist/storybook/assets/if-defined-B1RdczOE.js +1 -0
- package/dist/storybook/assets/iframe-DloIUNZz.js +1104 -0
- package/dist/storybook/assets/{iframe-CNxIA3cQ.css → iframe-bJgLXZKK.css} +1 -1
- package/dist/storybook/assets/index-DKF0ypu5.js +1 -0
- package/dist/storybook/assets/onFind-C0l4Gew0.js +1 -0
- package/dist/storybook/assets/{onFind.stories-B2GYLrjV.js → onFind.stories-DOTt9puO.js} +2 -2
- package/dist/storybook/assets/{onRemove.stories-CoLJFkWa.js → onRemove.stories-CQ9ZC5dm.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DOeZx7wi.js → onVisible.stories-Cbj5_Vz0.js} +2 -2
- package/dist/storybook/assets/position-CFNQy3J6.js +1 -0
- package/dist/storybook/assets/ripple-DQbyyRUw.js +251 -0
- package/dist/storybook/assets/style-map-DLXysq3r.js +1 -0
- package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-Bjjbl9ca.js +6 -0
- package/dist/storybook/brightspot-logo.svg +19 -0
- package/dist/storybook/iframe.html +23 -3
- package/dist/storybook/index.html +42 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +3 -0
- 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-switch.d.ts +2 -0
- package/dist/tailwind-plugin-switch.d.ts.map +1 -0
- package/dist/tailwind-plugin-switch.js +223 -0
- package/dist/tailwind-plugin-switch.js.map +1 -0
- package/dist/tailwind-plugin-switch.ts +252 -0
- 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 +21 -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/dist/util/position.d.ts +9 -0
- package/dist/util/position.d.ts.map +1 -0
- package/dist/util/position.js +11 -0
- package/dist/util/position.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 +5 -0
- package/docs/components/Switch.md +79 -0
- package/docs/components/Tab.md +73 -0
- package/docs/components/Tabs.md +77 -0
- package/package.json +2 -1
- package/dist/storybook/assets/Button.stories-hDMDDh81.js +0 -63
- package/dist/storybook/assets/Color-6BZIO3FS-C_nQSB2u.js +0 -1
- package/dist/storybook/assets/DocsRenderer-LL677BLK-56Pige1J.js +0 -758
- package/dist/storybook/assets/Pagination.stories-DQD8uvDc.js +0 -272
- package/dist/storybook/assets/ScrollShadow.stories-ZovRXpte.js +0 -17
- package/dist/storybook/assets/WithTooltip-65CFNBJE-CGB5q-AN.js +0 -9
- package/dist/storybook/assets/_commonjsHelpers-CqkleIqs.js +0 -1
- package/dist/storybook/assets/formatter-EIJCOSYU-BhNtSFM9.js +0 -1
- package/dist/storybook/assets/if-defined-BFyUeSVF.js +0 -1
- package/dist/storybook/assets/iframe-BeKreX-l.js +0 -1061
- package/dist/storybook/assets/index-Uz2kGy8J.js +0 -1
- package/dist/storybook/assets/onFind-DqriYjEB.js +0 -1
- package/dist/storybook/assets/style-map-CmHqpCu1.js +0 -1
- package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-BqFfcc7x.js +0 -6
|
@@ -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};
|
|
@@ -0,0 +1,310 @@
|
|
|
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
|
+
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
|
+
|
|
4
|
+
### Usage
|
|
5
|
+
|
|
6
|
+
\`\`\`ts
|
|
7
|
+
import { btuRipple } from '@brightspot/ui/effects/ripple.js'
|
|
8
|
+
|
|
9
|
+
// Imperative — pass a MouseEvent, Element, or {x, y}
|
|
10
|
+
button.addEventListener('click', (e) => btuRipple({ position: e }))
|
|
11
|
+
|
|
12
|
+
// Event-driven
|
|
13
|
+
const teardown = btuRipple.listen()
|
|
14
|
+
el.dispatchEvent(new CustomEvent('btu-effect-ripple', {
|
|
15
|
+
detail: { position: el, duration: 800 },
|
|
16
|
+
bubbles: true, composed: true,
|
|
17
|
+
}))
|
|
18
|
+
|
|
19
|
+
// Global defaults
|
|
20
|
+
btuRipple.setDefaults({ duration: 800, contrast: 2 })
|
|
21
|
+
\`\`\`
|
|
22
|
+
`}},controls:{expanded:!0}},argTypes:{duration:{control:{type:"range",min:500,max:5e3,step:100},description:"Animation duration (ms)"},ringWidth:{control:{type:"range",min:10,max:100,step:5},description:"Width of the hue-shifted band (px)"},feather:{control:{type:"range",min:10,max:120,step:5},description:"Feathered edge transition width (px)"},hueShift:{control:{type:"range",min:0,max:330,step:30},description:"OKLCH hue rotation amount (degrees)"},contrast:{control:{type:"range",min:.5,max:3,step:.1},description:"Contrast multiplier (1 = normal, >1 = higher contrast)"},saturate:{control:{type:"range",min:0,max:5,step:.5},description:"Saturation multiplier (1 = normal, >1 = hyper-saturated, <1 = desaturated)"}},args:{duration:2e3,ringWidth:30,feather:45,hueShift:180,contrast:1,saturate:1}},t={args:{duration:1200,ringWidth:40,feather:75,hueShift:0,contrast:1.8,saturate:1.5},render:a=>i`
|
|
23
|
+
<div @click=${r=>l({position:r,...a})} class="bg-gray-50" style="min-height: 80vh;">
|
|
24
|
+
<div class="flex flex-col gap-8 p-6">
|
|
25
|
+
<!-- Header -->
|
|
26
|
+
<div class="flex flex-col gap-2">
|
|
27
|
+
<h2 class="text-2xl font-semibold text-gray-900">Hue Ripple</h2>
|
|
28
|
+
<p class="text-sm text-gray-500">
|
|
29
|
+
Click anywhere. The expanding ring shifts underlying colors and returns to normal after the ring passes.
|
|
30
|
+
</p>
|
|
31
|
+
<p class="bg-warning-50 text-warning-700 border-warning-200 rounded-md border px-3 py-2 text-xs">
|
|
32
|
+
⚠ The UI is non-interactive during the view transition.
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Button row -->
|
|
37
|
+
<div class="flex flex-col gap-3">
|
|
38
|
+
<h3 class="text-sm font-medium text-gray-700">Buttons</h3>
|
|
39
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
40
|
+
${e({color:"primary",fill:!0,contained:!0,size:"lg",label:"Primary",icon:"zap"})}
|
|
41
|
+
${e({color:"error",fill:!0,contained:!0,size:"md",label:"Error"})}
|
|
42
|
+
${e({color:"success",fill:!0,contained:!0,size:"md",label:"Success",icon:"check"})}
|
|
43
|
+
${e({color:"teal",fill:!0,contained:!0,size:"sm",label:"Teal"})}
|
|
44
|
+
${e({color:"purple",fill:!0,contained:!0,size:"sm",label:"Purple"})}
|
|
45
|
+
${e({color:"warning",fill:!0,contained:!0,size:"sm",label:"Warning",icon:"triangle-alert"})}
|
|
46
|
+
${e({color:"rose",fill:!0,contained:!0,size:"sm",label:"Rose"})}
|
|
47
|
+
</div>
|
|
48
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
49
|
+
${e({color:"primary",fill:!1,contained:!0,size:"md",label:"Contained"})}
|
|
50
|
+
${e({color:"primary",fill:!1,outlined:!0,size:"md",label:"Outlined",icon:"star"})}
|
|
51
|
+
${e({color:"black",fill:!0,contained:!0,size:"md",label:"Black"})}
|
|
52
|
+
${e({color:"white",fill:!0,contained:!0,size:"md",label:"White"})}
|
|
53
|
+
${e({color:"ai",fill:!0,contained:!0,size:"md",label:"AI",icon:"sparkles"})}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- Badges -->
|
|
58
|
+
<div class="flex flex-col gap-3">
|
|
59
|
+
<h3 class="text-sm font-medium text-gray-700">Badges</h3>
|
|
60
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
61
|
+
<btu-badge variant="primary" size="lg">Primary</btu-badge>
|
|
62
|
+
<btu-badge variant="success" size="md">Published</btu-badge>
|
|
63
|
+
<btu-badge variant="error" size="md" dot>Error</btu-badge>
|
|
64
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
65
|
+
<btu-badge variant="info" size="sm">Info</btu-badge>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- Avatars -->
|
|
70
|
+
<div class="flex flex-col gap-3">
|
|
71
|
+
<h3 class="text-sm font-medium text-gray-700">Avatars</h3>
|
|
72
|
+
<div class="flex items-center gap-3">
|
|
73
|
+
<btu-avatar fallback="AB" size="lg" style="--avatar-bg-color: oklch(65% 0.2 264)"></btu-avatar>
|
|
74
|
+
<btu-avatar fallback="CD" size="lg" style="--avatar-bg-color: oklch(65% 0.2 27)"></btu-avatar>
|
|
75
|
+
<btu-avatar fallback="EF" size="lg" style="--avatar-bg-color: oklch(65% 0.2 157)"></btu-avatar>
|
|
76
|
+
<btu-avatar fallback="GH" size="lg" style="--avatar-bg-color: oklch(65% 0.2 330)"></btu-avatar>
|
|
77
|
+
<btu-avatar fallback="IJ" size="md" style="--avatar-bg-color: oklch(65% 0.2 60)"></btu-avatar>
|
|
78
|
+
<btu-avatar fallback="KL" size="md" style="--avatar-bg-color: oklch(65% 0.2 180)"></btu-avatar>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<!-- Colored cards -->
|
|
83
|
+
<div class="flex flex-col gap-3">
|
|
84
|
+
<h3 class="text-sm font-medium text-gray-700">Color Swatches</h3>
|
|
85
|
+
<div class="grid grid-cols-3 gap-3 sm:grid-cols-6">
|
|
86
|
+
<div
|
|
87
|
+
class="bg-primary-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
88
|
+
>
|
|
89
|
+
Primary
|
|
90
|
+
</div>
|
|
91
|
+
<div class="flex h-20 items-center justify-center rounded-lg bg-teal-500 text-sm font-medium text-white">
|
|
92
|
+
Teal
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
class="flex h-20 items-center justify-center rounded-lg bg-purple-500 text-sm font-medium text-white"
|
|
96
|
+
>
|
|
97
|
+
Purple
|
|
98
|
+
</div>
|
|
99
|
+
<div class="bg-error-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white">
|
|
100
|
+
Error
|
|
101
|
+
</div>
|
|
102
|
+
<div
|
|
103
|
+
class="bg-success-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
104
|
+
>
|
|
105
|
+
Success
|
|
106
|
+
</div>
|
|
107
|
+
<div
|
|
108
|
+
class="bg-warning-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
109
|
+
>
|
|
110
|
+
Warning
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`,parameters:{docs:{description:{story:"Full demo scene. Click anywhere — the ring reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal."}}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
|
|
117
|
+
args: {
|
|
118
|
+
duration: 1200,
|
|
119
|
+
ringWidth: 40,
|
|
120
|
+
feather: 75,
|
|
121
|
+
hueShift: 0,
|
|
122
|
+
contrast: 1.8,
|
|
123
|
+
saturate: 1.5
|
|
124
|
+
},
|
|
125
|
+
render: args => {
|
|
126
|
+
const onClick = (e: MouseEvent) => btuRipple({
|
|
127
|
+
position: e,
|
|
128
|
+
...args
|
|
129
|
+
});
|
|
130
|
+
return html\`
|
|
131
|
+
<div @click=\${onClick} class="bg-gray-50" style="min-height: 80vh;">
|
|
132
|
+
<div class="flex flex-col gap-8 p-6">
|
|
133
|
+
<!-- Header -->
|
|
134
|
+
<div class="flex flex-col gap-2">
|
|
135
|
+
<h2 class="text-2xl font-semibold text-gray-900">Hue Ripple</h2>
|
|
136
|
+
<p class="text-sm text-gray-500">
|
|
137
|
+
Click anywhere. The expanding ring shifts underlying colors and returns to normal after the ring passes.
|
|
138
|
+
</p>
|
|
139
|
+
<p class="bg-warning-50 text-warning-700 border-warning-200 rounded-md border px-3 py-2 text-xs">
|
|
140
|
+
⚠ The UI is non-interactive during the view transition.
|
|
141
|
+
</p>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Button row -->
|
|
145
|
+
<div class="flex flex-col gap-3">
|
|
146
|
+
<h3 class="text-sm font-medium text-gray-700">Buttons</h3>
|
|
147
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
148
|
+
\${Button({
|
|
149
|
+
color: 'primary',
|
|
150
|
+
fill: true,
|
|
151
|
+
contained: true,
|
|
152
|
+
size: 'lg',
|
|
153
|
+
label: 'Primary',
|
|
154
|
+
icon: 'zap'
|
|
155
|
+
})}
|
|
156
|
+
\${Button({
|
|
157
|
+
color: 'error',
|
|
158
|
+
fill: true,
|
|
159
|
+
contained: true,
|
|
160
|
+
size: 'md',
|
|
161
|
+
label: 'Error'
|
|
162
|
+
})}
|
|
163
|
+
\${Button({
|
|
164
|
+
color: 'success',
|
|
165
|
+
fill: true,
|
|
166
|
+
contained: true,
|
|
167
|
+
size: 'md',
|
|
168
|
+
label: 'Success',
|
|
169
|
+
icon: 'check'
|
|
170
|
+
})}
|
|
171
|
+
\${Button({
|
|
172
|
+
color: 'teal',
|
|
173
|
+
fill: true,
|
|
174
|
+
contained: true,
|
|
175
|
+
size: 'sm',
|
|
176
|
+
label: 'Teal'
|
|
177
|
+
})}
|
|
178
|
+
\${Button({
|
|
179
|
+
color: 'purple',
|
|
180
|
+
fill: true,
|
|
181
|
+
contained: true,
|
|
182
|
+
size: 'sm',
|
|
183
|
+
label: 'Purple'
|
|
184
|
+
})}
|
|
185
|
+
\${Button({
|
|
186
|
+
color: 'warning',
|
|
187
|
+
fill: true,
|
|
188
|
+
contained: true,
|
|
189
|
+
size: 'sm',
|
|
190
|
+
label: 'Warning',
|
|
191
|
+
icon: 'triangle-alert'
|
|
192
|
+
})}
|
|
193
|
+
\${Button({
|
|
194
|
+
color: 'rose',
|
|
195
|
+
fill: true,
|
|
196
|
+
contained: true,
|
|
197
|
+
size: 'sm',
|
|
198
|
+
label: 'Rose'
|
|
199
|
+
})}
|
|
200
|
+
</div>
|
|
201
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
202
|
+
\${Button({
|
|
203
|
+
color: 'primary',
|
|
204
|
+
fill: false,
|
|
205
|
+
contained: true,
|
|
206
|
+
size: 'md',
|
|
207
|
+
label: 'Contained'
|
|
208
|
+
})}
|
|
209
|
+
\${Button({
|
|
210
|
+
color: 'primary',
|
|
211
|
+
fill: false,
|
|
212
|
+
outlined: true,
|
|
213
|
+
size: 'md',
|
|
214
|
+
label: 'Outlined',
|
|
215
|
+
icon: 'star'
|
|
216
|
+
})}
|
|
217
|
+
\${Button({
|
|
218
|
+
color: 'black',
|
|
219
|
+
fill: true,
|
|
220
|
+
contained: true,
|
|
221
|
+
size: 'md',
|
|
222
|
+
label: 'Black'
|
|
223
|
+
})}
|
|
224
|
+
\${Button({
|
|
225
|
+
color: 'white',
|
|
226
|
+
fill: true,
|
|
227
|
+
contained: true,
|
|
228
|
+
size: 'md',
|
|
229
|
+
label: 'White'
|
|
230
|
+
})}
|
|
231
|
+
\${Button({
|
|
232
|
+
color: 'ai',
|
|
233
|
+
fill: true,
|
|
234
|
+
contained: true,
|
|
235
|
+
size: 'md',
|
|
236
|
+
label: 'AI',
|
|
237
|
+
icon: 'sparkles'
|
|
238
|
+
})}
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<!-- Badges -->
|
|
243
|
+
<div class="flex flex-col gap-3">
|
|
244
|
+
<h3 class="text-sm font-medium text-gray-700">Badges</h3>
|
|
245
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
246
|
+
<btu-badge variant="primary" size="lg">Primary</btu-badge>
|
|
247
|
+
<btu-badge variant="success" size="md">Published</btu-badge>
|
|
248
|
+
<btu-badge variant="error" size="md" dot>Error</btu-badge>
|
|
249
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
250
|
+
<btu-badge variant="info" size="sm">Info</btu-badge>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<!-- Avatars -->
|
|
255
|
+
<div class="flex flex-col gap-3">
|
|
256
|
+
<h3 class="text-sm font-medium text-gray-700">Avatars</h3>
|
|
257
|
+
<div class="flex items-center gap-3">
|
|
258
|
+
<btu-avatar fallback="AB" size="lg" style="--avatar-bg-color: oklch(65% 0.2 264)"></btu-avatar>
|
|
259
|
+
<btu-avatar fallback="CD" size="lg" style="--avatar-bg-color: oklch(65% 0.2 27)"></btu-avatar>
|
|
260
|
+
<btu-avatar fallback="EF" size="lg" style="--avatar-bg-color: oklch(65% 0.2 157)"></btu-avatar>
|
|
261
|
+
<btu-avatar fallback="GH" size="lg" style="--avatar-bg-color: oklch(65% 0.2 330)"></btu-avatar>
|
|
262
|
+
<btu-avatar fallback="IJ" size="md" style="--avatar-bg-color: oklch(65% 0.2 60)"></btu-avatar>
|
|
263
|
+
<btu-avatar fallback="KL" size="md" style="--avatar-bg-color: oklch(65% 0.2 180)"></btu-avatar>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- Colored cards -->
|
|
268
|
+
<div class="flex flex-col gap-3">
|
|
269
|
+
<h3 class="text-sm font-medium text-gray-700">Color Swatches</h3>
|
|
270
|
+
<div class="grid grid-cols-3 gap-3 sm:grid-cols-6">
|
|
271
|
+
<div
|
|
272
|
+
class="bg-primary-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
273
|
+
>
|
|
274
|
+
Primary
|
|
275
|
+
</div>
|
|
276
|
+
<div class="flex h-20 items-center justify-center rounded-lg bg-teal-500 text-sm font-medium text-white">
|
|
277
|
+
Teal
|
|
278
|
+
</div>
|
|
279
|
+
<div
|
|
280
|
+
class="flex h-20 items-center justify-center rounded-lg bg-purple-500 text-sm font-medium text-white"
|
|
281
|
+
>
|
|
282
|
+
Purple
|
|
283
|
+
</div>
|
|
284
|
+
<div class="bg-error-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white">
|
|
285
|
+
Error
|
|
286
|
+
</div>
|
|
287
|
+
<div
|
|
288
|
+
class="bg-success-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
289
|
+
>
|
|
290
|
+
Success
|
|
291
|
+
</div>
|
|
292
|
+
<div
|
|
293
|
+
class="bg-warning-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
294
|
+
>
|
|
295
|
+
Warning
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
\`;
|
|
302
|
+
},
|
|
303
|
+
parameters: {
|
|
304
|
+
docs: {
|
|
305
|
+
description: {
|
|
306
|
+
story: 'Full demo scene. Click anywhere — the ring reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal.'
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}`,...t.parameters?.docs?.source}}};const g=["Default"];export{t as Default,g as __namedExportsOrder,m as default};
|
|
@@ -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-o9g9mGdh.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>
|