@salt-ds/lab 1.0.0-alpha.92 → 1.0.0-alpha.94

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 (204) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/css/salt-lab.css +166 -249
  3. package/dist-cjs/index.js +6 -24
  4. package/dist-cjs/index.js.map +1 -1
  5. package/dist-cjs/toolbar-next/ToolbarContentNext.css.js +6 -0
  6. package/dist-cjs/toolbar-next/ToolbarContentNext.css.js.map +1 -0
  7. package/dist-cjs/toolbar-next/ToolbarContentNext.js +32 -0
  8. package/dist-cjs/toolbar-next/ToolbarContentNext.js.map +1 -0
  9. package/dist-cjs/toolbar-next/ToolbarNext.css.js +6 -0
  10. package/dist-cjs/toolbar-next/ToolbarNext.css.js.map +1 -0
  11. package/dist-cjs/toolbar-next/ToolbarNext.js +394 -0
  12. package/dist-cjs/toolbar-next/ToolbarNext.js.map +1 -0
  13. package/dist-cjs/toolbar-next/ToolbarNextOverflow.css.js +6 -0
  14. package/dist-cjs/toolbar-next/ToolbarNextOverflow.css.js.map +1 -0
  15. package/dist-cjs/toolbar-next/ToolbarNextOverflow.js +705 -0
  16. package/dist-cjs/toolbar-next/ToolbarNextOverflow.js.map +1 -0
  17. package/dist-cjs/toolbar-next/ToolbarNextOverflowFloatingBoundary.js +165 -0
  18. package/dist-cjs/toolbar-next/ToolbarNextOverflowFloatingBoundary.js.map +1 -0
  19. package/dist-cjs/toolbar-next/TooltrayNext.css.js +6 -0
  20. package/dist-cjs/toolbar-next/TooltrayNext.css.js.map +1 -0
  21. package/dist-cjs/toolbar-next/TooltrayNext.js +55 -0
  22. package/dist-cjs/toolbar-next/TooltrayNext.js.map +1 -0
  23. package/dist-cjs/toolbar-next/toolbarNextKeyboardUtils.js +391 -0
  24. package/dist-cjs/toolbar-next/toolbarNextKeyboardUtils.js.map +1 -0
  25. package/dist-cjs/toolbar-next/toolbarNextUtils.js +215 -0
  26. package/dist-cjs/toolbar-next/toolbarNextUtils.js.map +1 -0
  27. package/dist-cjs/toolbar-next/useToolbarNextKeyboardNavigation.js +334 -0
  28. package/dist-cjs/toolbar-next/useToolbarNextKeyboardNavigation.js.map +1 -0
  29. package/dist-cjs/toolbar-next/useToolbarNextOverflow.js +743 -0
  30. package/dist-cjs/toolbar-next/useToolbarNextOverflow.js.map +1 -0
  31. package/dist-es/index.js +3 -12
  32. package/dist-es/index.js.map +1 -1
  33. package/dist-es/toolbar-next/ToolbarContentNext.css.js +4 -0
  34. package/dist-es/toolbar-next/ToolbarContentNext.css.js.map +1 -0
  35. package/dist-es/toolbar-next/ToolbarContentNext.js +30 -0
  36. package/dist-es/toolbar-next/ToolbarContentNext.js.map +1 -0
  37. package/dist-es/toolbar-next/ToolbarNext.css.js +4 -0
  38. package/dist-es/toolbar-next/ToolbarNext.css.js.map +1 -0
  39. package/dist-es/toolbar-next/ToolbarNext.js +392 -0
  40. package/dist-es/toolbar-next/ToolbarNext.js.map +1 -0
  41. package/dist-es/toolbar-next/ToolbarNextOverflow.css.js +4 -0
  42. package/dist-es/toolbar-next/ToolbarNextOverflow.css.js.map +1 -0
  43. package/dist-es/toolbar-next/ToolbarNextOverflow.js +700 -0
  44. package/dist-es/toolbar-next/ToolbarNextOverflow.js.map +1 -0
  45. package/dist-es/toolbar-next/ToolbarNextOverflowFloatingBoundary.js +159 -0
  46. package/dist-es/toolbar-next/ToolbarNextOverflowFloatingBoundary.js.map +1 -0
  47. package/dist-es/toolbar-next/TooltrayNext.css.js +4 -0
  48. package/dist-es/toolbar-next/TooltrayNext.css.js.map +1 -0
  49. package/dist-es/toolbar-next/TooltrayNext.js +53 -0
  50. package/dist-es/toolbar-next/TooltrayNext.js.map +1 -0
  51. package/dist-es/toolbar-next/toolbarNextKeyboardUtils.js +372 -0
  52. package/dist-es/toolbar-next/toolbarNextKeyboardUtils.js.map +1 -0
  53. package/dist-es/toolbar-next/toolbarNextUtils.js +211 -0
  54. package/dist-es/toolbar-next/toolbarNextUtils.js.map +1 -0
  55. package/dist-es/toolbar-next/useToolbarNextKeyboardNavigation.js +332 -0
  56. package/dist-es/toolbar-next/useToolbarNextKeyboardNavigation.js.map +1 -0
  57. package/dist-es/toolbar-next/useToolbarNextOverflow.js +741 -0
  58. package/dist-es/toolbar-next/useToolbarNextOverflow.js.map +1 -0
  59. package/dist-types/index.d.ts +1 -2
  60. package/dist-types/toolbar-next/ToolbarContentNext.d.ts +11 -0
  61. package/dist-types/toolbar-next/ToolbarNext.d.ts +12 -0
  62. package/dist-types/toolbar-next/ToolbarNextOverflow.d.ts +34 -0
  63. package/dist-types/toolbar-next/ToolbarNextOverflowFloatingBoundary.d.ts +16 -0
  64. package/dist-types/toolbar-next/TooltrayNext.d.ts +37 -0
  65. package/dist-types/toolbar-next/index.d.ts +3 -0
  66. package/dist-types/toolbar-next/toolbarNextKeyboardUtils.d.ts +39 -0
  67. package/dist-types/toolbar-next/toolbarNextUtils.d.ts +42 -0
  68. package/dist-types/toolbar-next/useToolbarNextKeyboardNavigation.d.ts +41 -0
  69. package/dist-types/toolbar-next/useToolbarNextOverflow.d.ts +37 -0
  70. package/package.json +2 -2
  71. package/dist-cjs/side-panel/SidePanel.css.js +0 -6
  72. package/dist-cjs/side-panel/SidePanel.css.js.map +0 -1
  73. package/dist-cjs/side-panel/SidePanel.js +0 -197
  74. package/dist-cjs/side-panel/SidePanel.js.map +0 -1
  75. package/dist-cjs/side-panel/SidePanelCloseButton.js +0 -38
  76. package/dist-cjs/side-panel/SidePanelCloseButton.js.map +0 -1
  77. package/dist-cjs/side-panel/SidePanelContent.css.js +0 -6
  78. package/dist-cjs/side-panel/SidePanelContent.css.js.map +0 -1
  79. package/dist-cjs/side-panel/SidePanelContent.js +0 -66
  80. package/dist-cjs/side-panel/SidePanelContent.js.map +0 -1
  81. package/dist-cjs/side-panel/SidePanelHeader.css.js +0 -6
  82. package/dist-cjs/side-panel/SidePanelHeader.css.js.map +0 -1
  83. package/dist-cjs/side-panel/SidePanelHeader.js +0 -26
  84. package/dist-cjs/side-panel/SidePanelHeader.js.map +0 -1
  85. package/dist-cjs/side-panel/SidePanelProvider.js +0 -78
  86. package/dist-cjs/side-panel/SidePanelProvider.js.map +0 -1
  87. package/dist-cjs/side-panel/SidePanelTitle.css.js +0 -6
  88. package/dist-cjs/side-panel/SidePanelTitle.css.js.map +0 -1
  89. package/dist-cjs/side-panel/SidePanelTitle.js +0 -48
  90. package/dist-cjs/side-panel/SidePanelTitle.js.map +0 -1
  91. package/dist-cjs/side-panel/SidePanelTrigger.js +0 -37
  92. package/dist-cjs/side-panel/SidePanelTrigger.js.map +0 -1
  93. package/dist-cjs/side-panel/internal/SidePanelContext.js +0 -32
  94. package/dist-cjs/side-panel/internal/SidePanelContext.js.map +0 -1
  95. package/dist-cjs/side-panel/internal/useIsScrollable.js +0 -50
  96. package/dist-cjs/side-panel/internal/useIsScrollable.js.map +0 -1
  97. package/dist-cjs/side-panel/internal/useSidePanelTabOrder.js +0 -214
  98. package/dist-cjs/side-panel/internal/useSidePanelTabOrder.js.map +0 -1
  99. package/dist-cjs/side-panel/useSidePanel.js +0 -43
  100. package/dist-cjs/side-panel/useSidePanel.js.map +0 -1
  101. package/dist-cjs/tree/Tree.css.js +0 -6
  102. package/dist-cjs/tree/Tree.css.js.map +0 -1
  103. package/dist-cjs/tree/Tree.js +0 -300
  104. package/dist-cjs/tree/Tree.js.map +0 -1
  105. package/dist-cjs/tree/TreeContext.js +0 -31
  106. package/dist-cjs/tree/TreeContext.js.map +0 -1
  107. package/dist-cjs/tree/TreeNode.css.js +0 -6
  108. package/dist-cjs/tree/TreeNode.css.js.map +0 -1
  109. package/dist-cjs/tree/TreeNode.js +0 -103
  110. package/dist-cjs/tree/TreeNode.js.map +0 -1
  111. package/dist-cjs/tree/TreeNodeExpansionIcon.css.js +0 -6
  112. package/dist-cjs/tree/TreeNodeExpansionIcon.css.js.map +0 -1
  113. package/dist-cjs/tree/TreeNodeExpansionIcon.js +0 -62
  114. package/dist-cjs/tree/TreeNodeExpansionIcon.js.map +0 -1
  115. package/dist-cjs/tree/TreeNodeLabel.css.js +0 -6
  116. package/dist-cjs/tree/TreeNodeLabel.css.js.map +0 -1
  117. package/dist-cjs/tree/TreeNodeLabel.js +0 -26
  118. package/dist-cjs/tree/TreeNodeLabel.js.map +0 -1
  119. package/dist-cjs/tree/TreeNodeTrigger.css.js +0 -6
  120. package/dist-cjs/tree/TreeNodeTrigger.css.js.map +0 -1
  121. package/dist-cjs/tree/TreeNodeTrigger.js +0 -153
  122. package/dist-cjs/tree/TreeNodeTrigger.js.map +0 -1
  123. package/dist-cjs/tree/treeModel.js +0 -61
  124. package/dist-cjs/tree/treeModel.js.map +0 -1
  125. package/dist-cjs/tree/useTree.js +0 -337
  126. package/dist-cjs/tree/useTree.js.map +0 -1
  127. package/dist-es/side-panel/SidePanel.css.js +0 -4
  128. package/dist-es/side-panel/SidePanel.css.js.map +0 -1
  129. package/dist-es/side-panel/SidePanel.js +0 -195
  130. package/dist-es/side-panel/SidePanel.js.map +0 -1
  131. package/dist-es/side-panel/SidePanelCloseButton.js +0 -36
  132. package/dist-es/side-panel/SidePanelCloseButton.js.map +0 -1
  133. package/dist-es/side-panel/SidePanelContent.css.js +0 -4
  134. package/dist-es/side-panel/SidePanelContent.css.js.map +0 -1
  135. package/dist-es/side-panel/SidePanelContent.js +0 -64
  136. package/dist-es/side-panel/SidePanelContent.js.map +0 -1
  137. package/dist-es/side-panel/SidePanelHeader.css.js +0 -4
  138. package/dist-es/side-panel/SidePanelHeader.css.js.map +0 -1
  139. package/dist-es/side-panel/SidePanelHeader.js +0 -24
  140. package/dist-es/side-panel/SidePanelHeader.js.map +0 -1
  141. package/dist-es/side-panel/SidePanelProvider.js +0 -76
  142. package/dist-es/side-panel/SidePanelProvider.js.map +0 -1
  143. package/dist-es/side-panel/SidePanelTitle.css.js +0 -4
  144. package/dist-es/side-panel/SidePanelTitle.css.js.map +0 -1
  145. package/dist-es/side-panel/SidePanelTitle.js +0 -46
  146. package/dist-es/side-panel/SidePanelTitle.js.map +0 -1
  147. package/dist-es/side-panel/SidePanelTrigger.js +0 -35
  148. package/dist-es/side-panel/SidePanelTrigger.js.map +0 -1
  149. package/dist-es/side-panel/internal/SidePanelContext.js +0 -29
  150. package/dist-es/side-panel/internal/SidePanelContext.js.map +0 -1
  151. package/dist-es/side-panel/internal/useIsScrollable.js +0 -48
  152. package/dist-es/side-panel/internal/useIsScrollable.js.map +0 -1
  153. package/dist-es/side-panel/internal/useSidePanelTabOrder.js +0 -212
  154. package/dist-es/side-panel/internal/useSidePanelTabOrder.js.map +0 -1
  155. package/dist-es/side-panel/useSidePanel.js +0 -41
  156. package/dist-es/side-panel/useSidePanel.js.map +0 -1
  157. package/dist-es/tree/Tree.css.js +0 -4
  158. package/dist-es/tree/Tree.css.js.map +0 -1
  159. package/dist-es/tree/Tree.js +0 -298
  160. package/dist-es/tree/Tree.js.map +0 -1
  161. package/dist-es/tree/TreeContext.js +0 -26
  162. package/dist-es/tree/TreeContext.js.map +0 -1
  163. package/dist-es/tree/TreeNode.css.js +0 -4
  164. package/dist-es/tree/TreeNode.css.js.map +0 -1
  165. package/dist-es/tree/TreeNode.js +0 -101
  166. package/dist-es/tree/TreeNode.js.map +0 -1
  167. package/dist-es/tree/TreeNodeExpansionIcon.css.js +0 -4
  168. package/dist-es/tree/TreeNodeExpansionIcon.css.js.map +0 -1
  169. package/dist-es/tree/TreeNodeExpansionIcon.js +0 -60
  170. package/dist-es/tree/TreeNodeExpansionIcon.js.map +0 -1
  171. package/dist-es/tree/TreeNodeLabel.css.js +0 -4
  172. package/dist-es/tree/TreeNodeLabel.css.js.map +0 -1
  173. package/dist-es/tree/TreeNodeLabel.js +0 -24
  174. package/dist-es/tree/TreeNodeLabel.js.map +0 -1
  175. package/dist-es/tree/TreeNodeTrigger.css.js +0 -4
  176. package/dist-es/tree/TreeNodeTrigger.css.js.map +0 -1
  177. package/dist-es/tree/TreeNodeTrigger.js +0 -151
  178. package/dist-es/tree/TreeNodeTrigger.js.map +0 -1
  179. package/dist-es/tree/treeModel.js +0 -57
  180. package/dist-es/tree/treeModel.js.map +0 -1
  181. package/dist-es/tree/useTree.js +0 -335
  182. package/dist-es/tree/useTree.js.map +0 -1
  183. package/dist-types/side-panel/SidePanel.d.ts +0 -26
  184. package/dist-types/side-panel/SidePanelCloseButton.d.ts +0 -2
  185. package/dist-types/side-panel/SidePanelContent.d.ts +0 -5
  186. package/dist-types/side-panel/SidePanelHeader.d.ts +0 -5
  187. package/dist-types/side-panel/SidePanelProvider.d.ts +0 -20
  188. package/dist-types/side-panel/SidePanelTitle.d.ts +0 -3
  189. package/dist-types/side-panel/SidePanelTrigger.d.ts +0 -3
  190. package/dist-types/side-panel/index.d.ts +0 -8
  191. package/dist-types/side-panel/internal/SidePanelContext.d.ts +0 -52
  192. package/dist-types/side-panel/internal/index.d.ts +0 -3
  193. package/dist-types/side-panel/internal/useIsScrollable.d.ts +0 -2
  194. package/dist-types/side-panel/internal/useSidePanelTabOrder.d.ts +0 -7
  195. package/dist-types/side-panel/useSidePanel.d.ts +0 -58
  196. package/dist-types/tree/Tree.d.ts +0 -36
  197. package/dist-types/tree/TreeContext.d.ts +0 -77
  198. package/dist-types/tree/TreeNode.d.ts +0 -25
  199. package/dist-types/tree/TreeNodeExpansionIcon.d.ts +0 -4
  200. package/dist-types/tree/TreeNodeLabel.d.ts +0 -4
  201. package/dist-types/tree/TreeNodeTrigger.d.ts +0 -8
  202. package/dist-types/tree/index.d.ts +0 -4
  203. package/dist-types/tree/treeModel.d.ts +0 -24
  204. package/dist-types/tree/useTree.d.ts +0 -68
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToolbarNextOverflow.js","sources":["../src/toolbar-next/useToolbarNextOverflow.ts"],"sourcesContent":["import { ownerWindow, useIsomorphicLayoutEffect } from \"@salt-ds/core\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport type { ToolbarContentNextPosition } from \"./ToolbarContentNext\";\nimport {\n buildContentOverflowRenderSlots,\n type ToolbarNextContentModel,\n type ToolbarNextOverflowItem,\n} from \"./toolbarNextUtils\";\n\ninterface OverflowGroupDefinition {\n id: string;\n key: string;\n label: string;\n named: boolean;\n order: number;\n overflowGroup: string;\n contentKey?: string;\n}\n\ninterface CollapseUnit {\n groupKey: string;\n itemIds: string[];\n order: number;\n priority: number;\n}\n\nexport interface ToolbarNextOverflowGroup {\n id: string;\n items: ToolbarNextOverflowItem[];\n key: string;\n label: string;\n named: boolean;\n overflowGroup: string;\n contentKey?: string;\n}\n\ninterface OverflowState {\n overflowGroups: ToolbarNextOverflowGroup[];\n overflowedIds: Set<string>;\n}\n\ninterface UseToolbarNextOverflowProps {\n content: ToolbarNextContentModel[];\n}\n\ntype ObservedWidthTarget =\n | {\n kind: \"container\";\n }\n | {\n id: string;\n kind: \"item\";\n }\n | {\n id: string;\n kind: \"named-trigger\";\n }\n | {\n id: string;\n kind: \"named-trigger-measure\";\n }\n | {\n groupKey: string;\n kind: \"shared-trigger-measure\";\n };\n\nconst emptyOverflowState: OverflowState = {\n overflowGroups: [],\n overflowedIds: new Set<string>(),\n};\n\nconst bandPositions: ToolbarContentNextPosition[] = [\"start\", \"center\", \"end\"];\n\nfunction measureWidth(element: HTMLElement | null) {\n if (!element) {\n return 0;\n }\n\n const { width } = element.getBoundingClientRect();\n return Math.ceil(width);\n}\n\nfunction isVisibleMeasurementElement(element: Element): element is HTMLElement {\n if (!(element instanceof HTMLElement)) {\n return false;\n }\n\n const { width, height } = element.getBoundingClientRect();\n const styles = ownerWindow(element).getComputedStyle(element);\n\n return (\n width > 0 &&\n height > 0 &&\n styles.display !== \"none\" &&\n styles.visibility !== \"hidden\"\n );\n}\n\nfunction measureOverflowItemWidth(element: HTMLElement | null) {\n if (!element) {\n return 0;\n }\n\n const rect = element.getBoundingClientRect();\n let left = rect.left;\n let right = rect.right;\n\n for (const descendant of element.querySelectorAll(\"*\")) {\n if (!isVisibleMeasurementElement(descendant)) {\n continue;\n }\n\n const descendantRect = descendant.getBoundingClientRect();\n left = Math.min(left, descendantRect.left);\n right = Math.max(right, descendantRect.right);\n }\n\n return Math.ceil(Math.max(rect.width, right - left));\n}\n\nfunction readGap(gapValue: string) {\n return Number.parseFloat(gapValue || \"0\") || 0;\n}\n\nfunction sumFlexWidths(widths: number[], gap: number) {\n if (widths.length === 0) {\n return 0;\n }\n\n return (\n widths.reduce((total, width) => total + width, 0) +\n gap * (widths.length - 1)\n );\n}\n\nfunction buildGroupDefinitions(items: ToolbarNextOverflowItem[]) {\n const groupMap = new Map<string, OverflowGroupDefinition>();\n\n for (const [sequence, item] of items.entries()) {\n if (item.overflowMode === \"none\") {\n continue;\n }\n\n const existing = groupMap.get(item.overflowGroupKey);\n\n if (existing) {\n if (!existing.named && item.overflowGroup === \"shared\") {\n continue;\n }\n\n if (existing.label === item.overflowGroup && item.overflowLabel) {\n existing.label = item.overflowLabel;\n }\n\n continue;\n }\n\n groupMap.set(item.overflowGroupKey, {\n id: `${item.overflowGroupKey}-${sequence}`,\n key: item.overflowGroupKey,\n label:\n item.overflowGroup === \"shared\"\n ? \"More\"\n : (item.overflowLabel ?? item.overflowGroup),\n named: item.overflowGroup !== \"shared\",\n order: sequence,\n overflowGroup: item.overflowGroup,\n contentKey: item.overflowGroup === \"shared\" ? undefined : item.contentKey,\n });\n }\n\n return Array.from(groupMap.values()).sort(\n (left, right) => left.order - right.order,\n );\n}\n\nfunction buildCollapseUnits(items: ToolbarNextOverflowItem[]) {\n const groupedUnits = new Map<string, CollapseUnit>();\n const units: CollapseUnit[] = [];\n\n for (const [sequence, item] of items.entries()) {\n if (item.overflowMode === \"none\") {\n continue;\n }\n\n if (item.overflowMode === \"grouped\" && item.overflowGroup !== \"shared\") {\n const existing = groupedUnits.get(item.overflowGroupKey);\n\n if (existing) {\n existing.itemIds.push(item.id);\n existing.order = Math.max(existing.order, sequence);\n existing.priority = Math.max(existing.priority, item.overflowPriority);\n continue;\n }\n\n const unit: CollapseUnit = {\n groupKey: item.overflowGroupKey,\n itemIds: [item.id],\n order: sequence,\n priority: item.overflowPriority,\n };\n\n groupedUnits.set(item.overflowGroupKey, unit);\n units.push(unit);\n continue;\n }\n\n units.push({\n groupKey: item.overflowGroupKey,\n itemIds: [item.id],\n order: sequence,\n priority: item.overflowPriority,\n });\n }\n\n return units.sort((left, right) => {\n if (left.priority !== right.priority) {\n return right.priority - left.priority;\n }\n\n return right.order - left.order;\n });\n}\n\nfunction areOverflowStatesEqual(previous: OverflowState, next: OverflowState) {\n if (previous.overflowedIds.size !== next.overflowedIds.size) {\n return false;\n }\n\n for (const itemId of previous.overflowedIds) {\n if (!next.overflowedIds.has(itemId)) {\n return false;\n }\n }\n\n if (previous.overflowGroups.length !== next.overflowGroups.length) {\n return false;\n }\n\n return previous.overflowGroups.every((group, index) => {\n const nextGroup = next.overflowGroups[index];\n\n if (\n nextGroup == null ||\n group.id !== nextGroup.id ||\n group.label !== nextGroup.label ||\n group.items.length !== nextGroup.items.length\n ) {\n return false;\n }\n\n return group.items.every((item, itemIndex) => {\n return item.id === nextGroup.items[itemIndex]?.id;\n });\n });\n}\n\ninterface ComputeToolbarNextOverflowStateArgs {\n collapseUnits: CollapseUnit[];\n containerWidth: number;\n groupDefinitions: OverflowGroupDefinition[];\n itemWidths: Map<string, number>;\n items: ToolbarNextOverflowItem[];\n namedTriggerWidths: Map<string, number>;\n content: ToolbarNextContentModel[];\n contentGaps: Map<string, number>;\n rootGap: number;\n triggerWidths: Map<string, number>;\n bandGaps: Map<ToolbarContentNextPosition, number>;\n}\n\nfunction computeToolbarNextOverflowState({\n bandGaps,\n collapseUnits,\n containerWidth,\n groupDefinitions,\n itemWidths,\n items,\n namedTriggerWidths,\n content,\n contentGaps,\n rootGap,\n triggerWidths,\n}: ComputeToolbarNextOverflowStateArgs): OverflowState {\n const hasCenteredLayout = content.some(\n (contentArea) => contentArea.position === \"center\",\n );\n const contentByPosition = bandPositions.reduce<\n Record<ToolbarContentNextPosition, ToolbarNextContentModel[]>\n >(\n (bands, position) => {\n bands[position] = content.filter(\n (contentArea) => contentArea.position === position,\n );\n return bands;\n },\n {\n start: [],\n center: [],\n end: [],\n },\n );\n const overflowedIds = new Set<string>();\n const activeGroups = new Set<string>();\n\n const getContentWidth = (contentArea: ToolbarNextContentModel) => {\n const renderSlots = buildContentOverflowRenderSlots(\n contentArea.items,\n overflowedIds,\n new Set(\n groupDefinitions\n .filter((group) => {\n return (\n group.named &&\n group.contentKey === contentArea.key &&\n activeGroups.has(group.key)\n );\n })\n .map((group) => group.key),\n ),\n );\n const slotWidths: number[] = [];\n\n for (const slot of renderSlots) {\n const width =\n slot.triggerGroupKey != null\n ? namedTriggerWidths.get(slot.item.id)\n : itemWidths.get(slot.item.id);\n\n if (width == null || width <= 0) {\n return null;\n }\n\n slotWidths.push(width);\n }\n\n return sumFlexWidths(slotWidths, contentGaps.get(contentArea.key) ?? 0);\n };\n\n const getBandWidth = (position: ToolbarContentNextPosition) => {\n const bandChildWidths: number[] = [];\n\n for (const contentArea of contentByPosition[position]) {\n const contentWidth = getContentWidth(contentArea);\n\n if (contentWidth == null) {\n return null;\n }\n\n if (contentWidth > 0) {\n bandChildWidths.push(contentWidth);\n }\n }\n\n if (position === \"end\") {\n for (const group of groupDefinitions) {\n if (!group.named && activeGroups.has(group.key)) {\n const width = triggerWidths.get(group.key);\n\n if (width == null || width <= 0) {\n return null;\n }\n\n bandChildWidths.push(width);\n }\n }\n }\n\n return sumFlexWidths(bandChildWidths, bandGaps.get(position) ?? 0);\n };\n\n const getTotalWidth = () => {\n if (hasCenteredLayout) {\n const startBandWidth = getBandWidth(\"start\");\n const centerBandWidth = getBandWidth(\"center\");\n const endBandWidth = getBandWidth(\"end\");\n\n if (\n startBandWidth == null ||\n centerBandWidth == null ||\n endBandWidth == null\n ) {\n return null;\n }\n\n return centerBandWidth + Math.max(startBandWidth, endBandWidth) * 2;\n }\n\n const visibleBandWidths: number[] = [];\n\n for (const position of bandPositions) {\n const bandWidth = getBandWidth(position);\n\n if (bandWidth == null) {\n return null;\n }\n\n if (bandWidth > 0) {\n visibleBandWidths.push(bandWidth);\n }\n }\n\n return sumFlexWidths(visibleBandWidths, rootGap);\n };\n\n const initialWidth = getTotalWidth();\n\n if (initialWidth == null) {\n return emptyOverflowState;\n }\n\n if (initialWidth > containerWidth) {\n for (const unit of collapseUnits) {\n for (const itemId of unit.itemIds) {\n overflowedIds.add(itemId);\n }\n\n activeGroups.add(unit.groupKey);\n\n const nextWidth = getTotalWidth();\n\n if (nextWidth == null) {\n return emptyOverflowState;\n }\n\n if (nextWidth <= containerWidth) {\n break;\n }\n }\n }\n\n const overflowGroups = groupDefinitions.reduce<ToolbarNextOverflowGroup[]>(\n (groups, group) => {\n const hiddenItems = items.filter(\n (item) =>\n item.overflowGroupKey === group.key && overflowedIds.has(item.id),\n );\n\n if (hiddenItems.length > 0) {\n groups.push({\n id: group.id,\n items: hiddenItems,\n key: group.key,\n label: group.label,\n named: group.named,\n overflowGroup: group.overflowGroup,\n contentKey: group.contentKey,\n });\n }\n\n return groups;\n },\n [],\n );\n\n return {\n overflowGroups,\n overflowedIds,\n };\n}\n\nexport function useToolbarNextOverflow({\n content,\n}: UseToolbarNextOverflowProps) {\n const targetWindow = useWindow();\n const items = useMemo(\n () => content.flatMap((contentArea) => contentArea.items),\n [content],\n );\n const containerRef = useRef<HTMLDivElement>(null);\n\n const bandRefs = useRef<\n Record<ToolbarContentNextPosition, HTMLDivElement | null>\n >({\n start: null,\n center: null,\n end: null,\n });\n const bandRefCallbacks = useRef(\n new Map<\n ToolbarContentNextPosition,\n (node: HTMLDivElement | null) => void\n >(),\n );\n const contentRefs = useRef<Record<string, HTMLDivElement | null>>({});\n const contentRefCallbacks = useRef(\n new Map<string, (node: HTMLDivElement | null) => void>(),\n );\n const itemRefs = useRef<Record<string, HTMLDivElement | null>>({});\n const itemRefCallbacks = useRef(\n new Map<string, (node: HTMLDivElement | null) => void>(),\n );\n const namedTriggerRefs = useRef<Record<string, HTMLDivElement | null>>({});\n const namedTriggerRefCallbacks = useRef(\n new Map<string, (node: HTMLDivElement | null) => void>(),\n );\n const namedTriggerMeasureRefs = useRef<Record<string, HTMLDivElement | null>>(\n {},\n );\n const namedTriggerMeasureCallbacks = useRef(\n new Map<string, (node: HTMLDivElement | null) => void>(),\n );\n const triggerMeasureRefs = useRef<Record<string, HTMLButtonElement | null>>(\n {},\n );\n const triggerMeasureCallbacks = useRef(\n new Map<string, (node: HTMLButtonElement | null) => void>(),\n );\n const rafRef = useRef<number | null>(null);\n const clearComputingRafRef = useRef<number | null>(null);\n const isComputingRef = useRef(false);\n const pendingMeasureRef = useRef(false);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const observedWidthTargetsRef = useRef(\n new Map<Element, ObservedWidthTarget>(),\n );\n\n const cachedItemWidths = useRef<Record<string, number>>({});\n const cachedNamedTriggerWidths = useRef<Record<string, number>>({});\n const cachedSharedTriggerWidths = useRef<Record<string, number>>({});\n const [overflowState, setOverflowState] =\n useState<OverflowState>(emptyOverflowState);\n\n const namedTriggerItems = useMemo(\n () =>\n items.filter((item) => {\n return item.overflowMode !== \"none\" && item.overflowGroup !== \"shared\";\n }),\n [items],\n );\n\n const groupDefinitions = useMemo(() => buildGroupDefinitions(items), [items]);\n const collapseUnits = useMemo(() => buildCollapseUnits(items), [items]);\n\n const computeOverflow = useCallback((): OverflowState => {\n const container = containerRef.current;\n\n if (!container) {\n return emptyOverflowState;\n }\n\n const containerStyles = ownerWindow(container).getComputedStyle(container);\n const paddingLeft =\n Number.parseFloat(containerStyles.paddingLeft || \"0\") || 0;\n const paddingRight =\n Number.parseFloat(containerStyles.paddingRight || \"0\") || 0;\n const borderLeft =\n Number.parseFloat(containerStyles.borderLeftWidth || \"0\") || 0;\n const borderRight =\n Number.parseFloat(containerStyles.borderRightWidth || \"0\") || 0;\n const containerWidth = Math.floor(\n container.getBoundingClientRect().width -\n paddingLeft -\n paddingRight -\n borderLeft -\n borderRight,\n );\n\n if (containerWidth <= 0) {\n return emptyOverflowState;\n }\n\n const rootGap = readGap(\n containerStyles.columnGap || containerStyles.gap || \"0\",\n );\n const bandGaps = new Map<ToolbarContentNextPosition, number>();\n const contentGaps = new Map<string, number>();\n const itemWidths = new Map<string, number>();\n const namedTriggerWidths = new Map<string, number>();\n const triggerWidths = new Map<string, number>();\n\n for (const position of bandPositions) {\n const bandElement = bandRefs.current[position];\n\n if (!bandElement) {\n bandGaps.set(position, 0);\n continue;\n }\n\n const bandStyles = ownerWindow(bandElement).getComputedStyle(bandElement);\n bandGaps.set(\n position,\n readGap(bandStyles.columnGap || bandStyles.gap || \"0\"),\n );\n }\n\n for (const contentArea of content) {\n const contentElement = contentRefs.current[contentArea.key];\n\n if (!contentElement) {\n return emptyOverflowState;\n }\n\n const contentStyles =\n ownerWindow(contentElement).getComputedStyle(contentElement);\n\n contentGaps.set(\n contentArea.key,\n readGap(contentStyles.columnGap || contentStyles.gap || \"0\"),\n );\n }\n\n for (const item of items) {\n const element = itemRefs.current[item.id];\n\n if (element) {\n const width = measureOverflowItemWidth(element);\n\n if (width > 0) {\n itemWidths.set(item.id, width);\n cachedItemWidths.current[item.id] = width;\n continue;\n }\n }\n\n const cached = cachedItemWidths.current[item.id];\n if (cached != null && cached > 0) {\n itemWidths.set(item.id, cached);\n continue;\n }\n\n return emptyOverflowState;\n }\n\n for (const item of namedTriggerItems) {\n const liveWidth = measureWidth(namedTriggerRefs.current[item.id]);\n\n if (liveWidth > 0) {\n namedTriggerWidths.set(item.id, liveWidth);\n cachedNamedTriggerWidths.current[item.id] = liveWidth;\n continue;\n }\n\n const measureWidthForItem = measureWidth(\n namedTriggerMeasureRefs.current[item.id],\n );\n\n if (measureWidthForItem > 0) {\n namedTriggerWidths.set(item.id, measureWidthForItem);\n cachedNamedTriggerWidths.current[item.id] = measureWidthForItem;\n continue;\n }\n\n const cached = cachedNamedTriggerWidths.current[item.id];\n if (cached != null && cached > 0) {\n namedTriggerWidths.set(item.id, cached);\n continue;\n }\n\n return emptyOverflowState;\n }\n\n for (const group of groupDefinitions.filter((entry) => !entry.named)) {\n const width = measureWidth(triggerMeasureRefs.current[group.key]);\n\n if (width <= 0) {\n const cached = cachedSharedTriggerWidths.current[group.key];\n\n if (cached != null && cached > 0) {\n triggerWidths.set(group.key, cached);\n continue;\n }\n\n return emptyOverflowState;\n }\n\n triggerWidths.set(group.key, width);\n cachedSharedTriggerWidths.current[group.key] = width;\n }\n\n const nextOverflowState = computeToolbarNextOverflowState({\n bandGaps,\n collapseUnits,\n containerWidth,\n groupDefinitions,\n itemWidths,\n items,\n namedTriggerWidths,\n content,\n contentGaps,\n rootGap,\n triggerWidths,\n });\n\n return nextOverflowState;\n }, [collapseUnits, groupDefinitions, items, namedTriggerItems, content]);\n\n const scheduleMeasureRef = useRef<() => void>(() => {});\n\n const scheduleMeasure = useCallback(() => {\n if (!targetWindow) {\n return;\n }\n\n if (isComputingRef.current) {\n pendingMeasureRef.current = true;\n return;\n }\n\n if (rafRef.current != null) {\n targetWindow.cancelAnimationFrame(rafRef.current);\n }\n\n rafRef.current = targetWindow.requestAnimationFrame(() => {\n rafRef.current = null;\n isComputingRef.current = true;\n\n try {\n const nextState = computeOverflow();\n\n setOverflowState((previous) => {\n return areOverflowStatesEqual(previous, nextState)\n ? previous\n : nextState;\n });\n } finally {\n clearComputingRafRef.current = targetWindow.requestAnimationFrame(\n () => {\n clearComputingRafRef.current = null;\n isComputingRef.current = false;\n\n if (pendingMeasureRef.current) {\n pendingMeasureRef.current = false;\n scheduleMeasureRef.current();\n }\n },\n );\n }\n });\n }, [computeOverflow, targetWindow]);\n\n useIsomorphicLayoutEffect(() => {\n scheduleMeasureRef.current = scheduleMeasure;\n\n return () => {\n scheduleMeasureRef.current = () => {};\n };\n }, [scheduleMeasure]);\n\n const getCachedWidthForObservedTarget = useCallback(\n (target: Exclude<ObservedWidthTarget, { kind: \"container\" }>) => {\n switch (target.kind) {\n case \"item\":\n return cachedItemWidths.current[target.id];\n case \"named-trigger\":\n case \"named-trigger-measure\":\n return cachedNamedTriggerWidths.current[target.id];\n case \"shared-trigger-measure\":\n return cachedSharedTriggerWidths.current[target.groupKey];\n }\n },\n [],\n );\n\n const setCachedWidthForObservedTarget = useCallback(\n (\n target: Exclude<ObservedWidthTarget, { kind: \"container\" }>,\n width: number,\n ) => {\n switch (target.kind) {\n case \"item\":\n cachedItemWidths.current[target.id] = width;\n return;\n case \"named-trigger\":\n case \"named-trigger-measure\":\n cachedNamedTriggerWidths.current[target.id] = width;\n return;\n case \"shared-trigger-measure\":\n cachedSharedTriggerWidths.current[target.groupKey] = width;\n return;\n }\n },\n [],\n );\n\n const observeWidthTarget = useCallback(\n (node: Element | null, target: ObservedWidthTarget) => {\n if (!node) {\n return;\n }\n\n observedWidthTargetsRef.current.set(node, target);\n resizeObserverRef.current?.observe(node);\n },\n [],\n );\n\n const unobserveWidthTarget = useCallback((node: Element | null) => {\n if (!node) {\n return;\n }\n\n observedWidthTargetsRef.current.delete(node);\n resizeObserverRef.current?.unobserve(node);\n }, []);\n\n const updateObservedNode = useCallback(\n <TElement extends Element>(\n nodes: Record<string, TElement | null>,\n key: string,\n node: TElement | null,\n target: ObservedWidthTarget,\n ) => {\n const previous = nodes[key];\n\n if (previous === node) {\n return;\n }\n\n if (previous) {\n unobserveWidthTarget(previous);\n }\n\n nodes[key] = node;\n\n if (node) {\n observeWidthTarget(node, target);\n }\n },\n [observeWidthTarget, unobserveWidthTarget],\n );\n\n useIsomorphicLayoutEffect(() => {\n scheduleMeasure();\n }, [scheduleMeasure]);\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) {\n return;\n }\n\n let cancelled = false;\n const win = ownerWindow(container);\n const resizeObserver = new win.ResizeObserver((entries) => {\n let shouldMeasure = false;\n\n for (const entry of entries) {\n const target = observedWidthTargetsRef.current.get(entry.target);\n\n if (!target) {\n continue;\n }\n\n if (target.kind === \"container\") {\n shouldMeasure = true;\n continue;\n }\n\n const nextWidth =\n target.kind === \"item\"\n ? measureOverflowItemWidth(entry.target as HTMLElement)\n : measureWidth(entry.target as HTMLElement);\n\n if (nextWidth <= 0) {\n continue;\n }\n\n const previousWidth = getCachedWidthForObservedTarget(target);\n\n if (previousWidth !== nextWidth) {\n setCachedWidthForObservedTarget(target, nextWidth);\n shouldMeasure = true;\n }\n }\n\n if (shouldMeasure) {\n scheduleMeasureRef.current();\n }\n });\n\n resizeObserverRef.current = resizeObserver;\n observeWidthTarget(container, { kind: \"container\" });\n\n for (const node of observedWidthTargetsRef.current.keys()) {\n resizeObserver.observe(node);\n }\n\n if (win.document.fonts) {\n void win.document.fonts.ready.then(() => {\n if (!cancelled) {\n scheduleMeasureRef.current();\n }\n });\n }\n\n return () => {\n cancelled = true;\n resizeObserverRef.current = null;\n resizeObserver.disconnect();\n\n if (rafRef.current != null) {\n win.cancelAnimationFrame(rafRef.current);\n rafRef.current = null;\n }\n\n if (clearComputingRafRef.current != null) {\n win.cancelAnimationFrame(clearComputingRafRef.current);\n clearComputingRafRef.current = null;\n }\n\n isComputingRef.current = false;\n pendingMeasureRef.current = false;\n };\n }, [\n getCachedWidthForObservedTarget,\n observeWidthTarget,\n setCachedWidthForObservedTarget,\n ]);\n\n const getItemRef = useCallback(\n (id: string) => {\n const existing = itemRefCallbacks.current.get(id);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLDivElement | null) => {\n updateObservedNode(itemRefs.current, id, node, {\n id,\n kind: \"item\",\n });\n };\n\n itemRefCallbacks.current.set(id, callback);\n return callback;\n },\n [updateObservedNode],\n );\n\n const getNamedTriggerRef = useCallback(\n (id: string) => {\n const existing = namedTriggerRefCallbacks.current.get(id);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLDivElement | null) => {\n updateObservedNode(namedTriggerRefs.current, id, node, {\n id,\n kind: \"named-trigger\",\n });\n };\n\n namedTriggerRefCallbacks.current.set(id, callback);\n return callback;\n },\n [updateObservedNode],\n );\n\n const getNamedTriggerMeasureRef = useCallback(\n (id: string) => {\n const existing = namedTriggerMeasureCallbacks.current.get(id);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLDivElement | null) => {\n updateObservedNode(namedTriggerMeasureRefs.current, id, node, {\n id,\n kind: \"named-trigger-measure\",\n });\n };\n\n namedTriggerMeasureCallbacks.current.set(id, callback);\n return callback;\n },\n [updateObservedNode],\n );\n\n const getContentRef = useCallback((contentKey: string) => {\n const existing = contentRefCallbacks.current.get(contentKey);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLDivElement | null) => {\n contentRefs.current[contentKey] = node;\n };\n\n contentRefCallbacks.current.set(contentKey, callback);\n return callback;\n }, []);\n const getBandRef = useCallback((position: ToolbarContentNextPosition) => {\n const existing = bandRefCallbacks.current.get(position);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLDivElement | null) => {\n bandRefs.current[position] = node;\n };\n\n bandRefCallbacks.current.set(position, callback);\n return callback;\n }, []);\n\n const getTriggerMeasureRef = useCallback(\n (groupKey: string) => {\n const existing = triggerMeasureCallbacks.current.get(groupKey);\n\n if (existing) {\n return existing;\n }\n\n const callback = (node: HTMLButtonElement | null) => {\n updateObservedNode(triggerMeasureRefs.current, groupKey, node, {\n groupKey,\n kind: \"shared-trigger-measure\",\n });\n };\n\n triggerMeasureCallbacks.current.set(groupKey, callback);\n return callback;\n },\n [updateObservedNode],\n );\n\n return {\n containerRef,\n getBandRef,\n getItemRef,\n getNamedTriggerMeasureRef,\n getNamedTriggerRef,\n getContentRef,\n getTriggerMeasureRef,\n isOverflowing: overflowState.overflowGroups.length > 0,\n overflowGroups: overflowState.overflowGroups,\n overflowedIds: overflowState.overflowedIds,\n overflowTriggerGroups: groupDefinitions,\n };\n}\n"],"names":[],"mappings":";;;;;AAmEA,MAAM,kBAAA,GAAoC;AAAA,EACxC,gBAAgB,EAAC;AAAA,EACjB,aAAA,sBAAmB,GAAA;AACrB,CAAA;AAEA,MAAM,aAAA,GAA8C,CAAC,OA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
34
  export * from "./query-input";
35
35
  export * from "./responsive";
36
36
  export * from "./search-input";
37
- export * from "./side-panel";
38
37
  export * from "./static-list";
39
38
  export * from "./system-status";
40
39
  export * from "./tabs";
@@ -42,6 +41,6 @@ export * from "./toast-group";
42
41
  export * from "./tokenized-input";
43
42
  export * from "./tokenized-input-next";
44
43
  export * from "./toolbar";
45
- export * from "./tree";
44
+ export * from "./toolbar-next";
46
45
  export * from "./utils";
47
46
  export * from "./window";
@@ -0,0 +1,11 @@
1
+ import { type ComponentPropsWithoutRef } from "react";
2
+ export type ToolbarContentNextPosition = "start" | "center" | "end";
3
+ export interface ToolbarContentNextProps extends ComponentPropsWithoutRef<"div"> {
4
+ /**
5
+ * Controls where the content is placed across the full toolbar.
6
+ * If any content uses `"center"`, `ToolbarNext` reserves symmetric side space
7
+ * so the center band stays on the toolbar midpoint.
8
+ */
9
+ position: ToolbarContentNextPosition;
10
+ }
11
+ export declare const ToolbarContentNext: import("react").ForwardRefExoticComponent<ToolbarContentNextProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import { type ComponentPropsWithoutRef } from "react";
2
+ export interface ToolbarNextProps extends ComponentPropsWithoutRef<"div"> {
3
+ /**
4
+ * Visual treatment of the toolbar. Defaults to `"bordered"`.
5
+ */
6
+ appearance?: "bordered" | "transparent";
7
+ /**
8
+ * Styling variant. Defaults to `"primary"`.
9
+ */
10
+ variant?: "primary" | "secondary" | "tertiary";
11
+ }
12
+ export declare const ToolbarNext: import("react").ForwardRefExoticComponent<ToolbarNextProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,34 @@
1
+ import { type RefObject } from "react";
2
+ import { type ToolbarNextFocusMemory } from "./toolbarNextKeyboardUtils";
3
+ import type { ToolbarNextContentModel, ToolbarNextOverflowItem } from "./toolbarNextUtils";
4
+ import type { ToolbarNextOverflowGroup } from "./useToolbarNextOverflow";
5
+ export type ToolbarNextItemHostKind = "main" | "measurement" | "overflow";
6
+ interface ToolbarNextOverflowOwnersProps {
7
+ hostNodes: Record<string, HTMLDivElement | null>;
8
+ items: ToolbarNextOverflowItem[];
9
+ }
10
+ export declare function ToolbarNextOverflowOwners({ hostNodes, items, }: ToolbarNextOverflowOwnersProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ToolbarNextOverflowTriggerContent({ label, named, }: {
12
+ label: string;
13
+ named: boolean;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ interface ToolbarNextOverflowMenuProps {
16
+ focusMemoryRef?: RefObject<ToolbarNextFocusMemory | null>;
17
+ getItemHostRef: (id: string, kind: ToolbarNextItemHostKind) => (node: HTMLDivElement | null) => void;
18
+ group: ToolbarNextOverflowGroup;
19
+ onItemFocus?: (itemId: string, controlIndex: number) => void;
20
+ }
21
+ export declare function ToolbarNextOverflowMenu({ focusMemoryRef, getItemHostRef, group, onItemFocus, }: ToolbarNextOverflowMenuProps): import("react/jsx-runtime").JSX.Element;
22
+ export interface ToolbarNextOverflowContentProps {
23
+ focusMemoryRef?: RefObject<ToolbarNextFocusMemory | null>;
24
+ getItemHostRef: (id: string, kind: ToolbarNextItemHostKind) => (node: HTMLDivElement | null) => void;
25
+ getItemRef: (id: string) => (node: HTMLDivElement | null) => void;
26
+ getNamedTriggerRef: (id: string) => (node: HTMLDivElement | null) => void;
27
+ getContentRef: (contentKey: string) => (node: HTMLDivElement | null) => void;
28
+ onItemFocus?: (itemId: string, controlIndex: number) => void;
29
+ overflowGroups: ToolbarNextOverflowGroup[];
30
+ overflowedIds: Set<string>;
31
+ content: ToolbarNextContentModel;
32
+ }
33
+ export declare function ToolbarNextOverflowContent({ content, focusMemoryRef, getItemHostRef, getItemRef, getNamedTriggerRef, getContentRef, onItemFocus, overflowGroups, overflowedIds, }: ToolbarNextOverflowContentProps): import("react/jsx-runtime").JSX.Element;
34
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from "react";
2
+ interface ToolbarNextOverflowFloatingBoundaryContextValue {
3
+ isTargetInsideBoundary: (boundaryKey: string, target: EventTarget | null) => boolean;
4
+ registerFloatingRoot: (boundaryKey: string, root: HTMLElement) => () => void;
5
+ }
6
+ export declare function ToolbarNextOverflowFloatingBoundaryProvider({ children, }: {
7
+ children: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function useToolbarNextOverflowFloatingBoundary(): ToolbarNextOverflowFloatingBoundaryContextValue | null;
10
+ export declare function isTargetInsideOverflowBoundary(panelContent: HTMLElement | null, floatingBoundary: ToolbarNextOverflowFloatingBoundaryContextValue | null, boundaryKey: string, target: EventTarget | null): boolean;
11
+ export declare function getToolbarNextOverflowBoundaryKey(host: HTMLElement | null): string | null;
12
+ export declare function ToolbarNextOverflowFloatingComponentProvider({ boundaryKey, children, }: {
13
+ boundaryKey: string | null;
14
+ children: ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,37 @@
1
+ import { type ComponentPropsWithoutRef } from "react";
2
+ export type TooltrayNextOverflowMode = "none" | "independent" | "grouped";
3
+ export interface TooltrayNextProps extends Omit<ComponentPropsWithoutRef<"div">, "align"> {
4
+ /**
5
+ * Alignment of the tooltray.
6
+ * - When a `TooltrayNext` is used directly inside `ToolbarNext`, this acts as
7
+ * shorthand for which toolbar band the tray belongs to.
8
+ * - When a `TooltrayNext` is used inside `ToolbarContentNext`, this alignment is
9
+ * local to that content area.
10
+ *
11
+ * Defaults to `"start"`.
12
+ */
13
+ align?: "start" | "end" | "center";
14
+ /**
15
+ * Controls how this tray participates in `ToolbarNext` overflow.
16
+ *
17
+ * Defaults to `"independent"`.
18
+ */
19
+ overflowMode?: TooltrayNextOverflowMode;
20
+ /**
21
+ * Higher numbers overflow before lower numbers.
22
+ *
23
+ * Defaults to `0`.
24
+ */
25
+ overflowPriority?: number;
26
+ /**
27
+ * Collapse this tray into the shared overflow or a named local overflow.
28
+ *
29
+ * Defaults to `"shared"`.
30
+ */
31
+ overflowGroup?: "shared" | string;
32
+ /**
33
+ * Accessible label for the named overflow trigger.
34
+ */
35
+ overflowLabel?: string;
36
+ }
37
+ export declare const TooltrayNext: import("react").ForwardRefExoticComponent<TooltrayNextProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ export * from "./ToolbarContentNext";
2
+ export * from "./ToolbarNext";
3
+ export * from "./TooltrayNext";
@@ -0,0 +1,39 @@
1
+ import type { ToolbarNextOverflowItem } from "./toolbarNextUtils";
2
+ export declare const TOOLBAR_NEXT_SCOPE_ROOT_ATTR = "data-salt-toolbar-next-scope-root";
3
+ export declare const TOOLBAR_NEXT_ITEM_ATTR = "data-salt-toolbar-next-item-id";
4
+ export declare const TOOLBAR_NEXT_GROUP_KEY_ATTR = "data-salt-toolbar-next-overflow-group-key";
5
+ export declare const TOOLBAR_NEXT_OVERFLOW_TRIGGER_ATTR = "data-salt-toolbar-next-overflow-trigger";
6
+ export declare const toolbarNextFocusableSelector: string;
7
+ export type ToolbarNextFocusMemory = {
8
+ controlIndex: number;
9
+ itemId: string;
10
+ scopeIndex: number;
11
+ type: "item";
12
+ } | {
13
+ groupKey: string;
14
+ scopeIndex: number;
15
+ type: "overflow-trigger";
16
+ } | {
17
+ scopeIndex: number;
18
+ type: "scope";
19
+ };
20
+ export interface ToolbarNextFocusableOptions {
21
+ includeTabIndexMinusOne?: boolean;
22
+ }
23
+ export declare function getClosestToolbarNextScopeRoot(target: EventTarget | null): HTMLElement | null;
24
+ export declare function getToolbarNextItemId(target: Element | null): string | null;
25
+ export declare function isToolbarNextFocusFromPointerTarget(focusTarget: HTMLElement, pointerTarget: EventTarget | null): boolean;
26
+ export declare function getToolbarNextScopeFocusableElements(scopeRoot: HTMLElement, options?: ToolbarNextFocusableOptions): HTMLElement[];
27
+ export declare function getToolbarNextFocusMemory(scopeRoot: HTMLElement, target: HTMLElement, options?: ToolbarNextFocusableOptions): ToolbarNextFocusMemory | null;
28
+ export declare function resolveToolbarNextFocusTarget(scopeRoot: HTMLElement, focusMemory: ToolbarNextFocusMemory | null, { includeTabIndexMinusOne, items, overflowedIds, }?: {
29
+ items?: ToolbarNextOverflowItem[];
30
+ includeTabIndexMinusOne?: boolean;
31
+ overflowedIds?: Set<string>;
32
+ }): HTMLElement | null;
33
+ export declare function getToolbarNextDirectionalMoveTarget(scopeRoot: HTMLElement, target: HTMLElement, key: string, options?: ToolbarNextFocusableOptions): HTMLElement | null;
34
+ export declare function getToolbarNextTabMoveTarget(scopeRoot: HTMLElement, shiftKey: boolean): HTMLElement | null;
35
+ export declare function shouldToolbarNextPreserveNativeTab(target: HTMLElement): boolean;
36
+ export declare function isToolbarNextFocusable(target: HTMLElement, { includeTabIndexMinusOne }?: ToolbarNextFocusableOptions): boolean;
37
+ export declare function focusToolbarNextElement(target: HTMLElement | null | undefined): void;
38
+ export declare function scheduleToolbarNextFocus(target: HTMLElement | null | undefined, targetWindow?: (Window & typeof globalThis) | null | undefined): () => void;
39
+ export declare function getDocumentFocusableElements(ownerDocument: Document): HTMLElement[];
@@ -0,0 +1,42 @@
1
+ import { type ReactElement, type ReactNode, type Ref } from "react";
2
+ import { type ToolbarContentNextPosition, type ToolbarContentNextProps } from "./ToolbarContentNext";
3
+ import { type TooltrayNextOverflowMode, type TooltrayNextProps } from "./TooltrayNext";
4
+ export type ToolbarNextMode = "explicit" | "flat" | "invalid";
5
+ type ToolbarNextChild = Exclude<ReactNode, boolean | null | undefined>;
6
+ export interface ToolbarNextOverflowItem {
7
+ align: NonNullable<TooltrayNextProps["align"]>;
8
+ element: ReactElement<TooltrayNextProps>;
9
+ id: string;
10
+ leadingDecorations: ReactElement[];
11
+ order: number;
12
+ overflowGroup: string;
13
+ overflowGroupKey: string;
14
+ overflowLabel?: string;
15
+ overflowMode: TooltrayNextOverflowMode;
16
+ overflowPriority: number;
17
+ contentKey: string;
18
+ trailingDecorations: ReactElement[];
19
+ }
20
+ export interface ToolbarNextOverflowRenderSlot {
21
+ item: ToolbarNextOverflowItem;
22
+ overflowed: boolean;
23
+ showLeadingDecorations: boolean;
24
+ showTrailingDecorations: boolean;
25
+ triggerGroupKey?: string;
26
+ }
27
+ export interface ToolbarNextContentModel {
28
+ implicit: boolean;
29
+ items: ToolbarNextOverflowItem[];
30
+ key: string;
31
+ position: ToolbarContentNextPosition;
32
+ props: Omit<ToolbarContentNextProps, "children" | "position">;
33
+ ref: Ref<HTMLDivElement> | null;
34
+ }
35
+ export interface ToolbarNextModel {
36
+ mode: ToolbarNextMode;
37
+ content: ToolbarNextContentModel[];
38
+ }
39
+ export declare function buildContentOverflowRenderSlots(items: ToolbarNextOverflowItem[], overflowedIds: Set<string>, activeNamedGroupKeys: Set<string>): ToolbarNextOverflowRenderSlot[];
40
+ export declare function flattenToolbarChildren(children: ReactNode): ToolbarNextChild[];
41
+ export declare function normalizeToolbarChildren(children: ReactNode): ToolbarNextModel;
42
+ export {};
@@ -0,0 +1,41 @@
1
+ import { type FocusEventHandler, type KeyboardEventHandler, type PointerEventHandler, type RefObject } from "react";
2
+ import { type ToolbarNextFocusMemory } from "./toolbarNextKeyboardUtils";
3
+ import type { ToolbarNextOverflowItem } from "./toolbarNextUtils";
4
+ interface UseToolbarNextKeyboardNavigationProps {
5
+ includeTabIndexMinusOne?: boolean;
6
+ items?: ToolbarNextOverflowItem[];
7
+ overflowedIds?: Set<string>;
8
+ scopeRef: RefObject<HTMLElement | null>;
9
+ }
10
+ interface ToolbarNextFocusEvent {
11
+ relatedTarget: EventTarget | null;
12
+ target: EventTarget | null;
13
+ }
14
+ interface ToolbarNextKeyDownEvent {
15
+ altKey: boolean;
16
+ ctrlKey: boolean;
17
+ key: string;
18
+ metaKey: boolean;
19
+ preventDefault: () => void;
20
+ shiftKey: boolean;
21
+ stopPropagation: () => void;
22
+ target: EventTarget | null;
23
+ }
24
+ interface ToolbarNextPointerEvent {
25
+ target: EventTarget | null;
26
+ }
27
+ export declare function useToolbarNextKeyboardNavigation({ includeTabIndexMinusOne, items, overflowedIds, scopeRef, }: UseToolbarNextKeyboardNavigationProps): {
28
+ focusEntryTarget: () => void;
29
+ getEntryFocusable: () => HTMLElement | null;
30
+ handleBlurCapture: FocusEventHandler<HTMLElement>;
31
+ handleFocusCapture: FocusEventHandler<HTMLElement>;
32
+ handleKeyDownCapture: KeyboardEventHandler<HTMLElement>;
33
+ handlePointerDownCapture: PointerEventHandler<HTMLElement>;
34
+ handleScopeBlur: (event: ToolbarNextFocusEvent) => void;
35
+ handleScopeFocus: (event: ToolbarNextFocusEvent) => void;
36
+ handleScopeKeyDown: (event: ToolbarNextKeyDownEvent) => void;
37
+ handleScopePointerDown: (event: ToolbarNextPointerEvent) => void;
38
+ rememberItemFocus: (itemId: string, controlIndex: number) => void;
39
+ rememberedFocusRef: import("react").MutableRefObject<ToolbarNextFocusMemory | null>;
40
+ };
41
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { ToolbarContentNextPosition } from "./ToolbarContentNext";
2
+ import { type ToolbarNextContentModel, type ToolbarNextOverflowItem } from "./toolbarNextUtils";
3
+ interface OverflowGroupDefinition {
4
+ id: string;
5
+ key: string;
6
+ label: string;
7
+ named: boolean;
8
+ order: number;
9
+ overflowGroup: string;
10
+ contentKey?: string;
11
+ }
12
+ export interface ToolbarNextOverflowGroup {
13
+ id: string;
14
+ items: ToolbarNextOverflowItem[];
15
+ key: string;
16
+ label: string;
17
+ named: boolean;
18
+ overflowGroup: string;
19
+ contentKey?: string;
20
+ }
21
+ interface UseToolbarNextOverflowProps {
22
+ content: ToolbarNextContentModel[];
23
+ }
24
+ export declare function useToolbarNextOverflow({ content, }: UseToolbarNextOverflowProps): {
25
+ containerRef: import("react").RefObject<HTMLDivElement>;
26
+ getBandRef: (position: ToolbarContentNextPosition) => (node: HTMLDivElement | null) => void;
27
+ getItemRef: (id: string) => (node: HTMLDivElement | null) => void;
28
+ getNamedTriggerMeasureRef: (id: string) => (node: HTMLDivElement | null) => void;
29
+ getNamedTriggerRef: (id: string) => (node: HTMLDivElement | null) => void;
30
+ getContentRef: (contentKey: string) => (node: HTMLDivElement | null) => void;
31
+ getTriggerMeasureRef: (groupKey: string) => (node: HTMLButtonElement | null) => void;
32
+ isOverflowing: boolean;
33
+ overflowGroups: ToolbarNextOverflowGroup[];
34
+ overflowedIds: Set<string>;
35
+ overflowTriggerGroups: OverflowGroupDefinition[];
36
+ };
37
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salt-ds/lab",
3
- "version": "1.0.0-alpha.92",
3
+ "version": "1.0.0-alpha.94",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@floating-ui/react": "^0.26.28",
24
- "@salt-ds/core": "^1.61.0",
24
+ "@salt-ds/core": "^1.63.0",
25
25
  "@salt-ds/date-components": "0.1.0",
26
26
  "@salt-ds/icons": "^1.18.0",
27
27
  "@salt-ds/styles": "0.3.0",
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var css_248z = ".saltSidePanel {\n --saltSidePanel-width: 300px;\n --sidePanel-border: var(--salt-size-fixed-100) var(--salt-borderStyle-solid) var(--sidePanel-borderColor, var(--salt-container-primary-borderColor));\n --saltSidePanel-padding: var(--salt-spacing-300);\n /* Outer wrapper. Idle: a normal flex column whose width comes from\n --saltSidePanel-width (supports any CSS length, including %).\n During enter/exit animation: animates `width` between 0 and the\n panel width and clips the absolutely-positioned inner via\n `contain: paint`. The inner uses a JS-resolved px width during\n animation (--saltSidePanel-animation-width) so percentage widths\n don't compound against the animating outer. */\n position: relative;\n display: flex;\n flex-direction: column;\n flex: none;\n width: var(--saltSidePanel-width);\n height: 100%;\n min-height: 0;\n align-self: stretch;\n}\n\n.saltSidePanel-primary {\n --sidePanel-background: var(--salt-container-primary-background);\n --sidePanel-borderColor: var(--salt-container-primary-borderColor);\n}\n\n.saltSidePanel-secondary {\n --sidePanel-background: var(--salt-container-secondary-background);\n --sidePanel-borderColor: var(--salt-container-secondary-borderColor);\n}\n\n.saltSidePanel-tertiary {\n --sidePanel-background: var(--salt-container-tertiary-background);\n --sidePanel-borderColor: var(--salt-container-tertiary-borderColor);\n}\n\n.saltSidePanel-none {\n --sidePanel-background: none;\n --saltSidePanel-padding: var(--salt-spacing-200);\n}\n\n.saltSidePanel-inner {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n padding: var(--saltSidePanel-padding);\n width: 100%;\n background-color: var(--sidePanel-background, var(--salt-container-primary-background));\n}\n\n.saltSidePanel-left .saltSidePanel-inner {\n border-right: var(--sidePanel-border);\n}\n\n.saltSidePanel-right .saltSidePanel-inner {\n border-left: var(--sidePanel-border);\n}\n\n.saltSidePanel-none .saltSidePanel-inner {\n border: none;\n}\n\n/* Animation: outer becomes the gap + clip; inner is absolutely positioned\n and anchored to the gap's GROWING edge so the leading edge tracks the\n gap's expansion — content visibly pushes the sibling rather than being\n revealed in place. Left grows rightward → anchor inner right; right\n grows leftward → anchor inner left.\n\n During animation the outer's width is interpolating, so the inner can't\n rely on --saltSidePanel-width (which may be a percentage that would\n resolve against the animating outer). Instead the JS layer measures the\n resolved width once and exposes it as --saltSidePanel-animation-width\n (a px value) for the inner to use. */\n.saltSidePanel-enterAnimation,\n.saltSidePanel-exitAnimation {\n contain: paint;\n}\n\n.saltSidePanel-enterAnimation .saltSidePanel-inner,\n.saltSidePanel-exitAnimation .saltSidePanel-inner {\n position: absolute;\n top: 0;\n bottom: 0;\n flex: none;\n width: var(--saltSidePanel-animation-width, var(--saltSidePanel-width));\n}\n\n.saltSidePanel-left.saltSidePanel-enterAnimation .saltSidePanel-inner,\n.saltSidePanel-left.saltSidePanel-exitAnimation .saltSidePanel-inner {\n right: 0;\n}\n\n.saltSidePanel-right.saltSidePanel-enterAnimation .saltSidePanel-inner,\n.saltSidePanel-right.saltSidePanel-exitAnimation .saltSidePanel-inner {\n left: 0;\n}\n\n.saltSidePanel-exitAnimation .saltSidePanel-inner {\n pointer-events: none;\n}\n\n.saltSidePanel-enterAnimation {\n animation: saltSidePanel-open var(--salt-duration-perceptible) var(--salt-animation-timing-function);\n}\n\n.saltSidePanel-exitAnimation {\n animation: saltSidePanel-close var(--salt-duration-perceptible) var(--salt-animation-timing-function) both;\n}\n\n@keyframes saltSidePanel-open {\n from {\n width: 0;\n }\n}\n\n@keyframes saltSidePanel-close {\n to {\n width: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .saltSidePanel-enterAnimation,\n .saltSidePanel-exitAnimation {\n animation: none;\n }\n}\n";
4
-
5
- module.exports = css_248z;
6
- //# sourceMappingURL=SidePanel.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidePanel.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}