@brightspot/ui 6.8.1 → 6.8.2
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/CHANGELOG.md +661 -0
- package/README.md +18 -2
- package/dist/storybook/CHANGELOG.md +661 -0
- package/dist/storybook/README.md +195 -0
- package/dist/storybook/assets/{ActionBar.stories-BOXYJYXy.js → ActionBar.stories-TlhuCumU.js} +1 -1
- package/dist/storybook/assets/{ActionItem-WoDvowFu.js → ActionItem-CjtyGLd5.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-CVFoWP54.js → ActionItem.stories-BVlNQvfP.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-Psv9jNpy.js → AiSparkle.stories-DMzc8JUe.js} +2 -2
- package/dist/storybook/assets/{Avatar-CIQcHS8b.js → Avatar-C6Li1sPI.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-BE2Xn8fx.js → Avatar.stories-COj6XrPn.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup-Chs0VKPg.js → AvatarGroup-DgxRTZBe.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-2ar6gCeX.js → AvatarGroup.stories-Dh3e7iN2.js} +1 -1
- package/dist/storybook/assets/{Badge-AV20mCMJ.js → Badge-bWrvpEgX.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-w9LqNw0A.js → Badge.stories-KXpmEXpt.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-Clhh1bBs.js → Banner.stories-Cnhm3dXK.js} +1 -1
- package/dist/storybook/assets/{Button-B7fn_wd5.js → Button-DE0s-gat.js} +1 -1
- package/dist/storybook/assets/{Button.stories-5h4M8nd2.js → Button.stories-Cwg1YZEb.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup-BmndBsBy.js → ButtonGroup-CoLI5nGO.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-CR1H4H7u.js → ButtonGroup.stories-VhnKPP1n.js} +1 -1
- package/dist/storybook/assets/{Card.stories-Bz5vXq5y.js → Card.stories-BgpL90zB.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-Bu3CNw0k.js → Celebrate.stories-D3NJgYcX.js} +1 -1
- package/dist/storybook/assets/{Checkbox-BALsanB1.js → Checkbox-BC1T_KxW.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-BdvCht5c.js → Checkbox.stories-AFQNz7dQ.js} +1 -1
- package/dist/storybook/assets/{CircularProgress-BeE2fWON.js → CircularProgress-eqVb2jUD.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-CL8Lc6eU.js → CircularProgress.stories-B6t8VhmJ.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin-C6wcbXIO.js → ClipboardMixin-DcxrOy5B.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BsjzC7wd.js → ClipboardMixin.stories-BqtQMjmS.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-Dsd6EVV9.js → Color-6BZIO3FS-CDluohEc.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-CkCdNN9Y.js → Colors.stories-CqTniDIa.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-QG78pIiG.js → CombinedEffects.stories-FwW0chy5.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-CG-Dx_Vk.js → ComponentStatesMixin-hUqOL2aW.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-B1yuAqua.js → ComponentStatesMixin.stories-CwGoq685.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-CyKcumJ9.js → CopyToClipboard.stories-DUGjgtQx.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BuNskQ33.js → Debounce.stories-CrWfXhKS.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-BrPyc8XX.js → DocsRenderer-LL677BLK-9e51z9Xc.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-DHXeP07z.js → Dropdown.stories-BsBxV0wp.js} +1 -1
- package/dist/storybook/assets/{DropdownMenu-WoWnJiQk.js → DropdownMenu-B-LvOIGj.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-BRoVusey.js → EmptyState.stories-CJ1w8Tp2.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-CWAE-4Uz.js → EscaAvatar.stories-BoLLSj9q.js} +2 -2
- package/dist/storybook/assets/{Events.stories-D-npDwlx.js → Events.stories-C3sTBwPJ.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-D7hmvFEN.js → Heading.stories-jmXDRBmM.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-Dx3ozdHi.js → HueRipple.stories-BPx5aSYd.js} +1 -1
- package/dist/storybook/assets/{Icon-DPQKiWDz.js → Icon-CWyJRQf7.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CVsQvcwd.js → Icon.stories-iYBxmv2x.js} +1 -1
- package/dist/storybook/assets/{IconButton-Dp4Z06bL.js → IconButton-Di5Rgs7F.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DTbfHfcQ.js → IconButton.stories-DENLoxVk.js} +1 -1
- package/dist/storybook/assets/{LinearProgress-DG3tPlGH.js → LinearProgress-D9ngIVlv.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-VIU6OqYd.js → LinearProgress.stories-u90B_VJR.js} +1 -1
- package/dist/storybook/assets/{Message-BzkpGg8z.js → Message-nFAa55c_.js} +1 -1
- package/dist/storybook/assets/{Message.stories-C9bzoQes.js → Message.stories-B4rpz5rI.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin-CeeYfx9k.js → OnFindMixin-oL1bvTFj.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-Dq06nuVf.js → OnFindMixin.stories-CdeS5sFA.js} +1 -1
- package/dist/storybook/assets/{Pagination-CnWa6AX5.js → Pagination-CSWcjuDU.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-BsH2eN2W.js → Pagination.stories-Da2WzJkv.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CLnzpgEE.js → Popover.stories-CVljlVHc.js} +1 -1
- package/dist/storybook/assets/{ProgressMixin-D1atDw3n.js → ProgressMixin-CeSrn0_P.js} +1 -1
- package/dist/storybook/assets/{Radio-B6Aq6K0V.js → Radio-rvfGhZwK.js} +1 -1
- package/dist/storybook/assets/{Radio.stories-BCVbISmb.js → Radio.stories-B0wHdJuc.js} +1 -1
- package/dist/storybook/assets/{RadioGroup.stories-B-TGP_-v.js → RadioGroup.stories-D8krOSlP.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-C8HW2nGE.js → ReadyMixin-CvX_eidU.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin-DI5rmyR7.js → RovingTabindexMixin-9z8lwaM9.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-DVKCC_R7.js → RovingTabindexMixin.stories-Y8vBWjJp.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-bBYHOszW.js → Rtc.stories-D3Y-z8y_.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-BIK8YINt.js → ScrollShadow.stories-1KD0lWHX.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-COEk74kM.js → Switch.stories-Bsqvm_HE.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-Dbt9JvSx.js → Tab.stories-CzcTisNs.js} +1 -1
- package/dist/storybook/assets/{Tabs-BIScOPS0.js → Tabs-DdpYNZSW.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-CodKgVf2.js → Tabs.stories-UOS3V0J4.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BhIqWWrQ.js → Throttle.stories-C8jgzh6e.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-DKD8nBM1.js → Tooltip.stories-B5BoI0cH.js} +1 -1
- package/dist/storybook/assets/{TooltipMixin-CRNNusJ7.js → TooltipMixin-CVKslCDt.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-WTO15ST1.js → Upload.stories-BsQDCDqo.js} +1 -1
- package/dist/storybook/assets/{UploadItem-DejgZ5A0.js → UploadItem-CYQqNwUF.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-Pk3ghOcI.js → UploadItem.stories-_le7XBTV.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-DrNnxvt9.js → Welcome.stories-rramKkhd.js} +33 -3
- package/dist/storybook/assets/{Widget.stories-CYC5Qdac.js → Widget.stories-DtbAaklk.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-DK6PZNaa.js → WithTooltip-65CFNBJE-DK6GcBuR.js} +1 -1
- package/dist/storybook/assets/{blocks-Dzcxb014.js → blocks-DHnzPh43.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-PioIuXjk.js → formatter-EIJCOSYU-qig-qWlG.js} +1 -1
- package/dist/storybook/assets/if-defined-DerKRcyC.js +1 -0
- package/dist/storybook/assets/{iframe-Byo_x5o2.js → iframe-DlBK9Drk.js} +3 -3
- package/dist/storybook/assets/{index-gox-Wle0.js → index-CItQyB37.js} +1 -1
- package/dist/storybook/assets/{lottie_svg-3t2UJxjZ.js → lottie_svg-C3v6xdng.js} +1 -1
- package/dist/storybook/assets/{onFind-BWiaccUj.js → onFind-Ci35eu2y.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-CC_XTN2G.js → onFind.stories-BmbwWWo1.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-CXxpL4ud.js → onRemove.stories-DFWCIgE4.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DKA9cexx.js → onVisible.stories-B-onpgE-.js} +1 -1
- package/dist/storybook/assets/{property-_few0Xe5.js → property-Bmq4RTSP.js} +1 -1
- package/dist/storybook/assets/{ref-BaIdO8Sk.js → ref-BhKk4SDh.js} +1 -1
- package/dist/storybook/assets/state-DVIUS0Gf.js +1 -0
- package/dist/storybook/assets/{style-map-DxZm5Cj7.js → style-map-DE4G47KD.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-B0_bSGZz.js → syntaxhighlighter-ED5Y7EFY-Dfgnal1d.js} +1 -1
- package/dist/storybook/custom-elements.json +11835 -0
- package/dist/storybook/docs/components/ActionBar.md +55 -0
- package/dist/storybook/docs/components/ActionItem.md +50 -0
- package/dist/storybook/docs/components/AiSparkle.md +33 -0
- package/dist/storybook/docs/components/Avatar.md +45 -0
- package/dist/storybook/docs/components/AvatarGroup.md +34 -0
- package/dist/storybook/docs/components/Badge.md +47 -0
- package/dist/storybook/docs/components/Banner.md +35 -0
- package/dist/storybook/docs/components/ButtonGroup.md +65 -0
- package/dist/storybook/docs/components/Card.md +67 -0
- package/dist/storybook/docs/components/Checkbox.md +49 -0
- package/dist/storybook/docs/components/CircularProgress.md +40 -0
- package/dist/storybook/docs/components/CopyToClipboard.md +51 -0
- package/dist/storybook/docs/components/Dropdown.md +74 -0
- package/dist/storybook/docs/components/DropdownItem.md +45 -0
- package/dist/storybook/docs/components/DropdownMenu.md +41 -0
- package/dist/storybook/docs/components/EmptyState.md +62 -0
- package/dist/storybook/docs/components/EscaAvatar.md +40 -0
- package/dist/storybook/docs/components/Icon.md +40 -0
- package/dist/storybook/docs/components/IconButton.md +36 -0
- package/dist/storybook/docs/components/LinearProgress.md +37 -0
- package/dist/storybook/docs/components/Message.md +50 -0
- package/dist/storybook/docs/components/Pagination.md +70 -0
- package/dist/storybook/docs/components/Popover.md +59 -0
- package/dist/storybook/docs/components/README.md +48 -0
- package/dist/storybook/docs/components/Radio.md +55 -0
- package/dist/storybook/docs/components/RadioGroup.md +34 -0
- package/dist/storybook/docs/components/Switch.md +48 -0
- package/dist/storybook/docs/components/Tab.md +40 -0
- package/dist/storybook/docs/components/Tabs.md +49 -0
- package/dist/storybook/docs/components/Upload.md +63 -0
- package/dist/storybook/docs/components/UploadItem.md +30 -0
- package/dist/storybook/docs/components/Widget.md +88 -0
- package/dist/storybook/docs/dari-elements.md +55 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.html +29 -2
- package/dist/storybook/llms-full.txt +1721 -0
- package/dist/storybook/llms.txt +65 -0
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/robots.txt +7 -0
- package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +1 -1
- package/dist/storybook/sitemap.xml +90 -0
- package/docs/components/ActionBar.md +41 -64
- package/docs/components/ActionItem.md +50 -96
- package/docs/components/AiSparkle.md +23 -60
- package/docs/components/Avatar.md +45 -88
- package/docs/components/AvatarGroup.md +24 -44
- package/docs/components/Badge.md +34 -62
- package/docs/components/Banner.md +25 -39
- package/docs/components/ButtonGroup.md +65 -99
- package/docs/components/Card.md +67 -83
- package/docs/components/Checkbox.md +49 -91
- package/docs/components/CircularProgress.md +40 -84
- package/docs/components/CopyToClipboard.md +35 -40
- package/docs/components/Dropdown.md +74 -120
- package/docs/components/DropdownItem.md +45 -81
- package/docs/components/DropdownMenu.md +30 -70
- package/docs/components/EmptyState.md +45 -62
- package/docs/components/EscaAvatar.md +30 -61
- package/docs/components/Icon.md +29 -62
- package/docs/components/IconButton.md +36 -83
- package/docs/components/LinearProgress.md +28 -70
- package/docs/components/Message.md +38 -63
- package/docs/components/Pagination.md +70 -100
- package/docs/components/Popover.md +46 -79
- package/docs/components/README.md +34 -40
- package/docs/components/Radio.md +55 -105
- package/docs/components/RadioGroup.md +26 -55
- package/docs/components/Switch.md +48 -84
- package/docs/components/Tab.md +30 -70
- package/docs/components/Tabs.md +49 -86
- package/docs/components/Upload.md +63 -112
- package/docs/components/UploadItem.md +22 -53
- package/docs/components/Widget.md +66 -67
- package/llms.txt +63 -0
- package/package.json +8 -6
- package/dist/storybook/assets/if-defined-DL7cQU7O.js +0 -1
- package/dist/storybook/assets/state-BBcPmYaV.js +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# `<btu-action-bar>`
|
|
2
|
+
|
|
3
|
+
A persistent container for primary, secondary, tertiary, and destructive actions
|
|
4
|
+
within an interface, typically anchored to the bottom of a view.
|
|
5
|
+
|
|
6
|
+
Uses a two-zone layout: destructive actions on the left (start zone),
|
|
7
|
+
main actions on the right (end zone). Both zones maintain their position
|
|
8
|
+
even when the other zone is empty (BSP-18087).
|
|
9
|
+
|
|
10
|
+
**Positioning:** Uses `margin-top: auto` to push to bottom of flex/grid parents.
|
|
11
|
+
In block layout parents, the bar sits after content (a console warning is emitted).
|
|
12
|
+
|
|
13
|
+
**Overflow:** When items don't fit, the least important overflow into a "More" dropdown.
|
|
14
|
+
Items are auto-sorted by variant priority (tertiary → secondary → primary).
|
|
15
|
+
With `compact`, compactable items progressively hide labels one-by-one before overflowing.
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import '@brightspot/ui/components/action-bar/ActionBar.js'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-action-bar--docs
|
|
22
|
+
|
|
23
|
+
## Attributes
|
|
24
|
+
|
|
25
|
+
| Attribute | Property | Type | Default | Description |
|
|
26
|
+
| --- | --- | --- | --- | --- |
|
|
27
|
+
| `position` | `position` | `'top' \| 'bottom'` | `'bottom'` | Bar position: 'top' or 'bottom' (default). |
|
|
28
|
+
| `sticky` | `sticky` | `boolean` | `false` | Enables CSS sticky positioning. When combined with position='top', the bar sticks to the top of the scroll container. With position='bottom' (default), it sticks to the bottom. |
|
|
29
|
+
| `item-alignment` | `alignment` | `'default' \| 'start' \| 'center' \| 'end'` | `'default'` | Content alignment: 'default' (two-zone), 'start', 'center', 'end'. Non-default alignments disable two-zone layout. |
|
|
30
|
+
| `shadow` | `shadow` | `boolean` | `false` | Adds a box-shadow to the bar. |
|
|
31
|
+
| `label` | `label` | `string` | `''` | Accessible label for the toolbar region. |
|
|
32
|
+
| `compact` | `compact` | `boolean` | `false` | Enables progressive label compacting. When space shrinks, items marked `compactable` (with icons) have their labels hidden one-by-one from least to most important before items overflow into "More". |
|
|
33
|
+
|
|
34
|
+
## Events
|
|
35
|
+
|
|
36
|
+
| Event | Detail | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `btu-action-bar-ready` | | Fired after first render and initialization |
|
|
39
|
+
| `btu-action-item-click` | `{label: string}` | Fired when an action item is clicked (bubbles from btu-action-item) |
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
| Slot | Description |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| (default) | One or more `btu-action-item` elements |
|
|
46
|
+
|
|
47
|
+
## CSS custom properties
|
|
48
|
+
|
|
49
|
+
| Property | Description |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `--action-bar-gap` | Gap between items (default: 0.75rem) |
|
|
52
|
+
| `--action-bar-padding` | Bar padding (default: 1.5rem) |
|
|
53
|
+
| `--action-bar-background` | Background color (default: white) |
|
|
54
|
+
| `--action-bar-border-color` | Border color (default: gray-200) |
|
|
55
|
+
| `--action-bar-z-index` | Z-index (default: 100) |
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# `<btu-action-item>`
|
|
2
|
+
|
|
3
|
+
An action item button for use within `btu-action-bar`.
|
|
4
|
+
|
|
5
|
+
Renders a styled button using existing `btu-button-*` classes. Supports
|
|
6
|
+
primary, secondary, tertiary, and destructive variants. When `iconOnly`
|
|
7
|
+
is set, the label is hidden and a tooltip is shown instead.
|
|
8
|
+
|
|
9
|
+
**Button styling:** Set `--button-*` CSS custom properties on `<btu-action-item>`
|
|
10
|
+
or a parent element to customize via CSS inheritance. See
|
|
11
|
+
`tailwind-plugin-button.ts` for available props.
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import '@brightspot/ui/components/action-bar/ActionItem.js'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-action-bar-action-item--docs
|
|
18
|
+
|
|
19
|
+
## Attributes
|
|
20
|
+
|
|
21
|
+
| Attribute | Property | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- | --- |
|
|
23
|
+
| `label` | `label` | `string` | `''` | Button label text. |
|
|
24
|
+
| `variant` | `variant` | `'primary' \| 'secondary' \| 'tertiary' \| 'destructive'` | `'secondary'` | Visual variant: 'primary', 'secondary', 'tertiary', 'destructive'. |
|
|
25
|
+
| `symbol` | `symbol` | `string` | `''` | Lucide icon symbol for the leading icon. |
|
|
26
|
+
| `icon-only` | `iconOnly` | `boolean` | `false` | Show icon only, hiding the label. Tooltip activates automatically with the label text. |
|
|
27
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables the action item. The button remains focusable for accessibility but click events are suppressed. |
|
|
28
|
+
| `loading` | `loading` | `boolean` | `false` | Shows a loading spinner and prevents interaction. |
|
|
29
|
+
| `zone` | `zone` | `'start' \| 'end' \| ''` | `''` | Zone placement: 'start' or 'end'. Used by ActionBar for two-zone layout. If unset, auto-detected from variant (destructive → start, others → end). |
|
|
30
|
+
| `compactable` | `compactable` | `boolean` | `false` | Opt-in for progressive label compacting. When the parent bar has `compact` enabled and space shrinks, compactable items with icons have their labels hidden one-by-one (least important first) before overflowing. Items without an icon ignore this attribute and go directly to overflow. |
|
|
31
|
+
| `tooltip` | `tooltip` | `string` | `''` | Tooltip text content. Set to empty string to remove the tooltip. |
|
|
32
|
+
| `tooltip-position` | `tooltipPosition` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Position relative to the host element. Auto-flips when constrained by the viewport. |
|
|
33
|
+
| `tooltip-delay` | `tooltipDelay` | `number` | `300` | Show delay in milliseconds (hover trigger only). |
|
|
34
|
+
| `tooltip-offset` | `tooltipOffset` | `'sm' \| 'md' \| 'lg' \| 'xl' \| null` | `null` | Gap between host and tooltip (sm=4px, md=8px, lg=12px, xl=16px). |
|
|
35
|
+
| `tooltip-no-arrow` | `tooltipNoArrow` | `boolean` | `false` | Hide the arrow pseudo-element. |
|
|
36
|
+
| `tooltip-trigger` | `tooltipTrigger` | `string` | `'hover focus'` | Space-separated trigger types: 'hover', 'focus', 'click'. |
|
|
37
|
+
|
|
38
|
+
## Events
|
|
39
|
+
|
|
40
|
+
| Event | Detail | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `btu-action-item-click` | `{label: string}` | Fired when the action item is clicked (not fired when disabled or loading) |
|
|
43
|
+
|
|
44
|
+
## CSS custom properties
|
|
45
|
+
|
|
46
|
+
| Property | Description |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `--button-color` | Override button background color |
|
|
49
|
+
| `--button-text-color` | Override button text color |
|
|
50
|
+
| `--button-border-radius` | Override button border radius |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<btu-ai-sparkle>`
|
|
2
|
+
|
|
3
|
+
The animated AI-branding sparkle. Drive it with the `playing` boolean: `true` loops the clip to
|
|
4
|
+
draw the eye to an AI entry point, `false` freezes the full sparkle so it reads as a static brand
|
|
5
|
+
mark once the surface it advertises is engaged. Reduced-motion users always get the frozen frame.
|
|
6
|
+
|
|
7
|
+
Decorative by default (`aria-hidden="true"`, set only when absent) — the control it sits in owns
|
|
8
|
+
the accessible name.
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import '@brightspot/ui/components/ai-sparkle/AiSparkle.js'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-ai-sparkle--docs
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Property | Type | Default | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `playing` | `playing` | `boolean` | `false` | Whether the sparkle animates; otherwise it holds the last (fully-formed) frame. Opt-in (default `false`) like `autoplay`: a boolean defaulting to `true` can't be cleared by attribute absence. The converter also treats `playing="false"` as paused (a plain `type: Boolean` would read any present value, even "false", as `true`). |
|
|
21
|
+
| `size` | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Size of the sparkle, mirroring `<btu-avatar>`'s scale. `--ai-sparkle-size` overrides it. |
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
| Event | Detail | Description |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `btu-ai-sparkle-ready` | | Fired after the first render |
|
|
28
|
+
|
|
29
|
+
## CSS custom properties
|
|
30
|
+
|
|
31
|
+
| Property | Description |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `--ai-sparkle-size` | Width and height of the sparkle; overrides the `size` attribute (default: 2.5rem) |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# `<btu-avatar>`
|
|
2
|
+
|
|
3
|
+
An avatar component for displaying user profile images with fallback support.
|
|
4
|
+
|
|
5
|
+
Avatars display user profile images with automatic fallback to initials when
|
|
6
|
+
the image fails to load or is not provided.
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
import '@brightspot/ui/components/avatar/Avatar.js'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-avatar--docs
|
|
13
|
+
|
|
14
|
+
## Attributes
|
|
15
|
+
|
|
16
|
+
| Attribute | Property | Type | Default | Description |
|
|
17
|
+
| --- | --- | --- | --- | --- |
|
|
18
|
+
| `src` | `src` | `string` | `''` | Image source URL |
|
|
19
|
+
| `alt` | `alt` | `string` | `''` | Alt text for the image |
|
|
20
|
+
| `fallback` | `fallback` | `string` | `''` | Fallback text (typically user initials) |
|
|
21
|
+
| `size` | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'xxl'` | `'md'` | Size variant. - 'xs': Extra small (1.5rem) - 'sm': Small (2.25rem) - 'md': Medium (2.5rem) - default - 'lg': Large (3rem) - 'xl': Extra large (3.5rem) - 'xxl': Extra extra large (4rem) |
|
|
22
|
+
| `tooltip` | `tooltip` | `string` | `''` | Tooltip text content. Set to empty string to remove the tooltip. |
|
|
23
|
+
| `tooltip-position` | `tooltipPosition` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Position relative to the host element. Auto-flips when constrained by the viewport. |
|
|
24
|
+
| `tooltip-delay` | `tooltipDelay` | `number` | `300` | Show delay in milliseconds (hover trigger only). |
|
|
25
|
+
| `tooltip-offset` | `tooltipOffset` | `'sm' \| 'md' \| 'lg' \| 'xl' \| null` | `null` | Gap between host and tooltip (sm=4px, md=8px, lg=12px, xl=16px). |
|
|
26
|
+
| `tooltip-no-arrow` | `tooltipNoArrow` | `boolean` | `false` | Hide the arrow pseudo-element. |
|
|
27
|
+
| `tooltip-trigger` | `tooltipTrigger` | `string` | `'hover focus'` | Space-separated trigger types: 'hover', 'focus', 'click'. |
|
|
28
|
+
|
|
29
|
+
## Events
|
|
30
|
+
|
|
31
|
+
| Event | Detail | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `btu-avatar-ready` | | Fired after first render and initialization |
|
|
34
|
+
| `btu-avatar-image-loaded` | `{src: string}` | Fired when image successfully loads |
|
|
35
|
+
| `btu-avatar-image-error` | `{src: string, error: Event}` | Fired when image fails to load |
|
|
36
|
+
|
|
37
|
+
## CSS custom properties
|
|
38
|
+
|
|
39
|
+
| Property | Description |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `--avatar-size` | Custom size (overrides size prop) |
|
|
42
|
+
| `--avatar-bg-color` | Fallback background color (default: purple-600) |
|
|
43
|
+
| `--avatar-corner-rounding` | How rounded is the avatar (default: circle) |
|
|
44
|
+
| `--avatar-ring-color` | Optional ring border color |
|
|
45
|
+
| `--avatar-ring-width` | Ring border width (default: 2px) |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<btu-avatar-group>`
|
|
2
|
+
|
|
3
|
+
A container component for grouping multiple avatars with consistent styling.
|
|
4
|
+
|
|
5
|
+
AvatarGroup wraps multiple avatar elements and provides:
|
|
6
|
+
- Overflow handling (shows "+N" for excess avatars)
|
|
7
|
+
- Consistent spacing and ring borders
|
|
8
|
+
- Size inheritance for all child avatars
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import '@brightspot/ui/components/avatar/AvatarGroup.js'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-avatar-group--docs
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Property | Type | Default | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `max` | `max` | `number \| undefined` | | Maximum number of visible avatars. Remaining avatars shown as "+N" |
|
|
21
|
+
| `size` | `size` | `'xs' \| 'sm' \| 'md'` | `'md'` | Size variant for all child avatars (unless individually overridden) |
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
| Method | Description |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `processAvatars(): void` | Process all avatar children: apply size, handle overflow Call this method when avatars are dynamically added or removed |
|
|
28
|
+
|
|
29
|
+
## Events
|
|
30
|
+
|
|
31
|
+
| Event | Detail | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `btu-avatar-group-ready` | | Fired after first render and initialization |
|
|
34
|
+
| `btu-avatar-group-overflow` | `{hidden: number}` | Fired when avatars are hidden due to max limit |
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# `<btu-badge>`
|
|
2
|
+
|
|
3
|
+
A badge component for highlighting important information.
|
|
4
|
+
|
|
5
|
+
Badges help highlight notifications, status, or new messages.
|
|
6
|
+
Primarily used for communicating secondary or additional information.
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
import '@brightspot/ui/components/badge/Badge.js'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The CMS page defines this element itself, so a plugin can use it there without the import.
|
|
13
|
+
|
|
14
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-badge--docs
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Property | Type | Default | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `variant` | `variant` | `'info' \| 'primary' \| 'error' \| 'success' \| 'warning'` | `'info'` | Style of the badge. - 'info': Informational (default) - 'primary': Primary action or emphasis - 'error': Error or danger state - 'success': Success or completion state - 'warning': Warning or caution state |
|
|
21
|
+
| `dot` | `dot` | `boolean` | `false` | Should a dot be displayed before the label? |
|
|
22
|
+
| `size` | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Size variant. - 'sm': Small (default) - 'md': Medium - 'lg': Large |
|
|
23
|
+
| `activity` | `activity` | `'busy' \| 'live' \| undefined` | | Attention state that draws the eye to the badge. Names the *intent*; the component owns the visual treatment (so it can change without callers). - 'busy': an in-progress state — a glint shimmers across the label text - 'live': a live/active state — a ring ripples out from the leading dot (implies `dot`) |
|
|
24
|
+
| `fill` | `fill` | `'soft' \| 'solid'` | `'soft'` | Fill style. - 'soft': pale background with strong text (default) - 'solid': swaps the shades for a filled pill |
|
|
25
|
+
|
|
26
|
+
## Events
|
|
27
|
+
|
|
28
|
+
| Event | Detail | Description |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `btu-badge-ready` | | Fired after first render and initialization |
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
|
|
34
|
+
| Slot | Description |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| (default) | Label text or child elements (e.g., btu-icon + text) |
|
|
37
|
+
|
|
38
|
+
## CSS custom properties
|
|
39
|
+
|
|
40
|
+
| Property | Description |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `--badge-color-foreground` | Text color (overrides theme color) |
|
|
43
|
+
| `--badge-color-background` | Background color (overrides theme color) |
|
|
44
|
+
| `--badge-radius-size` | Border radius size (overrides shape default, default: 999px) |
|
|
45
|
+
| `--badge-px` | Horizontal padding (overrides size default) |
|
|
46
|
+
| `--badge-py` | Vertical padding (overrides size default) |
|
|
47
|
+
| `--badge-dot-size` | Size of the dot affordance (default: 6px) |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# `<btu-banner>`
|
|
2
|
+
|
|
3
|
+
A full-width container that pins a `<btu-message>` to the top of the CMS or a
|
|
4
|
+
content edit page. The banner has no content API of its own — compose a
|
|
5
|
+
`<btu-message>` inside it (or several, e.g. for a paginated banner) and the banner
|
|
6
|
+
spans each to 100% of the host, rendering it full-bleed (edge-to-edge, bottom
|
|
7
|
+
border only, no corner rounding).
|
|
8
|
+
|
|
9
|
+
Set the content (variant, label, symbol, dismissible, badge/description/actions
|
|
10
|
+
slots) on the message itself. The full-width treatment lives on this wrapper, so
|
|
11
|
+
the message has no `full-width` attribute — the banner owns that.
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import '@brightspot/ui/components/banner/Banner.js'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-banner--docs
|
|
18
|
+
|
|
19
|
+
## Events
|
|
20
|
+
|
|
21
|
+
| Event | Detail | Description |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `btu-banner-ready` | | Fired after the banner is first rendered and initialized |
|
|
24
|
+
|
|
25
|
+
## Slots
|
|
26
|
+
|
|
27
|
+
| Slot | Description |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| (default) | One or more `<btu-message>` elements, full-bleed to the host width. With more than one, the banner auto-creates a `<btu-pagination>` and shows one at a time. |
|
|
30
|
+
|
|
31
|
+
## CSS custom properties
|
|
32
|
+
|
|
33
|
+
| Property | Description |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `--banner-z-index` | Stack order for the banner (default: 100). The banner is `position: relative`, so this always applies; set `position: sticky` to also pin it to the viewport. |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# `<btu-button-group>`
|
|
2
|
+
|
|
3
|
+
A semantic container for grouping related buttons together.
|
|
4
|
+
|
|
5
|
+
Supports connected (joined) and spaced layouts, horizontal and vertical
|
|
6
|
+
orientation, group-level size and disabled propagation, and optional
|
|
7
|
+
toggle/selection modes (single-select or multi-select).
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import '@brightspot/ui/components/button-group/ButtonGroup.js'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-button-group--docs
|
|
14
|
+
|
|
15
|
+
## Attributes
|
|
16
|
+
|
|
17
|
+
| Attribute | Property | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- | --- |
|
|
19
|
+
| `label` | `label` | `string` | `''` | Accessible name for the group, announced by assistive devices via aria-label. |
|
|
20
|
+
| `orientation` | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction of the buttons. |
|
|
21
|
+
| `variant` | `variant` | `'connected' \| 'spaced'` | `'connected'` | `connected` collapses shared borders for a joined appearance. `spaced` renders buttons with a gap. |
|
|
22
|
+
| `size` | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Propagates a uniform size to all child buttons. |
|
|
23
|
+
| `disabled` | `disabled` | `boolean` | `false` | When true, disables all child buttons as a group. |
|
|
24
|
+
| `selection` | `selection` | `'none' \| 'single' \| 'multiple'` | `'none'` | Enables toggle/selection behavior. `single` allows one active button; `multiple` allows many. |
|
|
25
|
+
| `value` | `value` | `string` | `''` | Reflects the currently selected button value(s). For `single`, the value of the active button. For `multiple`, a comma-delimited list of active values. |
|
|
26
|
+
| `name` | `name` | `string` | `''` | When set, creates hidden input(s) for native form participation. |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
| Event | Detail | Description |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `btu-button-group-ready` | | Fired after first render and initialization |
|
|
33
|
+
| `btu-button-group-change` | `{value: string}` | Fired when selection changes (single/multiple modes only) |
|
|
34
|
+
| `btu-icon-button-click` | `{name: string \| undefined}` | Bubbles from child btu-icon-button elements when clicked |
|
|
35
|
+
|
|
36
|
+
## Slots
|
|
37
|
+
|
|
38
|
+
| Slot | Description |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| (default) | One or more `<button class="btu-button …">` or `<btu-icon-button>` elements to display in the group. The `connected` variant rounds the outer corners on the real `<button>`, so anchors styled as `.btu-button` slotted directly will not get rounded corners. Use `<button>` for grouped controls. |
|
|
41
|
+
| `end` | Pushes the child to the end of the group via auto-margin (vertical: bottom, horizontal: right) |
|
|
42
|
+
|
|
43
|
+
## CSS custom properties
|
|
44
|
+
|
|
45
|
+
| Property | Description |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `--button-group-gap` | Space between buttons when variant="spaced" (default: spacing.sm) |
|
|
48
|
+
| `--button-group-border-radius` | Corner radius of outer edges when variant="connected" (default: 0.5rem) |
|
|
49
|
+
| `--button-group-border-color` | Internal divider color between connected buttons (default: gray-300) |
|
|
50
|
+
| `--button-group-selection-bg` | Background of a toggled/selected child (default: child's --button-tint-subtle) |
|
|
51
|
+
| `--button-group-selection-color` | Text/icon color of a toggled/selected child (default: child's --button-tint-strong) |
|
|
52
|
+
| `--button-group-shimmer-highlight` | Highlight color of the selection shimmer effect (default: child's --button-tint-highlight) Reads the following CSS custom properties from each child button (set by the button plugin per color variant — see tailwind-plugin-button.ts): |
|
|
53
|
+
| `--button-tint-subtle` | Subtle tint of the child button's color family (read-only here) |
|
|
54
|
+
| `--button-tint-strong` | Strong tint of the child button's color family (read-only here) |
|
|
55
|
+
| `--button-tint-highlight` | Highlight tint of the child button's color family (read-only here) |
|
|
56
|
+
|
|
57
|
+
## CSS states
|
|
58
|
+
|
|
59
|
+
| State | Description |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `:state(btu-connected)` | Applied when variant="connected", targetable via :state(btu-connected) |
|
|
62
|
+
| `:state(btu-spaced)` | Applied when variant="spaced", targetable via :state(btu-spaced) |
|
|
63
|
+
| `:state(btu-horizontal)` | Applied when orientation="horizontal", targetable via :state(btu-horizontal) |
|
|
64
|
+
| `:state(btu-vertical)` | Applied when orientation="vertical", targetable via :state(btu-vertical) |
|
|
65
|
+
| `:state(btu-disabled)` | Applied when the group is disabled, targetable via :state(btu-disabled) |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# `<btu-card>`
|
|
2
|
+
|
|
3
|
+
A flexible content container for presenting and organizing information.
|
|
4
|
+
|
|
5
|
+
The layout is driven by composition:
|
|
6
|
+
|
|
7
|
+
- a direct `<img>` or `<btu-icon>` child renders the media layout (image area);
|
|
8
|
+
the icon shows in the image area as the fallback.
|
|
9
|
+
- neither child renders a text-only card.
|
|
10
|
+
- the `compact` attribute renders a quick-start tile; only a
|
|
11
|
+
featured `<btu-icon>` and the `action` slot are used.
|
|
12
|
+
|
|
13
|
+
Composable children, all relocated into the layout automatically:
|
|
14
|
+
- `<img>` — the thumbnail.
|
|
15
|
+
- `<btu-icon>` — the featured icon (compact) or the media image fallback (shown
|
|
16
|
+
when no `<img>` is provided or it fails to load; defaults to `file-text`). The card sizes it.
|
|
17
|
+
- `<btu-badge>` — a status badge.
|
|
18
|
+
- `slot="action"` / `slot="secondary-action"` — a control in the top-right corner
|
|
19
|
+
or next to the title. A `<btu-checkbox>` there stays visible and toggles the
|
|
20
|
+
selected styling (listen for the bubbling `btu-checkbox-change` event); buttons
|
|
21
|
+
reveal on hover/focus.
|
|
22
|
+
|
|
23
|
+
Cards are full-width by default and rely on the parent layout (grid or flex) to
|
|
24
|
+
control their size.
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import '@brightspot/ui/components/card/Card.js'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-card--docs
|
|
31
|
+
|
|
32
|
+
## Attributes
|
|
33
|
+
|
|
34
|
+
| Attribute | Property | Type | Default | Description |
|
|
35
|
+
| --- | --- | --- | --- | --- |
|
|
36
|
+
| `heading` | `heading` | `string` | `''` | Heading text displayed on the card. |
|
|
37
|
+
| `heading-level` | `headingLevel` | `number` | `2` | Heading level (1-6) for the card heading element. Drives the semantic h1–h6 tag. Invalid values log a warning and fall back to the default (2). |
|
|
38
|
+
| `description` | `description` | `string \| undefined` | | Supporting body text. Truncated to 3 lines via CSS. |
|
|
39
|
+
| `compact` | `compact` | `boolean` | `false` | Renders the card as a compact quick-start tile. Badge, image, fields, and secondary-action children are ignored in this case. |
|
|
40
|
+
| `disabled` | `disabled` | `boolean` | `false` | Whether the card is disabled. |
|
|
41
|
+
| `href` | `href` | `string \| undefined` | | Navigation URL for the entire card surface. When set, the card renders as a link. |
|
|
42
|
+
|
|
43
|
+
## Events
|
|
44
|
+
|
|
45
|
+
| Event | Detail | Description |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| `btu-card-ready` | | Fired after first render and initialization |
|
|
48
|
+
|
|
49
|
+
## Slots
|
|
50
|
+
|
|
51
|
+
| Slot | Description |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `action` | Intended for a single action in the top-right corner of the card. |
|
|
54
|
+
| `secondary-action` | Intended for a single action next to the title. |
|
|
55
|
+
| `fields` | Intended for additional metadata fields displayed below the title & description |
|
|
56
|
+
|
|
57
|
+
## CSS custom properties
|
|
58
|
+
|
|
59
|
+
| Property | Description |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `--card-min-width` | Minimum width of the card (default: 160px) |
|
|
62
|
+
| `--card-background` | Background color (default: var(--btu-theme-white)) |
|
|
63
|
+
| `--card-border` | Border style (default: 1px solid gray-200) |
|
|
64
|
+
| `--card-radius` | Corner rounding (default: 8px) |
|
|
65
|
+
| `--card-img-ratio` | Fixed aspect ratio for the thumbnail when an `<img>` child is present (default: 16 / 9) |
|
|
66
|
+
| `--card-img-fit` | Object-fit mode for the `<img>` child thumbnail (default: contain) |
|
|
67
|
+
| `--card-icon-background` | Background color behind the composed icon (compact card and media-image fallback) (default: gray-100) |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# `<btu-checkbox>`
|
|
2
|
+
|
|
3
|
+
A checkbox component for selecting one or more options from a set.
|
|
4
|
+
|
|
5
|
+
Uses a hidden native checkbox internally for accessibility and form
|
|
6
|
+
participation. Styled via the `btu-checkbox` Tailwind plugin classes.
|
|
7
|
+
The component manages its own `className` — do not modify it externally
|
|
8
|
+
after initialization (classes present at connection time are preserved).
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import '@brightspot/ui/components/checkbox/Checkbox.js'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-checkbox--docs
|
|
15
|
+
|
|
16
|
+
## Attributes
|
|
17
|
+
|
|
18
|
+
| Attribute | Property | Type | Default | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `label` | `label` | `string \| undefined` | | The text label displayed next to the checkbox. |
|
|
21
|
+
| `description` | `description` | `string \| undefined` | | Optional helper text displayed below the label. |
|
|
22
|
+
| `size` | `size` | `'sm' \| 'md'` | `'sm'` | Controls the scale of the checkbox and associated typography. |
|
|
23
|
+
| `checked` | `checked` | `boolean` | `false` | Whether the checkbox is currently selected. |
|
|
24
|
+
| `indeterminate` | `indeterminate` | `boolean` | `false` | Whether the checkbox is in a partially selected state. Sets `aria-checked='mixed'` and activates the native `:indeterminate` pseudo-class. Cleared automatically when the user clicks the checkbox. |
|
|
25
|
+
| `disabled` | `disabled` | `boolean` | `false` | If true, the checkbox is non-interactive and visually muted. |
|
|
26
|
+
| `invalid` | `invalid` | `boolean` | `false` | If true, displays error styling on the checkbox. |
|
|
27
|
+
| `error` | `error` | `string \| undefined` | | Error message text displayed below the checkbox when validation fails. Setting this also activates error styling without needing to set invalid. |
|
|
28
|
+
| `required` | `required` | `boolean` | `false` | Marks the field as mandatory for form submission. |
|
|
29
|
+
| `name` | `name` | `string \| undefined` | | Name of the form control submitted with the form data. |
|
|
30
|
+
| `value` | `value` | `string` | `'on'` | Value associated with the checkbox when submitted. |
|
|
31
|
+
|
|
32
|
+
## Events
|
|
33
|
+
|
|
34
|
+
| Event | Detail | Description |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `btu-checkbox-ready` | | Fired after the checkbox is first rendered and initialized |
|
|
37
|
+
| `btu-checkbox-change` | `{ checked: boolean }` | Fired when the user toggles the checked state |
|
|
38
|
+
|
|
39
|
+
## CSS custom properties
|
|
40
|
+
|
|
41
|
+
| Property | Description |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `--checkbox-color-primary` | Background and border color when checked or indeterminate, and tinted background/border on unchecked hover (default: oklch(var(--btu-theme-primary-700))) |
|
|
44
|
+
| `--checkbox-color-border` | Border color in the unchecked state (default: oklch(var(--btu-theme-gray-300))) |
|
|
45
|
+
| `--checkbox-color-error` | Border and text color in the error state (default: oklch(var(--btu-theme-error-600))) |
|
|
46
|
+
| `--checkbox-border-radius` | Corner rounding of the checkbox square (default: 4px) |
|
|
47
|
+
| `--checkbox-label-spacing` | Distance between the checkbox and the label (default: 0.75rem) |
|
|
48
|
+
| `--checkbox-box-size` | [Internal] Width and height of the checkbox square, set by the size variant (sm: 1rem, md: 1.25rem). Use the `size` attribute instead of overriding directly — the icon must scale in tandem. |
|
|
49
|
+
| `--checkbox-icon-size` | [Internal] Width and height of the icon inside the box, set by the size variant (sm: 0.75rem, md: 0.875rem). Use the `size` attribute instead of overriding directly. |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<btu-circular-progress>`
|
|
2
|
+
|
|
3
|
+
A circular progress indicator for showing loading states or progress.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import '@brightspot/ui/components/circular-progress/CircularProgress.js'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-circular-progress--docs
|
|
10
|
+
|
|
11
|
+
## Attributes
|
|
12
|
+
|
|
13
|
+
| Attribute | Property | Type | Default | Description |
|
|
14
|
+
| --- | --- | --- | --- | --- |
|
|
15
|
+
| `indeterminate` | `indeterminate` | `boolean` | `true` | Whether the progress indicator is indeterminate (animated spinner). When false, shows determinate progress based on the progress value. |
|
|
16
|
+
| `size` | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Size variant. - 'sm': Small (16px) - default - 'md': Medium (32px) - 'lg': Large (48px) |
|
|
17
|
+
| `color` | `color` | `ProgressColors` | `'primary'` | Color theme of the progress indicator. Supports: black, white, primary, teal, gray, purple, rose, error, warning, success |
|
|
18
|
+
| `thickness` | `thickness` | `number \| undefined` | | Stroke width of the progress indicator. |
|
|
19
|
+
| `progress` | `progress` | `number` | | Progress value for determinate variant. Clamped to 0–100. |
|
|
20
|
+
| `label` | `label` | `string \| undefined` | | Optional label text to display with the progress indicator. |
|
|
21
|
+
| `initial-animation` | `initialAnimation` | `boolean` | `true` | Whether to animate progress from 0 to target value when component first becomes visible. |
|
|
22
|
+
| `aria-label` | `ariaLabel` | `string \| null` | `null` | Optional aria-label attribute for screen readers. Describes what the progress indicator represents. |
|
|
23
|
+
| `aria-labelledby` | `ariaLabelledBy` | `string \| null` | `null` | Optional aria-labelledby attribute for screen readers. References the ID of an element that labels the progress indicator. |
|
|
24
|
+
| `aria-valuetext` | `ariaValueText` | `string \| null` | `null` | Optional aria-valuetext attribute for screen readers. Provides human-readable text alternative for progress value. |
|
|
25
|
+
| `completion-announcement` | `completionAnnouncement` | `string \| undefined` | | Optional message to announce to screen readers when progress reaches 100%. If not provided, no announcement will be made on completion. |
|
|
26
|
+
|
|
27
|
+
## Events
|
|
28
|
+
|
|
29
|
+
| Event | Detail | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `btu-circular-progress-ready` | | Fired after first render and initialization |
|
|
32
|
+
| `btu-circular-progress-complete` | | Fired when determinate progress reaches 100 |
|
|
33
|
+
|
|
34
|
+
## CSS custom properties
|
|
35
|
+
|
|
36
|
+
| Property | Description |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `--progress-color` | Custom progress indicator color (overrides theme color) |
|
|
39
|
+
| `--track-color` | Track/background color (overrides default gray-100) |
|
|
40
|
+
| `--progress-size` | Custom size in pixels (overrides size preset) |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# `<btu-copy-to-clipboard>`
|
|
2
|
+
|
|
3
|
+
A button component that copies text to the system clipboard.
|
|
4
|
+
|
|
5
|
+
Provides visual feedback when text is successfully copied by applying
|
|
6
|
+
a temporary state that can be styled with CSS.
|
|
7
|
+
|
|
8
|
+
Button styling is inherited from `btu-button-*` classes. Override appearance
|
|
9
|
+
by passing custom classes via the `buttonclasses` attribute.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import '@brightspot/ui/components/copy-to-clipboard/CopyToClipboard.js'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The CMS page defines this element itself, so a plugin can use it there without the import.
|
|
16
|
+
|
|
17
|
+
Interactive examples: https://ui.brightspot.com/?path=/docs/components-copy-to-clipboard--docs
|
|
18
|
+
|
|
19
|
+
## Attributes
|
|
20
|
+
|
|
21
|
+
| Attribute | Property | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- | --- |
|
|
23
|
+
| `copydata` | `copydata` | `string \| undefined` | | The text to be copied to the system clipboard. |
|
|
24
|
+
| `buttonclasses` | `buttonClasses` | `string \| undefined` | | Custom CSS classes for the button. If provided, replaces the default classes. |
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
These have no attribute; set them from JavaScript.
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Description |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| `copiedStateKey` (read-only) | `'btu-copy-to-clipboard-copied'` | | Custom state applied briefly after a successful copy; also emitted as an event. |
|
|
33
|
+
|
|
34
|
+
## Methods
|
|
35
|
+
|
|
36
|
+
| Method | Description |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `copy(text: string, timeout: unknown)` | Copies the copydata to the system clipboard. Displays a success state for 3 seconds after copying. |
|
|
39
|
+
|
|
40
|
+
## Events
|
|
41
|
+
|
|
42
|
+
| Event | Detail | Description |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| `btu-copy-to-clipboard-ready` | | Fired after first render and initialization |
|
|
45
|
+
| `btu-copy-to-clipboard-copied` | | Fired when text is successfully copied to clipboard |
|
|
46
|
+
|
|
47
|
+
## CSS states
|
|
48
|
+
|
|
49
|
+
| State | Description |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `:state(btu-copy-to-clipboard-copied)` | Applied briefly after a successful copy, targetable via :state(btu-copy-to-clipboard-copied) |
|