@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,218 @@
1
+ import { BaseElement } from "./element.js";
2
+ const mirroredFormValues = new WeakMap();
3
+ export const getMirroredFormValue = (internals) => mirroredFormValues.get(internals) ?? null;
4
+ /** Build a multi-entry FormData payload (empty selection → `null`). */
5
+ export const formDataFromNamedValues = (name, values) => {
6
+ if (values.length === 0) {
7
+ return null;
8
+ }
9
+ const key = name || "value";
10
+ const data = new FormData();
11
+ for (const value of values) {
12
+ data.append(key, value);
13
+ }
14
+ return data;
15
+ };
16
+ /** Restore string[] from FormData / JSON / comma-separated / single string. */
17
+ export const stringValuesFromFormValue = (value, name) => {
18
+ if (value instanceof FormData) {
19
+ const key = name || "value";
20
+ return value.getAll(key).map(entry => String(entry));
21
+ }
22
+ if (typeof value !== "string" || value === "") {
23
+ return [];
24
+ }
25
+ try {
26
+ const parsed = JSON.parse(value);
27
+ if (Array.isArray(parsed)) {
28
+ return parsed.map(entry => String(entry));
29
+ }
30
+ }
31
+ catch {
32
+ // fall through
33
+ }
34
+ if (value.includes(",")) {
35
+ return value
36
+ .split(",")
37
+ .map(entry => entry.trim())
38
+ .filter(entry => entry.length > 0);
39
+ }
40
+ return [value];
41
+ };
42
+ /** Range pair as FormData (`${name}-start` / `${name}-end`). */
43
+ export const formDataFromRange = (name, start, end) => {
44
+ const base = name || "range";
45
+ const data = new FormData();
46
+ data.append(`${base}-start`, String(start));
47
+ data.append(`${base}-end`, String(end));
48
+ return data;
49
+ };
50
+ export const rangeFromFormValue = (value, name, fallback) => {
51
+ if (value instanceof FormData) {
52
+ const base = name || "range";
53
+ const startRaw = value.get(`${base}-start`);
54
+ const endRaw = value.get(`${base}-end`);
55
+ const start = startRaw == null ? fallback.start : Number(startRaw);
56
+ const end = endRaw == null ? fallback.end : Number(endRaw);
57
+ return {
58
+ start: Number.isFinite(start) ? start : fallback.start,
59
+ end: Number.isFinite(end) ? end : fallback.end,
60
+ };
61
+ }
62
+ if (typeof value === "string" && value) {
63
+ try {
64
+ const parsed = JSON.parse(value);
65
+ const start = Number(parsed.start);
66
+ const end = Number(parsed.end);
67
+ if (Number.isFinite(start) && Number.isFinite(end)) {
68
+ return { start, end };
69
+ }
70
+ }
71
+ catch {
72
+ // fall through
73
+ }
74
+ }
75
+ return fallback;
76
+ };
77
+ const writeFormValue = (internals, value) => {
78
+ mirroredFormValues.set(internals, value);
79
+ const setFormValue = internals.setFormValue;
80
+ if (typeof setFormValue === "function") {
81
+ setFormValue.call(internals, value);
82
+ }
83
+ };
84
+ const writeValidity = (internals, invalid, message) => {
85
+ const setValidity = internals.setValidity;
86
+ if (typeof setValidity !== "function") {
87
+ return;
88
+ }
89
+ if (invalid) {
90
+ setValidity.call(internals, { customError: true }, message || "Invalid value");
91
+ }
92
+ else {
93
+ setValidity.call(internals, {});
94
+ }
95
+ };
96
+ /** Shared invalid-state styles using the status-error token. */
97
+ export const boeFormFieldErrorStyles = `
98
+ :host([invalid]) [part="input"],
99
+ :host([invalid]) [part="textarea"],
100
+ :host([invalid]) [part="select"],
101
+ :host([invalid]) [part="control"],
102
+ :host([invalid]) [part="editor"] {
103
+ border-color: var(--boe-token-surface-status-surface-error, #ed3757);
104
+ }
105
+
106
+ :host([invalid]) [part="input"]:focus-visible,
107
+ :host([invalid]) [part="textarea"]:focus-visible,
108
+ :host([invalid]) [part="select"]:focus-visible,
109
+ :host([invalid]) [part="control"]:focus-visible {
110
+ border-color: var(--boe-token-surface-status-surface-error, #ed3757);
111
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--boe-token-surface-status-surface-error, #ed3757) 22%, transparent);
112
+ }
113
+
114
+ [part="error-message"] {
115
+ margin: 0;
116
+ color: var(--boe-token-surface-status-surface-error, #ed3757);
117
+ font-size: 0.82rem;
118
+ line-height: 1.35;
119
+ }
120
+
121
+ [part="error-message"][hidden] {
122
+ display: none;
123
+ }
124
+ `;
125
+ export const FORM_ERROR_MESSAGE_ID = "boe-field-error";
126
+ export const formErrorMessageMarkup = () => `<p part="error-message" id="${FORM_ERROR_MESSAGE_ID}" role="alert" hidden></p>`;
127
+ export class FormAssociatedElement extends BaseElement {
128
+ static formAssociated = true;
129
+ /** Attributes every form control should observe (merge into subclass lists). */
130
+ static formObservedAttributes = ["name", "invalid", "error-message"];
131
+ /** ElementInternals for form association (public for tests / advanced hosts). */
132
+ internals;
133
+ defaultFormValue = null;
134
+ defaultCaptured = false;
135
+ constructor() {
136
+ super();
137
+ this.internals = this.attachInternals();
138
+ }
139
+ get name() {
140
+ return this.getAttribute("name") ?? "";
141
+ }
142
+ set name(value) {
143
+ if (value) {
144
+ this.setAttribute("name", value);
145
+ }
146
+ else {
147
+ this.removeAttribute("name");
148
+ }
149
+ }
150
+ get invalid() {
151
+ return this.hasAttribute("invalid");
152
+ }
153
+ set invalid(value) {
154
+ this.toggleAttribute("invalid", Boolean(value));
155
+ }
156
+ get errorMessage() {
157
+ return this.getAttribute("error-message") ?? "";
158
+ }
159
+ set errorMessage(value) {
160
+ if (value) {
161
+ this.setAttribute("error-message", value);
162
+ }
163
+ else {
164
+ this.removeAttribute("error-message");
165
+ }
166
+ }
167
+ connectedCallback() {
168
+ super.connectedCallback();
169
+ if (!this.defaultCaptured) {
170
+ this.defaultFormValue = this.getFormValue();
171
+ this.defaultCaptured = true;
172
+ }
173
+ this.syncFormAssociation();
174
+ }
175
+ formResetCallback() {
176
+ this.restoreFormValue(this.defaultFormValue);
177
+ this.syncFormAssociation();
178
+ }
179
+ formStateRestoreCallback(state) {
180
+ this.restoreFormValue(state);
181
+ this.syncFormAssociation();
182
+ }
183
+ /** Push the current value + validity into ElementInternals. */
184
+ syncFormAssociation() {
185
+ const disabled = this.hasAttribute("disabled");
186
+ writeFormValue(this.internals, disabled ? null : this.getFormValue());
187
+ writeValidity(this.internals, this.invalid, this.errorMessage);
188
+ }
189
+ /**
190
+ * Apply `aria-invalid` / `aria-errormessage` on the focusable control and
191
+ * update the error message region.
192
+ */
193
+ applyInvalidState(control, messageEl) {
194
+ this.applyInvalidStateToControls(control ? [control] : [], messageEl);
195
+ }
196
+ /** Apply invalid ARIA to every focusable control in a multi-option field. */
197
+ applyInvalidStateToControls(controls, messageEl) {
198
+ const invalid = this.invalid;
199
+ const message = this.errorMessage;
200
+ for (const control of controls) {
201
+ if (!control) {
202
+ continue;
203
+ }
204
+ control.setAttribute("aria-invalid", String(invalid));
205
+ if (invalid && message) {
206
+ control.setAttribute("aria-errormessage", FORM_ERROR_MESSAGE_ID);
207
+ }
208
+ else {
209
+ control.removeAttribute("aria-errormessage");
210
+ }
211
+ }
212
+ if (messageEl) {
213
+ messageEl.textContent = message;
214
+ messageEl.hidden = !(invalid && Boolean(message));
215
+ }
216
+ this.syncFormAssociation();
217
+ }
218
+ }
@@ -0,0 +1,6 @@
1
+ export { Controller } from "./controller.js";
2
+ export { TypedEventEmitter } from "./event-emitter.js";
3
+ export type { EventMap, Unsubscribe } from "./event-emitter.js";
4
+ export { BaseElement } from "./element.js";
5
+ export { FORM_ERROR_MESSAGE_ID, FormAssociatedElement, boeFormFieldErrorStyles, formDataFromNamedValues, formDataFromRange, formErrorMessageMarkup, getMirroredFormValue, rangeFromFormValue, stringValuesFromFormValue, } from "./form-associated.js";
6
+ export type { FormValue } from "./form-associated.js";
@@ -0,0 +1,4 @@
1
+ export { Controller } from "./controller.js";
2
+ export { TypedEventEmitter } from "./event-emitter.js";
3
+ export { BaseElement } from "./element.js";
4
+ export { FORM_ERROR_MESSAGE_ID, FormAssociatedElement, boeFormFieldErrorStyles, formDataFromNamedValues, formDataFromRange, formErrorMessageMarkup, getMirroredFormValue, rangeFromFormValue, stringValuesFromFormValue, } from "./form-associated.js";
@@ -0,0 +1 @@
1
+ export type JsonSchema = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Focus management helpers for modal dialogs, drawers, and transient menus.
3
+ */
4
+ /** Visible, enabled tabbable controls inside `container` (light or shadow). */
5
+ export declare const getTabbableElements: (container: ParentNode) => HTMLElement[];
6
+ /**
7
+ * Keep Tab / Shift+Tab cycling inside `container` while a modal is open.
8
+ * Call from a `keydown` listener when `event.key === "Tab"`.
9
+ */
10
+ export declare const trapTabKey: (event: KeyboardEvent, container: ParentNode) => void;
11
+ /** Capture the currently focused element and restore it later (menu/dialog close). */
12
+ export declare class FocusRestore {
13
+ private previous;
14
+ capture(from?: Element | null): void;
15
+ restore(): void;
16
+ clear(): void;
17
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Focus management helpers for modal dialogs, drawers, and transient menus.
3
+ */
4
+ const TABBABLE_SELECTOR = [
5
+ "a[href]",
6
+ "button:not([disabled])",
7
+ "input:not([disabled]):not([type='hidden'])",
8
+ "select:not([disabled])",
9
+ "textarea:not([disabled])",
10
+ "[tabindex]:not([tabindex='-1'])",
11
+ ].join(", ");
12
+ const isDisabled = (element) => element.hasAttribute("disabled") ||
13
+ element.disabled === true ||
14
+ element.getAttribute("aria-disabled") === "true";
15
+ const isVisible = (element) => {
16
+ if (element.hidden || element.getAttribute("aria-hidden") === "true") {
17
+ return false;
18
+ }
19
+ // Closest [hidden] ancestor (common pattern for closed panels).
20
+ if (element.closest("[hidden]")) {
21
+ return false;
22
+ }
23
+ const style = element.ownerDocument.defaultView?.getComputedStyle(element);
24
+ if (!style) {
25
+ return true;
26
+ }
27
+ if (style.display === "none" || style.visibility === "hidden") {
28
+ return false;
29
+ }
30
+ return true;
31
+ };
32
+ /** Visible, enabled tabbable controls inside `container` (light or shadow). */
33
+ export const getTabbableElements = (container) => {
34
+ return Array.from(container.querySelectorAll(TABBABLE_SELECTOR)).filter(element => {
35
+ if (isDisabled(element)) {
36
+ return false;
37
+ }
38
+ if (element.tabIndex < 0) {
39
+ return false;
40
+ }
41
+ return isVisible(element);
42
+ });
43
+ };
44
+ /**
45
+ * Keep Tab / Shift+Tab cycling inside `container` while a modal is open.
46
+ * Call from a `keydown` listener when `event.key === "Tab"`.
47
+ */
48
+ export const trapTabKey = (event, container) => {
49
+ if (event.key !== "Tab") {
50
+ return;
51
+ }
52
+ const focusables = getTabbableElements(container);
53
+ if (focusables.length === 0) {
54
+ event.preventDefault();
55
+ return;
56
+ }
57
+ const first = focusables[0];
58
+ const last = focusables[focusables.length - 1];
59
+ const root = container.getRootNode?.();
60
+ const active = root?.activeElement ?? document.activeElement;
61
+ if (event.shiftKey) {
62
+ if (active === first || !focusables.includes(active)) {
63
+ event.preventDefault();
64
+ last.focus();
65
+ }
66
+ return;
67
+ }
68
+ if (active === last || !focusables.includes(active)) {
69
+ event.preventDefault();
70
+ first.focus();
71
+ }
72
+ };
73
+ /** Capture the currently focused element and restore it later (menu/dialog close). */
74
+ export class FocusRestore {
75
+ previous = null;
76
+ capture(from = document.activeElement) {
77
+ this.previous = from instanceof HTMLElement ? from : null;
78
+ }
79
+ restore() {
80
+ const target = this.previous;
81
+ this.previous = null;
82
+ if (!target) {
83
+ return;
84
+ }
85
+ queueMicrotask(() => {
86
+ if (typeof target.focus === "function") {
87
+ target.focus();
88
+ }
89
+ });
90
+ }
91
+ clear() {
92
+ this.previous = null;
93
+ }
94
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Heading markup helpers so `heading` attributes expose real document outline
3
+ * semantics (`<h*>`) instead of `<div>` / `<strong part="title">`.
4
+ */
5
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
6
+ export type RenderHeadingOptions = {
7
+ /** Heading level. Defaults to 2 (section-level). */
8
+ level?: HeadingLevel;
9
+ /** Space-separated `part` tokens. Defaults to `"title"`. */
10
+ part?: string;
11
+ id?: string;
12
+ hidden?: boolean;
13
+ };
14
+ /**
15
+ * Render a native heading element with escaped text.
16
+ * Keep `part="title"` so existing `::part(title)` / `[part="title"]` styles apply.
17
+ */
18
+ export declare const renderHeadingHtml: (text: string, options?: RenderHeadingOptions) => string;
19
+ /**
20
+ * Open tag for headings whose text is set later via `textContent`
21
+ * (avoids double-escaping when content is assigned from JS).
22
+ */
23
+ export declare const headingOpenTag: (options?: RenderHeadingOptions) => string;
24
+ export declare const headingCloseTag: (level?: HeadingLevel) => string;
25
+ /** CSS reset so native headings inherit component typography instead of UA margins. */
26
+ export declare const boeHeadingResetStyles: (selector: string) => string;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Heading markup helpers so `heading` attributes expose real document outline
3
+ * semantics (`<h*>`) instead of `<div>` / `<strong part="title">`.
4
+ */
5
+ const escapeHtml = (value) => value
6
+ .replaceAll("&", "&amp;")
7
+ .replaceAll("<", "&lt;")
8
+ .replaceAll(">", "&gt;")
9
+ .replaceAll('"', "&quot;")
10
+ .replaceAll("'", "&#39;");
11
+ /**
12
+ * Render a native heading element with escaped text.
13
+ * Keep `part="title"` so existing `::part(title)` / `[part="title"]` styles apply.
14
+ */
15
+ export const renderHeadingHtml = (text, options = {}) => {
16
+ const level = options.level ?? 2;
17
+ const part = options.part ?? "title";
18
+ const idAttr = options.id ? ` id="${escapeHtml(options.id)}"` : "";
19
+ const hiddenAttr = options.hidden ? " hidden" : "";
20
+ return `<h${level} part="${escapeHtml(part)}"${idAttr}${hiddenAttr}>${escapeHtml(text)}</h${level}>`;
21
+ };
22
+ /**
23
+ * Open tag for headings whose text is set later via `textContent`
24
+ * (avoids double-escaping when content is assigned from JS).
25
+ */
26
+ export const headingOpenTag = (options = {}) => {
27
+ const level = options.level ?? 2;
28
+ const part = options.part ?? "title";
29
+ const idAttr = options.id ? ` id="${escapeHtml(options.id)}"` : "";
30
+ const hiddenAttr = options.hidden ? " hidden" : "";
31
+ return `<h${level} part="${escapeHtml(part)}"${idAttr}${hiddenAttr}>`;
32
+ };
33
+ export const headingCloseTag = (level = 2) => `</h${level}>`;
34
+ /** CSS reset so native headings inherit component typography instead of UA margins. */
35
+ export const boeHeadingResetStyles = (selector) => `
36
+ ${selector} {
37
+ margin: 0;
38
+ font: inherit;
39
+ }
40
+ `;
@@ -0,0 +1,5 @@
1
+ export { applyRovingTabindex, focusRovingItem, handleRovingKeydown, nextRovingIndex, } from "./keyboard.js";
2
+ export type { RovingKeyOptions, RovingOrientation } from "./keyboard.js";
3
+ export { FocusRestore, getTabbableElements, trapTabKey } from "./focus.js";
4
+ export { boeHeadingResetStyles, headingCloseTag, headingOpenTag, renderHeadingHtml, } from "./heading.js";
5
+ export type { HeadingLevel, RenderHeadingOptions } from "./heading.js";
@@ -0,0 +1,3 @@
1
+ export { applyRovingTabindex, focusRovingItem, handleRovingKeydown, nextRovingIndex, } from "./keyboard.js";
2
+ export { FocusRestore, getTabbableElements, trapTabKey } from "./focus.js";
3
+ export { boeHeadingResetStyles, headingCloseTag, headingOpenTag, renderHeadingHtml, } from "./heading.js";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Shared keyboard helpers for composite widgets (menu, toolbar, listbox, radiogroup).
3
+ * Prefer these over per-component Arrow/Home/End copies.
4
+ */
5
+ export type RovingOrientation = "horizontal" | "vertical" | "both";
6
+ export type RovingKeyOptions = {
7
+ /** When true (default), Arrow past the ends wraps. */
8
+ wrap?: boolean;
9
+ /** Which arrow keys participate. Default `"both"`. */
10
+ orientation?: RovingOrientation;
11
+ };
12
+ /**
13
+ * Map a keyboard event key to the next index in a roving-tabindex collection.
14
+ * Returns `null` when the key is not a navigation key for the orientation.
15
+ */
16
+ export declare const nextRovingIndex: (key: string, currentIndex: number, length: number, options?: RovingKeyOptions) => number | null;
17
+ /** Set `tabIndex` so only `activeIndex` is in the tab order (roving tabindex). */
18
+ export declare const applyRovingTabindex: (items: readonly HTMLElement[], activeIndex: number) => void;
19
+ /**
20
+ * Focus the item at `index` after applying roving tabindex.
21
+ * Uses `queueMicrotask` so callers can finish DOM patches first.
22
+ */
23
+ export declare const focusRovingItem: (items: readonly HTMLElement[], index: number) => void;
24
+ /**
25
+ * Handle Arrow/Home/End inside a toolbar / menu / radiogroup collection.
26
+ * Returns true when the event was handled.
27
+ */
28
+ export declare const handleRovingKeydown: (event: KeyboardEvent, items: readonly HTMLElement[], options?: RovingKeyOptions) => boolean;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Shared keyboard helpers for composite widgets (menu, toolbar, listbox, radiogroup).
3
+ * Prefer these over per-component Arrow/Home/End copies.
4
+ */
5
+ /**
6
+ * Map a keyboard event key to the next index in a roving-tabindex collection.
7
+ * Returns `null` when the key is not a navigation key for the orientation.
8
+ */
9
+ export const nextRovingIndex = (key, currentIndex, length, options = {}) => {
10
+ if (length <= 0) {
11
+ return null;
12
+ }
13
+ const wrap = options.wrap ?? true;
14
+ const orientation = options.orientation ?? "both";
15
+ const lastIndex = length - 1;
16
+ const clamped = Math.max(0, Math.min(lastIndex, currentIndex));
17
+ const isNext = ((orientation === "horizontal" || orientation === "both") && key === "ArrowRight") ||
18
+ ((orientation === "vertical" || orientation === "both") && key === "ArrowDown");
19
+ const isPrevious = ((orientation === "horizontal" || orientation === "both") && key === "ArrowLeft") ||
20
+ ((orientation === "vertical" || orientation === "both") && key === "ArrowUp");
21
+ if (isNext) {
22
+ if (clamped >= lastIndex) {
23
+ return wrap ? 0 : lastIndex;
24
+ }
25
+ return clamped + 1;
26
+ }
27
+ if (isPrevious) {
28
+ if (clamped <= 0) {
29
+ return wrap ? lastIndex : 0;
30
+ }
31
+ return clamped - 1;
32
+ }
33
+ if (key === "Home") {
34
+ return 0;
35
+ }
36
+ if (key === "End") {
37
+ return lastIndex;
38
+ }
39
+ return null;
40
+ };
41
+ /** Set `tabIndex` so only `activeIndex` is in the tab order (roving tabindex). */
42
+ export const applyRovingTabindex = (items, activeIndex) => {
43
+ items.forEach((item, index) => {
44
+ item.tabIndex = index === activeIndex ? 0 : -1;
45
+ });
46
+ };
47
+ /**
48
+ * Focus the item at `index` after applying roving tabindex.
49
+ * Uses `queueMicrotask` so callers can finish DOM patches first.
50
+ */
51
+ export const focusRovingItem = (items, index) => {
52
+ applyRovingTabindex(items, index);
53
+ const target = items[index];
54
+ if (!target) {
55
+ return;
56
+ }
57
+ queueMicrotask(() => {
58
+ target.focus();
59
+ });
60
+ };
61
+ /**
62
+ * Handle Arrow/Home/End inside a toolbar / menu / radiogroup collection.
63
+ * Returns true when the event was handled.
64
+ */
65
+ export const handleRovingKeydown = (event, items, options = {}) => {
66
+ const currentIndex = items.indexOf(event.target);
67
+ if (currentIndex < 0) {
68
+ return false;
69
+ }
70
+ const nextIndex = nextRovingIndex(event.key, currentIndex, items.length, options);
71
+ if (nextIndex == null) {
72
+ return false;
73
+ }
74
+ event.preventDefault();
75
+ focusRovingItem(items, nextIndex);
76
+ return true;
77
+ };
@@ -0,0 +1 @@
1
+ export { boeControl, boeInputControlStyles, boeOverlay, boePanel, boeRadius, boeSpace, } from "./tokens.js";
@@ -0,0 +1 @@
1
+ export { boeControl, boeInputControlStyles, boeOverlay, boePanel, boeRadius, boeSpace, } from "./tokens.js";
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Box Design Language geometry — sourced from box-ui-elements
3
+ * `src/styles/constants/_layout.scss`, `_buttons.scss`, and `_inputs.scss`.
4
+ *
5
+ * Prefer these over ad-hoc rem bands when styling everyday controls so the
6
+ * catalog tracks upstream Box chrome (4px grid, 32px controls, 4/6/8/12 radii).
7
+ */
8
+ /** `$bdl-grid-unit` — spacing scale root (4px). */
9
+ export declare const boeSpace: {
10
+ readonly unit: "4px";
11
+ /** 1 × grid */
12
+ readonly 1: "4px";
13
+ /** 2 × grid */
14
+ readonly 2: "8px";
15
+ /** 3 × grid */
16
+ readonly 3: "12px";
17
+ /** 4 × grid — button horizontal padding */
18
+ readonly 4: "16px";
19
+ /** 5 × grid */
20
+ readonly 5: "20px";
21
+ /** 6 × grid — overlay padding */
22
+ readonly 6: "24px";
23
+ /** 8 × grid — modal-ish pad / control height */
24
+ readonly 8: "32px";
25
+ /** 10 × grid */
26
+ readonly 10: "40px";
27
+ /** 12 × grid — menu-item trailing pad */
28
+ readonly 12: "48px";
29
+ };
30
+ /**
31
+ * Pattern / panel shell chrome — denser BDL card surfaces (12 / 8)
32
+ * used by share panels, explorers, insights cards, etc.
33
+ */
34
+ export declare const boePanel: {
35
+ readonly padding: "12px";
36
+ /** Card / panel surface — Box 16px (was 8px). */
37
+ readonly radius: "16px";
38
+ readonly gap: "12px";
39
+ readonly border: "1px solid var(--boe-token-stroke-stroke, #e8e8e8)";
40
+ readonly background: "var(--boe-token-surface-surface, #ffffff)";
41
+ /** Content-sidebar-ish drawer width */
42
+ readonly drawerWidth: "340px";
43
+ };
44
+ /**
45
+ * Overlay / menu / flyout chrome — `mixins/_overlay.scss` + Menu.scss.
46
+ */
47
+ export declare const boeOverlay: {
48
+ /** Container pad — 3 × grid */
49
+ readonly padding: "12px";
50
+ /** Menu / popover surface — Box 20px (was 8px). */
51
+ readonly radius: "20px";
52
+ readonly shadow: "0 4px 12px 0 rgb(0 0 0 / 10%)";
53
+ readonly border: "1px solid var(--boe-token-stroke-stroke, #e8e8e8)";
54
+ /** Menu item — min-height 30; item radius 12px (Box). */
55
+ readonly itemPadding: "8px 48px 8px 8px";
56
+ readonly itemMinHeight: "30px";
57
+ readonly itemRadius: "12px";
58
+ /** Modal — dialog radius 24px (Box; was 12px). */
59
+ readonly modalPadding: "30px";
60
+ readonly modalWidth: "460px";
61
+ readonly modalRadius: "24px";
62
+ readonly modalShadow: "0 1px 1px 1px rgb(0 0 0 / 5%)";
63
+ readonly modalTitleSize: "16px";
64
+ readonly modalBackdrop: "rgba(0, 0, 0, 0.75)";
65
+ };
66
+ /**
67
+ * Corner radii. box-open-elements tracks the **live Box web app** (Blueprint),
68
+ * which ships pill-shaped controls and larger surface radii — captured from
69
+ * `app.box.com` (see `docs/audits/box-webapp-reference.data.json`). This is an
70
+ * intentional divergence from box-ui-elements' legacy SCSS geometry (4/6/8/12);
71
+ * the Layer 1 audit records it as such.
72
+ *
73
+ * Role guide: `control` for buttons/inputs, `field` for search + dialogs, `nav`
74
+ * for nav items, `large` for cards/panels, `med` for rows/small surfaces,
75
+ * `size` for badges/checkboxes, `pill` for chips/toggles.
76
+ */
77
+ export declare const boeRadius: {
78
+ /** Badges, checkboxes, tiny chips — Box ~4px. */
79
+ readonly size: "4px";
80
+ /** Rows, small surfaces, list-item hover — Box 12px (was 6px). */
81
+ readonly med: "12px";
82
+ /** Cards, panels — Box 16px (was 8px). */
83
+ readonly large: "16px";
84
+ /** Controls (buttons, inputs) + menus — Box 20px (was 12px). */
85
+ readonly xlarge: "20px";
86
+ /** Interactive controls — buttons, inputs. Box pill radius 20px. */
87
+ readonly control: "20px";
88
+ /** Large fields (search) + dialogs/modals — Box 24px. */
89
+ readonly field: "24px";
90
+ /** Nav items — Box 28px. */
91
+ readonly nav: "28px";
92
+ /** True pills — chips, toggles, label-pills. */
93
+ readonly pill: "999px";
94
+ };
95
+ /** `$bdl-btn-height*` + related control metrics. */
96
+ export declare const boeControl: {
97
+ readonly height: "32px";
98
+ readonly heightLarge: "40px";
99
+ readonly paddingInline: "16px";
100
+ /** Pill control radius — buttons/inputs. Box 20px. */
101
+ readonly radius: "20px";
102
+ /** Shared input pad from `@mixin box-inputs` */
103
+ readonly inputPadding: "7px";
104
+ /** BUE select control height */
105
+ readonly selectHeight: "34px";
106
+ /** Legacy body font used on `.btn` */
107
+ readonly fontSize: "13px";
108
+ readonly letterSpacing: "0.035em";
109
+ /** BUE disabled control opacity */
110
+ readonly disabledOpacity: "0.4";
111
+ /** Input border — `$bdl-gray-20` / SurfaceSurfaceQuaternary */
112
+ readonly inputBorder: "var(--boe-token-surface-surface-quaternary, #d3d3d3)";
113
+ /** Button secondary border — `$bdl-gray-30` / StrokeStrokeHover */
114
+ readonly buttonBorder: "var(--boe-token-stroke-stroke-hover, #bcbcbc)";
115
+ /** `@mixin box-inputs` inset shadow */
116
+ readonly inputInsetShadow: "inset 0 2px 4px rgb(0 0 0 / 10%)";
117
+ /** Overlay / menu shadow — `mixins/_overlay.scss` */
118
+ readonly overlayShadow: "0 4px 12px 0 rgb(0 0 0 / 10%)";
119
+ /** Primary button focus inset ring */
120
+ readonly primaryFocusShadow: "inset 0 0 0 1px rgb(255 255 255 / 80%), 0 1px 2px rgb(0 0 0 / 10%)";
121
+ };
122
+ /** Shared text-field / select chrome matching `@mixin box-inputs`. */
123
+ export declare const boeInputControlStyles: (selector: string) => string;