@primer/react 38.0.0-rc.195178541 → 38.0.0-rc.2
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.
- package/CHANGELOG.md +193 -2
- package/dist/browser.esm.js +3 -3
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/dist/components.css +1311 -350
- package/generated/components.json +560 -766
- package/lib/ActionList/ActionList-167cf6c7.css +2 -0
- package/lib/ActionList/ActionList-167cf6c7.css.map +1 -0
- package/lib/ActionList/ActionList.module.css.js +2 -2
- package/lib/ActionList/ActionListContainerContext.d.ts +1 -1
- package/lib/ActionList/ActionListContainerContext.d.ts.map +1 -1
- package/lib/ActionList/Description.d.ts.map +1 -1
- package/lib/ActionList/Description.js +1 -2
- package/lib/ActionList/Divider.d.ts.map +1 -1
- package/lib/ActionList/Divider.js +1 -2
- package/lib/ActionList/Group.d.ts.map +1 -1
- package/lib/ActionList/Group.js +1 -6
- package/lib/ActionList/Item.d.ts.map +1 -1
- package/lib/ActionList/Item.js +6 -3
- package/lib/ActionList/LinkItem.d.ts +1 -1
- package/lib/ActionList/LinkItem.d.ts.map +1 -1
- package/lib/ActionList/LinkItem.js +3 -2
- package/lib/ActionList/List.d.ts.map +1 -1
- package/lib/ActionList/List.js +3 -5
- package/lib/ActionList/Selection.js +2 -1
- package/lib/ActionList/Visuals.d.ts.map +1 -1
- package/lib/ActionList/Visuals.js +0 -7
- package/lib/ActionList/shared.d.ts +2 -1
- package/lib/ActionList/shared.d.ts.map +1 -1
- package/lib/Autocomplete/AutocompleteMenu.js +7 -7
- package/lib/Avatar/Avatar.d.ts.map +1 -1
- package/lib/Avatar/Avatar.js +39 -41
- package/lib/AvatarStack/AvatarStack-802bdd7c.css +2 -0
- package/lib/AvatarStack/AvatarStack-802bdd7c.css.map +1 -0
- package/lib/AvatarStack/AvatarStack.d.ts +4 -3
- package/lib/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/lib/AvatarStack/AvatarStack.js +10 -6
- package/lib/AvatarStack/AvatarStack.module.css.js +1 -1
- package/lib/Banner/Banner-6396546f.css +2 -0
- package/lib/Banner/Banner-6396546f.css.map +1 -0
- package/lib/Banner/Banner.d.ts.map +1 -1
- package/lib/Banner/Banner.js +3 -1
- package/lib/Banner/Banner.module.css.js +2 -2
- package/lib/{BaseStyles-7880c337.css → BaseStyles-79fd37c4.css} +2 -2
- package/lib/BaseStyles-79fd37c4.css.map +1 -0
- package/lib/BaseStyles.module.css.js +1 -1
- package/lib/Blankslate/{Blankslate-a68ed307.css → Blankslate-2be5efdc.css} +2 -2
- package/lib/Blankslate/Blankslate-2be5efdc.css.map +1 -0
- package/lib/Blankslate/Blankslate.js +38 -40
- package/lib/Blankslate/Blankslate.module.css.js +1 -1
- package/lib/BranchName/BranchName.d.ts +6 -3
- package/lib/BranchName/BranchName.d.ts.map +1 -1
- package/lib/BranchName/BranchName.js +1 -3
- package/lib/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.js +5 -5
- package/lib/Button/{ButtonBase-ec78dde7.css → ButtonBase-0a7871f4.css} +2 -2
- package/lib/Button/{ButtonBase-ec78dde7.css.map → ButtonBase-0a7871f4.css.map} +1 -1
- package/lib/Button/ButtonBase.js +2 -2
- package/lib/Button/ButtonBase.module.css.js +1 -1
- package/lib/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/lib/ButtonGroup/ButtonGroup.js +24 -61
- package/lib/Checkbox/Checkbox.js +187 -56
- package/lib/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/lib/CircleBadge/CircleBadge.js +4 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/lib/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/lib/CounterLabel/CounterLabel.js +43 -87
- package/lib/DataTable/Pagination-b6f8418c.css +2 -0
- package/lib/DataTable/Pagination-b6f8418c.css.map +1 -0
- package/lib/DataTable/Pagination.d.ts.map +1 -1
- package/lib/DataTable/Pagination.js +81 -88
- package/lib/DataTable/Pagination.module.css.js +7 -0
- package/lib/DataTable/Table.d.ts +1 -1
- package/lib/DataTable/Table.d.ts.map +1 -1
- package/lib/DataTable/Table.js +18 -26
- package/lib/DataTable/storyHelpers.d.ts +1 -1
- package/lib/DataTable/storyHelpers.d.ts.map +1 -1
- package/lib/DataTable/useTable.js +63 -82
- package/lib/Details/Details.d.ts +2 -3
- package/lib/Details/Details.d.ts.map +1 -1
- package/lib/Details/Details.js +33 -82
- package/lib/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/lib/FeatureFlags/DefaultFeatureFlags.js +2 -3
- package/lib/FeatureFlags/FeatureFlags.js +10 -12
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib/FilteredActionList/{FilteredActionListWithModernActionList.d.ts → FilteredActionList.d.ts} +9 -4
- package/lib/FilteredActionList/FilteredActionList.d.ts.map +1 -0
- package/lib/FilteredActionList/{FilteredActionListWithModernActionList.js → FilteredActionList.js} +156 -42
- package/lib/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib/FilteredActionList/index.d.ts +3 -2
- package/lib/FilteredActionList/index.d.ts.map +1 -1
- package/lib/FilteredActionList/types.d.ts +159 -0
- package/lib/FilteredActionList/types.d.ts.map +1 -0
- package/lib/FilteredActionList/useAnnouncements.d.ts +5 -2
- package/lib/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/lib/FilteredActionList/useAnnouncements.js +112 -65
- package/lib/FormControl/FormControl.d.ts.map +1 -1
- package/lib/FormControl/FormControl.js +3 -12
- package/lib/Header/Header.d.ts.map +1 -1
- package/lib/Header/Header.js +64 -170
- package/lib/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib/InlineMessage/InlineMessage.d.ts.map +1 -1
- package/lib/InlineMessage/InlineMessage.js +31 -69
- package/lib/Label/Label.d.ts.map +1 -1
- package/lib/Label/Label.js +10 -8
- package/lib/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/lib/LabelGroup/LabelGroup.js +13 -16
- package/lib/NavList/NavList.js +219 -53
- package/lib/Overlay/Overlay-40e80d0e.css +2 -0
- package/lib/Overlay/Overlay-40e80d0e.css.map +1 -0
- package/lib/Overlay/Overlay.module.css.js +1 -1
- package/lib/PageHeader/PageHeader.d.ts.map +1 -1
- package/lib/PageHeader/PageHeader.js +21 -30
- package/lib/PageLayout/PageLayout.d.ts.map +1 -1
- package/lib/PageLayout/PageLayout.js +466 -476
- package/lib/Pagehead/Pagehead.d.ts +1 -1
- package/lib/Pagehead/Pagehead.d.ts.map +1 -1
- package/lib/Pagehead/Pagehead.js +2 -11
- package/lib/PointerBox/PointerBox.d.ts +9 -1
- package/lib/PointerBox/PointerBox.d.ts.map +1 -1
- package/lib/PointerBox/PointerBox.js +5 -1
- package/lib/Popover/Popover-b609f443.css +2 -0
- package/lib/Popover/Popover-b609f443.css.map +1 -0
- package/lib/Popover/Popover.d.ts +5 -0
- package/lib/Popover/Popover.d.ts.map +1 -1
- package/lib/Popover/Popover.js +40 -21
- package/lib/Popover/Popover.module.css.js +1 -1
- package/lib/Portal/Portal.d.ts.map +1 -1
- package/lib/Portal/Portal.js +1 -0
- package/lib/ProgressBar/ProgressBar-36f689cb.css +2 -0
- package/lib/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/ProgressBar/ProgressBar.js +53 -49
- package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib/ProgressBar/index.d.ts +2 -2
- package/lib/ProgressBar/index.d.ts.map +1 -1
- package/lib/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib/Radio/Radio.d.ts.map +1 -1
- package/lib/Radio/Radio.js +40 -91
- package/lib/Radio/Radio.module.css.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControl.js +23 -25
- package/lib/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlButton.js +70 -72
- package/lib/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlIconButton.js +110 -112
- package/lib/Select/Select.d.ts +1 -1
- package/lib/Select/Select.d.ts.map +1 -1
- package/lib/Select/Select.js +79 -83
- package/lib/SelectPanel/SelectPanel-e11ce210.css +2 -0
- package/lib/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib/SelectPanel/SelectPanel.d.ts +8 -4
- package/lib/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/lib/SelectPanel/SelectPanel.js +66 -29
- package/lib/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib/SelectPanel/SelectPanelMessage.d.ts +13 -0
- package/lib/SelectPanel/SelectPanelMessage.d.ts.map +1 -1
- package/lib/SelectPanel/SelectPanelMessage.js +10 -4
- package/lib/SelectPanel/index.d.ts +1 -0
- package/lib/SelectPanel/index.d.ts.map +1 -1
- package/lib/SideNav.d.ts +2 -3
- package/lib/SideNav.d.ts.map +1 -1
- package/lib/SideNav.js +4 -11
- package/lib/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib/Skeleton/SkeletonBox.d.ts.map +1 -1
- package/lib/Skeleton/SkeletonBox.js +25 -24
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css +2 -0
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts +12 -0
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts.map +1 -0
- package/lib/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.js +5 -5
- package/lib/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.module.css.js +1 -1
- package/lib/SkeletonAvatar/index.d.ts +3 -0
- package/lib/SkeletonAvatar/index.d.ts.map +1 -0
- package/lib/SkeletonText/SkeletonText-5cf908c1.css +2 -0
- package/lib/SkeletonText/SkeletonText-5cf908c1.css.map +1 -0
- package/lib/{experimental/Skeleton → SkeletonText}/SkeletonText.d.ts +5 -4
- package/lib/SkeletonText/SkeletonText.d.ts.map +1 -0
- package/lib/SkeletonText/SkeletonText.js +142 -0
- package/lib/SkeletonText/SkeletonText.module.css.js +7 -0
- package/lib/SkeletonText/index.d.ts +3 -0
- package/lib/SkeletonText/index.d.ts.map +1 -0
- package/lib/Spinner/Spinner.d.ts +1 -1
- package/lib/Spinner/Spinner.d.ts.map +1 -1
- package/lib/Spinner/Spinner.js +13 -51
- package/lib/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/lib/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/{lib-esm/Stack/Stack-83ac2229.css → lib/Stack/Stack-9e7b935d.css} +2 -2
- package/lib/Stack/Stack-9e7b935d.css.map +1 -0
- package/lib/Stack/Stack.d.ts +5 -0
- package/lib/Stack/Stack.d.ts.map +1 -1
- package/lib/Stack/Stack.js +125 -112
- package/lib/Stack/Stack.module.css.js +1 -1
- package/lib/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib/StateLabel/StateLabel.d.ts +7 -7
- package/lib/StateLabel/StateLabel.d.ts.map +1 -1
- package/lib/StateLabel/StateLabel.js +56 -130
- package/lib/StateLabel/StateLabel.module.css.js +7 -0
- package/lib/SubNav/SubNav.d.ts +8 -16
- package/lib/SubNav/SubNav.d.ts.map +1 -1
- package/lib/SubNav/SubNav.js +74 -215
- package/lib/TabNav/TabNav-83c6145e.css +2 -0
- package/lib/TabNav/TabNav-83c6145e.css.map +1 -0
- package/lib/TabNav/TabNav.module.css.js +1 -1
- package/lib/Text/Text.d.ts.map +1 -1
- package/lib/Text/Text.js +2 -3
- package/lib/TextInput/TextInput.d.ts +1 -1
- package/lib/TextInput/TextInput.d.ts.map +1 -1
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/lib/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib/Textarea/Textarea.d.ts +24 -0
- package/lib/Textarea/Textarea.d.ts.map +1 -1
- package/lib/Textarea/Textarea.js +72 -44
- package/lib/Timeline/Timeline.d.ts +1 -1
- package/lib/Timeline/Timeline.d.ts.map +1 -1
- package/lib/Timeline/Timeline.js +92 -264
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib/ToggleSwitch/ToggleSwitch.d.ts +14 -5
- package/lib/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +263 -275
- package/lib/ToggleSwitch/ToggleSwitch.module.css.js +7 -0
- package/lib/ToggleSwitch/ToggleSwitchStoryWrapper.d.ts.map +1 -1
- package/lib/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib/Token/IssueLabelToken.d.ts.map +1 -1
- package/lib/Token/IssueLabelToken.js +7 -65
- package/lib/Token/IssueLabelToken.module.css.js +1 -1
- package/lib/Token/Token.d.ts.map +1 -1
- package/lib/Token/Token.js +120 -128
- package/lib/Token/TokenBase.js +78 -83
- package/lib/Token/_RemoveTokenButton.js +106 -26
- package/lib/Token/index.d.ts +0 -1
- package/lib/Token/index.d.ts.map +1 -1
- package/lib/Tooltip/Tooltip.js +15 -17
- package/lib/TooltipV2/Tooltip-5a80d7b2.css +2 -0
- package/lib/TooltipV2/Tooltip-5a80d7b2.css.map +1 -0
- package/lib/TooltipV2/Tooltip.d.ts.map +1 -1
- package/lib/TooltipV2/Tooltip.js +3 -3
- package/lib/TooltipV2/Tooltip.module.css.js +1 -1
- package/lib/TreeView/TreeView.js +20 -22
- package/lib/TreeView/shared.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.d.ts +2 -3
- package/lib/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.js +17 -51
- package/lib/_VisuallyHidden-5c0a2499.css +2 -0
- package/lib/_VisuallyHidden-5c0a2499.css.map +1 -0
- package/lib/_VisuallyHidden.d.ts +3 -2
- package/lib/_VisuallyHidden.d.ts.map +1 -1
- package/lib/_VisuallyHidden.js +63 -26
- package/lib/_VisuallyHidden.module.css.js +7 -0
- package/lib/deprecated/ActionList/List.d.ts.map +1 -1
- package/lib/deprecated/ActionList/List.js +115 -138
- package/lib/deprecated/ActionMenu.js +19 -21
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/lib/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib/deprecated/index.d.ts +2 -0
- package/lib/deprecated/index.d.ts.map +1 -1
- package/lib/deprecated/index.js +2 -0
- package/lib/experimental/IssueLabel/IssueLabel-6581d1bd.css +2 -0
- package/lib/experimental/IssueLabel/IssueLabel-6581d1bd.css.map +1 -0
- package/lib/experimental/IssueLabel/IssueLabel.d.ts +28 -13
- package/lib/experimental/IssueLabel/IssueLabel.d.ts.map +1 -1
- package/lib/experimental/IssueLabel/IssueLabel.js +129 -135
- package/lib/experimental/IssueLabel/IssueLabel.module.css.js +1 -1
- package/lib/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/lib/experimental/UnderlinePanels/UnderlinePanels.js +30 -40
- package/lib/experimental/index.d.ts +6 -1
- package/lib/experimental/index.d.ts.map +1 -1
- package/lib/experimental/index.js +4 -4
- package/lib/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib/hooks/useMnemonics.js +37 -77
- package/lib/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib/hooks/useOverflow.js +7 -11
- package/lib/hooks/useScrollFlash.js +25 -14
- package/lib/index.d.ts +6 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -16
- package/lib/internal/components/BoxWithFallback.js +40 -35
- package/lib/internal/components/ButtonReset-904f2483.css +2 -0
- package/lib/internal/components/ButtonReset-904f2483.css.map +1 -0
- package/lib/internal/components/ButtonReset.d.ts +1 -2
- package/lib/internal/components/ButtonReset.d.ts.map +1 -1
- package/lib/internal/components/ButtonReset.js +49 -13
- package/lib/internal/components/ButtonReset.module.css.js +7 -0
- package/lib/internal/components/Caret-e686f04c.css +2 -0
- package/lib/internal/components/Caret-e686f04c.css.map +1 -0
- package/{lib-esm → lib/internal/components}/Caret.d.ts +1 -3
- package/lib/internal/components/Caret.d.ts.map +1 -0
- package/lib/{Caret.js → internal/components/Caret.js} +14 -48
- package/lib/internal/components/Caret.module.css.js +7 -0
- package/lib/internal/components/LiveRegion.js +8 -10
- package/lib/internal/components/{TextInputWrapper-ca608f70.css → TextInputWrapper-889df5d3.css} +2 -2
- package/{lib-esm/internal/components/TextInputWrapper-ca608f70.css.map → lib/internal/components/TextInputWrapper-889df5d3.css.map} +1 -1
- package/lib/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.js +60 -108
- package/lib/internal/utils/getGlobalFocusStyles.js +1 -1
- package/lib/live-region/Announce.js +2 -2
- package/lib/test-helpers.js +3 -0
- package/lib/utils/form-story-helpers.d.ts +1 -1
- package/lib/utils/form-story-helpers.d.ts.map +1 -1
- package/lib-esm/ActionList/ActionList-167cf6c7.css +2 -0
- package/lib-esm/ActionList/ActionList-167cf6c7.css.map +1 -0
- package/lib-esm/ActionList/ActionList.module.css.js +2 -2
- package/lib-esm/ActionList/ActionListContainerContext.d.ts +1 -1
- package/lib-esm/ActionList/Description.js +1 -2
- package/lib-esm/ActionList/Divider.js +1 -2
- package/lib-esm/ActionList/Group.js +1 -6
- package/lib-esm/ActionList/Item.js +6 -3
- package/lib-esm/ActionList/LinkItem.d.ts +1 -1
- package/lib-esm/ActionList/LinkItem.js +3 -2
- package/lib-esm/ActionList/List.js +3 -5
- package/lib-esm/ActionList/Selection.js +2 -1
- package/lib-esm/ActionList/Visuals.js +0 -7
- package/lib-esm/ActionList/shared.d.ts +2 -1
- package/lib-esm/Autocomplete/AutocompleteMenu.js +1 -1
- package/lib-esm/Avatar/Avatar.js +39 -41
- package/lib-esm/AvatarStack/AvatarStack-802bdd7c.css +2 -0
- package/lib-esm/AvatarStack/AvatarStack-802bdd7c.css.map +1 -0
- package/lib-esm/AvatarStack/AvatarStack.d.ts +4 -3
- package/lib-esm/AvatarStack/AvatarStack.js +10 -6
- package/lib-esm/AvatarStack/AvatarStack.module.css.js +1 -1
- package/lib-esm/Banner/Banner-6396546f.css +2 -0
- package/lib-esm/Banner/Banner-6396546f.css.map +1 -0
- package/lib-esm/Banner/Banner.js +3 -1
- package/lib-esm/Banner/Banner.module.css.js +2 -2
- package/lib-esm/{BaseStyles-7880c337.css → BaseStyles-79fd37c4.css} +2 -2
- package/lib-esm/BaseStyles-79fd37c4.css.map +1 -0
- package/lib-esm/BaseStyles.module.css.js +1 -1
- package/lib-esm/Blankslate/{Blankslate-a68ed307.css → Blankslate-2be5efdc.css} +2 -2
- package/lib-esm/Blankslate/Blankslate-2be5efdc.css.map +1 -0
- package/lib-esm/Blankslate/Blankslate.js +38 -40
- package/lib-esm/Blankslate/Blankslate.module.css.js +1 -1
- package/lib-esm/BranchName/BranchName.d.ts +6 -3
- package/lib-esm/BranchName/BranchName.js +1 -3
- package/lib-esm/Breadcrumbs/Breadcrumbs.js +5 -5
- package/lib-esm/Button/{ButtonBase-ec78dde7.css → ButtonBase-0a7871f4.css} +2 -2
- package/lib-esm/Button/{ButtonBase-ec78dde7.css.map → ButtonBase-0a7871f4.css.map} +1 -1
- package/lib-esm/Button/ButtonBase.js +2 -2
- package/lib-esm/Button/ButtonBase.module.css.js +1 -1
- package/lib-esm/ButtonGroup/ButtonGroup.js +24 -61
- package/lib-esm/Checkbox/Checkbox.js +187 -56
- package/lib-esm/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib-esm/CircleBadge/CircleBadge.js +4 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib-esm/CounterLabel/CounterLabel.js +43 -87
- package/lib-esm/DataTable/Pagination-b6f8418c.css +2 -0
- package/lib-esm/DataTable/Pagination-b6f8418c.css.map +1 -0
- package/lib-esm/DataTable/Pagination.js +81 -84
- package/lib-esm/DataTable/Pagination.module.css.js +5 -0
- package/lib-esm/DataTable/Table.d.ts +1 -1
- package/lib-esm/DataTable/Table.js +18 -26
- package/lib-esm/DataTable/storyHelpers.d.ts +1 -1
- package/lib-esm/DataTable/useTable.js +64 -83
- package/lib-esm/Details/Details.d.ts +2 -3
- package/lib-esm/Details/Details.js +33 -82
- package/lib-esm/FeatureFlags/DefaultFeatureFlags.js +2 -3
- package/lib-esm/FeatureFlags/FeatureFlags.js +10 -12
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib-esm/FilteredActionList/{FilteredActionListWithModernActionList.d.ts → FilteredActionList.d.ts} +9 -4
- package/lib-esm/FilteredActionList/{FilteredActionListWithModernActionList.js → FilteredActionList.js} +156 -42
- package/lib-esm/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib-esm/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib-esm/FilteredActionList/index.d.ts +3 -2
- package/lib-esm/FilteredActionList/types.d.ts +159 -0
- package/lib-esm/FilteredActionList/useAnnouncements.d.ts +5 -2
- package/lib-esm/FilteredActionList/useAnnouncements.js +112 -65
- package/lib-esm/FormControl/FormControl.js +3 -12
- package/lib-esm/Header/Header.js +64 -170
- package/lib-esm/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib-esm/InlineMessage/InlineMessage.js +31 -69
- package/lib-esm/Label/Label.js +10 -8
- package/lib-esm/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib-esm/LabelGroup/LabelGroup.js +13 -16
- package/lib-esm/NavList/NavList.js +219 -53
- package/lib-esm/Overlay/Overlay-40e80d0e.css +2 -0
- package/lib-esm/Overlay/Overlay-40e80d0e.css.map +1 -0
- package/lib-esm/Overlay/Overlay.module.css.js +1 -1
- package/lib-esm/PageHeader/PageHeader.js +21 -30
- package/lib-esm/PageLayout/PageLayout.js +466 -476
- package/lib-esm/Pagehead/Pagehead.d.ts +1 -1
- package/lib-esm/Pagehead/Pagehead.js +2 -11
- package/lib-esm/PointerBox/PointerBox.d.ts +9 -1
- package/lib-esm/PointerBox/PointerBox.js +5 -1
- package/lib-esm/Popover/Popover-b609f443.css +2 -0
- package/lib-esm/Popover/Popover-b609f443.css.map +1 -0
- package/lib-esm/Popover/Popover.d.ts +5 -0
- package/lib-esm/Popover/Popover.js +40 -21
- package/lib-esm/Popover/Popover.module.css.js +1 -1
- package/lib-esm/Portal/Portal.js +1 -0
- package/lib-esm/ProgressBar/ProgressBar-36f689cb.css +2 -0
- package/lib-esm/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib-esm/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib-esm/ProgressBar/ProgressBar.js +53 -49
- package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib-esm/ProgressBar/index.d.ts +2 -2
- package/lib-esm/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib-esm/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib-esm/Radio/Radio.js +40 -91
- package/lib-esm/Radio/Radio.module.css.js +1 -1
- package/lib-esm/SegmentedControl/SegmentedControl.js +23 -25
- package/lib-esm/SegmentedControl/SegmentedControlButton.js +70 -72
- package/lib-esm/SegmentedControl/SegmentedControlIconButton.js +110 -112
- package/lib-esm/Select/Select.d.ts +1 -1
- package/lib-esm/Select/Select.js +79 -83
- package/lib-esm/SelectPanel/SelectPanel-e11ce210.css +2 -0
- package/lib-esm/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib-esm/SelectPanel/SelectPanel.d.ts +8 -4
- package/lib-esm/SelectPanel/SelectPanel.js +64 -27
- package/lib-esm/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib-esm/SelectPanel/SelectPanelMessage.d.ts +13 -0
- package/lib-esm/SelectPanel/SelectPanelMessage.js +10 -4
- package/lib-esm/SelectPanel/index.d.ts +1 -0
- package/lib-esm/SideNav.d.ts +2 -3
- package/lib-esm/SideNav.js +4 -11
- package/lib-esm/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib-esm/Skeleton/SkeletonBox.js +25 -24
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css +2 -0
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.d.ts +12 -0
- package/lib-esm/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.js +5 -5
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.module.css.js +5 -0
- package/lib-esm/SkeletonAvatar/index.d.ts +3 -0
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css +2 -0
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css.map +1 -0
- package/lib-esm/{experimental/Skeleton → SkeletonText}/SkeletonText.d.ts +5 -4
- package/lib-esm/SkeletonText/SkeletonText.js +140 -0
- package/lib-esm/SkeletonText/SkeletonText.module.css.js +5 -0
- package/lib-esm/SkeletonText/index.d.ts +3 -0
- package/lib-esm/Spinner/Spinner.d.ts +1 -1
- package/lib-esm/Spinner/Spinner.js +13 -47
- package/lib-esm/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/{lib/Stack/Stack-83ac2229.css → lib-esm/Stack/Stack-9e7b935d.css} +2 -2
- package/lib-esm/Stack/Stack-9e7b935d.css.map +1 -0
- package/lib-esm/Stack/Stack.d.ts +5 -0
- package/lib-esm/Stack/Stack.js +125 -112
- package/lib-esm/Stack/Stack.module.css.js +1 -1
- package/lib-esm/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib-esm/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib-esm/StateLabel/StateLabel.d.ts +7 -7
- package/lib-esm/StateLabel/StateLabel.js +57 -127
- package/lib-esm/StateLabel/StateLabel.module.css.js +5 -0
- package/lib-esm/SubNav/SubNav.d.ts +8 -16
- package/lib-esm/SubNav/SubNav.js +74 -215
- package/lib-esm/TabNav/TabNav-83c6145e.css +2 -0
- package/lib-esm/TabNav/TabNav-83c6145e.css.map +1 -0
- package/lib-esm/TabNav/TabNav.module.css.js +1 -1
- package/lib-esm/Text/Text.js +2 -3
- package/lib-esm/TextInput/TextInput.d.ts +1 -1
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib-esm/Textarea/Textarea.d.ts +24 -0
- package/lib-esm/Textarea/Textarea.js +72 -44
- package/lib-esm/Timeline/Timeline.d.ts +1 -1
- package/lib-esm/Timeline/Timeline.js +92 -264
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch.d.ts +14 -5
- package/lib-esm/ToggleSwitch/ToggleSwitch.js +263 -274
- package/lib-esm/ToggleSwitch/ToggleSwitch.module.css.js +5 -0
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib-esm/Token/IssueLabelToken.js +7 -65
- package/lib-esm/Token/IssueLabelToken.module.css.js +1 -1
- package/lib-esm/Token/Token.js +120 -128
- package/lib-esm/Token/TokenBase.js +78 -83
- package/lib-esm/Token/_RemoveTokenButton.js +106 -26
- package/lib-esm/Token/index.d.ts +0 -1
- package/lib-esm/Tooltip/Tooltip.js +15 -17
- package/lib-esm/TooltipV2/Tooltip-5a80d7b2.css +2 -0
- package/lib-esm/TooltipV2/Tooltip-5a80d7b2.css.map +1 -0
- package/lib-esm/TooltipV2/Tooltip.js +3 -3
- package/lib-esm/TooltipV2/Tooltip.module.css.js +1 -1
- package/lib-esm/TreeView/TreeView.js +20 -22
- package/lib-esm/TreeView/shared.js +2 -2
- package/lib-esm/VisuallyHidden/VisuallyHidden.d.ts +2 -3
- package/lib-esm/VisuallyHidden/VisuallyHidden.js +17 -51
- package/lib-esm/_VisuallyHidden-5c0a2499.css +2 -0
- package/lib-esm/_VisuallyHidden-5c0a2499.css.map +1 -0
- package/lib-esm/_VisuallyHidden.d.ts +3 -2
- package/lib-esm/_VisuallyHidden.js +63 -22
- package/lib-esm/_VisuallyHidden.module.css.js +5 -0
- package/lib-esm/deprecated/ActionList/List.js +116 -138
- package/lib-esm/deprecated/ActionMenu.js +19 -21
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib-esm/deprecated/index.d.ts +2 -0
- package/lib-esm/deprecated/index.js +1 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel-6581d1bd.css +2 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel-6581d1bd.css.map +1 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel.d.ts +28 -13
- package/lib-esm/experimental/IssueLabel/IssueLabel.js +129 -135
- package/lib-esm/experimental/IssueLabel/IssueLabel.module.css.js +1 -1
- package/lib-esm/experimental/UnderlinePanels/UnderlinePanels.js +30 -40
- package/lib-esm/experimental/index.d.ts +6 -1
- package/lib-esm/experimental/index.js +3 -3
- package/lib-esm/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib-esm/hooks/useMnemonics.js +37 -77
- package/lib-esm/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib-esm/hooks/useOverflow.js +7 -11
- package/lib-esm/hooks/useScrollFlash.js +25 -14
- package/lib-esm/index.d.ts +6 -9
- package/lib-esm/index.js +1 -4
- package/lib-esm/internal/components/BoxWithFallback.js +40 -35
- package/lib-esm/internal/components/ButtonReset-904f2483.css +2 -0
- package/lib-esm/internal/components/ButtonReset-904f2483.css.map +1 -0
- package/lib-esm/internal/components/ButtonReset.d.ts +1 -2
- package/lib-esm/internal/components/ButtonReset.js +49 -9
- package/lib-esm/internal/components/ButtonReset.module.css.js +5 -0
- package/lib-esm/internal/components/Caret-e686f04c.css +2 -0
- package/lib-esm/internal/components/Caret-e686f04c.css.map +1 -0
- package/{lib → lib-esm/internal/components}/Caret.d.ts +1 -3
- package/lib-esm/{Caret.js → internal/components/Caret.js} +14 -44
- package/lib-esm/internal/components/Caret.module.css.js +5 -0
- package/lib-esm/internal/components/LiveRegion.js +8 -10
- package/lib-esm/internal/components/{TextInputWrapper-ca608f70.css → TextInputWrapper-889df5d3.css} +2 -2
- package/{lib/internal/components/TextInputWrapper-ca608f70.css.map → lib-esm/internal/components/TextInputWrapper-889df5d3.css.map} +1 -1
- package/lib-esm/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib-esm/internal/components/UnderlineTabbedInterface.js +60 -108
- package/lib-esm/internal/utils/getGlobalFocusStyles.js +1 -1
- package/lib-esm/live-region/Announce.js +2 -2
- package/lib-esm/test-helpers.js +3 -0
- package/lib-esm/utils/form-story-helpers.d.ts +1 -1
- package/package.json +31 -34
- package/lib/ActionList/ActionList-49cba224.css +0 -2
- package/lib/ActionList/ActionList-49cba224.css.map +0 -1
- package/lib/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib/AvatarPair/AvatarPair.d.ts +0 -8
- package/lib/AvatarPair/AvatarPair.d.ts.map +0 -1
- package/lib/AvatarPair/AvatarPair.js +0 -92
- package/lib/AvatarPair/AvatarPair.module.css.js +0 -7
- package/lib/AvatarPair/index.d.ts +0 -3
- package/lib/AvatarPair/index.d.ts.map +0 -1
- package/lib/AvatarStack/AvatarStack-f0712fca.css +0 -2
- package/lib/AvatarStack/AvatarStack-f0712fca.css.map +0 -1
- package/lib/Banner/Banner-43e2cd6a.css +0 -2
- package/lib/Banner/Banner-43e2cd6a.css.map +0 -1
- package/lib/BaseStyles-7880c337.css.map +0 -1
- package/lib/Blankslate/Blankslate-a68ed307.css.map +0 -1
- package/lib/Caret.d.ts.map +0 -1
- package/lib/CircleOcticon/CircleOcticon.d.ts +0 -13
- package/lib/CircleOcticon/CircleOcticon.d.ts.map +0 -1
- package/lib/CircleOcticon/CircleOcticon.js +0 -96
- package/lib/CircleOcticon/index.d.ts +0 -3
- package/lib/CircleOcticon/index.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionList-e1dde781.css +0 -2
- package/lib/FilteredActionList/FilteredActionList-e1dde781.css.map +0 -1
- package/lib/FilteredActionList/FilteredActionListEntry.d.ts +0 -7
- package/lib/FilteredActionList/FilteredActionListEntry.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionListEntry.js +0 -40
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts +0 -23
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.js +0 -219
- package/lib/FilteredActionList/FilteredActionListWithModernActionList.d.ts.map +0 -1
- package/lib/Overlay/Overlay-aeb12fc3.css +0 -2
- package/lib/Overlay/Overlay-aeb12fc3.css.map +0 -1
- package/lib/Popover/Popover-e16fd997.css +0 -2
- package/lib/Popover/Popover-e16fd997.css.map +0 -1
- package/lib/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib/SelectPanel/SelectPanel-bfde365c.css +0 -2
- package/lib/SelectPanel/SelectPanel-bfde365c.css.map +0 -1
- package/lib/SelectPanel/types.d.ts +0 -4
- package/lib/SelectPanel/types.d.ts.map +0 -1
- package/lib/Stack/Stack-83ac2229.css.map +0 -1
- package/lib/TabNav/TabNav-9753d6ed.css +0 -2
- package/lib/TabNav/TabNav-9753d6ed.css.map +0 -1
- package/lib/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib/Token/AvatarToken.d.ts +0 -8
- package/lib/Token/AvatarToken.d.ts.map +0 -1
- package/lib/Token/AvatarToken.js +0 -99
- package/lib/Token/AvatarToken.module.css.js +0 -7
- package/lib/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib/Token/IssueLabelToken-99c9b914.css.map +0 -1
- package/lib/TooltipV2/Tooltip-59734b6f.css +0 -2
- package/lib/TooltipV2/Tooltip-59734b6f.css.map +0 -1
- package/lib/experimental/IssueLabel/IssueLabel-5507fbf3.css +0 -2
- package/lib/experimental/IssueLabel/IssueLabel-5507fbf3.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css +0 -2
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts +0 -8
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css +0 -2
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText.d.ts.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText.js +0 -149
- package/lib/experimental/Skeleton/SkeletonText.module.css.js +0 -7
- package/lib/experimental/Skeleton/index.d.ts +0 -4
- package/lib/experimental/Skeleton/index.d.ts.map +0 -1
- package/lib/internal/utils/toggleStyledComponent.d.ts +0 -20
- package/lib/internal/utils/toggleStyledComponent.d.ts.map +0 -1
- package/lib/internal/utils/toggleSxComponent.d.ts +0 -15
- package/lib/internal/utils/toggleSxComponent.d.ts.map +0 -1
- package/lib/internal/utils/toggleSxComponent.js +0 -83
- package/lib/node_modules/@github/mini-throttle/dist/index.js +0 -43
- package/lib-esm/ActionList/ActionList-49cba224.css +0 -2
- package/lib-esm/ActionList/ActionList-49cba224.css.map +0 -1
- package/lib-esm/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib-esm/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib-esm/AvatarPair/AvatarPair.d.ts +0 -8
- package/lib-esm/AvatarPair/AvatarPair.js +0 -86
- package/lib-esm/AvatarPair/AvatarPair.module.css.js +0 -5
- package/lib-esm/AvatarPair/index.d.ts +0 -3
- package/lib-esm/AvatarStack/AvatarStack-f0712fca.css +0 -2
- package/lib-esm/AvatarStack/AvatarStack-f0712fca.css.map +0 -1
- package/lib-esm/Banner/Banner-43e2cd6a.css +0 -2
- package/lib-esm/Banner/Banner-43e2cd6a.css.map +0 -1
- package/lib-esm/BaseStyles-7880c337.css.map +0 -1
- package/lib-esm/Blankslate/Blankslate-a68ed307.css.map +0 -1
- package/lib-esm/CircleOcticon/CircleOcticon.d.ts +0 -13
- package/lib-esm/CircleOcticon/CircleOcticon.js +0 -94
- package/lib-esm/CircleOcticon/index.d.ts +0 -3
- package/lib-esm/FilteredActionList/FilteredActionList-e1dde781.css +0 -2
- package/lib-esm/FilteredActionList/FilteredActionList-e1dde781.css.map +0 -1
- package/lib-esm/FilteredActionList/FilteredActionListEntry.d.ts +0 -7
- package/lib-esm/FilteredActionList/FilteredActionListEntry.js +0 -38
- package/lib-esm/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts +0 -23
- package/lib-esm/FilteredActionList/FilteredActionListWithDeprecatedActionList.js +0 -213
- package/lib-esm/Overlay/Overlay-aeb12fc3.css +0 -2
- package/lib-esm/Overlay/Overlay-aeb12fc3.css.map +0 -1
- package/lib-esm/Popover/Popover-e16fd997.css +0 -2
- package/lib-esm/Popover/Popover-e16fd997.css.map +0 -1
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib-esm/SelectPanel/SelectPanel-bfde365c.css +0 -2
- package/lib-esm/SelectPanel/SelectPanel-bfde365c.css.map +0 -1
- package/lib-esm/SelectPanel/types.d.ts +0 -4
- package/lib-esm/Stack/Stack-83ac2229.css.map +0 -1
- package/lib-esm/TabNav/TabNav-9753d6ed.css +0 -2
- package/lib-esm/TabNav/TabNav-9753d6ed.css.map +0 -1
- package/lib-esm/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib-esm/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib-esm/Token/AvatarToken.d.ts +0 -8
- package/lib-esm/Token/AvatarToken.js +0 -97
- package/lib-esm/Token/AvatarToken.module.css.js +0 -5
- package/lib-esm/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib-esm/Token/IssueLabelToken-99c9b914.css.map +0 -1
- package/lib-esm/TooltipV2/Tooltip-59734b6f.css +0 -2
- package/lib-esm/TooltipV2/Tooltip-59734b6f.css.map +0 -1
- package/lib-esm/experimental/IssueLabel/IssueLabel-5507fbf3.css +0 -2
- package/lib-esm/experimental/IssueLabel/IssueLabel-5507fbf3.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css +0 -2
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.d.ts +0 -8
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.module.css.js +0 -5
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css +0 -2
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonText.js +0 -143
- package/lib-esm/experimental/Skeleton/SkeletonText.module.css.js +0 -5
- package/lib-esm/experimental/Skeleton/index.d.ts +0 -4
- package/lib-esm/internal/utils/toggleStyledComponent.d.ts +0 -20
- package/lib-esm/internal/utils/toggleSxComponent.d.ts +0 -15
- package/lib-esm/internal/utils/toggleSxComponent.js +0 -77
- package/lib-esm/node_modules/@github/mini-throttle/dist/index.js +0 -40
|
@@ -7,14 +7,13 @@ require('../../node_modules/@github/tab-container-element/dist/tab-container-ele
|
|
|
7
7
|
var createComponent = require('../../utils/create-component.js');
|
|
8
8
|
var UnderlineTabbedInterface = require('../../internal/components/UnderlineTabbedInterface.js');
|
|
9
9
|
var invariant = require('../../utils/invariant.js');
|
|
10
|
-
var defaultSxProp = require('../../utils/defaultSxProp.js');
|
|
11
10
|
var useResizeObserver = require('../../hooks/useResizeObserver.js');
|
|
12
11
|
var useIsomorphicLayoutEffect = require('../../utils/useIsomorphicLayoutEffect.js');
|
|
13
12
|
var UnderlinePanels_module = require('./UnderlinePanels.module.css.js');
|
|
14
13
|
var clsx = require('clsx');
|
|
14
|
+
var BoxWithFallback = require('../../internal/components/BoxWithFallback.js');
|
|
15
15
|
var jsxRuntime = require('react/jsx-runtime');
|
|
16
16
|
var useId = require('../../hooks/useId.js');
|
|
17
|
-
var Box = require('../../Box/Box.js');
|
|
18
17
|
|
|
19
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
19
|
|
|
@@ -26,7 +25,6 @@ const UnderlinePanels = ({
|
|
|
26
25
|
'aria-labelledby': ariaLabelledBy,
|
|
27
26
|
children,
|
|
28
27
|
loadingCounters,
|
|
29
|
-
sx: sxProp = defaultSxProp.defaultSxProp,
|
|
30
28
|
className,
|
|
31
29
|
...props
|
|
32
30
|
}) => {
|
|
@@ -101,7 +99,6 @@ const UnderlinePanels = ({
|
|
|
101
99
|
ref: wrapperRef,
|
|
102
100
|
slot: "tablist-wrapper",
|
|
103
101
|
"data-icons-visible": iconsVisible,
|
|
104
|
-
sx: sxProp,
|
|
105
102
|
className: clsx.clsx(className, UnderlinePanels_module.StyledUnderlineWrapper),
|
|
106
103
|
...props,
|
|
107
104
|
children: /*#__PURE__*/jsxRuntime.jsx(UnderlineTabbedInterface.UnderlineItemList, {
|
|
@@ -116,15 +113,13 @@ const UnderlinePanels = ({
|
|
|
116
113
|
};
|
|
117
114
|
UnderlinePanels.displayName = "UnderlinePanels";
|
|
118
115
|
const Tab = t0 => {
|
|
119
|
-
const $ = reactCompilerRuntime.c(
|
|
116
|
+
const $ = reactCompilerRuntime.c(14);
|
|
120
117
|
let ariaSelected;
|
|
121
118
|
let onSelect;
|
|
122
119
|
let props;
|
|
123
|
-
let t1;
|
|
124
120
|
if ($[0] !== t0) {
|
|
125
121
|
({
|
|
126
122
|
"aria-selected": ariaSelected,
|
|
127
|
-
sx: t1,
|
|
128
123
|
onSelect,
|
|
129
124
|
...props
|
|
130
125
|
} = t0);
|
|
@@ -132,72 +127,67 @@ const Tab = t0 => {
|
|
|
132
127
|
$[1] = ariaSelected;
|
|
133
128
|
$[2] = onSelect;
|
|
134
129
|
$[3] = props;
|
|
135
|
-
$[4] = t1;
|
|
136
130
|
} else {
|
|
137
131
|
ariaSelected = $[1];
|
|
138
132
|
onSelect = $[2];
|
|
139
133
|
props = $[3];
|
|
140
|
-
t1 = $[4];
|
|
141
134
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
t2 = event => {
|
|
135
|
+
let t1;
|
|
136
|
+
if ($[4] !== onSelect) {
|
|
137
|
+
t1 = event => {
|
|
146
138
|
if (!event.defaultPrevented && typeof onSelect === "function") {
|
|
147
139
|
onSelect(event);
|
|
148
140
|
}
|
|
149
141
|
};
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
142
|
+
$[4] = onSelect;
|
|
143
|
+
$[5] = t1;
|
|
152
144
|
} else {
|
|
153
|
-
|
|
145
|
+
t1 = $[5];
|
|
154
146
|
}
|
|
155
|
-
const clickHandler =
|
|
156
|
-
let
|
|
157
|
-
if ($[
|
|
158
|
-
|
|
147
|
+
const clickHandler = t1;
|
|
148
|
+
let t2;
|
|
149
|
+
if ($[6] !== onSelect) {
|
|
150
|
+
t2 = event_0 => {
|
|
159
151
|
if ((event_0.key === " " || event_0.key === "Enter") && !event_0.defaultPrevented && typeof onSelect === "function") {
|
|
160
152
|
onSelect(event_0);
|
|
161
153
|
}
|
|
162
154
|
};
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
155
|
+
$[6] = onSelect;
|
|
156
|
+
$[7] = t2;
|
|
165
157
|
} else {
|
|
166
|
-
|
|
158
|
+
t2 = $[7];
|
|
167
159
|
}
|
|
168
|
-
const keyDownHandler =
|
|
169
|
-
const
|
|
170
|
-
let
|
|
171
|
-
if ($[
|
|
172
|
-
|
|
160
|
+
const keyDownHandler = t2;
|
|
161
|
+
const t3 = ariaSelected ? 0 : -1;
|
|
162
|
+
let t4;
|
|
163
|
+
if ($[8] !== ariaSelected || $[9] !== clickHandler || $[10] !== keyDownHandler || $[11] !== props || $[12] !== t3) {
|
|
164
|
+
t4 = /*#__PURE__*/jsxRuntime.jsx(UnderlineTabbedInterface.UnderlineItem, {
|
|
173
165
|
as: "button",
|
|
174
166
|
role: "tab",
|
|
175
|
-
tabIndex:
|
|
167
|
+
tabIndex: t3,
|
|
176
168
|
"aria-selected": ariaSelected,
|
|
177
|
-
sx: sxProp,
|
|
178
169
|
type: "button",
|
|
179
170
|
onClick: clickHandler,
|
|
180
171
|
onKeyDown: keyDownHandler,
|
|
181
172
|
...props
|
|
182
173
|
});
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[15] = t5;
|
|
174
|
+
$[8] = ariaSelected;
|
|
175
|
+
$[9] = clickHandler;
|
|
176
|
+
$[10] = keyDownHandler;
|
|
177
|
+
$[11] = props;
|
|
178
|
+
$[12] = t3;
|
|
179
|
+
$[13] = t4;
|
|
190
180
|
} else {
|
|
191
|
-
|
|
181
|
+
t4 = $[13];
|
|
192
182
|
}
|
|
193
|
-
return
|
|
183
|
+
return t4;
|
|
194
184
|
};
|
|
195
185
|
Tab.displayName = 'UnderlinePanels.Tab';
|
|
196
186
|
const Panel = props => {
|
|
197
187
|
const $ = reactCompilerRuntime.c(2);
|
|
198
188
|
let t0;
|
|
199
189
|
if ($[0] !== props) {
|
|
200
|
-
t0 = /*#__PURE__*/jsxRuntime.jsx(
|
|
190
|
+
t0 = /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
|
|
201
191
|
as: "div",
|
|
202
192
|
role: "tabpanel",
|
|
203
193
|
...props
|
|
@@ -33,7 +33,12 @@ export { Announce, AriaStatus, AriaAlert } from '../live-region';
|
|
|
33
33
|
export type { AnnounceProps, AriaStatusProps, AriaAlertProps } from '../live-region';
|
|
34
34
|
export { UnderlinePanels } from './UnderlinePanels';
|
|
35
35
|
export type { UnderlinePanelsProps, UnderlinePanelsTabProps, UnderlinePanelsPanelProps } from './UnderlinePanels';
|
|
36
|
-
export { SkeletonBox
|
|
36
|
+
export { SkeletonBox } from '../Skeleton';
|
|
37
|
+
export type { SkeletonBoxProps } from '../Skeleton';
|
|
38
|
+
export { SkeletonText } from '../SkeletonText';
|
|
39
|
+
export type { SkeletonTextProps } from '../SkeletonText';
|
|
40
|
+
export { SkeletonAvatar } from '../SkeletonAvatar';
|
|
41
|
+
export type { SkeletonAvatarProps } from '../SkeletonAvatar';
|
|
37
42
|
export { FeatureFlags, DefaultFeatureFlags, useFeatureFlag } from '../FeatureFlags';
|
|
38
43
|
export type { FeatureFlagsProps } from '../FeatureFlags';
|
|
39
44
|
export { FilteredActionList } from '../FilteredActionList';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experimental/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,YAAY,EAAC,eAAe,EAAC,MAAM,eAAe,CAAA;AAElD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAA;AACpC,YAAY,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,YAAY,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAA;AACjE,YAAY,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,cAAc,CAAA;AAErB,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAA;AAExD,cAAc,eAAe,CAAA;AAE7B,cAAc,WAAW,CAAA;AAEzB,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,YAAY,CAAA;AACnB,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA;AACpC,YAAY,EAAC,YAAY,EAAC,MAAM,cAAc,CAAA;AAC9C,cAAc,cAAc,CAAA;AAE5B,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AACpD,YAAY,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAA;AAE9D,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAA;AAC9B,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,UAAU,CAAA;AAExD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAC9D,YAAY,EAAC,aAAa,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElF,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,YAAY,EAAC,oBAAoB,EAAE,uBAAuB,EAAE,yBAAyB,EAAC,MAAM,mBAAmB,CAAA;AAE/G,OAAO,EAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experimental/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,YAAY,EAAC,eAAe,EAAC,MAAM,eAAe,CAAA;AAElD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAA;AACpC,YAAY,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,YAAY,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAA;AACjE,YAAY,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,cAAc,CAAA;AAErB,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAA;AAExD,cAAc,eAAe,CAAA;AAE7B,cAAc,WAAW,CAAA;AAEzB,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,YAAY,CAAA;AACnB,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA;AACpC,YAAY,EAAC,YAAY,EAAC,MAAM,cAAc,CAAA;AAC9C,cAAc,cAAc,CAAA;AAE5B,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AACpD,YAAY,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAA;AAE9D,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAA;AAC9B,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,UAAU,CAAA;AAExD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAC9D,YAAY,EAAC,aAAa,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElF,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,YAAY,EAAC,oBAAoB,EAAE,uBAAuB,EAAE,yBAAyB,EAAC,MAAM,mBAAmB,CAAA;AAE/G,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAA;AACvC,YAAY,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAA;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAA;AACjF,YAAY,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAA;AACxD,YAAY,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAEjD,cAAc,mBAAmB,CAAA"}
|
|
@@ -19,12 +19,12 @@ var AriaStatus = require('../live-region/AriaStatus.js');
|
|
|
19
19
|
var AriaAlert = require('../live-region/AriaAlert.js');
|
|
20
20
|
var UnderlinePanels = require('./UnderlinePanels/UnderlinePanels.js');
|
|
21
21
|
var SkeletonBox = require('../Skeleton/SkeletonBox.js');
|
|
22
|
-
var SkeletonText = require('
|
|
23
|
-
var SkeletonAvatar = require('
|
|
22
|
+
var SkeletonText = require('../SkeletonText/SkeletonText.js');
|
|
23
|
+
var SkeletonAvatar = require('../SkeletonAvatar/SkeletonAvatar.js');
|
|
24
24
|
var FeatureFlags = require('../FeatureFlags/FeatureFlags.js');
|
|
25
25
|
var DefaultFeatureFlags = require('../FeatureFlags/DefaultFeatureFlags.js');
|
|
26
26
|
var useFeatureFlag = require('../FeatureFlags/useFeatureFlag.js');
|
|
27
|
-
var
|
|
27
|
+
var FilteredActionList = require('../FilteredActionList/FilteredActionList.js');
|
|
28
28
|
var IssueLabel = require('./IssueLabel/IssueLabel.js');
|
|
29
29
|
var PageHeader = require('../PageHeader/PageHeader.js');
|
|
30
30
|
var Hidden = require('../Hidden/Hidden.js');
|
|
@@ -58,7 +58,7 @@ exports.SkeletonAvatar = SkeletonAvatar.SkeletonAvatar;
|
|
|
58
58
|
exports.FeatureFlags = FeatureFlags.FeatureFlags;
|
|
59
59
|
exports.DefaultFeatureFlags = DefaultFeatureFlags.DefaultFeatureFlags;
|
|
60
60
|
exports.useFeatureFlag = useFeatureFlag.useFeatureFlag;
|
|
61
|
-
exports.FilteredActionList =
|
|
61
|
+
exports.FilteredActionList = FilteredActionList.FilteredActionList;
|
|
62
62
|
exports.IssueLabel = IssueLabel.IssueLabel;
|
|
63
63
|
exports.PageHeader = PageHeader.PageHeader;
|
|
64
64
|
exports.Hidden = Hidden.Hidden;
|
|
@@ -31,9 +31,10 @@ const useMenuKeyboardNavigation = (open, onClose, containerRef, anchorRef, t0) =
|
|
|
31
31
|
* and the focus should naturally move to the next item
|
|
32
32
|
*/
|
|
33
33
|
const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
34
|
-
const $ = reactCompilerRuntime.c(
|
|
34
|
+
const $ = reactCompilerRuntime.c(6);
|
|
35
35
|
let t0;
|
|
36
|
-
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[0] !== anchorRef || $[1] !== containerRef || $[2] !== onClose || $[3] !== open) {
|
|
37
38
|
t0 = () => {
|
|
38
39
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
39
40
|
const anchor = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current;
|
|
@@ -49,24 +50,16 @@ const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
|
49
50
|
anchor === null || anchor === void 0 ? void 0 : anchor.removeEventListener("keydown", handler);
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
-
$[
|
|
53
|
+
t1 = [open, onClose, containerRef, anchorRef];
|
|
54
|
+
$[0] = anchorRef;
|
|
55
|
+
$[1] = containerRef;
|
|
54
56
|
$[2] = onClose;
|
|
55
57
|
$[3] = open;
|
|
56
58
|
$[4] = t0;
|
|
59
|
+
$[5] = t1;
|
|
57
60
|
} else {
|
|
58
61
|
t0 = $[4];
|
|
59
|
-
|
|
60
|
-
let t1;
|
|
61
|
-
if ($[5] !== anchorRef || $[6] !== containerRef || $[7] !== onClose || $[8] !== open) {
|
|
62
|
-
t1 = [open, onClose, containerRef, anchorRef];
|
|
63
|
-
$[5] = anchorRef;
|
|
64
|
-
$[6] = containerRef;
|
|
65
|
-
$[7] = onClose;
|
|
66
|
-
$[8] = open;
|
|
67
|
-
$[9] = t1;
|
|
68
|
-
} else {
|
|
69
|
-
t1 = $[9];
|
|
62
|
+
t1 = $[5];
|
|
70
63
|
}
|
|
71
64
|
React__default.default.useEffect(t0, t1);
|
|
72
65
|
};
|
|
@@ -75,9 +68,10 @@ const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
|
75
68
|
* Close submenu when left arrow key is pressed
|
|
76
69
|
*/
|
|
77
70
|
const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
78
|
-
const $ = reactCompilerRuntime.c(
|
|
71
|
+
const $ = reactCompilerRuntime.c(6);
|
|
79
72
|
let t0;
|
|
80
|
-
|
|
73
|
+
let t1;
|
|
74
|
+
if ($[0] !== containerRef || $[1] !== isSubmenu || $[2] !== onClose || $[3] !== open) {
|
|
81
75
|
t0 = () => {
|
|
82
76
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
83
77
|
const handler = event => {
|
|
@@ -90,24 +84,16 @@ const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
|
90
84
|
container === null || container === void 0 ? void 0 : container.removeEventListener("keydown", handler);
|
|
91
85
|
};
|
|
92
86
|
};
|
|
93
|
-
|
|
87
|
+
t1 = [open, onClose, containerRef, isSubmenu];
|
|
88
|
+
$[0] = containerRef;
|
|
94
89
|
$[1] = isSubmenu;
|
|
95
90
|
$[2] = onClose;
|
|
96
91
|
$[3] = open;
|
|
97
92
|
$[4] = t0;
|
|
93
|
+
$[5] = t1;
|
|
98
94
|
} else {
|
|
99
95
|
t0 = $[4];
|
|
100
|
-
|
|
101
|
-
let t1;
|
|
102
|
-
if ($[5] !== containerRef || $[6] !== isSubmenu || $[7] !== onClose || $[8] !== open) {
|
|
103
|
-
t1 = [open, onClose, containerRef, isSubmenu];
|
|
104
|
-
$[5] = containerRef;
|
|
105
|
-
$[6] = isSubmenu;
|
|
106
|
-
$[7] = onClose;
|
|
107
|
-
$[8] = open;
|
|
108
|
-
$[9] = t1;
|
|
109
|
-
} else {
|
|
110
|
-
t1 = $[9];
|
|
96
|
+
t1 = $[5];
|
|
111
97
|
}
|
|
112
98
|
React__default.default.useEffect(t0, t1);
|
|
113
99
|
};
|
|
@@ -117,9 +103,10 @@ const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
|
117
103
|
* focus should move to a menu item
|
|
118
104
|
*/
|
|
119
105
|
const useMoveFocusToMenuItem = (open, containerRef, anchorRef) => {
|
|
120
|
-
const $ = reactCompilerRuntime.c(
|
|
106
|
+
const $ = reactCompilerRuntime.c(5);
|
|
121
107
|
let t0;
|
|
122
|
-
|
|
108
|
+
let t1;
|
|
109
|
+
if ($[0] !== anchorRef || $[1] !== containerRef || $[2] !== open) {
|
|
123
110
|
t0 = () => {
|
|
124
111
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
125
112
|
const anchor = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current;
|
|
@@ -142,22 +129,15 @@ const useMoveFocusToMenuItem = (open, containerRef, anchorRef) => {
|
|
|
142
129
|
anchor === null || anchor === void 0 ? void 0 : anchor.addEventListener("keydown", handler);
|
|
143
130
|
return () => anchor === null || anchor === void 0 ? void 0 : anchor.addEventListener("keydown", handler);
|
|
144
131
|
};
|
|
145
|
-
|
|
146
|
-
$[
|
|
132
|
+
t1 = [open, containerRef, anchorRef];
|
|
133
|
+
$[0] = anchorRef;
|
|
134
|
+
$[1] = containerRef;
|
|
147
135
|
$[2] = open;
|
|
148
136
|
$[3] = t0;
|
|
137
|
+
$[4] = t1;
|
|
149
138
|
} else {
|
|
150
139
|
t0 = $[3];
|
|
151
|
-
|
|
152
|
-
let t1;
|
|
153
|
-
if ($[4] !== anchorRef || $[5] !== containerRef || $[6] !== open) {
|
|
154
|
-
t1 = [open, containerRef, anchorRef];
|
|
155
|
-
$[4] = anchorRef;
|
|
156
|
-
$[5] = containerRef;
|
|
157
|
-
$[6] = open;
|
|
158
|
-
$[7] = t1;
|
|
159
|
-
} else {
|
|
160
|
-
t1 = $[7];
|
|
140
|
+
t1 = $[4];
|
|
161
141
|
}
|
|
162
142
|
React__default.default.useEffect(t0, t1);
|
|
163
143
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var reactCompilerRuntime = require('react-compiler-runtime');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var utils = require('@primer/behaviors/utils');
|
|
6
5
|
var useProvidedRefOrCreate = require('./useProvidedRefOrCreate.js');
|
|
@@ -16,104 +15,65 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
17
|
const useMnemonics = (open, providedRef) => {
|
|
19
|
-
const $ = reactCompilerRuntime.c(9);
|
|
20
18
|
const containerRef = useProvidedRefOrCreate.useProvidedRefOrCreate(providedRef);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
t1 = [open, containerRef];
|
|
33
|
-
$[0] = containerRef;
|
|
34
|
-
$[1] = open;
|
|
35
|
-
$[2] = t0;
|
|
36
|
-
$[3] = t1;
|
|
37
|
-
} else {
|
|
38
|
-
t0 = $[2];
|
|
39
|
-
t1 = $[3];
|
|
40
|
-
}
|
|
41
|
-
React__default.default.useEffect(t0, t1);
|
|
42
|
-
let t2;
|
|
43
|
-
if ($[4] !== containerRef || $[5] !== open) {
|
|
44
|
-
t2 = [open, containerRef];
|
|
45
|
-
$[4] = containerRef;
|
|
46
|
-
$[5] = open;
|
|
47
|
-
$[6] = t2;
|
|
48
|
-
} else {
|
|
49
|
-
t2 = $[6];
|
|
50
|
-
}
|
|
19
|
+
React__default.default.useEffect(function addAriaKeyshortcuts() {
|
|
20
|
+
if (!open || !containerRef.current) return;
|
|
21
|
+
const container = containerRef.current;
|
|
22
|
+
const focusableItems = [...utils.iterateFocusableElements(container)];
|
|
23
|
+
focusableItems.map(item => {
|
|
24
|
+
// if item already has aria-keyshortcuts defined by user, skip
|
|
25
|
+
if (item.getAttribute('aria-keyshortcuts')) return;
|
|
26
|
+
const firstLetter = item.textContent.toLowerCase()[0];
|
|
27
|
+
if (firstLetter) item.setAttribute('aria-keyshortcuts', firstLetter);
|
|
28
|
+
});
|
|
29
|
+
}, [open, containerRef]);
|
|
51
30
|
React__default.default.useEffect(function handleKeyDown() {
|
|
52
|
-
if (!open || !containerRef.current)
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
31
|
+
if (!open || !containerRef.current) return;
|
|
55
32
|
const container_0 = containerRef.current;
|
|
56
33
|
const handler = event => {
|
|
57
34
|
var _elementToFocus;
|
|
35
|
+
// skip if a TextInput has focus
|
|
58
36
|
const activeElement = document.activeElement;
|
|
59
|
-
if (activeElement.tagName ===
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
if (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA') return;
|
|
38
|
+
|
|
39
|
+
// skip if used with modifier to preserve shortcuts like ⌘ + F
|
|
62
40
|
const hasModifier = event.ctrlKey || event.altKey || event.metaKey;
|
|
63
|
-
if (hasModifier)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (!isAlphabetKey(event))
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
if (hasModifier) return;
|
|
42
|
+
|
|
43
|
+
// skip if it's not a alphabet key
|
|
44
|
+
if (!isAlphabetKey(event)) return;
|
|
45
|
+
|
|
46
|
+
// if this is a typeahead event, don't propagate outside of menu
|
|
69
47
|
event.stopPropagation();
|
|
70
48
|
const query = event.key.toLowerCase();
|
|
71
49
|
let elementToFocus;
|
|
72
50
|
const focusableItems_0 = [...utils.iterateFocusableElements(container_0)];
|
|
73
51
|
const itemsMatchingKey = focusableItems_0.filter(item_0 => {
|
|
74
52
|
var _item_0$getAttribute;
|
|
75
|
-
const keyshortcuts = (_item_0$getAttribute = item_0.getAttribute(
|
|
53
|
+
const keyshortcuts = (_item_0$getAttribute = item_0.getAttribute('aria-keyshortcuts')) === null || _item_0$getAttribute === void 0 ? void 0 : _item_0$getAttribute.split(' ').map(shortcut => shortcut.toLowerCase());
|
|
76
54
|
return keyshortcuts && keyshortcuts.includes(query);
|
|
77
55
|
});
|
|
78
56
|
const currentActiveIndex = itemsMatchingKey.indexOf(activeElement);
|
|
57
|
+
|
|
58
|
+
// If the last element is already selected, cycle through the list
|
|
79
59
|
if (currentActiveIndex === itemsMatchingKey.length - 1) {
|
|
80
60
|
elementToFocus = itemsMatchingKey[0];
|
|
81
61
|
} else {
|
|
82
|
-
elementToFocus = itemsMatchingKey.find((item_1, index) =>
|
|
62
|
+
elementToFocus = itemsMatchingKey.find((item_1, index) => {
|
|
63
|
+
return index > currentActiveIndex;
|
|
64
|
+
});
|
|
83
65
|
}
|
|
84
66
|
(_elementToFocus = elementToFocus) === null || _elementToFocus === void 0 ? void 0 : _elementToFocus.focus();
|
|
85
67
|
};
|
|
86
|
-
container_0.addEventListener(
|
|
87
|
-
return () => container_0.removeEventListener(
|
|
88
|
-
},
|
|
89
|
-
const isAlphabetKey =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
$[7] = containerRef;
|
|
96
|
-
$[8] = t3;
|
|
97
|
-
} else {
|
|
98
|
-
t3 = $[8];
|
|
99
|
-
}
|
|
100
|
-
return t3;
|
|
68
|
+
container_0.addEventListener('keydown', handler);
|
|
69
|
+
return () => container_0.removeEventListener('keydown', handler);
|
|
70
|
+
}, [open, containerRef]);
|
|
71
|
+
const isAlphabetKey = event_0 => {
|
|
72
|
+
return event_0.key.length === 1 && /[a-z\d]/i.test(event_0.key);
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
containerRef
|
|
76
|
+
};
|
|
101
77
|
};
|
|
102
|
-
function _temp(item) {
|
|
103
|
-
var _item$textContent;
|
|
104
|
-
if (item.getAttribute("aria-keyshortcuts")) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
const firstLetter = (_item$textContent = item.textContent) === null || _item$textContent === void 0 ? void 0 : _item$textContent.toLowerCase()[0];
|
|
108
|
-
if (firstLetter) {
|
|
109
|
-
item.setAttribute("aria-keyshortcuts", firstLetter);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function _temp2(shortcut) {
|
|
113
|
-
return shortcut.toLowerCase();
|
|
114
|
-
}
|
|
115
|
-
function _temp3(event_0) {
|
|
116
|
-
return event_0.key.length === 1 && /[a-z\d]/i.test(event_0.key);
|
|
117
|
-
}
|
|
118
78
|
|
|
119
79
|
exports.useMnemonics = useMnemonics;
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var utils = require('@primer/behaviors/utils');
|
|
6
6
|
|
|
7
7
|
function useOpenAndCloseFocus(t0) {
|
|
8
|
-
const $ = reactCompilerRuntime.c(
|
|
8
|
+
const $ = reactCompilerRuntime.c(6);
|
|
9
9
|
const {
|
|
10
10
|
initialFocusRef,
|
|
11
11
|
returnFocusRef,
|
|
@@ -13,7 +13,8 @@ function useOpenAndCloseFocus(t0) {
|
|
|
13
13
|
preventFocusOnOpen
|
|
14
14
|
} = t0;
|
|
15
15
|
let t1;
|
|
16
|
-
|
|
16
|
+
let t2;
|
|
17
|
+
if ($[0] !== containerRef || $[1] !== initialFocusRef || $[2] !== preventFocusOnOpen || $[3] !== returnFocusRef) {
|
|
17
18
|
t1 = () => {
|
|
18
19
|
if (!preventFocusOnOpen) {
|
|
19
20
|
if (initialFocusRef && initialFocusRef.current) {
|
|
@@ -30,24 +31,16 @@ function useOpenAndCloseFocus(t0) {
|
|
|
30
31
|
returnFocusRefCurrent === null || returnFocusRefCurrent === void 0 ? void 0 : returnFocusRefCurrent.focus();
|
|
31
32
|
};
|
|
32
33
|
};
|
|
34
|
+
t2 = [initialFocusRef, returnFocusRef, containerRef, preventFocusOnOpen];
|
|
33
35
|
$[0] = containerRef;
|
|
34
36
|
$[1] = initialFocusRef;
|
|
35
37
|
$[2] = preventFocusOnOpen;
|
|
36
|
-
$[3] = returnFocusRef
|
|
38
|
+
$[3] = returnFocusRef;
|
|
37
39
|
$[4] = t1;
|
|
40
|
+
$[5] = t2;
|
|
38
41
|
} else {
|
|
39
42
|
t1 = $[4];
|
|
40
|
-
|
|
41
|
-
let t2;
|
|
42
|
-
if ($[5] !== containerRef || $[6] !== initialFocusRef || $[7] !== preventFocusOnOpen || $[8] !== returnFocusRef) {
|
|
43
|
-
t2 = [initialFocusRef, returnFocusRef, containerRef, preventFocusOnOpen];
|
|
44
|
-
$[5] = containerRef;
|
|
45
|
-
$[6] = initialFocusRef;
|
|
46
|
-
$[7] = preventFocusOnOpen;
|
|
47
|
-
$[8] = returnFocusRef;
|
|
48
|
-
$[9] = t2;
|
|
49
|
-
} else {
|
|
50
|
-
t2 = $[9];
|
|
43
|
+
t2 = $[5];
|
|
51
44
|
}
|
|
52
45
|
React.useEffect(t1, t2);
|
|
53
46
|
}
|
package/lib/hooks/useOverflow.js
CHANGED
|
@@ -4,10 +4,11 @@ var reactCompilerRuntime = require('react-compiler-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
|
|
6
6
|
function useOverflow(ref) {
|
|
7
|
-
const $ = reactCompilerRuntime.c(
|
|
7
|
+
const $ = reactCompilerRuntime.c(3);
|
|
8
8
|
const [hasOverflow, setHasOverflow] = React.useState(false);
|
|
9
9
|
let t0;
|
|
10
|
-
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== ref) {
|
|
11
12
|
t0 = () => {
|
|
12
13
|
if (ref.current === null) {
|
|
13
14
|
return;
|
|
@@ -25,18 +26,13 @@ function useOverflow(ref) {
|
|
|
25
26
|
observer.disconnect();
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
t1 = [ref];
|
|
30
|
+
$[0] = ref;
|
|
29
31
|
$[1] = t0;
|
|
32
|
+
$[2] = t1;
|
|
30
33
|
} else {
|
|
31
34
|
t0 = $[1];
|
|
32
|
-
|
|
33
|
-
let t1;
|
|
34
|
-
if ($[2] !== ref) {
|
|
35
|
-
t1 = [ref];
|
|
36
|
-
$[2] = ref;
|
|
37
|
-
$[3] = t1;
|
|
38
|
-
} else {
|
|
39
|
-
t1 = $[3];
|
|
35
|
+
t1 = $[2];
|
|
40
36
|
}
|
|
41
37
|
React.useEffect(t0, t1);
|
|
42
38
|
return hasOverflow;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var reactCompilerRuntime = require('react-compiler-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -7,20 +8,30 @@ var React = require('react');
|
|
|
7
8
|
* @param scrollContainerRef The ref of the scrollable content
|
|
8
9
|
*/
|
|
9
10
|
function useScrollFlash(scrollContainerRef) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
const $ = reactCompilerRuntime.c(3);
|
|
12
|
+
let t0;
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== scrollContainerRef) {
|
|
15
|
+
t0 = () => {
|
|
16
|
+
const scrollContainer = scrollContainerRef.current;
|
|
17
|
+
if (!scrollContainer) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const currentScroll = scrollContainer.scrollTop;
|
|
21
|
+
const maxScroll = scrollContainer.scrollHeight;
|
|
22
|
+
const altScroll = currentScroll < Math.min(1, maxScroll) ? currentScroll + 1 : currentScroll - 1;
|
|
23
|
+
scrollContainer.scrollTop = altScroll;
|
|
24
|
+
scrollContainer.scrollTop = currentScroll;
|
|
25
|
+
};
|
|
26
|
+
t1 = [scrollContainerRef];
|
|
27
|
+
$[0] = scrollContainerRef;
|
|
28
|
+
$[1] = t0;
|
|
29
|
+
$[2] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
t0 = $[1];
|
|
32
|
+
t1 = $[2];
|
|
33
|
+
}
|
|
34
|
+
React.useEffect(t0, t1);
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
module.exports = useScrollFlash;
|