@brightspot/ui 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/action-bar/ActionBar.d.ts +163 -0
- package/dist/components/action-bar/ActionBar.d.ts.map +1 -0
- package/dist/components/action-bar/ActionBar.js +479 -0
- package/dist/components/action-bar/ActionBar.js.map +1 -0
- package/dist/components/action-bar/ActionItem.d.ts +103 -0
- package/dist/components/action-bar/ActionItem.d.ts.map +1 -0
- package/dist/components/action-bar/ActionItem.js +237 -0
- package/dist/components/action-bar/ActionItem.js.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +3 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.js +22 -6
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/dropdown/DropdownItem.d.ts +14 -1
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownItem.js +20 -1
- package/dist/components/dropdown/DropdownItem.js.map +1 -1
- package/dist/components/dropdown/DropdownMenu.d.ts +3 -5
- package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownMenu.js +17 -32
- package/dist/components/dropdown/DropdownMenu.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +33 -4
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +80 -16
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/tabs/Tab.d.ts +108 -0
- package/dist/components/tabs/Tab.d.ts.map +1 -0
- package/dist/components/tabs/Tab.js +152 -0
- package/dist/components/tabs/Tab.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +126 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +390 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/custom-elements.json +2635 -1591
- package/dist/storybook/assets/ActionBar.stories--nAeDC-G.js +408 -0
- package/dist/storybook/assets/ActionItem.stories-BHrGjk-P.js +203 -0
- package/dist/storybook/assets/{Avatar.stories-B26mRkkZ.js → Avatar.stories-Da-mRj6_.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-J7lVGsMY.js → AvatarGroup.stories-BQlaC_yl.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BpTIV61M.js → Badge.stories-DnVnOrnF.js} +1 -1
- package/dist/storybook/assets/{Button-Dg-fIrzT.js → Button-CFLAI1H9.js} +1 -1
- package/dist/storybook/assets/{Button.stories-gPKRVbxk.js → Button.stories-DxaBOjwv.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-DbY-sKEe.js → Celebrate.stories-CuMm15Nr.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-DeH5JYX_.js → CircularProgress.stories-DRN8Mtvj.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-C-lZ4uuw.js → ClipboardMixin.stories-DR7Ou2Av.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-Cu6zVIuG.js → Color-6BZIO3FS-Die62Y0Z.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-D6XYMrTD.js → Colors.stories-bIq_ssbI.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-jFekKTYg.js → CombinedEffects.stories-CtKzOUZn.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-g50hRCPT.js → ComponentStatesMixin-DMLCk9fE.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-D3Q5pR38.js → ComponentStatesMixin.stories-D8UI9o-d.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-COZZ1VC2.js → CopyToClipboard.stories-ti6CpJNp.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-Dl10LAnx.js → Debounce.stories-DzZUSvbk.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-CFLtMbUx.js → DocsRenderer-LL677BLK-CIRGv5IX.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-Drwq-0Z2.js → Dropdown.stories-Lt4cY0Re.js} +41 -14
- package/dist/storybook/assets/{Events.stories-dODeR-g-.js → Events.stories-B1ddcgpT.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CH7_-_q3.js → Heading.stories-DI4w61cf.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-CH1Y739k.js → HueRipple.stories-DjhoxxEw.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CPjM-jTU.js → Icon.stories-CpziAhae.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DuzqvcnN.js → IconButton.stories-KjN28hfc.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-C7IdnJd3.js → LinearProgress.stories-DcIpdz6R.js} +1 -1
- package/dist/storybook/assets/Pagination.stories-BBkLEwoP.js +252 -0
- package/dist/storybook/assets/{Popover.stories-Ca1F-wrI.js → Popover.stories-DLv48c2h.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-DNZ5dCsZ.js → ReadyMixin-Cw2Dfbu2.js} +1 -1
- package/dist/storybook/assets/RovingTabindexMixin.stories-BWaFx9mu.js +192 -0
- package/dist/storybook/assets/{Rtc.stories-BVJc1vCA.js → Rtc.stories-Ve7Bwo_l.js} +1 -1
- package/dist/storybook/assets/ScrollShadow.stories-C6XmrRLm.js +17 -0
- package/dist/storybook/assets/{Switch.stories-BEEHP8mD.js → Switch.stories-Cf8WM1LG.js} +1 -1
- package/dist/storybook/assets/Tab.stories-CEtdEtOx.js +218 -0
- package/dist/storybook/assets/Tabs.stories-CIAO1bPO.js +211 -0
- package/dist/storybook/assets/{Throttle.stories-C4xsYeAb.js → Throttle.stories-BqxVIb-r.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-Ccm4AnSv.js → Tooltip.stories-B6fw6875.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-Degjk-M0.js → Welcome.stories-CfJtSM19.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-OKnZ9sDs.js → Widget.stories-CiOho7lO.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-CXL3TyJ2.js → WithTooltip-65CFNBJE-PGcopp73.js} +2 -2
- package/dist/storybook/assets/{blocks-DLdUKG_W.js → blocks-dP2DwISI.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-29NCxjfM.js → formatter-EIJCOSYU-CZSAC3tg.js} +1 -1
- package/dist/storybook/assets/if-defined-B1RdczOE.js +1 -0
- package/dist/storybook/assets/{iframe-BqvwP3or.js → iframe-DloIUNZz.js} +161 -161
- package/dist/storybook/assets/iframe-bJgLXZKK.css +1 -0
- package/dist/storybook/assets/{index-BIyTv1BF.js → index-DKF0ypu5.js} +1 -1
- package/dist/storybook/assets/onFind-C0l4Gew0.js +1 -0
- package/dist/storybook/assets/{onFind.stories-D64-QZqf.js → onFind.stories-DOTt9puO.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-BICsnIJL.js → onRemove.stories-CQ9ZC5dm.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DpDZP9_5.js → onVisible.stories-Cbj5_Vz0.js} +1 -1
- package/dist/storybook/assets/style-map-DLXysq3r.js +1 -0
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-Bz_DuQj8.js → syntaxhighlighter-ED5Y7EFY-Bjjbl9ca.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-action-bar.d.ts +2 -0
- package/dist/tailwind-plugin-action-bar.d.ts.map +1 -0
- package/dist/tailwind-plugin-action-bar.js +120 -0
- package/dist/tailwind-plugin-action-bar.js.map +1 -0
- package/dist/tailwind-plugin-action-bar.ts +134 -0
- package/dist/tailwind-plugin-badge.js +4 -5
- package/dist/tailwind-plugin-badge.js.map +1 -1
- package/dist/tailwind-plugin-badge.ts +4 -5
- package/dist/tailwind-plugin-button.js +1 -0
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +1 -0
- package/dist/tailwind-plugin-pagination.js +13 -23
- package/dist/tailwind-plugin-pagination.js.map +1 -1
- package/dist/tailwind-plugin-pagination.ts +15 -25
- package/dist/tailwind-plugin-tabs.d.ts +2 -0
- package/dist/tailwind-plugin-tabs.d.ts.map +1 -0
- package/dist/tailwind-plugin-tabs.js +151 -0
- package/dist/tailwind-plugin-tabs.js.map +1 -0
- package/dist/tailwind-plugin-tabs.ts +162 -0
- package/dist/util/EventEmitterMixin.d.ts +16 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/RovingTabindexMixin.d.ts +38 -0
- package/dist/util/RovingTabindexMixin.d.ts.map +1 -0
- package/dist/util/RovingTabindexMixin.js +83 -0
- package/dist/util/RovingTabindexMixin.js.map +1 -0
- package/docs/components/ActionBar.md +71 -0
- package/docs/components/ActionItem.md +76 -0
- package/docs/components/Dropdown.md +7 -7
- package/docs/components/DropdownItem.md +9 -5
- package/docs/components/DropdownMenu.md +12 -12
- package/docs/components/Pagination.md +37 -34
- package/docs/components/README.md +4 -0
- package/docs/components/Tab.md +73 -0
- package/docs/components/Tabs.md +77 -0
- package/package.json +1 -1
- package/dist/storybook/assets/Pagination.stories-C4cLjS_9.js +0 -272
- package/dist/storybook/assets/ScrollShadow.stories-C3W5o9ZW.js +0 -17
- package/dist/storybook/assets/if-defined-BZFPaJjl.js +0 -1
- package/dist/storybook/assets/iframe-C5bIZMJ5.css +0 -1
- package/dist/storybook/assets/onFind-1l3EPW-I.js +0 -1
- package/dist/storybook/assets/style-map-CBrSnxRe.js +0 -1
|
@@ -17,35 +17,37 @@
|
|
|
17
17
|
|
|
18
18
|
### Fields
|
|
19
19
|
|
|
20
|
-
| Name | Privacy | Type | Default | Description
|
|
21
|
-
| ------------------------ | ------- | --------------------- | -------------- |
|
|
22
|
-
| `page` | | `number` | `1` | Current page number (1-based)
|
|
23
|
-
| `pageSize` | | `number` | `0` | Number of items per page
|
|
24
|
-
| `disabled` | | `boolean` | `false` | Disables all pagination controls
|
|
25
|
-
| `loading` | | `boolean` | `false` | Shows loading spinner and dims controls
|
|
26
|
-
| `hideOnSinglePage` | | `boolean` | `true` | Hide controls when there is only one page
|
|
27
|
-
| `pageSizeChanger` | | `boolean` | `true` | Show the page size dropdown
|
|
28
|
-
| `pageSizeOptions` | | `string` | `'10, 20, 50'` | Comma-separated page size options
|
|
29
|
-
| `totalItems` | | `number` | `0` | Total number of items across all pages
|
|
30
|
-
| `boundaryButtons` | | `boolean` | `true` | Show first and last page buttons
|
|
31
|
-
| `hideTotalCount` | | `boolean` | `false` | Hide the item count display (e.g., "1-10 of 200")
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
20
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
21
|
+
| ------------------------ | ------- | --------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
22
|
+
| `page` | | `number` | `1` | Current page number (1-based) | |
|
|
23
|
+
| `pageSize` | | `number` | `0` | Number of items per page | |
|
|
24
|
+
| `disabled` | | `boolean` | `false` | Disables all pagination controls | |
|
|
25
|
+
| `loading` | | `boolean` | `false` | Shows loading spinner and dims controls | |
|
|
26
|
+
| `hideOnSinglePage` | | `boolean` | `true` | Hide controls when there is only one page | |
|
|
27
|
+
| `pageSizeChanger` | | `boolean` | `true` | Show the page size dropdown | |
|
|
28
|
+
| `pageSizeOptions` | | `string` | `'10, 20, 50'` | Comma-separated page size options | |
|
|
29
|
+
| `totalItems` | | `number` | `0` | Total number of items across all pages | |
|
|
30
|
+
| `boundaryButtons` | | `boolean` | `true` | Show first and last page buttons | |
|
|
31
|
+
| `hideTotalCount` | | `boolean` | `false` | Hide the item count display (e.g., "1-10 of 200") | |
|
|
32
|
+
| `pageJumper` | | `boolean` | `false` | Show the page jumper dropdown. Intended for moderate page counts (under \~100 pages).
For large datasets, use a custom \`slot="jumper"\` with a virtualized or input-based control. | |
|
|
33
|
+
| `label` | | `string \| undefined` | | Accessible label for the pagination nav landmark | |
|
|
34
|
+
| `_parsedPageSizeOptions` | private | `number[]` | | | |
|
|
35
|
+
| `_totalPages` | private | `number` | | | |
|
|
36
|
+
| `_startItem` | private | `number` | | | |
|
|
37
|
+
| `_endItem` | private | `number` | | | |
|
|
37
38
|
|
|
38
39
|
### Methods
|
|
39
40
|
|
|
40
|
-
| Name
|
|
41
|
-
|
|
|
42
|
-
| `_setupSlots`
|
|
43
|
-
| `_goToFirstPage`
|
|
44
|
-
| `_goToPreviousPage`
|
|
45
|
-
| `_goToNextPage`
|
|
46
|
-
| `_goToLastPage`
|
|
47
|
-
| `_manageBoundaryFocus`
|
|
48
|
-
| `
|
|
41
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
42
|
+
| -------------------------- | ------- | ----------- | --------------------------- | ------ | -------------- |
|
|
43
|
+
| `_setupSlots` | private | | | `void` | |
|
|
44
|
+
| `_goToFirstPage` | private | | `e: Event` | `void` | |
|
|
45
|
+
| `_goToPreviousPage` | private | | `e: Event` | `void` | |
|
|
46
|
+
| `_goToNextPage` | private | | `e: Event` | `void` | |
|
|
47
|
+
| `_goToLastPage` | private | | `e: Event` | `void` | |
|
|
48
|
+
| `_manageBoundaryFocus` | private | | `clickedButton: IconButton` | `void` | |
|
|
49
|
+
| `_onBuiltinPageSizeSelect` | private | | `e: Event` | `void` | |
|
|
50
|
+
| `_onBuiltinJumperSelect` | private | | `e: Event` | `void` | |
|
|
49
51
|
|
|
50
52
|
### Events
|
|
51
53
|
|
|
@@ -69,21 +71,22 @@
|
|
|
69
71
|
| `total-items` | totalItems | |
|
|
70
72
|
| `boundary-buttons` | boundaryButtons | |
|
|
71
73
|
| `hide-total-count` | hideTotalCount | |
|
|
74
|
+
| `page-jumper` | pageJumper | |
|
|
72
75
|
| `label` | label | |
|
|
73
76
|
|
|
74
77
|
### CSS Properties
|
|
75
78
|
|
|
76
|
-
| Name | Default | Description
|
|
77
|
-
| ------------------------------- | ------- |
|
|
78
|
-
| `--pagination-color-background` | | Background color for
|
|
79
|
-
| `--pagination-color-foreground` | | Text/icon color
|
|
79
|
+
| Name | Default | Description |
|
|
80
|
+
| ------------------------------- | ------- | --------------------------------------------------- |
|
|
81
|
+
| `--pagination-color-background` | | Background color for dropdowns, buttons, and jumper |
|
|
82
|
+
| `--pagination-color-foreground` | | Text/icon color |
|
|
80
83
|
|
|
81
84
|
### Slots
|
|
82
85
|
|
|
83
|
-
| Name | Description
|
|
84
|
-
| ----------- |
|
|
85
|
-
| `page-size` | Custom page-size selector (replaces built-in
|
|
86
|
-
| `jumper` | Custom jumper content (
|
|
86
|
+
| Name | Description |
|
|
87
|
+
| ----------- | ---------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `page-size` | Custom page-size selector (replaces built-in dropdown). Consumer manages all behavior. |
|
|
89
|
+
| `jumper` | Custom jumper content (replaces built-in page jumper dropdown). Consumer manages all behavior. |
|
|
87
90
|
|
|
88
91
|
<hr/>
|
|
89
92
|
|
|
@@ -4,6 +4,8 @@ This directory contains auto-generated API documentation for all Brightspot UI w
|
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
7
|
+
- [`<btu-action-bar>` - ActionBar](ActionBar.md)
|
|
8
|
+
- [`<btu-action-item>` - ActionItem](ActionItem.md)
|
|
7
9
|
- [`<btu-avatar>` - Avatar](Avatar.md)
|
|
8
10
|
- [`<btu-avatar-group>` - AvatarGroup](AvatarGroup.md)
|
|
9
11
|
- [`<btu-badge>` - Badge](Badge.md)
|
|
@@ -18,6 +20,8 @@ This directory contains auto-generated API documentation for all Brightspot UI w
|
|
|
18
20
|
- [`<btu-pagination>` - Pagination](Pagination.md)
|
|
19
21
|
- [`<btu-popover>` - Popover](Popover.md)
|
|
20
22
|
- [`<btu-switch>` - Switch](Switch.md)
|
|
23
|
+
- [`<btu-tab>` - Tab](Tab.md)
|
|
24
|
+
- [`<btu-tabs>` - Tabs](Tabs.md)
|
|
21
25
|
- [`<btu-widget>` - Widget](Widget.md)
|
|
22
26
|
|
|
23
27
|
---
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# `src/components/tabs/Tab.ts`:
|
|
2
|
+
|
|
3
|
+
## class: `Tab`, `btu-tab`
|
|
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
|
+
### Static Fields
|
|
19
|
+
|
|
20
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
21
|
+
| --------- | ------- | ---- | ------- | ----------- | -------------- |
|
|
22
|
+
| `tagName` | | | | | |
|
|
23
|
+
|
|
24
|
+
### Fields
|
|
25
|
+
|
|
26
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
27
|
+
| -------------- | ------- | ------------------------- | ----------- | ----------------------------------------------------------------------------------------------------- | -------------- |
|
|
28
|
+
| `name` | | `string \| undefined` | | Value that identifies this tab and links it to panel elements that share the same \`name\` attribute. | |
|
|
29
|
+
| `label` | | `string \| undefined` | | Text displayed in the tab. | |
|
|
30
|
+
| `description` | | `string \| undefined` | | Accessibility description for screen readers. | |
|
|
31
|
+
| `disabled` | | `boolean` | `false` | Whether the tab is disabled and non-interactive. | |
|
|
32
|
+
| `iconName` | | `string \| undefined` | | Lucide icon name to display. | |
|
|
33
|
+
| `iconPosition` | | `'leading' \| 'trailing'` | `'leading'` | Placement of the icon relative to the label. | |
|
|
34
|
+
| `iconOnly` | | `boolean` | `false` | When true, hides the label visually while maintaining accessibility. | |
|
|
35
|
+
| `error` | | `boolean` | `false` | When true, displays an error badge on the tab. | |
|
|
36
|
+
| `badge` | | `string \| undefined` | | Displays a badge with the given value alongside the label. | |
|
|
37
|
+
|
|
38
|
+
### Events
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description | Inherited From |
|
|
41
|
+
| ---------------- | ----------------------------- | ---------------------------------------------------- | -------------- |
|
|
42
|
+
| `btu-tab-ready` | `CustomEvent` | Fired after first render | |
|
|
43
|
+
| `btu-tab-change` | `CustomEvent<{name: string}>` | Fired when a non-disabled tab with a name is clicked | |
|
|
44
|
+
|
|
45
|
+
### Attributes
|
|
46
|
+
|
|
47
|
+
| Name | Field | Inherited From |
|
|
48
|
+
| --------------- | ------------ | -------------- |
|
|
49
|
+
| `name` | name | |
|
|
50
|
+
| `label` | label | |
|
|
51
|
+
| `description` | description | |
|
|
52
|
+
| `disabled` | disabled | |
|
|
53
|
+
| `icon-name` | iconName | |
|
|
54
|
+
| `icon-position` | iconPosition | |
|
|
55
|
+
| `icon-only` | iconOnly | |
|
|
56
|
+
| `error` | error | |
|
|
57
|
+
| `badge` | badge | |
|
|
58
|
+
|
|
59
|
+
### CSS Properties
|
|
60
|
+
|
|
61
|
+
| Name | Default | Description |
|
|
62
|
+
| -------------------------- | ------- | ---------------------------------------------------------------- |
|
|
63
|
+
| `--badge-color-background` | | Background color of the count indicator badge (default: gray-50) |
|
|
64
|
+
| `--badge-color-foreground` | | Text color of the count indicator badge (default: gray-700) |
|
|
65
|
+
|
|
66
|
+
<hr/>
|
|
67
|
+
|
|
68
|
+
## Exports
|
|
69
|
+
|
|
70
|
+
| Kind | Name | Declaration | Module | Package |
|
|
71
|
+
| --------------------------- | --------- | ----------- | -------------------------- | ------- |
|
|
72
|
+
| `js` | `default` | Tab | src/components/tabs/Tab.ts | |
|
|
73
|
+
| `custom-element-definition` | `btu-tab` | Tab | src/components/tabs/Tab.ts | |
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
|
|
38
|
+
### Events
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description | Inherited From |
|
|
41
|
+
| ---------------- | ----------------------------- | --------------------------------------------------------------------- | -------------- |
|
|
42
|
+
| `btu-tabs-ready` | `CustomEvent` | Fired after first render and initialization | |
|
|
43
|
+
| `btu-tabs-show` | `CustomEvent<{name: string}>` | Fired when a tab becomes active | |
|
|
44
|
+
| `btu-tabs-hide` | `CustomEvent<{name: string}>` | Fired when a tab is deactivated | |
|
|
45
|
+
| `btu-tab-change` | `CustomEvent<{name: string}>` | Fired when a tab is selected (bubbles from btu-tab) | |
|
|
46
|
+
| `btu-tab-ready` | `CustomEvent` | Fired when a child tab finishes initialization (bubbles from btu-tab) | |
|
|
47
|
+
|
|
48
|
+
### Attributes
|
|
49
|
+
|
|
50
|
+
| Name | Field | Inherited From |
|
|
51
|
+
| ------------ | --------- | -------------- |
|
|
52
|
+
| `size` | size | |
|
|
53
|
+
| `active-tab` | activeTab | |
|
|
54
|
+
| `variant` | variant | |
|
|
55
|
+
|
|
56
|
+
### CSS Properties
|
|
57
|
+
|
|
58
|
+
| Name | Default | Description |
|
|
59
|
+
| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `--tabs-active-color` | | Text and icon color of the active tab (default: gray-700) |
|
|
61
|
+
| `--tabs-active-indicator-color` | | Color of the active tab underline indicator (default: primary-500 → primary-700 → primary-900 gradient) |
|
|
62
|
+
| `--tabs-border-color` | | Color of the bottom border divider (default: gray-200) |
|
|
63
|
+
| `--tabs-color` | | Text and icon color for all tabs (default: gray-500; active/hover tabs use gray-700) |
|
|
64
|
+
| `--tabs-background` | | Background color for all tab buttons (default: transparent) |
|
|
65
|
+
| `--tabs-container-background` | | Background color of the tabs container (default: theme white) |
|
|
66
|
+
| `--tabs-hover-background` | | Background color of a tab on hover (default: gray-100) |
|
|
67
|
+
| `--tabs-hover-color` | | Text and icon color of a tab on hover (default: gray-700) |
|
|
68
|
+
| `--tabs-gap` | | Spacing between tabs (default: 1rem) |
|
|
69
|
+
|
|
70
|
+
<hr/>
|
|
71
|
+
|
|
72
|
+
## Exports
|
|
73
|
+
|
|
74
|
+
| Kind | Name | Declaration | Module | Package |
|
|
75
|
+
| --------------------------- | ---------- | ----------- | --------------------------- | ------- |
|
|
76
|
+
| `js` | `default` | Tabs | src/components/tabs/Tabs.ts | |
|
|
77
|
+
| `custom-element-definition` | `btu-tabs` | Tabs | src/components/tabs/Tabs.ts | |
|
package/package.json
CHANGED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import{g as m,x as o}from"./iframe-BqvwP3or.js";import{o as c}from"./style-map-CBrSnxRe.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),u=t=>{const a={};return t.customBackgroundColor&&(a["--pagination-color-background"]=t.customBackgroundColor),t.customForegroundColor&&(a["--pagination-color-foreground"]=t.customForegroundColor),a},S={title:"Components/Pagination",component:"btu-pagination",tags:["autodocs"],parameters:{docs:{subtitle:"A component for navigating through paged content",description:{component:`
|
|
2
|
-
<h3>When to use:</h3>
|
|
3
|
-
<ul>
|
|
4
|
-
<li>To navigate through large sets of data</li>
|
|
5
|
-
<li>For search results, tables, and lists</li>
|
|
6
|
-
<li>In widgets and calendar views</li>
|
|
7
|
-
</ul>
|
|
8
|
-
|
|
9
|
-
<h3>Variants:</h3>
|
|
10
|
-
<ul>
|
|
11
|
-
<li><strong>Widget</strong> (default): Page size selector + total display + navigation</li>
|
|
12
|
-
<li><strong>Search</strong>: With page jumper dropdown</li>
|
|
13
|
-
<li><strong>Widget Small</strong>: Without first/last page buttons</li>
|
|
14
|
-
<li><strong>Calendar</strong>: Custom page-size slot + jumper slot</li>
|
|
15
|
-
</ul>
|
|
16
|
-
`}},actions:{handles:b},controls:{expanded:!0}},args:{...h,"total-items":200,"boundary-buttons":!0,"hide-on-single-page":!0,"page-size-changer":!0},argTypes:{...y,"--pagination-color-background":{table:{disable:!0}},"--pagination-color-foreground":{table:{disable:!0}},customBackgroundColor:{name:"--pagination-color-background",control:{type:"color"},description:"Custom background color for buttons and select",table:{category:"CSS Properties"}},customForegroundColor:{name:"--pagination-color-foreground",control:{type:"color"},description:"Custom foreground (text/icon) color",table:{category:"CSS Properties"}}},render:t=>o`
|
|
17
|
-
<btu-pagination
|
|
18
|
-
total-items="${t["total-items"]??200}"
|
|
19
|
-
page="${t.page??1}"
|
|
20
|
-
page-size="${t["page-size"]??0}"
|
|
21
|
-
page-size-options="${t["page-size-options"]??"10, 20, 50"}"
|
|
22
|
-
?disabled="${t.disabled}"
|
|
23
|
-
?loading="${t.loading}"
|
|
24
|
-
.hideOnSinglePage=${t["hide-on-single-page"]??!0}
|
|
25
|
-
.pageSizeChanger=${t["page-size-changer"]??!0}
|
|
26
|
-
.boundaryButtons=${t["boundary-buttons"]??!0}
|
|
27
|
-
?hide-total-count=${t["hide-total-count"]}
|
|
28
|
-
style=${c(u(t))}
|
|
29
|
-
></btu-pagination>
|
|
30
|
-
`},i={args:{},parameters:{docs:{description:{story:"Default Widget variant with page size selector, total display, and full navigation controls."}}}},s={args:{"total-items":500,"page-size-options":"10, 25, 50, 100"},render:t=>o`
|
|
31
|
-
<btu-pagination
|
|
32
|
-
total-items="${t["total-items"]??500}"
|
|
33
|
-
page="${t.page??1}"
|
|
34
|
-
page-size="${t["page-size"]??0}"
|
|
35
|
-
page-size-options="${t["page-size-options"]??"10, 25, 50, 100"}"
|
|
36
|
-
?disabled="${t.disabled}"
|
|
37
|
-
?loading="${t.loading}"
|
|
38
|
-
.hideOnSinglePage=${t["hide-on-single-page"]??!0}
|
|
39
|
-
.pageSizeChanger=${t["page-size-changer"]??!0}
|
|
40
|
-
.boundaryButtons=${t["boundary-buttons"]??!0}
|
|
41
|
-
?hide-total-count=${t["hide-total-count"]}
|
|
42
|
-
style=${c(u(t))}
|
|
43
|
-
>
|
|
44
|
-
<select
|
|
45
|
-
slot="jumper"
|
|
46
|
-
class="btu-pagination-select"
|
|
47
|
-
aria-label="Go to page"
|
|
48
|
-
@change=${a=>{const e=a.target,n=e.closest("btu-pagination");n&&(n.page=parseInt(e.value,10))}}
|
|
49
|
-
>
|
|
50
|
-
${Array.from({length:50},(a,e)=>o`<option value="${e+1}">Page ${e+1}</option>`)}
|
|
51
|
-
</select>
|
|
52
|
-
</btu-pagination>
|
|
53
|
-
`,parameters:{docs:{description:{story:'Search variant with a page jumper dropdown placed via `slot="jumper"`. Allows direct navigation to a specific page.'}}}},r={args:{"total-items":100,"boundary-buttons":!1},parameters:{docs:{description:{story:"Compact widget variant without first/last page buttons. Suitable for tight spaces."}}}},l={args:{"total-items":52},render:t=>o`
|
|
54
|
-
<btu-pagination
|
|
55
|
-
total-items="${t["total-items"]??52}"
|
|
56
|
-
page="${t.page??1}"
|
|
57
|
-
page-size="1"
|
|
58
|
-
?disabled="${t.disabled}"
|
|
59
|
-
?loading="${t.loading}"
|
|
60
|
-
.hideOnSinglePage=${t["hide-on-single-page"]??!0}
|
|
61
|
-
.pageSizeChanger=${!1}
|
|
62
|
-
.boundaryButtons=${t["boundary-buttons"]??!0}
|
|
63
|
-
?hide-total-count=${t["hide-total-count"]}
|
|
64
|
-
style=${c(u(t))}
|
|
65
|
-
>
|
|
66
|
-
<select slot="page-size" class="btu-pagination-select" aria-label="View type">
|
|
67
|
-
<option value="week">Week</option>
|
|
68
|
-
<option value="month">Month</option>
|
|
69
|
-
</select>
|
|
70
|
-
<button
|
|
71
|
-
slot="jumper"
|
|
72
|
-
class="btu-button btu-button-sm"
|
|
73
|
-
@click=${a=>{const e=a.target.closest("btu-pagination");e&&(e.page=1)}}
|
|
74
|
-
>
|
|
75
|
-
Today
|
|
76
|
-
</button>
|
|
77
|
-
</btu-pagination>
|
|
78
|
-
`,parameters:{docs:{description:{story:'Calendar variant using `slot="page-size"` for a week/month selector and `slot="jumper"` for a Today button.'}}}},p={args:{"total-items":200,loading:!0},parameters:{docs:{description:{story:"Loading state shows a spinner and dims the navigation controls. The `aria-busy` attribute is set on the live region."}}}},g={args:{"total-items":200,disabled:!0,page:3},parameters:{docs:{description:{story:"Disabled state prevents all interaction. All buttons and selects receive the native `disabled` attribute."}}}},d={render:()=>{const t=a=>{const e=a.target;e.loading=!0,setTimeout(()=>{e.loading=!1},1e3)};return o`
|
|
79
|
-
<div class="flex flex-col gap-4">
|
|
80
|
-
<div class="flex items-center gap-2">
|
|
81
|
-
<label for="total-input" class="text-sm font-medium">Total Items:</label>
|
|
82
|
-
<input
|
|
83
|
-
id="total-input"
|
|
84
|
-
type="number"
|
|
85
|
-
value="200"
|
|
86
|
-
min="0"
|
|
87
|
-
class="w-24 rounded border px-2 py-1 text-sm"
|
|
88
|
-
@input=${a=>{const e=a.target,n=e.closest(".flex.flex-col")?.querySelector("btu-pagination");n&&(n.totalItems=parseInt(e.value,10)||0)}}
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
<btu-pagination
|
|
92
|
-
total-items="200"
|
|
93
|
-
@btu-pagination-change=${t}
|
|
94
|
-
@btu-pagination-page-size-change=${t}
|
|
95
|
-
></btu-pagination>
|
|
96
|
-
</div>
|
|
97
|
-
`},parameters:{docs:{description:{story:"Interactive example demonstrating dynamic `totalItems` changes at runtime. Navigation triggers a simulated 1s loading state."}}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
98
|
-
args: {},
|
|
99
|
-
parameters: {
|
|
100
|
-
docs: {
|
|
101
|
-
description: {
|
|
102
|
-
story: 'Default Widget variant with page size selector, total display, and full navigation controls.'
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}`,...i.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
107
|
-
args: {
|
|
108
|
-
'total-items': 500,
|
|
109
|
-
'page-size-options': '10, 25, 50, 100'
|
|
110
|
-
},
|
|
111
|
-
render: args => html\`
|
|
112
|
-
<btu-pagination
|
|
113
|
-
total-items="\${args['total-items'] ?? 500}"
|
|
114
|
-
page="\${args.page ?? 1}"
|
|
115
|
-
page-size="\${args['page-size'] ?? 0}"
|
|
116
|
-
page-size-options="\${args['page-size-options'] ?? '10, 25, 50, 100'}"
|
|
117
|
-
?disabled="\${args.disabled}"
|
|
118
|
-
?loading="\${args.loading}"
|
|
119
|
-
.hideOnSinglePage=\${args['hide-on-single-page'] ?? true}
|
|
120
|
-
.pageSizeChanger=\${args['page-size-changer'] ?? true}
|
|
121
|
-
.boundaryButtons=\${args['boundary-buttons'] ?? true}
|
|
122
|
-
?hide-total-count=\${args['hide-total-count']}
|
|
123
|
-
style=\${styleMap(paginationStyles(args))}
|
|
124
|
-
>
|
|
125
|
-
<select
|
|
126
|
-
slot="jumper"
|
|
127
|
-
class="btu-pagination-select"
|
|
128
|
-
aria-label="Go to page"
|
|
129
|
-
@change=\${(e: Event) => {
|
|
130
|
-
const select = e.target as HTMLSelectElement;
|
|
131
|
-
const pagination = select.closest('btu-pagination');
|
|
132
|
-
if (pagination) {
|
|
133
|
-
pagination.page = parseInt(select.value, 10);
|
|
134
|
-
}
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
137
|
-
\${Array.from({
|
|
138
|
-
length: 50
|
|
139
|
-
}, (_, i) => html\`<option value="\${i + 1}">Page \${i + 1}</option>\`)}
|
|
140
|
-
</select>
|
|
141
|
-
</btu-pagination>
|
|
142
|
-
\`,
|
|
143
|
-
parameters: {
|
|
144
|
-
docs: {
|
|
145
|
-
description: {
|
|
146
|
-
story: 'Search variant with a page jumper dropdown placed via \`slot="jumper"\`. Allows direct navigation to a specific page.'
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}`,...s.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
151
|
-
args: {
|
|
152
|
-
'total-items': 100,
|
|
153
|
-
'boundary-buttons': false
|
|
154
|
-
},
|
|
155
|
-
parameters: {
|
|
156
|
-
docs: {
|
|
157
|
-
description: {
|
|
158
|
-
story: 'Compact widget variant without first/last page buttons. Suitable for tight spaces.'
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}`,...r.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
163
|
-
args: {
|
|
164
|
-
'total-items': 52
|
|
165
|
-
},
|
|
166
|
-
render: args => html\`
|
|
167
|
-
<btu-pagination
|
|
168
|
-
total-items="\${args['total-items'] ?? 52}"
|
|
169
|
-
page="\${args.page ?? 1}"
|
|
170
|
-
page-size="1"
|
|
171
|
-
?disabled="\${args.disabled}"
|
|
172
|
-
?loading="\${args.loading}"
|
|
173
|
-
.hideOnSinglePage=\${args['hide-on-single-page'] ?? true}
|
|
174
|
-
.pageSizeChanger=\${false}
|
|
175
|
-
.boundaryButtons=\${args['boundary-buttons'] ?? true}
|
|
176
|
-
?hide-total-count=\${args['hide-total-count']}
|
|
177
|
-
style=\${styleMap(paginationStyles(args))}
|
|
178
|
-
>
|
|
179
|
-
<select slot="page-size" class="btu-pagination-select" aria-label="View type">
|
|
180
|
-
<option value="week">Week</option>
|
|
181
|
-
<option value="month">Month</option>
|
|
182
|
-
</select>
|
|
183
|
-
<button
|
|
184
|
-
slot="jumper"
|
|
185
|
-
class="btu-button btu-button-sm"
|
|
186
|
-
@click=\${(e: Event) => {
|
|
187
|
-
const pagination = (e.target as HTMLElement).closest('btu-pagination');
|
|
188
|
-
if (pagination) pagination.page = 1;
|
|
189
|
-
}}
|
|
190
|
-
>
|
|
191
|
-
Today
|
|
192
|
-
</button>
|
|
193
|
-
</btu-pagination>
|
|
194
|
-
\`,
|
|
195
|
-
parameters: {
|
|
196
|
-
docs: {
|
|
197
|
-
description: {
|
|
198
|
-
story: 'Calendar variant using \`slot="page-size"\` for a week/month selector and \`slot="jumper"\` for a Today button.'
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}`,...l.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
203
|
-
args: {
|
|
204
|
-
'total-items': 200,
|
|
205
|
-
loading: true
|
|
206
|
-
},
|
|
207
|
-
parameters: {
|
|
208
|
-
docs: {
|
|
209
|
-
description: {
|
|
210
|
-
story: 'Loading state shows a spinner and dims the navigation controls. The \`aria-busy\` attribute is set on the live region.'
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}`,...p.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
215
|
-
args: {
|
|
216
|
-
'total-items': 200,
|
|
217
|
-
disabled: true,
|
|
218
|
-
page: 3
|
|
219
|
-
},
|
|
220
|
-
parameters: {
|
|
221
|
-
docs: {
|
|
222
|
-
description: {
|
|
223
|
-
story: 'Disabled state prevents all interaction. All buttons and selects receive the native \`disabled\` attribute.'
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}`,...g.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
228
|
-
render: () => {
|
|
229
|
-
const simulateLoading = (e: CustomEvent) => {
|
|
230
|
-
const pagination = e.target as HTMLElement & {
|
|
231
|
-
loading: boolean;
|
|
232
|
-
};
|
|
233
|
-
pagination.loading = true;
|
|
234
|
-
setTimeout(() => {
|
|
235
|
-
pagination.loading = false;
|
|
236
|
-
}, 1000);
|
|
237
|
-
};
|
|
238
|
-
return html\`
|
|
239
|
-
<div class="flex flex-col gap-4">
|
|
240
|
-
<div class="flex items-center gap-2">
|
|
241
|
-
<label for="total-input" class="text-sm font-medium">Total Items:</label>
|
|
242
|
-
<input
|
|
243
|
-
id="total-input"
|
|
244
|
-
type="number"
|
|
245
|
-
value="200"
|
|
246
|
-
min="0"
|
|
247
|
-
class="w-24 rounded border px-2 py-1 text-sm"
|
|
248
|
-
@input=\${(e: Event) => {
|
|
249
|
-
const input = e.target as HTMLInputElement;
|
|
250
|
-
const pagination = (input.closest('.flex.flex-col') as HTMLElement)?.querySelector('btu-pagination') as HTMLElement & {
|
|
251
|
-
totalItems: number;
|
|
252
|
-
};
|
|
253
|
-
if (pagination) pagination.totalItems = parseInt(input.value, 10) || 0;
|
|
254
|
-
}}
|
|
255
|
-
/>
|
|
256
|
-
</div>
|
|
257
|
-
<btu-pagination
|
|
258
|
-
total-items="200"
|
|
259
|
-
@btu-pagination-change=\${simulateLoading}
|
|
260
|
-
@btu-pagination-page-size-change=\${simulateLoading}
|
|
261
|
-
></btu-pagination>
|
|
262
|
-
</div>
|
|
263
|
-
\`;
|
|
264
|
-
},
|
|
265
|
-
parameters: {
|
|
266
|
-
docs: {
|
|
267
|
-
description: {
|
|
268
|
-
story: 'Interactive example demonstrating dynamic \`totalItems\` changes at runtime. Navigation triggers a simulated 1s loading state.'
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}`,...d.parameters?.docs?.source}}};const z=["Default","Search","WidgetSmall","Calendar","Loading","Disabled","DynamicTotal"];export{l as Calendar,i as Default,g as Disabled,d as DynamicTotal,p as Loading,s as Search,r as WidgetSmall,z as __namedExportsOrder,S as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{x as a}from"./iframe-BqvwP3or.js";import"./preload-helper-PPVm8Dsz.js";const l=({theme:e="btu-scrollshadow-25"})=>{const r=new Array(100).fill(0).map((s,t)=>`Item ${t+1}`);return a`
|
|
2
|
-
<style>
|
|
3
|
-
:root {
|
|
4
|
-
--can-scroll: ;
|
|
5
|
-
}
|
|
6
|
-
</style>
|
|
7
|
-
<div class=${["flex","gap-2","bg-gray-500",e].join(" ")}>
|
|
8
|
-
${r.map((s,t)=>a`<div
|
|
9
|
-
class="text-md flex aspect-square h-[100px] items-center justify-center"
|
|
10
|
-
style="background:oklch(80% 50% ${Math.floor(Math.random()*710)+10});"
|
|
11
|
-
>
|
|
12
|
-
${s}
|
|
13
|
-
</div>`)}
|
|
14
|
-
</div>
|
|
15
|
-
`},n={title:"CSS Plugins/ScrollShadow",component:"btu-scrollshadow",tags:["autodocs"],parameters:{docs:{subtitle:"This Tailwind CSS plugin provides the `.btu-scrollshadow` utility class for adding shadows to the edges of a scrollable container once the content overflows. The shadows use our gray color palette. You can choose which shade of gray you want. The scroll container must not already use before & after pseudo elements. But, if you need to use before/after modifiers on the container, make sure you also manually set the content property to the `--whitespace` variable. This is a workaround for TWCSS automatically adding a content property to the before/after pseudo-elements, which overrides the `--whitespace` variable by default. Note: this currently only supports x-axis scrolling."},controls:{expanded:!0}},render:e=>l(e),argTypes:{theme:{control:{type:"select"},description:"Choose a shade of gray for the scroll shadow. 25 is almost white, and 900 is almost black.",options:["btu-scrollshadow-25","btu-scrollshadow-50","btu-scrollshadow-100","btu-scrollshadow-200","btu-scrollshadow-300","btu-scrollshadow-400","btu-scrollshadow-500","btu-scrollshadow-600","btu-scrollshadow-700","btu-scrollshadow-800","btu-scrollshadow-900"]}},args:{}},o={args:{}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
16
|
-
args: {}
|
|
17
|
-
}`,...o.parameters?.docs?.source}}};const i=["Default"];export{o as Default,i as __namedExportsOrder,n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as r}from"./iframe-BqvwP3or.js";const m=o=>o??r;export{m as o};
|