@primer/react 0.0.0-20260428150519 → 0.0.0-20260428192448
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 +15 -3
- package/dist/ActionBar/ActionBar-3f7b52a3.css +2 -0
- package/dist/ActionBar/ActionBar-3f7b52a3.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +630 -514
- package/dist/ActionBar/ActionBar.module.css.js +5 -10
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionBar/index.js +8 -8
- package/dist/ActionList/{ActionList-53389912.css → ActionList-09f5c4a8.css} +2 -2
- package/dist/ActionList/ActionList-09f5c4a8.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +5 -31
- package/dist/ActionList/ActionListContainerContext.js +5 -4
- package/dist/ActionList/Description.js +133 -117
- package/dist/ActionList/Divider.js +38 -31
- package/dist/ActionList/Group.js +349 -292
- package/dist/ActionList/Group.module.css.js +5 -10
- package/dist/ActionList/Heading.js +106 -88
- package/dist/ActionList/Heading.module.css.js +5 -5
- package/dist/ActionList/Item.js +811 -668
- package/dist/ActionList/LinkItem.js +56 -36
- package/dist/ActionList/List.js +210 -168
- package/dist/ActionList/Selection.d.ts +2 -3
- package/dist/ActionList/Selection.d.ts.map +1 -1
- package/dist/ActionList/Selection.js +112 -83
- package/dist/ActionList/TrailingAction.js +112 -97
- package/dist/ActionList/Visuals.js +191 -143
- package/dist/ActionList/index.d.ts +7 -0
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/index.js +38 -33
- package/dist/ActionList/shared.js +9 -5
- package/dist/ActionMenu/ActionMenu.js +310 -223
- package/dist/ActionMenu/ActionMenu.module.css.js +5 -5
- package/dist/AnchoredOverlay/AnchoredOverlay.js +280 -206
- package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +5 -9
- package/dist/Autocomplete/Autocomplete.js +141 -125
- package/dist/Autocomplete/AutocompleteContext.js +20 -18
- package/dist/Autocomplete/AutocompleteInput.js +146 -108
- package/dist/Autocomplete/AutocompleteMenu.js +238 -201
- package/dist/Autocomplete/AutocompleteMenu.module.css.js +5 -8
- package/dist/Autocomplete/AutocompleteOverlay.js +79 -54
- package/dist/Autocomplete/AutocompleteOverlay.module.css.js +5 -5
- package/dist/Avatar/Avatar.js +133 -106
- package/dist/Avatar/Avatar.module.css.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +143 -102
- package/dist/AvatarStack/AvatarStack.module.css.js +5 -9
- package/dist/Banner/Banner.js +186 -133
- package/dist/Banner/Banner.module.css.js +5 -14
- package/dist/Banner/index.js +7 -7
- package/dist/BaseStyles.js +91 -74
- package/dist/BaseStyles.module.css.js +5 -5
- package/dist/Blankslate/Blankslate.js +328 -266
- package/dist/Blankslate/Blankslate.module.css.js +5 -12
- package/dist/Blankslate/BlankslateContext.js +9 -7
- package/dist/Blankslate/index.js +9 -9
- package/dist/BranchName/BranchName.js +59 -49
- package/dist/BranchName/BranchName.module.css.js +5 -5
- package/dist/Breadcrumbs/Breadcrumbs.js +431 -371
- package/dist/Breadcrumbs/Breadcrumbs.module.css.js +5 -15
- package/dist/Button/Button.js +18 -15
- package/dist/Button/ButtonBase.js +139 -76
- package/dist/Button/ButtonBase.module.css.js +5 -16
- package/dist/Button/IconButton.js +74 -42
- package/dist/Button/LinkButton.js +17 -13
- package/dist/ButtonGroup/ButtonGroup.js +97 -80
- package/dist/ButtonGroup/ButtonGroup.module.css.js +5 -5
- package/dist/Card/Card.js +491 -401
- package/dist/Card/Card.module.css.js +5 -18
- package/dist/Card/index.js +9 -9
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +75 -52
- package/dist/Checkbox/Checkbox.module.css.js +5 -9
- package/dist/Checkbox/shared.module.css.js +5 -5
- package/dist/CheckboxGroup/CheckboxGroup.js +132 -111
- package/dist/CheckboxGroup/CheckboxGroupContext.js +4 -4
- package/dist/CircleBadge/CircleBadge.js +90 -77
- package/dist/CircleBadge/CircleBadge.module.css.js +5 -8
- package/dist/ConfirmationDialog/ConfirmationDialog.js +92 -68
- package/dist/CounterLabel/CounterLabel.js +99 -83
- package/dist/CounterLabel/CounterLabel.module.css.js +5 -5
- package/dist/DataTable/DataTable.js +140 -100
- package/dist/DataTable/ErrorDialog.js +45 -33
- package/dist/DataTable/Pagination.js +592 -464
- package/dist/DataTable/Pagination.module.css.js +5 -13
- package/dist/DataTable/Table.js +710 -527
- package/dist/DataTable/Table.module.css.js +5 -26
- package/dist/DataTable/column.js +11 -10
- package/dist/DataTable/index.js +20 -22
- package/dist/DataTable/sorting.js +103 -65
- package/dist/DataTable/useTable.js +290 -207
- package/dist/Details/Details.js +126 -100
- package/dist/Details/Details.module.css.js +5 -5
- package/dist/Dialog/Dialog.js +351 -259
- package/dist/Dialog/Dialog.module.css.js +5 -22
- package/dist/FeatureFlags/DefaultFeatureFlags.js +7 -7
- package/dist/FeatureFlags/FeatureFlagContext.js +5 -5
- package/dist/FeatureFlags/FeatureFlagScope.js +44 -36
- package/dist/FeatureFlags/FeatureFlags.js +37 -29
- package/dist/FeatureFlags/useFeatureFlag.js +19 -17
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +559 -454
- package/dist/FilteredActionList/FilteredActionList.module.css.js +5 -15
- package/dist/FilteredActionList/FilteredActionListInput.d.ts +15 -0
- package/dist/FilteredActionList/FilteredActionListInput.d.ts.map +1 -0
- package/dist/FilteredActionList/FilteredActionListInput.js +119 -0
- package/dist/FilteredActionList/FilteredActionListLoaders.js +150 -119
- package/dist/FilteredActionList/FilteredActionListLoaders.module.css.js +5 -9
- package/dist/FilteredActionList/index.d.ts +9 -1
- package/dist/FilteredActionList/index.d.ts.map +1 -1
- package/dist/FilteredActionList/index.js +11 -0
- package/dist/FilteredActionList/useAnnouncements.js +180 -167
- package/dist/Flash/Flash.js +69 -57
- package/dist/Flash/Flash.module.css.js +5 -5
- package/dist/FormControl/FormControl.js +227 -211
- package/dist/FormControl/FormControl.module.css.js +5 -11
- package/dist/FormControl/FormControlCaption.js +49 -37
- package/dist/FormControl/FormControlCaption.module.css.js +5 -5
- package/dist/FormControl/FormControlLabel.js +115 -95
- package/dist/FormControl/FormControlLeadingVisual.js +37 -29
- package/dist/FormControl/FormControlLeadingVisual.module.css.js +5 -5
- package/dist/FormControl/_FormControlContext.js +48 -41
- package/dist/FormControl/_FormControlValidation.js +39 -29
- package/dist/Header/Header.js +165 -138
- package/dist/Header/Header.module.css.js +5 -9
- package/dist/Heading/Heading.js +37 -26
- package/dist/Heading/Heading.module.css.js +5 -5
- package/dist/Hidden/Hidden.js +77 -54
- package/dist/Hidden/Hidden.module.css.js +5 -5
- package/dist/InlineMessage/InlineMessage.js +116 -88
- package/dist/InlineMessage/InlineMessage.module.css.js +5 -8
- package/dist/KeybindingHint/KeybindingHint.js +88 -70
- package/dist/KeybindingHint/KeybindingHint.module.css.js +5 -5
- package/dist/KeybindingHint/components/Chord.js +93 -81
- package/dist/KeybindingHint/components/Chord.module.css.js +5 -11
- package/dist/KeybindingHint/components/Key.js +66 -49
- package/dist/KeybindingHint/components/Sequence.js +24 -12
- package/dist/KeybindingHint/key-names.js +114 -99
- package/dist/Label/Label.js +66 -56
- package/dist/Label/Label.module.css.js +5 -5
- package/dist/Label/index.js +5 -5
- package/dist/LabelGroup/LabelGroup.js +344 -260
- package/dist/LabelGroup/LabelGroup.module.css.js +5 -12
- package/dist/Link/Link.js +47 -31
- package/dist/Link/Link.module.css.js +5 -5
- package/dist/NavList/NavList.js +614 -424
- package/dist/NavList/NavList.module.css.js +5 -5
- package/dist/Octicon/Octicon.js +37 -35
- package/dist/Overlay/Overlay.js +318 -264
- package/dist/Overlay/Overlay.module.css.js +5 -8
- package/dist/PageHeader/PageHeader.js +823 -579
- package/dist/PageHeader/PageHeader.module.css.js +5 -21
- package/dist/PageLayout/PageLayout.js +913 -631
- package/dist/PageLayout/PageLayout.module.css.js +5 -31
- package/dist/PageLayout/paneUtils.js +29 -15
- package/dist/PageLayout/usePaneWidth.js +437 -334
- package/dist/Pagehead/Pagehead.js +14 -10
- package/dist/Pagehead/Pagehead.module.css.js +5 -5
- package/dist/Pagination/Pagination.js +114 -84
- package/dist/Pagination/Pagination.module.css.js +5 -9
- package/dist/Pagination/index.js +5 -5
- package/dist/Pagination/model.js +194 -118
- package/dist/Popover/Popover.js +151 -126
- package/dist/Popover/Popover.module.css.js +5 -8
- package/dist/Portal/Portal.js +85 -65
- package/dist/Portal/index.js +6 -5
- package/dist/ProgressBar/ProgressBar.js +255 -210
- package/dist/ProgressBar/ProgressBar.module.css.js +5 -9
- package/dist/ProgressBar/index.js +8 -6
- package/dist/Radio/Radio.js +115 -97
- package/dist/Radio/Radio.module.css.js +5 -5
- package/dist/RadioGroup/RadioGroup.js +118 -99
- package/dist/RelativeTime/RelativeTime.js +76 -64
- package/dist/ScrollableRegion/ScrollableRegion.js +79 -67
- package/dist/ScrollableRegion/ScrollableRegion.module.css.js +5 -5
- package/dist/SegmentedControl/SegmentedControl.js +287 -238
- package/dist/SegmentedControl/SegmentedControl.module.css.js +5 -15
- package/dist/SegmentedControl/SegmentedControlButton.js +187 -156
- package/dist/SegmentedControl/SegmentedControlIconButton.js +161 -133
- package/dist/Select/Select.js +234 -185
- package/dist/Select/Select.module.css.js +5 -10
- package/dist/SelectPanel/SelectPanel.d.ts +1 -0
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +829 -620
- package/dist/SelectPanel/SelectPanel.module.css.js +5 -27
- package/dist/SelectPanel/SelectPanelMessage.js +39 -37
- package/dist/SelectPanel/index.d.ts +1 -0
- package/dist/SelectPanel/index.d.ts.map +1 -1
- package/dist/SideNav.js +47 -24
- package/dist/SideNav.module.css.js +5 -12
- package/dist/Skeleton/SkeletonBox.js +111 -94
- package/dist/Skeleton/SkeletonBox.module.css.js +5 -8
- package/dist/SkeletonAvatar/SkeletonAvatar.js +120 -95
- package/dist/SkeletonAvatar/SkeletonAvatar.module.css.js +5 -5
- package/dist/SkeletonText/SkeletonText.js +137 -114
- package/dist/SkeletonText/SkeletonText.module.css.js +5 -8
- package/dist/Spinner/Spinner.js +211 -183
- package/dist/Spinner/Spinner.module.css.js +5 -9
- package/dist/SplitPageLayout/SplitPageLayout.js +276 -215
- package/dist/Stack/Stack.js +255 -207
- package/dist/Stack/Stack.module.css.js +5 -8
- package/dist/Stack/index.js +6 -4
- package/dist/StateLabel/StateLabel.js +123 -110
- package/dist/StateLabel/StateLabel.module.css.js +5 -8
- package/dist/SubNav/SubNav.js +197 -159
- package/dist/SubNav/SubNav.module.css.js +5 -11
- package/dist/TabNav/TabNav.js +199 -167
- package/dist/TabNav/TabNav.module.css.js +5 -10
- package/dist/Text/Text.js +67 -56
- package/dist/Text/Text.module.css.js +5 -5
- package/dist/TextInput/TextInput.js +228 -195
- package/dist/TextInput/TextInput.module.css.js +5 -8
- package/dist/TextInputWithTokens/TextInputWithTokens.js +673 -567
- package/dist/TextInputWithTokens/TextInputWithTokens.module.css.js +5 -14
- package/dist/Textarea/TextArea.module.css.js +5 -9
- package/dist/Textarea/Textarea.js +294 -264
- package/dist/ThemeProvider.js +257 -199
- package/dist/Timeline/Timeline.js +247 -204
- package/dist/Timeline/Timeline.module.css.js +5 -12
- package/dist/ToggleSwitch/ToggleSwitch.js +471 -403
- package/dist/ToggleSwitch/ToggleSwitch.module.css.js +5 -16
- package/dist/Token/IssueLabelToken.js +297 -256
- package/dist/Token/IssueLabelToken.module.css.js +5 -8
- package/dist/Token/Token.js +280 -232
- package/dist/Token/Token.module.css.js +5 -9
- package/dist/Token/TokenBase.js +126 -99
- package/dist/Token/TokenBase.module.css.js +5 -5
- package/dist/Token/_RemoveTokenButton.js +48 -27
- package/dist/Token/_RemoveTokenButton.module.css.js +5 -5
- package/dist/Token/_TokenTextContainer.js +65 -54
- package/dist/Token/_TokenTextContainer.module.css.js +5 -5
- package/dist/Tooltip/Tooltip.js +56 -49
- package/dist/Tooltip/Tooltip.module.css.js +5 -20
- package/dist/TooltipV2/Tooltip.js +305 -222
- package/dist/TooltipV2/Tooltip.module.css.js +5 -11
- package/dist/TopicTag/TopicTag.js +55 -46
- package/dist/TopicTag/TopicTag.module.css.js +5 -5
- package/dist/TopicTag/TopicTagGroup.js +48 -40
- package/dist/TopicTag/TopicTagGroup.module.css.js +5 -5
- package/dist/TopicTag/index.js +7 -5
- package/dist/TreeView/TreeView.js +1414 -1082
- package/dist/TreeView/TreeView.module.css.js +5 -24
- package/dist/TreeView/shared.js +9 -10
- package/dist/TreeView/useRovingTabIndex.js +203 -129
- package/dist/TreeView/useTreeItemCache.js +79 -64
- package/dist/TreeView/useTypeahead.js +112 -90
- package/dist/Truncate/Truncate.js +33 -21
- package/dist/Truncate/Truncate.module.css.js +5 -5
- package/dist/UnderlineNav/UnderlineNav.js +375 -278
- package/dist/UnderlineNav/UnderlineNav.module.css.js +5 -8
- package/dist/UnderlineNav/UnderlineNavContext.js +8 -8
- package/dist/UnderlineNav/UnderlineNavItem.js +72 -56
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +5 -5
- package/dist/UnderlineNav/index.js +7 -5
- package/dist/UnderlineNav/styles.js +15 -11
- package/dist/VisuallyHidden/VisuallyHidden.js +49 -51
- package/dist/VisuallyHidden/VisuallyHidden.module.css.js +5 -5
- package/dist/_VisuallyHidden.js +62 -50
- package/dist/_VisuallyHidden.module.css.js +5 -5
- package/dist/deprecated/ActionList/Divider.js +23 -23
- package/dist/deprecated/ActionList/Divider.module.css.js +5 -5
- package/dist/deprecated/ActionList/Group.js +50 -43
- package/dist/deprecated/ActionList/Header.js +81 -69
- package/dist/deprecated/ActionList/Header.module.css.js +5 -5
- package/dist/deprecated/ActionList/Item.js +352 -308
- package/dist/deprecated/ActionList/Item.module.css.js +5 -18
- package/dist/deprecated/ActionList/List.js +196 -157
- package/dist/deprecated/ActionList/List.module.css.js +5 -5
- package/dist/deprecated/ActionList/index.js +14 -14
- package/dist/deprecated/ActionMenu.js +190 -159
- package/dist/deprecated/DialogV1/Dialog.js +200 -166
- package/dist/deprecated/DialogV1/Dialog.module.css.js +5 -11
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +51 -43
- package/dist/deprecated/FilteredSearch/FilteredSearch.module.css.js +5 -5
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +160 -132
- package/dist/deprecated/UnderlineNav/UnderlineNav.module.css.js +5 -14
- package/dist/deprecated/index.js +9 -20
- package/dist/experimental/IssueLabel/IssueLabel.js +158 -134
- package/dist/experimental/IssueLabel/IssueLabel.module.css.js +5 -5
- package/dist/experimental/SelectPanel2/SelectPanel.js +567 -419
- package/dist/experimental/SelectPanel2/SelectPanel.module.css.js +5 -32
- package/dist/experimental/Tabs/Tabs.js +297 -234
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +215 -165
- package/dist/experimental/UnderlinePanels/UnderlinePanels.module.css.js +5 -5
- package/dist/experimental/index.d.ts +2 -2
- package/dist/experimental/index.d.ts.map +1 -1
- package/dist/experimental/index.js +34 -44
- package/dist/hooks/useAnchoredPosition.js +144 -123
- package/dist/hooks/useControllableState.js +59 -34
- package/dist/hooks/useDetails.js +99 -84
- package/dist/hooks/useDialog.js +178 -140
- package/dist/hooks/useFocusTrap.js +71 -57
- package/dist/hooks/useFocusZone.js +38 -32
- package/dist/hooks/useId.js +16 -14
- package/dist/hooks/useIsMacOS.js +26 -21
- package/dist/hooks/useMedia.js +68 -54
- package/dist/hooks/useMenuInitialFocus.js +62 -65
- package/dist/hooks/useMenuKeyboardNavigation.js +126 -129
- package/dist/hooks/useMergedRefs.js +78 -63
- package/dist/hooks/useMnemonics.js +107 -77
- package/dist/hooks/useOnEscapePress.js +56 -45
- package/dist/hooks/useOnOutsideClick.js +63 -32
- package/dist/hooks/useOpenAndCloseFocus.js +43 -40
- package/dist/hooks/useOverflow.js +36 -32
- package/dist/hooks/useOverlay.js +75 -56
- package/dist/hooks/useProvidedRefOrCreate.js +24 -24
- package/dist/hooks/useProvidedStateOrCreate.js +39 -33
- package/dist/hooks/useRefObjectAsForwardedRef.js +32 -30
- package/dist/hooks/useRenderForcingRef.js +46 -42
- package/dist/hooks/useResizeObserver.js +43 -32
- package/dist/hooks/useResponsiveValue.js +57 -37
- package/dist/hooks/useSafeTimeout.js +29 -26
- package/dist/hooks/useScrollFlash.js +23 -16
- package/dist/hooks/useSlots.js +136 -102
- package/dist/hooks/useSyncedState.js +37 -31
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -88
- package/dist/internal/components/ButtonReset.js +50 -45
- package/dist/internal/components/ButtonReset.module.css.js +5 -5
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +105 -79
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.module.css.js +5 -12
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +21 -16
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +35 -26
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +19 -14
- package/dist/internal/components/ConditionalWrapper.js +51 -41
- package/dist/internal/components/InputLabel.js +113 -92
- package/dist/internal/components/InputLabel.module.css.js +5 -8
- package/dist/internal/components/InputValidation.js +87 -67
- package/dist/internal/components/InputValidation.module.css.js +5 -9
- package/dist/internal/components/TextInputInnerAction.js +173 -134
- package/dist/internal/components/TextInputInnerAction.module.css.js +5 -9
- package/dist/internal/components/TextInputInnerVisualSlot.js +110 -89
- package/dist/internal/components/TextInputInnerVisualSlot.module.css.js +5 -11
- package/dist/internal/components/TextInputWrapper.js +230 -187
- package/dist/internal/components/TextInputWrapper.module.css.js +5 -8
- package/dist/internal/components/UnderlineTabbedInterface.js +238 -191
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +5 -11
- package/dist/internal/components/UnstyledTextInput.js +47 -40
- package/dist/internal/components/UnstyledTextInput.module.css.js +5 -5
- package/dist/internal/components/ValidationAnimationContainer.js +66 -55
- package/dist/internal/components/ValidationAnimationContainer.module.css.js +5 -8
- package/dist/internal/hooks/useEffectCallback.js +38 -35
- package/dist/internal/hooks/useEffectOnce.js +25 -23
- package/dist/internal/utils/getResponsiveAttributes.js +26 -23
- package/dist/internal/utils/hasInteractiveNodes.js +46 -34
- package/dist/legacy-theme/ts/color-schemes.js +4732 -4250
- package/dist/live-region/Announce.js +183 -144
- package/dist/live-region/AriaAlert.js +22 -20
- package/dist/live-region/AriaStatus.js +22 -20
- package/dist/next/index.js +1 -3
- package/dist/test-helpers.js +62 -40
- package/dist/theme.js +47 -83
- package/dist/utils/character-counter.js +63 -45
- package/dist/utils/create-component.js +16 -15
- package/dist/utils/descendant-registry.js +218 -182
- package/dist/utils/environment.js +7 -7
- package/dist/utils/getBreakpointDeclarations.js +10 -9
- package/dist/utils/invariant.js +23 -17
- package/dist/utils/is-slot.js +11 -10
- package/dist/utils/isNumeric.js +3 -3
- package/dist/utils/modern-polymorphic.js +20 -12
- package/dist/utils/scroll.js +11 -8
- package/dist/utils/theme.js +10 -5
- package/dist/utils/useIsomorphicLayoutEffect.js +9 -4
- package/dist/utils/warning.js +21 -14
- package/generated/components.json +1 -1
- package/package.json +10 -5
- package/dist/ActionBar/ActionBar-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/ActionList/ActionList-53389912.css.map +0 -1
package/dist/ActionList/Item.js
CHANGED
|
@@ -1,680 +1,823 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useId } from '../hooks/useId.js';
|
|
4
|
+
import { useSlots } from '../hooks/useSlots.js';
|
|
5
|
+
import { ActionListContainerContext } from './ActionListContainerContext.js';
|
|
6
|
+
import { Description } from './Description.js';
|
|
7
|
+
import { GroupContext } from './Group.js';
|
|
8
|
+
import { Selection } from './Selection.js';
|
|
9
|
+
import { TrailingVisual, LeadingVisual, VisualOrIndicator } from './Visuals.js';
|
|
10
|
+
import { ListContext, ItemContext } from './shared.js';
|
|
11
|
+
import { TrailingAction } from './TrailingAction.js';
|
|
12
|
+
import { ConditionalWrapper } from '../internal/components/ConditionalWrapper.js';
|
|
13
|
+
import { invariant } from '../utils/invariant.js';
|
|
14
|
+
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
15
|
+
import classes from './ActionList.module.css.js';
|
|
16
|
+
import { clsx } from 'clsx';
|
|
17
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
18
|
+
import { TooltipContext, Tooltip } from '../TooltipV2/Tooltip.js';
|
|
19
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
|
+
|
|
21
21
|
/**
|
|
22
|
-
* Wraps button-semantic items with Tooltip, disabled when not truncated
|
|
23
|
-
* For non-button-semantic items, renders children directly.
|
|
24
|
-
*/
|
|
25
|
-
const ConditionalTooltip =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
22
|
+
* Wraps button-semantic items with Tooltip, disabled when not truncated
|
|
23
|
+
* For non-button-semantic items, renders children directly.
|
|
24
|
+
*/
|
|
25
|
+
const ConditionalTooltip = /*#__PURE__*/React.forwardRef(function ConditionalTooltip(t0, forwardedRef) {
|
|
26
|
+
const $ = c(4);
|
|
27
|
+
const {
|
|
28
|
+
text,
|
|
29
|
+
enabled,
|
|
30
|
+
children
|
|
31
|
+
} = t0;
|
|
32
|
+
if (!enabled || !text) {
|
|
33
|
+
return children;
|
|
34
|
+
}
|
|
35
|
+
const t1 = text || "";
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[0] !== children || $[1] !== forwardedRef || $[2] !== t1) {
|
|
38
|
+
t2 = /*#__PURE__*/jsx(Tooltip, {
|
|
39
|
+
ref: forwardedRef,
|
|
40
|
+
text: t1,
|
|
41
|
+
direction: "e",
|
|
42
|
+
delay: "medium",
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
45
|
+
$[0] = children;
|
|
46
|
+
$[1] = forwardedRef;
|
|
47
|
+
$[2] = t1;
|
|
48
|
+
$[3] = t2;
|
|
49
|
+
} else {
|
|
50
|
+
t2 = $[3];
|
|
51
|
+
}
|
|
52
|
+
return t2;
|
|
45
53
|
});
|
|
46
|
-
const SubItem =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const SubItem = t0 => {
|
|
55
|
+
const $ = c(2);
|
|
56
|
+
const {
|
|
57
|
+
children
|
|
58
|
+
} = t0;
|
|
59
|
+
let t1;
|
|
60
|
+
if ($[0] !== children) {
|
|
61
|
+
t1 = /*#__PURE__*/jsx(Fragment, {
|
|
62
|
+
children: children
|
|
63
|
+
});
|
|
64
|
+
$[0] = children;
|
|
65
|
+
$[1] = t1;
|
|
66
|
+
} else {
|
|
67
|
+
t1 = $[1];
|
|
68
|
+
}
|
|
69
|
+
return t1;
|
|
56
70
|
};
|
|
57
|
-
SubItem.displayName =
|
|
58
|
-
const ButtonItemContainer =
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
71
|
+
SubItem.displayName = 'ActionList.SubItem';
|
|
72
|
+
const ButtonItemContainer = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
73
|
+
const $ = c(9);
|
|
74
|
+
let children;
|
|
75
|
+
let props;
|
|
76
|
+
let style;
|
|
77
|
+
if ($[0] !== t0) {
|
|
78
|
+
({
|
|
79
|
+
children,
|
|
80
|
+
style,
|
|
81
|
+
...props
|
|
82
|
+
} = t0);
|
|
83
|
+
$[0] = t0;
|
|
84
|
+
$[1] = children;
|
|
85
|
+
$[2] = props;
|
|
86
|
+
$[3] = style;
|
|
87
|
+
} else {
|
|
88
|
+
children = $[1];
|
|
89
|
+
props = $[2];
|
|
90
|
+
style = $[3];
|
|
91
|
+
}
|
|
92
|
+
const t1 = forwardedRef;
|
|
93
|
+
let t2;
|
|
94
|
+
if ($[4] !== children || $[5] !== props || $[6] !== style || $[7] !== t1) {
|
|
95
|
+
t2 = /*#__PURE__*/jsx("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
ref: t1,
|
|
98
|
+
style: style,
|
|
99
|
+
...props,
|
|
100
|
+
children: children
|
|
101
|
+
});
|
|
102
|
+
$[4] = children;
|
|
103
|
+
$[5] = props;
|
|
104
|
+
$[6] = style;
|
|
105
|
+
$[7] = t1;
|
|
106
|
+
$[8] = t2;
|
|
107
|
+
} else {
|
|
108
|
+
t2 = $[8];
|
|
109
|
+
}
|
|
110
|
+
return t2;
|
|
91
111
|
});
|
|
92
|
-
const DivItemContainer =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
const DivItemContainer = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
113
|
+
const $ = c(7);
|
|
114
|
+
let children;
|
|
115
|
+
let props;
|
|
116
|
+
if ($[0] !== t0) {
|
|
117
|
+
({
|
|
118
|
+
children,
|
|
119
|
+
...props
|
|
120
|
+
} = t0);
|
|
121
|
+
$[0] = t0;
|
|
122
|
+
$[1] = children;
|
|
123
|
+
$[2] = props;
|
|
124
|
+
} else {
|
|
125
|
+
children = $[1];
|
|
126
|
+
props = $[2];
|
|
127
|
+
}
|
|
128
|
+
const t1 = forwardedRef;
|
|
129
|
+
let t2;
|
|
130
|
+
if ($[3] !== children || $[4] !== props || $[5] !== t1) {
|
|
131
|
+
t2 = /*#__PURE__*/jsx("div", {
|
|
132
|
+
ref: t1,
|
|
133
|
+
...props,
|
|
134
|
+
children: children
|
|
135
|
+
});
|
|
136
|
+
$[3] = children;
|
|
137
|
+
$[4] = props;
|
|
138
|
+
$[5] = t1;
|
|
139
|
+
$[6] = t2;
|
|
140
|
+
} else {
|
|
141
|
+
t2 = $[6];
|
|
142
|
+
}
|
|
143
|
+
return t2;
|
|
119
144
|
});
|
|
145
|
+
const baseSlots = {
|
|
146
|
+
leadingVisual: LeadingVisual,
|
|
147
|
+
trailingVisual: TrailingVisual,
|
|
148
|
+
trailingAction: TrailingAction,
|
|
149
|
+
subItem: SubItem
|
|
150
|
+
};
|
|
120
151
|
const slotsConfig = {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
trailingAction: TrailingAction,
|
|
124
|
-
subItem: SubItem,
|
|
125
|
-
description: Description
|
|
152
|
+
...baseSlots,
|
|
153
|
+
description: Description
|
|
126
154
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
];
|
|
132
|
-
const listRoleTypes = [
|
|
133
|
-
"listbox",
|
|
134
|
-
"menu",
|
|
135
|
-
"list"
|
|
136
|
-
];
|
|
155
|
+
|
|
156
|
+
// Pre-allocated array for selectableRoles check, avoids per-render allocation
|
|
157
|
+
const selectableRoles = ['menuitemradio', 'menuitemcheckbox', 'option'];
|
|
158
|
+
const listRoleTypes = ['listbox', 'menu', 'list'];
|
|
137
159
|
const UnwrappedItem = (t0, forwardedRef) => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
160
|
+
var _slots$trailingVisual, _slots$description$pr, _slots$description;
|
|
161
|
+
const $ = c(159);
|
|
162
|
+
let _PrivateItemWrapper;
|
|
163
|
+
let className;
|
|
164
|
+
let id;
|
|
165
|
+
let inactiveText;
|
|
166
|
+
let loading;
|
|
167
|
+
let onSelectUser;
|
|
168
|
+
let props;
|
|
169
|
+
let role;
|
|
170
|
+
let t1;
|
|
171
|
+
let t2;
|
|
172
|
+
let t3;
|
|
173
|
+
let t4;
|
|
174
|
+
let t5;
|
|
175
|
+
if ($[0] !== t0) {
|
|
176
|
+
const {
|
|
177
|
+
variant: t6,
|
|
178
|
+
size: t7,
|
|
179
|
+
disabled: t8,
|
|
180
|
+
inactiveText: t9,
|
|
181
|
+
selected: t10,
|
|
182
|
+
active: t11,
|
|
183
|
+
onSelect: t12,
|
|
184
|
+
id: t13,
|
|
185
|
+
role: t14,
|
|
186
|
+
loading: t15,
|
|
187
|
+
_PrivateItemWrapper: t16,
|
|
188
|
+
className: t17,
|
|
189
|
+
groupId: _groupId,
|
|
190
|
+
renderItem: _renderItem,
|
|
191
|
+
handleAddItem: _handleAddItem,
|
|
192
|
+
...t18
|
|
193
|
+
} = t0;
|
|
194
|
+
t1 = t6;
|
|
195
|
+
t2 = t7;
|
|
196
|
+
t3 = t8;
|
|
197
|
+
inactiveText = t9;
|
|
198
|
+
t4 = t10;
|
|
199
|
+
t5 = t11;
|
|
200
|
+
onSelectUser = t12;
|
|
201
|
+
id = t13;
|
|
202
|
+
role = t14;
|
|
203
|
+
loading = t15;
|
|
204
|
+
_PrivateItemWrapper = t16;
|
|
205
|
+
className = t17;
|
|
206
|
+
props = t18;
|
|
207
|
+
$[0] = t0;
|
|
208
|
+
$[1] = _PrivateItemWrapper;
|
|
209
|
+
$[2] = className;
|
|
210
|
+
$[3] = id;
|
|
211
|
+
$[4] = inactiveText;
|
|
212
|
+
$[5] = loading;
|
|
213
|
+
$[6] = onSelectUser;
|
|
214
|
+
$[7] = props;
|
|
215
|
+
$[8] = role;
|
|
216
|
+
$[9] = t1;
|
|
217
|
+
$[10] = t2;
|
|
218
|
+
$[11] = t3;
|
|
219
|
+
$[12] = t4;
|
|
220
|
+
$[13] = t5;
|
|
221
|
+
} else {
|
|
222
|
+
_PrivateItemWrapper = $[1];
|
|
223
|
+
className = $[2];
|
|
224
|
+
id = $[3];
|
|
225
|
+
inactiveText = $[4];
|
|
226
|
+
loading = $[5];
|
|
227
|
+
onSelectUser = $[6];
|
|
228
|
+
props = $[7];
|
|
229
|
+
role = $[8];
|
|
230
|
+
t1 = $[9];
|
|
231
|
+
t2 = $[10];
|
|
232
|
+
t3 = $[11];
|
|
233
|
+
t4 = $[12];
|
|
234
|
+
t5 = $[13];
|
|
235
|
+
}
|
|
236
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
237
|
+
const size = t2 === undefined ? "medium" : t2;
|
|
238
|
+
const disabled = t3 === undefined ? false : t3;
|
|
239
|
+
const selected = t4 === undefined ? undefined : t4;
|
|
240
|
+
const active = t5 === undefined ? false : t5;
|
|
241
|
+
const [partialSlots, childrenWithoutSlots] = useSlots(props.children, slotsConfig);
|
|
242
|
+
let t6;
|
|
243
|
+
if ($[14] !== partialSlots) {
|
|
244
|
+
t6 = {
|
|
245
|
+
description: undefined,
|
|
246
|
+
...partialSlots
|
|
247
|
+
};
|
|
248
|
+
$[14] = partialSlots;
|
|
249
|
+
$[15] = t6;
|
|
250
|
+
} else {
|
|
251
|
+
t6 = $[15];
|
|
252
|
+
}
|
|
253
|
+
const slots = t6;
|
|
254
|
+
const {
|
|
255
|
+
container,
|
|
256
|
+
afterSelect,
|
|
257
|
+
selectionAttribute,
|
|
258
|
+
defaultTrailingVisual
|
|
259
|
+
} = React.useContext(ActionListContainerContext);
|
|
260
|
+
let t7;
|
|
261
|
+
if ($[16] !== defaultTrailingVisual) {
|
|
262
|
+
t7 = defaultTrailingVisual ? /*#__PURE__*/jsx(TrailingVisual, {
|
|
263
|
+
children: defaultTrailingVisual
|
|
264
|
+
}) : null;
|
|
265
|
+
$[16] = defaultTrailingVisual;
|
|
266
|
+
$[17] = t7;
|
|
267
|
+
} else {
|
|
268
|
+
t7 = $[17];
|
|
269
|
+
}
|
|
270
|
+
const wrappedDefaultTrailingVisual = t7;
|
|
271
|
+
const trailingVisual = (_slots$trailingVisual = slots.trailingVisual) !== null && _slots$trailingVisual !== void 0 ? _slots$trailingVisual : wrappedDefaultTrailingVisual;
|
|
272
|
+
const {
|
|
273
|
+
role: listRole,
|
|
274
|
+
selectionVariant: listSelectionVariant
|
|
275
|
+
} = React.useContext(ListContext);
|
|
276
|
+
const {
|
|
277
|
+
selectionVariant: groupSelectionVariant
|
|
278
|
+
} = React.useContext(GroupContext);
|
|
279
|
+
const inactive = Boolean(inactiveText);
|
|
280
|
+
const menuContext = container === "ActionMenu" || container === "SelectPanel" || container === "FilteredActionList";
|
|
281
|
+
let t8;
|
|
282
|
+
if ($[18] !== inactive || $[19] !== listRole) {
|
|
283
|
+
t8 = inactive && !(listRole !== undefined && ["menu", "listbox"].includes(listRole));
|
|
284
|
+
$[18] = inactive;
|
|
285
|
+
$[19] = listRole;
|
|
286
|
+
$[20] = t8;
|
|
287
|
+
} else {
|
|
288
|
+
t8 = $[20];
|
|
289
|
+
}
|
|
290
|
+
const showInactiveIndicator = t8;
|
|
291
|
+
let t9;
|
|
292
|
+
if ($[21] !== onSelectUser) {
|
|
293
|
+
t9 = (event, afterSelect_0) => {
|
|
294
|
+
if (typeof onSelectUser === "function") {
|
|
295
|
+
onSelectUser(event);
|
|
296
|
+
}
|
|
297
|
+
if (event.defaultPrevented) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (typeof afterSelect_0 === "function") {
|
|
301
|
+
afterSelect_0(event);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
$[21] = onSelectUser;
|
|
305
|
+
$[22] = t9;
|
|
306
|
+
} else {
|
|
307
|
+
t9 = $[22];
|
|
308
|
+
}
|
|
309
|
+
const onSelect = t9;
|
|
310
|
+
const selectionVariant = groupSelectionVariant ? groupSelectionVariant : listSelectionVariant;
|
|
311
|
+
let inferredItemRole;
|
|
312
|
+
if (container === "ActionMenu") {
|
|
313
|
+
if (selectionVariant === "single") {
|
|
314
|
+
inferredItemRole = "menuitemradio";
|
|
315
|
+
} else {
|
|
316
|
+
if (selectionVariant === "multiple") {
|
|
317
|
+
inferredItemRole = "menuitemcheckbox";
|
|
318
|
+
} else {
|
|
319
|
+
inferredItemRole = "menuitem";
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
if (listRole === "listbox") {
|
|
324
|
+
if (selectionVariant !== undefined && !role) {
|
|
325
|
+
inferredItemRole = "option";
|
|
326
|
+
}
|
|
327
|
+
} else {
|
|
328
|
+
if (listRole === "tablist") {
|
|
329
|
+
inferredItemRole = "tab";
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
const itemRole = role || inferredItemRole;
|
|
334
|
+
if (slots.trailingAction) {
|
|
335
|
+
!!menuContext ? process.env.NODE_ENV !== "production" ? invariant(false, "ActionList.TrailingAction can not be used within a list with an ARIA role of \"menu\" or \"listbox\".") : invariant(false) : void 0;
|
|
336
|
+
}
|
|
337
|
+
let inferredSelectionAttribute;
|
|
338
|
+
if (itemRole === "menuitemradio" || itemRole === "menuitemcheckbox") {
|
|
339
|
+
inferredSelectionAttribute = "aria-checked";
|
|
340
|
+
} else {
|
|
341
|
+
if (itemRole === "option") {
|
|
342
|
+
inferredSelectionAttribute = "aria-selected";
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
const itemSelectionAttribute = selectionAttribute || inferredSelectionAttribute;
|
|
346
|
+
const listItemSemantics = itemRole === "option" || itemRole === "menuitem" || itemRole === "menuitemradio" || itemRole === "menuitemcheckbox" || itemRole === "tab";
|
|
347
|
+
let t10;
|
|
348
|
+
if ($[23] !== inactive || $[24] !== listItemSemantics || $[25] !== listRole) {
|
|
349
|
+
t10 = listRole && listRoleTypes.includes(listRole) || inactive || listItemSemantics;
|
|
350
|
+
$[23] = inactive;
|
|
351
|
+
$[24] = listItemSemantics;
|
|
352
|
+
$[25] = listRole;
|
|
353
|
+
$[26] = t10;
|
|
354
|
+
} else {
|
|
355
|
+
t10 = $[26];
|
|
356
|
+
}
|
|
357
|
+
const listSemantics = t10;
|
|
358
|
+
const buttonSemantics = !listSemantics && !_PrivateItemWrapper;
|
|
359
|
+
let t11;
|
|
360
|
+
if ($[27] !== afterSelect || $[28] !== disabled || $[29] !== inactive || $[30] !== loading || $[31] !== onSelect) {
|
|
361
|
+
t11 = event_0 => {
|
|
362
|
+
if (disabled || inactive || loading) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
onSelect(event_0, afterSelect);
|
|
366
|
+
};
|
|
367
|
+
$[27] = afterSelect;
|
|
368
|
+
$[28] = disabled;
|
|
369
|
+
$[29] = inactive;
|
|
370
|
+
$[30] = loading;
|
|
371
|
+
$[31] = onSelect;
|
|
372
|
+
$[32] = t11;
|
|
373
|
+
} else {
|
|
374
|
+
t11 = $[32];
|
|
375
|
+
}
|
|
376
|
+
const clickHandler = t11;
|
|
377
|
+
let t12;
|
|
378
|
+
if ($[33] !== afterSelect || $[34] !== disabled || $[35] !== inactive || $[36] !== loading || $[37] !== onSelect) {
|
|
379
|
+
t12 = event_1 => {
|
|
380
|
+
if (disabled || inactive || loading) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (event_1.key === " " || event_1.key === "Enter") {
|
|
384
|
+
if (event_1.key === " ") {
|
|
385
|
+
event_1.preventDefault();
|
|
386
|
+
event_1.defaultPrevented = false;
|
|
387
|
+
}
|
|
388
|
+
onSelect(event_1, afterSelect);
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
$[33] = afterSelect;
|
|
392
|
+
$[34] = disabled;
|
|
393
|
+
$[35] = inactive;
|
|
394
|
+
$[36] = loading;
|
|
395
|
+
$[37] = onSelect;
|
|
396
|
+
$[38] = t12;
|
|
397
|
+
} else {
|
|
398
|
+
t12 = $[38];
|
|
399
|
+
}
|
|
400
|
+
const keyPressHandler = t12;
|
|
401
|
+
const itemId = useId(id);
|
|
402
|
+
const labelId = `${itemId}--label`;
|
|
403
|
+
const inlineDescriptionId = `${itemId}--inline-description`;
|
|
404
|
+
const blockDescriptionId = `${itemId}--block-description`;
|
|
405
|
+
const trailingVisualId = `${itemId}--trailing-visual`;
|
|
406
|
+
const inactiveWarningId = inactive && !showInactiveIndicator ? `${itemId}--warning-message` : undefined;
|
|
407
|
+
const [truncatedText, setTruncatedText] = React.useState(undefined);
|
|
408
|
+
const DefaultItemWrapper = listSemantics ? DivItemContainer : ButtonItemContainer;
|
|
409
|
+
const ItemWrapper = _PrivateItemWrapper || DefaultItemWrapper;
|
|
410
|
+
let t13;
|
|
411
|
+
if ($[39] !== itemRole || $[40] !== itemSelectionAttribute) {
|
|
412
|
+
t13 = itemSelectionAttribute && itemRole && selectableRoles.includes(itemRole);
|
|
413
|
+
$[39] = itemRole;
|
|
414
|
+
$[40] = itemSelectionAttribute;
|
|
415
|
+
$[41] = t13;
|
|
416
|
+
} else {
|
|
417
|
+
t13 = $[41];
|
|
418
|
+
}
|
|
419
|
+
const includeSelectionAttribute = t13;
|
|
420
|
+
const focusable = showInactiveIndicator ? true : undefined;
|
|
421
|
+
const descriptionVariant = (_slots$description$pr = (_slots$description = slots.description) === null || _slots$description === void 0 ? void 0 : _slots$description.props.variant) !== null && _slots$description$pr !== void 0 ? _slots$description$pr : "inline";
|
|
422
|
+
const hasTrailingVisualSlot = Boolean(slots.trailingVisual);
|
|
423
|
+
const hasDescriptionSlot = Boolean(slots.description);
|
|
424
|
+
let parts;
|
|
425
|
+
if ($[42] !== hasTrailingVisualSlot || $[43] !== labelId || $[44] !== trailingVisualId) {
|
|
426
|
+
parts = [labelId];
|
|
427
|
+
if (hasTrailingVisualSlot) {
|
|
428
|
+
parts.push(trailingVisualId);
|
|
429
|
+
}
|
|
430
|
+
$[42] = hasTrailingVisualSlot;
|
|
431
|
+
$[43] = labelId;
|
|
432
|
+
$[44] = trailingVisualId;
|
|
433
|
+
$[45] = parts;
|
|
434
|
+
} else {
|
|
435
|
+
parts = $[45];
|
|
436
|
+
}
|
|
437
|
+
const ariaLabelledBy = parts.join(" ");
|
|
438
|
+
let parts_0;
|
|
439
|
+
if ($[46] !== blockDescriptionId || $[47] !== descriptionVariant || $[48] !== hasDescriptionSlot || $[49] !== inactiveWarningId || $[50] !== inlineDescriptionId) {
|
|
440
|
+
parts_0 = [];
|
|
441
|
+
if (hasDescriptionSlot && descriptionVariant === "block") {
|
|
442
|
+
parts_0.push(blockDescriptionId);
|
|
443
|
+
}
|
|
444
|
+
if (hasDescriptionSlot && descriptionVariant === "inline") {
|
|
445
|
+
parts_0.push(inlineDescriptionId);
|
|
446
|
+
}
|
|
447
|
+
if (inactiveWarningId) {
|
|
448
|
+
parts_0.push(inactiveWarningId);
|
|
449
|
+
}
|
|
450
|
+
$[46] = blockDescriptionId;
|
|
451
|
+
$[47] = descriptionVariant;
|
|
452
|
+
$[48] = hasDescriptionSlot;
|
|
453
|
+
$[49] = inactiveWarningId;
|
|
454
|
+
$[50] = inlineDescriptionId;
|
|
455
|
+
$[51] = parts_0;
|
|
456
|
+
} else {
|
|
457
|
+
parts_0 = $[51];
|
|
458
|
+
}
|
|
459
|
+
const ariaDescribedBy = parts_0.length > 0 ? parts_0.join(" ") : undefined;
|
|
460
|
+
const t14 = !buttonSemantics ? keyPressHandler : undefined;
|
|
461
|
+
const t15 = disabled ? true : undefined;
|
|
462
|
+
const t16 = inactive ? true : undefined;
|
|
463
|
+
const t17 = loading && !inactive ? true : undefined;
|
|
464
|
+
const t18 = focusable ? undefined : 0;
|
|
465
|
+
let t19;
|
|
466
|
+
if ($[52] !== includeSelectionAttribute || $[53] !== itemSelectionAttribute || $[54] !== selected) {
|
|
467
|
+
t19 = includeSelectionAttribute && {
|
|
468
|
+
[itemSelectionAttribute]: selected
|
|
469
|
+
};
|
|
470
|
+
$[52] = includeSelectionAttribute;
|
|
471
|
+
$[53] = itemSelectionAttribute;
|
|
472
|
+
$[54] = selected;
|
|
473
|
+
$[55] = t19;
|
|
474
|
+
} else {
|
|
475
|
+
t19 = $[55];
|
|
476
|
+
}
|
|
477
|
+
let t20;
|
|
478
|
+
if ($[56] !== ariaDescribedBy || $[57] !== ariaLabelledBy || $[58] !== clickHandler || $[59] !== itemId || $[60] !== itemRole || $[61] !== t14 || $[62] !== t15 || $[63] !== t16 || $[64] !== t17 || $[65] !== t18 || $[66] !== t19) {
|
|
479
|
+
t20 = {
|
|
480
|
+
onClick: clickHandler,
|
|
481
|
+
onKeyPress: t14,
|
|
482
|
+
"aria-disabled": t15,
|
|
483
|
+
"data-inactive": t16,
|
|
484
|
+
"data-loading": t17,
|
|
485
|
+
tabIndex: t18,
|
|
486
|
+
"aria-labelledby": ariaLabelledBy,
|
|
487
|
+
"aria-describedby": ariaDescribedBy,
|
|
488
|
+
...t19,
|
|
489
|
+
role: itemRole,
|
|
490
|
+
id: itemId
|
|
491
|
+
};
|
|
492
|
+
$[56] = ariaDescribedBy;
|
|
493
|
+
$[57] = ariaLabelledBy;
|
|
494
|
+
$[58] = clickHandler;
|
|
495
|
+
$[59] = itemId;
|
|
496
|
+
$[60] = itemRole;
|
|
497
|
+
$[61] = t14;
|
|
498
|
+
$[62] = t15;
|
|
499
|
+
$[63] = t16;
|
|
500
|
+
$[64] = t17;
|
|
501
|
+
$[65] = t18;
|
|
502
|
+
$[66] = t19;
|
|
503
|
+
$[67] = t20;
|
|
504
|
+
} else {
|
|
505
|
+
t20 = $[67];
|
|
506
|
+
}
|
|
507
|
+
const menuItemProps = t20;
|
|
508
|
+
let t21;
|
|
509
|
+
if ($[68] !== _PrivateItemWrapper || $[69] !== forwardedRef || $[70] !== itemRole || $[71] !== listSemantics || $[72] !== menuItemProps || $[73] !== props) {
|
|
510
|
+
t21 = _PrivateItemWrapper ? {
|
|
511
|
+
role: itemRole ? "none" : undefined,
|
|
512
|
+
...props
|
|
513
|
+
} : listSemantics && {
|
|
514
|
+
...menuItemProps,
|
|
515
|
+
...props,
|
|
516
|
+
ref: forwardedRef
|
|
517
|
+
} || {};
|
|
518
|
+
$[68] = _PrivateItemWrapper;
|
|
519
|
+
$[69] = forwardedRef;
|
|
520
|
+
$[70] = itemRole;
|
|
521
|
+
$[71] = listSemantics;
|
|
522
|
+
$[72] = menuItemProps;
|
|
523
|
+
$[73] = props;
|
|
524
|
+
$[74] = t21;
|
|
525
|
+
} else {
|
|
526
|
+
t21 = $[74];
|
|
527
|
+
}
|
|
528
|
+
const containerProps = t21;
|
|
529
|
+
let t22;
|
|
530
|
+
if ($[75] !== _PrivateItemWrapper || $[76] !== forwardedRef || $[77] !== listSemantics || $[78] !== menuItemProps || $[79] !== props) {
|
|
531
|
+
t22 = _PrivateItemWrapper ? menuItemProps : !listSemantics && {
|
|
532
|
+
...menuItemProps,
|
|
533
|
+
...props,
|
|
534
|
+
ref: forwardedRef
|
|
535
|
+
};
|
|
536
|
+
$[75] = _PrivateItemWrapper;
|
|
537
|
+
$[76] = forwardedRef;
|
|
538
|
+
$[77] = listSemantics;
|
|
539
|
+
$[78] = menuItemProps;
|
|
540
|
+
$[79] = props;
|
|
541
|
+
$[80] = t22;
|
|
542
|
+
} else {
|
|
543
|
+
t22 = $[80];
|
|
544
|
+
}
|
|
545
|
+
const wrapperProps = t22;
|
|
546
|
+
const t23 = Boolean(inactiveText);
|
|
547
|
+
const t24 = buttonSemantics ? setTruncatedText : undefined;
|
|
548
|
+
let t25;
|
|
549
|
+
if ($[81] !== blockDescriptionId || $[82] !== disabled || $[83] !== inlineDescriptionId || $[84] !== size || $[85] !== t23 || $[86] !== t24 || $[87] !== trailingVisualId || $[88] !== variant) {
|
|
550
|
+
t25 = {
|
|
551
|
+
variant,
|
|
552
|
+
size,
|
|
553
|
+
disabled,
|
|
554
|
+
inactive: t23,
|
|
555
|
+
inlineDescriptionId,
|
|
556
|
+
blockDescriptionId,
|
|
557
|
+
trailingVisualId,
|
|
558
|
+
setTruncatedText: t24
|
|
559
|
+
};
|
|
560
|
+
$[81] = blockDescriptionId;
|
|
561
|
+
$[82] = disabled;
|
|
562
|
+
$[83] = inlineDescriptionId;
|
|
563
|
+
$[84] = size;
|
|
564
|
+
$[85] = t23;
|
|
565
|
+
$[86] = t24;
|
|
566
|
+
$[87] = trailingVisualId;
|
|
567
|
+
$[88] = variant;
|
|
568
|
+
$[89] = t25;
|
|
569
|
+
} else {
|
|
570
|
+
t25 = $[89];
|
|
571
|
+
}
|
|
572
|
+
const itemContextValue = t25;
|
|
573
|
+
const t26 = listSemantics ? forwardedRef : null;
|
|
574
|
+
const t27 = variant === "danger" ? variant : undefined;
|
|
575
|
+
const t28 = active ? true : undefined;
|
|
576
|
+
const t29 = inactiveText ? true : undefined;
|
|
577
|
+
const t30 = disabled ? true : undefined;
|
|
578
|
+
const t31 = slots.subItem ? true : undefined;
|
|
579
|
+
const t32 = slots.description ? true : false;
|
|
580
|
+
let t33;
|
|
581
|
+
if ($[90] !== className) {
|
|
582
|
+
t33 = clsx(classes.ActionListItem, className);
|
|
583
|
+
$[90] = className;
|
|
584
|
+
$[91] = t33;
|
|
585
|
+
} else {
|
|
586
|
+
t33 = $[91];
|
|
587
|
+
}
|
|
588
|
+
let t34;
|
|
589
|
+
let t35;
|
|
590
|
+
if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
|
|
591
|
+
t34 = {};
|
|
592
|
+
t35 = /*#__PURE__*/jsx("span", {
|
|
593
|
+
className: classes.Spacer
|
|
594
|
+
});
|
|
595
|
+
$[92] = t34;
|
|
596
|
+
$[93] = t35;
|
|
597
|
+
} else {
|
|
598
|
+
t34 = $[92];
|
|
599
|
+
t35 = $[93];
|
|
600
|
+
}
|
|
601
|
+
let t36;
|
|
602
|
+
if ($[94] !== selected) {
|
|
603
|
+
t36 = /*#__PURE__*/jsx(Selection, {
|
|
604
|
+
selected: selected,
|
|
605
|
+
className: classes.LeadingAction
|
|
606
|
+
});
|
|
607
|
+
$[94] = selected;
|
|
608
|
+
$[95] = t36;
|
|
609
|
+
} else {
|
|
610
|
+
t36 = $[95];
|
|
611
|
+
}
|
|
612
|
+
const t37 = showInactiveIndicator ? inactiveText : undefined;
|
|
613
|
+
const t38 = Boolean(slots.leadingVisual);
|
|
614
|
+
let t39;
|
|
615
|
+
if ($[96] !== labelId || $[97] !== loading || $[98] !== slots.leadingVisual || $[99] !== t37 || $[100] !== t38) {
|
|
616
|
+
t39 = /*#__PURE__*/jsx(VisualOrIndicator, {
|
|
617
|
+
inactiveText: t37,
|
|
618
|
+
itemHasLeadingVisual: t38,
|
|
619
|
+
labelId: labelId,
|
|
620
|
+
loading: loading,
|
|
621
|
+
position: "leading",
|
|
622
|
+
children: slots.leadingVisual
|
|
623
|
+
});
|
|
624
|
+
$[96] = labelId;
|
|
625
|
+
$[97] = loading;
|
|
626
|
+
$[98] = slots.leadingVisual;
|
|
627
|
+
$[99] = t37;
|
|
628
|
+
$[100] = t38;
|
|
629
|
+
$[101] = t39;
|
|
630
|
+
} else {
|
|
631
|
+
t39 = $[101];
|
|
632
|
+
}
|
|
633
|
+
const t40 = !!slots.description;
|
|
634
|
+
let t41;
|
|
635
|
+
if ($[102] !== inactive || $[103] !== loading) {
|
|
636
|
+
t41 = loading === true && !inactive && /*#__PURE__*/jsx(VisuallyHidden, {
|
|
637
|
+
children: "Loading"
|
|
638
|
+
});
|
|
639
|
+
$[102] = inactive;
|
|
640
|
+
$[103] = loading;
|
|
641
|
+
$[104] = t41;
|
|
642
|
+
} else {
|
|
643
|
+
t41 = $[104];
|
|
644
|
+
}
|
|
645
|
+
let t42;
|
|
646
|
+
if ($[105] !== childrenWithoutSlots || $[106] !== labelId || $[107] !== t41) {
|
|
647
|
+
t42 = /*#__PURE__*/jsxs("span", {
|
|
648
|
+
id: labelId,
|
|
649
|
+
className: classes.ItemLabel,
|
|
650
|
+
"data-component": "ActionList.Item.Label",
|
|
651
|
+
children: [childrenWithoutSlots, t41]
|
|
652
|
+
});
|
|
653
|
+
$[105] = childrenWithoutSlots;
|
|
654
|
+
$[106] = labelId;
|
|
655
|
+
$[107] = t41;
|
|
656
|
+
$[108] = t42;
|
|
657
|
+
} else {
|
|
658
|
+
t42 = $[108];
|
|
659
|
+
}
|
|
660
|
+
let t43;
|
|
661
|
+
if ($[109] !== descriptionVariant || $[110] !== slots.description || $[111] !== t40 || $[112] !== t42) {
|
|
662
|
+
t43 = /*#__PURE__*/jsxs(ConditionalWrapper, {
|
|
663
|
+
if: t40,
|
|
664
|
+
className: classes.ItemDescriptionWrap,
|
|
665
|
+
"data-description-variant": descriptionVariant,
|
|
666
|
+
children: [t42, slots.description]
|
|
667
|
+
});
|
|
668
|
+
$[109] = descriptionVariant;
|
|
669
|
+
$[110] = slots.description;
|
|
670
|
+
$[111] = t40;
|
|
671
|
+
$[112] = t42;
|
|
672
|
+
$[113] = t43;
|
|
673
|
+
} else {
|
|
674
|
+
t43 = $[113];
|
|
675
|
+
}
|
|
676
|
+
const t44 = showInactiveIndicator ? inactiveText : undefined;
|
|
677
|
+
const t45 = Boolean(slots.leadingVisual);
|
|
678
|
+
let t46;
|
|
679
|
+
if ($[114] !== labelId || $[115] !== loading || $[116] !== t44 || $[117] !== t45 || $[118] !== trailingVisual) {
|
|
680
|
+
t46 = /*#__PURE__*/jsx(VisualOrIndicator, {
|
|
681
|
+
inactiveText: t44,
|
|
682
|
+
itemHasLeadingVisual: t45,
|
|
683
|
+
labelId: labelId,
|
|
684
|
+
loading: loading,
|
|
685
|
+
position: "trailing",
|
|
686
|
+
children: trailingVisual
|
|
687
|
+
});
|
|
688
|
+
$[114] = labelId;
|
|
689
|
+
$[115] = loading;
|
|
690
|
+
$[116] = t44;
|
|
691
|
+
$[117] = t45;
|
|
692
|
+
$[118] = trailingVisual;
|
|
693
|
+
$[119] = t46;
|
|
694
|
+
} else {
|
|
695
|
+
t46 = $[119];
|
|
696
|
+
}
|
|
697
|
+
let t47;
|
|
698
|
+
if ($[120] !== inactiveText || $[121] !== inactiveWarningId || $[122] !== showInactiveIndicator) {
|
|
699
|
+
t47 = !showInactiveIndicator && inactiveText ? /*#__PURE__*/jsx("span", {
|
|
700
|
+
className: classes.InactiveWarning,
|
|
701
|
+
id: inactiveWarningId,
|
|
702
|
+
children: inactiveText
|
|
703
|
+
}) : null;
|
|
704
|
+
$[120] = inactiveText;
|
|
705
|
+
$[121] = inactiveWarningId;
|
|
706
|
+
$[122] = showInactiveIndicator;
|
|
707
|
+
$[123] = t47;
|
|
708
|
+
} else {
|
|
709
|
+
t47 = $[123];
|
|
710
|
+
}
|
|
711
|
+
let t48;
|
|
712
|
+
if ($[124] !== t43 || $[125] !== t46 || $[126] !== t47) {
|
|
713
|
+
t48 = /*#__PURE__*/jsxs("span", {
|
|
714
|
+
className: classes.ActionListSubContent,
|
|
715
|
+
"data-component": "ActionList.Item--DividerContainer",
|
|
716
|
+
children: [t43, t46, t47]
|
|
717
|
+
});
|
|
718
|
+
$[124] = t43;
|
|
719
|
+
$[125] = t46;
|
|
720
|
+
$[126] = t47;
|
|
721
|
+
$[127] = t48;
|
|
722
|
+
} else {
|
|
723
|
+
t48 = $[127];
|
|
724
|
+
}
|
|
725
|
+
let t49;
|
|
726
|
+
if ($[128] !== t36 || $[129] !== t39 || $[130] !== t48) {
|
|
727
|
+
t49 = /*#__PURE__*/jsxs(TooltipContext.Provider, {
|
|
728
|
+
value: t34,
|
|
729
|
+
children: [t35, t36, t39, t48]
|
|
730
|
+
});
|
|
731
|
+
$[128] = t36;
|
|
732
|
+
$[129] = t39;
|
|
733
|
+
$[130] = t48;
|
|
734
|
+
$[131] = t49;
|
|
735
|
+
} else {
|
|
736
|
+
t49 = $[131];
|
|
737
|
+
}
|
|
738
|
+
let t50;
|
|
739
|
+
if ($[132] !== ItemWrapper || $[133] !== forwardedRef || $[134] !== size || $[135] !== t49 || $[136] !== wrapperProps) {
|
|
740
|
+
t50 = /*#__PURE__*/jsx(ItemWrapper, {
|
|
741
|
+
...wrapperProps,
|
|
742
|
+
className: classes.ActionListContent,
|
|
743
|
+
"data-size": size,
|
|
744
|
+
ref: forwardedRef,
|
|
745
|
+
children: t49
|
|
746
|
+
});
|
|
747
|
+
$[132] = ItemWrapper;
|
|
748
|
+
$[133] = forwardedRef;
|
|
749
|
+
$[134] = size;
|
|
750
|
+
$[135] = t49;
|
|
751
|
+
$[136] = wrapperProps;
|
|
752
|
+
$[137] = t50;
|
|
753
|
+
} else {
|
|
754
|
+
t50 = $[137];
|
|
755
|
+
}
|
|
756
|
+
let t51;
|
|
757
|
+
if ($[138] !== buttonSemantics || $[139] !== forwardedRef || $[140] !== t50 || $[141] !== truncatedText) {
|
|
758
|
+
t51 = /*#__PURE__*/jsx(ConditionalTooltip, {
|
|
759
|
+
ref: forwardedRef,
|
|
760
|
+
text: truncatedText,
|
|
761
|
+
enabled: buttonSemantics,
|
|
762
|
+
children: t50
|
|
763
|
+
});
|
|
764
|
+
$[138] = buttonSemantics;
|
|
765
|
+
$[139] = forwardedRef;
|
|
766
|
+
$[140] = t50;
|
|
767
|
+
$[141] = truncatedText;
|
|
768
|
+
$[142] = t51;
|
|
769
|
+
} else {
|
|
770
|
+
t51 = $[142];
|
|
771
|
+
}
|
|
772
|
+
const t52 = !inactive && !loading && !menuContext && Boolean(slots.trailingAction) && slots.trailingAction;
|
|
773
|
+
let t53;
|
|
774
|
+
if ($[143] !== containerProps || $[144] !== slots.subItem || $[145] !== t26 || $[146] !== t27 || $[147] !== t28 || $[148] !== t29 || $[149] !== t30 || $[150] !== t31 || $[151] !== t32 || $[152] !== t33 || $[153] !== t51 || $[154] !== t52) {
|
|
775
|
+
t53 = /*#__PURE__*/jsxs("li", {
|
|
776
|
+
...containerProps,
|
|
777
|
+
ref: t26,
|
|
778
|
+
"data-component": "ActionList.Item",
|
|
779
|
+
"data-variant": t27,
|
|
780
|
+
"data-active": t28,
|
|
781
|
+
"data-inactive": t29,
|
|
782
|
+
"data-is-disabled": t30,
|
|
783
|
+
"data-has-subitem": t31,
|
|
784
|
+
"data-has-description": t32,
|
|
785
|
+
className: t33,
|
|
786
|
+
children: [t51, t52, slots.subItem]
|
|
787
|
+
});
|
|
788
|
+
$[143] = containerProps;
|
|
789
|
+
$[144] = slots.subItem;
|
|
790
|
+
$[145] = t26;
|
|
791
|
+
$[146] = t27;
|
|
792
|
+
$[147] = t28;
|
|
793
|
+
$[148] = t29;
|
|
794
|
+
$[149] = t30;
|
|
795
|
+
$[150] = t31;
|
|
796
|
+
$[151] = t32;
|
|
797
|
+
$[152] = t33;
|
|
798
|
+
$[153] = t51;
|
|
799
|
+
$[154] = t52;
|
|
800
|
+
$[155] = t53;
|
|
801
|
+
} else {
|
|
802
|
+
t53 = $[155];
|
|
803
|
+
}
|
|
804
|
+
let t54;
|
|
805
|
+
if ($[156] !== itemContextValue || $[157] !== t53) {
|
|
806
|
+
t54 = /*#__PURE__*/jsx(ItemContext.Provider, {
|
|
807
|
+
value: itemContextValue,
|
|
808
|
+
children: t53
|
|
809
|
+
});
|
|
810
|
+
$[156] = itemContextValue;
|
|
811
|
+
$[157] = t53;
|
|
812
|
+
$[158] = t54;
|
|
813
|
+
} else {
|
|
814
|
+
t54 = $[158];
|
|
815
|
+
}
|
|
816
|
+
return t54;
|
|
674
817
|
};
|
|
675
818
|
const Item = Object.assign(fixedForwardRef(UnwrappedItem), {
|
|
676
|
-
|
|
677
|
-
|
|
819
|
+
displayName: 'ActionList.Item',
|
|
820
|
+
__SLOT__: Symbol('ActionList.Item')
|
|
678
821
|
});
|
|
679
|
-
|
|
822
|
+
|
|
680
823
|
export { Item, SubItem };
|