@unofficialbox/box-open-elements 0.1.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 (351) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -0
  3. package/dist/components/actions/button-group.d.ts +22 -0
  4. package/dist/components/actions/button-group.js +255 -0
  5. package/dist/components/actions/button.d.ts +16 -0
  6. package/dist/components/actions/button.js +190 -0
  7. package/dist/components/actions/icon-button.d.ts +20 -0
  8. package/dist/components/actions/icon-button.js +187 -0
  9. package/dist/components/actions/link-button.d.ts +14 -0
  10. package/dist/components/actions/link-button.js +137 -0
  11. package/dist/components/actions/menu-item.d.ts +17 -0
  12. package/dist/components/actions/menu-item.js +137 -0
  13. package/dist/components/actions/menu.d.ts +22 -0
  14. package/dist/components/actions/menu.js +178 -0
  15. package/dist/components/actions/segmented-control.d.ts +27 -0
  16. package/dist/components/actions/segmented-control.js +273 -0
  17. package/dist/components/collections/card.d.ts +13 -0
  18. package/dist/components/collections/card.js +110 -0
  19. package/dist/components/collections/carousel.d.ts +40 -0
  20. package/dist/components/collections/carousel.js +406 -0
  21. package/dist/components/collections/datalist-item.d.ts +32 -0
  22. package/dist/components/collections/datalist-item.js +196 -0
  23. package/dist/components/collections/draggable-list.d.ts +33 -0
  24. package/dist/components/collections/draggable-list.js +306 -0
  25. package/dist/components/collections/grid-view.d.ts +38 -0
  26. package/dist/components/collections/grid-view.js +321 -0
  27. package/dist/components/collections/pagination.d.ts +19 -0
  28. package/dist/components/collections/pagination.js +147 -0
  29. package/dist/components/collections/tree-grid.d.ts +47 -0
  30. package/dist/components/collections/tree-grid.js +593 -0
  31. package/dist/components/collections/tree.d.ts +37 -0
  32. package/dist/components/collections/tree.js +526 -0
  33. package/dist/components/feedback/alert.d.ts +27 -0
  34. package/dist/components/feedback/alert.js +263 -0
  35. package/dist/components/feedback/badge.d.ts +12 -0
  36. package/dist/components/feedback/badge.js +99 -0
  37. package/dist/components/feedback/chip.d.ts +33 -0
  38. package/dist/components/feedback/chip.js +261 -0
  39. package/dist/components/feedback/empty-state.d.ts +19 -0
  40. package/dist/components/feedback/empty-state.js +137 -0
  41. package/dist/components/feedback/error-mask.d.ts +25 -0
  42. package/dist/components/feedback/error-mask.js +199 -0
  43. package/dist/components/feedback/help-text.d.ts +22 -0
  44. package/dist/components/feedback/help-text.js +176 -0
  45. package/dist/components/feedback/nudge.d.ts +32 -0
  46. package/dist/components/feedback/nudge.js +299 -0
  47. package/dist/components/feedback/progress-bar.d.ts +18 -0
  48. package/dist/components/feedback/progress-bar.js +128 -0
  49. package/dist/components/feedback/progress-ring.d.ts +21 -0
  50. package/dist/components/feedback/progress-ring.js +155 -0
  51. package/dist/components/feedback/progress-steps.d.ts +25 -0
  52. package/dist/components/feedback/progress-steps.js +276 -0
  53. package/dist/components/feedback/skeleton.d.ts +14 -0
  54. package/dist/components/feedback/skeleton.js +95 -0
  55. package/dist/components/feedback/spinner.d.ts +10 -0
  56. package/dist/components/feedback/spinner.js +80 -0
  57. package/dist/components/feedback/toast.d.ts +26 -0
  58. package/dist/components/feedback/toast.js +205 -0
  59. package/dist/components/files/drop-zone.d.ts +19 -0
  60. package/dist/components/files/drop-zone.js +169 -0
  61. package/dist/components/forms/calendar.d.ts +47 -0
  62. package/dist/components/forms/calendar.js +499 -0
  63. package/dist/components/forms/category-selector.d.ts +35 -0
  64. package/dist/components/forms/category-selector.js +269 -0
  65. package/dist/components/forms/checkbox-group.d.ts +31 -0
  66. package/dist/components/forms/checkbox-group.js +267 -0
  67. package/dist/components/forms/checkbox.d.ts +28 -0
  68. package/dist/components/forms/checkbox.js +250 -0
  69. package/dist/components/forms/color-picker.d.ts +34 -0
  70. package/dist/components/forms/color-picker.js +314 -0
  71. package/dist/components/forms/combobox.d.ts +37 -0
  72. package/dist/components/forms/combobox.js +234 -0
  73. package/dist/components/forms/date-field.d.ts +27 -0
  74. package/dist/components/forms/date-field.js +187 -0
  75. package/dist/components/forms/dropdown.d.ts +38 -0
  76. package/dist/components/forms/dropdown.js +405 -0
  77. package/dist/components/forms/dual-listbox.d.ts +44 -0
  78. package/dist/components/forms/dual-listbox.js +484 -0
  79. package/dist/components/forms/fieldset.d.ts +32 -0
  80. package/dist/components/forms/fieldset.js +168 -0
  81. package/dist/components/forms/multi-select.d.ts +30 -0
  82. package/dist/components/forms/multi-select.js +264 -0
  83. package/dist/components/forms/number-input.d.ts +32 -0
  84. package/dist/components/forms/number-input.js +245 -0
  85. package/dist/components/forms/pill-cloud.d.ts +35 -0
  86. package/dist/components/forms/pill-cloud.js +230 -0
  87. package/dist/components/forms/pill-selector-dropdown.d.ts +55 -0
  88. package/dist/components/forms/pill-selector-dropdown.js +499 -0
  89. package/dist/components/forms/radio-group.d.ts +32 -0
  90. package/dist/components/forms/radio-group.js +285 -0
  91. package/dist/components/forms/range-slider.d.ts +36 -0
  92. package/dist/components/forms/range-slider.js +294 -0
  93. package/dist/components/forms/rating.d.ts +31 -0
  94. package/dist/components/forms/rating.js +302 -0
  95. package/dist/components/forms/rich-text-input.d.ts +32 -0
  96. package/dist/components/forms/rich-text-input.js +403 -0
  97. package/dist/components/forms/search-field.d.ts +27 -0
  98. package/dist/components/forms/search-field.js +293 -0
  99. package/dist/components/forms/select.d.ts +30 -0
  100. package/dist/components/forms/select.js +198 -0
  101. package/dist/components/forms/slider.d.ts +31 -0
  102. package/dist/components/forms/slider.js +221 -0
  103. package/dist/components/forms/spin-button.d.ts +33 -0
  104. package/dist/components/forms/spin-button.js +352 -0
  105. package/dist/components/forms/switch.d.ts +32 -0
  106. package/dist/components/forms/switch.js +302 -0
  107. package/dist/components/forms/tag-input.d.ts +46 -0
  108. package/dist/components/forms/tag-input.js +420 -0
  109. package/dist/components/forms/text-area.d.ts +26 -0
  110. package/dist/components/forms/text-area.js +188 -0
  111. package/dist/components/forms/text-field.d.ts +24 -0
  112. package/dist/components/forms/text-field.js +151 -0
  113. package/dist/components/forms/time-field.d.ts +29 -0
  114. package/dist/components/forms/time-field.js +203 -0
  115. package/dist/components/identity/avatar.d.ts +21 -0
  116. package/dist/components/identity/avatar.js +191 -0
  117. package/dist/components/identity/contact-datalist-item.d.ts +31 -0
  118. package/dist/components/identity/contact-datalist-item.js +235 -0
  119. package/dist/components/identity/persona.d.ts +28 -0
  120. package/dist/components/identity/persona.js +272 -0
  121. package/dist/components/layout/app-shell.d.ts +26 -0
  122. package/dist/components/layout/app-shell.js +258 -0
  123. package/dist/components/layout/divider.d.ts +12 -0
  124. package/dist/components/layout/divider.js +119 -0
  125. package/dist/components/layout/nav-sidebar.d.ts +23 -0
  126. package/dist/components/layout/nav-sidebar.js +167 -0
  127. package/dist/components/layout/section.d.ts +20 -0
  128. package/dist/components/layout/section.js +143 -0
  129. package/dist/components/layout/sidebar-toggle-button.d.ts +26 -0
  130. package/dist/components/layout/sidebar-toggle-button.js +137 -0
  131. package/dist/components/layout/split-view.d.ts +19 -0
  132. package/dist/components/layout/split-view.js +157 -0
  133. package/dist/components/navigation/accordion.d.ts +25 -0
  134. package/dist/components/navigation/accordion.js +253 -0
  135. package/dist/components/navigation/tabs.d.ts +27 -0
  136. package/dist/components/navigation/tabs.js +289 -0
  137. package/dist/components/overlays/dialog.d.ts +26 -0
  138. package/dist/components/overlays/dialog.js +267 -0
  139. package/dist/components/overlays/drawer.d.ts +32 -0
  140. package/dist/components/overlays/drawer.js +323 -0
  141. package/dist/components/overlays/popover.d.ts +35 -0
  142. package/dist/components/overlays/popover.js +317 -0
  143. package/dist/components/overlays/tooltip.d.ts +26 -0
  144. package/dist/components/overlays/tooltip.js +204 -0
  145. package/dist/components/visuals/illustration.d.ts +26 -0
  146. package/dist/components/visuals/illustration.js +319 -0
  147. package/dist/core/controller.d.ts +11 -0
  148. package/dist/core/controller.js +23 -0
  149. package/dist/core/element.d.ts +22 -0
  150. package/dist/core/element.js +28 -0
  151. package/dist/core/event-emitter.d.ts +9 -0
  152. package/dist/core/event-emitter.js +33 -0
  153. package/dist/core/form-associated.d.ts +63 -0
  154. package/dist/core/form-associated.js +218 -0
  155. package/dist/core/index.d.ts +6 -0
  156. package/dist/core/index.js +4 -0
  157. package/dist/core/json-schema.d.ts +1 -0
  158. package/dist/core/json-schema.js +1 -0
  159. package/dist/foundations/a11y/focus.d.ts +17 -0
  160. package/dist/foundations/a11y/focus.js +94 -0
  161. package/dist/foundations/a11y/heading.d.ts +26 -0
  162. package/dist/foundations/a11y/heading.js +40 -0
  163. package/dist/foundations/a11y/index.d.ts +5 -0
  164. package/dist/foundations/a11y/index.js +3 -0
  165. package/dist/foundations/a11y/keyboard.d.ts +28 -0
  166. package/dist/foundations/a11y/keyboard.js +77 -0
  167. package/dist/foundations/geometry/index.d.ts +1 -0
  168. package/dist/foundations/geometry/index.js +1 -0
  169. package/dist/foundations/geometry/tokens.d.ts +123 -0
  170. package/dist/foundations/geometry/tokens.js +154 -0
  171. package/dist/foundations/icons/box-iconography.d.ts +479 -0
  172. package/dist/foundations/icons/box-iconography.generated.d.ts +2370 -0
  173. package/dist/foundations/icons/box-iconography.generated.js +4010 -0
  174. package/dist/foundations/icons/box-iconography.js +39 -0
  175. package/dist/foundations/icons/index.d.ts +1 -0
  176. package/dist/foundations/icons/index.js +1 -0
  177. package/dist/foundations/motion/index.d.ts +2 -0
  178. package/dist/foundations/motion/index.js +1 -0
  179. package/dist/foundations/motion/tokens.d.ts +39 -0
  180. package/dist/foundations/motion/tokens.js +43 -0
  181. package/dist/foundations/tokens/box-dark.d.ts +11 -0
  182. package/dist/foundations/tokens/box-dark.js +46 -0
  183. package/dist/foundations/tokens/box-defaults.d.ts +5 -0
  184. package/dist/foundations/tokens/box-defaults.js +52 -0
  185. package/dist/foundations/tokens/index.d.ts +5 -0
  186. package/dist/foundations/tokens/index.js +4 -0
  187. package/dist/foundations/tokens/interaction.d.ts +28 -0
  188. package/dist/foundations/tokens/interaction.js +72 -0
  189. package/dist/foundations/tokens/registry.d.ts +14 -0
  190. package/dist/foundations/tokens/registry.js +92 -0
  191. package/dist/foundations/tokens/types.d.ts +16 -0
  192. package/dist/foundations/tokens/types.js +1 -0
  193. package/dist/foundations/typography/index.d.ts +2 -0
  194. package/dist/foundations/typography/index.js +1 -0
  195. package/dist/foundations/typography/tokens.d.ts +76 -0
  196. package/dist/foundations/typography/tokens.js +27 -0
  197. package/dist/index.d.ts +87 -0
  198. package/dist/index.js +98 -0
  199. package/dist/patterns/content-explorer/actions/controller.d.ts +12 -0
  200. package/dist/patterns/content-explorer/actions/controller.js +36 -0
  201. package/dist/patterns/content-explorer/actions/index.d.ts +2 -0
  202. package/dist/patterns/content-explorer/actions/index.js +1 -0
  203. package/dist/patterns/content-explorer/actions/types.d.ts +13 -0
  204. package/dist/patterns/content-explorer/actions/types.js +1 -0
  205. package/dist/patterns/content-explorer/adapters/action-menu.d.ts +24 -0
  206. package/dist/patterns/content-explorer/adapters/action-menu.js +312 -0
  207. package/dist/patterns/content-explorer/adapters/breadcrumbs.d.ts +15 -0
  208. package/dist/patterns/content-explorer/adapters/breadcrumbs.js +161 -0
  209. package/dist/patterns/content-explorer/adapters/item-summary.d.ts +11 -0
  210. package/dist/patterns/content-explorer/adapters/item-summary.js +72 -0
  211. package/dist/patterns/content-explorer/adapters/items.d.ts +4 -0
  212. package/dist/patterns/content-explorer/adapters/items.js +12 -0
  213. package/dist/patterns/content-explorer/adapters/list.d.ts +28 -0
  214. package/dist/patterns/content-explorer/adapters/list.js +527 -0
  215. package/dist/patterns/content-explorer/adapters/table.d.ts +23 -0
  216. package/dist/patterns/content-explorer/adapters/table.js +467 -0
  217. package/dist/patterns/content-explorer/adapters/toolbar.d.ts +19 -0
  218. package/dist/patterns/content-explorer/adapters/toolbar.js +234 -0
  219. package/dist/patterns/content-explorer/box-transport.d.ts +44 -0
  220. package/dist/patterns/content-explorer/box-transport.js +229 -0
  221. package/dist/patterns/content-explorer/collection/controller.d.ts +17 -0
  222. package/dist/patterns/content-explorer/collection/controller.js +67 -0
  223. package/dist/patterns/content-explorer/collection/index.d.ts +2 -0
  224. package/dist/patterns/content-explorer/collection/index.js +1 -0
  225. package/dist/patterns/content-explorer/collection/types.d.ts +20 -0
  226. package/dist/patterns/content-explorer/collection/types.js +1 -0
  227. package/dist/patterns/content-explorer/content-explorer.d.ts +85 -0
  228. package/dist/patterns/content-explorer/content-explorer.js +745 -0
  229. package/dist/patterns/content-explorer/contracts.d.ts +32 -0
  230. package/dist/patterns/content-explorer/contracts.js +114 -0
  231. package/dist/patterns/content-explorer/controller.d.ts +34 -0
  232. package/dist/patterns/content-explorer/controller.js +399 -0
  233. package/dist/patterns/content-explorer/host-bindings.d.ts +50 -0
  234. package/dist/patterns/content-explorer/host-bindings.js +76 -0
  235. package/dist/patterns/content-explorer/index.d.ts +18 -0
  236. package/dist/patterns/content-explorer/index.js +24 -0
  237. package/dist/patterns/content-explorer/navigation/controller.d.ts +10 -0
  238. package/dist/patterns/content-explorer/navigation/controller.js +48 -0
  239. package/dist/patterns/content-explorer/navigation/index.d.ts +2 -0
  240. package/dist/patterns/content-explorer/navigation/index.js +1 -0
  241. package/dist/patterns/content-explorer/navigation/types.d.ts +20 -0
  242. package/dist/patterns/content-explorer/navigation/types.js +1 -0
  243. package/dist/patterns/content-explorer/schemas.d.ts +6 -0
  244. package/dist/patterns/content-explorer/schemas.js +120 -0
  245. package/dist/patterns/content-explorer/selection/controller.d.ts +12 -0
  246. package/dist/patterns/content-explorer/selection/controller.js +54 -0
  247. package/dist/patterns/content-explorer/selection/index.d.ts +2 -0
  248. package/dist/patterns/content-explorer/selection/index.js +1 -0
  249. package/dist/patterns/content-explorer/selection/types.d.ts +14 -0
  250. package/dist/patterns/content-explorer/selection/types.js +1 -0
  251. package/dist/patterns/content-explorer/types.d.ts +209 -0
  252. package/dist/patterns/content-explorer/types.js +10 -0
  253. package/dist/patterns/file-request/file-request-builder.d.ts +36 -0
  254. package/dist/patterns/file-request/file-request-builder.js +344 -0
  255. package/dist/patterns/file-request/index.d.ts +1 -0
  256. package/dist/patterns/file-request/index.js +1 -0
  257. package/dist/patterns/governance/governance-panel.d.ts +40 -0
  258. package/dist/patterns/governance/governance-panel.js +351 -0
  259. package/dist/patterns/governance/index.d.ts +1 -0
  260. package/dist/patterns/governance/index.js +1 -0
  261. package/dist/patterns/insights/bar-chart.d.ts +43 -0
  262. package/dist/patterns/insights/bar-chart.js +462 -0
  263. package/dist/patterns/insights/chart-panel.d.ts +43 -0
  264. package/dist/patterns/insights/chart-panel.js +436 -0
  265. package/dist/patterns/insights/donut-chart.d.ts +43 -0
  266. package/dist/patterns/insights/donut-chart.js +535 -0
  267. package/dist/patterns/insights/index.d.ts +5 -0
  268. package/dist/patterns/insights/index.js +5 -0
  269. package/dist/patterns/insights/line-chart.d.ts +46 -0
  270. package/dist/patterns/insights/line-chart.js +511 -0
  271. package/dist/patterns/insights/metric-card.d.ts +36 -0
  272. package/dist/patterns/insights/metric-card.js +278 -0
  273. package/dist/patterns/item/bulk-action-bar.d.ts +35 -0
  274. package/dist/patterns/item/bulk-action-bar.js +325 -0
  275. package/dist/patterns/item/index.d.ts +4 -0
  276. package/dist/patterns/item/index.js +4 -0
  277. package/dist/patterns/item/item-details-panel.d.ts +61 -0
  278. package/dist/patterns/item/item-details-panel.js +429 -0
  279. package/dist/patterns/item/item-form.d.ts +54 -0
  280. package/dist/patterns/item/item-form.js +485 -0
  281. package/dist/patterns/item/preview-header.d.ts +46 -0
  282. package/dist/patterns/item/preview-header.js +323 -0
  283. package/dist/patterns/metadata/contracts.d.ts +75 -0
  284. package/dist/patterns/metadata/contracts.js +91 -0
  285. package/dist/patterns/metadata/index.d.ts +4 -0
  286. package/dist/patterns/metadata/index.js +4 -0
  287. package/dist/patterns/metadata/metadata-filter-builder.d.ts +43 -0
  288. package/dist/patterns/metadata/metadata-filter-builder.js +362 -0
  289. package/dist/patterns/metadata/metadata-inspector.d.ts +31 -0
  290. package/dist/patterns/metadata/metadata-inspector.js +245 -0
  291. package/dist/patterns/metadata/schemas.d.ts +5 -0
  292. package/dist/patterns/metadata/schemas.js +66 -0
  293. package/dist/patterns/preview/annotation-inspector.d.ts +44 -0
  294. package/dist/patterns/preview/annotation-inspector.js +380 -0
  295. package/dist/patterns/preview/annotation-thread.d.ts +37 -0
  296. package/dist/patterns/preview/annotation-thread.js +338 -0
  297. package/dist/patterns/preview/annotation-toolbar.d.ts +42 -0
  298. package/dist/patterns/preview/annotation-toolbar.js +393 -0
  299. package/dist/patterns/preview/content-preview-adapter.d.ts +13 -0
  300. package/dist/patterns/preview/content-preview-adapter.js +30 -0
  301. package/dist/patterns/preview/index.d.ts +6 -0
  302. package/dist/patterns/preview/index.js +6 -0
  303. package/dist/patterns/preview/preview-element.d.ts +41 -0
  304. package/dist/patterns/preview/preview-element.js +429 -0
  305. package/dist/patterns/preview/provider-adapter.d.ts +36 -0
  306. package/dist/patterns/preview/provider-adapter.js +29 -0
  307. package/dist/patterns/search/filter-bar.d.ts +50 -0
  308. package/dist/patterns/search/filter-bar.js +379 -0
  309. package/dist/patterns/search/index.d.ts +3 -0
  310. package/dist/patterns/search/index.js +3 -0
  311. package/dist/patterns/search/saved-view-picker.d.ts +25 -0
  312. package/dist/patterns/search/saved-view-picker.js +239 -0
  313. package/dist/patterns/search/search-results-header.d.ts +34 -0
  314. package/dist/patterns/search/search-results-header.js +288 -0
  315. package/dist/patterns/share/access-stats.d.ts +19 -0
  316. package/dist/patterns/share/access-stats.js +204 -0
  317. package/dist/patterns/share/collaborator-avatars.d.ts +22 -0
  318. package/dist/patterns/share/collaborator-avatars.js +214 -0
  319. package/dist/patterns/share/contracts.d.ts +65 -0
  320. package/dist/patterns/share/contracts.js +75 -0
  321. package/dist/patterns/share/index.d.ts +14 -0
  322. package/dist/patterns/share/index.js +14 -0
  323. package/dist/patterns/share/invite-collaborators-contracts.d.ts +38 -0
  324. package/dist/patterns/share/invite-collaborators-contracts.js +1 -0
  325. package/dist/patterns/share/invite-collaborators-controller.d.ts +40 -0
  326. package/dist/patterns/share/invite-collaborators-controller.js +86 -0
  327. package/dist/patterns/share/invite-collaborators-modal.d.ts +46 -0
  328. package/dist/patterns/share/invite-collaborators-modal.js +465 -0
  329. package/dist/patterns/share/permission-matrix.d.ts +37 -0
  330. package/dist/patterns/share/permission-matrix.js +360 -0
  331. package/dist/patterns/share/presence-contracts.d.ts +26 -0
  332. package/dist/patterns/share/presence-contracts.js +1 -0
  333. package/dist/patterns/share/presence-controller.d.ts +31 -0
  334. package/dist/patterns/share/presence-controller.js +47 -0
  335. package/dist/patterns/share/presence.d.ts +32 -0
  336. package/dist/patterns/share/presence.js +255 -0
  337. package/dist/patterns/share/schemas.d.ts +4 -0
  338. package/dist/patterns/share/schemas.js +41 -0
  339. package/dist/patterns/share/share-panel.d.ts +75 -0
  340. package/dist/patterns/share/share-panel.js +565 -0
  341. package/dist/patterns/share/unified-share-controller.d.ts +52 -0
  342. package/dist/patterns/share/unified-share-controller.js +97 -0
  343. package/dist/patterns/share/unified-share-modal.d.ts +50 -0
  344. package/dist/patterns/share/unified-share-modal.js +646 -0
  345. package/dist/patterns/task/index.d.ts +2 -0
  346. package/dist/patterns/task/index.js +2 -0
  347. package/dist/patterns/task/review-queue-item.d.ts +45 -0
  348. package/dist/patterns/task/review-queue-item.js +403 -0
  349. package/dist/patterns/task/task-assignment-panel.d.ts +50 -0
  350. package/dist/patterns/task/task-assignment-panel.js +450 -0
  351. package/package.json +151 -0
@@ -0,0 +1,39 @@
1
+ import { boxGeneratedIconCounts, boxGeneratedIconMetadata, boxGeneratedIcons, boxGeneratedIconKeys, } from "./box-iconography.generated.js";
2
+ const aliasToKey = {
3
+ "+": "plus",
4
+ "-": "minus",
5
+ "⋯": "6-dots",
6
+ alert: "exclamation-mark",
7
+ bell: "bell",
8
+ calendar: "calendar",
9
+ check: "check",
10
+ checkmark: "checkmark",
11
+ download: "download",
12
+ ellipsis: "6-dots",
13
+ filter: "funnel",
14
+ folder: "folder",
15
+ funnel: "funnel",
16
+ gear: "gear",
17
+ home: "home",
18
+ link: "link",
19
+ lock: "lock",
20
+ metadata: "metadata",
21
+ minus: "minus",
22
+ person: "person",
23
+ plus: "plus",
24
+ search: "magnifying-glass",
25
+ settings: "gear",
26
+ upload: "upload",
27
+ user: "user-primary",
28
+ };
29
+ export const boxIconographyAliases = Object.fromEntries(Object.entries(aliasToKey)
30
+ .map(([alias, key]) => {
31
+ const iconMarkup = boxGeneratedIcons[key];
32
+ return iconMarkup ? [alias, iconMarkup] : null;
33
+ })
34
+ .filter((entry) => Boolean(entry)));
35
+ export const boxIconography = {
36
+ ...boxGeneratedIcons,
37
+ ...boxIconographyAliases,
38
+ };
39
+ export { boxGeneratedIconCounts, boxGeneratedIconKeys, boxGeneratedIconMetadata, boxGeneratedIcons, };
@@ -0,0 +1 @@
1
+ export { boxIconography, boxIconographyAliases } from "./box-iconography.js";
@@ -0,0 +1 @@
1
+ export { boxIconography, boxIconographyAliases } from "./box-iconography.js";
@@ -0,0 +1,2 @@
1
+ export { boeMotionDuration, boeMotionEasing, boeReducedMotionStyles, boeTransition, } from "./tokens.js";
2
+ export type { BoeMotionDuration, BoeMotionEasing } from "./tokens.js";
@@ -0,0 +1 @@
1
+ export { boeMotionDuration, boeMotionEasing, boeReducedMotionStyles, boeTransition, } from "./tokens.js";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Shared motion vocabulary for shadow styles.
3
+ *
4
+ * Components should prefer these constants (or the CSS snippets below) over
5
+ * hard-coded duration/easing literals so timing stays consistent and
6
+ * prefers-reduced-motion policy is one place to update.
7
+ */
8
+ export declare const boeMotionDuration: {
9
+ /** Quick accent transitions (charts, micro-feedback) */
10
+ readonly fast: "120ms";
11
+ /**
12
+ * Dominant interactive paint duration across catalog controls
13
+ * (background / border / color / box-shadow on hover and press).
14
+ */
15
+ readonly interactive: "140ms";
16
+ /** Opacity / layout micro-transitions */
17
+ readonly medium: "160ms";
18
+ /** Panel expand / collapse */
19
+ readonly slow: "240ms";
20
+ /** Indeterminate spinner rotation */
21
+ readonly spin: "0.8s";
22
+ /** Skeleton shimmer cycle */
23
+ readonly shimmer: "1.4s";
24
+ };
25
+ export declare const boeMotionEasing: {
26
+ readonly standard: "ease";
27
+ readonly enter: "ease-out";
28
+ readonly exit: "ease-in";
29
+ readonly linear: "linear";
30
+ };
31
+ export type BoeMotionDuration = (typeof boeMotionDuration)[keyof typeof boeMotionDuration];
32
+ export type BoeMotionEasing = (typeof boeMotionEasing)[keyof typeof boeMotionEasing];
33
+ /** CSS transition shorthand using the shared vocabulary. */
34
+ export declare const boeTransition: (property: string, duration?: BoeMotionDuration, easing?: BoeMotionEasing) => string;
35
+ /**
36
+ * Wrap rules that should change under `prefers-reduced-motion: reduce`.
37
+ * Pass the full declaration block (including trailing semicolons).
38
+ */
39
+ export declare const boeReducedMotionStyles: (selector: string, declarations: string) => string;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Shared motion vocabulary for shadow styles.
3
+ *
4
+ * Components should prefer these constants (or the CSS snippets below) over
5
+ * hard-coded duration/easing literals so timing stays consistent and
6
+ * prefers-reduced-motion policy is one place to update.
7
+ */
8
+ export const boeMotionDuration = {
9
+ /** Quick accent transitions (charts, micro-feedback) */
10
+ fast: "120ms",
11
+ /**
12
+ * Dominant interactive paint duration across catalog controls
13
+ * (background / border / color / box-shadow on hover and press).
14
+ */
15
+ interactive: "140ms",
16
+ /** Opacity / layout micro-transitions */
17
+ medium: "160ms",
18
+ /** Panel expand / collapse */
19
+ slow: "240ms",
20
+ /** Indeterminate spinner rotation */
21
+ spin: "0.8s",
22
+ /** Skeleton shimmer cycle */
23
+ shimmer: "1.4s",
24
+ };
25
+ export const boeMotionEasing = {
26
+ standard: "ease",
27
+ enter: "ease-out",
28
+ exit: "ease-in",
29
+ linear: "linear",
30
+ };
31
+ /** CSS transition shorthand using the shared vocabulary. */
32
+ export const boeTransition = (property, duration = boeMotionDuration.fast, easing = boeMotionEasing.standard) => `${property} ${duration} ${easing}`;
33
+ /**
34
+ * Wrap rules that should change under `prefers-reduced-motion: reduce`.
35
+ * Pass the full declaration block (including trailing semicolons).
36
+ */
37
+ export const boeReducedMotionStyles = (selector, declarations) => `
38
+ @media (prefers-reduced-motion: reduce) {
39
+ ${selector} {
40
+ ${declarations}
41
+ }
42
+ }
43
+ `;
@@ -0,0 +1,11 @@
1
+ import type { DesignSystemDefinition } from "./types.js";
2
+ /**
3
+ * Box dark theme. Same token keys, icons, and illustrations as
4
+ * `boxDefaultDesignSystem` — only the surface / text / stroke / status values
5
+ * change, so every component that consumes `--boe-token-*` re-themes with no
6
+ * markup change when this bundle is made active.
7
+ */
8
+ export declare const boxDarkDesignSystem: DesignSystemDefinition;
9
+ export declare const registerBoxDarkDesignSystem: (options?: {
10
+ setActive?: boolean;
11
+ }) => DesignSystemDefinition;
@@ -0,0 +1,46 @@
1
+ import { registerDesignSystem } from "./registry.js";
2
+ import { boxDefaultDesignSystem } from "./box-defaults.js";
3
+ /**
4
+ * Box dark theme. Same token keys, icons, and illustrations as
5
+ * `boxDefaultDesignSystem` — only the surface / text / stroke / status values
6
+ * change, so every component that consumes `--boe-token-*` re-themes with no
7
+ * markup change when this bundle is made active.
8
+ */
9
+ export const boxDarkDesignSystem = {
10
+ name: "box-dark",
11
+ // Neutral-grey dark surfaces (no blue tint), consistent with the modernized
12
+ // Blueprint neutral palette used by the light default. Box publishes no
13
+ // canonical dark token set, so these are the neutral-dark analogue of it.
14
+ tokens: {
15
+ FontFamilyBase: "InterVariable, Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif",
16
+ SurfaceSurface: "#1c1c1c",
17
+ SurfaceSurfaceHover: "#2a2a2a",
18
+ SurfaceSurfaceSecondary: "#161616",
19
+ SurfaceSurfaceTertiary: "#333333",
20
+ SurfaceSurfaceQuaternary: "#444444",
21
+ SurfaceSurfaceBrand: "#4596ff",
22
+ SurfaceSurfaceBrandHover: "#5aa4ff",
23
+ SurfaceSurfaceBrandPressed: "#2f80ed",
24
+ SurfaceSearchSurface: "#2a2a2a",
25
+ SurfaceItemSurfaceSelected: "#14335a",
26
+ SurfaceItemSurfaceHover: "#1b3f6b",
27
+ SurfaceTooltipSurface: "#3a3a3a",
28
+ SurfaceStatusSurfaceSuccess: "#2ed58f",
29
+ SurfaceStatusSurfaceError: "#ff5a75",
30
+ SurfaceStatusSurfaceInprogress: "#ffc447",
31
+ SurfaceStatusSurfaceAccent: "#a892f0",
32
+ SurfaceIllustrationSurfaceBoxNeutral: "#4596ff",
33
+ SurfaceBadgeFoldersharedSurface: "#2486fc",
34
+ SurfaceBadgePdfSurface: "#ff4d5e",
35
+ TextText: "#f4f4f4",
36
+ TextTextDanger: "#ff8a9b",
37
+ TextTextSecondary: "#bcbcbc",
38
+ TextTextPlaceholder: "#909090",
39
+ TextTextOnBrand: "#ffffff",
40
+ StrokeStroke: "#3a3a3a",
41
+ StrokeStrokeHover: "#4e4e4e",
42
+ },
43
+ icons: boxDefaultDesignSystem.icons,
44
+ illustrations: boxDefaultDesignSystem.illustrations,
45
+ };
46
+ export const registerBoxDarkDesignSystem = (options = {}) => registerDesignSystem(boxDarkDesignSystem, options);
@@ -0,0 +1,5 @@
1
+ import type { DesignSystemDefinition } from "./types.js";
2
+ export declare const boxDefaultDesignSystem: DesignSystemDefinition;
3
+ export declare const registerBoxDefaultDesignSystem: (options?: {
4
+ setActive?: boolean;
5
+ }) => DesignSystemDefinition;
@@ -0,0 +1,52 @@
1
+ import { registerDesignSystem } from "./registry.js";
2
+ import { boxIconography } from "../icons/box-iconography.js";
3
+ const iconSvg = (viewBox, body) => `<svg viewBox="${viewBox}" width="1em" height="1em" role="img" aria-hidden="true" focusable="false">${body}</svg>`;
4
+ const illustrationSvg = (viewBox, body) => `<svg viewBox="${viewBox}" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" role="presentation" aria-hidden="true" focusable="false">${body}</svg>`;
5
+ export const boxDefaultDesignSystem = {
6
+ name: "box-default",
7
+ // Values track Box's modernized "Blueprint" design system
8
+ // (@box/blueprint-web-assets) — the palette box-ui-elements uses under
9
+ // `enableModernizedComponents`: warm-neutral greys + #222 text rather than the
10
+ // legacy cool blue-greys. Brand blue and status colors were already aligned.
11
+ tokens: {
12
+ FontFamilyBase: "InterVariable, Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif",
13
+ SurfaceSurface: "#ffffff",
14
+ SurfaceSurfaceHover: "#f4f4f4",
15
+ SurfaceSurfaceSecondary: "#fbfbfb",
16
+ SurfaceSurfaceTertiary: "#e8e8e8",
17
+ SurfaceSurfaceQuaternary: "#d3d3d3",
18
+ SurfaceSurfaceBrand: "#0061d5",
19
+ SurfaceSurfaceBrandHover: "#006ae9",
20
+ SurfaceSurfaceBrandPressed: "#004eac",
21
+ SurfaceSearchSurface: "#f4f4f4",
22
+ SurfaceItemSurfaceSelected: "#f2f7fd",
23
+ SurfaceItemSurfaceHover: "#eaf2fd",
24
+ SurfaceTooltipSurface: "#4e4e4e",
25
+ SurfaceStatusSurfaceSuccess: "#26c281",
26
+ SurfaceStatusSurfaceError: "#ed3757",
27
+ SurfaceStatusSurfaceInprogress: "#f5b31b",
28
+ SurfaceStatusSurfaceAccent: "#5b4b8a",
29
+ SurfaceIllustrationSurfaceBoxNeutral: "#0061d5",
30
+ SurfaceBadgeFoldersharedSurface: "#2486fc",
31
+ SurfaceBadgePdfSurface: "#d0021b",
32
+ TextText: "#222222",
33
+ TextTextSecondary: "#6f6f6f",
34
+ TextTextPlaceholder: "#909090",
35
+ TextTextOnBrand: "#ffffff",
36
+ TextTextDanger: "#d5324e",
37
+ StrokeStroke: "#e8e8e8",
38
+ StrokeStrokeHover: "#bcbcbc",
39
+ },
40
+ icons: {
41
+ ...boxIconography,
42
+ info: iconSvg("0 0 16 16", '<path fill="currentColor" d="M8.5 6.5H6.25a.75.75 0 0 0 0 1.5H7v4.5h-.75a.75.75 0 1 0 0 1.5H10a.75.75 0 1 0 0-1.5h-.75V7.41s.006-.217-.02-.327A.753.753 0 0 0 8.5 6.5ZM7.75 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" />'),
43
+ alert: iconSvg("0 0 16 16", '<path fill="currentColor" fill-rule="evenodd" d="M8 1.5a1.4 1.4 0 0 1 1.227.725l5.138 9.317A1.4 1.4 0 0 1 13.138 13.6H2.862a1.4 1.4 0 0 1-1.227-2.058l5.138-9.317A1.4 1.4 0 0 1 8 1.5Zm0 3.1a.75.75 0 0 0-.75.75v3.4a.75.75 0 0 0 1.5 0v-3.4A.75.75 0 0 0 8 4.6Zm0 6.4a.9.9 0 1 0 0 1.8.9.9 0 0 0 0-1.8Z" clip-rule="evenodd" />'),
44
+ "folder-shared": iconSvg("0 0 32 32", '<path fill="#2687FC" fill-rule="evenodd" d="M6 6h6c2 0 1.5 2 4 2h10a3 3 0 0 1 3 3v13a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3Z" clip-rule="evenodd" /><path fill="#91C2FD" fill-rule="evenodd" d="M26 11a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V14a3 3 0 0 1 3-3h20Zm-6.999 8c-1.117 0-1.933.543-2.439 1.401.198.464.337.951.414 1.45.066.42.003.809-.165 1.138a1.7 1.7 0 0 0 .193.011h4.002l.14-.006c.63-.054.924-.476.844-.988a5.024 5.024 0 0 0-.258-.997c-.453-1.2-1.367-2.009-2.73-2.009h-.001ZM13 19c-1.364 0-2.278.81-2.731 2.01-.076.202-.137.41-.185.62-.028.123-.053.25-.073.378-.084.54.258.992.992.992h4.002l.14-.006c.63-.054.924-.476.843-.988a5.023 5.023 0 0 0-.257-.997C15.277 19.81 14.363 19 13 19Zm0-4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm6.001 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" clip-rule="evenodd" />'),
45
+ "file-pdf": iconSvg("0 0 32 32", '<path fill="#FFF" d="M6 4a3 3 0 0 1 3-3h9.757a2 2 0 0 1 1.415.586l5.242 5.242A2 2 0 0 1 26 8.243V25a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V4Z" /><path fill="#D0021B" d="M18 1v6a2 2 0 0 0 2 2h6v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h9Z" opacity="0.12" /><path fill="#D0021B" d="M19 2.414 24.586 8H20a1 1 0 0 1-1-1V2.414Z" /><path fill="#D0021B" d="M9.8 23v-7h2.485c1.526 0 2.415.865 2.415 2.24 0 1.374-.889 2.248-2.415 2.248h-1.03V23H9.8Zm1.455-3.614h.83c.731 0 1.148-.387 1.148-1.146 0-.758-.417-1.137-1.148-1.137h-.83v2.283ZM15.975 23v-7h2.19c2.105 0 3.313 1.273 3.313 3.492 0 2.221-1.208 3.508-3.313 3.508h-2.19Zm1.455-1.22h.597c1.267 0 1.951-.728 1.951-2.288 0-1.557-.684-2.272-1.95-2.272h-.598v4.56ZM22.786 23v-7h4.475v1.22H24.24v1.675h2.796v1.188H24.24V23h-1.454Z" />'),
46
+ },
47
+ illustrations: {
48
+ "empty-state-folder": illustrationSvg("0 0 140 140", '<g fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-rule="evenodd" clip-rule="evenodd" opacity="0.1"><path d="M47.11 36H35.383c-1.261 0-2.294.97-2.378 2.198L33 38.36v48.604c0 2.162 1.716 3.926 3.872 4.031l.546.005h.257l.19-.036c1.743-.375 3.062-1.86 3.152-3.663l.005-.197V73.972a.98.98 0 0 1 .017-.18.87.87 0 0 1-.032-.155L41 73.52V56.717c0-4.209 3.7-7.59 8.268-7.713l.26-.004L97 48.999v-2.26c0-3.08-2.463-5.592-5.546-5.707l-.221-.004H54.118a4.402 4.402 0 0 1-3.51-1.738l-.14-.197-1.375-2.042a2.386 2.386 0 0 0-1.8-1.044L47.11 36Z" /><path d="M51 96a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm47-66c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10Z" /></g><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-rule="evenodd" d="M95 90c0-7.18-5.82-13-13-13s-13 5.82-13 13 5.82 13 13 13 13-5.82 13-13Zm-12.268-6.723a1.03 1.03 0 0 0-1.269-.107l-.105.079-.061.057-.057.061-4.99 5.898-.074.098a1.06 1.06 0 0 0 .187 1.384l.098.076c.17.115.371.177.578.177H79l.001 4.921c0 .596.497 1.08 1.11 1.08h3.779c.614 0 1.11-.484 1.11-1.081V91h1.96l.115-.006c.52-.057.925-.503.925-1.045 0-.249-.087-.489-.246-.679l-4.932-5.898-.09-.095Z" clip-rule="evenodd" /><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" d="M44.156 39c.466 0 .844.448.844 1s-.378 1-.844 1h-6.312c-.466 0-.844-.448-.844-1s.378-1 .844-1h6.312Zm41.952 21c.493 0 .892.448.892 1s-.4 1-.892 1H61.892c-.493 0-.892-.448-.892-1s.4-1 .892-1h24.216Z" /><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-rule="evenodd" d="M99 91a6 6 0 0 0 5.996-5.775L105 85l.005-28.283c0-2.983-2.745-5.672-6.005-5.708l-49.473-.019c-3.55 0-6.403 2.476-6.528 5.518l-.004.209c0 10.13.005 20.255.005 30.387a5.817 5.817 0 0 1-1.497 3.897L65 91a1 1 0 0 1 0 2H37c-3.238 0-5.878-2.521-5.996-5.675L31 87.104V38.347c0-2.33 1.85-4.232 4.174-4.342l.212-.005h11.727a4.4 4.4 0 0 1 3.509 1.739l.14.197 1.376 2.043c.407.607 1.073.99 1.799 1.045l.183.007h37.11c4.208 0 7.636 3.316 7.766 7.456l.004.244v2.284c4.358.24 7.863 3.449 7.996 7.464l.004.238V85a8 8 0 0 1-7.75 7.996L99 93a1 1 0 0 1 0-2ZM35.383 36H47.11l.183.007a2.386 2.386 0 0 1 1.8 1.044l1.375 2.042.14.197a4.402 4.402 0 0 0 3.51 1.738h37.115l.221.004c3.083.115 5.546 2.627 5.546 5.707v2.26L49.528 49l-.26.004C44.7 49.127 41 52.508 41 56.717c0 10.129.022 20.258.022 30.387l-.005.197c-.09 1.803-1.409 3.288-3.152 3.663l-.19.036h-.257l-.546-.005C34.716 90.89 33 89.126 33 86.964V38.36l.005-.162A2.374 2.374 0 0 1 35.383 36Z" clip-rule="evenodd" />'),
49
+ "files-information": illustrationSvg("0 0 140 140", '<path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-opacity="0.1" d="M97.5 99a2.5 2.5 0 0 1 2.5 2.5v7a2.5 2.5 0 1 1-5 0v-7a2.5 2.5 0 0 1 2.5-2.5ZM97.5 91a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5ZM74 78a2 2 0 1 1 0 4H57a2 2 0 1 1 0-4h17ZM90.01 67a1.99 1.99 0 0 1 0 3.978H56.99a1.99 1.99 0 0 1 0-3.978h33.02ZM90 56a2 2 0 1 1 0 4H57a2 2 0 1 1 0-4h33ZM80.058 27c.61 0 1.202.206 1.671.595C83.773 29.286 87.784 32.783 92 37c4.641 4.641 8.41 8.877 9.859 10.81a.73.73 0 0 1-1.105.944L98.89 46.89a3.037 3.037 0 0 0-2.148-.89h-9.264A4.479 4.479 0 0 1 83 41.522v-8.743a4.479 4.479 0 0 0-1.22-3.073L79.226 27h.83Z" /><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-opacity="0.25" d="M45 91.001a8 8 0 0 0 8 8h28.068c-.044.494-.068.994-.068 1.499a16.42 16.42 0 0 0 2.966 9.439A7.896 7.896 0 0 1 83 110H43c-5.523 0-10-4.477-10-10V47a7 7 0 0 1 7-7h5v51.001Z" /><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-rule="evenodd" d="M97.5 98.25a3.25 3.25 0 0 1 3.25 3.25v7a3.25 3.25 0 1 1-6.5 0v-7a3.25 3.25 0 0 1 3.25-3.25Zm0 1.5a1.75 1.75 0 0 0-1.75 1.75v7a1.75 1.75 0 0 0 3.5 0v-7a1.75 1.75 0 0 0-1.75-1.75ZM97.5 90.25a3.25 3.25 0 1 1 0 6.5 3.25 3.25 0 0 1 0-6.5Zm0 1.5a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5Z" clip-rule="evenodd" /><path fill="var(--boe-token-surface-illustration-surface-box-neutral, #0061d5)" fill-rule="evenodd" d="M79.1 26.25a7.75 7.75 0 0 1 5.481 2.27l15.899 15.899a7.749 7.749 0 0 1 2.27 5.48v34.165c6.96 2.222 12 8.74 12 16.436 0 9.527-7.723 17.25-17.25 17.25-5.743 0-10.83-2.807-13.965-7.123-.5.08-1.013.123-1.535.123H42c-5.385 0-9.75-4.365-9.75-9.75V47A7.75 7.75 0 0 1 40 39.25h4.25V34A7.75 7.75 0 0 1 52 26.25h27.1Zm18.4 58.5c-8.698 0-15.75 7.052-15.75 15.75s7.052 15.75 15.75 15.75 15.75-7.052 15.75-15.75-7.052-15.75-15.75-15.75Zm-57.5-44A6.25 6.25 0 0 0 33.75 47v54a8.25 8.25 0 0 0 8.25 8.25h40c.207 0 .413-.011.616-.026a17.172 17.172 0 0 1-2.348-9.473H52a7.75 7.75 0 0 1-7.75-7.75V40.75H40Zm12-13A6.25 6.25 0 0 0 45.75 34v58.001a6.25 6.25 0 0 0 6.25 6.25h28.395c1.103-8.464 8.34-15.001 17.105-15.001 1.288 0 2.543.141 3.75.41V51.112c0-.514-.204-1.007-.567-1.37l-1.902-1.901a3.73 3.73 0 0 0-2.637-1.092h-8.666a5.229 5.229 0 0 1-5.228-5.228v-8.743c0-.951-.364-1.866-1.017-2.558l-1.756-1.864a1.938 1.938 0 0 0-1.41-.607H52Zm30.325 1.441a5.23 5.23 0 0 1 1.425 3.588v8.742c0 2.06 1.67 3.729 3.728 3.729h8.666a5.23 5.23 0 0 1 3.698 1.531l1.056 1.057a6.241 6.241 0 0 0-1.48-2.358L83.52 29.581a6.252 6.252 0 0 0-2.15-1.403l.956 1.013Z" clip-rule="evenodd" />'),
50
+ },
51
+ };
52
+ export const registerBoxDefaultDesignSystem = (options = {}) => registerDesignSystem(boxDefaultDesignSystem, options);
@@ -0,0 +1,5 @@
1
+ export { DESIGN_SYSTEM_CHANGE_EVENT, applyDesignTokens, createDesignTokenStyleText, getActiveDesignSystem, getDesignSystem, listDesignSystems, registerDesignSystem, resolveDesignIcon, resolveDesignIllustration, resolveDesignSystemTokens, setActiveDesignSystem, } from "./registry.js";
2
+ export { boxDefaultDesignSystem, registerBoxDefaultDesignSystem } from "./box-defaults.js";
3
+ export { boxDarkDesignSystem, registerBoxDarkDesignSystem } from "./box-dark.js";
4
+ export { boeBrandInteractiveStyles, boeFocusRingShadow, boeFocusVisibleStyles, boeNeutralInteractiveStyles, } from "./interaction.js";
5
+ export type { ApplyDesignTokensOptions, DesignAssetRenderContext, DesignAssetRenderer, DesignSystemDefinition, DesignTokenMap, } from "./types.js";
@@ -0,0 +1,4 @@
1
+ export { DESIGN_SYSTEM_CHANGE_EVENT, applyDesignTokens, createDesignTokenStyleText, getActiveDesignSystem, getDesignSystem, listDesignSystems, registerDesignSystem, resolveDesignIcon, resolveDesignIllustration, resolveDesignSystemTokens, setActiveDesignSystem, } from "./registry.js";
2
+ export { boxDefaultDesignSystem, registerBoxDefaultDesignSystem } from "./box-defaults.js";
3
+ export { boxDarkDesignSystem, registerBoxDarkDesignSystem } from "./box-dark.js";
4
+ export { boeBrandInteractiveStyles, boeFocusRingShadow, boeFocusVisibleStyles, boeNeutralInteractiveStyles, } from "./interaction.js";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Shared interactive-state CSS snippets for Web Components.
3
+ *
4
+ * Batch 3 fidelity contract: every interactive control gets a brand
5
+ * `:focus-visible` ring plus `:hover` / `:active` / `:disabled` using
6
+ * `--boe-token-*` surfaces. Import these helpers into component style
7
+ * blocks so the ring and hover language stay consistent.
8
+ */
9
+ /**
10
+ * Brand focus ring (WCAG 2.4.7). Theme-adaptive via surface-brand.
11
+ * Uses an opaque brand fallback so keyboard focus stays high-contrast when
12
+ * no design system has registered tokens yet.
13
+ */
14
+ export declare const boeFocusRingShadow = "0 0 0 3px var(--boe-token-surface-surface-brand, #0061d5)";
15
+ /**
16
+ * Neutral control surface states (buttons, chips, triggers, list rows).
17
+ * `selector` should target the interactive part, e.g. `[part="trigger"]`.
18
+ */
19
+ export declare const boeNeutralInteractiveStyles: (selector: string) => string;
20
+ /**
21
+ * Brand/primary action surface states (confirm, submit, primary chips).
22
+ */
23
+ export declare const boeBrandInteractiveStyles: (selector: string) => string;
24
+ /**
25
+ * Focus ring only — for controls that already own hover/active styling
26
+ * (native checkboxes, range inputs) or use a different hover treatment.
27
+ */
28
+ export declare const boeFocusVisibleStyles: (selector: string) => string;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Shared interactive-state CSS snippets for Web Components.
3
+ *
4
+ * Batch 3 fidelity contract: every interactive control gets a brand
5
+ * `:focus-visible` ring plus `:hover` / `:active` / `:disabled` using
6
+ * `--boe-token-*` surfaces. Import these helpers into component style
7
+ * blocks so the ring and hover language stay consistent.
8
+ */
9
+ /**
10
+ * Brand focus ring (WCAG 2.4.7). Theme-adaptive via surface-brand.
11
+ * Uses an opaque brand fallback so keyboard focus stays high-contrast when
12
+ * no design system has registered tokens yet.
13
+ */
14
+ export const boeFocusRingShadow = "0 0 0 3px var(--boe-token-surface-surface-brand, #0061d5)";
15
+ /**
16
+ * Neutral control surface states (buttons, chips, triggers, list rows).
17
+ * `selector` should target the interactive part, e.g. `[part="trigger"]`.
18
+ */
19
+ export const boeNeutralInteractiveStyles = (selector) => `
20
+ ${selector}:focus-visible {
21
+ outline: none;
22
+ box-shadow: ${boeFocusRingShadow};
23
+ }
24
+
25
+ ${selector}:hover:not(:disabled) {
26
+ background: var(--boe-token-surface-surface-hover, #f4f4f4);
27
+ border-color: var(--boe-token-stroke-stroke-hover, #bcbcbc);
28
+ }
29
+
30
+ ${selector}:active:not(:disabled) {
31
+ background: color-mix(in srgb, var(--boe-token-surface-surface-hover, #f4f4f4) 70%, var(--boe-token-surface-surface-secondary, #fbfbfb) 30%);
32
+ }
33
+
34
+ ${selector}:disabled {
35
+ cursor: not-allowed;
36
+ opacity: 0.55;
37
+ box-shadow: none;
38
+ }
39
+ `;
40
+ /**
41
+ * Brand/primary action surface states (confirm, submit, primary chips).
42
+ */
43
+ export const boeBrandInteractiveStyles = (selector) => `
44
+ ${selector}:focus-visible {
45
+ outline: none;
46
+ box-shadow: ${boeFocusRingShadow};
47
+ }
48
+
49
+ ${selector}:hover:not(:disabled) {
50
+ background: var(--boe-token-surface-surface-brand-hover, #006ae9);
51
+ }
52
+
53
+ ${selector}:active:not(:disabled) {
54
+ background: var(--boe-token-surface-surface-brand-pressed, #004eac);
55
+ }
56
+
57
+ ${selector}:disabled {
58
+ cursor: not-allowed;
59
+ opacity: 0.55;
60
+ box-shadow: none;
61
+ }
62
+ `;
63
+ /**
64
+ * Focus ring only — for controls that already own hover/active styling
65
+ * (native checkboxes, range inputs) or use a different hover treatment.
66
+ */
67
+ export const boeFocusVisibleStyles = (selector) => `
68
+ ${selector}:focus-visible {
69
+ outline: none;
70
+ box-shadow: ${boeFocusRingShadow};
71
+ }
72
+ `;
@@ -0,0 +1,14 @@
1
+ import type { ApplyDesignTokensOptions, DesignSystemDefinition, DesignTokenMap } from "./types.js";
2
+ export declare const DESIGN_SYSTEM_CHANGE_EVENT = "boe:design-system-change";
3
+ export declare const registerDesignSystem: (definition: DesignSystemDefinition, options?: {
4
+ setActive?: boolean;
5
+ }) => DesignSystemDefinition;
6
+ export declare const getDesignSystem: (name: string | null | undefined) => DesignSystemDefinition | null;
7
+ export declare const setActiveDesignSystem: (name: string | null) => void;
8
+ export declare const getActiveDesignSystem: () => DesignSystemDefinition | null;
9
+ export declare const listDesignSystems: () => DesignSystemDefinition[];
10
+ export declare const resolveDesignSystemTokens: (name?: string | null) => DesignTokenMap;
11
+ export declare const applyDesignTokens: (target: HTMLElement, tokensOrSystemName?: DesignTokenMap | string | null, options?: ApplyDesignTokensOptions) => string[];
12
+ export declare const createDesignTokenStyleText: (tokensOrSystemName?: DesignTokenMap | string | null, options?: ApplyDesignTokensOptions) => string;
13
+ export declare const resolveDesignIcon: (iconName: string, systemName?: string | null) => string | null;
14
+ export declare const resolveDesignIllustration: (illustrationName: string, systemName?: string | null) => string | null;
@@ -0,0 +1,92 @@
1
+ export const DESIGN_SYSTEM_CHANGE_EVENT = "boe:design-system-change";
2
+ const DEFAULT_TOKEN_PREFIX = "--boe-token-";
3
+ const designSystems = new Map();
4
+ let activeDesignSystemName = null;
5
+ const toKebabCase = (value) => value
6
+ .replace(/^--/, "")
7
+ .replace(/([a-z0-9])([A-Z])/g, "$1-$2")
8
+ .replace(/[\s_]+/g, "-")
9
+ .toLowerCase();
10
+ const emitDesignSystemChange = () => {
11
+ if (typeof globalThis.dispatchEvent === "function" && typeof CustomEvent !== "undefined") {
12
+ globalThis.dispatchEvent(new CustomEvent(DESIGN_SYSTEM_CHANGE_EVENT, {
13
+ detail: {
14
+ activeDesignSystemName,
15
+ },
16
+ }));
17
+ }
18
+ };
19
+ const resolveTokenVariableName = (tokenName, prefix = DEFAULT_TOKEN_PREFIX) => {
20
+ if (tokenName.startsWith("--")) {
21
+ return tokenName;
22
+ }
23
+ return `${prefix}${toKebabCase(tokenName)}`;
24
+ };
25
+ const renderAsset = (asset, context) => {
26
+ if (!asset) {
27
+ return null;
28
+ }
29
+ return typeof asset === "function" ? asset(context) : asset;
30
+ };
31
+ export const registerDesignSystem = (definition, options = {}) => {
32
+ designSystems.set(definition.name, definition);
33
+ if (options.setActive) {
34
+ activeDesignSystemName = definition.name;
35
+ emitDesignSystemChange();
36
+ }
37
+ return definition;
38
+ };
39
+ export const getDesignSystem = (name) => {
40
+ if (!name) {
41
+ return null;
42
+ }
43
+ return designSystems.get(name) ?? null;
44
+ };
45
+ export const setActiveDesignSystem = (name) => {
46
+ if (name && !designSystems.has(name)) {
47
+ throw new Error(`Unknown design system: ${name}`);
48
+ }
49
+ activeDesignSystemName = name;
50
+ emitDesignSystemChange();
51
+ };
52
+ export const getActiveDesignSystem = () => activeDesignSystemName ? getDesignSystem(activeDesignSystemName) : null;
53
+ export const listDesignSystems = () => Array.from(designSystems.values());
54
+ export const resolveDesignSystemTokens = (name) => {
55
+ const system = name === undefined ? getActiveDesignSystem() : getDesignSystem(name);
56
+ return system?.tokens ?? {};
57
+ };
58
+ export const applyDesignTokens = (target, tokensOrSystemName, options = {}) => {
59
+ const prefix = options.prefix ?? DEFAULT_TOKEN_PREFIX;
60
+ const tokens = typeof tokensOrSystemName === "string" || tokensOrSystemName == null
61
+ ? resolveDesignSystemTokens(tokensOrSystemName)
62
+ : tokensOrSystemName;
63
+ const appliedVariables = [];
64
+ for (const [tokenName, tokenValue] of Object.entries(tokens)) {
65
+ const variableName = resolveTokenVariableName(tokenName, prefix);
66
+ target.style.setProperty(variableName, tokenValue);
67
+ appliedVariables.push(variableName);
68
+ }
69
+ return appliedVariables;
70
+ };
71
+ export const createDesignTokenStyleText = (tokensOrSystemName, options = {}) => {
72
+ const prefix = options.prefix ?? DEFAULT_TOKEN_PREFIX;
73
+ const selector = options.selector ?? ":root";
74
+ const tokens = typeof tokensOrSystemName === "string" || tokensOrSystemName == null
75
+ ? resolveDesignSystemTokens(tokensOrSystemName)
76
+ : tokensOrSystemName;
77
+ const declarations = Object.entries(tokens)
78
+ .map(([tokenName, tokenValue]) => ` ${resolveTokenVariableName(tokenName, prefix)}: ${tokenValue};`)
79
+ .join("\n");
80
+ return `${selector} {\n${declarations}\n}`;
81
+ };
82
+ export const resolveDesignIcon = (iconName, systemName) => {
83
+ const system = systemName === undefined ? getActiveDesignSystem() : getDesignSystem(systemName);
84
+ return renderAsset(system?.icons?.[iconName], { kind: "icon", name: iconName });
85
+ };
86
+ export const resolveDesignIllustration = (illustrationName, systemName) => {
87
+ const system = systemName === undefined ? getActiveDesignSystem() : getDesignSystem(systemName);
88
+ return renderAsset(system?.illustrations?.[illustrationName], {
89
+ kind: "illustration",
90
+ name: illustrationName,
91
+ });
92
+ };
@@ -0,0 +1,16 @@
1
+ export type DesignTokenMap = Record<string, string>;
2
+ export interface DesignAssetRenderContext {
3
+ kind: "icon" | "illustration";
4
+ name: string;
5
+ }
6
+ export type DesignAssetRenderer = string | ((context: DesignAssetRenderContext) => string);
7
+ export interface DesignSystemDefinition {
8
+ name: string;
9
+ tokens?: DesignTokenMap;
10
+ icons?: Record<string, DesignAssetRenderer>;
11
+ illustrations?: Record<string, DesignAssetRenderer>;
12
+ }
13
+ export interface ApplyDesignTokensOptions {
14
+ prefix?: string;
15
+ selector?: string;
16
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { boeFontFamily, boeType, boeTypeStyles, boeTypographyHostDeclaration, } from "./tokens.js";
2
+ export type { BoeTypeRole } from "./tokens.js";
@@ -0,0 +1 @@
1
+ export { boeFontFamily, boeType, boeTypeStyles, boeTypographyHostDeclaration, } from "./tokens.js";
@@ -0,0 +1,76 @@
1
+ /** Authoritative modern Box typography stack. Lato belongs to legacy BUE only. */
2
+ export declare const boeFontFamily: {
3
+ readonly base: "var(--boe-token-font-family-base, InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif)";
4
+ readonly fallback: "InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif";
5
+ };
6
+ export interface BoeTypeRole {
7
+ fontSize: string;
8
+ fontWeight: 400 | 500 | 600 | 700;
9
+ letterSpacing: string;
10
+ lineHeight: string;
11
+ }
12
+ /** Product type roles derived from the current Box measurements in the visual reference contract. */
13
+ export declare const boeType: {
14
+ readonly pageHeading: {
15
+ readonly fontSize: "21px";
16
+ readonly lineHeight: "32px";
17
+ readonly fontWeight: 700;
18
+ readonly letterSpacing: "-0.01em";
19
+ };
20
+ readonly dialogHeading: {
21
+ readonly fontSize: "19px";
22
+ readonly lineHeight: "24px";
23
+ readonly fontWeight: 700;
24
+ readonly letterSpacing: "-0.005em";
25
+ };
26
+ readonly sectionHeading: {
27
+ readonly fontSize: "16px";
28
+ readonly lineHeight: "24px";
29
+ readonly fontWeight: 700;
30
+ readonly letterSpacing: "0";
31
+ };
32
+ readonly button: {
33
+ readonly fontSize: "16px";
34
+ readonly lineHeight: "24px";
35
+ readonly fontWeight: 700;
36
+ readonly letterSpacing: "0";
37
+ };
38
+ readonly menuItem: {
39
+ readonly fontSize: "15px";
40
+ readonly lineHeight: "20px";
41
+ readonly fontWeight: 400;
42
+ readonly letterSpacing: "0";
43
+ };
44
+ readonly body: {
45
+ readonly fontSize: "14px";
46
+ readonly lineHeight: "20px";
47
+ readonly fontWeight: 400;
48
+ readonly letterSpacing: "0";
49
+ };
50
+ readonly bodyStrong: {
51
+ readonly fontSize: "14px";
52
+ readonly lineHeight: "20px";
53
+ readonly fontWeight: 600;
54
+ readonly letterSpacing: "0";
55
+ };
56
+ readonly label: {
57
+ readonly fontSize: "13px";
58
+ readonly lineHeight: "20px";
59
+ readonly fontWeight: 600;
60
+ readonly letterSpacing: "0";
61
+ };
62
+ readonly metadata: {
63
+ readonly fontSize: "12px";
64
+ readonly lineHeight: "16px";
65
+ readonly fontWeight: 400;
66
+ readonly letterSpacing: "0";
67
+ };
68
+ readonly caption: {
69
+ readonly fontSize: "11px";
70
+ readonly lineHeight: "16px";
71
+ readonly fontWeight: 600;
72
+ readonly letterSpacing: "0";
73
+ };
74
+ };
75
+ export declare const boeTypographyHostDeclaration: string;
76
+ export declare const boeTypeStyles: (selector: string, role: BoeTypeRole) => string;
@@ -0,0 +1,27 @@
1
+ /** Authoritative modern Box typography stack. Lato belongs to legacy BUE only. */
2
+ export const boeFontFamily = {
3
+ base: "var(--boe-token-font-family-base, InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif)",
4
+ fallback: "InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",
5
+ };
6
+ /** Product type roles derived from the current Box measurements in the visual reference contract. */
7
+ export const boeType = {
8
+ pageHeading: { fontSize: "21px", lineHeight: "32px", fontWeight: 700, letterSpacing: "-0.01em" },
9
+ dialogHeading: { fontSize: "19px", lineHeight: "24px", fontWeight: 700, letterSpacing: "-0.005em" },
10
+ sectionHeading: { fontSize: "16px", lineHeight: "24px", fontWeight: 700, letterSpacing: "0" },
11
+ button: { fontSize: "16px", lineHeight: "24px", fontWeight: 700, letterSpacing: "0" },
12
+ menuItem: { fontSize: "15px", lineHeight: "20px", fontWeight: 400, letterSpacing: "0" },
13
+ body: { fontSize: "14px", lineHeight: "20px", fontWeight: 400, letterSpacing: "0" },
14
+ bodyStrong: { fontSize: "14px", lineHeight: "20px", fontWeight: 600, letterSpacing: "0" },
15
+ label: { fontSize: "13px", lineHeight: "20px", fontWeight: 600, letterSpacing: "0" },
16
+ metadata: { fontSize: "12px", lineHeight: "16px", fontWeight: 400, letterSpacing: "0" },
17
+ caption: { fontSize: "11px", lineHeight: "16px", fontWeight: 600, letterSpacing: "0" },
18
+ };
19
+ export const boeTypographyHostDeclaration = `font-family: ${boeFontFamily.base};`;
20
+ export const boeTypeStyles = (selector, role) => `
21
+ ${selector} {
22
+ font-size: ${role.fontSize};
23
+ line-height: ${role.lineHeight};
24
+ font-weight: ${role.fontWeight};
25
+ letter-spacing: ${role.letterSpacing};
26
+ }
27
+ `;