@brightspot/ui 5.0.4-pre.20260624 → 5.2.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 +7 -2
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.js +23 -16
- 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/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/esca-avatar/EscaAvatar.d.ts +70 -0
- package/dist/components/esca-avatar/EscaAvatar.d.ts.map +1 -0
- package/dist/components/esca-avatar/EscaAvatar.js +218 -0
- package/dist/components/esca-avatar/EscaAvatar.js.map +1 -0
- package/dist/components/esca-avatar/animations/esca-search.json +1 -0
- package/dist/components/esca-avatar/animations/esca-task-complete.json +1 -0
- package/dist/components/esca-avatar/animations/esca-wave.json +1 -0
- 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 +21 -10
- package/dist/components/widget/Widget.js.map +1 -1
- package/dist/custom-elements.json +1081 -365
- package/dist/storybook/assets/{ActionBar.stories-cyX9vc6C.js → ActionBar.stories-CBN_ShP5.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-Bs-Kxp5J.js → ActionItem.stories-DysfIj7U.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-B1Uee53f.js → Avatar.stories-BdgqH7I_.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-W2EtKQBu.js → AvatarGroup.stories-DFCG_0Py.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BotNIO18.js → Badge.stories-BWPIJ2jm.js} +1 -1
- package/dist/storybook/assets/{Button-YTBnP55L.js → Button-B1_SwzVL.js} +1 -1
- package/dist/storybook/assets/{Button.stories-B-X7_d_i.js → Button.stories-C-H-KIcV.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-BM-pxfK2.js → ButtonGroup.stories-BBdtnaP_.js} +1 -1
- package/dist/storybook/assets/Card.stories-FLC-WKC_.js +556 -0
- package/dist/storybook/assets/{Celebrate.stories-D9EJwzxo.js → Celebrate.stories-CZ7SfTOh.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-f5VLVSw5.js → Checkbox.stories-C42Z-jkF.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-BI9e372u.js → CircularProgress.stories-DoC0japf.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-CsyJDNxc.js → ClipboardMixin.stories-Ci-drbJq.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-ClVOLIJG.js → Color-6BZIO3FS-rxeQBzj6.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-hUYBvymM.js → Colors.stories-Bw1Kp3B7.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-DkokyKCS.js → CombinedEffects.stories-DArqLKI1.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-C4I_rtgt.js → ComponentStatesMixin-kUcZl-YW.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BeLCYevK.js → ComponentStatesMixin.stories-PrGY6akN.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-DN9oagz-.js → CopyToClipboard.stories-CUzNoCic.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-CtNQAJxO.js → Debounce.stories-CrnUlkHs.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-Bx1Fds2q.js → DocsRenderer-LL677BLK-BM3eNhez.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-B862-mco.js → Dropdown.stories-DyIY6e6W.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-Im3Vr4ZL.js → EmptyState.stories-BXFcxFcG.js} +1 -1
- package/dist/storybook/assets/EscaAvatar.stories-DnriDX7_.js +138 -0
- package/dist/storybook/assets/{Events.stories-B0tluV0t.js → Events.stories-YjZ1Qtl4.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-6CzGqAAc.js → Heading.stories-CfQHk5pf.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-DaQiDn9K.js → HueRipple.stories-CR75dLBM.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CFkYO_7w.js → Icon.stories-BCSRhY2s.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DwBTqvTi.js → IconButton.stories-0O4LM1u6.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-Coxmgjmo.js → LinearProgress.stories-B7GYC8WE.js} +1 -1
- package/dist/storybook/assets/OnFindMixin.stories-UOK_ZP2n.js +300 -0
- package/dist/storybook/assets/{Pagination.stories-CYrKX5iI.js → Pagination.stories-Co3mbyct.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-BkGiUOfu.js → Popover.stories-D5gsWcB0.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-CP6tQ4FB.js → ReadyMixin-DkhLzoe0.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-CzkPw8Nl.js → RovingTabindexMixin.stories-DPhOWmKd.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-CVch488H.js → Rtc.stories-D5Vpw1oP.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-BGh-Irt7.js → ScrollShadow.stories-Cmbqjk5X.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-DPfP0QVK.js → Switch.stories-Bfmr9Ugg.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-CBcuRcDB.js → Tab.stories-DbucUczE.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-CDOBjYbs.js → Tabs.stories-DnPRsSsj.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-Bqyul0aW.js → Throttle.stories-DNwTsNRC.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-B9dohX1h.js → Tooltip.stories-Fsp2BRAr.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-C7dq2Wdk.js → Upload.stories-C-WggEd6.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-35zsIKTv.js → UploadItem.stories-DwQzECXv.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-BuD3fpke.js → Welcome.stories-DFluhbVr.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-D2UYzfyE.js → Widget.stories-7pJNHWTu.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-DGiY8cz9.js → WithTooltip-65CFNBJE-BcgHQTz7.js} +1 -1
- package/dist/storybook/assets/{blocks-YjKl5E55.js → blocks-U4F5yAu3.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-XYAiuXAN.js → formatter-EIJCOSYU-BjQsmbLH.js} +1 -1
- package/dist/storybook/assets/if-defined-CM2lJk-0.js +1 -0
- package/dist/storybook/assets/iframe-1F7Ef_8q.css +1 -0
- package/dist/storybook/assets/{iframe-CufEXQ5F.js → iframe-DNJdsh5L.js} +225 -225
- package/dist/storybook/assets/{index-DbEDIsEB.js → index-1U9xrCIK.js} +1 -1
- package/dist/storybook/assets/onFind-AbVF4rYD.js +1 -0
- package/dist/storybook/assets/{onFind.stories-UpwJxFqR.js → onFind.stories-j334ViWp.js} +15 -15
- package/dist/storybook/assets/{onRemove.stories-BMwQGBCl.js → onRemove.stories-fKMxne2_.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-axSo0Zv3.js → onVisible.stories-BCRoHlJz.js} +1 -1
- package/dist/storybook/assets/{style-map-BkaK9546.js → style-map-BZ07XihX.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CDDZTVRn.js → syntaxhighlighter-ED5Y7EFY-C2D-CgsB.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.js +5 -5
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +5 -5
- 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.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +3 -1
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +3 -2
- package/dist/util/EventEmitterMixin.d.ts +5 -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 +7 -3
- package/docs/components/Card.md +83 -0
- package/docs/components/EmptyState.md +10 -6
- package/docs/components/EscaAvatar.md +70 -0
- package/docs/components/README.md +2 -0
- package/docs/components/Widget.md +18 -14
- package/package.json +2 -2
- package/src/legacy/tool-ui/src/AIInline.css +1 -1
- package/src/legacy/tool-ui/src/ContentForm.css +1 -1
- package/src/legacy/tool-ui/src/Guide.css +1 -1
- package/src/legacy/tool-ui/src/Notification.css +1 -1
- package/src/legacy/tool-ui/src/Popup.css +4 -1
- package/src/legacy/tool-ui/src/RepeatableContentInputGroup.css +3 -3
- package/src/legacy/tool-ui/src/SearchWidget.ts +10 -1
- package/src/legacy/tool-ui/src/dropdown/index.ts +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.c6f3142a97caa5cd3c21.js +500 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.c1c3bde6e394b2a2b75c.css +3 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.c5bcef50efdfa2d2e35f.js → v4.da15ce3ce45e85b4880a.js} +5 -5
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.4edf99db4a5f4969d041.css +5 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.86effb9bf858ae7b0640.js → v5.8491d982a282935a3058.js} +5 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentForm.less +1 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentSelector.less +3 -3
- package/src/legacy/tool-ui/src/v5.ts +4 -2
- package/dist/storybook/assets/if-defined-f_e-RnGa.js +0 -1
- package/dist/storybook/assets/iframe-PeGbyIdX.css +0 -1
- package/dist/storybook/assets/onFind-C7Wi8jr6.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.945bd28778b1a3e937c7.js +0 -500
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.a6f53058dbb04a69aa5c.css +0 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.f60c05ef0c9b89aae888.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.945bd28778b1a3e937c7.js.LICENSE.txt → RTEProseMirror.c6f3142a97caa5cd3c21.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.c5bcef50efdfa2d2e35f.js.LICENSE.txt → v4.da15ce3ce45e85b4880a.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.86effb9bf858ae7b0640.js.LICENSE.txt → v5.8491d982a282935a3058.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import{g as u,x as e}from"./iframe-DNJdsh5L.js";import{o as p}from"./style-map-BZ07XihX.js";import"./preload-helper-PPVm8Dsz.js";const{events:m,args:b,argTypes:l}=u("btu-card"),h=[1,2,3,4,5,6],f={title:"Components/Card",component:"btu-card",tags:["autodocs"],parameters:{docs:{subtitle:"A flexible content container for presenting and organizing information",description:{component:`
|
|
2
|
+
<h3>When to use:</h3>
|
|
3
|
+
<ul>
|
|
4
|
+
<li>To present content items in a browsable grid or list — search results, board views, quick start cards</li>
|
|
5
|
+
<li>When content needs a thumbnail, status badge, or metadata fields alongside its title</li>
|
|
6
|
+
<li>When items need to be selectable, draggable, or navigable as a unit</li>
|
|
7
|
+
</ul>
|
|
8
|
+
<h3>Accessibility:</h3>
|
|
9
|
+
<ul>
|
|
10
|
+
<li>Cards are focusable when they have an href set (unless disabled)</li>
|
|
11
|
+
</ul>
|
|
12
|
+
`}},actions:{handles:m},controls:{expanded:!0}},args:{...b,compact:!1,heading:"Content heading",description:"Content Type · Summary Field · Summary Field","heading-level":2},argTypes:{...l,"--card-min-width":{table:{disable:!0}},"--card-background":{table:{disable:!0}},"--card-border":{table:{disable:!0}},"--card-radius":{table:{disable:!0}},"--card-img-ratio":{table:{disable:!0}},"--card-img-fit":{table:{disable:!0}},"--card-icon-background":{table:{disable:!0}},compact:{...l.compact,control:{type:"boolean"}},"heading-level":{...l["heading-level"],control:{type:"select"},options:h,description:"Heading level (1-6) for the card heading element. Drives the semantic h1–h6 tag (default: 2)."},customMinWidth:{name:"--card-min-width",control:{type:"text"},description:"Minimum width of the card (default: 160px)",table:{category:"CSS Properties"}},customBg:{name:"--card-background",control:{type:"color"},description:"Background color",table:{category:"CSS Properties"}},customBorder:{name:"--card-border",control:{type:"text"},description:"Border shorthand (default: 1px solid gray-200)",table:{category:"CSS Properties"}},customRadius:{name:"--card-radius",control:{type:"text"},description:"Corner rounding (default: 8px)",table:{category:"CSS Properties"}},customImgRatio:{name:"--card-img-ratio",control:{type:"text"},description:"Fixed aspect ratio for the thumbnail when an `<img>` child is present (default: 16 / 9)",table:{category:"CSS Properties"}},customImgFit:{name:"--card-img-fit",control:{type:"select"},options:["contain","cover"],description:"Object-fit mode for the `<img>` child thumbnail (default: contain)",table:{category:"CSS Properties"}},customIconBg:{name:"--card-icon-background",control:{type:"color"},description:"Background color behind the `<btu-icon>` child (compact card and media-image fallback) (default: gray-100)",table:{category:"CSS Properties"}}},render:t=>{const a={};return t.customMinWidth&&(a["--card-min-width"]=t.customMinWidth),t.customBg&&(a["--card-background"]=t.customBg),t.customBorder&&(a["--card-border"]=t.customBorder),t.customRadius&&(a["--card-radius"]=t.customRadius),t.customImgRatio&&(a["--card-img-ratio"]=t.customImgRatio),t.customImgFit&&(a["--card-img-fit"]=t.customImgFit),t.customIconBg&&(a["--card-icon-background"]=t.customIconBg),e`
|
|
13
|
+
<div style="max-width: 262px;">
|
|
14
|
+
<btu-card
|
|
15
|
+
?compact="${t.compact}"
|
|
16
|
+
heading="${t.heading}"
|
|
17
|
+
heading-level="${t["heading-level"]}"
|
|
18
|
+
description="${t.description}"
|
|
19
|
+
?disabled="${t.disabled}"
|
|
20
|
+
href="${t.href}"
|
|
21
|
+
style=${p(a)}
|
|
22
|
+
>
|
|
23
|
+
</btu-card>
|
|
24
|
+
</div>
|
|
25
|
+
`}},i={args:{}},n={render:()=>e`
|
|
26
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
27
|
+
<div style="width: 262px;">
|
|
28
|
+
<btu-card heading="Media Card" description="Content Type · Summary Field · Summary Field">
|
|
29
|
+
<img src="https://picsum.photos/seed/image/300/225" alt="Article thumbnail" />
|
|
30
|
+
<btu-badge variant="info" size="sm">Published</btu-badge>
|
|
31
|
+
</btu-card>
|
|
32
|
+
</div>
|
|
33
|
+
<div style="width: 262px;">
|
|
34
|
+
<btu-card heading="Broken image" description="Falls back to the composed icon">
|
|
35
|
+
<img src="https://example.com/does-not-exist.jpg" alt="Missing thumbnail" />
|
|
36
|
+
<btu-icon symbol="file-text"></btu-icon>
|
|
37
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
38
|
+
</btu-card>
|
|
39
|
+
</div>
|
|
40
|
+
<div style="width: 262px;">
|
|
41
|
+
<btu-card heading="Icon only" description="No image — icon shown in the image area">
|
|
42
|
+
<btu-icon symbol="clipboard-check"></btu-icon>
|
|
43
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
44
|
+
</btu-card>
|
|
45
|
+
</div>
|
|
46
|
+
<div style="width: 262px;">
|
|
47
|
+
<btu-card heading="Text Card" description="No image or icon">
|
|
48
|
+
<btu-badge variant="success" size="sm">Approved</btu-badge>
|
|
49
|
+
</btu-card>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
`,parameters:{docs:{description:{story:'The layout is driven by composition. This way the implementer has control over the inner components, such as badge.\n\n- A card with an `<img>` direct child renders the image above the text content.\n- A `<btu-icon>` direct child shows in the image area — as the fallback when an image fails to load, or as the only media when no `<img>` is provided (see "Icon only"). Without a composed icon, a failed image defaults to a `file-text` icon.\n- A `<btu-badge>` direct child renders a status badge in the top-left corner.\n'}}}},o={render:()=>{const t=a=>{a.stopPropagation(),alert("Action clicked — navigation prevented")};return e`
|
|
53
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
54
|
+
<div style="width: 262px;">
|
|
55
|
+
<btu-card
|
|
56
|
+
heading="Media Card"
|
|
57
|
+
description="Content Type · Summary Field · Summary Field"
|
|
58
|
+
href="https://example.com"
|
|
59
|
+
>
|
|
60
|
+
<img src="https://picsum.photos/seed/action/300/225" alt="Article thumbnail" />
|
|
61
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
62
|
+
<btu-checkbox slot="action"></btu-checkbox>
|
|
63
|
+
<btu-icon-button
|
|
64
|
+
slot="secondary-action"
|
|
65
|
+
symbol="info"
|
|
66
|
+
size="sm"
|
|
67
|
+
type="secondary-clear"
|
|
68
|
+
aria-label="Quick view"
|
|
69
|
+
@click=${t}
|
|
70
|
+
></btu-icon-button>
|
|
71
|
+
</btu-card>
|
|
72
|
+
</div>
|
|
73
|
+
<div style="width: 262px;">
|
|
74
|
+
<btu-card
|
|
75
|
+
heading="Text Card"
|
|
76
|
+
description="Content Type · Summary Field · Summary Field"
|
|
77
|
+
href="https://example.com"
|
|
78
|
+
>
|
|
79
|
+
<btu-badge variant="info" size="sm">Draft</btu-badge>
|
|
80
|
+
<btu-icon-button
|
|
81
|
+
slot="action"
|
|
82
|
+
symbol="star"
|
|
83
|
+
size="sm"
|
|
84
|
+
type="secondary-clear"
|
|
85
|
+
aria-label="Favorite"
|
|
86
|
+
@click=${t}
|
|
87
|
+
></btu-icon-button>
|
|
88
|
+
<btu-icon-button
|
|
89
|
+
slot="secondary-action"
|
|
90
|
+
symbol="info"
|
|
91
|
+
size="sm"
|
|
92
|
+
type="secondary-clear"
|
|
93
|
+
aria-label="Quick view"
|
|
94
|
+
@click=${t}
|
|
95
|
+
></btu-icon-button>
|
|
96
|
+
</btu-card>
|
|
97
|
+
</div>
|
|
98
|
+
<div style="width: 262px;">
|
|
99
|
+
<btu-card
|
|
100
|
+
heading="Text Card — no badge"
|
|
101
|
+
description="Content Type · Summary Field · Summary Field"
|
|
102
|
+
href="https://example.com"
|
|
103
|
+
>
|
|
104
|
+
<btu-checkbox slot="action"></btu-checkbox>
|
|
105
|
+
<btu-icon-button
|
|
106
|
+
slot="secondary-action"
|
|
107
|
+
symbol="info"
|
|
108
|
+
size="sm"
|
|
109
|
+
type="secondary-clear"
|
|
110
|
+
aria-label="Quick view"
|
|
111
|
+
@click=${t}
|
|
112
|
+
></btu-icon-button>
|
|
113
|
+
</btu-card>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`},parameters:{docs:{description:{story:'Cards expose two action positions, both pseudo-slots:\n\n- `slot="action"` — the top-right corner.\n- `slot="secondary-action"` — next to the title.\n\nA `<btu-checkbox>` action stays visible, while a `<btu-icon-button>` action is revealed on hover/focus.\n\nThese cards also have `href` set to demonstrate that clicking anywhere on the card navigates to the link, while clicking an action triggers its own handler without navigating. Tabbing focuses the card first, then the actions.'}}}},s={render:()=>e`
|
|
117
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
118
|
+
<div style="width: 262px;">
|
|
119
|
+
<btu-card heading="Content title" description="Content Type · Summary Field · Summary Field">
|
|
120
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
121
|
+
<div slot="fields">
|
|
122
|
+
<div class="flex flex-col">
|
|
123
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Content Type</span>
|
|
124
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))">Article</span>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="flex flex-col">
|
|
127
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Last Updated</span>
|
|
128
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))"
|
|
129
|
+
>Thu, Dec 08 9:59 AM</span
|
|
130
|
+
>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="flex flex-col gap-1">
|
|
133
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Viewers</span>
|
|
134
|
+
<btu-avatar-group max="3" size="xs">
|
|
135
|
+
<btu-avatar fallback="AC" alt="Ashley" tooltip="Ashley" size="xs"></btu-avatar>
|
|
136
|
+
<btu-avatar fallback="DG" alt="Dylan" tooltip="Dylan" size="xs"></btu-avatar>
|
|
137
|
+
<btu-avatar fallback="JP" alt="Pencola" tooltip="Pencola" size="xs"></btu-avatar>
|
|
138
|
+
<btu-avatar fallback="JR" alt="John R." tooltip="John R." size="xs"></btu-avatar>
|
|
139
|
+
<btu-avatar fallback="KW" alt="Kat(e)" tooltip="Kat(e)" size="xs"></btu-avatar>
|
|
140
|
+
<btu-avatar fallback="KL" alt="hotpink" tooltip="hotpink" size="xs"></btu-avatar>
|
|
141
|
+
<btu-avatar fallback="ML" alt="Lunsford" tooltip="Lunsford" size="xs"></btu-avatar>
|
|
142
|
+
<btu-avatar fallback="MW" alt="Wardian" tooltip="Wardian" size="xs"></btu-avatar>
|
|
143
|
+
</btu-avatar-group>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</btu-card>
|
|
147
|
+
</div>
|
|
148
|
+
<div style="width: 262px;">
|
|
149
|
+
<btu-card heading="Media with fields" description="Content Type · Summary Field · Summary Field">
|
|
150
|
+
<img src="https://picsum.photos/seed/fields/300/225" alt="Article thumbnail" />
|
|
151
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
152
|
+
<div slot="fields">
|
|
153
|
+
<div class="flex flex-col">
|
|
154
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Content Type</span>
|
|
155
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))">Article</span>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="flex flex-col">
|
|
158
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Last Updated</span>
|
|
159
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))"
|
|
160
|
+
>Thu, Dec 08 9:59 AM</span
|
|
161
|
+
>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="flex flex-col gap-1">
|
|
164
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Viewers</span>
|
|
165
|
+
<btu-avatar-group max="3" size="xs">
|
|
166
|
+
<btu-avatar fallback="AC" alt="Ashley" tooltip="Ashley" size="xs"></btu-avatar>
|
|
167
|
+
<btu-avatar fallback="DG" alt="Dylan" tooltip="Dylan" size="xs"></btu-avatar>
|
|
168
|
+
<btu-avatar fallback="JP" alt="Pencola" tooltip="Pencola" size="xs"></btu-avatar>
|
|
169
|
+
<btu-avatar fallback="JR" alt="John R." tooltip="John R." size="xs"></btu-avatar>
|
|
170
|
+
<btu-avatar fallback="KW" alt="Kat(e)" tooltip="Kat(e)" size="xs"></btu-avatar>
|
|
171
|
+
</btu-avatar-group>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</btu-card>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
`,parameters:{docs:{description:{story:'Cards support a `slot="fields"` pseudo-slot for structured metadata. These cards show content type, last updated date, and a viewers section with an avatar group.'}}}},r={render:()=>e`
|
|
178
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
179
|
+
<div style="width: 262px;">
|
|
180
|
+
<btu-card compact heading="Quick Action" description="Quick start tile">
|
|
181
|
+
<btu-icon symbol="zap" gradient="primary"></btu-icon>
|
|
182
|
+
<btu-icon-button slot="action" symbol="star" size="sm" type="secondary-clear" aria-label="Favorite">
|
|
183
|
+
</btu-icon-button>
|
|
184
|
+
</btu-card>
|
|
185
|
+
</div>
|
|
186
|
+
<div style="width: 262px;">
|
|
187
|
+
<btu-card compact heading="New Document" description="Create a blank document">
|
|
188
|
+
<btu-icon symbol="file-plus" gradient="primary"></btu-icon>
|
|
189
|
+
<btu-icon-button slot="action" symbol="star" size="sm" type="secondary-clear" aria-label="Favorite">
|
|
190
|
+
</btu-icon-button>
|
|
191
|
+
</btu-card>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
`,parameters:{docs:{description:{story:"Set the `compact` attribute for a quick-start tile with a featured icon. Provide the featured icon as a `<btu-icon>` direct child. Badge, image, fields, and secondary-action slots are ignored in this case. Only the top-right `action` slot is available."}}}},c={render:()=>e`
|
|
195
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
196
|
+
<div>
|
|
197
|
+
<p
|
|
198
|
+
style="font-size: 0.75rem; font-weight: 500; margin-bottom: 0.75rem; color: oklch(var(--btu-theme-gray-500));"
|
|
199
|
+
>
|
|
200
|
+
contain (default)
|
|
201
|
+
</p>
|
|
202
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
203
|
+
<div style="width: 262px;">
|
|
204
|
+
<btu-card heading="Portrait">
|
|
205
|
+
<img src="https://picsum.photos/seed/portrait/400/600" alt="Portrait" />
|
|
206
|
+
</btu-card>
|
|
207
|
+
</div>
|
|
208
|
+
<div style="width: 262px;">
|
|
209
|
+
<btu-card heading="Landscape">
|
|
210
|
+
<img src="https://picsum.photos/seed/landscape/1200/300" alt="Landscape" />
|
|
211
|
+
</btu-card>
|
|
212
|
+
</div>
|
|
213
|
+
<div style="width: 262px;">
|
|
214
|
+
<btu-card heading="Square">
|
|
215
|
+
<img src="https://picsum.photos/seed/square/400/400" alt="Square" />
|
|
216
|
+
</btu-card>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
<div>
|
|
221
|
+
<p
|
|
222
|
+
style="font-size: 0.75rem; font-weight: 500; margin-bottom: 0.75rem; color: oklch(var(--btu-theme-gray-500));"
|
|
223
|
+
>
|
|
224
|
+
cover (--card-img-fit: cover)
|
|
225
|
+
</p>
|
|
226
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
227
|
+
<div style="width: 262px;">
|
|
228
|
+
<btu-card heading="Portrait" style="--card-img-fit: cover;">
|
|
229
|
+
<img src="https://picsum.photos/seed/portrait/400/600" alt="Portrait" />
|
|
230
|
+
</btu-card>
|
|
231
|
+
</div>
|
|
232
|
+
<div style="width: 262px;">
|
|
233
|
+
<btu-card heading="Landscape" style="--card-img-fit: cover;">
|
|
234
|
+
<img src="https://picsum.photos/seed/landscape/1200/300" alt="Landscape" />
|
|
235
|
+
</btu-card>
|
|
236
|
+
</div>
|
|
237
|
+
<div style="width: 262px;">
|
|
238
|
+
<btu-card heading="Square" style="--card-img-fit: cover;">
|
|
239
|
+
<img src="https://picsum.photos/seed/square/400/400" alt="Square" />
|
|
240
|
+
</btu-card>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
`,parameters:{docs:{description:{story:"By default images use `object-fit: contain` so the full image is always visible. Set `--card-img-fit: cover` to fill the thumbnail area by cropping instead."}}}},d={render:()=>e`
|
|
246
|
+
<div style="display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));">
|
|
247
|
+
${[1,2,3,4,5].map(t=>e`
|
|
248
|
+
<btu-card heading="Card ${t}" description="Content Type · Summary Field">
|
|
249
|
+
<btu-badge variant="info" size="sm">Content Status</btu-badge>
|
|
250
|
+
</btu-card>
|
|
251
|
+
`)}
|
|
252
|
+
</div>
|
|
253
|
+
`,parameters:{docs:{description:{story:"Cards are `width: 100%` by default and rely on the parent layout to control their size. A CSS grid with `repeat(auto-fill, minmax(220px, 1fr))` is a common responsive pattern."}}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
254
|
+
args: {}
|
|
255
|
+
}`,...i.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
256
|
+
render: () => html\`
|
|
257
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
258
|
+
<div style="width: 262px;">
|
|
259
|
+
<btu-card heading="Media Card" description="Content Type · Summary Field · Summary Field">
|
|
260
|
+
<img src="https://picsum.photos/seed/image/300/225" alt="Article thumbnail" />
|
|
261
|
+
<btu-badge variant="info" size="sm">Published</btu-badge>
|
|
262
|
+
</btu-card>
|
|
263
|
+
</div>
|
|
264
|
+
<div style="width: 262px;">
|
|
265
|
+
<btu-card heading="Broken image" description="Falls back to the composed icon">
|
|
266
|
+
<img src="https://example.com/does-not-exist.jpg" alt="Missing thumbnail" />
|
|
267
|
+
<btu-icon symbol="file-text"></btu-icon>
|
|
268
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
269
|
+
</btu-card>
|
|
270
|
+
</div>
|
|
271
|
+
<div style="width: 262px;">
|
|
272
|
+
<btu-card heading="Icon only" description="No image — icon shown in the image area">
|
|
273
|
+
<btu-icon symbol="clipboard-check"></btu-icon>
|
|
274
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
275
|
+
</btu-card>
|
|
276
|
+
</div>
|
|
277
|
+
<div style="width: 262px;">
|
|
278
|
+
<btu-card heading="Text Card" description="No image or icon">
|
|
279
|
+
<btu-badge variant="success" size="sm">Approved</btu-badge>
|
|
280
|
+
</btu-card>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
\`,
|
|
284
|
+
parameters: {
|
|
285
|
+
docs: {
|
|
286
|
+
description: {
|
|
287
|
+
story: \`The layout is driven by composition. This way the implementer has control over the inner components, such as badge.
|
|
288
|
+
|
|
289
|
+
- A card with an \\\`<img>\\\` direct child renders the image above the text content.
|
|
290
|
+
- A \\\`<btu-icon>\\\` direct child shows in the image area — as the fallback when an image fails to load, or as the only media when no \\\`<img>\\\` is provided (see "Icon only"). Without a composed icon, a failed image defaults to a \\\`file-text\\\` icon.
|
|
291
|
+
- A \\\`<btu-badge>\\\` direct child renders a status badge in the top-left corner.
|
|
292
|
+
\`
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}`,...n.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
297
|
+
render: () => {
|
|
298
|
+
const handleActionClick = (e: Event) => {
|
|
299
|
+
e.stopPropagation();
|
|
300
|
+
// eslint-disable-next-line no-alert
|
|
301
|
+
alert('Action clicked — navigation prevented');
|
|
302
|
+
};
|
|
303
|
+
return html\`
|
|
304
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
305
|
+
<div style="width: 262px;">
|
|
306
|
+
<btu-card
|
|
307
|
+
heading="Media Card"
|
|
308
|
+
description="Content Type · Summary Field · Summary Field"
|
|
309
|
+
href="https://example.com"
|
|
310
|
+
>
|
|
311
|
+
<img src="https://picsum.photos/seed/action/300/225" alt="Article thumbnail" />
|
|
312
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
313
|
+
<btu-checkbox slot="action"></btu-checkbox>
|
|
314
|
+
<btu-icon-button
|
|
315
|
+
slot="secondary-action"
|
|
316
|
+
symbol="info"
|
|
317
|
+
size="sm"
|
|
318
|
+
type="secondary-clear"
|
|
319
|
+
aria-label="Quick view"
|
|
320
|
+
@click=\${handleActionClick}
|
|
321
|
+
></btu-icon-button>
|
|
322
|
+
</btu-card>
|
|
323
|
+
</div>
|
|
324
|
+
<div style="width: 262px;">
|
|
325
|
+
<btu-card
|
|
326
|
+
heading="Text Card"
|
|
327
|
+
description="Content Type · Summary Field · Summary Field"
|
|
328
|
+
href="https://example.com"
|
|
329
|
+
>
|
|
330
|
+
<btu-badge variant="info" size="sm">Draft</btu-badge>
|
|
331
|
+
<btu-icon-button
|
|
332
|
+
slot="action"
|
|
333
|
+
symbol="star"
|
|
334
|
+
size="sm"
|
|
335
|
+
type="secondary-clear"
|
|
336
|
+
aria-label="Favorite"
|
|
337
|
+
@click=\${handleActionClick}
|
|
338
|
+
></btu-icon-button>
|
|
339
|
+
<btu-icon-button
|
|
340
|
+
slot="secondary-action"
|
|
341
|
+
symbol="info"
|
|
342
|
+
size="sm"
|
|
343
|
+
type="secondary-clear"
|
|
344
|
+
aria-label="Quick view"
|
|
345
|
+
@click=\${handleActionClick}
|
|
346
|
+
></btu-icon-button>
|
|
347
|
+
</btu-card>
|
|
348
|
+
</div>
|
|
349
|
+
<div style="width: 262px;">
|
|
350
|
+
<btu-card
|
|
351
|
+
heading="Text Card — no badge"
|
|
352
|
+
description="Content Type · Summary Field · Summary Field"
|
|
353
|
+
href="https://example.com"
|
|
354
|
+
>
|
|
355
|
+
<btu-checkbox slot="action"></btu-checkbox>
|
|
356
|
+
<btu-icon-button
|
|
357
|
+
slot="secondary-action"
|
|
358
|
+
symbol="info"
|
|
359
|
+
size="sm"
|
|
360
|
+
type="secondary-clear"
|
|
361
|
+
aria-label="Quick view"
|
|
362
|
+
@click=\${handleActionClick}
|
|
363
|
+
></btu-icon-button>
|
|
364
|
+
</btu-card>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
\`;
|
|
368
|
+
},
|
|
369
|
+
parameters: {
|
|
370
|
+
docs: {
|
|
371
|
+
description: {
|
|
372
|
+
story: \`Cards expose two action positions, both pseudo-slots:
|
|
373
|
+
|
|
374
|
+
- \\\`slot="action"\\\` — the top-right corner.
|
|
375
|
+
- \\\`slot="secondary-action"\\\` — next to the title.
|
|
376
|
+
|
|
377
|
+
A \\\`<btu-checkbox>\\\` action stays visible, while a \\\`<btu-icon-button>\\\` action is revealed on hover/focus.
|
|
378
|
+
|
|
379
|
+
These cards also have \\\`href\\\` set to demonstrate that clicking anywhere on the card navigates to the link, while clicking an action triggers its own handler without navigating. Tabbing focuses the card first, then the actions.\`
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}`,...o.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
384
|
+
render: () => html\`
|
|
385
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
386
|
+
<div style="width: 262px;">
|
|
387
|
+
<btu-card heading="Content title" description="Content Type · Summary Field · Summary Field">
|
|
388
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
389
|
+
<div slot="fields">
|
|
390
|
+
<div class="flex flex-col">
|
|
391
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Content Type</span>
|
|
392
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))">Article</span>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="flex flex-col">
|
|
395
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Last Updated</span>
|
|
396
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))"
|
|
397
|
+
>Thu, Dec 08 9:59 AM</span
|
|
398
|
+
>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="flex flex-col gap-1">
|
|
401
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Viewers</span>
|
|
402
|
+
<btu-avatar-group max="3" size="xs">
|
|
403
|
+
<btu-avatar fallback="AC" alt="Ashley" tooltip="Ashley" size="xs"></btu-avatar>
|
|
404
|
+
<btu-avatar fallback="DG" alt="Dylan" tooltip="Dylan" size="xs"></btu-avatar>
|
|
405
|
+
<btu-avatar fallback="JP" alt="Pencola" tooltip="Pencola" size="xs"></btu-avatar>
|
|
406
|
+
<btu-avatar fallback="JR" alt="John R." tooltip="John R." size="xs"></btu-avatar>
|
|
407
|
+
<btu-avatar fallback="KW" alt="Kat(e)" tooltip="Kat(e)" size="xs"></btu-avatar>
|
|
408
|
+
<btu-avatar fallback="KL" alt="hotpink" tooltip="hotpink" size="xs"></btu-avatar>
|
|
409
|
+
<btu-avatar fallback="ML" alt="Lunsford" tooltip="Lunsford" size="xs"></btu-avatar>
|
|
410
|
+
<btu-avatar fallback="MW" alt="Wardian" tooltip="Wardian" size="xs"></btu-avatar>
|
|
411
|
+
</btu-avatar-group>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
</btu-card>
|
|
415
|
+
</div>
|
|
416
|
+
<div style="width: 262px;">
|
|
417
|
+
<btu-card heading="Media with fields" description="Content Type · Summary Field · Summary Field">
|
|
418
|
+
<img src="https://picsum.photos/seed/fields/300/225" alt="Article thumbnail" />
|
|
419
|
+
<btu-badge variant="info" size="sm">Status</btu-badge>
|
|
420
|
+
<div slot="fields">
|
|
421
|
+
<div class="flex flex-col">
|
|
422
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Content Type</span>
|
|
423
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))">Article</span>
|
|
424
|
+
</div>
|
|
425
|
+
<div class="flex flex-col">
|
|
426
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Last Updated</span>
|
|
427
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-900))"
|
|
428
|
+
>Thu, Dec 08 9:59 AM</span
|
|
429
|
+
>
|
|
430
|
+
</div>
|
|
431
|
+
<div class="flex flex-col gap-1">
|
|
432
|
+
<span class="text-xs font-medium" style="color: oklch(var(--btu-theme-gray-500))">Viewers</span>
|
|
433
|
+
<btu-avatar-group max="3" size="xs">
|
|
434
|
+
<btu-avatar fallback="AC" alt="Ashley" tooltip="Ashley" size="xs"></btu-avatar>
|
|
435
|
+
<btu-avatar fallback="DG" alt="Dylan" tooltip="Dylan" size="xs"></btu-avatar>
|
|
436
|
+
<btu-avatar fallback="JP" alt="Pencola" tooltip="Pencola" size="xs"></btu-avatar>
|
|
437
|
+
<btu-avatar fallback="JR" alt="John R." tooltip="John R." size="xs"></btu-avatar>
|
|
438
|
+
<btu-avatar fallback="KW" alt="Kat(e)" tooltip="Kat(e)" size="xs"></btu-avatar>
|
|
439
|
+
</btu-avatar-group>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
</btu-card>
|
|
443
|
+
</div>
|
|
444
|
+
</div>
|
|
445
|
+
\`,
|
|
446
|
+
parameters: {
|
|
447
|
+
docs: {
|
|
448
|
+
description: {
|
|
449
|
+
story: \`Cards support a \\\`slot="fields"\\\` pseudo-slot for structured metadata. These cards show content type, last updated date, and a viewers section with an avatar group.\`
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}`,...s.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
454
|
+
render: () => html\`
|
|
455
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
456
|
+
<div style="width: 262px;">
|
|
457
|
+
<btu-card compact heading="Quick Action" description="Quick start tile">
|
|
458
|
+
<btu-icon symbol="zap" gradient="primary"></btu-icon>
|
|
459
|
+
<btu-icon-button slot="action" symbol="star" size="sm" type="secondary-clear" aria-label="Favorite">
|
|
460
|
+
</btu-icon-button>
|
|
461
|
+
</btu-card>
|
|
462
|
+
</div>
|
|
463
|
+
<div style="width: 262px;">
|
|
464
|
+
<btu-card compact heading="New Document" description="Create a blank document">
|
|
465
|
+
<btu-icon symbol="file-plus" gradient="primary"></btu-icon>
|
|
466
|
+
<btu-icon-button slot="action" symbol="star" size="sm" type="secondary-clear" aria-label="Favorite">
|
|
467
|
+
</btu-icon-button>
|
|
468
|
+
</btu-card>
|
|
469
|
+
</div>
|
|
470
|
+
</div>
|
|
471
|
+
\`,
|
|
472
|
+
parameters: {
|
|
473
|
+
docs: {
|
|
474
|
+
description: {
|
|
475
|
+
story: \`Set the \\\`compact\\\` attribute for a quick-start tile with a featured icon. Provide the featured icon as a \\\`<btu-icon>\\\` direct child. Badge, image, fields, and secondary-action slots are ignored in this case. Only the top-right \\\`action\\\` slot is available.\`
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}`,...r.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
480
|
+
render: () => html\`
|
|
481
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
482
|
+
<div>
|
|
483
|
+
<p
|
|
484
|
+
style="font-size: 0.75rem; font-weight: 500; margin-bottom: 0.75rem; color: oklch(var(--btu-theme-gray-500));"
|
|
485
|
+
>
|
|
486
|
+
contain (default)
|
|
487
|
+
</p>
|
|
488
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
489
|
+
<div style="width: 262px;">
|
|
490
|
+
<btu-card heading="Portrait">
|
|
491
|
+
<img src="https://picsum.photos/seed/portrait/400/600" alt="Portrait" />
|
|
492
|
+
</btu-card>
|
|
493
|
+
</div>
|
|
494
|
+
<div style="width: 262px;">
|
|
495
|
+
<btu-card heading="Landscape">
|
|
496
|
+
<img src="https://picsum.photos/seed/landscape/1200/300" alt="Landscape" />
|
|
497
|
+
</btu-card>
|
|
498
|
+
</div>
|
|
499
|
+
<div style="width: 262px;">
|
|
500
|
+
<btu-card heading="Square">
|
|
501
|
+
<img src="https://picsum.photos/seed/square/400/400" alt="Square" />
|
|
502
|
+
</btu-card>
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
</div>
|
|
506
|
+
<div>
|
|
507
|
+
<p
|
|
508
|
+
style="font-size: 0.75rem; font-weight: 500; margin-bottom: 0.75rem; color: oklch(var(--btu-theme-gray-500));"
|
|
509
|
+
>
|
|
510
|
+
cover (--card-img-fit: cover)
|
|
511
|
+
</p>
|
|
512
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: start;">
|
|
513
|
+
<div style="width: 262px;">
|
|
514
|
+
<btu-card heading="Portrait" style="--card-img-fit: cover;">
|
|
515
|
+
<img src="https://picsum.photos/seed/portrait/400/600" alt="Portrait" />
|
|
516
|
+
</btu-card>
|
|
517
|
+
</div>
|
|
518
|
+
<div style="width: 262px;">
|
|
519
|
+
<btu-card heading="Landscape" style="--card-img-fit: cover;">
|
|
520
|
+
<img src="https://picsum.photos/seed/landscape/1200/300" alt="Landscape" />
|
|
521
|
+
</btu-card>
|
|
522
|
+
</div>
|
|
523
|
+
<div style="width: 262px;">
|
|
524
|
+
<btu-card heading="Square" style="--card-img-fit: cover;">
|
|
525
|
+
<img src="https://picsum.photos/seed/square/400/400" alt="Square" />
|
|
526
|
+
</btu-card>
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
</div>
|
|
530
|
+
</div>
|
|
531
|
+
\`,
|
|
532
|
+
parameters: {
|
|
533
|
+
docs: {
|
|
534
|
+
description: {
|
|
535
|
+
story: 'By default images use \`object-fit: contain\` so the full image is always visible. Set \`--card-img-fit: cover\` to fill the thumbnail area by cropping instead.'
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}`,...c.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
540
|
+
render: () => html\`
|
|
541
|
+
<div style="display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));">
|
|
542
|
+
\${[1, 2, 3, 4, 5].map(i => html\`
|
|
543
|
+
<btu-card heading="Card \${i}" description="Content Type · Summary Field">
|
|
544
|
+
<btu-badge variant="info" size="sm">Content Status</btu-badge>
|
|
545
|
+
</btu-card>
|
|
546
|
+
\`)}
|
|
547
|
+
</div>
|
|
548
|
+
\`,
|
|
549
|
+
parameters: {
|
|
550
|
+
docs: {
|
|
551
|
+
description: {
|
|
552
|
+
story: \`Cards are \\\`width: 100%\\\` by default and rely on the parent layout to control their size. A CSS grid with \\\`repeat(auto-fill, minmax(220px, 1fr))\\\` is a common responsive pattern.\`
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}`,...d.parameters?.docs?.source}}};const x=["Default","Composition","ActionSlots","FieldsSlot","Compact","ImageCropping","Sizing"];export{o as ActionSlots,r as Compact,n as Composition,i as Default,s as FieldsSlot,c as ImageCropping,d as Sizing,x as __namedExportsOrder,f as default};
|
package/dist/storybook/assets/{Celebrate.stories-D9EJwzxo.js → Celebrate.stories-CZ7SfTOh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as a}from"./iframe-
|
|
1
|
+
import{x as a}from"./iframe-DNJdsh5L.js";import{b as i}from"./celebrate-KwPoF1K3.js";import{B as r}from"./Button-B1_SwzVL.js";import"./preload-helper-PPVm8Dsz.js";import"./position-CFNQy3J6.js";const m={title:"Effects/Celebrate",tags:["autodocs"],parameters:{docs:{subtitle:"A sparkle burst effect for delightful micro-interactions",description:{component:`
|
|
2
2
|
A celebratory sparkle animation that fires from a given position. Colored circles, ellipses, and sparkle particles burst outward using CSS offset-path animations.
|
|
3
3
|
|
|
4
4
|
### Usage
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as x,x as p}from"./iframe-
|
|
1
|
+
import{g as x,x as p}from"./iframe-DNJdsh5L.js";import{o as t}from"./if-defined-CM2lJk-0.js";import{o as g}from"./style-map-BZ07XihX.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:v,argTypes:f}=x("btu-checkbox"),S={customColorPrimary:"--checkbox-color-primary",customColorBorder:"--checkbox-color-border",customColorError:"--checkbox-color-error",customBorderRadius:"--checkbox-border-radius",customLabelSpacing:"--checkbox-label-spacing"},C=e=>Object.entries(S).reduce((r,[h,k])=>(e[h]&&(r[k]=e[h]),r),{}),P={title:"Components/Checkbox",component:"btu-checkbox",tags:["autodocs"],parameters:{docs:{subtitle:"A checkbox for selecting one or more options",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>For selecting one or more options from a set</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as S,E as h,x as T}from"./iframe-
|
|
1
|
+
import{g as S,E as h,x as T}from"./iframe-DNJdsh5L.js";import{o as $}from"./style-map-BZ07XihX.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:A,argTypes:u}=S("btu-circular-progress"),O={title:"Components/Circular Progress",component:"btu-circular-progress",tags:["autodocs"],parameters:{docs:{subtitle:"A component for showing loading states or progress",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>To indicate loading or processing state</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as m,i as h}from"./iframe-
|
|
1
|
+
import{x as m,i as h}from"./iframe-DNJdsh5L.js";import{t as u}from"./custom-element-UsVr97OX.js";import{C as b}from"./ComponentStatesMixin-kUcZl-YW.js";import{E as y,R as x}from"./ReadyMixin-DkhLzoe0.js";import"./preload-helper-PPVm8Dsz.js";function n(e,d){let r=document.getElementById("aria-live-container");r||(r=document.createElement("div"),r.setAttribute("id","aria-live-container"),document.body.appendChild(r));const t=document.createElement("div"),i="speak-"+Date.now();t.setAttribute("id",i),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.cssText="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;",r.appendChild(t),setTimeout(()=>{const o=document.getElementById(i);o&&(o.innerHTML=e)},150),window.BRIGHTSPOT?.ariaDebug===!0&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(i)?.remove()},2e3)}const g=e=>{class d extends e{get copiedStateKey(){return`${this.tagName.toLowerCase()}-copied`}async copy(t,i=3e3){if(!t)return;const o=this.copiedStateKey;if(!this.states.has(o)){try{if(!navigator.clipboard||typeof navigator.clipboard.writeText!="function")throw new Error("Clipboard API is not available in this environment.");await navigator.clipboard.writeText(t)}catch(a){console.error("Failed to copy text to clipboard:",a),n("Copy failed");return}this.states.add(o),this.requestUpdate(),this.emit(o),n("Copied!"),setTimeout(()=>{this.states.delete(o),this.requestUpdate()},i)}}}return d};var c=Object.freeze,f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,C=(e,d,r,t)=>{for(var i=t>1?void 0:t?v(d,r):d,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},E=(e,d)=>c(f(e,"raw",{value:c(e.slice())})),l;const I={title:"Mixins/Clipboard",tags:["autodocs"],parameters:{docs:{description:{component:`
|
|
2
2
|
\`ClipboardMixin\` adds clipboard copy functionality via a <code>copy()</code> method that writes text to the system clipboard.
|
|
3
3
|
|
|
4
4
|
It adds a temporary state and emits an event, which web components can use for visual feedback.
|