@brightspot/ui 1.10.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/action-bar/ActionBar.d.ts +163 -0
- package/dist/components/action-bar/ActionBar.d.ts.map +1 -0
- package/dist/components/action-bar/ActionBar.js +479 -0
- package/dist/components/action-bar/ActionBar.js.map +1 -0
- package/dist/components/action-bar/ActionItem.d.ts +103 -0
- package/dist/components/action-bar/ActionItem.d.ts.map +1 -0
- package/dist/components/action-bar/ActionItem.js +237 -0
- package/dist/components/action-bar/ActionItem.js.map +1 -0
- package/dist/components/avatar/AvatarGroup.d.ts +3 -0
- package/dist/components/avatar/AvatarGroup.d.ts.map +1 -1
- package/dist/components/avatar/AvatarGroup.js +3 -0
- package/dist/components/avatar/AvatarGroup.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +3 -1
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +2 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +138 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/components/button-group/ButtonGroup.js +436 -0
- package/dist/components/button-group/ButtonGroup.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +107 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +224 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/circular-progress/CircularProgress.d.ts +2 -2
- package/dist/components/circular-progress/CircularProgress.js +2 -2
- package/dist/components/copy-to-clipboard/CopyToClipboard.d.ts +7 -2
- package/dist/components/copy-to-clipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/CopyToClipboard.js +10 -5
- package/dist/components/copy-to-clipboard/CopyToClipboard.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +8 -6
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.js +33 -22
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/dropdown/DropdownItem.d.ts +28 -7
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownItem.js +41 -16
- package/dist/components/dropdown/DropdownItem.js.map +1 -1
- package/dist/components/dropdown/DropdownMenu.d.ts +6 -8
- package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownMenu.js +22 -37
- package/dist/components/dropdown/DropdownMenu.js.map +1 -1
- package/dist/components/empty-state/EmptyState.css +4 -0
- package/dist/components/empty-state/EmptyState.d.ts +103 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +209 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -0
- package/dist/components/icon/Icon.d.ts +23 -10
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +40 -9
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts +7 -21
- package/dist/components/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/icon-button/IconButton.js +12 -18
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/linear-progress/LinearProgress.d.ts +2 -2
- package/dist/components/linear-progress/LinearProgress.js +2 -2
- package/dist/components/pagination/Pagination.d.ts +33 -4
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +88 -24
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/popover/Popover.d.ts +6 -0
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/Popover.js +6 -0
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/switch/Switch.d.ts +5 -1
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +10 -6
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/tabs/Tab.d.ts +108 -0
- package/dist/components/tabs/Tab.d.ts.map +1 -0
- package/dist/components/tabs/Tab.js +152 -0
- package/dist/components/tabs/Tab.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +126 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +390 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/upload/Upload.d.ts +157 -0
- package/dist/components/upload/Upload.d.ts.map +1 -0
- package/dist/components/upload/Upload.js +538 -0
- package/dist/components/upload/Upload.js.map +1 -0
- package/dist/components/upload/UploadItem.d.ts +73 -0
- package/dist/components/upload/UploadItem.d.ts.map +1 -0
- package/dist/components/upload/UploadItem.js +180 -0
- package/dist/components/upload/UploadItem.js.map +1 -0
- package/dist/components/widget/Widget.d.ts +1 -6
- package/dist/components/widget/Widget.d.ts.map +1 -1
- package/dist/components/widget/Widget.js +1 -6
- package/dist/components/widget/Widget.js.map +1 -1
- package/dist/custom-elements.json +8445 -1989
- package/dist/storybook/assets/ActionBar.stories-DRIVI-W2.js +408 -0
- package/dist/storybook/assets/ActionItem.stories-5qlgxYNB.js +203 -0
- package/dist/storybook/assets/{Avatar.stories-B26mRkkZ.js → Avatar.stories-B3VkhRhP.js} +2 -2
- package/dist/storybook/assets/{AvatarGroup.stories-J7lVGsMY.js → AvatarGroup.stories-DOfim2NY.js} +5 -5
- package/dist/storybook/assets/{Badge.stories-BpTIV61M.js → Badge.stories-B04VNAcc.js} +2 -2
- package/dist/storybook/assets/{Button-Dg-fIrzT.js → Button-CILTcGRT.js} +1 -1
- package/dist/storybook/assets/{Button.stories-gPKRVbxk.js → Button.stories-CzWAltrX.js} +1 -1
- package/dist/storybook/assets/ButtonGroup.stories-1uAJf79o.js +588 -0
- package/dist/storybook/assets/{Celebrate.stories-DbY-sKEe.js → Celebrate.stories-BEqj0VnW.js} +7 -7
- package/dist/storybook/assets/Checkbox.stories-DXAGFS0M.js +141 -0
- package/dist/storybook/assets/{CircularProgress.stories-DeH5JYX_.js → CircularProgress.stories-D4rftw22.js} +7 -7
- package/dist/storybook/assets/{ClipboardMixin.stories-C-lZ4uuw.js → ClipboardMixin.stories-z2n2HWt1.js} +31 -28
- package/dist/storybook/assets/{Color-6BZIO3FS-Cu6zVIuG.js → Color-6BZIO3FS-C6KyMgZz.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-D6XYMrTD.js → Colors.stories-CX-Ny3B_.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-jFekKTYg.js → CombinedEffects.stories-BkqtiVHp.js} +33 -33
- package/dist/storybook/assets/{ComponentStatesMixin-g50hRCPT.js → ComponentStatesMixin-DLd0feFg.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-D3Q5pR38.js → ComponentStatesMixin.stories-D6Yc5Jgl.js} +3 -3
- package/dist/storybook/assets/{CopyToClipboard.stories-COZZ1VC2.js → CopyToClipboard.stories-B-omwDDJ.js} +16 -16
- package/dist/storybook/assets/{Debounce.stories-Dl10LAnx.js → Debounce.stories-B2vE5QIx.js} +9 -9
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-CFLtMbUx.js → DocsRenderer-LL677BLK-DNUlRvMg.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-Drwq-0Z2.js → Dropdown.stories-_bx4WDLr.js} +95 -68
- package/dist/storybook/assets/EmptyState.stories-CGMbmo77.js +318 -0
- package/dist/storybook/assets/{Events.stories-dODeR-g-.js → Events.stories-CkQYKcoZ.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CH7_-_q3.js → Heading.stories-BU5Do_od.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-CH1Y739k.js → HueRipple.stories-Di2zmxo3.js} +11 -11
- package/dist/storybook/assets/Icon.stories-Dk4ZXhhJ.js +441 -0
- package/dist/storybook/assets/{IconButton.stories-DuzqvcnN.js → IconButton.stories-BSCiXPXa.js} +126 -146
- package/dist/storybook/assets/{LinearProgress.stories-C7IdnJd3.js → LinearProgress.stories-BGxPZuni.js} +7 -7
- package/dist/storybook/assets/Pagination.stories-z3Zq8b4f.js +252 -0
- package/dist/storybook/assets/{Popover.stories-Ca1F-wrI.js → Popover.stories-C9GxWcax.js} +33 -62
- package/dist/storybook/assets/ReadyMixin-CQw8N6P9.js +1 -0
- package/dist/storybook/assets/RovingTabindexMixin.stories-ByxLBi6m.js +192 -0
- package/dist/storybook/assets/{Rtc.stories-BVJc1vCA.js → Rtc.stories-DQJlCXWR.js} +3 -3
- package/dist/storybook/assets/ScrollShadow.stories-gjTIAbUA.js +17 -0
- package/dist/storybook/assets/{Switch.stories-BEEHP8mD.js → Switch.stories-BEeqPZiP.js} +21 -21
- package/dist/storybook/assets/Tab.stories-DpB3I-WZ.js +218 -0
- package/dist/storybook/assets/Tabs.stories-C6mG6Xi7.js +211 -0
- package/dist/storybook/assets/{Throttle.stories-C4xsYeAb.js → Throttle.stories-x9tpGeQh.js} +10 -10
- package/dist/storybook/assets/{Tooltip.stories-Ccm4AnSv.js → Tooltip.stories-CqcLqdmc.js} +2 -2
- package/dist/storybook/assets/Upload.stories-CMaAbCSH.js +447 -0
- package/dist/storybook/assets/UploadItem.stories-GB98L3JQ.js +167 -0
- package/dist/storybook/assets/{Welcome.stories-Degjk-M0.js → Welcome.stories-6h9cUZ7v.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-OKnZ9sDs.js → Widget.stories-DiA1PR6Y.js} +13 -13
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-CXL3TyJ2.js → WithTooltip-65CFNBJE-DTsHhBb_.js} +2 -2
- package/dist/storybook/assets/{blocks-DLdUKG_W.js → blocks-IXdn9TGW.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-29NCxjfM.js → formatter-EIJCOSYU-Cum4J6N4.js} +1 -1
- package/dist/storybook/assets/if-defined-CgfCxQoV.js +1 -0
- package/dist/storybook/assets/iframe-BgFj0b5u.css +1 -0
- package/dist/storybook/assets/{iframe-BqvwP3or.js → iframe-Sf9RHZFu.js} +200 -200
- package/dist/storybook/assets/{index-BIyTv1BF.js → index-D605PvQH.js} +1 -1
- package/dist/storybook/assets/onFind-C41m8c_a.js +1 -0
- package/dist/storybook/assets/{onFind.stories-D64-QZqf.js → onFind.stories-MOTfGlJd.js} +53 -77
- package/dist/storybook/assets/{onRemove.stories-BICsnIJL.js → onRemove.stories-DX58Bf6f.js} +6 -10
- package/dist/storybook/assets/{onVisible.stories-DpDZP9_5.js → onVisible.stories-NNFeFeD8.js} +3 -3
- package/dist/storybook/assets/style-map-B99QiqCo.js +1 -0
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-Bz_DuQj8.js → syntaxhighlighter-ED5Y7EFY-BqQ-o9mS.js} +1 -1
- package/dist/storybook/box-illustration.svg +51 -0
- package/dist/storybook/cloud-illustration.svg +49 -0
- package/dist/storybook/docs-illustration.svg +92 -0
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-action-bar.d.ts +2 -0
- package/dist/tailwind-plugin-action-bar.d.ts.map +1 -0
- package/dist/tailwind-plugin-action-bar.js +120 -0
- package/dist/tailwind-plugin-action-bar.js.map +1 -0
- package/dist/tailwind-plugin-action-bar.ts +134 -0
- package/dist/tailwind-plugin-badge.js +5 -6
- package/dist/tailwind-plugin-badge.js.map +1 -1
- package/dist/tailwind-plugin-badge.ts +5 -6
- package/dist/tailwind-plugin-button-group.d.ts +2 -0
- package/dist/tailwind-plugin-button-group.d.ts.map +1 -0
- package/dist/tailwind-plugin-button-group.js +215 -0
- package/dist/tailwind-plugin-button-group.js.map +1 -0
- package/dist/tailwind-plugin-button-group.ts +238 -0
- package/dist/tailwind-plugin-button.js +2 -1
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +2 -1
- package/dist/tailwind-plugin-checkbox.d.ts +2 -0
- package/dist/tailwind-plugin-checkbox.d.ts.map +1 -0
- package/dist/tailwind-plugin-checkbox.js +246 -0
- package/dist/tailwind-plugin-checkbox.js.map +1 -0
- package/dist/tailwind-plugin-checkbox.ts +281 -0
- package/dist/tailwind-plugin-empty-state.d.ts +2 -0
- package/dist/tailwind-plugin-empty-state.d.ts.map +1 -0
- package/dist/tailwind-plugin-empty-state.js +113 -0
- package/dist/tailwind-plugin-empty-state.js.map +1 -0
- package/dist/tailwind-plugin-empty-state.ts +124 -0
- package/dist/tailwind-plugin-icon.js +122 -18
- package/dist/tailwind-plugin-icon.js.map +1 -1
- package/dist/tailwind-plugin-icon.ts +131 -18
- package/dist/tailwind-plugin-loader.js +3 -3
- package/dist/tailwind-plugin-loader.ts +3 -3
- package/dist/tailwind-plugin-pagination.js +13 -23
- package/dist/tailwind-plugin-pagination.js.map +1 -1
- package/dist/tailwind-plugin-pagination.ts +15 -25
- package/dist/tailwind-plugin-tabs.d.ts +2 -0
- package/dist/tailwind-plugin-tabs.d.ts.map +1 -0
- package/dist/tailwind-plugin-tabs.js +158 -0
- package/dist/tailwind-plugin-tabs.js.map +1 -0
- package/dist/tailwind-plugin-tabs.ts +169 -0
- package/dist/tailwind-plugin-upload.d.ts +2 -0
- package/dist/tailwind-plugin-upload.d.ts.map +1 -0
- package/dist/tailwind-plugin-upload.js +322 -0
- package/dist/tailwind-plugin-upload.js.map +1 -0
- package/dist/tailwind-plugin-upload.ts +362 -0
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +1 -0
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +1 -0
- package/dist/util/ClipboardMixin.d.ts +7 -2
- package/dist/util/ClipboardMixin.d.ts.map +1 -1
- package/dist/util/ClipboardMixin.js +15 -13
- package/dist/util/ClipboardMixin.js.map +1 -1
- package/dist/util/ComponentStatesMixin.d.ts +2 -1
- package/dist/util/ComponentStatesMixin.d.ts.map +1 -1
- package/dist/util/ComponentStatesMixin.js +4 -0
- package/dist/util/ComponentStatesMixin.js.map +1 -1
- package/dist/util/EventEmitterMixin.d.ts +58 -4
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js +5 -2
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/ProgressMixin.d.ts +9 -2
- package/dist/util/ProgressMixin.d.ts.map +1 -1
- package/dist/util/ProgressMixin.js +22 -18
- package/dist/util/ProgressMixin.js.map +1 -1
- package/dist/util/RovingTabindexMixin.d.ts +46 -0
- package/dist/util/RovingTabindexMixin.d.ts.map +1 -0
- package/dist/util/RovingTabindexMixin.js +83 -0
- package/dist/util/RovingTabindexMixin.js.map +1 -0
- package/dist/util/TetherLayout.d.ts.map +1 -1
- package/dist/util/TetherLayout.js +3 -0
- package/dist/util/TetherLayout.js.map +1 -1
- package/dist/util/TooltipMixin.d.ts.map +1 -1
- package/dist/util/TooltipMixin.js +5 -4
- package/dist/util/TooltipMixin.js.map +1 -1
- package/dist/util/upload.d.ts +53 -0
- package/dist/util/upload.d.ts.map +1 -0
- package/dist/util/upload.js +113 -0
- package/dist/util/upload.js.map +1 -0
- package/docs/components/ActionBar.md +77 -0
- package/docs/components/ActionItem.md +101 -0
- package/docs/components/Avatar.md +42 -12
- package/docs/components/AvatarGroup.md +4 -3
- package/docs/components/Badge.md +13 -1
- package/docs/components/ButtonGroup.md +91 -0
- package/docs/components/Checkbox.md +91 -0
- package/docs/components/CircularProgress.md +41 -12
- package/docs/components/CopyToClipboard.md +13 -11
- package/docs/components/Dropdown.md +51 -26
- package/docs/components/DropdownItem.md +44 -27
- package/docs/components/DropdownMenu.md +14 -14
- package/docs/components/EmptyState.md +75 -0
- package/docs/components/Icon.md +22 -14
- package/docs/components/IconButton.md +46 -21
- package/docs/components/LinearProgress.md +43 -4
- package/docs/components/Pagination.md +38 -34
- package/docs/components/Popover.md +16 -0
- package/docs/components/README.md +9 -0
- package/docs/components/Switch.md +21 -16
- package/docs/components/Tab.md +79 -0
- package/docs/components/Tabs.md +85 -0
- package/docs/components/Upload.md +112 -0
- package/docs/components/UploadItem.md +61 -0
- package/docs/components/Widget.md +12 -6
- package/package.json +4 -2
- package/dist/storybook/assets/Icon.stories-CPjM-jTU.js +0 -264
- package/dist/storybook/assets/Pagination.stories-C4cLjS_9.js +0 -272
- package/dist/storybook/assets/ReadyMixin-DNZ5dCsZ.js +0 -1
- package/dist/storybook/assets/ScrollShadow.stories-C3W5o9ZW.js +0 -17
- package/dist/storybook/assets/if-defined-BZFPaJjl.js +0 -1
- package/dist/storybook/assets/iframe-C5bIZMJ5.css +0 -1
- package/dist/storybook/assets/onFind-1l3EPW-I.js +0 -1
- package/dist/storybook/assets/style-map-CBrSnxRe.js +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# `src/components/tabs/Tabs.ts`:
|
|
2
|
+
|
|
3
|
+
## class: `Tabs`, `btu-tabs`
|
|
4
|
+
|
|
5
|
+
### Superclass
|
|
6
|
+
|
|
7
|
+
| Name | Module | Package |
|
|
8
|
+
| ------------ | ------ | ------- |
|
|
9
|
+
| `LitElement` | | lit |
|
|
10
|
+
|
|
11
|
+
### Mixins
|
|
12
|
+
|
|
13
|
+
| Name | Module | Package |
|
|
14
|
+
| --------------------- | -------------------------------- | ------- |
|
|
15
|
+
| `RovingTabindexMixin` | /src/util/RovingTabindexMixin.js | |
|
|
16
|
+
| `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
|
|
17
|
+
| `ReadyMixin` | /src/util/ReadyMixin.js | |
|
|
18
|
+
|
|
19
|
+
### Static Fields
|
|
20
|
+
|
|
21
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
22
|
+
| --------- | ------- | ---- | ------- | ----------- | -------------- |
|
|
23
|
+
| `tagName` | | | | | |
|
|
24
|
+
|
|
25
|
+
### Fields
|
|
26
|
+
|
|
27
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
28
|
+
| ---------------- | ------- | ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
|
29
|
+
| `size` | | `'xs' \| 'sm' \| 'md' \| 'lg'` | `'md'` | Size variant applied to all child tabs. | |
|
|
30
|
+
| `activeTab` | | `string \| undefined` | | The \`name\` value of the currently active tab. | |
|
|
31
|
+
| `variant` | | `'full' \| 'menu'` | `'full'` | Layout variant.
- 'full': tabs scroll horizontally when they overflow (default)
- 'menu': all tabs are hidden; the active tab label and a chevron dropdown are shown instead | |
|
|
32
|
+
| `menuWrapper` | private | `HTMLElement \| null` | `null` | | |
|
|
33
|
+
| `menuDropdown` | private | `Dropdown \| null` | `null` | | |
|
|
34
|
+
| `menuLabel` | private | `HTMLSpanElement \| null` | `null` | | |
|
|
35
|
+
| `menuIcon` | private | `HTMLElement \| null` | `null` | | |
|
|
36
|
+
| `menuErrorBadge` | private | `HTMLElement \| null` | `null` | | |
|
|
37
|
+
| `_dropdownSize` | private | `'sm' \| 'md' \| 'lg'` | | | |
|
|
38
|
+
| `_menuIconSize` | private | `'sm' \| 'md'` | | | |
|
|
39
|
+
|
|
40
|
+
### Methods
|
|
41
|
+
|
|
42
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
43
|
+
| ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------- | ----------------- |
|
|
44
|
+
| `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.

All events are configured with:
- bubbles: true (event propagates up the DOM tree)
- cancelable: false (event cannot be cancelled)
- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
|
|
45
|
+
|
|
46
|
+
### Events
|
|
47
|
+
|
|
48
|
+
| Name | Type | Description | Inherited From |
|
|
49
|
+
| ---------------- | ----------------------------- | --------------------------------------------------------------------- | -------------- |
|
|
50
|
+
| `btu-tabs-ready` | `CustomEvent` | Fired after first render and initialization | |
|
|
51
|
+
| `btu-tabs-show` | `CustomEvent<{name: string}>` | Fired when a tab becomes active | |
|
|
52
|
+
| `btu-tabs-hide` | `CustomEvent<{name: string}>` | Fired when a tab is deactivated | |
|
|
53
|
+
| `btu-tab-change` | `CustomEvent<{name: string}>` | Fired when a tab is selected (bubbles from btu-tab) | |
|
|
54
|
+
| `btu-tab-ready` | `CustomEvent` | Fired when a child tab finishes initialization (bubbles from btu-tab) | |
|
|
55
|
+
|
|
56
|
+
### Attributes
|
|
57
|
+
|
|
58
|
+
| Name | Field | Inherited From |
|
|
59
|
+
| ------------ | --------- | -------------- |
|
|
60
|
+
| `size` | size | |
|
|
61
|
+
| `active-tab` | activeTab | |
|
|
62
|
+
| `variant` | variant | |
|
|
63
|
+
|
|
64
|
+
### CSS Properties
|
|
65
|
+
|
|
66
|
+
| Name | Default | Description |
|
|
67
|
+
| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `--tabs-active-color` | | Text and icon color of the active tab (default: gray-700) |
|
|
69
|
+
| `--tabs-active-indicator-color` | | Color of the active tab underline indicator (default: primary-500 → primary-700 → primary-900 gradient) |
|
|
70
|
+
| `--tabs-border-color` | | Color of the bottom border divider (default: gray-200) |
|
|
71
|
+
| `--tabs-color` | | Text and icon color for all tabs (default: gray-500; active/hover tabs use gray-700) |
|
|
72
|
+
| `--tabs-background` | | Background color for all tab buttons (default: transparent) |
|
|
73
|
+
| `--tabs-container-background` | | Background color of the tabs container (default: theme white) |
|
|
74
|
+
| `--tabs-hover-background` | | Background color of a tab on hover (default: gray-100) |
|
|
75
|
+
| `--tabs-hover-color` | | Text and icon color of a tab on hover (default: gray-700) |
|
|
76
|
+
| `--tabs-gap` | | Spacing between tabs (default: 1rem) |
|
|
77
|
+
|
|
78
|
+
<hr/>
|
|
79
|
+
|
|
80
|
+
## Exports
|
|
81
|
+
|
|
82
|
+
| Kind | Name | Declaration | Module | Package |
|
|
83
|
+
| --------------------------- | ---------- | ----------- | --------------------------- | ------- |
|
|
84
|
+
| `js` | `default` | Tabs | src/components/tabs/Tabs.ts | |
|
|
85
|
+
| `custom-element-definition` | `btu-tabs` | Tabs | src/components/tabs/Tabs.ts | |
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# `src/components/upload/Upload.ts`:
|
|
2
|
+
|
|
3
|
+
## class: `Upload`, `btu-upload`
|
|
4
|
+
|
|
5
|
+
### Superclass
|
|
6
|
+
|
|
7
|
+
| Name | Module | Package |
|
|
8
|
+
| ------------ | ------ | ------- |
|
|
9
|
+
| `LitElement` | | lit |
|
|
10
|
+
|
|
11
|
+
### Mixins
|
|
12
|
+
|
|
13
|
+
| Name | Module | Package |
|
|
14
|
+
| ------------------- | ------------------------------ | ------- |
|
|
15
|
+
| `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
|
|
16
|
+
| `ReadyMixin` | /src/util/ReadyMixin.js | |
|
|
17
|
+
|
|
18
|
+
### Fields
|
|
19
|
+
|
|
20
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
21
|
+
| --------------------- | ------- | -------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
22
|
+
| `accept` | | `string` | `''` | Accepted file types, matching the HTML \`\<input accept>\` attribute format.
Client-side filter only — the browser's file picker uses this as a hint,
and drag-drop is enforced by this component. Server-side validation is
still required.

Supported forms (comma-separated, any combination):
- \`image/\*\` — MIME wildcard (any image)
- \`application/pdf\` — exact MIME type
- \`.pdf\`, \`.docx\` — file extension (case-insensitive)

Examples:
- \`accept="image/\*"\` — any image
- \`accept="image/\*,application/pdf"\` — images and PDFs
- \`accept=".jpg,.jpeg,.png,.heic"\` — specific extensions
- \`accept=""\` (or omitted) — allow all

Note: users can bypass the file picker's filter (most browsers offer an
"All Files" option), so this attribute is a UX filter, not a security
boundary. | |
|
|
23
|
+
| `maxFileSize` | | `number` | `0` | Maximum file size in bytes. Files exceeding this are rejected. 0 means unlimited. | |
|
|
24
|
+
| `maxFiles` | | `number` | `Infinity` | Maximum number of files allowed. When omitted, uploads are unlimited.
\`max-files="1"\` enters single-file mode (selecting a new file replaces the existing one).
\`max-files="0"\` allows zero files. Values above 1 cap the queue at that many files. | |
|
|
25
|
+
| `disabled` | | `boolean` | `false` | Disables all interaction — file selection, drag-and-drop, and action buttons. | |
|
|
26
|
+
| `noDrag` | | `boolean` | `false` | Disables drag-and-drop. File selection via click still works. | |
|
|
27
|
+
| `_files` | private | `Map<string, FileState>` | `new Map()` | | |
|
|
28
|
+
| `_items` | private | `Map<string, UploadItem>` | `new Map()` | | |
|
|
29
|
+
| `_milestones` | private | `Map<string, Set<number>>` | `new Map()` | | |
|
|
30
|
+
| `_dragOver` | private | `boolean` | `false` | | |
|
|
31
|
+
| `_dragCounter` | private | `number` | `0` | | |
|
|
32
|
+
| `_inputEl` | private | `HTMLInputElement \| null` | | | |
|
|
33
|
+
| `_dropzoneFull` | private | `boolean` | | | |
|
|
34
|
+
| `_interactionBlocked` | private | `boolean` | | | |
|
|
35
|
+
| `_showCountPill` | private | `boolean` | | | |
|
|
36
|
+
|
|
37
|
+
### Methods
|
|
38
|
+
|
|
39
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
40
|
+
| ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------- | ----------------- |
|
|
41
|
+
| `_handleInputChange` | private | | `e: Event` | `void` | |
|
|
42
|
+
| `_handleSelectClick` | private | | `e: Event` | `void` | |
|
|
43
|
+
| `_handleDropzoneClick` | private | | | `void` | |
|
|
44
|
+
| `_handleDragEnter` | private | | `e: DragEvent` | `void` | |
|
|
45
|
+
| `_handleDragOver` | private | | `e: DragEvent` | `void` | |
|
|
46
|
+
| `_handleDragLeave` | private | | `e: DragEvent` | `void` | |
|
|
47
|
+
| `_handleDrop` | private | | `e: DragEvent` | `void` | |
|
|
48
|
+
| `_processFiles` | private | | `files: File[]` | `void` | |
|
|
49
|
+
| `_rejectCount` | private | | `file: File` | `void` | |
|
|
50
|
+
| `_validateFile` | private | | `file: File` | `boolean` | |
|
|
51
|
+
| `_addFile` | private | | `file: File` | `void` | |
|
|
52
|
+
| `_reportUnknownId` | private | | `method: ApiMethod, id: string` | `void` | |
|
|
53
|
+
| `_getOrReport` | private | | `method: ApiMethod, id: string` | `FileState \| null` | |
|
|
54
|
+
| `_renderItem` | private | | `fileState: FileState` | `void` | |
|
|
55
|
+
| `setFileProgress` | | Update the progress of a file upload.
Clamps value to 0-100 and coerces non-finite inputs to 0. Announces milestones
(25%, 50%, 75%) to screen readers; 100% completion is announced by setFileStatus('complete').

Status transitions:
- \`pending\` → \`uploading\` (auto — first progress report starts the upload)
- \`uploading\` → \`uploading\` (progress updates)
- \`error\` → \`error\` (progress updates only; status is preserved so a stale late
 callback can't wipe the error UI. To recover from error, call
 \`setFileStatus(id, 'uploading')\` first, then report progress.)
- \`complete\` → ignored (terminal state) | `id: string, percent: number` | `void` | |
|
|
56
|
+
| `setFileStatus` | | Set the status of a file.
Valid statuses: 'uploading', 'complete', 'error'. For 'error' status, an
optional message can be provided.

Transitions from 'complete' are rejected (terminal state) — a late-resolving
XHR cannot overwrite a prior success. Rejected calls emit \`btu-upload-api-error\`
with reason: 'invalid-transition'. | `id: string, status: FileStatusSettable, message: string` | `void` | |
|
|
57
|
+
| `setFileSymbol` | | Override the icon symbol for a file. | `id: string, symbol: string` | `void` | |
|
|
58
|
+
| `removeFile` | | Remove a file programmatically. Fires \`btu-upload-file-removed\`. | `id: string` | `void` | |
|
|
59
|
+
| `getFiles` | | Get a snapshot of all current files and their states.
States are readonly; mutations on the returned array's elements are ineffective. | | `readonly FileState[]` | |
|
|
60
|
+
| `_renderSelectButton` | private | | `text: string` | | |
|
|
61
|
+
| `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.

All events are configured with:
- bubbles: true (event propagates up the DOM tree)
- cancelable: false (event cannot be cancelled)
- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
|
|
62
|
+
|
|
63
|
+
### Events
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Inherited From |
|
|
66
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------- |
|
|
67
|
+
| `btu-upload-ready` | `CustomEvent<unknown>` | Fired when the component has completed first render | |
|
|
68
|
+
| `btu-upload-file-added` | `CustomEvent<{id: string, file: File}>` | Fired when a file passes validation and is added | |
|
|
69
|
+
| `btu-upload-file-removed` | `CustomEvent<{id: string, file: File}>` | Fired when a file is removed (user action, programmatic, or on disconnect for in-flight uploads) | |
|
|
70
|
+
| `btu-upload-file-retry` | `CustomEvent<{id: string, file: File}>` | Fired when user clicks "Try again" on a failed upload | |
|
|
71
|
+
| `btu-upload-file-rejected` | `CustomEvent<{file: File, reason: 'type' \| 'size' \| 'count'}>` | Fired when a file fails client-side validation or the queue is full | |
|
|
72
|
+
| `btu-upload-file-completed` | `CustomEvent<{id: string, file: File}>` | Fired when a file's status transitions into 'complete' | |
|
|
73
|
+
| `btu-upload-api-error` | `CustomEvent<{method: string, id: string, reason: 'unknown-id' \| 'invalid-transition', message: string}>` | Fired when an imperative API call references an unknown id or an illegal status transition | |
|
|
74
|
+
|
|
75
|
+
### Attributes
|
|
76
|
+
|
|
77
|
+
| Name | Field | Inherited From |
|
|
78
|
+
| --------------- | ----------- | -------------- |
|
|
79
|
+
| `accept` | accept | |
|
|
80
|
+
| `max-file-size` | maxFileSize | |
|
|
81
|
+
| `max-files` | maxFiles | |
|
|
82
|
+
| `disabled` | disabled | |
|
|
83
|
+
| `no-drag` | noDrag | |
|
|
84
|
+
|
|
85
|
+
### CSS Properties
|
|
86
|
+
|
|
87
|
+
| Name | Default | Description |
|
|
88
|
+
| -------------------------------------- | ------- | --------------------------------------------------------------------------------------------- |
|
|
89
|
+
| `--upload-dropzone-bg` | | Drop zone background color (default: gray-25) |
|
|
90
|
+
| `--upload-dropzone-border-color` | | Drop zone border color (default: gray-300; gray-200 when disabled, gray-400 in high-contrast) |
|
|
91
|
+
| `--upload-dropzone-border-radius` | | Drop zone border radius (default: borderRadius.lg) |
|
|
92
|
+
| `--upload-dropzone-hover-bg` | | Drop zone hover background (hover default: gray-50; drag-over default: primary-25) |
|
|
93
|
+
| `--upload-dropzone-hover-border-color` | | Drop zone hover/focus border color (default: primary-300; drag-over uses primary-400) |
|
|
94
|
+
| `--upload-dropzone-focus-ring-color` | | Drop zone focus ring color (default: primary-100) |
|
|
95
|
+
| `--upload-item-bg` | | Item background color (default: white) |
|
|
96
|
+
| `--upload-item-border-color` | | Item border color (default: gray-200) |
|
|
97
|
+
| `--upload-item-active-border-color` | | Item active/in-progress border (default: gray-300) |
|
|
98
|
+
| `--upload-item-complete-border-color` | | Item completed border color (default: primary-500) |
|
|
99
|
+
| `--upload-item-error-bg` | | Item error background (default: error-25) |
|
|
100
|
+
| `--upload-item-error-border-color` | | Item error border color (default: error-300) |
|
|
101
|
+
|
|
102
|
+
<hr/>
|
|
103
|
+
|
|
104
|
+
## Exports
|
|
105
|
+
|
|
106
|
+
| Kind | Name | Declaration | Module | Package |
|
|
107
|
+
| --------------------------- | -------------------- | ------------------ | ------------------------------- | ------- |
|
|
108
|
+
| `js` | `FileState` | FileState | src/components/upload/Upload.ts | |
|
|
109
|
+
| `js` | `FileStatus` | FileStatus | src/components/upload/Upload.ts | |
|
|
110
|
+
| `js` | `FileStatusSettable` | FileStatusSettable | src/components/upload/Upload.ts | |
|
|
111
|
+
| `js` | `default` | Upload | src/components/upload/Upload.ts | |
|
|
112
|
+
| `custom-element-definition` | `btu-upload` | Upload | src/components/upload/Upload.ts | |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# `src/components/upload/UploadItem.ts`:
|
|
2
|
+
|
|
3
|
+
## class: `UploadItem`, `btu-upload-item`
|
|
4
|
+
|
|
5
|
+
### Superclass
|
|
6
|
+
|
|
7
|
+
| Name | Module | Package |
|
|
8
|
+
| ------------ | ------ | ------- |
|
|
9
|
+
| `LitElement` | | lit |
|
|
10
|
+
|
|
11
|
+
### Mixins
|
|
12
|
+
|
|
13
|
+
| Name | Module | Package |
|
|
14
|
+
| ------------------- | ------------------------------ | ------- |
|
|
15
|
+
| `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
|
|
16
|
+
| `ReadyMixin` | /src/util/ReadyMixin.js | |
|
|
17
|
+
|
|
18
|
+
### Fields
|
|
19
|
+
|
|
20
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
21
|
+
| ----------------------- | ------- | -------------------- | ------- | ----------- | -------------- |
|
|
22
|
+
| `_state` | private | `FileState \| null` | `null` | | |
|
|
23
|
+
| `_baseClasses` | private | `string` | `''` | | |
|
|
24
|
+
| `_previousStatus` | private | `FileStatus \| null` | `null` | | |
|
|
25
|
+
| `_stopProgressComplete` | private | | | | |
|
|
26
|
+
|
|
27
|
+
### Methods
|
|
28
|
+
|
|
29
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
30
|
+
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------- | ----------------- |
|
|
31
|
+
| `_scheduleCelebrate` | private | | | `void` | |
|
|
32
|
+
| `_handleRemove` | private | | | `void` | |
|
|
33
|
+
| `_handleRetry` | private | | | `void` | |
|
|
34
|
+
| `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.

All events are configured with:
- bubbles: true (event propagates up the DOM tree)
- cancelable: false (event cannot be cancelled)
- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
|
|
35
|
+
|
|
36
|
+
### Events
|
|
37
|
+
|
|
38
|
+
| Name | Type | Description | Inherited From |
|
|
39
|
+
| ------------------------ | --------------------------- | ----------------------------------- | -------------- |
|
|
40
|
+
| `btu-upload-item-remove` | `CustomEvent<{id: string}>` | Fired when remove button is clicked | |
|
|
41
|
+
| `btu-upload-item-retry` | `CustomEvent<{id: string}>` | Fired when retry link is clicked | |
|
|
42
|
+
|
|
43
|
+
### CSS Properties
|
|
44
|
+
|
|
45
|
+
| Name | Default | Description |
|
|
46
|
+
| ------------------------------------- | ------- | -------------------------------------------------- |
|
|
47
|
+
| `--upload-item-bg` | | Item background color (default: white) |
|
|
48
|
+
| `--upload-item-border-color` | | Item border color (default: gray-200) |
|
|
49
|
+
| `--upload-item-active-border-color` | | Item active/in-progress border (default: gray-300) |
|
|
50
|
+
| `--upload-item-complete-border-color` | | Item completed border color (default: primary-500) |
|
|
51
|
+
| `--upload-item-error-bg` | | Item error background (default: error-25) |
|
|
52
|
+
| `--upload-item-error-border-color` | | Item error border color (default: error-300) |
|
|
53
|
+
|
|
54
|
+
<hr/>
|
|
55
|
+
|
|
56
|
+
## Exports
|
|
57
|
+
|
|
58
|
+
| Kind | Name | Declaration | Module | Package |
|
|
59
|
+
| --------------------------- | ----------------- | ----------- | ----------------------------------- | ------- |
|
|
60
|
+
| `js` | `default` | UploadItem | src/components/upload/UploadItem.ts | |
|
|
61
|
+
| `custom-element-definition` | `btu-upload-item` | UploadItem | src/components/upload/UploadItem.ts | |
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
| `_fullscreenTooltip` | private | | `new TooltipController(this, { target: 'button[data-tooltip="fullscreen"]', text: () => (this._isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'), position: 'bottom', noArrow: true, offset: 'sm', })` | | |
|
|
36
36
|
| `isFullscreen` | | `boolean` | | Whether the widget is currently in fullscreen mode (read-only).
Use \`btu-widget-fullscreen-changed\` event to react to changes. | |
|
|
37
37
|
|
|
38
|
+
### Methods
|
|
39
|
+
|
|
40
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
41
|
+
| ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------- | ----------------- |
|
|
42
|
+
| `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.

All events are configured with:
- bubbles: true (event propagates up the DOM tree)
- cancelable: false (event cannot be cancelled)
- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
|
|
43
|
+
|
|
38
44
|
### Events
|
|
39
45
|
|
|
40
46
|
| Name | Type | Description | Inherited From |
|
|
@@ -51,15 +57,15 @@
|
|
|
51
57
|
| `collapsible` | collapsible | |
|
|
52
58
|
| `collapsed` | collapsed | |
|
|
53
59
|
| `fullscreenable` | fullscreenable | |
|
|
54
|
-
| `id` | | |
|
|
55
60
|
|
|
56
61
|
### CSS Properties
|
|
57
62
|
|
|
58
|
-
| Name
|
|
59
|
-
|
|
|
60
|
-
| `--widget-background`
|
|
61
|
-
| `--widget-border`
|
|
62
|
-
| `--
|
|
63
|
+
| Name | Default | Description |
|
|
64
|
+
| ----------------------- | ------- | ------------------------------------------------------------- |
|
|
65
|
+
| `--widget-background` | | Body and footer background color (default: --btu-theme-white) |
|
|
66
|
+
| `--widget-border` | | Widget border and dividers (default: 1px solid gray-200) |
|
|
67
|
+
| `--widget-border-color` | | Color of header bottom divider (default: gray-200) |
|
|
68
|
+
| `--header-background` | | Header background color (default: transparent) |
|
|
63
69
|
|
|
64
70
|
### Slots
|
|
65
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspot/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "A UI library for building Brightspot CMS components.",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"storybook": "yarn cem && storybook dev -p 6006",
|
|
26
26
|
"build-storybook": "yarn cem && storybook build -o ./dist/storybook",
|
|
27
27
|
"test:storybook": "vitest --project=storybook",
|
|
28
|
+
"check:conventions": "yarn cem && node scripts/check-conventions-all.mjs",
|
|
29
|
+
"check:conventions:fast": "node scripts/check-conventions.mjs",
|
|
28
30
|
"prepare": "husky"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
"postcss-loader": "^8.0.0",
|
|
60
62
|
"prettier": "^3.2.5",
|
|
61
63
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
62
|
-
"prettier-plugin-tailwindcss": "
|
|
64
|
+
"prettier-plugin-tailwindcss": "0.7.2",
|
|
63
65
|
"shx": "^0.4.0",
|
|
64
66
|
"storybook": "10.2.12",
|
|
65
67
|
"style-loader": "^3.3.1",
|