@primer/react 0.0.0-20260427204434 → 0.0.0-20260428150519

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 (344) hide show
  1. package/CHANGELOG.md +10 -6
  2. package/dist/ActionBar/ActionBar.js +502 -705
  3. package/dist/ActionBar/ActionBar.module.css.js +10 -5
  4. package/dist/ActionBar/index.js +8 -8
  5. package/dist/ActionList/ActionList.module.css.js +31 -5
  6. package/dist/ActionList/ActionListContainerContext.js +4 -5
  7. package/dist/ActionList/Description.js +117 -133
  8. package/dist/ActionList/Divider.js +31 -38
  9. package/dist/ActionList/Group.js +292 -349
  10. package/dist/ActionList/Group.module.css.js +10 -5
  11. package/dist/ActionList/Heading.js +88 -106
  12. package/dist/ActionList/Heading.module.css.js +5 -5
  13. package/dist/ActionList/Item.js +668 -811
  14. package/dist/ActionList/LinkItem.js +36 -56
  15. package/dist/ActionList/List.js +168 -210
  16. package/dist/ActionList/Selection.js +83 -112
  17. package/dist/ActionList/TrailingAction.js +97 -112
  18. package/dist/ActionList/Visuals.js +143 -191
  19. package/dist/ActionList/index.js +33 -33
  20. package/dist/ActionList/shared.js +5 -9
  21. package/dist/ActionMenu/ActionMenu.js +223 -310
  22. package/dist/ActionMenu/ActionMenu.module.css.js +5 -5
  23. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  24. package/dist/AnchoredOverlay/AnchoredOverlay.js +206 -298
  25. package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +9 -5
  26. package/dist/Autocomplete/Autocomplete.js +125 -141
  27. package/dist/Autocomplete/AutocompleteContext.js +18 -20
  28. package/dist/Autocomplete/AutocompleteInput.js +108 -146
  29. package/dist/Autocomplete/AutocompleteMenu.js +201 -238
  30. package/dist/Autocomplete/AutocompleteMenu.module.css.js +8 -5
  31. package/dist/Autocomplete/AutocompleteOverlay.js +54 -79
  32. package/dist/Autocomplete/AutocompleteOverlay.module.css.js +5 -5
  33. package/dist/Avatar/Avatar.js +106 -133
  34. package/dist/Avatar/Avatar.module.css.js +5 -5
  35. package/dist/AvatarStack/AvatarStack.js +102 -143
  36. package/dist/AvatarStack/AvatarStack.module.css.js +9 -5
  37. package/dist/Banner/Banner.js +133 -186
  38. package/dist/Banner/Banner.module.css.js +14 -5
  39. package/dist/Banner/index.js +7 -7
  40. package/dist/BaseStyles.js +74 -91
  41. package/dist/BaseStyles.module.css.js +5 -5
  42. package/dist/Blankslate/Blankslate.js +266 -328
  43. package/dist/Blankslate/Blankslate.module.css.js +12 -5
  44. package/dist/Blankslate/BlankslateContext.js +7 -9
  45. package/dist/Blankslate/index.js +9 -9
  46. package/dist/BranchName/BranchName.js +49 -59
  47. package/dist/BranchName/BranchName.module.css.js +5 -5
  48. package/dist/Breadcrumbs/Breadcrumbs.js +371 -431
  49. package/dist/Breadcrumbs/Breadcrumbs.module.css.js +15 -5
  50. package/dist/Button/Button.js +15 -18
  51. package/dist/Button/ButtonBase.js +76 -139
  52. package/dist/Button/ButtonBase.module.css.js +16 -5
  53. package/dist/Button/IconButton.js +42 -74
  54. package/dist/Button/LinkButton.js +13 -17
  55. package/dist/ButtonGroup/ButtonGroup.js +80 -97
  56. package/dist/ButtonGroup/ButtonGroup.module.css.js +5 -5
  57. package/dist/Card/Card.js +401 -491
  58. package/dist/Card/Card.module.css.js +18 -5
  59. package/dist/Card/index.js +9 -9
  60. package/dist/Checkbox/Checkbox.js +52 -71
  61. package/dist/Checkbox/Checkbox.module.css.js +9 -5
  62. package/dist/Checkbox/shared.module.css.js +5 -5
  63. package/dist/CheckboxGroup/CheckboxGroup.js +111 -132
  64. package/dist/CheckboxGroup/CheckboxGroupContext.js +4 -4
  65. package/dist/CircleBadge/CircleBadge.js +77 -90
  66. package/dist/CircleBadge/CircleBadge.module.css.js +8 -5
  67. package/dist/ConfirmationDialog/ConfirmationDialog.js +68 -92
  68. package/dist/CounterLabel/CounterLabel.js +83 -99
  69. package/dist/CounterLabel/CounterLabel.module.css.js +5 -5
  70. package/dist/DataTable/DataTable.js +100 -140
  71. package/dist/DataTable/ErrorDialog.js +33 -45
  72. package/dist/DataTable/Pagination.js +464 -592
  73. package/dist/DataTable/Pagination.module.css.js +13 -5
  74. package/dist/DataTable/Table.js +527 -710
  75. package/dist/DataTable/Table.module.css.js +26 -5
  76. package/dist/DataTable/column.js +10 -11
  77. package/dist/DataTable/index.js +22 -20
  78. package/dist/DataTable/sorting.js +65 -103
  79. package/dist/DataTable/useTable.js +207 -290
  80. package/dist/Details/Details.js +100 -126
  81. package/dist/Details/Details.module.css.js +5 -5
  82. package/dist/Dialog/Dialog.js +259 -351
  83. package/dist/Dialog/Dialog.module.css.js +22 -5
  84. package/dist/FeatureFlags/DefaultFeatureFlags.js +7 -7
  85. package/dist/FeatureFlags/FeatureFlagContext.js +5 -5
  86. package/dist/FeatureFlags/FeatureFlagScope.js +36 -44
  87. package/dist/FeatureFlags/FeatureFlags.js +29 -37
  88. package/dist/FeatureFlags/useFeatureFlag.js +17 -19
  89. package/dist/FilteredActionList/FilteredActionList.js +454 -579
  90. package/dist/FilteredActionList/FilteredActionList.module.css.js +15 -5
  91. package/dist/FilteredActionList/FilteredActionListLoaders.js +119 -150
  92. package/dist/FilteredActionList/FilteredActionListLoaders.module.css.js +9 -5
  93. package/dist/FilteredActionList/useAnnouncements.js +167 -180
  94. package/dist/Flash/Flash.js +57 -69
  95. package/dist/Flash/Flash.module.css.js +5 -5
  96. package/dist/FormControl/FormControl.js +211 -227
  97. package/dist/FormControl/FormControl.module.css.js +11 -5
  98. package/dist/FormControl/FormControlCaption.js +37 -49
  99. package/dist/FormControl/FormControlCaption.module.css.js +5 -5
  100. package/dist/FormControl/FormControlLabel.js +95 -115
  101. package/dist/FormControl/FormControlLeadingVisual.js +29 -37
  102. package/dist/FormControl/FormControlLeadingVisual.module.css.js +5 -5
  103. package/dist/FormControl/_FormControlContext.js +41 -48
  104. package/dist/FormControl/_FormControlValidation.js +29 -39
  105. package/dist/Header/Header.js +138 -165
  106. package/dist/Header/Header.module.css.js +9 -5
  107. package/dist/Heading/Heading.js +26 -37
  108. package/dist/Heading/Heading.module.css.js +5 -5
  109. package/dist/Hidden/Hidden.js +54 -77
  110. package/dist/Hidden/Hidden.module.css.js +5 -5
  111. package/dist/InlineMessage/InlineMessage.js +88 -116
  112. package/dist/InlineMessage/InlineMessage.module.css.js +8 -5
  113. package/dist/KeybindingHint/KeybindingHint.js +70 -88
  114. package/dist/KeybindingHint/KeybindingHint.module.css.js +5 -5
  115. package/dist/KeybindingHint/components/Chord.js +81 -93
  116. package/dist/KeybindingHint/components/Chord.module.css.js +11 -5
  117. package/dist/KeybindingHint/components/Key.js +49 -66
  118. package/dist/KeybindingHint/components/Sequence.js +12 -24
  119. package/dist/KeybindingHint/key-names.js +99 -114
  120. package/dist/Label/Label.js +56 -66
  121. package/dist/Label/Label.module.css.js +5 -5
  122. package/dist/Label/index.js +5 -5
  123. package/dist/LabelGroup/LabelGroup.js +260 -344
  124. package/dist/LabelGroup/LabelGroup.module.css.js +12 -5
  125. package/dist/Link/Link.js +31 -47
  126. package/dist/Link/Link.module.css.js +5 -5
  127. package/dist/NavList/NavList.js +424 -614
  128. package/dist/NavList/NavList.module.css.js +5 -5
  129. package/dist/Octicon/Octicon.js +35 -37
  130. package/dist/Overlay/Overlay.js +264 -318
  131. package/dist/Overlay/Overlay.module.css.js +8 -5
  132. package/dist/PageHeader/PageHeader.js +579 -823
  133. package/dist/PageHeader/PageHeader.module.css.js +21 -5
  134. package/dist/PageLayout/PageLayout.js +631 -913
  135. package/dist/PageLayout/PageLayout.module.css.js +31 -5
  136. package/dist/PageLayout/paneUtils.js +15 -29
  137. package/dist/PageLayout/usePaneWidth.js +334 -437
  138. package/dist/Pagehead/Pagehead.js +10 -14
  139. package/dist/Pagehead/Pagehead.module.css.js +5 -5
  140. package/dist/Pagination/Pagination.js +84 -114
  141. package/dist/Pagination/Pagination.module.css.js +9 -5
  142. package/dist/Pagination/index.js +5 -5
  143. package/dist/Pagination/model.js +118 -194
  144. package/dist/Popover/Popover.js +126 -151
  145. package/dist/Popover/Popover.module.css.js +8 -5
  146. package/dist/Portal/Portal.js +65 -85
  147. package/dist/Portal/index.js +5 -6
  148. package/dist/ProgressBar/ProgressBar.js +210 -255
  149. package/dist/ProgressBar/ProgressBar.module.css.js +9 -5
  150. package/dist/ProgressBar/index.js +6 -8
  151. package/dist/Radio/Radio.js +97 -115
  152. package/dist/Radio/Radio.module.css.js +5 -5
  153. package/dist/RadioGroup/RadioGroup.js +99 -118
  154. package/dist/RelativeTime/RelativeTime.js +64 -76
  155. package/dist/ScrollableRegion/ScrollableRegion.js +67 -79
  156. package/dist/ScrollableRegion/ScrollableRegion.module.css.js +5 -5
  157. package/dist/SegmentedControl/SegmentedControl.js +238 -287
  158. package/dist/SegmentedControl/SegmentedControl.module.css.js +15 -5
  159. package/dist/SegmentedControl/SegmentedControlButton.js +156 -187
  160. package/dist/SegmentedControl/SegmentedControlIconButton.js +133 -161
  161. package/dist/Select/Select.js +185 -234
  162. package/dist/Select/Select.module.css.js +10 -5
  163. package/dist/SelectPanel/SelectPanel.js +620 -828
  164. package/dist/SelectPanel/SelectPanel.module.css.js +27 -5
  165. package/dist/SelectPanel/SelectPanelMessage.js +37 -39
  166. package/dist/SideNav.js +24 -47
  167. package/dist/SideNav.module.css.js +12 -5
  168. package/dist/Skeleton/SkeletonBox.js +94 -111
  169. package/dist/Skeleton/SkeletonBox.module.css.js +8 -5
  170. package/dist/SkeletonAvatar/SkeletonAvatar.js +95 -120
  171. package/dist/SkeletonAvatar/SkeletonAvatar.module.css.js +5 -5
  172. package/dist/SkeletonText/SkeletonText.js +114 -137
  173. package/dist/SkeletonText/SkeletonText.module.css.js +8 -5
  174. package/dist/Spinner/Spinner.js +183 -211
  175. package/dist/Spinner/Spinner.module.css.js +9 -5
  176. package/dist/SplitPageLayout/SplitPageLayout.js +215 -276
  177. package/dist/Stack/Stack.js +207 -255
  178. package/dist/Stack/Stack.module.css.js +8 -5
  179. package/dist/Stack/index.js +4 -6
  180. package/dist/StateLabel/StateLabel.js +110 -123
  181. package/dist/StateLabel/StateLabel.module.css.js +8 -5
  182. package/dist/SubNav/SubNav.js +159 -197
  183. package/dist/SubNav/SubNav.module.css.js +11 -5
  184. package/dist/TabNav/TabNav.js +167 -199
  185. package/dist/TabNav/TabNav.module.css.js +10 -5
  186. package/dist/Text/Text.js +56 -67
  187. package/dist/Text/Text.module.css.js +5 -5
  188. package/dist/TextInput/TextInput.js +195 -228
  189. package/dist/TextInput/TextInput.module.css.js +8 -5
  190. package/dist/TextInputWithTokens/TextInputWithTokens.js +567 -673
  191. package/dist/TextInputWithTokens/TextInputWithTokens.module.css.js +14 -5
  192. package/dist/Textarea/TextArea.module.css.js +9 -5
  193. package/dist/Textarea/Textarea.js +264 -294
  194. package/dist/ThemeProvider.js +199 -257
  195. package/dist/Timeline/Timeline.js +204 -247
  196. package/dist/Timeline/Timeline.module.css.js +12 -5
  197. package/dist/ToggleSwitch/ToggleSwitch.js +403 -471
  198. package/dist/ToggleSwitch/ToggleSwitch.module.css.js +16 -5
  199. package/dist/Token/IssueLabelToken.js +256 -297
  200. package/dist/Token/IssueLabelToken.module.css.js +8 -5
  201. package/dist/Token/Token.js +232 -280
  202. package/dist/Token/Token.module.css.js +9 -5
  203. package/dist/Token/TokenBase.js +99 -126
  204. package/dist/Token/TokenBase.module.css.js +5 -5
  205. package/dist/Token/_RemoveTokenButton.js +27 -48
  206. package/dist/Token/_RemoveTokenButton.module.css.js +5 -5
  207. package/dist/Token/_TokenTextContainer.js +54 -65
  208. package/dist/Token/_TokenTextContainer.module.css.js +5 -5
  209. package/dist/Tooltip/Tooltip.js +49 -56
  210. package/dist/Tooltip/Tooltip.module.css.js +20 -5
  211. package/dist/TooltipV2/Tooltip.js +222 -305
  212. package/dist/TooltipV2/Tooltip.module.css.js +11 -5
  213. package/dist/TopicTag/TopicTag.js +46 -55
  214. package/dist/TopicTag/TopicTag.module.css.js +5 -5
  215. package/dist/TopicTag/TopicTagGroup.js +40 -48
  216. package/dist/TopicTag/TopicTagGroup.module.css.js +5 -5
  217. package/dist/TopicTag/index.js +5 -7
  218. package/dist/TreeView/TreeView.js +1082 -1414
  219. package/dist/TreeView/TreeView.module.css.js +24 -5
  220. package/dist/TreeView/shared.js +10 -9
  221. package/dist/TreeView/useRovingTabIndex.js +129 -203
  222. package/dist/TreeView/useTreeItemCache.js +64 -79
  223. package/dist/TreeView/useTypeahead.js +90 -112
  224. package/dist/Truncate/Truncate.js +21 -33
  225. package/dist/Truncate/Truncate.module.css.js +5 -5
  226. package/dist/UnderlineNav/UnderlineNav.js +278 -375
  227. package/dist/UnderlineNav/UnderlineNav.module.css.js +8 -5
  228. package/dist/UnderlineNav/UnderlineNavContext.js +8 -8
  229. package/dist/UnderlineNav/UnderlineNavItem.js +56 -72
  230. package/dist/UnderlineNav/UnderlineNavItem.module.css.js +5 -5
  231. package/dist/UnderlineNav/index.js +5 -7
  232. package/dist/UnderlineNav/styles.js +11 -15
  233. package/dist/VisuallyHidden/VisuallyHidden.js +51 -49
  234. package/dist/VisuallyHidden/VisuallyHidden.module.css.js +5 -5
  235. package/dist/_VisuallyHidden.js +50 -62
  236. package/dist/_VisuallyHidden.module.css.js +5 -5
  237. package/dist/deprecated/ActionList/Divider.js +23 -23
  238. package/dist/deprecated/ActionList/Divider.module.css.js +5 -5
  239. package/dist/deprecated/ActionList/Group.js +43 -50
  240. package/dist/deprecated/ActionList/Header.js +69 -81
  241. package/dist/deprecated/ActionList/Header.module.css.js +5 -5
  242. package/dist/deprecated/ActionList/Item.js +308 -352
  243. package/dist/deprecated/ActionList/Item.module.css.js +18 -5
  244. package/dist/deprecated/ActionList/List.js +157 -196
  245. package/dist/deprecated/ActionList/List.module.css.js +5 -5
  246. package/dist/deprecated/ActionList/index.js +14 -14
  247. package/dist/deprecated/ActionMenu.js +159 -190
  248. package/dist/deprecated/DialogV1/Dialog.js +166 -200
  249. package/dist/deprecated/DialogV1/Dialog.module.css.js +11 -5
  250. package/dist/deprecated/FilteredSearch/FilteredSearch.js +43 -51
  251. package/dist/deprecated/FilteredSearch/FilteredSearch.module.css.js +5 -5
  252. package/dist/deprecated/UnderlineNav/UnderlineNav.js +132 -160
  253. package/dist/deprecated/UnderlineNav/UnderlineNav.module.css.js +14 -5
  254. package/dist/deprecated/index.js +20 -9
  255. package/dist/experimental/IssueLabel/IssueLabel.js +134 -158
  256. package/dist/experimental/IssueLabel/IssueLabel.module.css.js +5 -5
  257. package/dist/experimental/SelectPanel2/SelectPanel.js +419 -567
  258. package/dist/experimental/SelectPanel2/SelectPanel.module.css.js +32 -5
  259. package/dist/experimental/Tabs/Tabs.js +234 -297
  260. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +165 -215
  261. package/dist/experimental/UnderlinePanels/UnderlinePanels.module.css.js +5 -5
  262. package/dist/experimental/index.js +44 -33
  263. package/dist/hooks/useAnchoredPosition.d.ts +0 -6
  264. package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
  265. package/dist/hooks/useAnchoredPosition.js +123 -130
  266. package/dist/hooks/useControllableState.js +34 -59
  267. package/dist/hooks/useDetails.js +84 -99
  268. package/dist/hooks/useDialog.js +140 -178
  269. package/dist/hooks/useFocusTrap.js +57 -71
  270. package/dist/hooks/useFocusZone.js +32 -38
  271. package/dist/hooks/useId.js +14 -16
  272. package/dist/hooks/useIsMacOS.js +21 -26
  273. package/dist/hooks/useMedia.js +54 -68
  274. package/dist/hooks/useMenuInitialFocus.js +65 -62
  275. package/dist/hooks/useMenuKeyboardNavigation.js +129 -126
  276. package/dist/hooks/useMergedRefs.js +63 -78
  277. package/dist/hooks/useMnemonics.js +77 -107
  278. package/dist/hooks/useOnEscapePress.js +45 -56
  279. package/dist/hooks/useOnOutsideClick.js +32 -63
  280. package/dist/hooks/useOpenAndCloseFocus.js +40 -43
  281. package/dist/hooks/useOverflow.js +32 -36
  282. package/dist/hooks/useOverlay.js +56 -75
  283. package/dist/hooks/useProvidedRefOrCreate.js +24 -24
  284. package/dist/hooks/useProvidedStateOrCreate.js +33 -39
  285. package/dist/hooks/useRefObjectAsForwardedRef.js +30 -32
  286. package/dist/hooks/useRenderForcingRef.js +42 -46
  287. package/dist/hooks/useResizeObserver.js +32 -43
  288. package/dist/hooks/useResponsiveValue.js +37 -57
  289. package/dist/hooks/useSafeTimeout.js +26 -29
  290. package/dist/hooks/useScrollFlash.js +16 -23
  291. package/dist/hooks/useSlots.js +102 -136
  292. package/dist/hooks/useSyncedState.js +31 -37
  293. package/dist/index.js +88 -85
  294. package/dist/internal/components/ButtonReset.js +45 -50
  295. package/dist/internal/components/ButtonReset.module.css.js +5 -5
  296. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +79 -105
  297. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.module.css.js +12 -5
  298. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +16 -21
  299. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.js +4 -4
  300. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +26 -35
  301. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +14 -19
  302. package/dist/internal/components/ConditionalWrapper.js +41 -51
  303. package/dist/internal/components/InputLabel.js +92 -113
  304. package/dist/internal/components/InputLabel.module.css.js +8 -5
  305. package/dist/internal/components/InputValidation.js +67 -87
  306. package/dist/internal/components/InputValidation.module.css.js +9 -5
  307. package/dist/internal/components/TextInputInnerAction.js +134 -173
  308. package/dist/internal/components/TextInputInnerAction.module.css.js +9 -5
  309. package/dist/internal/components/TextInputInnerVisualSlot.js +89 -110
  310. package/dist/internal/components/TextInputInnerVisualSlot.module.css.js +11 -5
  311. package/dist/internal/components/TextInputWrapper.js +187 -230
  312. package/dist/internal/components/TextInputWrapper.module.css.js +8 -5
  313. package/dist/internal/components/UnderlineTabbedInterface.js +191 -238
  314. package/dist/internal/components/UnderlineTabbedInterface.module.css.js +11 -5
  315. package/dist/internal/components/UnstyledTextInput.js +40 -47
  316. package/dist/internal/components/UnstyledTextInput.module.css.js +5 -5
  317. package/dist/internal/components/ValidationAnimationContainer.js +55 -66
  318. package/dist/internal/components/ValidationAnimationContainer.module.css.js +8 -5
  319. package/dist/internal/hooks/useEffectCallback.js +35 -38
  320. package/dist/internal/hooks/useEffectOnce.js +23 -25
  321. package/dist/internal/utils/getResponsiveAttributes.js +23 -26
  322. package/dist/internal/utils/hasInteractiveNodes.js +34 -46
  323. package/dist/legacy-theme/ts/color-schemes.js +4250 -4732
  324. package/dist/live-region/Announce.js +144 -183
  325. package/dist/live-region/AriaAlert.js +20 -22
  326. package/dist/live-region/AriaStatus.js +20 -22
  327. package/dist/next/index.js +3 -1
  328. package/dist/test-helpers.js +40 -62
  329. package/dist/theme.js +83 -47
  330. package/dist/utils/character-counter.js +45 -63
  331. package/dist/utils/create-component.js +15 -16
  332. package/dist/utils/descendant-registry.js +182 -218
  333. package/dist/utils/environment.js +7 -7
  334. package/dist/utils/getBreakpointDeclarations.js +9 -10
  335. package/dist/utils/invariant.js +17 -23
  336. package/dist/utils/is-slot.js +10 -11
  337. package/dist/utils/isNumeric.js +3 -3
  338. package/dist/utils/modern-polymorphic.js +12 -20
  339. package/dist/utils/scroll.js +8 -11
  340. package/dist/utils/theme.js +5 -10
  341. package/dist/utils/useIsomorphicLayoutEffect.js +4 -9
  342. package/dist/utils/warning.js +14 -21
  343. package/generated/components.json +9 -9
  344. package/package.json +5 -10
@@ -1,5 +1,32 @@
1
- import './SelectPanel-40b4ba73.css';
2
-
3
- var classes = {"Overlay":"prc-SelectPanel2-Overlay--Q-FI","Form":"prc-SelectPanel2-Form-bZ9HS","Container":"prc-SelectPanel2-Container-e5e6-","HeaderContent":"prc-SelectPanel2-HeaderContent-MsaAS","TitleWrapper":"prc-SelectPanel2-TitleWrapper-HzPu3","TextInput":"prc-SelectPanel2-TextInput-lHH1n","Checkbox":"prc-SelectPanel2-Checkbox-AYR38","FlexBox":"prc-SelectPanel2-FlexBox-gWPRg","Title":"prc-SelectPanel2-Title-T-h3f","Description":"prc-SelectPanel2-Description-qTXfi","ClearAction":"prc-SelectPanel2-ClearAction-tQj-f","Footer":"prc-SelectPanel2-Footer-TibV0","FooterContent":"prc-SelectPanel2-FooterContent-UjAOM","FooterActions":"prc-SelectPanel2-FooterActions-T6yQR","SecondaryCheckbox":"prc-SelectPanel2-SecondaryCheckbox-omkf-","SmallText":"prc-SelectPanel2-SmallText-c42ay","SelectPanelLoading":"prc-SelectPanel2-SelectPanelLoading-mtyhD","LoadingText":"prc-SelectPanel2-LoadingText-DB0wN","MessageFull":"prc-SelectPanel2-MessageFull-nY-qF","Octicon":"prc-SelectPanel2-Octicon-zt-zU","Error":"prc-SelectPanel2-Error-ZrZQQ","Warning":"prc-SelectPanel2-Warning-PDsVF","MessageTitle":"prc-SelectPanel2-MessageTitle-T7v9d","MessageContent":"prc-SelectPanel2-MessageContent-UZ9vY","MessageInline":"prc-SelectPanel2-MessageInline-sErQf","Header":"prc-SelectPanel2-Header-LKyEJ"};
4
-
5
- export { classes as default };
1
+ import "./SelectPanel-40b4ba73.css";
2
+ //#region src/experimental/SelectPanel2/SelectPanel.module.css.js
3
+ var SelectPanel_module_css_default = {
4
+ "Overlay": "prc-SelectPanel2-Overlay--Q-FI",
5
+ "Form": "prc-SelectPanel2-Form-bZ9HS",
6
+ "Container": "prc-SelectPanel2-Container-e5e6-",
7
+ "HeaderContent": "prc-SelectPanel2-HeaderContent-MsaAS",
8
+ "TitleWrapper": "prc-SelectPanel2-TitleWrapper-HzPu3",
9
+ "TextInput": "prc-SelectPanel2-TextInput-lHH1n",
10
+ "Checkbox": "prc-SelectPanel2-Checkbox-AYR38",
11
+ "FlexBox": "prc-SelectPanel2-FlexBox-gWPRg",
12
+ "Title": "prc-SelectPanel2-Title-T-h3f",
13
+ "Description": "prc-SelectPanel2-Description-qTXfi",
14
+ "ClearAction": "prc-SelectPanel2-ClearAction-tQj-f",
15
+ "Footer": "prc-SelectPanel2-Footer-TibV0",
16
+ "FooterContent": "prc-SelectPanel2-FooterContent-UjAOM",
17
+ "FooterActions": "prc-SelectPanel2-FooterActions-T6yQR",
18
+ "SecondaryCheckbox": "prc-SelectPanel2-SecondaryCheckbox-omkf-",
19
+ "SmallText": "prc-SelectPanel2-SmallText-c42ay",
20
+ "SelectPanelLoading": "prc-SelectPanel2-SelectPanelLoading-mtyhD",
21
+ "LoadingText": "prc-SelectPanel2-LoadingText-DB0wN",
22
+ "MessageFull": "prc-SelectPanel2-MessageFull-nY-qF",
23
+ "Octicon": "prc-SelectPanel2-Octicon-zt-zU",
24
+ "Error": "prc-SelectPanel2-Error-ZrZQQ",
25
+ "Warning": "prc-SelectPanel2-Warning-PDsVF",
26
+ "MessageTitle": "prc-SelectPanel2-MessageTitle-T7v9d",
27
+ "MessageContent": "prc-SelectPanel2-MessageContent-UZ9vY",
28
+ "MessageInline": "prc-SelectPanel2-MessageInline-sErQf",
29
+ "Header": "prc-SelectPanel2-Header-LKyEJ"
30
+ };
31
+ //#endregion
32
+ export { SelectPanel_module_css_default as default };
@@ -1,317 +1,254 @@
1
- import { c } from 'react-compiler-runtime';
2
- import React, { useId, createContext, useContext } from 'react';
3
- import useIsomorphicLayoutEffect from '../../utils/useIsomorphicLayoutEffect.js';
4
- import { useControllableState } from '../../hooks/useControllableState.js';
5
- import { jsx } from 'react/jsx-runtime';
6
- import { useProvidedRefOrCreate } from '../../hooks/useProvidedRefOrCreate.js';
7
-
1
+ import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
2
+ import useIsomorphicLayoutEffect from "../../utils/useIsomorphicLayoutEffect.js";
3
+ import { useControllableState } from "../../hooks/useControllableState.js";
4
+ import { c } from "react-compiler-runtime";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import React, { createContext, useContext, useId } from "react";
7
+ //#region src/experimental/Tabs/Tabs.tsx
8
8
  /**
9
- * The Tabs component provides the base structure for a tabbed interface, without providing any formal requirement on DOM structure or styling.
10
- * It manages the state of the selected tab, handles tab ordering/selection and provides context to its child components to ensure an accessible experience.
11
- *
12
- * This is intended to be used in conjunction with the `useTab`, `useTabList`, and `useTabPanel` hooks to build a fully accessible tabs component.
13
- * The `Tab`, `TabList`, and `TabPanel` components are provided for convenience to showcase the API & implementation.
14
- */
9
+ * Props to be used when the Tabs component's state is controlled by the parent
10
+ */
11
+ /**
12
+ * Props to be used when the Tabs component is managing its own state
13
+ */
14
+ /**
15
+ * The Tabs component provides the base structure for a tabbed interface, without providing any formal requirement on DOM structure or styling.
16
+ * It manages the state of the selected tab, handles tab ordering/selection and provides context to its child components to ensure an accessible experience.
17
+ *
18
+ * This is intended to be used in conjunction with the `useTab`, `useTabList`, and `useTabPanel` hooks to build a fully accessible tabs component.
19
+ * The `Tab`, `TabList`, and `TabPanel` components are provided for convenience to showcase the API & implementation.
20
+ */
15
21
  function Tabs(props) {
16
- var _props$defaultValue;
17
- const $ = c(13);
18
- const {
19
- children,
20
- onValueChange
21
- } = props;
22
- const groupId = useId();
23
- const t0 = (_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : props.value;
24
- let t1;
25
- if ($[0] !== props.value || $[1] !== t0) {
26
- t1 = {
27
- name: "tab-selection",
28
- defaultValue: t0,
29
- value: props.value
30
- };
31
- $[0] = props.value;
32
- $[1] = t0;
33
- $[2] = t1;
34
- } else {
35
- t1 = $[2];
36
- }
37
- const [selectedValue, setSelectedValue] = useControllableState(t1);
38
- const savedOnValueChange = React.useRef(onValueChange);
39
- let t2;
40
- if ($[3] !== groupId || $[4] !== selectedValue || $[5] !== setSelectedValue) {
41
- t2 = {
42
- groupId,
43
- selectedValue,
44
- selectTab(value) {
45
- var _savedOnValueChange$c;
46
- setSelectedValue(value);
47
- (_savedOnValueChange$c = savedOnValueChange.current) === null || _savedOnValueChange$c === void 0 ? void 0 : _savedOnValueChange$c.call(savedOnValueChange, {
48
- value
49
- });
50
- }
51
- };
52
- $[3] = groupId;
53
- $[4] = selectedValue;
54
- $[5] = setSelectedValue;
55
- $[6] = t2;
56
- } else {
57
- t2 = $[6];
58
- }
59
- const contextValue = t2;
60
- let t3;
61
- let t4;
62
- if ($[7] !== onValueChange) {
63
- t3 = () => {
64
- savedOnValueChange.current = onValueChange;
65
- };
66
- t4 = [onValueChange];
67
- $[7] = onValueChange;
68
- $[8] = t3;
69
- $[9] = t4;
70
- } else {
71
- t3 = $[8];
72
- t4 = $[9];
73
- }
74
- useIsomorphicLayoutEffect(t3, t4);
75
- let t5;
76
- if ($[10] !== children || $[11] !== contextValue) {
77
- t5 = /*#__PURE__*/jsx(TabsContext.Provider, {
78
- value: contextValue,
79
- children: children
80
- });
81
- $[10] = children;
82
- $[11] = contextValue;
83
- $[12] = t5;
84
- } else {
85
- t5 = $[12];
86
- }
87
- return t5;
22
+ var _props$defaultValue;
23
+ const $ = c(13);
24
+ const { children, onValueChange } = props;
25
+ const groupId = useId();
26
+ const t0 = (_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : props.value;
27
+ let t1;
28
+ if ($[0] !== props.value || $[1] !== t0) {
29
+ t1 = {
30
+ name: "tab-selection",
31
+ defaultValue: t0,
32
+ value: props.value
33
+ };
34
+ $[0] = props.value;
35
+ $[1] = t0;
36
+ $[2] = t1;
37
+ } else t1 = $[2];
38
+ const [selectedValue, setSelectedValue] = useControllableState(t1);
39
+ const savedOnValueChange = React.useRef(onValueChange);
40
+ let t2;
41
+ if ($[3] !== groupId || $[4] !== selectedValue || $[5] !== setSelectedValue) {
42
+ t2 = {
43
+ groupId,
44
+ selectedValue,
45
+ selectTab(value) {
46
+ var _savedOnValueChange$c;
47
+ setSelectedValue(value);
48
+ (_savedOnValueChange$c = savedOnValueChange.current) === null || _savedOnValueChange$c === void 0 || _savedOnValueChange$c.call(savedOnValueChange, { value });
49
+ }
50
+ };
51
+ $[3] = groupId;
52
+ $[4] = selectedValue;
53
+ $[5] = setSelectedValue;
54
+ $[6] = t2;
55
+ } else t2 = $[6];
56
+ const contextValue = t2;
57
+ let t3;
58
+ let t4;
59
+ if ($[7] !== onValueChange) {
60
+ t3 = () => {
61
+ savedOnValueChange.current = onValueChange;
62
+ };
63
+ t4 = [onValueChange];
64
+ $[7] = onValueChange;
65
+ $[8] = t3;
66
+ $[9] = t4;
67
+ } else {
68
+ t3 = $[8];
69
+ t4 = $[9];
70
+ }
71
+ useIsomorphicLayoutEffect(t3, t4);
72
+ let t5;
73
+ if ($[10] !== children || $[11] !== contextValue) {
74
+ t5 = /* @__PURE__ */ jsx(TabsContext.Provider, {
75
+ value: contextValue,
76
+ children
77
+ });
78
+ $[10] = children;
79
+ $[11] = contextValue;
80
+ $[12] = t5;
81
+ } else t5 = $[12];
82
+ return t5;
88
83
  }
89
84
  function useTabList(props) {
90
- const $ = c(9);
91
- const {
92
- "aria-label": ariaLabel,
93
- "aria-labelledby": ariaLabelledby,
94
- "aria-orientation": ariaOrientation
95
- } = props;
96
- const ref = useProvidedRefOrCreate(props.ref);
97
- let t0;
98
- if ($[0] !== ariaOrientation || $[1] !== ref) {
99
- t0 = event => {
100
- const {
101
- current: tablist
102
- } = ref;
103
- if (tablist === null) {
104
- return;
105
- }
106
- const tabs = getFocusableTabs(tablist);
107
- const isVertical = ariaOrientation === "vertical";
108
- const nextKey = isVertical ? "ArrowDown" : "ArrowRight";
109
- const prevKey = isVertical ? "ArrowUp" : "ArrowLeft";
110
- if (event.key === nextKey || event.key === prevKey || event.key === "Home" || event.key === "End") {
111
- event.preventDefault();
112
- event.stopPropagation();
113
- }
114
- if (event.key === nextKey) {
115
- const selectedTabIndex = tabs.findIndex(_temp);
116
- if (selectedTabIndex === -1) {
117
- return;
118
- }
119
- const nextTabIndex = (selectedTabIndex + 1) % tabs.length;
120
- tabs[nextTabIndex].focus();
121
- } else {
122
- if (event.key === prevKey) {
123
- const selectedTabIndex_0 = tabs.findIndex(_temp2);
124
- if (selectedTabIndex_0 === -1) {
125
- return;
126
- }
127
- const nextTabIndex_0 = (tabs.length + selectedTabIndex_0 - 1) % tabs.length;
128
- tabs[nextTabIndex_0].focus();
129
- } else {
130
- if (event.key === "Home") {
131
- if (tabs[0]) {
132
- tabs[0].focus();
133
- }
134
- } else {
135
- if (event.key === "End") {
136
- if (tabs.length > 0) {
137
- tabs[tabs.length - 1].focus();
138
- }
139
- }
140
- }
141
- }
142
- }
143
- };
144
- $[0] = ariaOrientation;
145
- $[1] = ref;
146
- $[2] = t0;
147
- } else {
148
- t0 = $[2];
149
- }
150
- const onKeyDown = t0;
151
- const t1 = ariaOrientation !== null && ariaOrientation !== void 0 ? ariaOrientation : "horizontal";
152
- let t2;
153
- if ($[3] !== ariaLabel || $[4] !== ariaLabelledby || $[5] !== onKeyDown || $[6] !== ref || $[7] !== t1) {
154
- t2 = {
155
- tabListProps: {
156
- ref,
157
- "aria-label": ariaLabel,
158
- "aria-labelledby": ariaLabelledby,
159
- "aria-orientation": t1,
160
- role: "tablist",
161
- onKeyDown
162
- }
163
- };
164
- $[3] = ariaLabel;
165
- $[4] = ariaLabelledby;
166
- $[5] = onKeyDown;
167
- $[6] = ref;
168
- $[7] = t1;
169
- $[8] = t2;
170
- } else {
171
- t2 = $[8];
172
- }
173
- return t2;
85
+ const $ = c(9);
86
+ const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-orientation": ariaOrientation } = props;
87
+ const ref = useProvidedRefOrCreate(props.ref);
88
+ let t0;
89
+ if ($[0] !== ariaOrientation || $[1] !== ref) {
90
+ t0 = (event) => {
91
+ const { current: tablist } = ref;
92
+ if (tablist === null) return;
93
+ const tabs = getFocusableTabs(tablist);
94
+ const isVertical = ariaOrientation === "vertical";
95
+ const nextKey = isVertical ? "ArrowDown" : "ArrowRight";
96
+ const prevKey = isVertical ? "ArrowUp" : "ArrowLeft";
97
+ if (event.key === nextKey || event.key === prevKey || event.key === "Home" || event.key === "End") {
98
+ event.preventDefault();
99
+ event.stopPropagation();
100
+ }
101
+ if (event.key === nextKey) {
102
+ const selectedTabIndex = tabs.findIndex(_temp);
103
+ if (selectedTabIndex === -1) return;
104
+ tabs[(selectedTabIndex + 1) % tabs.length].focus();
105
+ } else if (event.key === prevKey) {
106
+ const selectedTabIndex_0 = tabs.findIndex(_temp2);
107
+ if (selectedTabIndex_0 === -1) return;
108
+ tabs[(tabs.length + selectedTabIndex_0 - 1) % tabs.length].focus();
109
+ } else if (event.key === "Home") {
110
+ if (tabs[0]) tabs[0].focus();
111
+ } else if (event.key === "End") {
112
+ if (tabs.length > 0) tabs[tabs.length - 1].focus();
113
+ }
114
+ };
115
+ $[0] = ariaOrientation;
116
+ $[1] = ref;
117
+ $[2] = t0;
118
+ } else t0 = $[2];
119
+ const onKeyDown = t0;
120
+ const t1 = ariaOrientation !== null && ariaOrientation !== void 0 ? ariaOrientation : "horizontal";
121
+ let t2;
122
+ if ($[3] !== ariaLabel || $[4] !== ariaLabelledby || $[5] !== onKeyDown || $[6] !== ref || $[7] !== t1) {
123
+ t2 = { tabListProps: {
124
+ ref,
125
+ "aria-label": ariaLabel,
126
+ "aria-labelledby": ariaLabelledby,
127
+ "aria-orientation": t1,
128
+ role: "tablist",
129
+ onKeyDown
130
+ } };
131
+ $[3] = ariaLabel;
132
+ $[4] = ariaLabelledby;
133
+ $[5] = onKeyDown;
134
+ $[6] = ref;
135
+ $[7] = t1;
136
+ $[8] = t2;
137
+ } else t2 = $[8];
138
+ return t2;
174
139
  }
175
140
  function _temp2(tab_0) {
176
- return tab_0.getAttribute("aria-selected") === "true";
141
+ return tab_0.getAttribute("aria-selected") === "true";
177
142
  }
178
143
  function _temp(tab) {
179
- return tab.getAttribute("aria-selected") === "true";
144
+ return tab.getAttribute("aria-selected") === "true";
180
145
  }
181
146
  function getFocusableTabs(tablist) {
182
- return Array.from(tablist.querySelectorAll('[role="tab"]:not([aria-disabled])'));
147
+ return Array.from(tablist.querySelectorAll("[role=\"tab\"]:not([aria-disabled])"));
183
148
  }
184
149
  /**
185
- * A custom hook that provides the props needed for a tab component.
186
- * The props returned should be spread onto the component (typically a button) with the `role=tab`, under a `tablist`.
187
- */
150
+ * A custom hook that provides the props needed for a tab component.
151
+ * The props returned should be spread onto the component (typically a button) with the `role=tab`, under a `tablist`.
152
+ */
188
153
  function useTab(props) {
189
- const $ = c(21);
190
- const {
191
- disabled,
192
- value
193
- } = props;
194
- const tabs = useTabs();
195
- const selected = tabs.selectedValue === value;
196
- const id = `${tabs.groupId}-tab-${value}`;
197
- const panelId = `${tabs.groupId}-panel-${value}`;
198
- let t0;
199
- if ($[0] !== tabs || $[1] !== value) {
200
- t0 = function onKeyDown(event) {
201
- if (event.key === " " || event.key === "Enter") {
202
- tabs.selectTab(value);
203
- }
204
- };
205
- $[0] = tabs;
206
- $[1] = value;
207
- $[2] = t0;
208
- } else {
209
- t0 = $[2];
210
- }
211
- const onKeyDown = t0;
212
- let t1;
213
- if ($[3] !== disabled || $[4] !== tabs || $[5] !== value) {
214
- t1 = function onMouseDown(event_0) {
215
- if (!disabled && event_0.button === 0 && event_0.ctrlKey === false) {
216
- tabs.selectTab(value);
217
- } else {
218
- event_0.preventDefault();
219
- }
220
- };
221
- $[3] = disabled;
222
- $[4] = tabs;
223
- $[5] = value;
224
- $[6] = t1;
225
- } else {
226
- t1 = $[6];
227
- }
228
- const onMouseDown = t1;
229
- let t2;
230
- if ($[7] !== disabled || $[8] !== selected || $[9] !== tabs || $[10] !== value) {
231
- t2 = function onFocus() {
232
- if (!selected && !disabled) {
233
- tabs.selectTab(value);
234
- }
235
- };
236
- $[7] = disabled;
237
- $[8] = selected;
238
- $[9] = tabs;
239
- $[10] = value;
240
- $[11] = t2;
241
- } else {
242
- t2 = $[11];
243
- }
244
- const onFocus = t2;
245
- const t3 = disabled ? true : undefined;
246
- const t4 = selected ? 0 : -1;
247
- let t5;
248
- if ($[12] !== id || $[13] !== onFocus || $[14] !== onKeyDown || $[15] !== onMouseDown || $[16] !== panelId || $[17] !== selected || $[18] !== t3 || $[19] !== t4) {
249
- t5 = {
250
- tabProps: {
251
- "aria-disabled": t3,
252
- "aria-controls": panelId,
253
- "aria-selected": selected,
254
- onKeyDown,
255
- onMouseDown,
256
- onFocus,
257
- id,
258
- role: "tab",
259
- tabIndex: t4
260
- }
261
- };
262
- $[12] = id;
263
- $[13] = onFocus;
264
- $[14] = onKeyDown;
265
- $[15] = onMouseDown;
266
- $[16] = panelId;
267
- $[17] = selected;
268
- $[18] = t3;
269
- $[19] = t4;
270
- $[20] = t5;
271
- } else {
272
- t5 = $[20];
273
- }
274
- return t5;
154
+ const $ = c(21);
155
+ const { disabled, value } = props;
156
+ const tabs = useTabs();
157
+ const selected = tabs.selectedValue === value;
158
+ const id = `${tabs.groupId}-tab-${value}`;
159
+ const panelId = `${tabs.groupId}-panel-${value}`;
160
+ let t0;
161
+ if ($[0] !== tabs || $[1] !== value) {
162
+ t0 = function onKeyDown(event) {
163
+ if (event.key === " " || event.key === "Enter") tabs.selectTab(value);
164
+ };
165
+ $[0] = tabs;
166
+ $[1] = value;
167
+ $[2] = t0;
168
+ } else t0 = $[2];
169
+ const onKeyDown = t0;
170
+ let t1;
171
+ if ($[3] !== disabled || $[4] !== tabs || $[5] !== value) {
172
+ t1 = function onMouseDown(event_0) {
173
+ if (!disabled && event_0.button === 0 && event_0.ctrlKey === false) tabs.selectTab(value);
174
+ else event_0.preventDefault();
175
+ };
176
+ $[3] = disabled;
177
+ $[4] = tabs;
178
+ $[5] = value;
179
+ $[6] = t1;
180
+ } else t1 = $[6];
181
+ const onMouseDown = t1;
182
+ let t2;
183
+ if ($[7] !== disabled || $[8] !== selected || $[9] !== tabs || $[10] !== value) {
184
+ t2 = function onFocus() {
185
+ if (!selected && !disabled) tabs.selectTab(value);
186
+ };
187
+ $[7] = disabled;
188
+ $[8] = selected;
189
+ $[9] = tabs;
190
+ $[10] = value;
191
+ $[11] = t2;
192
+ } else t2 = $[11];
193
+ const onFocus = t2;
194
+ const t3 = disabled ? true : void 0;
195
+ const t4 = selected ? 0 : -1;
196
+ let t5;
197
+ if ($[12] !== id || $[13] !== onFocus || $[14] !== onKeyDown || $[15] !== onMouseDown || $[16] !== panelId || $[17] !== selected || $[18] !== t3 || $[19] !== t4) {
198
+ t5 = { tabProps: {
199
+ "aria-disabled": t3,
200
+ "aria-controls": panelId,
201
+ "aria-selected": selected,
202
+ onKeyDown,
203
+ onMouseDown,
204
+ onFocus,
205
+ id,
206
+ role: "tab",
207
+ tabIndex: t4
208
+ } };
209
+ $[12] = id;
210
+ $[13] = onFocus;
211
+ $[14] = onKeyDown;
212
+ $[15] = onMouseDown;
213
+ $[16] = panelId;
214
+ $[17] = selected;
215
+ $[18] = t3;
216
+ $[19] = t4;
217
+ $[20] = t5;
218
+ } else t5 = $[20];
219
+ return t5;
275
220
  }
276
221
  /** Utility hook for tab panels */
277
222
  function useTabPanel(props) {
278
- const $ = c(5);
279
- const {
280
- value
281
- } = props;
282
- const tabs = useTabs();
283
- const id = `${tabs.groupId}-panel-${value}`;
284
- const tabId = `${tabs.groupId}-tab-${value}`;
285
- const t0 = tabs.selectedValue === value ? "" : undefined;
286
- const t1 = tabs.selectedValue !== value;
287
- let t2;
288
- if ($[0] !== id || $[1] !== t0 || $[2] !== t1 || $[3] !== tabId) {
289
- t2 = {
290
- tabPanelProps: {
291
- "aria-labelledby": tabId,
292
- "data-selected": t0,
293
- id,
294
- hidden: t1,
295
- role: "tabpanel"
296
- }
297
- };
298
- $[0] = id;
299
- $[1] = t0;
300
- $[2] = t1;
301
- $[3] = tabId;
302
- $[4] = t2;
303
- } else {
304
- t2 = $[4];
305
- }
306
- return t2;
223
+ const $ = c(5);
224
+ const { value } = props;
225
+ const tabs = useTabs();
226
+ const id = `${tabs.groupId}-panel-${value}`;
227
+ const tabId = `${tabs.groupId}-tab-${value}`;
228
+ const t0 = tabs.selectedValue === value ? "" : void 0;
229
+ const t1 = tabs.selectedValue !== value;
230
+ let t2;
231
+ if ($[0] !== id || $[1] !== t0 || $[2] !== t1 || $[3] !== tabId) {
232
+ t2 = { tabPanelProps: {
233
+ "aria-labelledby": tabId,
234
+ "data-selected": t0,
235
+ id,
236
+ hidden: t1,
237
+ role: "tabpanel"
238
+ } };
239
+ $[0] = id;
240
+ $[1] = t0;
241
+ $[2] = t1;
242
+ $[3] = tabId;
243
+ $[4] = t2;
244
+ } else t2 = $[4];
245
+ return t2;
307
246
  }
308
- const TabsContext = /*#__PURE__*/createContext(null);
247
+ const TabsContext = /* @__PURE__ */ createContext(null);
309
248
  function useTabs() {
310
- const context = useContext(TabsContext);
311
- if (context) {
312
- return context;
313
- }
314
- throw new Error("Component must be used within a <Tabs> component");
249
+ const context = useContext(TabsContext);
250
+ if (context) return context;
251
+ throw new Error("Component must be used within a <Tabs> component");
315
252
  }
316
-
253
+ //#endregion
317
254
  export { Tabs, useTab, useTabList, useTabPanel };