@brightspot/ui 6.8.1 → 6.8.3-rc.1

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 (197) hide show
  1. package/CHANGELOG.md +680 -0
  2. package/README.md +18 -2
  3. package/dist/storybook/CHANGELOG.md +680 -0
  4. package/dist/storybook/README.md +195 -0
  5. package/dist/storybook/assets/{ActionBar.stories-BOXYJYXy.js → ActionBar.stories-TlhuCumU.js} +1 -1
  6. package/dist/storybook/assets/{ActionItem-WoDvowFu.js → ActionItem-CjtyGLd5.js} +1 -1
  7. package/dist/storybook/assets/{ActionItem.stories-CVFoWP54.js → ActionItem.stories-BVlNQvfP.js} +1 -1
  8. package/dist/storybook/assets/{AiSparkle.stories-Psv9jNpy.js → AiSparkle.stories-DMzc8JUe.js} +2 -2
  9. package/dist/storybook/assets/{Avatar-CIQcHS8b.js → Avatar-C6Li1sPI.js} +1 -1
  10. package/dist/storybook/assets/{Avatar.stories-BE2Xn8fx.js → Avatar.stories-COj6XrPn.js} +1 -1
  11. package/dist/storybook/assets/{AvatarGroup-Chs0VKPg.js → AvatarGroup-DgxRTZBe.js} +1 -1
  12. package/dist/storybook/assets/{AvatarGroup.stories-2ar6gCeX.js → AvatarGroup.stories-Dh3e7iN2.js} +1 -1
  13. package/dist/storybook/assets/{Badge-AV20mCMJ.js → Badge-bWrvpEgX.js} +1 -1
  14. package/dist/storybook/assets/{Badge.stories-w9LqNw0A.js → Badge.stories-KXpmEXpt.js} +1 -1
  15. package/dist/storybook/assets/{Banner.stories-Clhh1bBs.js → Banner.stories-Cnhm3dXK.js} +1 -1
  16. package/dist/storybook/assets/{Button-B7fn_wd5.js → Button-DE0s-gat.js} +1 -1
  17. package/dist/storybook/assets/{Button.stories-5h4M8nd2.js → Button.stories-Cwg1YZEb.js} +1 -1
  18. package/dist/storybook/assets/{ButtonGroup-BmndBsBy.js → ButtonGroup-CoLI5nGO.js} +1 -1
  19. package/dist/storybook/assets/{ButtonGroup.stories-CR1H4H7u.js → ButtonGroup.stories-VhnKPP1n.js} +1 -1
  20. package/dist/storybook/assets/{Card.stories-Bz5vXq5y.js → Card.stories-BgpL90zB.js} +1 -1
  21. package/dist/storybook/assets/{Celebrate.stories-Bu3CNw0k.js → Celebrate.stories-D3NJgYcX.js} +1 -1
  22. package/dist/storybook/assets/{Checkbox-BALsanB1.js → Checkbox-BC1T_KxW.js} +1 -1
  23. package/dist/storybook/assets/{Checkbox.stories-BdvCht5c.js → Checkbox.stories-AFQNz7dQ.js} +1 -1
  24. package/dist/storybook/assets/{CircularProgress-BeE2fWON.js → CircularProgress-eqVb2jUD.js} +1 -1
  25. package/dist/storybook/assets/{CircularProgress.stories-CL8Lc6eU.js → CircularProgress.stories-B6t8VhmJ.js} +1 -1
  26. package/dist/storybook/assets/{ClipboardMixin-C6wcbXIO.js → ClipboardMixin-DcxrOy5B.js} +1 -1
  27. package/dist/storybook/assets/{ClipboardMixin.stories-BsjzC7wd.js → ClipboardMixin.stories-BqtQMjmS.js} +1 -1
  28. package/dist/storybook/assets/{Color-6BZIO3FS-Dsd6EVV9.js → Color-6BZIO3FS-CDluohEc.js} +1 -1
  29. package/dist/storybook/assets/{Colors.stories-CkCdNN9Y.js → Colors.stories-CqTniDIa.js} +1 -1
  30. package/dist/storybook/assets/{CombinedEffects.stories-QG78pIiG.js → CombinedEffects.stories-FwW0chy5.js} +1 -1
  31. package/dist/storybook/assets/{ComponentStatesMixin-CG-Dx_Vk.js → ComponentStatesMixin-hUqOL2aW.js} +1 -1
  32. package/dist/storybook/assets/{ComponentStatesMixin.stories-B1yuAqua.js → ComponentStatesMixin.stories-CwGoq685.js} +1 -1
  33. package/dist/storybook/assets/{CopyToClipboard.stories-CyKcumJ9.js → CopyToClipboard.stories-DUGjgtQx.js} +1 -1
  34. package/dist/storybook/assets/{Debounce.stories-BuNskQ33.js → Debounce.stories-CrWfXhKS.js} +1 -1
  35. package/dist/storybook/assets/{DocsRenderer-LL677BLK-BrPyc8XX.js → DocsRenderer-LL677BLK-9e51z9Xc.js} +3 -3
  36. package/dist/storybook/assets/{Dropdown.stories-DHXeP07z.js → Dropdown.stories-BsBxV0wp.js} +1 -1
  37. package/dist/storybook/assets/{DropdownMenu-WoWnJiQk.js → DropdownMenu-B-LvOIGj.js} +1 -1
  38. package/dist/storybook/assets/{EmptyState.stories-BRoVusey.js → EmptyState.stories-CJ1w8Tp2.js} +1 -1
  39. package/dist/storybook/assets/{EscaAvatar.stories-CWAE-4Uz.js → EscaAvatar.stories-BoLLSj9q.js} +2 -2
  40. package/dist/storybook/assets/{Events.stories-D-npDwlx.js → Events.stories-C3sTBwPJ.js} +1 -1
  41. package/dist/storybook/assets/{Heading.stories-D7hmvFEN.js → Heading.stories-jmXDRBmM.js} +1 -1
  42. package/dist/storybook/assets/{HueRipple.stories-Dx3ozdHi.js → HueRipple.stories-BPx5aSYd.js} +1 -1
  43. package/dist/storybook/assets/{Icon-DPQKiWDz.js → Icon-CWyJRQf7.js} +1 -1
  44. package/dist/storybook/assets/{Icon.stories-CVsQvcwd.js → Icon.stories-iYBxmv2x.js} +1 -1
  45. package/dist/storybook/assets/{IconButton-Dp4Z06bL.js → IconButton-Di5Rgs7F.js} +1 -1
  46. package/dist/storybook/assets/{IconButton.stories-DTbfHfcQ.js → IconButton.stories-DENLoxVk.js} +1 -1
  47. package/dist/storybook/assets/{LinearProgress-DG3tPlGH.js → LinearProgress-D9ngIVlv.js} +1 -1
  48. package/dist/storybook/assets/{LinearProgress.stories-VIU6OqYd.js → LinearProgress.stories-u90B_VJR.js} +1 -1
  49. package/dist/storybook/assets/{Message-BzkpGg8z.js → Message-nFAa55c_.js} +1 -1
  50. package/dist/storybook/assets/{Message.stories-C9bzoQes.js → Message.stories-B4rpz5rI.js} +1 -1
  51. package/dist/storybook/assets/{OnFindMixin-CeeYfx9k.js → OnFindMixin-oL1bvTFj.js} +1 -1
  52. package/dist/storybook/assets/{OnFindMixin.stories-Dq06nuVf.js → OnFindMixin.stories-CdeS5sFA.js} +1 -1
  53. package/dist/storybook/assets/{Pagination-CnWa6AX5.js → Pagination-CSWcjuDU.js} +1 -1
  54. package/dist/storybook/assets/{Pagination.stories-BsH2eN2W.js → Pagination.stories-Da2WzJkv.js} +1 -1
  55. package/dist/storybook/assets/{Popover.stories-CLnzpgEE.js → Popover.stories-CVljlVHc.js} +1 -1
  56. package/dist/storybook/assets/{ProgressMixin-D1atDw3n.js → ProgressMixin-CeSrn0_P.js} +1 -1
  57. package/dist/storybook/assets/{Radio-B6Aq6K0V.js → Radio-rvfGhZwK.js} +1 -1
  58. package/dist/storybook/assets/{Radio.stories-BCVbISmb.js → Radio.stories-B0wHdJuc.js} +1 -1
  59. package/dist/storybook/assets/{RadioGroup.stories-B-TGP_-v.js → RadioGroup.stories-D8krOSlP.js} +1 -1
  60. package/dist/storybook/assets/{ReadyMixin-C8HW2nGE.js → ReadyMixin-CvX_eidU.js} +1 -1
  61. package/dist/storybook/assets/{RovingTabindexMixin-DI5rmyR7.js → RovingTabindexMixin-9z8lwaM9.js} +1 -1
  62. package/dist/storybook/assets/{RovingTabindexMixin.stories-DVKCC_R7.js → RovingTabindexMixin.stories-Y8vBWjJp.js} +1 -1
  63. package/dist/storybook/assets/{Rtc.stories-bBYHOszW.js → Rtc.stories-D3Y-z8y_.js} +1 -1
  64. package/dist/storybook/assets/{ScrollShadow.stories-BIK8YINt.js → ScrollShadow.stories-1KD0lWHX.js} +1 -1
  65. package/dist/storybook/assets/{Switch.stories-COEk74kM.js → Switch.stories-Bsqvm_HE.js} +1 -1
  66. package/dist/storybook/assets/{Tab.stories-Dbt9JvSx.js → Tab.stories-CzcTisNs.js} +1 -1
  67. package/dist/storybook/assets/{Tabs-BIScOPS0.js → Tabs-DdpYNZSW.js} +1 -1
  68. package/dist/storybook/assets/{Tabs.stories-CodKgVf2.js → Tabs.stories-UOS3V0J4.js} +1 -1
  69. package/dist/storybook/assets/{Throttle.stories-BhIqWWrQ.js → Throttle.stories-C8jgzh6e.js} +1 -1
  70. package/dist/storybook/assets/{Tooltip.stories-DKD8nBM1.js → Tooltip.stories-B5BoI0cH.js} +1 -1
  71. package/dist/storybook/assets/{TooltipMixin-CRNNusJ7.js → TooltipMixin-CVKslCDt.js} +1 -1
  72. package/dist/storybook/assets/{Upload.stories-WTO15ST1.js → Upload.stories-BsQDCDqo.js} +1 -1
  73. package/dist/storybook/assets/{UploadItem-DejgZ5A0.js → UploadItem-CYQqNwUF.js} +1 -1
  74. package/dist/storybook/assets/{UploadItem.stories-Pk3ghOcI.js → UploadItem.stories-_le7XBTV.js} +1 -1
  75. package/dist/storybook/assets/{Welcome.stories-DrNnxvt9.js → Welcome.stories-rramKkhd.js} +33 -3
  76. package/dist/storybook/assets/{Widget.stories-CYC5Qdac.js → Widget.stories-DtbAaklk.js} +1 -1
  77. package/dist/storybook/assets/{WithTooltip-65CFNBJE-DK6PZNaa.js → WithTooltip-65CFNBJE-DK6GcBuR.js} +1 -1
  78. package/dist/storybook/assets/{blocks-Dzcxb014.js → blocks-DHnzPh43.js} +5 -5
  79. package/dist/storybook/assets/{formatter-EIJCOSYU-PioIuXjk.js → formatter-EIJCOSYU-qig-qWlG.js} +1 -1
  80. package/dist/storybook/assets/if-defined-DerKRcyC.js +1 -0
  81. package/dist/storybook/assets/{iframe-Byo_x5o2.js → iframe-DlBK9Drk.js} +3 -3
  82. package/dist/storybook/assets/{index-gox-Wle0.js → index-CItQyB37.js} +1 -1
  83. package/dist/storybook/assets/{lottie_svg-3t2UJxjZ.js → lottie_svg-C3v6xdng.js} +1 -1
  84. package/dist/storybook/assets/{onFind-BWiaccUj.js → onFind-Ci35eu2y.js} +1 -1
  85. package/dist/storybook/assets/{onFind.stories-CC_XTN2G.js → onFind.stories-BmbwWWo1.js} +1 -1
  86. package/dist/storybook/assets/{onRemove.stories-CXxpL4ud.js → onRemove.stories-DFWCIgE4.js} +1 -1
  87. package/dist/storybook/assets/{onVisible.stories-DKA9cexx.js → onVisible.stories-B-onpgE-.js} +1 -1
  88. package/dist/storybook/assets/{property-_few0Xe5.js → property-Bmq4RTSP.js} +1 -1
  89. package/dist/storybook/assets/{ref-BaIdO8Sk.js → ref-BhKk4SDh.js} +1 -1
  90. package/dist/storybook/assets/state-DVIUS0Gf.js +1 -0
  91. package/dist/storybook/assets/{style-map-DxZm5Cj7.js → style-map-DE4G47KD.js} +1 -1
  92. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-B0_bSGZz.js → syntaxhighlighter-ED5Y7EFY-Dfgnal1d.js} +1 -1
  93. package/dist/storybook/custom-elements.json +11835 -0
  94. package/dist/storybook/docs/components/ActionBar.md +55 -0
  95. package/dist/storybook/docs/components/ActionItem.md +50 -0
  96. package/dist/storybook/docs/components/AiSparkle.md +33 -0
  97. package/dist/storybook/docs/components/Avatar.md +45 -0
  98. package/dist/storybook/docs/components/AvatarGroup.md +34 -0
  99. package/dist/storybook/docs/components/Badge.md +47 -0
  100. package/dist/storybook/docs/components/Banner.md +35 -0
  101. package/dist/storybook/docs/components/ButtonGroup.md +65 -0
  102. package/dist/storybook/docs/components/Card.md +67 -0
  103. package/dist/storybook/docs/components/Checkbox.md +49 -0
  104. package/dist/storybook/docs/components/CircularProgress.md +40 -0
  105. package/dist/storybook/docs/components/CopyToClipboard.md +51 -0
  106. package/dist/storybook/docs/components/Dropdown.md +74 -0
  107. package/dist/storybook/docs/components/DropdownItem.md +45 -0
  108. package/dist/storybook/docs/components/DropdownMenu.md +41 -0
  109. package/dist/storybook/docs/components/EmptyState.md +62 -0
  110. package/dist/storybook/docs/components/EscaAvatar.md +40 -0
  111. package/dist/storybook/docs/components/Icon.md +40 -0
  112. package/dist/storybook/docs/components/IconButton.md +36 -0
  113. package/dist/storybook/docs/components/LinearProgress.md +37 -0
  114. package/dist/storybook/docs/components/Message.md +50 -0
  115. package/dist/storybook/docs/components/Pagination.md +70 -0
  116. package/dist/storybook/docs/components/Popover.md +59 -0
  117. package/dist/storybook/docs/components/README.md +48 -0
  118. package/dist/storybook/docs/components/Radio.md +55 -0
  119. package/dist/storybook/docs/components/RadioGroup.md +34 -0
  120. package/dist/storybook/docs/components/Switch.md +48 -0
  121. package/dist/storybook/docs/components/Tab.md +40 -0
  122. package/dist/storybook/docs/components/Tabs.md +49 -0
  123. package/dist/storybook/docs/components/Upload.md +63 -0
  124. package/dist/storybook/docs/components/UploadItem.md +30 -0
  125. package/dist/storybook/docs/components/Widget.md +88 -0
  126. package/dist/storybook/docs/dari-elements.md +55 -0
  127. package/dist/storybook/iframe.html +1 -1
  128. package/dist/storybook/index.html +29 -2
  129. package/dist/storybook/llms-full.txt +1721 -0
  130. package/dist/storybook/llms.txt +65 -0
  131. package/dist/storybook/project.json +1 -1
  132. package/dist/storybook/robots.txt +7 -0
  133. package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +1 -1
  134. package/dist/storybook/sitemap.xml +90 -0
  135. package/docs/components/ActionBar.md +41 -64
  136. package/docs/components/ActionItem.md +50 -96
  137. package/docs/components/AiSparkle.md +23 -60
  138. package/docs/components/Avatar.md +45 -88
  139. package/docs/components/AvatarGroup.md +24 -44
  140. package/docs/components/Badge.md +34 -62
  141. package/docs/components/Banner.md +25 -39
  142. package/docs/components/ButtonGroup.md +65 -99
  143. package/docs/components/Card.md +67 -83
  144. package/docs/components/Checkbox.md +49 -91
  145. package/docs/components/CircularProgress.md +40 -84
  146. package/docs/components/CopyToClipboard.md +35 -40
  147. package/docs/components/Dropdown.md +74 -120
  148. package/docs/components/DropdownItem.md +45 -81
  149. package/docs/components/DropdownMenu.md +30 -70
  150. package/docs/components/EmptyState.md +45 -62
  151. package/docs/components/EscaAvatar.md +30 -61
  152. package/docs/components/Icon.md +29 -62
  153. package/docs/components/IconButton.md +36 -83
  154. package/docs/components/LinearProgress.md +28 -70
  155. package/docs/components/Message.md +38 -63
  156. package/docs/components/Pagination.md +70 -100
  157. package/docs/components/Popover.md +46 -79
  158. package/docs/components/README.md +34 -40
  159. package/docs/components/Radio.md +55 -105
  160. package/docs/components/RadioGroup.md +26 -55
  161. package/docs/components/Switch.md +48 -84
  162. package/docs/components/Tab.md +30 -70
  163. package/docs/components/Tabs.md +49 -86
  164. package/docs/components/Upload.md +63 -112
  165. package/docs/components/UploadItem.md +22 -53
  166. package/docs/components/Widget.md +66 -67
  167. package/llms.txt +63 -0
  168. package/package.json +8 -6
  169. package/src/legacy/tool-ui/src/Avatar.css +9 -0
  170. package/src/legacy/tool-ui/src/ContentInputGroup.css +12 -0
  171. package/src/legacy/tool-ui/src/ContentSummary.css +11 -1
  172. package/src/legacy/tool-ui/src/ContentSummary.ts +24 -0
  173. package/src/legacy/tool-ui/src/Dialog.css +15 -4
  174. package/src/legacy/tool-ui/src/Diff.css +16 -0
  175. package/src/legacy/tool-ui/src/Diff.ts +76 -45
  176. package/src/legacy/tool-ui/src/MenuView.css +9 -4
  177. package/src/legacy/tool-ui/src/ProseMirrorEnhancementMenu.css +9 -1
  178. package/src/legacy/tool-ui/src/SearchResult.css +3 -3
  179. package/src/legacy/tool-ui/src/TimedContent.css +5 -1
  180. package/src/legacy/tool-ui/src/ViewPreview.css +11 -0
  181. package/src/legacy/tool-ui/src/ViewWatchers.css +1 -1
  182. package/src/legacy/tool-ui/src/Viewers.css +10 -1
  183. package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.bad66c5f4a7498accca1.js +504 -0
  184. package/src/legacy/tool-ui/src/main/webapp/dist/v4.0cdcad634e3e9cc66dd3.css +3 -0
  185. package/src/legacy/tool-ui/src/main/webapp/dist/{v4.5311585e2e77268a6386.js → v4.fe59d96d43251aa03766.js} +5 -5
  186. package/src/legacy/tool-ui/src/main/webapp/dist/v5.268d53cadab4ed4b68a8.css +140 -0
  187. package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c96a164f24a2a102bde0.js → v5.3eb7662648c301f10aff.js} +5 -5
  188. package/src/legacy/tool-ui/src/main/webapp/v4/Diff.less +17 -0
  189. package/src/legacy/tool-ui/src/v5.ts +6 -0
  190. package/dist/storybook/assets/if-defined-DL7cQU7O.js +0 -1
  191. package/dist/storybook/assets/state-BBcPmYaV.js +0 -1
  192. package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.8773fe3756519d83608e.js +0 -504
  193. package/src/legacy/tool-ui/src/main/webapp/dist/v4.19a7871e6043c2ea6433.css +0 -3
  194. package/src/legacy/tool-ui/src/main/webapp/dist/v5.990bf181d01e0cbb18e8.css +0 -140
  195. /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.8773fe3756519d83608e.js.LICENSE.txt → RTEProseMirror.bad66c5f4a7498accca1.js.LICENSE.txt} +0 -0
  196. /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.5311585e2e77268a6386.js.LICENSE.txt → v4.fe59d96d43251aa03766.js.LICENSE.txt} +0 -0
  197. /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c96a164f24a2a102bde0.js.LICENSE.txt → v5.3eb7662648c301f10aff.js.LICENSE.txt} +0 -0
@@ -1,112 +1,63 @@
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.&#xA;Client-side filter only — the browser's file picker uses this as a hint,&#xA;and drag-drop is enforced by this component. Server-side validation is&#xA;still required.&#xA;&#xA;Supported forms (comma-separated, any combination):&#xA;- \`image/\*\` — MIME wildcard (any image)&#xA;- \`application/pdf\` — exact MIME type&#xA;- \`.pdf\`, \`.docx\` — file extension (case-insensitive)&#xA;&#xA;Examples:&#xA;- \`accept="image/\*"\` — any image&#xA;- \`accept="image/\*,application/pdf"\` — images and PDFs&#xA;- \`accept=".jpg,.jpeg,.png,.heic"\` — specific extensions&#xA;- \`accept=""\` (or omitted) — allow all&#xA;&#xA;Note: users can bypass the file picker's filter (most browsers offer an&#xA;"All Files" option), so this attribute is a UX filter, not a security&#xA;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.&#xA;\`max-files="1"\` enters single-file mode (selecting a new file replaces the existing one).&#xA;\`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.&#xA;Clamps value to 0-100 and coerces non-finite inputs to 0. Announces milestones&#xA;(25%, 50%, 75%) to screen readers; 100% completion is announced by setFileStatus('complete').&#xA;&#xA;Status transitions:&#xA;- \`pending\` → \`uploading\` (auto — first progress report starts the upload)&#xA;- \`uploading\` → \`uploading\` (progress updates)&#xA;- \`error\` → \`error\` (progress updates only; status is preserved so a stale late&#xA; callback can't wipe the error UI. To recover from error, call&#xA; \`setFileStatus(id, 'uploading')\` first, then report progress.)&#xA;- \`complete\` → ignored (terminal state) | `id: string, percent: number` | `void` | |
56
- | `setFileStatus` | | Set the status of a file.&#xA;Valid statuses: 'uploading', 'complete', 'error'. For 'error' status, an&#xA;optional message can be provided.&#xA;&#xA;Transitions from 'complete' are rejected (terminal state) — a late-resolving&#xA;XHR cannot overwrite a prior success. Rejected calls emit \`btu-upload-api-error\`&#xA;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.&#xA;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.&#xA;&#xA;All events are configured with:&#xA;- bubbles: true (event propagates up the DOM tree)&#xA;- cancelable: false (event cannot be cancelled)&#xA;- 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 | |
1
+ # `<btu-upload>`
2
+
3
+ A file upload component with drop zone and file list.
4
+
5
+ The component is presentation + file-selection only. It handles file browsing,
6
+ drag-and-drop reception, client-side validation, and rendering the file list
7
+ with progress bars. It does not perform network requests — the consumer listens
8
+ for events, performs their own upload, and drives state back via imperative methods.
9
+
10
+ ```js
11
+ import '@brightspot/ui/components/upload/Upload.js'
12
+ ```
13
+
14
+ Interactive examples: https://ui.brightspot.com/?path=/docs/components-upload--docs
15
+
16
+ ## Attributes
17
+
18
+ | Attribute | Property | Type | Default | Description |
19
+ | --- | --- | --- | --- | --- |
20
+ | `accept` | `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. |
21
+ | `max-file-size` | `maxFileSize` | `number` | `0` | Maximum file size in bytes. Files exceeding this are rejected. 0 means unlimited. |
22
+ | `max-files` | `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. |
23
+ | `disabled` | `disabled` | `boolean` | `false` | Disables all interaction — file selection, drag-and-drop, and action buttons. |
24
+ | `no-drag` | `noDrag` | `boolean` | `false` | Disables drag-and-drop. File selection via click still works. |
25
+
26
+ ## Methods
27
+
28
+ | Method | Description |
29
+ | --- | --- |
30
+ | `setFileProgress(id: string, percent: number): void` | 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) |
31
+ | `setFileStatus(id: string, status: FileStatusSettable, message?: string): void` | 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'. |
32
+ | `setFileSymbol(id: string, symbol: string): void` | Override the icon symbol for a file. |
33
+ | `removeFile(id: string): void` | Remove a file programmatically. Fires `btu-upload-file-removed`. |
34
+ | `getFiles(): readonly FileState[]` | Get a snapshot of all current files and their states. States are readonly; mutations on the returned array's elements are ineffective. |
35
+
36
+ ## Events
37
+
38
+ | Event | Detail | Description |
39
+ | --- | --- | --- |
40
+ | `btu-upload-ready` | `unknown` | Fired when the component has completed first render |
41
+ | `btu-upload-file-added` | `{id: string, file: File}` | Fired when a file passes validation and is added |
42
+ | `btu-upload-file-removed` | `{id: string, file: File}` | Fired when a file is removed (user action, programmatic, or on disconnect for in-flight uploads) |
43
+ | `btu-upload-file-retry` | `{id: string, file: File}` | Fired when user clicks "Try again" on a failed upload |
44
+ | `btu-upload-file-rejected` | `{file: File, reason: 'type' \| 'size' \| 'count'}` | Fired when a file fails client-side validation or the queue is full |
45
+ | `btu-upload-file-completed` | `{id: string, file: File}` | Fired when a file's status transitions into 'complete' |
46
+ | `btu-upload-api-error` | `{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 |
47
+
48
+ ## CSS custom properties
49
+
50
+ | Property | Description |
51
+ | --- | --- |
52
+ | `--upload-dropzone-bg` | Drop zone background color (default: gray-25) |
53
+ | `--upload-dropzone-border-color` | Drop zone border color (default: gray-300; gray-200 when disabled, gray-400 in high-contrast) |
54
+ | `--upload-dropzone-border-radius` | Drop zone border radius (default: borderRadius.lg) |
55
+ | `--upload-dropzone-hover-bg` | Drop zone hover background (hover default: gray-50; drag-over default: primary-25) |
56
+ | `--upload-dropzone-hover-border-color` | Drop zone hover/focus border color (default: primary-300; drag-over uses primary-400) |
57
+ | `--upload-dropzone-focus-ring-color` | Drop zone focus ring color (default: primary-100) |
58
+ | `--upload-item-bg` | Item background color (default: white) |
59
+ | `--upload-item-border-color` | Item border color (default: gray-200) |
60
+ | `--upload-item-active-border-color` | Item active/in-progress border (default: gray-300) |
61
+ | `--upload-item-complete-border-color` | Item completed border color (default: primary-500) |
62
+ | `--upload-item-error-bg` | Item error background (default: error-25) |
63
+ | `--upload-item-error-border-color` | Item error border color (default: error-300) |
@@ -1,61 +1,30 @@
1
- # `src/components/upload/UploadItem.ts`:
1
+ # `<btu-upload-item>`
2
2
 
3
- ## class: `UploadItem`, `btu-upload-item`
3
+ Internal upload item sub-component for displaying individual file upload state.
4
4
 
5
- ### Superclass
5
+ This component is not part of the public API — consumers should not create,
6
+ query, or modify items directly. All interaction goes through `btu-upload` methods.
6
7
 
7
- | Name | Module | Package |
8
- | ------------ | ------ | ------- |
9
- | `LitElement` | | lit |
8
+ ```js
9
+ import '@brightspot/ui/components/upload/UploadItem.js'
10
+ ```
10
11
 
11
- ### Mixins
12
+ Interactive examples: https://ui.brightspot.com/?path=/docs/components-upload-upload-item--docs
12
13
 
13
- | Name | Module | Package |
14
- | ------------------- | ------------------------------ | ------- |
15
- | `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
16
- | `ReadyMixin` | /src/util/ReadyMixin.js | |
14
+ ## Events
17
15
 
18
- ### Fields
16
+ | Event | Detail | Description |
17
+ | --- | --- | --- |
18
+ | `btu-upload-item-remove` | `{id: string}` | Fired when remove button is clicked |
19
+ | `btu-upload-item-retry` | `{id: string}` | Fired when retry link is clicked |
19
20
 
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 | | | | |
21
+ ## CSS custom properties
26
22
 
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.&#xA;&#xA;All events are configured with:&#xA;- bubbles: true (event propagates up the DOM tree)&#xA;- cancelable: false (event cannot be cancelled)&#xA;- 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 | |
23
+ | Property | Description |
24
+ | --- | --- |
25
+ | `--upload-item-bg` | Item background color (default: white) |
26
+ | `--upload-item-border-color` | Item border color (default: gray-200) |
27
+ | `--upload-item-active-border-color` | Item active/in-progress border (default: gray-300) |
28
+ | `--upload-item-complete-border-color` | Item completed border color (default: primary-500) |
29
+ | `--upload-item-error-bg` | Item error background (default: error-25) |
30
+ | `--upload-item-error-border-color` | Item error border color (default: error-300) |
@@ -1,89 +1,88 @@
1
- # `src/components/widget/Widget.ts`:
1
+ # `<btu-widget>`
2
2
 
3
- ## class: `Widget`, `btu-widget`
3
+ A widget component for displaying content with header, body, and footer sections.
4
4
 
5
- ### Superclass
5
+ ## Architecture: Light DOM + Manager Pattern
6
6
 
7
- | Name | Module | Package |
8
- | ------------ | ------ | ------- |
9
- | `LitElement` | | lit |
7
+ This component uses **Light DOM** (no Shadow Root) with the **Manager Pattern**:
8
+ - User-provided children are physically moved into internal containers
9
+ - Movement is based on `slot` attributes (pseudo-slots)
10
+ - The `onFind` utility automatically redistributes dynamically-added content
10
11
 
11
- ### Mixins
12
+ ### Node Redistribution Rules
13
+ - `slot="controls"` → Moved to header actions area (before system buttons)
14
+ - `slot="footer"` → Moved to footer container
15
+ - *(no slot)* → Moved to body container (default)
12
16
 
13
- | Name | Module | Package |
14
- | ------------------- | ------------------------------ | ------- |
15
- | `EventEmitterMixin` | /src/util/EventEmitterMixin.js | |
16
- | `OnFindMixin` | /src/util/OnFindMixin.js | |
17
- | `ReadyMixin` | /src/util/ReadyMixin.js | |
17
+ ## Features
18
18
 
19
- ### Static Fields
19
+ - **Collapsible**: Optional chevron toggle to hide/show body and footer
20
+ - **Fullscreen**: Optional maximize button for fullscreen mode via `:state(fullscreen)` custom state
21
+ - **Dynamic Content**: `onFind` handles content added after initialization
22
+ - **Accessible**: Full ARIA support and keyboard navigation
23
+ - **Themeable**: CSS custom properties for colors and spacing
20
24
 
21
- | Name | Privacy | Type | Default | Description | Inherited From |
22
- | ------------ | ------- | -------- | ------- | ----------- | -------------- |
23
- | `_idCounter` | private | `number` | `0` | | |
25
+ ## Accessibility
24
26
 
25
- ### Fields
27
+ - **Collapse toggle**: `aria-expanded`, `aria-controls`, `aria-label`
28
+ - **Fullscreen toggle**: `aria-pressed`, `aria-label`
29
+ - **Body region**: `role="region"`, `aria-labelledby` linking to heading
30
+ - **Tab order**: Natural flow via physical DOM placement
31
+ - **Collapsed content**: Hidden via `inert` attribute and CSS grid collapse
26
32
 
27
- | Name | Privacy | Type | Default | Description | Inherited From |
28
- | -------------------- | ------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
29
- | `_internals` | private | | | | |
30
- | `heading` | | `string` | `''` | Heading text displayed in the header. | |
31
- | `collapsible` | | `boolean` | `false` | Whether the widget can be collapsed/expanded.&#xA;When true, a chevron toggle button appears in the header. | |
32
- | `collapsed` | | `boolean` | `false` | Whether the widget is currently collapsed.&#xA;When true, body and footer are hidden. Implies collapsible. | |
33
- | `fullscreenable` | | `boolean` | `false` | Whether the widget can enter fullscreen mode.&#xA;When true, a fullscreen toggle button appears in the header. | |
34
- | `_isFullscreen` | private | `boolean` | `false` | | |
35
- | `_collapseTooltip` | private | | `new TooltipController(this, { target: 'button[data-tooltip="collapse"]', text: () => (this.collapsed ? 'Expand' : 'Collapse'), position: 'bottom', noArrow: true, offset: 'sm', })` | | |
36
- | `_fullscreenTooltip` | private | | `new TooltipController(this, { target: 'button[data-tooltip="fullscreen"]', text: () => (this._isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'), position: 'bottom', noArrow: true, offset: 'sm', })` | | |
37
- | `isFullscreen` | | `boolean` | | Whether the widget is currently in fullscreen mode (read-only).&#xA;Use \`btu-widget-fullscreen-changed\` event to react to changes. | |
38
- | `#stopFns` | private | `Array<() => void>` | `[]` | | OnFindMixin |
33
+ ```js
34
+ import '@brightspot/ui/components/widget/Widget.js'
35
+ ```
39
36
 
40
- ### Methods
37
+ The CMS page defines this element itself, so a plugin can use it there without the import.
41
38
 
42
- | Name | Privacy | Description | Parameters | Return | Inherited From |
43
- | -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- | ----------------- |
44
- | `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.&#xA;&#xA;All events are configured with:&#xA;- bubbles: true (event propagates up the DOM tree)&#xA;- cancelable: false (event cannot be cancelled)&#xA;- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
45
- | `onFindRegistration` | | | | `OnFindRegistration \| OnFindRegistration[] \| null` | OnFindMixin |
46
- | `#armFind` | private | | | | OnFindMixin |
39
+ Interactive examples: https://ui.brightspot.com/?path=/docs/components-widget--docs
47
40
 
48
- ### Events
41
+ ## Attributes
49
42
 
50
- | Name | Type | Description | Inherited From |
51
- | ------------------------------- | ------------------------------------ | ------------------------------------------- | -------------- |
52
- | `btu-widget-ready` | `CustomEvent` | Fired after first render and redistribution | |
53
- | `btu-widget-collapse-changed` | `CustomEvent<{collapsed: boolean}>` | Fired when collapsed state changes | |
54
- | `btu-widget-fullscreen-changed` | `CustomEvent<{fullscreen: boolean}>` | Fired when fullscreen state changes | |
43
+ | Attribute | Property | Type | Default | Description |
44
+ | --- | --- | --- | --- | --- |
45
+ | `heading` | `heading` | `string` | `''` | Heading text displayed in the header. |
46
+ | `collapsible` | `collapsible` | `boolean` | `false` | Whether the widget can be collapsed/expanded. When true, a chevron toggle button appears in the header. |
47
+ | `collapsed` | `collapsed` | `boolean` | `false` | Whether the widget is currently collapsed. When true, body and footer are hidden. Implies collapsible. |
48
+ | `fullscreenable` | `fullscreenable` | `boolean` | `false` | Whether the widget can enter fullscreen mode. When true, a fullscreen toggle button appears in the header. |
55
49
 
56
- ### Attributes
50
+ ## Properties
57
51
 
58
- | Name | Field | Inherited From |
59
- | ---------------- | -------------- | -------------- |
60
- | `heading` | heading | |
61
- | `collapsible` | collapsible | |
62
- | `collapsed` | collapsed | |
63
- | `fullscreenable` | fullscreenable | |
52
+ These have no attribute; set them from JavaScript.
64
53
 
65
- ### CSS Properties
54
+ | Property | Type | Default | Description |
55
+ | --- | --- | --- | --- |
56
+ | `isFullscreen` (read-only) | `boolean` | | Whether the widget is currently in fullscreen mode (read-only). Use `btu-widget-fullscreen-changed` event to react to changes. |
66
57
 
67
- | Name | Default | Description |
68
- | ----------------------- | ------- | ------------------------------------------------------------- |
69
- | `--widget-background` | | Body and footer background color (default: --btu-theme-white) |
70
- | `--widget-border` | | Widget border and dividers (default: 1px solid gray-200) |
71
- | `--widget-border-color` | | Color of header bottom divider (default: gray-200) |
72
- | `--header-background` | | Header background color (default: transparent) |
58
+ ## Events
73
59
 
74
- ### Slots
60
+ | Event | Detail | Description |
61
+ | --- | --- | --- |
62
+ | `btu-widget-ready` | | Fired after first render and redistribution |
63
+ | `btu-widget-collapse-changed` | `{collapsed: boolean}` | Fired when collapsed state changes |
64
+ | `btu-widget-fullscreen-changed` | `{fullscreen: boolean}` | Fired when fullscreen state changes |
75
65
 
76
- | Name | Description |
77
- | ---------- | ---------------------------------------------------------------------- |
78
- | | Default pseudo-slot: elements without slot attribute are moved to body |
79
- | `controls` | Pseudo-slot: buttons/actions moved to header actions area |
80
- | `footer` | Pseudo-slot: content moved to footer container |
66
+ ## Slots
81
67
 
82
- <hr/>
68
+ | Slot | Description |
69
+ | --- | --- |
70
+ | (default) | Default pseudo-slot: elements without slot attribute are moved to body |
71
+ | `controls` | Pseudo-slot: buttons/actions moved to header actions area |
72
+ | `footer` | Pseudo-slot: content moved to footer container |
83
73
 
84
- ## Exports
74
+ ## CSS custom properties
85
75
 
86
- | Kind | Name | Declaration | Module | Package |
87
- | --------------------------- | ------------ | ----------- | ------------------------------- | ------- |
88
- | `js` | `default` | Widget | src/components/widget/Widget.ts | |
89
- | `custom-element-definition` | `btu-widget` | Widget | src/components/widget/Widget.ts | |
76
+ | Property | Description |
77
+ | --- | --- |
78
+ | `--widget-background` | Body and footer background color (default: --btu-theme-white) |
79
+ | `--widget-border` | Widget border and dividers (default: 1px solid gray-200) |
80
+ | `--widget-border-color` | Color of header bottom divider (default: gray-200) |
81
+ | `--header-background` | Header background color (default: transparent) |
82
+
83
+ ## CSS states
84
+
85
+ | State | Description |
86
+ | --- | --- |
87
+ | `:state(collapsed)` | Applied when the widget is collapsed, targetable via :state(collapsed) |
88
+ | `:state(fullscreen)` | Applied when the widget is in fullscreen mode, targetable via :state(fullscreen) |
package/llms.txt ADDED
@@ -0,0 +1,63 @@
1
+ # Brightspot UI
2
+
3
+ > `@brightspot/ui`: Lit web components (`btu-*` tags) and a TailwindCSS v3 preset for building Brightspot CMS screens and plugins.
4
+
5
+ This file describes the version in the `package.json` next to it. Prefer these docs over what you remember about this library, because component APIs change between minor versions.
6
+
7
+ Components render in the light DOM, not a shadow root. In HTML, use the attribute names from each component page: many differ from the JavaScript property names, for example `heading-level` for `headingLevel`.
8
+
9
+ The guide and component pages linked below are markdown.
10
+
11
+ ## Getting started
12
+
13
+ - [README](README.md): install, the Tailwind preset and importing components
14
+ - [Using components in a CMS plugin](docs/components/README.md): the CMS defines only `btu-badge`, `btu-copy-to-clipboard`, `btu-icon` and `btu-widget`; import every other element you use
15
+ - [Rendering components from Java](docs/dari-elements.md): the generated `com.brightspot.ui.dari` classes
16
+
17
+ ## Components
18
+
19
+ - [`<btu-action-bar>`](docs/components/ActionBar.md): A persistent container for primary, secondary, tertiary, and destructive actions within an interface, typically anchored to the bottom of a view
20
+ - [`<btu-action-item>`](docs/components/ActionItem.md): An action item button for use within `btu-action-bar`
21
+ - [`<btu-ai-sparkle>`](docs/components/AiSparkle.md): The animated AI-branding sparkle
22
+ - [`<btu-avatar>`](docs/components/Avatar.md): An avatar component for displaying user profile images with fallback support
23
+ - [`<btu-avatar-group>`](docs/components/AvatarGroup.md): A container component for grouping multiple avatars with consistent styling
24
+ - [`<btu-badge>`](docs/components/Badge.md): A badge component for highlighting important information
25
+ - [`<btu-banner>`](docs/components/Banner.md): A full-width container that pins a `<btu-message>` to the top of the CMS or a content edit page
26
+ - [`<btu-button-group>`](docs/components/ButtonGroup.md): A semantic container for grouping related buttons together
27
+ - [`<btu-card>`](docs/components/Card.md): A flexible content container for presenting and organizing information
28
+ - [`<btu-checkbox>`](docs/components/Checkbox.md): A checkbox component for selecting one or more options from a set
29
+ - [`<btu-circular-progress>`](docs/components/CircularProgress.md): A circular progress indicator for showing loading states or progress
30
+ - [`<btu-copy-to-clipboard>`](docs/components/CopyToClipboard.md): A button component that copies text to the system clipboard
31
+ - [`<btu-dropdown>`](docs/components/Dropdown.md): A dropdown component that renders a trigger button and manages a floating panel containing a `btu-dropdown-menu`
32
+ - [`<btu-dropdown-item>`](docs/components/DropdownItem.md): A menu item component for use inside `btu-dropdown-menu`
33
+ - [`<btu-dropdown-menu>`](docs/components/DropdownMenu.md): A menu container component that provides keyboard navigation and ARIA menu semantics
34
+ - [`<btu-empty-state>`](docs/components/EmptyState.md): An empty state component for displaying placeholder content when no data is available
35
+ - [`<btu-esca-avatar>`](docs/components/EscaAvatar.md): The animated avatar for the Esca AI assistant, driven entirely by its `state` attribute so the same element works wherever the assistant appears
36
+ - [`<btu-icon>`](docs/components/Icon.md): An icon component for displaying Lucide icons
37
+ - [`<btu-icon-button>`](docs/components/IconButton.md): Surfaces the different actions someone can perform in an interface where space is limited
38
+ - [`<btu-linear-progress>`](docs/components/LinearProgress.md): A horizontal linear progress bar for showing task completion
39
+ - [`<btu-message>`](docs/components/Message.md): A message for communicating high-visibility content that is not tied to the user's current task — alerts, breaking news, and persistent status
40
+ - [`<btu-pagination>`](docs/components/Pagination.md): A pagination component for navigating through paged content
41
+ - [`<btu-popover>`](docs/components/Popover.md): A popover component for displaying rich interactive content anchored to a trigger element
42
+ - [`<btu-radio>`](docs/components/Radio.md): A single radio option, selectable from a set of mutually exclusive choices
43
+ - [`<btu-radio-group>`](docs/components/RadioGroup.md): A container that groups `btu-radio` options into a single-select control
44
+ - [`<btu-switch>`](docs/components/Switch.md): A toggle switch component for binary on/off states
45
+ - [`<btu-tab>`](docs/components/Tab.md): An individual tab within a tab group
46
+ - [`<btu-tabs>`](docs/components/Tabs.md): A container component for managing a group of tabs
47
+ - [`<btu-upload>`](docs/components/Upload.md): A file upload component with drop zone and file list
48
+ - [`<btu-upload-item>`](docs/components/UploadItem.md): Internal upload item sub-component for displaying individual file upload state
49
+ - [`<btu-widget>`](docs/components/Widget.md): A widget component for displaying content with header, body, and footer sections
50
+
51
+ ## Tailwind classes
52
+
53
+ Each link is a plugin source file; its header comment lists the classes.
54
+
55
+ - [Button](dist/tailwind-plugin-button.ts): Buttons communicate actions that users can take such as submit a form, begin a new task, trigger a new UI element to appear or take a new or next step in some process
56
+ - [Heading](dist/tailwind-plugin-heading.ts): Headings are a combination of font-size, line-height and weight
57
+ - [Scroll Shadow](dist/tailwind-plugin-scroll-shadow.ts): This plugin adds shadows to the edges of a scrollable container when the content of the container overflows
58
+ - [Icon](dist/tailwind-plugin-icon.ts): Lucide icons as classes, for example `before:btu-icon before:btu-icon-heart`, plus size and gradient modifiers
59
+
60
+ ## Optional
61
+
62
+ - [Custom Elements Manifest](dist/custom-elements.json): the machine-readable API of every element
63
+ - [Changelog](CHANGELOG.md): what changed in each release