@brightspot/ui 1.5.0 → 1.7.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.
Files changed (105) hide show
  1. package/dist/components/dropdown/Dropdown.d.ts +172 -0
  2. package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
  3. package/dist/components/dropdown/Dropdown.js +407 -0
  4. package/dist/components/dropdown/Dropdown.js.map +1 -0
  5. package/dist/components/dropdown/DropdownItem.d.ts +108 -0
  6. package/dist/components/dropdown/DropdownItem.d.ts.map +1 -0
  7. package/dist/components/dropdown/DropdownItem.js +210 -0
  8. package/dist/components/dropdown/DropdownItem.js.map +1 -0
  9. package/dist/components/dropdown/DropdownMenu.d.ts +117 -0
  10. package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -0
  11. package/dist/components/dropdown/DropdownMenu.js +295 -0
  12. package/dist/components/dropdown/DropdownMenu.js.map +1 -0
  13. package/dist/components/pagination/Pagination.d.ts +109 -0
  14. package/dist/components/pagination/Pagination.d.ts.map +1 -0
  15. package/dist/components/pagination/Pagination.js +351 -0
  16. package/dist/components/pagination/Pagination.js.map +1 -0
  17. package/dist/custom-elements.json +1642 -182
  18. package/dist/storybook/assets/Avatar.stories-BAaSlDF7.js +213 -0
  19. package/dist/storybook/assets/AvatarGroup.stories-CgoDB4N4.js +225 -0
  20. package/dist/storybook/assets/{Badge.stories-Bbnc6fRy.js → Badge.stories-uexxdmo6.js} +3 -3
  21. package/dist/storybook/assets/{Button.stories-CRJ5n2y4.js → Button.stories-T9UJUPHI.js} +1 -1
  22. package/dist/storybook/assets/{CircularProgress.stories-D9vBj3JJ.js → CircularProgress.stories-DW-VJA5j.js} +6 -6
  23. package/dist/storybook/assets/{ClipboardMixin.stories-Dm-Jm4yb.js → ClipboardMixin.stories-DzU4vxu5.js} +1 -1
  24. package/dist/storybook/assets/{Color-6BZIO3FS-BcNIJY1U.js → Color-6BZIO3FS-DRk2xjoN.js} +1 -1
  25. package/dist/storybook/assets/{Colors.stories-B9_090wL.js → Colors.stories-_UPdvuhY.js} +1 -1
  26. package/dist/storybook/assets/{ComponentStatesMixin-ChiFBCuo.js → ComponentStatesMixin-BIu5SKeV.js} +1 -1
  27. package/dist/storybook/assets/{ComponentStatesMixin.stories-DHv9MHmE.js → ComponentStatesMixin.stories-C0FLaqLu.js} +1 -1
  28. package/dist/storybook/assets/{CopyToClipboard.stories-gtJlTP1l.js → CopyToClipboard.stories-D31zoUVI.js} +1 -1
  29. package/dist/storybook/assets/{Debounce.stories-BBNX7mJA.js → Debounce.stories-CgPPl5Ee.js} +1 -1
  30. package/dist/storybook/assets/{DocsRenderer-LL677BLK-D-E99pXl.js → DocsRenderer-LL677BLK-iwiwOzX9.js} +6 -6
  31. package/dist/storybook/assets/Dropdown.stories-CDcl6rmG.js +697 -0
  32. package/dist/storybook/assets/{Events.stories-DDmydlh_.js → Events.stories-DS6UC9dZ.js} +1 -1
  33. package/dist/storybook/assets/{Heading.stories-BLGfko-i.js → Heading.stories-CAQfEGE2.js} +1 -1
  34. package/dist/storybook/assets/{Icon.stories-BHnAGcFF.js → Icon.stories-C7msWlHs.js} +11 -11
  35. package/dist/storybook/assets/{LinearProgress.stories-Dx26a0P_.js → LinearProgress.stories-DBGJ5a2-.js} +7 -7
  36. package/dist/storybook/assets/Pagination.stories-C58bGOdf.js +272 -0
  37. package/dist/storybook/assets/{Popover.stories-CbqpY6YR.js → Popover.stories-C9zU0sEX.js} +5 -5
  38. package/dist/storybook/assets/{ReadyMixin-BHiHoIbr.js → ReadyMixin-qf8SAjMu.js} +1 -1
  39. package/dist/storybook/assets/{Rtc.stories-CAjDv_Ub.js → Rtc.stories-k9tKHNhD.js} +1 -1
  40. package/dist/storybook/assets/{ScrollShadow.stories-BSV4U-tq.js → ScrollShadow.stories-Bp42zyLH.js} +1 -1
  41. package/dist/storybook/assets/{Throttle.stories-kaxXQ8RZ.js → Throttle.stories-B5YU-Nms.js} +1 -1
  42. package/dist/storybook/assets/Tooltip.stories-COQcvOnL.js +143 -0
  43. package/dist/storybook/assets/{Widget.stories-DqATHnSq.js → Widget.stories-D3Sq5-_A.js} +13 -13
  44. package/dist/storybook/assets/{WithTooltip-65CFNBJE-BtbbFYSA.js → WithTooltip-65CFNBJE-Cox81aM_.js} +1 -1
  45. package/dist/storybook/assets/{formatter-EIJCOSYU-C87Csnpu.js → formatter-EIJCOSYU-3ErcoV9q.js} +1 -1
  46. package/dist/storybook/assets/if-defined-Bv2_qPJg.js +1 -0
  47. package/dist/storybook/assets/{iframe-CcloOV09.js → iframe-CM6gBkqA.js} +170 -170
  48. package/dist/storybook/assets/iframe-D3r2Ciu8.css +1 -0
  49. package/dist/storybook/assets/{index-DP7vnJf7.js → index-iwfnMgqg.js} +1 -1
  50. package/dist/storybook/assets/{onFind.stories-BxvoC-Z-.js → onFind.stories-CDtoTN6S.js} +1 -1
  51. package/dist/storybook/assets/{onRemove.stories-Dwoixzb0.js → onRemove.stories-CSTeFCLU.js} +1 -1
  52. package/dist/storybook/assets/{onVisible.stories-CinmRF9w.js → onVisible.stories-C-yiw9n4.js} +1 -1
  53. package/dist/storybook/assets/style-map-BJGdSb_D.js +1 -0
  54. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-BHLkDkOn.js → syntaxhighlighter-ED5Y7EFY-BEudYlVi.js} +1 -1
  55. package/dist/storybook/iframe.html +2 -2
  56. package/dist/storybook/index.json +1 -1
  57. package/dist/storybook/project.json +1 -1
  58. package/dist/tailwind-plugin-button.js +10 -0
  59. package/dist/tailwind-plugin-button.js.map +1 -1
  60. package/dist/tailwind-plugin-button.ts +10 -0
  61. package/dist/tailwind-plugin-dropdown.d.ts +2 -0
  62. package/dist/tailwind-plugin-dropdown.d.ts.map +1 -0
  63. package/dist/tailwind-plugin-dropdown.js +223 -0
  64. package/dist/tailwind-plugin-dropdown.js.map +1 -0
  65. package/dist/tailwind-plugin-dropdown.ts +249 -0
  66. package/dist/tailwind-plugin-pagination.d.ts +2 -0
  67. package/dist/tailwind-plugin-pagination.d.ts.map +1 -0
  68. package/dist/tailwind-plugin-pagination.js +164 -0
  69. package/dist/tailwind-plugin-pagination.js.map +1 -0
  70. package/dist/tailwind-plugin-pagination.ts +179 -0
  71. package/dist/tailwind.config.d.ts +1 -4
  72. package/dist/tailwind.config.d.ts.map +1 -1
  73. package/dist/tailwind.config.js +1 -0
  74. package/dist/tailwind.config.js.map +1 -1
  75. package/dist/tailwind.config.ts +1 -0
  76. package/dist/util/EventEmitterMixin.d.ts +22 -0
  77. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  78. package/dist/util/EventEmitterMixin.js.map +1 -1
  79. package/dist/util/aria.d.ts.map +1 -1
  80. package/dist/util/aria.js +2 -1
  81. package/dist/util/aria.js.map +1 -1
  82. package/dist/util/i18n.d.ts +13 -0
  83. package/dist/util/i18n.d.ts.map +1 -0
  84. package/dist/util/i18n.js +21 -0
  85. package/dist/util/i18n.js.map +1 -0
  86. package/docs/components/Avatar.md +62 -0
  87. package/docs/components/AvatarGroup.md +52 -0
  88. package/docs/components/Badge.md +58 -0
  89. package/docs/components/CircularProgress.md +55 -0
  90. package/docs/components/CopyToClipboard.md +54 -0
  91. package/docs/components/Dropdown.md +100 -0
  92. package/docs/components/DropdownItem.md +64 -0
  93. package/docs/components/DropdownMenu.md +81 -0
  94. package/docs/components/Icon.md +61 -0
  95. package/docs/components/LinearProgress.md +40 -0
  96. package/docs/components/Pagination.md +95 -0
  97. package/docs/components/Popover.md +71 -0
  98. package/docs/components/README.md +24 -0
  99. package/docs/components/Widget.md +79 -0
  100. package/package.json +4 -3
  101. package/dist/storybook/assets/Avatar.stories-CPVNxsaA.js +0 -214
  102. package/dist/storybook/assets/AvatarGroup.stories-Bl65NGHl.js +0 -225
  103. package/dist/storybook/assets/Tooltip.stories-CsxXkztr.js +0 -143
  104. package/dist/storybook/assets/if-defined-COHr0XBn.js +0 -1
  105. package/dist/storybook/assets/iframe-BkDGeDre.css +0 -1
@@ -0,0 +1,64 @@
1
+ # `src/components/dropdown/DropdownItem.ts`:
2
+
3
+ ## class: `DropdownItem`, `btu-dropdown-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
+ | `label` | | `string` | `''` | Display text for the item. | |
23
+ | `type` | | `'default' \| 'divider' \| 'subhead'` | `'default'` | Item type: 'default', 'divider', or 'subhead'. | |
24
+ | `iconSymbol` | | `string` | `''` | Lucide icon symbol. | |
25
+ | `shortcut` | | `string` | `''` | Keyboard shortcut display text. | |
26
+ | `disabled` | | `boolean` | `false` | Whether the item is disabled. | |
27
+ | `selected` | | `boolean` | `false` | Whether the item is selected/checked. | |
28
+ | `favorited` | | `boolean` | `false` | Whether the item is favorited. | |
29
+
30
+ ### Methods
31
+
32
+ | Name | Privacy | Description | Parameters | Return | Inherited From |
33
+ | ----------------- | ------- | --------------------- | ---------- | ------ | -------------- |
34
+ | `_toggleFavorite` | private | Toggle favorite state | `e: Event` | `void` | |
35
+ | `_handleClick` | private | | | `void` | |
36
+
37
+ ### Events
38
+
39
+ | Name | Type | Description | Inherited From |
40
+ | ---------------------------- | -------------------------------------------------- | ------------------------------ | -------------- |
41
+ | `btu-dropdown-item-ready` | `CustomEvent` | Fired after first render | |
42
+ | `btu-dropdown-item-select` | `CustomEvent<{label: string, selected: boolean}>` | Fired when item is activated | |
43
+ | `btu-dropdown-item-favorite` | `CustomEvent<{label: string, favorited: boolean}>` | Fired when favorite is toggled | |
44
+
45
+ ### Attributes
46
+
47
+ | Name | Field | Inherited From |
48
+ | ------------- | ---------- | -------------- |
49
+ | `label` | label | |
50
+ | `type` | type | |
51
+ | `icon-symbol` | iconSymbol | |
52
+ | `shortcut` | shortcut | |
53
+ | `disabled` | disabled | |
54
+ | `selected` | selected | |
55
+ | `favorited` | favorited | |
56
+
57
+ <hr/>
58
+
59
+ ## Exports
60
+
61
+ | Kind | Name | Declaration | Module | Package |
62
+ | --------------------------- | ------------------- | ------------ | --------------------------------------- | ------- |
63
+ | `js` | `default` | DropdownItem | src/components/dropdown/DropdownItem.ts | |
64
+ | `custom-element-definition` | `btu-dropdown-item` | DropdownItem | src/components/dropdown/DropdownItem.ts | |
@@ -0,0 +1,81 @@
1
+ # `src/components/dropdown/DropdownMenu.ts`:
2
+
3
+ ## class: `DropdownMenu`, `btu-dropdown-menu`
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
+ | `name` | | `string` | `''` | Accessible name for the menu, displayed in header when header is true. | |
23
+ | `header` | | `boolean` | `false` | Show header bar with menu name. | |
24
+ | `checkbox` | | `boolean` | `false` | Enable checkbox mode for items (menuitemcheckbox role). | |
25
+ | `icon` | | `boolean` | `false` | Show icons before each item. | |
26
+ | `iconSymbol` | | `string` | `''` | Fallback Lucide icon symbol for items without their own. | |
27
+ | `favorites` | | `boolean` | `false` | Show favorite toggle on each item. | |
28
+ | `shortcuts` | | `boolean` | `false` | Show keyboard shortcut text on each item. | |
29
+ | `emptyMessage` | | `string` | `'No items available'` | Message displayed when the menu has no focusable items. | |
30
+ | `_isEmpty` | private | `boolean` | | Check whether the menu has zero focusable items | |
31
+
32
+ ### Methods
33
+
34
+ | Name | Privacy | Description | Parameters | Return | Inherited From |
35
+ | ----------------------- | ------- | --------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------- | -------------- |
36
+ | `_configureItems` | private | Configure all child items with menu-level settings | | `void` | |
37
+ | `_getAllItems` | private | Get all btu-dropdown-item children | | `DropdownItem[]` | |
38
+ | `_getFocusableItems` | private | Get only focusable items (default type, skip dividers/subheads) | | `DropdownItem[]` | |
39
+ | `_getCurrentFocusIndex` | private | Find the current focused item index | `focusable: DropdownItem[]` | `number` | |
40
+ | `_findNextIndex` | private | Find next index wrapping around, moving in direction (+1 or -1) | `focusable: DropdownItem[], current: number, direction: 1 \| -1` | `number` | |
41
+ | `_handleTypeahead` | private | Typeahead character matching with 500ms accumulation | `char: string, focusable: DropdownItem[]` | `void` | |
42
+
43
+ ### Events
44
+
45
+ | Name | Type | Description | Inherited From |
46
+ | ------------------------- | ------------- | ------------------------ | -------------- |
47
+ | `btu-dropdown-menu-ready` | `CustomEvent` | Fired after first render | |
48
+
49
+ ### Attributes
50
+
51
+ | Name | Field | Inherited From |
52
+ | --------------- | ------------ | -------------- |
53
+ | `name` | name | |
54
+ | `header` | header | |
55
+ | `checkbox` | checkbox | |
56
+ | `icon` | icon | |
57
+ | `icon-symbol` | iconSymbol | |
58
+ | `favorites` | favorites | |
59
+ | `shortcuts` | shortcuts | |
60
+ | `empty-message` | emptyMessage | |
61
+
62
+ ### CSS Properties
63
+
64
+ | Name | Default | Description |
65
+ | ------------------------ | ------- | ------------------------------------------ |
66
+ | `--dropdown-empty-color` | | Empty state text color (default: gray-400) |
67
+
68
+ ### Slots
69
+
70
+ | Name | Description |
71
+ | ---- | ------------------------------------------- |
72
+ | | Menu items (\`btu-dropdown-item\` elements) |
73
+
74
+ <hr/>
75
+
76
+ ## Exports
77
+
78
+ | Kind | Name | Declaration | Module | Package |
79
+ | --------------------------- | ------------------- | ------------ | --------------------------------------- | ------- |
80
+ | `js` | `default` | DropdownMenu | src/components/dropdown/DropdownMenu.ts | |
81
+ | `custom-element-definition` | `btu-dropdown-menu` | DropdownMenu | src/components/dropdown/DropdownMenu.ts | |
@@ -0,0 +1,61 @@
1
+ # `src/components/icon/Icon.ts`:
2
+
3
+ ## class: `Icon`, `btu-icon`
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
+ | `size` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Size of the icon.&#xA;- 'xs': Extra small (0.75rem)&#xA;- 'sm': Small (1rem)&#xA;- 'md': Medium (1.25rem, default)&#xA;- 'lg': Large (1.5rem)&#xA;- 'xl': Extra large (1.75rem) | |
29
+ | `symbol` | | `string` | `'circle-dashed'` | Lucide icon name to display.&#xA;See https\://lucide.dev/icons/ for available icons. | |
30
+ | `gradient` | | `'ai' \| 'error' \| 'gray' \| 'primary' \| 'purple' \| 'rose' \| 'success' \| 'teal' \| 'warning' \| undefined` | | Theme color to use for gradient fill.&#xA;When set, icon displays with gradient. When undefined, icon inherits parent text color. | |
31
+
32
+ ### Events
33
+
34
+ | Name | Type | Description | Inherited From |
35
+ | ---------------- | ------------- | ------------------------------------------- | -------------- |
36
+ | `btu-icon-ready` | `CustomEvent` | Fired after first render and initialization | |
37
+
38
+ ### Attributes
39
+
40
+ | Name | Field | Inherited From |
41
+ | ---------- | -------- | -------------- |
42
+ | `size` | size | |
43
+ | `symbol` | symbol | |
44
+ | `gradient` | gradient | |
45
+
46
+ ### CSS Properties
47
+
48
+ | Name | Default | Description |
49
+ | ------------- | ------- | ------------------------------------------------------- |
50
+ | `--Icon-size` | | Icon size (overrides size default) |
51
+ | `--Icon-fill` | | Icon fill color for filled icons (e.g., "currentColor") |
52
+ | `--Icon-svg` | | SVG data URI for mask-based rendering |
53
+
54
+ <hr/>
55
+
56
+ ## Exports
57
+
58
+ | Kind | Name | Declaration | Module | Package |
59
+ | --------------------------- | ---------- | ----------- | --------------------------- | ------- |
60
+ | `js` | `default` | Icon | src/components/icon/Icon.ts | |
61
+ | `custom-element-definition` | `btu-icon` | Icon | src/components/icon/Icon.ts | |
@@ -0,0 +1,40 @@
1
+ # `src/components/linear-progress/LinearProgress.ts`:
2
+
3
+ ## class: `LinearProgress`, `btu-linear-progress`
4
+
5
+ ### Superclass
6
+
7
+ | Name | Module | Package |
8
+ | ------------ | ------ | ------- |
9
+ | `LitElement` | | lit |
10
+
11
+ ### Mixins
12
+
13
+ | Name | Module | Package |
14
+ | ------------------- | ------------------------------ | ------- |
15
+ | `ProgressMixin` | /src/util/ProgressMixin.js | |
16
+ | `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
17
+ | `ReadyMixin` | /src/util/ReadyMixin.js | |
18
+
19
+ ### Events
20
+
21
+ | Name | Type | Description | Inherited From |
22
+ | ----------------------- | ------------- | ------------------------------------------- | -------------- |
23
+ | `btu-progress-ready` | `CustomEvent` | Fired after first render and initialization | |
24
+ | `btu-progress-complete` | `CustomEvent` | Fired when progress reaches 100 | |
25
+
26
+ ### CSS Properties
27
+
28
+ | Name | Default | Description |
29
+ | ------------------ | ------- | --------------------------------------------------- |
30
+ | `--progress-color` | | Custom progress bar color (overrides theme color) |
31
+ | `--track-color` | | Track/background color (overrides default gray-100) |
32
+
33
+ <hr/>
34
+
35
+ ## Exports
36
+
37
+ | Kind | Name | Declaration | Module | Package |
38
+ | --------------------------- | --------------------- | -------------- | ------------------------------------------------ | ------- |
39
+ | `js` | `default` | LinearProgress | src/components/linear-progress/LinearProgress.ts | |
40
+ | `custom-element-definition` | `btu-linear-progress` | LinearProgress | src/components/linear-progress/LinearProgress.ts | |
@@ -0,0 +1,95 @@
1
+ # `src/components/pagination/Pagination.ts`:
2
+
3
+ ## class: `Pagination`, `btu-pagination`
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
+ | `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
+ | `label` | | `string \| undefined` | | Accessible label for the pagination nav landmark | |
33
+ | `_parsedPageSizeOptions` | private | `number[]` | | | |
34
+ | `_totalPages` | private | `number` | | | |
35
+ | `_startItem` | private | `number` | | | |
36
+ | `_endItem` | private | `number` | | | |
37
+
38
+ ### Methods
39
+
40
+ | Name | Privacy | Description | Parameters | Return | Inherited From |
41
+ | ---------------------- | ------- | ----------- | ---------------------------------- | ------ | -------------- |
42
+ | `_setupSlots` | private | | | `void` | |
43
+ | `_goToFirstPage` | private | | `e: Event` | `void` | |
44
+ | `_goToPreviousPage` | private | | `e: Event` | `void` | |
45
+ | `_goToNextPage` | private | | `e: Event` | `void` | |
46
+ | `_goToLastPage` | private | | `e: Event` | `void` | |
47
+ | `_manageBoundaryFocus` | private | | `clickedButton: HTMLButtonElement` | `void` | |
48
+ | `_onPageSizeChange` | private | | `e: Event` | `void` | |
49
+
50
+ ### Events
51
+
52
+ | Name | Type | Description | Inherited From |
53
+ | --------------------------------- | ----------------------------------------------- | ------------------------- | -------------- |
54
+ | `btu-pagination-ready` | `CustomEvent` | Fired after first render | |
55
+ | `btu-pagination-change` | `CustomEvent<{page: number, pageSize: number}>` | Fired on page navigation | |
56
+ | `btu-pagination-page-size-change` | `CustomEvent<{page: number, pageSize: number}>` | Fired on page size change | |
57
+
58
+ ### Attributes
59
+
60
+ | Name | Field | Inherited From |
61
+ | --------------------- | ---------------- | -------------- |
62
+ | `page` | page | |
63
+ | `page-size` | pageSize | |
64
+ | `disabled` | disabled | |
65
+ | `loading` | loading | |
66
+ | `hide-on-single-page` | hideOnSinglePage | |
67
+ | `page-size-changer` | pageSizeChanger | |
68
+ | `page-size-options` | pageSizeOptions | |
69
+ | `total-items` | totalItems | |
70
+ | `boundary-buttons` | boundaryButtons | |
71
+ | `hide-total-count` | hideTotalCount | |
72
+ | `label` | label | |
73
+
74
+ ### CSS Properties
75
+
76
+ | Name | Default | Description |
77
+ | ------------------------------- | ------- | ------------------------------------------------ |
78
+ | `--pagination-color-background` | | Background color for select, buttons, and jumper |
79
+ | `--pagination-color-foreground` | | Text/icon color |
80
+
81
+ ### Slots
82
+
83
+ | Name | Description |
84
+ | ----------- | ----------------------------------------------------------- |
85
+ | `page-size` | Custom page-size selector (replaces built-in select) |
86
+ | `jumper` | Custom jumper content (e.g., page dropdown, "Today" button) |
87
+
88
+ <hr/>
89
+
90
+ ## Exports
91
+
92
+ | Kind | Name | Declaration | Module | Package |
93
+ | --------------------------- | ---------------- | ----------- | --------------------------------------- | ------- |
94
+ | `js` | `default` | Pagination | src/components/pagination/Pagination.ts | |
95
+ | `custom-element-definition` | `btu-pagination` | Pagination | src/components/pagination/Pagination.ts | |
@@ -0,0 +1,71 @@
1
+ # `src/components/popover/Popover.ts`:
2
+
3
+ ## class: `Popover`, `btu-popover`
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
+ | `position` | | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | Position relative to the trigger element.&#xA;Auto-flips when constrained by the viewport. | |
23
+ | `trigger` | | `'click' \| 'hover' \| 'focus'` | `'click'` | How the popover is activated.&#xA;- 'click': Toggle on click with light dismiss&#xA;- 'hover': Show on mouseenter with delay&#xA;- 'focus': Show on focusin | |
24
+ | `delay` | | `number` | `300` | Show delay in milliseconds (hover trigger only). | |
25
+ | `offset` | | `PopoverOffset \| null` | `null` | Gap between trigger and popover (sm=4px, md=8px, lg=12px, xl=16px). | |
26
+ | `noArrow` | | `boolean` | `false` | Hide the arrow pseudo-element. | |
27
+ | `open` | | `boolean` | `false` | Programmatic open/close state (reflected). | |
28
+ | `panelLabel` | | `string` | `''` | Accessible label for the popover panel (applied as aria-label on the dialog). | |
29
+ | `_onTriggerMouseLeave` | private | | | | |
30
+ | `_onTriggerFocusIn` | private | | | | |
31
+ | `_onTriggerFocusOut` | private | | | | |
32
+ | `_onPanelMouseEnter` | private | | | | |
33
+ | `_onPanelMouseLeave` | private | | | | |
34
+ | `_onNativeToggle` | private | | | | |
35
+ | `_onKeyDown` | private | | | | |
36
+
37
+ ### Events
38
+
39
+ | Name | Type | Description | Inherited From |
40
+ | ------------------ | ------------- | ----------------------------- | -------------- |
41
+ | `btu-popover-show` | `CustomEvent` | Fired when the popover opens | |
42
+ | `btu-popover-hide` | `CustomEvent` | Fired when the popover closes | |
43
+
44
+ ### Attributes
45
+
46
+ | Name | Field | Inherited From |
47
+ | ------------- | ---------- | -------------- |
48
+ | `position` | position | |
49
+ | `trigger` | trigger | |
50
+ | `delay` | delay | |
51
+ | `offset` | offset | |
52
+ | `noArrow` | noArrow | |
53
+ | `open` | open | |
54
+ | `panel-label` | panelLabel | |
55
+ | `no-arrow` | noArrow | |
56
+
57
+ ### Slots
58
+
59
+ | Name | Description |
60
+ | --------- | ---------------------------------------------------- |
61
+ | `trigger` | The element that activates the popover |
62
+ | `content` | Rich HTML content displayed inside the popover panel |
63
+
64
+ <hr/>
65
+
66
+ ## Exports
67
+
68
+ | Kind | Name | Declaration | Module | Package |
69
+ | --------------------------- | ------------- | ----------- | --------------------------------- | ------- |
70
+ | `js` | `default` | Popover | src/components/popover/Popover.ts | |
71
+ | `custom-element-definition` | `btu-popover` | Popover | src/components/popover/Popover.ts | |
@@ -0,0 +1,24 @@
1
+ # Brightspot UI Component API Reference
2
+
3
+ This directory contains auto-generated API documentation for all Brightspot UI web components.
4
+
5
+ ## Components
6
+
7
+ - [`<btu-avatar>` - Avatar](Avatar.md)
8
+ - [`<btu-avatar-group>` - AvatarGroup](AvatarGroup.md)
9
+ - [`<btu-badge>` - Badge](Badge.md)
10
+ - [`<btu-circular-progress>` - CircularProgress](CircularProgress.md)
11
+ - [`<btu-copy-to-clipboard>` - CopyToClipboard](CopyToClipboard.md)
12
+ - [`<btu-dropdown>` - Dropdown](Dropdown.md)
13
+ - [`<btu-dropdown-item>` - DropdownItem](DropdownItem.md)
14
+ - [`<btu-dropdown-menu>` - DropdownMenu](DropdownMenu.md)
15
+ - [`<btu-icon>` - Icon](Icon.md)
16
+ - [`<btu-linear-progress>` - LinearProgress](LinearProgress.md)
17
+ - [`<btu-pagination>` - Pagination](Pagination.md)
18
+ - [`<btu-popover>` - Popover](Popover.md)
19
+ - [`<btu-widget>` - Widget](Widget.md)
20
+
21
+ ---
22
+
23
+ *Documentation generated from Custom Elements Manifest*
24
+ *Run `yarn cem:docs` to regenerate*
@@ -0,0 +1,79 @@
1
+ # `src/components/widget/Widget.ts`:
2
+
3
+ ## class: `Widget`, `btu-widget`
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
+ | `_idCounter` | private | `number` | `0` | | |
23
+
24
+ ### Fields
25
+
26
+ | Name | Privacy | Type | Default | Description | Inherited From |
27
+ | -------------------- | ------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
28
+ | `_internals` | private | | | | |
29
+ | `heading` | | `string` | `''` | Heading text displayed in the header. | |
30
+ | `collapsible` | | `boolean` | `false` | Whether the widget can be collapsed/expanded.&#xA;When true, a chevron toggle button appears in the header. | |
31
+ | `collapsed` | | `boolean` | `false` | Whether the widget is currently collapsed.&#xA;When true, body and footer are hidden. Implies collapsible. | |
32
+ | `fullscreenable` | | `boolean` | `false` | Whether the widget can enter fullscreen mode.&#xA;When true, a fullscreen toggle button appears in the header. | |
33
+ | `_isFullscreen` | private | `boolean` | `false` | | |
34
+ | `_collapseTooltip` | private | | `new TooltipController(this, { target: 'button[data-tooltip="collapse"]', text: () => (this.collapsed ? 'Expand' : 'Collapse'), position: 'bottom', noArrow: true, offset: 'sm', })` | | |
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
+ | `isFullscreen` | | `boolean` | | Whether the widget is currently in fullscreen mode (read-only).&#xA;Use \`btu-widget-fullscreen-changed\` event to react to changes. | |
37
+
38
+ ### Events
39
+
40
+ | Name | Type | Description | Inherited From |
41
+ | ------------------------------- | ------------------------------------ | ------------------------------------------- | -------------- |
42
+ | `btu-widget-ready` | `CustomEvent` | Fired after first render and redistribution | |
43
+ | `btu-widget-collapse-changed` | `CustomEvent<{collapsed: boolean}>` | Fired when collapsed state changes | |
44
+ | `btu-widget-fullscreen-changed` | `CustomEvent<{fullscreen: boolean}>` | Fired when fullscreen state changes | |
45
+
46
+ ### Attributes
47
+
48
+ | Name | Field | Inherited From |
49
+ | ---------------- | -------------- | -------------- |
50
+ | `heading` | heading | |
51
+ | `collapsible` | collapsible | |
52
+ | `collapsed` | collapsed | |
53
+ | `fullscreenable` | fullscreenable | |
54
+ | `id` | | |
55
+
56
+ ### CSS Properties
57
+
58
+ | Name | Default | Description |
59
+ | --------------------- | ------- | ------------------------------------------------------------- |
60
+ | `--widget-background` | | Body and footer background color (default: --btu-theme-white) |
61
+ | `--widget-border` | | Widget border and dividers (default: 1px solid gray-200) |
62
+ | `--header-background` | | Header background color (default: transparent) |
63
+
64
+ ### Slots
65
+
66
+ | Name | Description |
67
+ | ---------- | ---------------------------------------------------------------------- |
68
+ | | Default pseudo-slot: elements without slot attribute are moved to body |
69
+ | `controls` | Pseudo-slot: buttons/actions moved to header actions area |
70
+ | `footer` | Pseudo-slot: content moved to footer container |
71
+
72
+ <hr/>
73
+
74
+ ## Exports
75
+
76
+ | Kind | Name | Declaration | Module | Package |
77
+ | --------------------------- | ------------ | ----------- | ------------------------------- | ------- |
78
+ | `js` | `default` | Widget | src/components/widget/Widget.ts | |
79
+ | `custom-element-definition` | `btu-widget` | Widget | src/components/widget/Widget.ts | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspot/ui",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "description": "A UI library for building Brightspot CMS components.",
@@ -52,7 +52,6 @@
52
52
  "husky": "^9.1.7",
53
53
  "lint-staged": "^16.2.6",
54
54
  "lit": "^3.3.0",
55
- "loglevel": "^1.8.0",
56
55
  "mini-css-extract-plugin": "^2.6.1",
57
56
  "playwright": "^1.58.2",
58
57
  "postcss-import": "^16.0.0",
@@ -74,6 +73,7 @@
74
73
  },
75
74
  "dependencies": {
76
75
  "broadcast-channel": "^4.13.0",
76
+ "loglevel": "^1.8.0",
77
77
  "lucide-static": "0.508.0",
78
78
  "tabbable": "6.2.0",
79
79
  "tailwindcss": "^3.4.13",
@@ -86,7 +86,8 @@
86
86
  "dist/components/**/*.js"
87
87
  ],
88
88
  "files": [
89
- "dist/**/*"
89
+ "dist/**/*",
90
+ "docs/**/*"
90
91
  ],
91
92
  "lint-staged": {
92
93
  "src/components/**/*.ts": [