@react-spectrum/s2 3.0.0-nightly-fd7075c5f-250128 → 3.0.0-nightly-e3ed3c7f6-250130

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 (268) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.css +2 -2
  3. package/dist/Accordion.mjs +3 -3
  4. package/dist/ActionBar.cjs +47 -47
  5. package/dist/ActionBar.css +51 -51
  6. package/dist/ActionBar.mjs +47 -47
  7. package/dist/ActionButton.cjs +97 -97
  8. package/dist/ActionButton.css +96 -96
  9. package/dist/ActionButton.mjs +97 -97
  10. package/dist/ActionButtonGroup.cjs +11 -11
  11. package/dist/ActionButtonGroup.css +9 -9
  12. package/dist/ActionButtonGroup.mjs +11 -11
  13. package/dist/AlertDialog.cjs +3 -3
  14. package/dist/AlertDialog.css +3 -3
  15. package/dist/AlertDialog.mjs +3 -3
  16. package/dist/Avatar.cjs +17 -17
  17. package/dist/Avatar.css +14 -14
  18. package/dist/Avatar.mjs +17 -17
  19. package/dist/AvatarGroup.cjs +100 -100
  20. package/dist/AvatarGroup.css +34 -34
  21. package/dist/AvatarGroup.mjs +100 -100
  22. package/dist/Badge.cjs +91 -67
  23. package/dist/Badge.cjs.map +1 -1
  24. package/dist/Badge.css +163 -91
  25. package/dist/Badge.css.map +1 -1
  26. package/dist/Badge.mjs +91 -67
  27. package/dist/Badge.mjs.map +1 -1
  28. package/dist/Breadcrumbs.cjs +115 -115
  29. package/dist/Breadcrumbs.css +89 -89
  30. package/dist/Breadcrumbs.mjs +115 -115
  31. package/dist/Button.cjs +236 -152
  32. package/dist/Button.cjs.map +1 -1
  33. package/dist/Button.css +309 -165
  34. package/dist/Button.css.map +1 -1
  35. package/dist/Button.mjs +236 -152
  36. package/dist/Button.mjs.map +1 -1
  37. package/dist/ButtonGroup.cjs +19 -19
  38. package/dist/ButtonGroup.css +15 -15
  39. package/dist/ButtonGroup.mjs +19 -19
  40. package/dist/Card.cjs +264 -261
  41. package/dist/Card.cjs.map +1 -1
  42. package/dist/Card.css +210 -198
  43. package/dist/Card.css.map +1 -1
  44. package/dist/Card.mjs +264 -261
  45. package/dist/Card.mjs.map +1 -1
  46. package/dist/CardView.cjs +15 -15
  47. package/dist/CardView.css +18 -18
  48. package/dist/CardView.mjs +15 -15
  49. package/dist/CenterBaseline.cjs +1 -1
  50. package/dist/CenterBaseline.css +2 -2
  51. package/dist/CenterBaseline.mjs +1 -1
  52. package/dist/Checkbox.cjs +124 -73
  53. package/dist/Checkbox.cjs.map +1 -1
  54. package/dist/Checkbox.css +201 -81
  55. package/dist/Checkbox.css.map +1 -1
  56. package/dist/Checkbox.mjs +124 -73
  57. package/dist/Checkbox.mjs.map +1 -1
  58. package/dist/CheckboxGroup.cjs +49 -49
  59. package/dist/CheckboxGroup.css +41 -41
  60. package/dist/CheckboxGroup.mjs +49 -49
  61. package/dist/ClearButton.cjs +15 -15
  62. package/dist/ClearButton.css +17 -17
  63. package/dist/ClearButton.mjs +15 -15
  64. package/dist/CloseButton.cjs +35 -35
  65. package/dist/CloseButton.css +33 -33
  66. package/dist/CloseButton.mjs +35 -35
  67. package/dist/ColorArea.cjs +22 -22
  68. package/dist/ColorArea.css +15 -15
  69. package/dist/ColorArea.mjs +22 -22
  70. package/dist/ColorField.cjs +38 -38
  71. package/dist/ColorField.css +32 -32
  72. package/dist/ColorField.mjs +38 -38
  73. package/dist/ColorHandle.cjs +27 -21
  74. package/dist/ColorHandle.cjs.map +1 -1
  75. package/dist/ColorHandle.css +93 -45
  76. package/dist/ColorHandle.css.map +1 -1
  77. package/dist/ColorHandle.mjs +27 -21
  78. package/dist/ColorHandle.mjs.map +1 -1
  79. package/dist/ColorSlider.cjs +52 -52
  80. package/dist/ColorSlider.css +51 -51
  81. package/dist/ColorSlider.mjs +52 -52
  82. package/dist/ColorSwatch.cjs +27 -24
  83. package/dist/ColorSwatch.cjs.map +1 -1
  84. package/dist/ColorSwatch.css +41 -29
  85. package/dist/ColorSwatch.css.map +1 -1
  86. package/dist/ColorSwatch.mjs +27 -24
  87. package/dist/ColorSwatch.mjs.map +1 -1
  88. package/dist/ColorSwatchPicker.cjs +23 -23
  89. package/dist/ColorSwatchPicker.css +60 -48
  90. package/dist/ColorSwatchPicker.css.map +1 -1
  91. package/dist/ColorSwatchPicker.mjs +23 -23
  92. package/dist/ColorWheel.cjs +22 -22
  93. package/dist/ColorWheel.css +16 -16
  94. package/dist/ColorWheel.mjs +22 -22
  95. package/dist/ComboBox.cjs +80 -80
  96. package/dist/ComboBox.css +88 -88
  97. package/dist/ComboBox.mjs +80 -80
  98. package/dist/ContextualHelp.cjs +5 -5
  99. package/dist/ContextualHelp.css +38 -38
  100. package/dist/ContextualHelp.mjs +5 -5
  101. package/dist/CustomDialog.cjs +31 -31
  102. package/dist/CustomDialog.css +25 -25
  103. package/dist/CustomDialog.mjs +31 -31
  104. package/dist/Dialog.cjs +17 -17
  105. package/dist/Dialog.css +64 -64
  106. package/dist/Dialog.mjs +17 -17
  107. package/dist/Disclosure.cjs +111 -108
  108. package/dist/Disclosure.cjs.map +1 -1
  109. package/dist/Disclosure.css +124 -112
  110. package/dist/Disclosure.css.map +1 -1
  111. package/dist/Disclosure.mjs +111 -108
  112. package/dist/Disclosure.mjs.map +1 -1
  113. package/dist/Divider.cjs +26 -26
  114. package/dist/Divider.css +16 -16
  115. package/dist/Divider.mjs +26 -26
  116. package/dist/DropZone.cjs +56 -47
  117. package/dist/DropZone.cjs.map +1 -1
  118. package/dist/DropZone.css +80 -56
  119. package/dist/DropZone.css.map +1 -1
  120. package/dist/DropZone.mjs +56 -47
  121. package/dist/DropZone.mjs.map +1 -1
  122. package/dist/Field.cjs +204 -150
  123. package/dist/Field.cjs.map +1 -1
  124. package/dist/Field.css +246 -150
  125. package/dist/Field.css.map +1 -1
  126. package/dist/Field.mjs +204 -150
  127. package/dist/Field.mjs.map +1 -1
  128. package/dist/Form.cjs +10 -10
  129. package/dist/Form.css +9 -9
  130. package/dist/Form.mjs +10 -10
  131. package/dist/FullscreenDialog.cjs +5 -5
  132. package/dist/FullscreenDialog.css +72 -72
  133. package/dist/FullscreenDialog.mjs +5 -5
  134. package/dist/IllustratedMessage.cjs +134 -134
  135. package/dist/IllustratedMessage.css +69 -69
  136. package/dist/IllustratedMessage.mjs +134 -134
  137. package/dist/Image.cjs +12 -12
  138. package/dist/Image.css +13 -13
  139. package/dist/Image.mjs +12 -12
  140. package/dist/InlineAlert.cjs +104 -77
  141. package/dist/InlineAlert.cjs.map +1 -1
  142. package/dist/InlineAlert.css +149 -77
  143. package/dist/InlineAlert.css.map +1 -1
  144. package/dist/InlineAlert.mjs +104 -77
  145. package/dist/InlineAlert.mjs.map +1 -1
  146. package/dist/Link.cjs +31 -31
  147. package/dist/Link.css +30 -30
  148. package/dist/Link.mjs +31 -31
  149. package/dist/Menu.cjs +269 -264
  150. package/dist/Menu.cjs.map +1 -1
  151. package/dist/Menu.css +152 -152
  152. package/dist/Menu.css.map +1 -1
  153. package/dist/Menu.mjs +270 -265
  154. package/dist/Menu.mjs.map +1 -1
  155. package/dist/Meter.cjs +85 -85
  156. package/dist/Meter.css +81 -81
  157. package/dist/Meter.mjs +85 -85
  158. package/dist/Modal.cjs +48 -48
  159. package/dist/Modal.css +46 -46
  160. package/dist/Modal.mjs +48 -48
  161. package/dist/NumberField.cjs +115 -115
  162. package/dist/NumberField.css +114 -114
  163. package/dist/NumberField.mjs +115 -115
  164. package/dist/Picker.cjs +193 -175
  165. package/dist/Picker.cjs.map +1 -1
  166. package/dist/Picker.css +223 -163
  167. package/dist/Picker.css.map +1 -1
  168. package/dist/Picker.mjs +193 -175
  169. package/dist/Picker.mjs.map +1 -1
  170. package/dist/Popover.cjs +84 -78
  171. package/dist/Popover.cjs.map +1 -1
  172. package/dist/Popover.css +89 -65
  173. package/dist/Popover.css.map +1 -1
  174. package/dist/Popover.mjs +84 -78
  175. package/dist/Popover.mjs.map +1 -1
  176. package/dist/ProgressBar.cjs +98 -98
  177. package/dist/ProgressBar.css +92 -92
  178. package/dist/ProgressBar.mjs +98 -98
  179. package/dist/ProgressCircle.cjs +17 -17
  180. package/dist/ProgressCircle.css +15 -15
  181. package/dist/ProgressCircle.mjs +17 -17
  182. package/dist/Provider.cjs +4 -4
  183. package/dist/Provider.css +5 -5
  184. package/dist/Provider.mjs +4 -4
  185. package/dist/Radio.cjs +152 -80
  186. package/dist/Radio.cjs.map +1 -1
  187. package/dist/Radio.css +240 -96
  188. package/dist/Radio.css.map +1 -1
  189. package/dist/Radio.mjs +152 -80
  190. package/dist/Radio.mjs.map +1 -1
  191. package/dist/RadioGroup.cjs +47 -47
  192. package/dist/RadioGroup.css +41 -41
  193. package/dist/RadioGroup.mjs +47 -47
  194. package/dist/SearchField.cjs +42 -42
  195. package/dist/SearchField.css +47 -47
  196. package/dist/SearchField.mjs +42 -42
  197. package/dist/SegmentedControl.cjs +101 -89
  198. package/dist/SegmentedControl.cjs.map +1 -1
  199. package/dist/SegmentedControl.css +140 -92
  200. package/dist/SegmentedControl.css.map +1 -1
  201. package/dist/SegmentedControl.mjs +101 -89
  202. package/dist/SegmentedControl.mjs.map +1 -1
  203. package/dist/Slider.cjs +229 -196
  204. package/dist/Slider.cjs.map +1 -1
  205. package/dist/Slider.css +221 -149
  206. package/dist/Slider.css.map +1 -1
  207. package/dist/Slider.mjs +229 -196
  208. package/dist/Slider.mjs.map +1 -1
  209. package/dist/StatusLight.cjs +56 -56
  210. package/dist/StatusLight.css +59 -59
  211. package/dist/StatusLight.mjs +56 -56
  212. package/dist/Switch.cjs +107 -74
  213. package/dist/Switch.cjs.map +1 -1
  214. package/dist/Switch.css +141 -69
  215. package/dist/Switch.css.map +1 -1
  216. package/dist/Switch.mjs +107 -74
  217. package/dist/Switch.mjs.map +1 -1
  218. package/dist/TableView.cjs +280 -253
  219. package/dist/TableView.cjs.map +1 -1
  220. package/dist/TableView.css +199 -163
  221. package/dist/TableView.css.map +1 -1
  222. package/dist/TableView.mjs +280 -253
  223. package/dist/TableView.mjs.map +1 -1
  224. package/dist/Tabs.cjs +83 -83
  225. package/dist/Tabs.css +58 -58
  226. package/dist/Tabs.mjs +83 -83
  227. package/dist/TagGroup.cjs +148 -148
  228. package/dist/TagGroup.css +134 -134
  229. package/dist/TagGroup.mjs +148 -148
  230. package/dist/TextField.cjs +59 -59
  231. package/dist/TextField.css +62 -62
  232. package/dist/TextField.mjs +59 -59
  233. package/dist/ToggleButton.cjs +3 -3
  234. package/dist/ToggleButton.css +12 -12
  235. package/dist/ToggleButton.mjs +3 -3
  236. package/dist/Tooltip.cjs +60 -57
  237. package/dist/Tooltip.cjs.map +1 -1
  238. package/dist/Tooltip.css +83 -71
  239. package/dist/Tooltip.css.map +1 -1
  240. package/dist/Tooltip.mjs +60 -57
  241. package/dist/Tooltip.mjs.map +1 -1
  242. package/dist/TreeView.cjs +465 -0
  243. package/dist/TreeView.cjs.map +1 -0
  244. package/dist/TreeView.css +632 -0
  245. package/dist/TreeView.css.map +1 -0
  246. package/dist/TreeView.mjs +455 -0
  247. package/dist/TreeView.mjs.map +1 -0
  248. package/dist/main.cjs +4 -0
  249. package/dist/main.cjs.map +1 -1
  250. package/dist/module.mjs +3 -1
  251. package/dist/module.mjs.map +1 -1
  252. package/dist/types.d.ts +21 -1
  253. package/dist/types.d.ts.map +1 -1
  254. package/icons/Skeleton.cjs +2 -2
  255. package/icons/Skeleton.css +5 -5
  256. package/icons/Skeleton.mjs +2 -2
  257. package/package.json +20 -19
  258. package/src/Menu.tsx +2 -0
  259. package/src/TreeView.tsx +497 -0
  260. package/src/index.ts +2 -0
  261. package/style/__tests__/style-macro.test.js +18 -18
  262. package/style/dist/spectrum-theme.cjs +20 -10
  263. package/style/dist/spectrum-theme.cjs.map +1 -1
  264. package/style/dist/spectrum-theme.mjs +20 -10
  265. package/style/dist/spectrum-theme.mjs.map +1 -1
  266. package/style/dist/types.d.ts +4 -0
  267. package/style/dist/types.d.ts.map +1 -1
  268. package/style/spectrum-theme.ts +18 -11
@@ -0,0 +1 @@
1
+ {"mappings":"AC6Ea;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoFG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA2BK;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA+FA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAOJ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EASG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAOA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EASG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAeO;;;;;;;;;;;;;EA2EH;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAWC;;;;EAAA;;;;EAAA;;;;EAOuD;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgB9D;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAqCF;;;;;EAAA;;;;;EAAA;;;;;EAAA;;;;;EAAA;;;;;AA/YN;EAoFG;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAiIC;;;;;;AAjID;EAAA;IAAA;;;;IAAA;;;;IA2BK;;;;IAAA;;;;IAAA;;;;IAAA;;;;IA2O8D","sources":["56ed516746d0036e","packages/@react-spectrum/s2/src/TreeView.tsx"],"sourcesContent":["@import \"9f0cb543acce7895\";\n@import \"1efe6bd9df94f465\";\n@import \"bdf071bf66df1ce3\";\n@import \"0330b2193d88b3df\";\n@import \"888ae06603582201\";\n@import \"73010de75c5ff12a\";\n@import \"6f9cf7ba5fc61169\";\n@import \"e3d8cbff54f98abf\";\n@import \"5ce50fd84b82affa\";\n@import \"e7f15e944ad73835\";\n@import \"17e37b578317afa7\";\n@import \"664b85d9761c64e2\";\n@import \"b6201a1b57a21b4e\";\n@import \"73100caf88a76f92\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {ActionMenuContext} from './ActionMenu';\nimport {\n Button,\n ButtonContext,\n Collection,\n Provider,\n TreeItemProps as RACTreeItemProps,\n TreeProps as RACTreeProps,\n UNSTABLE_ListLayout,\n UNSTABLE_Tree,\n UNSTABLE_TreeItem,\n UNSTABLE_TreeItemContent,\n UNSTABLE_Virtualizer,\n useContextProps\n} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {Checkbox} from './Checkbox';\nimport Chevron from '../ui-icons/Chevron';\nimport {colorMix, fontRelative, lightDark, style} from '../style' with {type: 'macro'};\nimport {DOMRef, Key} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {isAndroid} from '@react-aria/utils';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport React, {createContext, forwardRef, isValidElement, JSXElementConstructor, ReactElement, useContext, useMemo, useRef} from 'react';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocale} from 'react-aria';\n\ninterface S2TreeProps {\n // Only detatched is supported right now with the current styles from Spectrum\n isDetached?: boolean,\n onAction?: (key: Key) => void,\n // not fully supported yet\n isEmphasized?: boolean\n}\n\nexport interface TreeViewProps extends Omit<RACTreeProps<any>, 'style' | 'className' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks'>, UnsafeStyles, S2TreeProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\nexport interface TreeViewItemProps<T extends object = object> extends Omit<RACTreeItemProps, 'className' | 'style'> {\n /** Whether this item has children, even if not loaded yet. */\n hasChildItems?: boolean,\n /** A list of child tree item objects used when dynamically rendering the tree item children. */\n childItems?: Iterable<T>\n}\n\ninterface TreeRendererContextValue {\n renderer?: (item) => ReactElement<any, string | JSXElementConstructor<any>>\n}\nconst TreeRendererContext = createContext<TreeRendererContextValue>({});\n\nfunction useTreeRendererContext(): TreeRendererContextValue {\n return useContext(TreeRendererContext)!;\n}\n\n\nlet InternalTreeContext = createContext<{isDetached?: boolean, isEmphasized?: boolean}>({});\n\n// TODO: the below is needed so the borders of the top and bottom row isn't cut off if the TreeView is wrapped within a container by always reserving the 2px needed for the\n// keyboard focus ring. Perhaps find a different way of rendering the outlines since the top of the item doesn't\n// scroll into view due to how the ring is offset. Alternatively, have the tree render the top/bottom outline like it does in Listview\nconst tree = style({\n userSelect: 'none',\n minHeight: 0,\n minWidth: 0,\n width: 'full',\n overflow: 'auto',\n boxSizing: 'border-box',\n justifyContent: {\n isEmpty: 'center'\n },\n alignItems: {\n isEmpty: 'center'\n },\n height: {\n isEmpty: 'full'\n },\n '--indent': {\n type: 'width',\n value: 16\n }\n}, getAllowedOverrides({height: true}));\n\nfunction TreeView(props: TreeViewProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isDetached, isEmphasized} = props;\n\n let renderer;\n if (typeof children === 'function') {\n renderer = children;\n }\n\n let domRef = useDOMRef(ref);\n\n let layout = useMemo(() => {\n return new UNSTABLE_ListLayout({\n rowHeight: isDetached ? 42 : 40\n });\n }, [isDetached]);\n\n return (\n <UNSTABLE_Virtualizer layout={layout}>\n <TreeRendererContext.Provider value={{renderer}}>\n <InternalTreeContext.Provider value={{isDetached, isEmphasized}}>\n <UNSTABLE_Tree\n {...props}\n className={({isEmpty}) => tree({isEmpty, isDetached}, props.styles)}\n selectionBehavior=\"toggle\"\n ref={domRef}>\n {props.children}\n </UNSTABLE_Tree>\n </InternalTreeContext.Provider>\n </TreeRendererContext.Provider>\n </UNSTABLE_Virtualizer>\n );\n}\n\nconst selectedBackground = lightDark(colorMix('gray-25', 'informative-900', 10), colorMix('gray-25', 'informative-700', 10));\nconst selectedActiveBackground = lightDark(colorMix('gray-25', 'informative-900', 15), colorMix('gray-25', 'informative-700', 15));\n\nconst rowBackgroundColor = {\n default: '--s2-container-bg',\n isFocusVisibleWithin: colorMix('gray-25', 'gray-900', 7),\n isHovered: colorMix('gray-25', 'gray-900', 7),\n isPressed: colorMix('gray-25', 'gray-900', 10),\n isSelected: {\n default: colorMix('gray-25', 'gray-900', 7),\n isEmphasized: selectedBackground,\n isFocusVisibleWithin: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n },\n isHovered: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n },\n isPressed: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n }\n },\n forcedColors: {\n default: 'Background'\n }\n} as const;\n\nconst treeRow = style({\n position: 'relative',\n display: 'flex',\n height: 40,\n width: 'full',\n boxSizing: 'border-box',\n font: 'ui',\n color: 'body',\n outlineStyle: 'none',\n cursor: {\n default: 'default',\n isLink: 'pointer'\n },\n '--rowBackgroundColor': {\n type: 'backgroundColor',\n value: rowBackgroundColor\n },\n '--rowFocusIndicatorColor': {\n type: 'outlineColor',\n value: {\n default: 'focus-ring',\n forcedColors: 'Highlight'\n }\n }\n});\n\n\nconst treeCellGrid = style({\n display: 'grid',\n width: 'full',\n alignContent: 'center',\n alignItems: 'center',\n gridTemplateColumns: ['minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', 40, 'minmax(0, auto)', '1fr', 'minmax(0, auto)', 'auto'],\n gridTemplateRows: '1fr',\n gridTemplateAreas: [\n 'drag-handle checkbox level-padding expand-button icon content actions actionmenu'\n ],\n backgroundColor: '--rowBackgroundColor',\n paddingEnd: 4, // account for any focus rings on the last item in the cell\n color: {\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n },\n '--rowSelectedBorderColor': {\n type: 'outlineColor',\n value: {\n default: 'gray-800',\n isFocusVisible: 'focus-ring',\n forcedColors: 'Highlight'\n }\n },\n '--rowForcedFocusBorderColor': {\n type: 'outlineColor',\n value: {\n default: 'focus-ring',\n forcedColors: 'Highlight'\n }\n },\n borderTopColor: {\n default: 'transparent',\n isSelected: {\n isFirst: 'transparent'\n },\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderInlineEndColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderBottomColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isNextSelected: 'transparent',\n isNextFocused: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderInlineStartColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderTopWidth: {\n default: 0,\n isFirst: {\n default: 1,\n forcedColors: 0\n },\n isDetached: 1\n },\n borderBottomWidth: {\n default: 0,\n isDetached: 1\n },\n borderStartWidth: {\n default: 0,\n isDetached: 1\n },\n borderEndWidth: {\n default: 0,\n isDetached: 1\n },\n borderRadius: {\n isDetached: 'default'\n },\n borderStyle: 'solid'\n});\n\nconst treeCheckbox = style({\n gridArea: 'checkbox',\n marginStart: 12,\n marginEnd: 0,\n paddingEnd: 0\n});\n\nconst treeIcon = style({\n gridArea: 'icon',\n marginEnd: 'text-to-visual',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n});\n\nconst treeContent = style({\n gridArea: 'content',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n});\n\nconst treeActions = style({\n gridArea: 'actions',\n flexGrow: 0,\n flexShrink: 0,\n /* TODO: I made this one up, confirm desired behavior. These paddings are to make sure the action group has enough padding for the focus ring */\n marginStart: 2,\n marginEnd: 4\n});\n\nconst treeActionMenu = style({\n gridArea: 'actionmenu'\n});\n\nconst cellFocus = {\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid'\n },\n outlineOffset: -2,\n outlineWidth: 2,\n outlineColor: 'focus-ring',\n borderRadius: '[6px]'\n} as const;\n\nconst treeRowFocusIndicator = raw(`\n &:before {\n content: \"\";\n display: inline-block;\n position: sticky;\n inset-inline-start: 0;\n width: 3px;\n height: 100%;\n margin-inline-end: -3px;\n margin-block-end: 1px;\n z-index: 3;\n background-color: var(--rowFocusIndicatorColor);\n }`\n);\n\n\nexport const TreeViewItem = <T extends object>(props: TreeViewItemProps<T>) => {\n let {\n children,\n childItems,\n hasChildItems,\n href\n } = props;\n\n let content;\n let nestedRows;\n let {renderer} = useTreeRendererContext();\n let {isDetached, isEmphasized} = useContext(InternalTreeContext);\n\n if (typeof children === 'string') {\n content = <Text>{children}</Text>;\n } else {\n content = [];\n nestedRows = [];\n React.Children.forEach(children, node => {\n if (isValidElement(node) && node.type === TreeViewItem) {\n nestedRows.push(node);\n } else {\n content.push(node);\n }\n });\n }\n\n if (childItems != null && renderer) {\n nestedRows = (\n <Collection items={childItems}>\n {renderer}\n </Collection>\n );\n }\n\n return (\n <UNSTABLE_TreeItem\n {...props}\n className={(renderProps) => treeRow({...renderProps, isLink: !!href, isEmphasized}) + (renderProps.isFocusVisible && !isDetached ? ' ' + treeRowFocusIndicator : '')}>\n <UNSTABLE_TreeItemContent>\n {({isExpanded, hasChildRows, selectionMode, selectionBehavior, isDisabled, isFocusVisible, isSelected, id, state}) => {\n let isNextSelected = false;\n let isNextFocused = false;\n let keyAfter = state.collection.getKeyAfter(id);\n if (keyAfter != null) {\n isNextSelected = state.selectionManager.isSelected(keyAfter);\n }\n let isFirst = state.collection.getFirstKey() === id;\n return (\n <div className={treeCellGrid({isDisabled, isNextSelected, isSelected, isFirst, isNextFocused, isDetached})}>\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n // TODO: add transition?\n <div className={treeCheckbox}>\n <Checkbox\n isEmphasized={isEmphasized}\n slot=\"selection\" />\n </div>\n )}\n <div\n className={style({\n gridArea: 'level-padding',\n width: '[calc(calc(var(--tree-item-level, 0) - 1) * var(--indent))]'\n })} />\n {/* TODO: revisit when we do async loading, at the moment hasChildItems will only cause the chevron to be rendered, no aria/data attributes indicating the row's expandability are added */}\n {(hasChildRows || hasChildItems) && <ExpandableRowChevron isDisabled={isDisabled} isExpanded={isExpanded} />}\n <Provider\n values={[\n [TextContext, {styles: treeContent}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: treeIcon}),\n styles: style({size: fontRelative(20), flexShrink: 0})\n }],\n [ActionButtonGroupContext, {styles: treeActions}],\n [ActionMenuContext, {styles: treeActionMenu, isQuiet: true}]\n ]}>\n {content}\n </Provider>\n {isFocusVisible && isDetached && <div role=\"presentation\" className={style({...cellFocus, position: 'absolute', inset: 0})({isFocusVisible: true})} />}\n </div>\n );\n }}\n </UNSTABLE_TreeItemContent>\n {nestedRows}\n </UNSTABLE_TreeItem>\n );\n};\n\ninterface ExpandableRowChevronProps {\n isExpanded?: boolean,\n isDisabled?: boolean,\n isRTL?: boolean\n}\n\nconst expandButton = style<ExpandableRowChevronProps>({\n gridArea: 'expand-button',\n height: 'full',\n aspectRatio: 'square',\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'center',\n justifyContent: 'center',\n outlineStyle: 'none',\n cursor: 'default',\n transform: {\n isExpanded: {\n default: 'rotate(90deg)',\n isRTL: 'rotate(-90deg)'\n }\n },\n transition: 'default',\n backgroundColor: 'transparent',\n borderStyle: 'none'\n});\n\nfunction ExpandableRowChevron(props: ExpandableRowChevronProps) {\n let expandButtonRef = useRef<HTMLButtonElement>(null);\n let [fullProps, ref] = useContextProps({...props, slot: 'chevron'}, expandButtonRef, ButtonContext);\n let {isExpanded, isDisabled} = fullProps;\n let {direction} = useLocale();\n\n return (\n <Button\n {...props}\n ref={ref}\n slot=\"chevron\"\n // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually \"focus\" it\n excludeFromTabOrder={isAndroid() && !isDisabled}\n preventFocusOnPress\n className={renderProps => expandButton({...renderProps, isExpanded, isRTL: direction === 'rtl'})}>\n <Chevron\n className={style({\n scale: {\n direction: {\n ltr: '1',\n rtl: '-1'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})} />\n </Button>\n );\n}\n\n/**\n * A tree view provides users with a way to navigate nested hierarchical information.\n */\nconst _TreeView = forwardRef(TreeView);\nexport {_TreeView as TreeView};\n"],"names":[],"version":3,"file":"TreeView.css.map"}
@@ -0,0 +1,455 @@
1
+ import "./TreeView.css";
2
+ import {ActionButtonGroupContext as $10401bdc118cbc90$export$33f5f2f2cb85d743} from "./ActionButtonGroup.mjs";
3
+ import {ActionMenuContext as $8bf3cd2442eb485e$export$7f4b66acaca28bd5} from "./ActionMenu.mjs";
4
+ import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
5
+ import {Checkbox as $9b405e0f8095dce0$export$48513f6b9f8ce62d} from "./Checkbox.mjs";
6
+ import $4b69f02ec06b9226$export$2e2bcd8739ae039 from "./Chevron.mjs";
7
+ import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
8
+ import {Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
9
+ import {jsx as $iOVFT$jsx, jsxs as $iOVFT$jsxs} from "react/jsx-runtime";
10
+ import {UNSTABLE_ListLayout as $iOVFT$UNSTABLE_ListLayout, UNSTABLE_Virtualizer as $iOVFT$UNSTABLE_Virtualizer, UNSTABLE_Tree as $iOVFT$UNSTABLE_Tree, Collection as $iOVFT$Collection, UNSTABLE_TreeItem as $iOVFT$UNSTABLE_TreeItem, UNSTABLE_TreeItemContent as $iOVFT$UNSTABLE_TreeItemContent, Provider as $iOVFT$Provider, useContextProps as $iOVFT$useContextProps, ButtonContext as $iOVFT$ButtonContext, Button as $iOVFT$Button} from "react-aria-components";
11
+ import {isAndroid as $iOVFT$isAndroid} from "@react-aria/utils";
12
+ import $iOVFT$react, {createContext as $iOVFT$createContext, useContext as $iOVFT$useContext, useMemo as $iOVFT$useMemo, isValidElement as $iOVFT$isValidElement, useRef as $iOVFT$useRef, forwardRef as $iOVFT$forwardRef} from "react";
13
+ import {useDOMRef as $iOVFT$useDOMRef} from "@react-spectrum/utils";
14
+ import {useLocale as $iOVFT$useLocale} from "react-aria";
15
+
16
+ /*
17
+ * Copyright 2024 Adobe. All rights reserved.
18
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
+ * you may not use this file except in compliance with the License. You may obtain a copy
20
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software distributed under
23
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
+ * OF ANY KIND, either express or implied. See the License for the specific language
25
+ * governing permissions and limitations under the License.
26
+ */
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ const $03960a2740ca2b19$var$TreeRendererContext = /*#__PURE__*/ (0, $iOVFT$createContext)({});
40
+ function $03960a2740ca2b19$var$useTreeRendererContext() {
41
+ return (0, $iOVFT$useContext)($03960a2740ca2b19$var$TreeRendererContext);
42
+ }
43
+ let $03960a2740ca2b19$var$InternalTreeContext = /*#__PURE__*/ (0, $iOVFT$createContext)({});
44
+ // TODO: the below is needed so the borders of the top and bottom row isn't cut off if the TreeView is wrapped within a container by always reserving the 2px needed for the
45
+ // keyboard focus ring. Perhaps find a different way of rendering the outlines since the top of the item doesn't
46
+ // scroll into view due to how the ring is offset. Alternatively, have the tree render the top/bottom outline like it does in Listview
47
+ const $03960a2740ca2b19$var$tree = function anonymous(props, overrides) {
48
+ let rules = " .";
49
+ let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q|j|n|o)[^\s]+/g) || [];
50
+ rules += matches.join('');
51
+ let $n = false;
52
+ let $p = false;
53
+ let $k = false;
54
+ let $j = false;
55
+ for (let p of matches){
56
+ if (/^\s*n/.test(p)) $n = true;
57
+ if (/^\s*p/.test(p)) $p = true;
58
+ if (/^\s*k/.test(p)) $k = true;
59
+ if (/^\s*j/.test(p)) $j = true;
60
+ }
61
+ rules += ' __Ha';
62
+ if (!$n) rules += ' no';
63
+ if (!$p) rules += ' po';
64
+ if (!$k) rules += ' kb';
65
+ rules += ' __za';
66
+ rules += ' __Aa';
67
+ rules += ' __ra';
68
+ if (props.isEmpty) rules += ' _6d';
69
+ if (props.isEmpty) rules += ' _5c';
70
+ if (!$j) {
71
+ if (props.isEmpty) rules += ' jb';
72
+ }
73
+ rules += ' -_11sb0gx_k-E';
74
+ return rules;
75
+ };
76
+ function $03960a2740ca2b19$var$TreeView(props, ref) {
77
+ let { children: children, isDetached: isDetached, isEmphasized: isEmphasized } = props;
78
+ let renderer;
79
+ if (typeof children === 'function') renderer = children;
80
+ let domRef = (0, $iOVFT$useDOMRef)(ref);
81
+ let layout = (0, $iOVFT$useMemo)(()=>{
82
+ return new (0, $iOVFT$UNSTABLE_ListLayout)({
83
+ rowHeight: isDetached ? 42 : 40
84
+ });
85
+ }, [
86
+ isDetached
87
+ ]);
88
+ return /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$UNSTABLE_Virtualizer), {
89
+ layout: layout,
90
+ children: /*#__PURE__*/ (0, $iOVFT$jsx)($03960a2740ca2b19$var$TreeRendererContext.Provider, {
91
+ value: {
92
+ renderer: renderer
93
+ },
94
+ children: /*#__PURE__*/ (0, $iOVFT$jsx)($03960a2740ca2b19$var$InternalTreeContext.Provider, {
95
+ value: {
96
+ isDetached: isDetached,
97
+ isEmphasized: isEmphasized
98
+ },
99
+ children: /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$UNSTABLE_Tree), {
100
+ ...props,
101
+ className: ({ isEmpty: isEmpty })=>$03960a2740ca2b19$var$tree({
102
+ isEmpty: isEmpty,
103
+ isDetached: isDetached
104
+ }, props.styles),
105
+ selectionBehavior: "toggle",
106
+ ref: domRef,
107
+ children: props.children
108
+ })
109
+ })
110
+ })
111
+ });
112
+ }
113
+ const $03960a2740ca2b19$var$selectedBackground = "[light-dark(color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(59, 99, 251), rgb(86, 129, 255)) 10%), color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(93, 137, 255), rgb(52, 91, 248)) 10%))]";
114
+ const $03960a2740ca2b19$var$selectedActiveBackground = "[light-dark(color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(59, 99, 251), rgb(86, 129, 255)) 15%), color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(93, 137, 255), rgb(52, 91, 248)) 15%))]";
115
+ const $03960a2740ca2b19$var$rowBackgroundColor = {
116
+ default: '--s2-container-bg',
117
+ isFocusVisibleWithin: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 7%)]",
118
+ isHovered: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 7%)]",
119
+ isPressed: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 10%)]",
120
+ isSelected: {
121
+ default: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 7%)]",
122
+ isEmphasized: $03960a2740ca2b19$var$selectedBackground,
123
+ isFocusVisibleWithin: {
124
+ default: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 10%)]",
125
+ isEmphasized: $03960a2740ca2b19$var$selectedActiveBackground
126
+ },
127
+ isHovered: {
128
+ default: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 10%)]",
129
+ isEmphasized: $03960a2740ca2b19$var$selectedActiveBackground
130
+ },
131
+ isPressed: {
132
+ default: "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 10%)]",
133
+ isEmphasized: $03960a2740ca2b19$var$selectedActiveBackground
134
+ }
135
+ },
136
+ forcedColors: {
137
+ default: 'Background'
138
+ }
139
+ };
140
+ const $03960a2740ca2b19$var$treeRow = function anonymous(props) {
141
+ let rules = " .";
142
+ rules += ' Yc';
143
+ rules += ' _3d';
144
+ rules += ' j2';
145
+ rules += ' kb';
146
+ rules += ' __ra';
147
+ rules += ' _g-bc1l9oh';
148
+ rules += ' _g-1uotwbwg';
149
+ rules += ' _g-eo0c6sf';
150
+ rules += ' _g-enzzrge';
151
+ rules += ' _g-enzykdd';
152
+ rules += ' _g-enzwzjc';
153
+ rules += ' _g-enzrfpb';
154
+ rules += ' _ga';
155
+ rules += ' _hbf';
156
+ rules += ' _he';
157
+ rules += ' _ib';
158
+ rules += ' _j-1x99dlob';
159
+ rules += ' _ja';
160
+ rules += ' an';
161
+ rules += ' _Pa';
162
+ if (props.isLink) rules += ' __Lc';
163
+ else rules += ' __Lb';
164
+ rules += ' -_19jpv4m_b-a_____H';
165
+ if (props.isSelected) {
166
+ if (props.isPressed) {
167
+ if (props.isEmphasized) rules += ' -_19jpv4m_b--1hocwbr';
168
+ else rules += ' -_19jpv4m_b--17nxj1';
169
+ } else if (props.isHovered) {
170
+ if (props.isEmphasized) rules += ' -_19jpv4m_b--1hocwbr';
171
+ else rules += ' -_19jpv4m_b--17nxj1';
172
+ } else if (props.isFocusVisibleWithin) {
173
+ if (props.isEmphasized) rules += ' -_19jpv4m_b--1hocwbr';
174
+ else rules += ' -_19jpv4m_b--17nxj1';
175
+ } else if (props.isEmphasized) rules += ' -_19jpv4m_b--sogeql';
176
+ else rules += ' -_19jpv4m_b--26tcdv';
177
+ } else if (props.isPressed) rules += ' -_19jpv4m_b--17nxj1';
178
+ else if (props.isHovered) rules += ' -_19jpv4m_b--26tcdv';
179
+ else if (props.isFocusVisibleWithin) rules += ' -_19jpv4m_b--26tcdv';
180
+ else rules += ' -_19jpv4m_b--1de2x0q';
181
+ rules += ' -oorfdf_c-a_____M';
182
+ rules += ' -oorfdf_c-x';
183
+ return rules;
184
+ };
185
+ const $03960a2740ca2b19$var$treeCellGrid = function anonymous(props) {
186
+ let rules = " .";
187
+ rules += ' _3f';
188
+ rules += ' kb';
189
+ rules += ' _4b';
190
+ rules += ' _5c';
191
+ rules += ' __l-r3ezpz';
192
+ rules += ' __m-2wzs0i';
193
+ rules += ' __n-17p9pp0';
194
+ rules += ' b-19jpv4m';
195
+ rules += ' Gc';
196
+ if (props.isDisabled) {
197
+ rules += ' aa_____O';
198
+ rules += ' aj';
199
+ }
200
+ rules += ' -fm23a5_c-a_____M';
201
+ if (props.isFocusVisible) rules += ' -fm23a5_c-x';
202
+ else rules += ' -fm23a5_c-n';
203
+ rules += ' -_17c7snb_c-a_____M';
204
+ rules += ' -_17c7snb_c-x';
205
+ if (props.isDetached) {
206
+ if (props.isSelected) rules += ' x-fm23a5';
207
+ else rules += ' xa';
208
+ } else if (props.isSelected) {
209
+ if (props.isFirst) rules += ' xa';
210
+ } else rules += ' xa';
211
+ if (props.isDetached) {
212
+ if (props.isSelected) rules += ' w-fm23a5';
213
+ else rules += ' wa';
214
+ } else if (props.isSelected) rules += ' wa';
215
+ else rules += ' wa';
216
+ if (props.isDetached) {
217
+ if (props.isSelected) rules += ' y-fm23a5';
218
+ else rules += ' ya';
219
+ } else if (props.isNextFocused) rules += ' ya';
220
+ else if (props.isNextSelected) rules += ' ya';
221
+ else if (props.isSelected) rules += ' ya';
222
+ else rules += ' ya';
223
+ if (props.isDetached) {
224
+ if (props.isSelected) rules += ' v-fm23a5';
225
+ else rules += ' va';
226
+ } else if (props.isSelected) rules += ' va';
227
+ else rules += ' va';
228
+ if (props.isDetached) rules += ' tb';
229
+ else if (props.isFirst) {
230
+ rules += ' taa';
231
+ rules += ' tb';
232
+ } else rules += ' ta';
233
+ if (props.isDetached) rules += ' ub';
234
+ else rules += ' ua';
235
+ if (props.isDetached) rules += ' rb';
236
+ else rules += ' ra';
237
+ if (props.isDetached) rules += ' sb';
238
+ else rules += ' sa';
239
+ if (props.isDetached) rules += ' _zc';
240
+ if (props.isDetached) rules += ' _Ac';
241
+ if (props.isDetached) rules += ' _Bc';
242
+ if (props.isDetached) rules += ' _Cc';
243
+ rules += ' za';
244
+ return rules;
245
+ };
246
+ const $03960a2740ca2b19$var$treeCheckbox = " __e-5dolv4 __f-5dolv4 __g-5dolv4 __h-5dolv4 Be Ca Ga";
247
+ const $03960a2740ca2b19$var$treeIcon = " __e-qb5q8i __f-qb5q8i __g-qb5q8i __h-qb5q8i CG CbH -rwx0fg_d-b";
248
+ const $03960a2740ca2b19$var$treeContent = " __e-drkpd0 __f-drkpd0 __g-drkpd0 __h-drkpd0 _qa _tb __zb __Ab";
249
+ const $03960a2740ca2b19$var$treeActions = " __e-1k7szui __f-1k7szui __g-1k7szui __h-1k7szui __d-3t1x __c-3t1x Bb Cc";
250
+ const $03960a2740ca2b19$var$treeActionMenu = " __e-2npmt8 __f-2npmt8 __g-2npmt8 __h-2npmt8";
251
+ const $03960a2740ca2b19$var$cellFocus = {
252
+ outlineStyle: {
253
+ default: 'none',
254
+ isFocusVisible: 'solid'
255
+ },
256
+ outlineOffset: -2,
257
+ outlineWidth: 2,
258
+ outlineColor: 'focus-ring',
259
+ borderRadius: '[6px]'
260
+ };
261
+ const $03960a2740ca2b19$var$treeRowFocusIndicator = "-lc8e11";
262
+ const $03960a2740ca2b19$export$6e77ea6719814e9c = (props1)=>{
263
+ let { children: children, childItems: childItems, hasChildItems: hasChildItems, href: href } = props1;
264
+ let content;
265
+ let nestedRows;
266
+ let { renderer: renderer } = $03960a2740ca2b19$var$useTreeRendererContext();
267
+ let { isDetached: isDetached, isEmphasized: isEmphasized } = (0, $iOVFT$useContext)($03960a2740ca2b19$var$InternalTreeContext);
268
+ if (typeof children === 'string') content = /*#__PURE__*/ (0, $iOVFT$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
269
+ children: children
270
+ });
271
+ else {
272
+ content = [];
273
+ nestedRows = [];
274
+ (0, $iOVFT$react).Children.forEach(children, (node)=>{
275
+ if (/*#__PURE__*/ (0, $iOVFT$isValidElement)(node) && node.type === $03960a2740ca2b19$export$6e77ea6719814e9c) nestedRows.push(node);
276
+ else content.push(node);
277
+ });
278
+ }
279
+ if (childItems != null && renderer) nestedRows = /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$Collection), {
280
+ items: childItems,
281
+ children: renderer
282
+ });
283
+ return /*#__PURE__*/ (0, $iOVFT$jsxs)((0, $iOVFT$UNSTABLE_TreeItem), {
284
+ ...props1,
285
+ className: (renderProps)=>$03960a2740ca2b19$var$treeRow({
286
+ ...renderProps,
287
+ isLink: !!href,
288
+ isEmphasized: isEmphasized
289
+ }) + (renderProps.isFocusVisible && !isDetached ? ' ' + $03960a2740ca2b19$var$treeRowFocusIndicator : ''),
290
+ children: [
291
+ /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$UNSTABLE_TreeItemContent), {
292
+ children: ({ isExpanded: isExpanded, hasChildRows: hasChildRows, selectionMode: selectionMode, selectionBehavior: selectionBehavior, isDisabled: isDisabled, isFocusVisible: isFocusVisible, isSelected: isSelected, id: id, state: state })=>{
293
+ let isNextSelected = false;
294
+ let isNextFocused = false;
295
+ let keyAfter = state.collection.getKeyAfter(id);
296
+ if (keyAfter != null) isNextSelected = state.selectionManager.isSelected(keyAfter);
297
+ let isFirst = state.collection.getFirstKey() === id;
298
+ return /*#__PURE__*/ (0, $iOVFT$jsxs)("div", {
299
+ className: $03960a2740ca2b19$var$treeCellGrid({
300
+ isDisabled: isDisabled,
301
+ isNextSelected: isNextSelected,
302
+ isSelected: isSelected,
303
+ isFirst: isFirst,
304
+ isNextFocused: isNextFocused,
305
+ isDetached: isDetached
306
+ }),
307
+ children: [
308
+ selectionMode !== 'none' && selectionBehavior === 'toggle' && // TODO: add transition?
309
+ /*#__PURE__*/ (0, $iOVFT$jsx)("div", {
310
+ className: $03960a2740ca2b19$var$treeCheckbox,
311
+ children: /*#__PURE__*/ (0, $iOVFT$jsx)((0, $9b405e0f8095dce0$export$48513f6b9f8ce62d), {
312
+ isEmphasized: isEmphasized,
313
+ slot: "selection"
314
+ })
315
+ }),
316
+ /*#__PURE__*/ (0, $iOVFT$jsx)("div", {
317
+ className: " __e-u3oh8l __f-u3oh8l __g-u3oh8l __h-u3oh8l k-19lybgs"
318
+ }),
319
+ (hasChildRows || hasChildItems) && /*#__PURE__*/ (0, $iOVFT$jsx)($03960a2740ca2b19$var$ExpandableRowChevron, {
320
+ isDisabled: isDisabled,
321
+ isExpanded: isExpanded
322
+ }),
323
+ /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$Provider), {
324
+ values: [
325
+ [
326
+ (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
327
+ {
328
+ styles: $03960a2740ca2b19$var$treeContent
329
+ }
330
+ ],
331
+ [
332
+ (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
333
+ {
334
+ render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
335
+ slot: 'icon',
336
+ styles: $03960a2740ca2b19$var$treeIcon
337
+ }),
338
+ styles: " k-1sthc3k j-1sthc3k __c-3t1x"
339
+ }
340
+ ],
341
+ [
342
+ (0, $10401bdc118cbc90$export$33f5f2f2cb85d743),
343
+ {
344
+ styles: $03960a2740ca2b19$var$treeActions
345
+ }
346
+ ],
347
+ [
348
+ (0, $8bf3cd2442eb485e$export$7f4b66acaca28bd5),
349
+ {
350
+ styles: $03960a2740ca2b19$var$treeActionMenu,
351
+ isQuiet: true
352
+ }
353
+ ]
354
+ ],
355
+ children: content
356
+ }),
357
+ isFocusVisible && isDetached && /*#__PURE__*/ (0, $iOVFT$jsx)("div", {
358
+ role: "presentation",
359
+ className: function anonymous(props) {
360
+ let rules = " .";
361
+ if (props.isFocusVisible) rules += ' _Pb';
362
+ else rules += ' _Pa';
363
+ rules += ' _Q-3hmpw';
364
+ rules += ' _Rc';
365
+ rules += ' ca_____M';
366
+ rules += ' cx';
367
+ rules += ' _z-3762yr';
368
+ rules += ' _A-3762yr';
369
+ rules += ' _B-3762yr';
370
+ rules += ' _C-3762yr';
371
+ rules += ' Ya';
372
+ rules += ' _ba';
373
+ rules += ' _da';
374
+ rules += ' Za';
375
+ rules += ' _aa';
376
+ return rules;
377
+ }({
378
+ isFocusVisible: true
379
+ })
380
+ })
381
+ ]
382
+ });
383
+ }
384
+ }),
385
+ nestedRows
386
+ ]
387
+ });
388
+ };
389
+ const $03960a2740ca2b19$var$expandButton = function anonymous(props) {
390
+ let rules = " .";
391
+ rules += ' __e-ajol1u';
392
+ rules += ' __f-ajol1u';
393
+ rules += ' __g-ajol1u';
394
+ rules += ' __h-ajol1u';
395
+ rules += ' jb';
396
+ rules += ' _fb';
397
+ rules += ' _3d';
398
+ rules += ' __ba';
399
+ rules += ' _4b';
400
+ rules += ' _6d';
401
+ rules += ' _Pa';
402
+ rules += ' __Lb';
403
+ if (props.isExpanded) {
404
+ if (props.isRTL) rules += ' X-197phm7';
405
+ else rules += ' X-7hkt2a';
406
+ }
407
+ rules += ' _Sa';
408
+ rules += ' _U-375x7f';
409
+ rules += ' _Va';
410
+ rules += ' ba';
411
+ rules += ' zf';
412
+ return rules;
413
+ };
414
+ function $03960a2740ca2b19$var$ExpandableRowChevron(props1) {
415
+ let expandButtonRef = (0, $iOVFT$useRef)(null);
416
+ let [fullProps, ref] = (0, $iOVFT$useContextProps)({
417
+ ...props1,
418
+ slot: 'chevron'
419
+ }, expandButtonRef, (0, $iOVFT$ButtonContext));
420
+ let { isExpanded: isExpanded, isDisabled: isDisabled } = fullProps;
421
+ let { direction: direction } = (0, $iOVFT$useLocale)();
422
+ return /*#__PURE__*/ (0, $iOVFT$jsx)((0, $iOVFT$Button), {
423
+ ...props1,
424
+ ref: ref,
425
+ slot: "chevron",
426
+ // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually "focus" it
427
+ excludeFromTabOrder: (0, $iOVFT$isAndroid)() && !isDisabled,
428
+ preventFocusOnPress: true,
429
+ className: (renderProps)=>$03960a2740ca2b19$var$expandButton({
430
+ ...renderProps,
431
+ isExpanded: isExpanded,
432
+ isRTL: direction === 'rtl'
433
+ }),
434
+ children: /*#__PURE__*/ (0, $iOVFT$jsx)((0, $4b69f02ec06b9226$export$2e2bcd8739ae039), {
435
+ className: function anonymous(props) {
436
+ let rules = " .";
437
+ if (props.direction === "rtl") rules += ' V-yizn7r';
438
+ else if (props.direction === "ltr") rules += ' V-375khm';
439
+ if (props.direction === "rtl") rules += ' W-yizn7r';
440
+ else if (props.direction === "ltr") rules += ' W-375khm';
441
+ rules += ' -rwx0fg_d-b';
442
+ return rules;
443
+ }({
444
+ direction: direction
445
+ })
446
+ })
447
+ });
448
+ }
449
+ /**
450
+ * A tree view provides users with a way to navigate nested hierarchical information.
451
+ */ const $03960a2740ca2b19$export$6940b0d9c820eca7 = /*#__PURE__*/ (0, $iOVFT$forwardRef)($03960a2740ca2b19$var$TreeView);
452
+
453
+
454
+ export {$03960a2740ca2b19$export$6e77ea6719814e9c as TreeViewItem, $03960a2740ca2b19$export$6940b0d9c820eca7 as TreeView};
455
+ //# sourceMappingURL=TreeView.mjs.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/TreeView.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {ActionMenuContext} from './ActionMenu';\nimport {\n Button,\n ButtonContext,\n Collection,\n Provider,\n TreeItemProps as RACTreeItemProps,\n TreeProps as RACTreeProps,\n UNSTABLE_ListLayout,\n UNSTABLE_Tree,\n UNSTABLE_TreeItem,\n UNSTABLE_TreeItemContent,\n UNSTABLE_Virtualizer,\n useContextProps\n} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {Checkbox} from './Checkbox';\nimport Chevron from '../ui-icons/Chevron';\nimport {colorMix, fontRelative, lightDark, style} from '../style' with {type: 'macro'};\nimport {DOMRef, Key} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {isAndroid} from '@react-aria/utils';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport React, {createContext, forwardRef, isValidElement, JSXElementConstructor, ReactElement, useContext, useMemo, useRef} from 'react';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocale} from 'react-aria';\n\ninterface S2TreeProps {\n // Only detatched is supported right now with the current styles from Spectrum\n isDetached?: boolean,\n onAction?: (key: Key) => void,\n // not fully supported yet\n isEmphasized?: boolean\n}\n\nexport interface TreeViewProps extends Omit<RACTreeProps<any>, 'style' | 'className' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks'>, UnsafeStyles, S2TreeProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\nexport interface TreeViewItemProps<T extends object = object> extends Omit<RACTreeItemProps, 'className' | 'style'> {\n /** Whether this item has children, even if not loaded yet. */\n hasChildItems?: boolean,\n /** A list of child tree item objects used when dynamically rendering the tree item children. */\n childItems?: Iterable<T>\n}\n\ninterface TreeRendererContextValue {\n renderer?: (item) => ReactElement<any, string | JSXElementConstructor<any>>\n}\nconst TreeRendererContext = createContext<TreeRendererContextValue>({});\n\nfunction useTreeRendererContext(): TreeRendererContextValue {\n return useContext(TreeRendererContext)!;\n}\n\n\nlet InternalTreeContext = createContext<{isDetached?: boolean, isEmphasized?: boolean}>({});\n\n// TODO: the below is needed so the borders of the top and bottom row isn't cut off if the TreeView is wrapped within a container by always reserving the 2px needed for the\n// keyboard focus ring. Perhaps find a different way of rendering the outlines since the top of the item doesn't\n// scroll into view due to how the ring is offset. Alternatively, have the tree render the top/bottom outline like it does in Listview\nconst tree = style({\n userSelect: 'none',\n minHeight: 0,\n minWidth: 0,\n width: 'full',\n overflow: 'auto',\n boxSizing: 'border-box',\n justifyContent: {\n isEmpty: 'center'\n },\n alignItems: {\n isEmpty: 'center'\n },\n height: {\n isEmpty: 'full'\n },\n '--indent': {\n type: 'width',\n value: 16\n }\n}, getAllowedOverrides({height: true}));\n\nfunction TreeView(props: TreeViewProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isDetached, isEmphasized} = props;\n\n let renderer;\n if (typeof children === 'function') {\n renderer = children;\n }\n\n let domRef = useDOMRef(ref);\n\n let layout = useMemo(() => {\n return new UNSTABLE_ListLayout({\n rowHeight: isDetached ? 42 : 40\n });\n }, [isDetached]);\n\n return (\n <UNSTABLE_Virtualizer layout={layout}>\n <TreeRendererContext.Provider value={{renderer}}>\n <InternalTreeContext.Provider value={{isDetached, isEmphasized}}>\n <UNSTABLE_Tree\n {...props}\n className={({isEmpty}) => tree({isEmpty, isDetached}, props.styles)}\n selectionBehavior=\"toggle\"\n ref={domRef}>\n {props.children}\n </UNSTABLE_Tree>\n </InternalTreeContext.Provider>\n </TreeRendererContext.Provider>\n </UNSTABLE_Virtualizer>\n );\n}\n\nconst selectedBackground = lightDark(colorMix('gray-25', 'informative-900', 10), colorMix('gray-25', 'informative-700', 10));\nconst selectedActiveBackground = lightDark(colorMix('gray-25', 'informative-900', 15), colorMix('gray-25', 'informative-700', 15));\n\nconst rowBackgroundColor = {\n default: '--s2-container-bg',\n isFocusVisibleWithin: colorMix('gray-25', 'gray-900', 7),\n isHovered: colorMix('gray-25', 'gray-900', 7),\n isPressed: colorMix('gray-25', 'gray-900', 10),\n isSelected: {\n default: colorMix('gray-25', 'gray-900', 7),\n isEmphasized: selectedBackground,\n isFocusVisibleWithin: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n },\n isHovered: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n },\n isPressed: {\n default: colorMix('gray-25', 'gray-900', 10),\n isEmphasized: selectedActiveBackground\n }\n },\n forcedColors: {\n default: 'Background'\n }\n} as const;\n\nconst treeRow = style({\n position: 'relative',\n display: 'flex',\n height: 40,\n width: 'full',\n boxSizing: 'border-box',\n font: 'ui',\n color: 'body',\n outlineStyle: 'none',\n cursor: {\n default: 'default',\n isLink: 'pointer'\n },\n '--rowBackgroundColor': {\n type: 'backgroundColor',\n value: rowBackgroundColor\n },\n '--rowFocusIndicatorColor': {\n type: 'outlineColor',\n value: {\n default: 'focus-ring',\n forcedColors: 'Highlight'\n }\n }\n});\n\n\nconst treeCellGrid = style({\n display: 'grid',\n width: 'full',\n alignContent: 'center',\n alignItems: 'center',\n gridTemplateColumns: ['minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', 40, 'minmax(0, auto)', '1fr', 'minmax(0, auto)', 'auto'],\n gridTemplateRows: '1fr',\n gridTemplateAreas: [\n 'drag-handle checkbox level-padding expand-button icon content actions actionmenu'\n ],\n backgroundColor: '--rowBackgroundColor',\n paddingEnd: 4, // account for any focus rings on the last item in the cell\n color: {\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n },\n '--rowSelectedBorderColor': {\n type: 'outlineColor',\n value: {\n default: 'gray-800',\n isFocusVisible: 'focus-ring',\n forcedColors: 'Highlight'\n }\n },\n '--rowForcedFocusBorderColor': {\n type: 'outlineColor',\n value: {\n default: 'focus-ring',\n forcedColors: 'Highlight'\n }\n },\n borderTopColor: {\n default: 'transparent',\n isSelected: {\n isFirst: 'transparent'\n },\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderInlineEndColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderBottomColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isNextSelected: 'transparent',\n isNextFocused: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderInlineStartColor: {\n default: 'transparent',\n isSelected: 'transparent',\n isDetached: {\n default: 'transparent',\n isSelected: '--rowSelectedBorderColor'\n }\n },\n borderTopWidth: {\n default: 0,\n isFirst: {\n default: 1,\n forcedColors: 0\n },\n isDetached: 1\n },\n borderBottomWidth: {\n default: 0,\n isDetached: 1\n },\n borderStartWidth: {\n default: 0,\n isDetached: 1\n },\n borderEndWidth: {\n default: 0,\n isDetached: 1\n },\n borderRadius: {\n isDetached: 'default'\n },\n borderStyle: 'solid'\n});\n\nconst treeCheckbox = style({\n gridArea: 'checkbox',\n marginStart: 12,\n marginEnd: 0,\n paddingEnd: 0\n});\n\nconst treeIcon = style({\n gridArea: 'icon',\n marginEnd: 'text-to-visual',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n});\n\nconst treeContent = style({\n gridArea: 'content',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n});\n\nconst treeActions = style({\n gridArea: 'actions',\n flexGrow: 0,\n flexShrink: 0,\n /* TODO: I made this one up, confirm desired behavior. These paddings are to make sure the action group has enough padding for the focus ring */\n marginStart: 2,\n marginEnd: 4\n});\n\nconst treeActionMenu = style({\n gridArea: 'actionmenu'\n});\n\nconst cellFocus = {\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid'\n },\n outlineOffset: -2,\n outlineWidth: 2,\n outlineColor: 'focus-ring',\n borderRadius: '[6px]'\n} as const;\n\nconst treeRowFocusIndicator = raw(`\n &:before {\n content: \"\";\n display: inline-block;\n position: sticky;\n inset-inline-start: 0;\n width: 3px;\n height: 100%;\n margin-inline-end: -3px;\n margin-block-end: 1px;\n z-index: 3;\n background-color: var(--rowFocusIndicatorColor);\n }`\n);\n\n\nexport const TreeViewItem = <T extends object>(props: TreeViewItemProps<T>) => {\n let {\n children,\n childItems,\n hasChildItems,\n href\n } = props;\n\n let content;\n let nestedRows;\n let {renderer} = useTreeRendererContext();\n let {isDetached, isEmphasized} = useContext(InternalTreeContext);\n\n if (typeof children === 'string') {\n content = <Text>{children}</Text>;\n } else {\n content = [];\n nestedRows = [];\n React.Children.forEach(children, node => {\n if (isValidElement(node) && node.type === TreeViewItem) {\n nestedRows.push(node);\n } else {\n content.push(node);\n }\n });\n }\n\n if (childItems != null && renderer) {\n nestedRows = (\n <Collection items={childItems}>\n {renderer}\n </Collection>\n );\n }\n\n return (\n <UNSTABLE_TreeItem\n {...props}\n className={(renderProps) => treeRow({...renderProps, isLink: !!href, isEmphasized}) + (renderProps.isFocusVisible && !isDetached ? ' ' + treeRowFocusIndicator : '')}>\n <UNSTABLE_TreeItemContent>\n {({isExpanded, hasChildRows, selectionMode, selectionBehavior, isDisabled, isFocusVisible, isSelected, id, state}) => {\n let isNextSelected = false;\n let isNextFocused = false;\n let keyAfter = state.collection.getKeyAfter(id);\n if (keyAfter != null) {\n isNextSelected = state.selectionManager.isSelected(keyAfter);\n }\n let isFirst = state.collection.getFirstKey() === id;\n return (\n <div className={treeCellGrid({isDisabled, isNextSelected, isSelected, isFirst, isNextFocused, isDetached})}>\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n // TODO: add transition?\n <div className={treeCheckbox}>\n <Checkbox\n isEmphasized={isEmphasized}\n slot=\"selection\" />\n </div>\n )}\n <div\n className={style({\n gridArea: 'level-padding',\n width: '[calc(calc(var(--tree-item-level, 0) - 1) * var(--indent))]'\n })} />\n {/* TODO: revisit when we do async loading, at the moment hasChildItems will only cause the chevron to be rendered, no aria/data attributes indicating the row's expandability are added */}\n {(hasChildRows || hasChildItems) && <ExpandableRowChevron isDisabled={isDisabled} isExpanded={isExpanded} />}\n <Provider\n values={[\n [TextContext, {styles: treeContent}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: treeIcon}),\n styles: style({size: fontRelative(20), flexShrink: 0})\n }],\n [ActionButtonGroupContext, {styles: treeActions}],\n [ActionMenuContext, {styles: treeActionMenu, isQuiet: true}]\n ]}>\n {content}\n </Provider>\n {isFocusVisible && isDetached && <div role=\"presentation\" className={style({...cellFocus, position: 'absolute', inset: 0})({isFocusVisible: true})} />}\n </div>\n );\n }}\n </UNSTABLE_TreeItemContent>\n {nestedRows}\n </UNSTABLE_TreeItem>\n );\n};\n\ninterface ExpandableRowChevronProps {\n isExpanded?: boolean,\n isDisabled?: boolean,\n isRTL?: boolean\n}\n\nconst expandButton = style<ExpandableRowChevronProps>({\n gridArea: 'expand-button',\n height: 'full',\n aspectRatio: 'square',\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'center',\n justifyContent: 'center',\n outlineStyle: 'none',\n cursor: 'default',\n transform: {\n isExpanded: {\n default: 'rotate(90deg)',\n isRTL: 'rotate(-90deg)'\n }\n },\n transition: 'default',\n backgroundColor: 'transparent',\n borderStyle: 'none'\n});\n\nfunction ExpandableRowChevron(props: ExpandableRowChevronProps) {\n let expandButtonRef = useRef<HTMLButtonElement>(null);\n let [fullProps, ref] = useContextProps({...props, slot: 'chevron'}, expandButtonRef, ButtonContext);\n let {isExpanded, isDisabled} = fullProps;\n let {direction} = useLocale();\n\n return (\n <Button\n {...props}\n ref={ref}\n slot=\"chevron\"\n // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually \"focus\" it\n excludeFromTabOrder={isAndroid() && !isDisabled}\n preventFocusOnPress\n className={renderProps => expandButton({...renderProps, isExpanded, isRTL: direction === 'rtl'})}>\n <Chevron\n className={style({\n scale: {\n direction: {\n ltr: '1',\n rtl: '-1'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})} />\n </Button>\n );\n}\n\n/**\n * A tree view provides users with a way to navigate nested hierarchical information.\n */\nconst _TreeView = forwardRef(TreeView);\nexport {_TreeView as TreeView};\n"],"names":[],"version":3,"file":"TreeView.mjs.map"}
package/dist/main.cjs CHANGED
@@ -64,6 +64,7 @@ var $cce7e7de6810e1b5$exports = require("./TextField.cjs");
64
64
  var $d16e5203405a91b7$exports = require("./ToggleButton.cjs");
65
65
  var $428d056a8f9b19e5$exports = require("./ToggleButtonGroup.cjs");
66
66
  var $d3b6a84aebe66f8d$exports = require("./Tooltip.cjs");
67
+ var $8a2a97a0cb171e69$exports = require("./TreeView.cjs");
67
68
  var $2061c83559b50a66$exports = require("./pressScale.cjs");
68
69
  var $gi1zB$reactariacomponents = require("react-aria-components");
69
70
 
@@ -234,6 +235,8 @@ $parcel$export(module.exports, "ToggleButtonGroup", () => $428d056a8f9b19e5$expo
234
235
  $parcel$export(module.exports, "ToggleButtonGroupContext", () => $428d056a8f9b19e5$exports.ToggleButtonGroupContext);
235
236
  $parcel$export(module.exports, "Tooltip", () => $d3b6a84aebe66f8d$exports.Tooltip);
236
237
  $parcel$export(module.exports, "TooltipTrigger", () => $d3b6a84aebe66f8d$exports.TooltipTrigger);
238
+ $parcel$export(module.exports, "TreeView", () => $8a2a97a0cb171e69$exports.TreeView);
239
+ $parcel$export(module.exports, "TreeViewItem", () => $8a2a97a0cb171e69$exports.TreeViewItem);
237
240
  $parcel$export(module.exports, "pressScale", () => $2061c83559b50a66$exports.pressScale);
238
241
  $parcel$export(module.exports, "Collection", () => $gi1zB$reactariacomponents.Collection);
239
242
  $parcel$export(module.exports, "FileTrigger", () => $gi1zB$reactariacomponents.FileTrigger);
@@ -315,6 +318,7 @@ $parcel$export(module.exports, "FileTrigger", () => $gi1zB$reactariacomponents.F
315
318
 
316
319
 
317
320
 
321
+
318
322
 
319
323
 
320
324
  //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/s2/src/index.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {Accordion, AccordionContext} from './Accordion';\nexport {ActionBar, ActionBarContext} from './ActionBar';\nexport {ActionButton, ActionButtonContext} from './ActionButton';\nexport {ActionButtonGroup, ActionButtonGroupContext} from './ActionButtonGroup';\nexport {ActionMenu, ActionMenuContext} from './ActionMenu';\nexport {AlertDialog} from './AlertDialog';\nexport {Avatar, AvatarContext} from './Avatar';\nexport {AvatarGroup, AvatarGroupContext} from './AvatarGroup';\nexport {Badge, BadgeContext} from './Badge';\nexport {Breadcrumbs, Breadcrumb, BreadcrumbsContext} from './Breadcrumbs';\nexport {Button, LinkButton, ButtonContext, LinkButtonContext} from './Button';\nexport {ButtonGroup, ButtonGroupContext} from './ButtonGroup';\nexport {Card, CardPreview, CollectionCardPreview, AssetCard, UserCard, ProductCard, CardContext} from './Card';\nexport {CardView, CardViewContext} from './CardView';\nexport {Checkbox, CheckboxContext} from './Checkbox';\nexport {CheckboxGroup, CheckboxGroupContext} from './CheckboxGroup';\nexport {CloseButton} from './CloseButton';\nexport {ColorArea, ColorAreaContext} from './ColorArea';\nexport {ColorField, ColorFieldContext} from './ColorField';\nexport {ColorSlider, ColorSliderContext} from './ColorSlider';\nexport {ColorSwatch, ColorSwatchContext} from './ColorSwatch';\nexport {ColorSwatchPicker, ColorSwatchPickerContext} from './ColorSwatchPicker';\nexport {ColorWheel, ColorWheelContext} from './ColorWheel';\nexport {ComboBox, ComboBoxItem, ComboBoxSection, ComboBoxContext} from './ComboBox';\nexport {ContextualHelp, ContextualHelpContext} from './ContextualHelp';\nexport {DisclosureHeader, Disclosure, DisclosurePanel, DisclosureContext, DisclosureTitle} from './Disclosure';\nexport {Heading, HeadingContext, Header, HeaderContext, Content, ContentContext, Footer, FooterContext, Text, TextContext, Keyboard, KeyboardContext} from './Content';\nexport {Dialog} from './Dialog';\nexport {CustomDialog} from './CustomDialog';\nexport {FullscreenDialog} from './FullscreenDialog';\nexport {DialogTrigger} from './DialogTrigger';\nexport {DialogContainer, useDialogContainer} from './DialogContainer';\nexport {Divider, DividerContext} from './Divider';\nexport {DropZone, DropZoneContext} from './DropZone';\nexport {Form} from './Form';\nexport {createIcon, IconContext, IllustrationContext} from './Icon';\nexport {IllustratedMessage, IllustratedMessageContext} from './IllustratedMessage';\nexport {Image, ImageContext} from './Image';\nexport {ImageCoordinator} from './ImageCoordinator';\nexport {InlineAlert, InlineAlertContext} from './InlineAlert';\nexport {Link, LinkContext} from './Link';\nexport {MenuItem, MenuTrigger, Menu, MenuSection, SubmenuTrigger, MenuContext} from './Menu';\nexport {Meter, MeterContext} from './Meter';\nexport {NumberField, NumberFieldContext} from './NumberField';\nexport {Picker, PickerItem, PickerSection, PickerContext} from './Picker';\nexport {Popover} from './Popover';\nexport {ProgressBar, ProgressBarContext} from './ProgressBar';\nexport {ProgressCircle, ProgressCircleContext} from './ProgressCircle';\nexport {Provider} from './Provider';\nexport {Radio} from './Radio';\nexport {RadioGroup, RadioGroupContext} from './RadioGroup';\nexport {RangeSlider, RangeSliderContext} from './RangeSlider';\nexport {SearchField, SearchFieldContext} from './SearchField';\nexport {SegmentedControl, SegmentedControlItem, SegmentedControlContext} from './SegmentedControl';\nexport {Slider, SliderContext} from './Slider';\nexport {Skeleton, useIsSkeleton} from './Skeleton';\nexport {SkeletonCollection} from './SkeletonCollection';\nexport {StatusLight, StatusLightContext} from './StatusLight';\nexport {Switch, SwitchContext} from './Switch';\nexport {TableView, TableHeader, TableBody, Row, Cell, Column, TableContext} from './TableView';\nexport {Tabs, TabList, Tab, TabPanel, TabsContext} from './Tabs';\nexport {TagGroup, Tag, TagGroupContext} from './TagGroup';\nexport {TextArea, TextField, TextAreaContext, TextFieldContext} from './TextField';\nexport {ToggleButton, ToggleButtonContext} from './ToggleButton';\nexport {ToggleButtonGroup, ToggleButtonGroupContext} from './ToggleButtonGroup';\nexport {Tooltip, TooltipTrigger} from './Tooltip';\n\nexport {pressScale} from './pressScale';\n\nexport {Collection} from 'react-aria-components';\nexport {FileTrigger} from 'react-aria-components';\n\nexport type {AccordionProps} from './Accordion';\nexport type {ActionBarProps} from './ActionBar';\nexport type {ActionButtonProps} from './ActionButton';\nexport type {ActionButtonGroupProps} from './ActionButtonGroup';\nexport type {ActionMenuProps} from './ActionMenu';\nexport type {AlertDialogProps} from './AlertDialog';\nexport type {AvatarProps} from './Avatar';\nexport type {AvatarGroupProps} from './AvatarGroup';\nexport type {BreadcrumbsProps, BreadcrumbProps} from './Breadcrumbs';\nexport type {BadgeProps} from './Badge';\nexport type {ButtonProps, LinkButtonProps} from './Button';\nexport type {ButtonGroupProps} from './ButtonGroup';\nexport type {CardProps, CardPreviewProps, AssetCardProps, ProductCardProps, UserCardProps} from './Card';\nexport type {CardViewProps} from './CardView';\nexport type {CheckboxProps} from './Checkbox';\nexport type {CheckboxGroupProps} from './CheckboxGroup';\nexport type {CloseButtonProps} from './CloseButton';\nexport type {ColorAreaProps} from './ColorArea';\nexport type {ColorFieldProps} from './ColorField';\nexport type {ColorSliderProps} from './ColorSlider';\nexport type {ColorSwatchProps} from './ColorSwatch';\nexport type {ColorSwatchPickerProps} from './ColorSwatchPicker';\nexport type {ColorWheelProps} from './ColorWheel';\nexport type {ComboBoxProps, ComboBoxItemProps, ComboBoxSectionProps} from './ComboBox';\nexport type {DialogProps} from './Dialog';\nexport type {CustomDialogProps} from './CustomDialog';\nexport type {FullscreenDialogProps} from './FullscreenDialog';\nexport type {DialogContainerProps, DialogContainerValue} from './DialogContainer';\nexport type {DialogTriggerProps} from './DialogTrigger';\nexport type {DisclosureProps, DisclosurePanelProps} from './Disclosure';\nexport type {DividerProps} from './Divider';\nexport type {DropZoneProps} from './DropZone';\nexport type {FormProps} from './Form';\nexport type {IconProps, IconContextValue} from './Icon';\nexport type {InlineAlertProps} from './InlineAlert';\nexport type {ImageProps} from './Image';\nexport type {ImageCoordinatorProps} from './ImageCoordinator';\nexport type {LinkProps} from './Link';\nexport type {MenuTriggerProps, MenuProps, MenuItemProps, MenuSectionProps, SubmenuTriggerProps} from './Menu';\nexport type {MeterProps} from './Meter';\nexport type {PickerProps, PickerItemProps, PickerSectionProps} from './Picker';\nexport type {PopoverProps} from './Popover';\nexport type {ProgressBarProps} from './ProgressBar';\nexport type {ProgressCircleProps} from './ProgressCircle';\nexport type {ProviderProps} from './Provider';\nexport type {RadioProps} from './Radio';\nexport type {RadioGroupProps} from './RadioGroup';\nexport type {SearchFieldProps} from './SearchField';\nexport type {SegmentedControlProps, SegmentedControlItemProps} from './SegmentedControl';\nexport type {SliderProps} from './Slider';\nexport type {RangeSliderProps} from './RangeSlider';\nexport type {SkeletonProps} from './Skeleton';\nexport type {SkeletonCollectionProps} from './SkeletonCollection';\nexport type {StatusLightProps} from './StatusLight';\nexport type {SwitchProps} from './Switch';\nexport type {TableViewProps, TableHeaderProps, TableBodyProps, RowProps, CellProps, ColumnProps} from './TableView';\nexport type {TabsProps, TabProps, TabListProps, TabPanelProps} from './Tabs';\nexport type {TagGroupProps, TagProps} from './TagGroup';\nexport type {TextFieldProps, TextAreaProps} from './TextField';\nexport type {ToggleButtonProps} from './ToggleButton';\nexport type {ToggleButtonGroupProps} from './ToggleButtonGroup';\nexport type {TooltipProps} from './Tooltip';\nexport type {FileTriggerProps, TooltipTriggerComponentProps as TooltipTriggerProps} from 'react-aria-components';\n"],"names":[],"version":3,"file":"main.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/s2/src/index.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {Accordion, AccordionContext} from './Accordion';\nexport {ActionBar, ActionBarContext} from './ActionBar';\nexport {ActionButton, ActionButtonContext} from './ActionButton';\nexport {ActionButtonGroup, ActionButtonGroupContext} from './ActionButtonGroup';\nexport {ActionMenu, ActionMenuContext} from './ActionMenu';\nexport {AlertDialog} from './AlertDialog';\nexport {Avatar, AvatarContext} from './Avatar';\nexport {AvatarGroup, AvatarGroupContext} from './AvatarGroup';\nexport {Badge, BadgeContext} from './Badge';\nexport {Breadcrumbs, Breadcrumb, BreadcrumbsContext} from './Breadcrumbs';\nexport {Button, LinkButton, ButtonContext, LinkButtonContext} from './Button';\nexport {ButtonGroup, ButtonGroupContext} from './ButtonGroup';\nexport {Card, CardPreview, CollectionCardPreview, AssetCard, UserCard, ProductCard, CardContext} from './Card';\nexport {CardView, CardViewContext} from './CardView';\nexport {Checkbox, CheckboxContext} from './Checkbox';\nexport {CheckboxGroup, CheckboxGroupContext} from './CheckboxGroup';\nexport {CloseButton} from './CloseButton';\nexport {ColorArea, ColorAreaContext} from './ColorArea';\nexport {ColorField, ColorFieldContext} from './ColorField';\nexport {ColorSlider, ColorSliderContext} from './ColorSlider';\nexport {ColorSwatch, ColorSwatchContext} from './ColorSwatch';\nexport {ColorSwatchPicker, ColorSwatchPickerContext} from './ColorSwatchPicker';\nexport {ColorWheel, ColorWheelContext} from './ColorWheel';\nexport {ComboBox, ComboBoxItem, ComboBoxSection, ComboBoxContext} from './ComboBox';\nexport {ContextualHelp, ContextualHelpContext} from './ContextualHelp';\nexport {DisclosureHeader, Disclosure, DisclosurePanel, DisclosureContext, DisclosureTitle} from './Disclosure';\nexport {Heading, HeadingContext, Header, HeaderContext, Content, ContentContext, Footer, FooterContext, Text, TextContext, Keyboard, KeyboardContext} from './Content';\nexport {Dialog} from './Dialog';\nexport {CustomDialog} from './CustomDialog';\nexport {FullscreenDialog} from './FullscreenDialog';\nexport {DialogTrigger} from './DialogTrigger';\nexport {DialogContainer, useDialogContainer} from './DialogContainer';\nexport {Divider, DividerContext} from './Divider';\nexport {DropZone, DropZoneContext} from './DropZone';\nexport {Form} from './Form';\nexport {createIcon, IconContext, IllustrationContext} from './Icon';\nexport {IllustratedMessage, IllustratedMessageContext} from './IllustratedMessage';\nexport {Image, ImageContext} from './Image';\nexport {ImageCoordinator} from './ImageCoordinator';\nexport {InlineAlert, InlineAlertContext} from './InlineAlert';\nexport {Link, LinkContext} from './Link';\nexport {MenuItem, MenuTrigger, Menu, MenuSection, SubmenuTrigger, MenuContext} from './Menu';\nexport {Meter, MeterContext} from './Meter';\nexport {NumberField, NumberFieldContext} from './NumberField';\nexport {Picker, PickerItem, PickerSection, PickerContext} from './Picker';\nexport {Popover} from './Popover';\nexport {ProgressBar, ProgressBarContext} from './ProgressBar';\nexport {ProgressCircle, ProgressCircleContext} from './ProgressCircle';\nexport {Provider} from './Provider';\nexport {Radio} from './Radio';\nexport {RadioGroup, RadioGroupContext} from './RadioGroup';\nexport {RangeSlider, RangeSliderContext} from './RangeSlider';\nexport {SearchField, SearchFieldContext} from './SearchField';\nexport {SegmentedControl, SegmentedControlItem, SegmentedControlContext} from './SegmentedControl';\nexport {Slider, SliderContext} from './Slider';\nexport {Skeleton, useIsSkeleton} from './Skeleton';\nexport {SkeletonCollection} from './SkeletonCollection';\nexport {StatusLight, StatusLightContext} from './StatusLight';\nexport {Switch, SwitchContext} from './Switch';\nexport {TableView, TableHeader, TableBody, Row, Cell, Column, TableContext} from './TableView';\nexport {Tabs, TabList, Tab, TabPanel, TabsContext} from './Tabs';\nexport {TagGroup, Tag, TagGroupContext} from './TagGroup';\nexport {TextArea, TextField, TextAreaContext, TextFieldContext} from './TextField';\nexport {ToggleButton, ToggleButtonContext} from './ToggleButton';\nexport {ToggleButtonGroup, ToggleButtonGroupContext} from './ToggleButtonGroup';\nexport {Tooltip, TooltipTrigger} from './Tooltip';\nexport {TreeView, TreeViewItem} from './TreeView';\n\nexport {pressScale} from './pressScale';\n\nexport {Collection} from 'react-aria-components';\nexport {FileTrigger} from 'react-aria-components';\n\nexport type {AccordionProps} from './Accordion';\nexport type {ActionBarProps} from './ActionBar';\nexport type {ActionButtonProps} from './ActionButton';\nexport type {ActionButtonGroupProps} from './ActionButtonGroup';\nexport type {ActionMenuProps} from './ActionMenu';\nexport type {AlertDialogProps} from './AlertDialog';\nexport type {AvatarProps} from './Avatar';\nexport type {AvatarGroupProps} from './AvatarGroup';\nexport type {BreadcrumbsProps, BreadcrumbProps} from './Breadcrumbs';\nexport type {BadgeProps} from './Badge';\nexport type {ButtonProps, LinkButtonProps} from './Button';\nexport type {ButtonGroupProps} from './ButtonGroup';\nexport type {CardProps, CardPreviewProps, AssetCardProps, ProductCardProps, UserCardProps} from './Card';\nexport type {CardViewProps} from './CardView';\nexport type {CheckboxProps} from './Checkbox';\nexport type {CheckboxGroupProps} from './CheckboxGroup';\nexport type {CloseButtonProps} from './CloseButton';\nexport type {ColorAreaProps} from './ColorArea';\nexport type {ColorFieldProps} from './ColorField';\nexport type {ColorSliderProps} from './ColorSlider';\nexport type {ColorSwatchProps} from './ColorSwatch';\nexport type {ColorSwatchPickerProps} from './ColorSwatchPicker';\nexport type {ColorWheelProps} from './ColorWheel';\nexport type {ComboBoxProps, ComboBoxItemProps, ComboBoxSectionProps} from './ComboBox';\nexport type {DialogProps} from './Dialog';\nexport type {CustomDialogProps} from './CustomDialog';\nexport type {FullscreenDialogProps} from './FullscreenDialog';\nexport type {DialogContainerProps, DialogContainerValue} from './DialogContainer';\nexport type {DialogTriggerProps} from './DialogTrigger';\nexport type {DisclosureProps, DisclosurePanelProps} from './Disclosure';\nexport type {DividerProps} from './Divider';\nexport type {DropZoneProps} from './DropZone';\nexport type {FormProps} from './Form';\nexport type {IconProps, IconContextValue} from './Icon';\nexport type {InlineAlertProps} from './InlineAlert';\nexport type {ImageProps} from './Image';\nexport type {ImageCoordinatorProps} from './ImageCoordinator';\nexport type {LinkProps} from './Link';\nexport type {MenuTriggerProps, MenuProps, MenuItemProps, MenuSectionProps, SubmenuTriggerProps} from './Menu';\nexport type {MeterProps} from './Meter';\nexport type {PickerProps, PickerItemProps, PickerSectionProps} from './Picker';\nexport type {PopoverProps} from './Popover';\nexport type {ProgressBarProps} from './ProgressBar';\nexport type {ProgressCircleProps} from './ProgressCircle';\nexport type {ProviderProps} from './Provider';\nexport type {RadioProps} from './Radio';\nexport type {RadioGroupProps} from './RadioGroup';\nexport type {SearchFieldProps} from './SearchField';\nexport type {SegmentedControlProps, SegmentedControlItemProps} from './SegmentedControl';\nexport type {SliderProps} from './Slider';\nexport type {RangeSliderProps} from './RangeSlider';\nexport type {SkeletonProps} from './Skeleton';\nexport type {SkeletonCollectionProps} from './SkeletonCollection';\nexport type {StatusLightProps} from './StatusLight';\nexport type {SwitchProps} from './Switch';\nexport type {TableViewProps, TableHeaderProps, TableBodyProps, RowProps, CellProps, ColumnProps} from './TableView';\nexport type {TabsProps, TabProps, TabListProps, TabPanelProps} from './Tabs';\nexport type {TagGroupProps, TagProps} from './TagGroup';\nexport type {TextFieldProps, TextAreaProps} from './TextField';\nexport type {ToggleButtonProps} from './ToggleButton';\nexport type {ToggleButtonGroupProps} from './ToggleButtonGroup';\nexport type {TooltipProps} from './Tooltip';\nexport type {TreeViewProps, TreeViewItemProps} from './TreeView';\nexport type {FileTriggerProps, TooltipTriggerComponentProps as TooltipTriggerProps} from 'react-aria-components';\n"],"names":[],"version":3,"file":"main.cjs.map"}