@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
|
@@ -3,42 +3,35 @@ import React, { useState, useEffect } from 'react';
|
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import classes from './Details.module.css.js';
|
|
5
5
|
import { useMergedRefs } from '../internal/hooks/useMergedRefs.js';
|
|
6
|
-
import { defaultSxProp } from '../utils/defaultSxProp.js';
|
|
7
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
import Box from '../Box/Box.js';
|
|
9
7
|
|
|
10
8
|
const Root = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
11
|
-
const $ = c(
|
|
9
|
+
const $ = c(16);
|
|
12
10
|
let children;
|
|
13
11
|
let className;
|
|
14
12
|
let rest;
|
|
15
|
-
let t1;
|
|
16
13
|
if ($[0] !== t0) {
|
|
17
14
|
({
|
|
18
15
|
className,
|
|
19
16
|
children,
|
|
20
|
-
sx: t1,
|
|
21
17
|
...rest
|
|
22
18
|
} = t0);
|
|
23
19
|
$[0] = t0;
|
|
24
20
|
$[1] = children;
|
|
25
21
|
$[2] = className;
|
|
26
22
|
$[3] = rest;
|
|
27
|
-
$[4] = t1;
|
|
28
23
|
} else {
|
|
29
24
|
children = $[1];
|
|
30
25
|
className = $[2];
|
|
31
26
|
rest = $[3];
|
|
32
|
-
t1 = $[4];
|
|
33
27
|
}
|
|
34
|
-
const sxProp = t1 === undefined ? defaultSxProp : t1;
|
|
35
28
|
const detailsRef = React.useRef(null);
|
|
36
29
|
const ref = useMergedRefs(forwardRef, detailsRef);
|
|
37
30
|
const [hasSummary, setHasSummary] = useState(false);
|
|
31
|
+
let t1;
|
|
38
32
|
let t2;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
t2 = () => {
|
|
33
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t1 = () => {
|
|
42
35
|
const {
|
|
43
36
|
current: details
|
|
44
37
|
} = detailsRef;
|
|
@@ -61,93 +54,51 @@ const Root = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
|
61
54
|
observer.disconnect();
|
|
62
55
|
};
|
|
63
56
|
};
|
|
64
|
-
|
|
57
|
+
t2 = [];
|
|
58
|
+
$[4] = t1;
|
|
65
59
|
$[5] = t2;
|
|
66
|
-
$[6] = t3;
|
|
67
60
|
} else {
|
|
61
|
+
t1 = $[4];
|
|
68
62
|
t2 = $[5];
|
|
69
|
-
t3 = $[6];
|
|
70
63
|
}
|
|
71
|
-
useEffect(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
$[8] = t4;
|
|
78
|
-
} else {
|
|
79
|
-
t4 = $[8];
|
|
80
|
-
}
|
|
81
|
-
let t5;
|
|
82
|
-
if ($[9] !== hasSummary) {
|
|
83
|
-
t5 = !hasSummary && /*#__PURE__*/jsx(Details.Summary, {
|
|
84
|
-
"data-default-summary": true,
|
|
85
|
-
children: "See Details"
|
|
86
|
-
});
|
|
87
|
-
$[9] = hasSummary;
|
|
88
|
-
$[10] = t5;
|
|
89
|
-
} else {
|
|
90
|
-
t5 = $[10];
|
|
91
|
-
}
|
|
92
|
-
let t6;
|
|
93
|
-
if ($[11] !== children || $[12] !== ref || $[13] !== rest || $[14] !== sxProp || $[15] !== t4 || $[16] !== t5) {
|
|
94
|
-
t6 = /*#__PURE__*/jsxs(Box, {
|
|
95
|
-
as: "details",
|
|
96
|
-
className: t4,
|
|
97
|
-
...rest,
|
|
98
|
-
sx: sxProp,
|
|
99
|
-
ref: ref,
|
|
100
|
-
children: [t5, children]
|
|
101
|
-
});
|
|
102
|
-
$[11] = children;
|
|
103
|
-
$[12] = ref;
|
|
104
|
-
$[13] = rest;
|
|
105
|
-
$[14] = sxProp;
|
|
106
|
-
$[15] = t4;
|
|
107
|
-
$[16] = t5;
|
|
108
|
-
$[17] = t6;
|
|
109
|
-
} else {
|
|
110
|
-
t6 = $[17];
|
|
111
|
-
}
|
|
112
|
-
return t6;
|
|
113
|
-
}
|
|
114
|
-
let t4;
|
|
115
|
-
if ($[18] !== className) {
|
|
116
|
-
t4 = clsx(className, classes.Details);
|
|
117
|
-
$[18] = className;
|
|
118
|
-
$[19] = t4;
|
|
64
|
+
useEffect(t1, t2);
|
|
65
|
+
let t3;
|
|
66
|
+
if ($[6] !== className) {
|
|
67
|
+
t3 = clsx(className, classes.Details);
|
|
68
|
+
$[6] = className;
|
|
69
|
+
$[7] = t3;
|
|
119
70
|
} else {
|
|
120
|
-
|
|
71
|
+
t3 = $[7];
|
|
121
72
|
}
|
|
122
|
-
let
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
73
|
+
let t4;
|
|
74
|
+
if ($[8] !== hasSummary) {
|
|
75
|
+
t4 = !hasSummary && /*#__PURE__*/jsx(Details.Summary, {
|
|
125
76
|
"data-default-summary": true,
|
|
126
77
|
children: "See Details"
|
|
127
78
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
79
|
+
$[8] = hasSummary;
|
|
80
|
+
$[9] = t4;
|
|
130
81
|
} else {
|
|
131
|
-
|
|
82
|
+
t4 = $[9];
|
|
132
83
|
}
|
|
133
|
-
let
|
|
134
|
-
if ($[
|
|
135
|
-
|
|
136
|
-
className:
|
|
84
|
+
let t5;
|
|
85
|
+
if ($[10] !== children || $[11] !== ref || $[12] !== rest || $[13] !== t3 || $[14] !== t4) {
|
|
86
|
+
t5 = /*#__PURE__*/jsxs("details", {
|
|
87
|
+
className: t3,
|
|
137
88
|
...rest,
|
|
138
89
|
ref: ref,
|
|
139
|
-
children: [
|
|
90
|
+
children: [t4, children]
|
|
140
91
|
});
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
92
|
+
$[10] = children;
|
|
93
|
+
$[11] = ref;
|
|
94
|
+
$[12] = rest;
|
|
95
|
+
$[13] = t3;
|
|
96
|
+
$[14] = t4;
|
|
97
|
+
$[15] = t5;
|
|
147
98
|
} else {
|
|
148
|
-
|
|
99
|
+
t5 = $[15];
|
|
149
100
|
}
|
|
150
|
-
return
|
|
101
|
+
return t5;
|
|
151
102
|
});
|
|
152
103
|
Root.displayName = 'Details';
|
|
153
104
|
function Summary(t0) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { FeatureFlagScope } from './FeatureFlagScope.js';
|
|
2
2
|
|
|
3
3
|
const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
4
|
-
primer_react_css_modules_ga: false,
|
|
5
4
|
primer_react_action_list_item_as_button: false,
|
|
6
|
-
primer_react_select_panel_with_modern_action_list: false,
|
|
7
5
|
primer_react_overlay_overflow: false,
|
|
8
6
|
primer_react_segmented_control_tooltip: false,
|
|
9
7
|
primer_react_select_panel_fullscreen_on_narrow: false,
|
|
10
|
-
primer_react_select_panel_order_selected_at_top: false
|
|
8
|
+
primer_react_select_panel_order_selected_at_top: false,
|
|
9
|
+
primer_react_select_panel_remove_active_descendant: false
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
export { DefaultFeatureFlags };
|
|
@@ -12,31 +12,29 @@ function FeatureFlags(t0) {
|
|
|
12
12
|
} = t0;
|
|
13
13
|
const parentFeatureFlags = useContext(FeatureFlagContext);
|
|
14
14
|
let t1;
|
|
15
|
-
let t2;
|
|
16
15
|
if ($[0] !== flags || $[1] !== parentFeatureFlags) {
|
|
17
|
-
|
|
16
|
+
t1 = FeatureFlagScope.merge(parentFeatureFlags, FeatureFlagScope.create(flags));
|
|
18
17
|
$[0] = flags;
|
|
19
18
|
$[1] = parentFeatureFlags;
|
|
20
|
-
$[2] =
|
|
19
|
+
$[2] = t1;
|
|
21
20
|
} else {
|
|
22
|
-
|
|
21
|
+
t1 = $[2];
|
|
23
22
|
}
|
|
24
|
-
const scope =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let t3;
|
|
23
|
+
const scope = t1;
|
|
24
|
+
const value = scope;
|
|
25
|
+
let t2;
|
|
28
26
|
if ($[3] !== children || $[4] !== value) {
|
|
29
|
-
|
|
27
|
+
t2 = /*#__PURE__*/jsx(FeatureFlagContext.Provider, {
|
|
30
28
|
value: value,
|
|
31
29
|
children: children
|
|
32
30
|
});
|
|
33
31
|
$[3] = children;
|
|
34
32
|
$[4] = value;
|
|
35
|
-
$[5] =
|
|
33
|
+
$[5] = t2;
|
|
36
34
|
} else {
|
|
37
|
-
|
|
35
|
+
t2 = $[5];
|
|
38
36
|
}
|
|
39
|
-
return
|
|
37
|
+
return t2;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
export { FeatureFlags };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-FilteredActionList-Root-S5E74{display:flex;flex-direction:column;overflow:hidden}.prc-FilteredActionList-Container-2A9NQ{display:flex;flex-grow:1;height:100%;overflow:auto}.prc-FilteredActionList-ActionListItem-39lnB:focus{background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-39lnB:focus:after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:var(--base-size-24,1.5rem);left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:calc(50% - var(--base-size-12,.75rem));width:var(--base-size-4,.25rem)}.prc-FilteredActionList-ActionListItem-39lnB:where([data-input-focused]):where([data-first-child]){background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-39lnB:where([data-input-focused]):where([data-first-child]):after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:var(--base-size-24,1.5rem);left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:calc(50% - var(--base-size-12,.75rem));width:var(--base-size-4,.25rem)}@media screen and (max-width:calc(48rem - 0.02px)){@supports (-webkit-touch-callout:none){.prc-FilteredActionList-FullScreenTextInput-rCAiq{font-size:var(--text-title-size-small,1rem)}}}.prc-FilteredActionList-SelectAllContainer-w5otq{align-items:center;background:var(--bgColor-muted,var(--color-canvas-subtle));border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,var(--color-border-default));display:flex;padding-block:var(--base-size-4,.25rem);padding-inline:var(--base-size-16,1rem)}.prc-FilteredActionList-SelectAllCheckbox-dq2yL{margin:var(--base-size-4,.25rem) var(--base-size-8,.5rem) calc(var(--base-size-4,.25rem) - 1px) 0}.prc-FilteredActionList-SelectAllLabel-l34LA{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-medium,.875rem)}
|
|
2
|
+
/*# sourceMappingURL=FilteredActionList-96b126d7.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/FilteredActionList/FilteredActionList.module.css","../../postcss-preset-primer/src/mixins/activeIndicatorLine.css"],"names":[],"mappings":"AAAA,mCACE,YAAa,CACb,qBAAsB,CACtB,eACF,CAEA,wCACE,YAAa,CAGb,WAAY,CAFZ,WAAY,CACZ,aAEF,CAEA,mDACE,wGAKF,CAHE,yDCRA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,iCAA2B,CAF3B,sCAAmC,CAFnC,iBAAkB,CAClB,0CAAoC,CAEpC,+BDcA,CAGF,mGACE,wGAKF,CAHE,yGChBA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,iCAA2B,CAF3B,sCAAmC,CAFnC,iBAAkB,CAClB,0CAAoC,CAEpC,+BDsBA,CAIA,mDAEE,uCAHJ,kDAIM,2CAGN,CAFI,CACF,CAGF,iDAEE,kBAAmB,CAGnB,0DAAgC,CAChC,2GAAuE,CALvE,YAAa,CAEb,uCAAiC,CACjC,uCAGF,CAEA,gDAGE,iGACF,CAEA,6CAEE,gDAA2B,CAD3B,8CAEF","file":"FilteredActionList-96b126d7.css","sourcesContent":[".Root {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.Container {\n display: flex;\n height: 100%;\n overflow: auto;\n flex-grow: 1;\n}\n\n.ActionListItem:focus {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.ActionListItem:where([data-input-focused]):where([data-first-child]) {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.FullScreenTextInput {\n @media screen and (--viewportRange-narrow) {\n /* Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad */\n @supports (-webkit-touch-callout: none) {\n font-size: var(--text-title-size-small);\n }\n }\n}\n\n.SelectAllContainer {\n display: flex;\n align-items: center;\n padding-block: var(--base-size-4);\n padding-inline: var(--base-size-16);\n background: var(--bgColor-muted);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.SelectAllCheckbox {\n /* -1px hack to offset 1px border-bottom causing uneven alignment */\n /* stylelint-disable-next-line primer/spacing */\n margin: var(--base-size-4) var(--base-size-8) calc(var(--base-size-4) - 1px) 0;\n}\n\n.SelectAllLabel {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n","@define-mixin activeIndicatorLine {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: var(--base-size-4);\n height: var(--base-size-24);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-accent-emphasis);\n border-radius: var(--borderRadius-medium);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { TextInputProps } from '../TextInput';
|
|
3
|
-
import type { GroupedListProps, ListPropsBase } from '
|
|
3
|
+
import type { GroupedListProps, ListPropsBase } from './';
|
|
4
4
|
import type { SxProp } from '../sx';
|
|
5
5
|
import type { FilteredActionListLoadingType } from './FilteredActionListLoaders';
|
|
6
6
|
export interface FilteredActionListProps extends Partial<Omit<GroupedListProps, keyof ListPropsBase>>, ListPropsBase, SxProp {
|
|
@@ -8,18 +8,23 @@ export interface FilteredActionListProps extends Partial<Omit<GroupedListProps,
|
|
|
8
8
|
loadingType?: FilteredActionListLoadingType;
|
|
9
9
|
placeholderText?: string;
|
|
10
10
|
filterValue?: string;
|
|
11
|
-
onFilterChange: (value: string, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
onFilterChange: (value: string, e: React.ChangeEvent<HTMLInputElement> | null) => void;
|
|
12
12
|
onListContainerRefChanged?: (ref: HTMLElement | null) => void;
|
|
13
13
|
onInputRefChanged?: (ref: React.RefObject<HTMLInputElement>) => void;
|
|
14
14
|
textInputProps?: Partial<Omit<TextInputProps, 'onChange'>>;
|
|
15
15
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
16
16
|
message?: React.ReactNode;
|
|
17
|
+
messageText?: {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
17
21
|
className?: string;
|
|
18
22
|
announcementsEnabled?: boolean;
|
|
19
23
|
fullScreenOnNarrow?: boolean;
|
|
24
|
+
onSelectAllChange?: (checked: boolean) => void;
|
|
20
25
|
}
|
|
21
|
-
export declare function FilteredActionList({ loading, placeholderText, filterValue: externalFilterValue, loadingType, onFilterChange, onListContainerRefChanged, onInputRefChanged, items, textInputProps, inputRef: providedInputRef, sx, groupMetadata, showItemDividers, message, className, announcementsEnabled, fullScreenOnNarrow, ...listProps }: FilteredActionListProps): JSX.Element;
|
|
26
|
+
export declare function FilteredActionList({ loading, placeholderText, filterValue: externalFilterValue, loadingType, onFilterChange, onListContainerRefChanged, onInputRefChanged, items, textInputProps, inputRef: providedInputRef, sx, groupMetadata, showItemDividers, message, messageText, className, selectionVariant, announcementsEnabled, fullScreenOnNarrow, onSelectAllChange, ...listProps }: FilteredActionListProps): JSX.Element;
|
|
22
27
|
export declare namespace FilteredActionList {
|
|
23
28
|
var displayName: string;
|
|
24
29
|
}
|
|
25
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=FilteredActionList.d.ts.map
|
|
@@ -11,21 +11,24 @@ import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
|
11
11
|
import useScrollFlash from '../hooks/useScrollFlash.js';
|
|
12
12
|
import { FilteredActionListLoadingTypes, FilteredActionListBodyLoader } from './FilteredActionListLoaders.js';
|
|
13
13
|
import classes from './FilteredActionList.module.css.js';
|
|
14
|
+
import { ActionListContainerContext } from '../ActionList/ActionListContainerContext.js';
|
|
14
15
|
import { isValidElementType } from 'react-is';
|
|
15
16
|
import { useAnnouncements } from './useAnnouncements.js';
|
|
16
17
|
import { clsx } from 'clsx';
|
|
18
|
+
import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
|
|
17
19
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
18
|
-
import
|
|
20
|
+
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
19
21
|
import TextInput from '../TextInput/TextInput.js';
|
|
20
22
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
23
|
+
import Checkbox from '../Checkbox/Checkbox.js';
|
|
21
24
|
|
|
22
25
|
const menuScrollMargins = {
|
|
23
26
|
startMargin: 0,
|
|
24
27
|
endMargin: 8
|
|
25
28
|
};
|
|
26
29
|
const StyledHeader = styled.div.withConfig({
|
|
27
|
-
displayName: "
|
|
28
|
-
componentId: "sc-
|
|
30
|
+
displayName: "FilteredActionList__StyledHeader",
|
|
31
|
+
componentId: "sc-1oqgb0s-0"
|
|
29
32
|
})(["box-shadow:0 1px 0 ", ";z-index:1;"], get('colors.border.default'));
|
|
30
33
|
function FilteredActionList({
|
|
31
34
|
loading = false,
|
|
@@ -42,9 +45,12 @@ function FilteredActionList({
|
|
|
42
45
|
groupMetadata,
|
|
43
46
|
showItemDividers,
|
|
44
47
|
message,
|
|
48
|
+
messageText,
|
|
45
49
|
className,
|
|
50
|
+
selectionVariant,
|
|
46
51
|
announcementsEnabled = true,
|
|
47
52
|
fullScreenOnNarrow,
|
|
53
|
+
onSelectAllChange,
|
|
48
54
|
...listProps
|
|
49
55
|
}) {
|
|
50
56
|
const [filterValue, setInternalFilterValue] = useProvidedStateOrCreate(externalFilterValue, undefined, '');
|
|
@@ -53,22 +59,72 @@ function FilteredActionList({
|
|
|
53
59
|
onFilterChange(value, e);
|
|
54
60
|
setInternalFilterValue(value);
|
|
55
61
|
}, [onFilterChange, setInternalFilterValue]);
|
|
62
|
+
const inputAndListContainerRef = useRef(null);
|
|
63
|
+
const listRef = useRef(null);
|
|
56
64
|
const scrollContainerRef = useRef(null);
|
|
57
65
|
const inputRef = useProvidedRefOrCreate(providedInputRef);
|
|
66
|
+
const usingRemoveActiveDescendant = useFeatureFlag('primer_react_select_panel_remove_active_descendant');
|
|
58
67
|
const [listContainerElement, setListContainerElement] = useState(null);
|
|
59
68
|
const activeDescendantRef = useRef();
|
|
60
69
|
const listId = useId();
|
|
61
70
|
const inputDescriptionTextId = useId();
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
72
|
+
const selectAllChecked = items.length > 0 && items.every(item => item.selected);
|
|
73
|
+
const selectAllIndeterminate = !selectAllChecked && items.some(item_0 => item_0.selected);
|
|
74
|
+
const selectAllLabelText = selectAllChecked ? 'Deselect all' : 'Select all';
|
|
75
|
+
const getItemListForEachGroup = useCallback(groupId => {
|
|
76
|
+
const itemsInGroup = [];
|
|
77
|
+
for (const item_1 of items) {
|
|
78
|
+
// Look up the group associated with the current item.
|
|
79
|
+
if (item_1.groupId === groupId) {
|
|
80
|
+
itemsInGroup.push(item_1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return itemsInGroup;
|
|
84
|
+
}, [items]);
|
|
85
|
+
const onInputKeyDown = useCallback(event => {
|
|
86
|
+
if (event.key === 'ArrowDown') {
|
|
87
|
+
if (listRef.current) {
|
|
88
|
+
const firstSelectedItem = listRef.current.querySelector('[role="option"]');
|
|
89
|
+
firstSelectedItem === null || firstSelectedItem === void 0 ? void 0 : firstSelectedItem.focus();
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
}
|
|
92
|
+
} else if (event.key === 'Enter') {
|
|
93
|
+
let firstItem;
|
|
94
|
+
// If there are groups, it's not guaranteed that the first item is the actual first item in the first -
|
|
95
|
+
// as groups are rendered in the order of the groupId provided
|
|
96
|
+
if (groupMetadata) {
|
|
97
|
+
let firstGroupIndex = 0;
|
|
98
|
+
for (let i = 0; i < groupMetadata.length; i++) {
|
|
99
|
+
if (getItemListForEachGroup(groupMetadata[i].groupId).length > 0) {
|
|
100
|
+
break;
|
|
101
|
+
} else {
|
|
102
|
+
firstGroupIndex++;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const firstGroup = groupMetadata[firstGroupIndex].groupId;
|
|
106
|
+
firstItem = items.filter(item_2 => item_2.groupId === firstGroup)[0];
|
|
107
|
+
} else {
|
|
108
|
+
firstItem = items[0];
|
|
109
|
+
}
|
|
110
|
+
if (firstItem.onAction) {
|
|
111
|
+
firstItem.onAction(firstItem, event);
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, [items, groupMetadata, getItemListForEachGroup]);
|
|
116
|
+
const onInputKeyPress = useCallback(event_0 => {
|
|
117
|
+
if (event_0.key === 'Enter' && activeDescendantRef.current) {
|
|
118
|
+
event_0.preventDefault();
|
|
119
|
+
event_0.nativeEvent.stopImmediatePropagation();
|
|
66
120
|
|
|
67
121
|
// Forward Enter key press to active descendant so that item gets activated
|
|
68
|
-
const activeDescendantEvent = new KeyboardEvent(
|
|
122
|
+
const activeDescendantEvent = new KeyboardEvent(event_0.type, event_0.nativeEvent);
|
|
69
123
|
activeDescendantRef.current.dispatchEvent(activeDescendantEvent);
|
|
70
124
|
}
|
|
71
125
|
}, [activeDescendantRef]);
|
|
126
|
+
|
|
127
|
+
// BEGIN: Todo remove when we remove usingRemoveActiveDescendant
|
|
72
128
|
const listContainerRefCallback = useCallback(node => {
|
|
73
129
|
setListContainerElement(node);
|
|
74
130
|
onListContainerRefChanged === null || onListContainerRefChanged === void 0 ? void 0 : onListContainerRefChanged(node);
|
|
@@ -76,7 +132,9 @@ function FilteredActionList({
|
|
|
76
132
|
useEffect(() => {
|
|
77
133
|
onInputRefChanged === null || onInputRefChanged === void 0 ? void 0 : onInputRefChanged(inputRef);
|
|
78
134
|
}, [inputRef, onInputRefChanged]);
|
|
79
|
-
|
|
135
|
+
//END: Todo remove when we remove usingRemoveActiveDescendant
|
|
136
|
+
|
|
137
|
+
useFocusZone(!usingRemoveActiveDescendant ? {
|
|
80
138
|
containerRef: {
|
|
81
139
|
current: listContainerElement
|
|
82
140
|
},
|
|
@@ -92,32 +150,49 @@ function FilteredActionList({
|
|
|
92
150
|
scrollIntoView(current, scrollContainerRef.current, menuScrollMargins);
|
|
93
151
|
}
|
|
94
152
|
}
|
|
95
|
-
}, [
|
|
96
|
-
// List container isn't in the DOM while loading. Need to re-bind focus zone when it changes.
|
|
97
|
-
listContainerElement]);
|
|
153
|
+
} : undefined, [listContainerElement, usingRemoveActiveDescendant]);
|
|
98
154
|
useEffect(() => {
|
|
99
|
-
// if items changed, we want to instantly move active descendant into view
|
|
100
155
|
if (activeDescendantRef.current && scrollContainerRef.current) {
|
|
101
156
|
scrollIntoView(activeDescendantRef.current, scrollContainerRef.current, {
|
|
102
157
|
...menuScrollMargins,
|
|
103
158
|
behavior: 'auto'
|
|
104
159
|
});
|
|
105
160
|
}
|
|
106
|
-
}, [items]);
|
|
107
|
-
|
|
161
|
+
}, [items, inputRef]);
|
|
162
|
+
useEffect(() => {
|
|
163
|
+
if (usingRemoveActiveDescendant) {
|
|
164
|
+
const inputAndListContainerElement = inputAndListContainerRef.current;
|
|
165
|
+
if (!inputAndListContainerElement) return;
|
|
166
|
+
const list = listRef.current;
|
|
167
|
+
if (!list) return;
|
|
168
|
+
|
|
169
|
+
// Listen for focus changes within the container
|
|
170
|
+
const handleFocusIn = event_1 => {
|
|
171
|
+
if (event_1.target === inputRef.current || list.contains(event_1.target)) {
|
|
172
|
+
setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
inputAndListContainerElement.addEventListener('focusin', handleFocusIn);
|
|
176
|
+
return () => {
|
|
177
|
+
inputAndListContainerElement.removeEventListener('focusin', handleFocusIn);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}, [items, inputRef, listContainerElement, usingRemoveActiveDescendant]); // Re-run when items change to update active indicators
|
|
181
|
+
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
if (usingRemoveActiveDescendant && !loading) {
|
|
184
|
+
setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false);
|
|
185
|
+
}
|
|
186
|
+
}, [loading, inputRef, usingRemoveActiveDescendant]);
|
|
187
|
+
useAnnouncements(items, usingRemoveActiveDescendant ? listRef : {
|
|
108
188
|
current: listContainerElement
|
|
109
|
-
}, inputRef, announcementsEnabled, loading);
|
|
189
|
+
}, inputRef, announcementsEnabled, loading, messageText);
|
|
110
190
|
useScrollFlash(scrollContainerRef);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// Look up the group associated with the current item.
|
|
115
|
-
if (item.groupId === groupId) {
|
|
116
|
-
itemsInGroup.push(item);
|
|
117
|
-
}
|
|
191
|
+
const handleSelectAllChange = useCallback(e_0 => {
|
|
192
|
+
if (onSelectAllChange) {
|
|
193
|
+
onSelectAllChange(e_0.target.checked);
|
|
118
194
|
}
|
|
119
|
-
|
|
120
|
-
}
|
|
195
|
+
}, [onSelectAllChange]);
|
|
121
196
|
function getBodyContent() {
|
|
122
197
|
if (loading && scrollContainerRef.current && loadingType.appearsInBody) {
|
|
123
198
|
return /*#__PURE__*/jsx(FilteredActionListBodyLoader, {
|
|
@@ -128,9 +203,11 @@ function FilteredActionList({
|
|
|
128
203
|
if (message) {
|
|
129
204
|
return message;
|
|
130
205
|
}
|
|
131
|
-
|
|
132
|
-
|
|
206
|
+
let firstGroupIndex_0 = 0;
|
|
207
|
+
const actionListContent = /*#__PURE__*/jsx(ActionList, {
|
|
208
|
+
ref: usingRemoveActiveDescendant ? listRef : listContainerRefCallback,
|
|
133
209
|
showDividers: showItemDividers,
|
|
210
|
+
selectionVariant: selectionVariant,
|
|
134
211
|
...listProps,
|
|
135
212
|
role: "listbox",
|
|
136
213
|
id: listId,
|
|
@@ -139,41 +216,64 @@ function FilteredActionList({
|
|
|
139
216
|
},
|
|
140
217
|
children: groupMetadata !== null && groupMetadata !== void 0 && groupMetadata.length ? groupMetadata.map((group, index) => {
|
|
141
218
|
var _group$header, _group$header2;
|
|
219
|
+
if (index === firstGroupIndex_0 && getItemListForEachGroup(group.groupId).length === 0) {
|
|
220
|
+
firstGroupIndex_0++; // Increment firstGroupIndex if the first group has no items
|
|
221
|
+
}
|
|
142
222
|
return /*#__PURE__*/jsxs(ActionList.Group, {
|
|
143
223
|
children: [/*#__PURE__*/jsx(ActionList.GroupHeading, {
|
|
144
224
|
variant: (_group$header = group.header) !== null && _group$header !== void 0 && _group$header.variant ? group.header.variant : undefined,
|
|
145
225
|
children: (_group$header2 = group.header) !== null && _group$header2 !== void 0 && _group$header2.title ? group.header.title : `Group ${group.groupId}`
|
|
146
226
|
}), getItemListForEachGroup(group.groupId).map(({
|
|
147
227
|
key: itemKey,
|
|
148
|
-
...
|
|
149
|
-
},
|
|
150
|
-
var _ref,
|
|
151
|
-
const key = (_ref = itemKey !== null && itemKey !== void 0 ? itemKey : (
|
|
228
|
+
...item_3
|
|
229
|
+
}, itemIndex) => {
|
|
230
|
+
var _ref, _item_3$id;
|
|
231
|
+
const key = (_ref = itemKey !== null && itemKey !== void 0 ? itemKey : (_item_3$id = item_3.id) === null || _item_3$id === void 0 ? void 0 : _item_3$id.toString()) !== null && _ref !== void 0 ? _ref : itemIndex.toString();
|
|
152
232
|
return /*#__PURE__*/jsx(MappedActionListItem, {
|
|
153
|
-
|
|
233
|
+
className: clsx(classes.ActionListItem, 'className' in item_3 ? item_3.className : undefined),
|
|
234
|
+
"data-input-focused": isInputFocused ? '' : undefined,
|
|
235
|
+
"data-first-child": index === firstGroupIndex_0 && itemIndex === 0 ? '' : undefined,
|
|
236
|
+
...item_3,
|
|
154
237
|
renderItem: listProps.renderItem
|
|
155
238
|
}, key);
|
|
156
239
|
})]
|
|
157
240
|
}, index);
|
|
158
241
|
}) : items.map(({
|
|
159
242
|
key: itemKey_0,
|
|
160
|
-
...
|
|
161
|
-
},
|
|
162
|
-
var _ref2,
|
|
163
|
-
const key_0 = (_ref2 = itemKey_0 !== null && itemKey_0 !== void 0 ? itemKey_0 : (
|
|
243
|
+
...item_4
|
|
244
|
+
}, index_0) => {
|
|
245
|
+
var _ref2, _item_4$id;
|
|
246
|
+
const key_0 = (_ref2 = itemKey_0 !== null && itemKey_0 !== void 0 ? itemKey_0 : (_item_4$id = item_4.id) === null || _item_4$id === void 0 ? void 0 : _item_4$id.toString()) !== null && _ref2 !== void 0 ? _ref2 : index_0.toString();
|
|
164
247
|
return /*#__PURE__*/jsx(MappedActionListItem, {
|
|
165
|
-
|
|
248
|
+
className: clsx(classes.ActionListItem, 'className' in item_4 ? item_4.className : undefined),
|
|
249
|
+
"data-input-focused": isInputFocused ? '' : undefined,
|
|
250
|
+
"data-first-child": index_0 === 0 ? '' : undefined,
|
|
251
|
+
...item_4,
|
|
166
252
|
renderItem: listProps.renderItem
|
|
167
253
|
}, key_0);
|
|
168
254
|
})
|
|
169
255
|
});
|
|
256
|
+
|
|
257
|
+
// Use ActionListContainerContext.Provider only for the old behavior (when feature flag is disabled)
|
|
258
|
+
if (usingRemoveActiveDescendant) {
|
|
259
|
+
return /*#__PURE__*/jsx(ActionListContainerContext.Provider, {
|
|
260
|
+
value: {
|
|
261
|
+
container: 'FilteredActionList',
|
|
262
|
+
listRole: 'listbox',
|
|
263
|
+
selectionAttribute: 'aria-selected',
|
|
264
|
+
selectionVariant,
|
|
265
|
+
enableFocusZone: true
|
|
266
|
+
},
|
|
267
|
+
children: actionListContent
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
return actionListContent;
|
|
271
|
+
}
|
|
170
272
|
}
|
|
171
|
-
return /*#__PURE__*/jsxs(
|
|
172
|
-
|
|
173
|
-
flexDirection: "column",
|
|
174
|
-
overflow: "hidden",
|
|
273
|
+
return /*#__PURE__*/jsxs(BoxWithFallback, {
|
|
274
|
+
ref: inputAndListContainerRef,
|
|
175
275
|
sx: sx,
|
|
176
|
-
className: className,
|
|
276
|
+
className: clsx(className, classes.Root),
|
|
177
277
|
"data-testid": "filtered-action-list",
|
|
178
278
|
children: [/*#__PURE__*/jsx(StyledHeader, {
|
|
179
279
|
children: /*#__PURE__*/jsx(TextInput, {
|
|
@@ -184,6 +284,7 @@ function FilteredActionList({
|
|
|
184
284
|
value: filterValue,
|
|
185
285
|
onChange: onInputChange,
|
|
186
286
|
onKeyPress: onInputKeyPress,
|
|
287
|
+
onKeyDown: usingRemoveActiveDescendant ? onInputKeyDown : () => {},
|
|
187
288
|
placeholder: placeholderText,
|
|
188
289
|
role: "combobox",
|
|
189
290
|
"aria-expanded": "true",
|
|
@@ -199,6 +300,19 @@ function FilteredActionList({
|
|
|
199
300
|
}), /*#__PURE__*/jsx(VisuallyHidden, {
|
|
200
301
|
id: inputDescriptionTextId,
|
|
201
302
|
children: "Items will be filtered as you type"
|
|
303
|
+
}), onSelectAllChange !== undefined && /*#__PURE__*/jsxs("div", {
|
|
304
|
+
className: classes.SelectAllContainer,
|
|
305
|
+
children: [/*#__PURE__*/jsx(Checkbox, {
|
|
306
|
+
id: "select-all-checkbox",
|
|
307
|
+
className: classes.SelectAllCheckbox,
|
|
308
|
+
checked: selectAllChecked,
|
|
309
|
+
indeterminate: selectAllIndeterminate,
|
|
310
|
+
onChange: handleSelectAllChange
|
|
311
|
+
}), /*#__PURE__*/jsx("label", {
|
|
312
|
+
className: classes.SelectAllLabel,
|
|
313
|
+
htmlFor: "select-all-checkbox",
|
|
314
|
+
children: selectAllLabelText
|
|
315
|
+
})]
|
|
202
316
|
}), /*#__PURE__*/jsx("div", {
|
|
203
317
|
ref: scrollContainerRef,
|
|
204
318
|
className: classes.Container,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './FilteredActionList-
|
|
1
|
+
import './FilteredActionList-96b126d7.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"Container":"prc-FilteredActionList-Container-2A9NQ","FullScreenTextInput":"prc-FilteredActionList-FullScreenTextInput-rCAiq"};
|
|
3
|
+
var classes = {"Root":"prc-FilteredActionList-Root-S5E74","Container":"prc-FilteredActionList-Container-2A9NQ","ActionListItem":"prc-FilteredActionList-ActionListItem-39lnB","FullScreenTextInput":"prc-FilteredActionList-FullScreenTextInput-rCAiq","SelectAllContainer":"prc-FilteredActionList-SelectAllContainer-w5otq","SelectAllCheckbox":"prc-FilteredActionList-SelectAllCheckbox-dq2yL","SelectAllLabel":"prc-FilteredActionList-SelectAllLabel-l34LA"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { Stack } from '../Stack/Stack.js';
|
|
3
|
+
import { SkeletonBox } from '../Skeleton/SkeletonBox.js';
|
|
3
4
|
import classes from './FilteredActionListLoaders.module.css.js';
|
|
4
5
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
5
6
|
import Box from '../Box/Box.js';
|
|
6
7
|
import StyledSpinner from '../Spinner/Spinner.js';
|
|
7
|
-
import { SkeletonBox } from '../Skeleton/SkeletonBox.js';
|
|
8
8
|
|
|
9
9
|
class FilteredActionListLoadingType {
|
|
10
10
|
constructor(name, appearsInBody) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { FilteredActionList } from './
|
|
2
|
-
export type { FilteredActionListProps } from './
|
|
1
|
+
export { FilteredActionList } from './FilteredActionList';
|
|
2
|
+
export type { FilteredActionListProps } from './FilteredActionList';
|
|
3
|
+
export type { FilteredActionListItemProps as ItemProps, ItemInput, GroupedListProps, ListPropsBase, RenderItemFn, } from './types';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|