@primer/react 38.0.0-rc.6 → 38.0.0-rc.7
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 +47 -0
- package/dist/ActionBar/ActionBar.d.ts +15 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +381 -217
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/Description.d.ts +4 -3
- package/dist/ActionList/Description.d.ts.map +1 -1
- package/dist/ActionList/Description.js +5 -5
- package/dist/ActionList/Divider.d.ts +5 -4
- package/dist/ActionList/Divider.d.ts.map +1 -1
- package/dist/ActionList/Divider.js +6 -7
- package/dist/ActionList/Group.d.ts +4 -5
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +9 -16
- package/dist/ActionList/Heading.d.ts +3 -2
- package/dist/ActionList/Heading.d.ts.map +1 -1
- package/dist/ActionList/Heading.js +1 -0
- package/dist/ActionList/Item.d.ts +5 -2
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +4 -8
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/LinkItem.d.ts.map +1 -1
- package/dist/ActionList/LinkItem.js +1 -2
- package/dist/ActionList/List.d.ts +1 -1
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +1 -3
- package/dist/ActionList/TrailingAction.d.ts +1 -0
- package/dist/ActionList/TrailingAction.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.js +3 -0
- package/dist/ActionList/Visuals.d.ts +4 -4
- package/dist/ActionList/Visuals.d.ts.map +1 -1
- package/dist/ActionList/Visuals.js +3 -3
- package/dist/ActionList/index.d.ts +12 -9
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/shared.d.ts +2 -3
- package/dist/ActionList/shared.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.d.ts +6 -5
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +11 -6
- package/dist/Autocomplete/Autocomplete.d.ts +6 -4
- package/dist/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete/Autocomplete.js +1 -0
- package/dist/Autocomplete/AutocompleteInput.js +1 -0
- package/dist/Autocomplete/AutocompleteMenu.d.ts +1 -0
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +1 -0
- package/dist/Autocomplete/AutocompleteOverlay.d.ts +1 -0
- package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
- package/dist/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/dist/AvatarStack/AvatarStack.js +1 -3
- package/dist/BranchName/BranchName.d.ts +9 -10
- package/dist/BranchName/BranchName.d.ts.map +1 -1
- package/dist/BranchName/BranchName.js +1 -8
- package/dist/Button/Button.d.ts +1 -5
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +2 -85
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +8 -93
- package/dist/Button/IconButton.d.ts.map +1 -1
- package/dist/Button/IconButton.js +0 -16
- package/dist/Button/LinkButton.d.ts +1 -1
- package/dist/Button/LinkButton.d.ts.map +1 -1
- package/dist/Button/types.d.ts +1 -3
- package/dist/Button/types.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts +3 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +1 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +8 -7
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +4 -2
- package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css +2 -0
- package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css.map +1 -0
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +4 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.module.css.js +1 -1
- package/dist/DataTable/Table.d.ts +3 -3
- package/dist/DataTable/Table.d.ts.map +1 -1
- package/dist/DataTable/Table.js +24 -19
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css +2 -0
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +2 -7
- package/dist/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/dist/FilteredActionList/types.d.ts +5 -2
- package/dist/FilteredActionList/types.d.ts.map +1 -1
- package/dist/FormControl/FormControl.d.ts +8 -36
- package/dist/FormControl/FormControl.d.ts.map +1 -1
- package/dist/FormControl/FormControl.js +64 -66
- package/dist/FormControl/FormControlCaption.d.ts +6 -4
- package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
- package/dist/FormControl/FormControlCaption.js +9 -13
- package/dist/FormControl/FormControlLabel.d.ts +3 -3
- package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
- package/dist/FormControl/FormControlLabel.js +25 -31
- package/dist/FormControl/FormControlLeadingVisual-e217df71.css +2 -0
- package/dist/FormControl/FormControlLeadingVisual-e217df71.css.map +1 -0
- package/dist/FormControl/FormControlLeadingVisual.d.ts +2 -2
- package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +10 -17
- package/dist/FormControl/FormControlLeadingVisual.module.css.js +5 -0
- package/dist/FormControl/_FormControlContext.js +1 -1
- package/dist/FormControl/_FormControlValidation.d.ts +3 -3
- package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
- package/dist/FormControl/_FormControlValidation.js +7 -9
- package/dist/FormControl/index.d.ts +4 -0
- package/dist/FormControl/index.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup-7d19205a.css +2 -0
- package/dist/LabelGroup/LabelGroup-7d19205a.css.map +1 -0
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +14 -27
- package/dist/LabelGroup/LabelGroup.module.css.js +2 -2
- package/dist/NavList/NavList.d.ts +3 -3
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +2 -1
- package/dist/Octicon/Octicon.d.ts +7 -6
- package/dist/Octicon/Octicon.d.ts.map +1 -1
- package/dist/Octicon/Octicon.js +4 -23
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +63 -85
- package/dist/PageHeader/PageHeader.d.ts +3 -3
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +5 -2
- package/dist/PageLayout/{PageLayout-8a294e74.css → PageLayout-a276fa3b.css} +2 -2
- package/dist/PageLayout/PageLayout-a276fa3b.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts +14 -58
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +216 -245
- package/dist/PageLayout/PageLayout.module.css.js +2 -2
- package/dist/Radio/Radio.d.ts +3 -1
- package/dist/Radio/Radio.d.ts.map +1 -1
- package/dist/Radio/Radio.js +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +6 -5
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +11 -14
- package/dist/SegmentedControl/SegmentedControlButton.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlButton.js +1 -0
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +1 -0
- package/dist/Select/Select.d.ts +1 -0
- package/dist/Select/Select.d.ts.map +1 -1
- package/dist/Select/Select.js +1 -0
- package/dist/SelectPanel/SelectPanel.d.ts +2 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -0
- package/dist/Skeleton/SkeletonBox.d.ts.map +1 -1
- package/dist/Skeleton/SkeletonBox.js +26 -20
- package/dist/SkeletonAvatar/SkeletonAvatar.d.ts.map +1 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +53 -62
- package/dist/StateLabel/{StateLabel-aaa1d148.css → StateLabel-b586b0bc.css} +2 -2
- package/dist/StateLabel/StateLabel-b586b0bc.css.map +1 -0
- package/dist/StateLabel/StateLabel.d.ts.map +1 -1
- package/dist/StateLabel/StateLabel.js +28 -39
- package/dist/StateLabel/StateLabel.module.css.js +1 -1
- package/dist/SubNav/SubNav.d.ts +4 -1
- package/dist/SubNav/SubNav.d.ts.map +1 -1
- package/dist/SubNav/SubNav.js +3 -1
- package/dist/Text/Text.d.ts +16 -8
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +34 -31
- package/dist/TextInput/TextInput.d.ts +3 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +2 -3
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/TextInput/index.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +3 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.js +205 -211
- package/dist/Textarea/Textarea.d.ts +5 -4
- package/dist/Textarea/Textarea.d.ts.map +1 -1
- package/dist/Textarea/Textarea.js +40 -45
- package/dist/Tooltip/Tooltip-fffa9948.css +2 -0
- package/dist/Tooltip/Tooltip-fffa9948.css.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts +6 -8
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +44 -118
- package/dist/Tooltip/Tooltip.module.css.js +5 -0
- package/dist/TooltipV2/Tooltip.d.ts +3 -16
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +1 -0
- package/dist/TreeView/TreeView.d.ts +4 -1
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +42 -9
- package/dist/Truncate/Truncate.d.ts +2 -2
- package/dist/Truncate/Truncate.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +45 -17
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +0 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +0 -1
- package/dist/UnderlineNav/styles.d.ts +1 -23
- package/dist/UnderlineNav/styles.d.ts.map +1 -1
- package/dist/UnderlineNav/styles.js +4 -59
- package/dist/constants.js +3 -3
- package/dist/deprecated/ActionList/Divider-7c6b656a.css +2 -0
- package/dist/deprecated/ActionList/Divider-7c6b656a.css.map +1 -0
- package/dist/deprecated/ActionList/Divider.d.ts +1 -2
- package/dist/deprecated/ActionList/Divider.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Divider.js +6 -12
- package/dist/deprecated/ActionList/Divider.module.css.js +5 -0
- package/dist/deprecated/ActionList/Group.d.ts +1 -2
- package/dist/deprecated/ActionList/Group.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Group.js +1 -8
- package/dist/deprecated/ActionList/Header-493b1d76.css +2 -0
- package/dist/deprecated/ActionList/Header-493b1d76.css.map +1 -0
- package/dist/deprecated/ActionList/Header.d.ts +2 -6
- package/dist/deprecated/ActionList/Header.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Header.js +46 -37
- package/dist/deprecated/ActionList/Header.module.css.js +5 -0
- package/dist/deprecated/ActionList/Item-cf87f98a.css +3 -0
- package/dist/deprecated/ActionList/Item-cf87f98a.css.map +1 -0
- package/dist/deprecated/ActionList/Item.d.ts +1 -5
- package/dist/deprecated/ActionList/Item.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Item.js +182 -271
- package/dist/deprecated/ActionList/Item.module.css.js +5 -0
- package/dist/deprecated/ActionList/List-1ec9d6d9.css +2 -0
- package/dist/deprecated/ActionList/List-1ec9d6d9.css.map +1 -0
- package/dist/deprecated/ActionList/List.d.ts +1 -0
- package/dist/deprecated/ActionList/List.d.ts.map +1 -1
- package/dist/deprecated/ActionList/List.js +92 -82
- package/dist/deprecated/ActionList/List.module.css.js +5 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css +2 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css.map +1 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts +6 -8
- package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +90 -49
- package/dist/deprecated/UnderlineNav/UnderlineNav.module.css.js +5 -0
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts +11 -7
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +6 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +6 -6
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +8 -4
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +3 -2
- package/dist/hooks/useSyncedState.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +6 -7
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +7 -9
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +2 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -3
- package/dist/internal/components/InputLabel.d.ts +2 -3
- package/dist/internal/components/InputLabel.d.ts.map +1 -1
- package/dist/internal/components/InputLabel.js +29 -36
- package/dist/internal/components/InputValidation.d.ts +1 -2
- package/dist/internal/components/InputValidation.d.ts.map +1 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +16 -2
- package/dist/internal/components/TextInputInnerAction.d.ts.map +1 -1
- package/dist/internal/components/TextInputInnerAction.js +46 -60
- package/dist/internal/components/TextInputWrapper.d.ts +10 -32
- package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper.js +87 -58
- package/dist/internal/components/UnstyledTextInput.d.ts +1 -2
- package/dist/internal/components/UnstyledTextInput.d.ts.map +1 -1
- package/dist/internal/components/UnstyledTextInput.js +1 -3
- package/dist/internal/components/ValidationAnimationContainer-04125429.css +2 -0
- package/dist/internal/components/ValidationAnimationContainer-04125429.css.map +1 -0
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +4 -9
- package/dist/internal/components/ValidationAnimationContainer.module.css.js +5 -0
- package/dist/utils/form-story-helpers.d.ts.map +1 -1
- package/dist/utils/is-slot.d.ts +6 -0
- package/dist/utils/is-slot.d.ts.map +1 -0
- package/dist/utils/is-slot.js +15 -0
- package/dist/utils/polymorphic.d.ts +2 -1
- package/dist/utils/polymorphic.d.ts.map +1 -1
- package/dist/utils/types/Slots.d.ts +7 -0
- package/dist/utils/types/Slots.d.ts.map +1 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.d.ts.map +1 -1
- package/generated/components.json +21 -119
- package/package.json +2 -1
- package/dist/Button/styles.d.ts +0 -431
- package/dist/Button/styles.d.ts.map +0 -1
- package/dist/Button/styles.js +0 -5
- package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css +0 -2
- package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css.map +0 -1
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css +0 -2
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css.map +0 -1
- package/dist/LabelGroup/LabelGroup-eda75c0f.css +0 -2
- package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +0 -1
- package/dist/PageLayout/PageLayout-8a294e74.css.map +0 -1
- package/dist/StateLabel/StateLabel-aaa1d148.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNav-78db938f.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-78db938f.css.map +0 -1
- package/dist/internal/components/BoxWithFallback.d.ts +0 -6
- package/dist/internal/components/BoxWithFallback.d.ts.map +0 -1
- package/dist/internal/components/BoxWithFallback.js +0 -70
- package/dist/internal/utils/getGlobalFocusStyles.d.ts +0 -4
- package/dist/internal/utils/getGlobalFocusStyles.d.ts.map +0 -1
- package/dist/internal/utils/getGlobalFocusStyles.js +0 -7
- package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts +0 -2
- package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts.map +0 -1
- package/dist/utils/defaultSxProp.d.ts +0 -3
- package/dist/utils/defaultSxProp.d.ts.map +0 -1
- package/dist/utils/defaultSxProp.js +0 -3
- package/dist/utils/includeSystemProps.d.ts +0 -7
- package/dist/utils/includeSystemProps.d.ts.map +0 -1
- package/dist/utils/includeSystemProps.js +0 -14
|
@@ -2,139 +2,23 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { CheckIcon } from '@primer/octicons-react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { isValidElementType } from 'react-is';
|
|
5
|
-
import { get } from '../../constants.js';
|
|
6
|
-
import sx from '../../sx.js';
|
|
7
|
-
import styled from 'styled-components';
|
|
8
|
-
import { StyledHeader } from './Header.js';
|
|
9
|
-
import { StyledDivider } from './Divider.js';
|
|
10
5
|
import { useTheme } from '../../ThemeProvider.js';
|
|
11
|
-
import { isActiveDescendantAttribute, activeDescendantActivatedDirectly, activeDescendantActivatedIndirectly } from '@primer/behaviors';
|
|
12
6
|
import { useId } from '../../hooks/useId.js';
|
|
7
|
+
import classes from './Item.module.css.js';
|
|
8
|
+
import { clsx } from 'clsx';
|
|
13
9
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
14
10
|
import Truncate from '../../Truncate/Truncate.js';
|
|
15
11
|
|
|
16
|
-
const getItemVariant = (variant = 'default', disabled) => {
|
|
17
|
-
if (disabled) {
|
|
18
|
-
return {
|
|
19
|
-
color: get('colors.primer.fg.disabled'),
|
|
20
|
-
iconColor: get('colors.primer.fg.disabled'),
|
|
21
|
-
annotationColor: get('colors.primer.fg.disabled'),
|
|
22
|
-
hoverCursor: 'default'
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
switch (variant) {
|
|
26
|
-
case 'danger':
|
|
27
|
-
return {
|
|
28
|
-
color: get('colors.danger.fg'),
|
|
29
|
-
iconColor: get('colors.danger.fg'),
|
|
30
|
-
annotationColor: get('colors.fg.muted'),
|
|
31
|
-
hoverCursor: 'pointer',
|
|
32
|
-
hoverBg: get('colors.actionListItem.danger.hoverBg'),
|
|
33
|
-
focusBg: get('colors.actionListItem.danger.activeBg'),
|
|
34
|
-
hoverText: get('colors.actionListItem.danger.hoverText')
|
|
35
|
-
};
|
|
36
|
-
default:
|
|
37
|
-
return {
|
|
38
|
-
color: get('colors.fg.default'),
|
|
39
|
-
iconColor: get('colors.fg.muted'),
|
|
40
|
-
annotationColor: get('colors.fg.muted'),
|
|
41
|
-
hoverCursor: 'pointer',
|
|
42
|
-
hoverBg: get('colors.actionListItem.default.hoverBg'),
|
|
43
|
-
focusBg: get('colors.actionListItem.default.activeBg')
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const DividedContent = styled.div.withConfig({
|
|
48
|
-
displayName: "Item__DividedContent",
|
|
49
|
-
componentId: "sc-y6iv6t-0"
|
|
50
|
-
})(["display:flex;min-width:0;position:relative;flex-grow:1;"]);
|
|
51
|
-
const MainContent = styled.div.withConfig({
|
|
52
|
-
displayName: "Item__MainContent",
|
|
53
|
-
componentId: "sc-y6iv6t-1"
|
|
54
|
-
})(["align-items:baseline;display:flex;min-width:0;flex-direction:var(--main-content-flex-direction);flex-grow:1;"]);
|
|
55
|
-
const StyledItem = styled.div.withConfig({
|
|
56
|
-
displayName: "Item__StyledItem",
|
|
57
|
-
componentId: "sc-y6iv6t-2"
|
|
58
|
-
})(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear;text-decoration:none;@media (hover:hover) and (pointer:fine){:hover{background:var( --item-hover-bg-override,", " );color:", ";cursor:", ";}}:not(:first-of-type):not(", " + &):not(", " + &){margin-top:", ";", "::before{content:' ';display:block;position:absolute;width:100%;top:-7px;border:0 solid ", ";border-top-width:", ";}}&:hover ", "::before,:hover + * ", "::before{border-color:var(--item-hover-divider-border-color-override,transparent) !important;}&:focus ", "::before,:focus + * ", "::before,&[", "] ", "::before,[", "] + & ", "::before{border-color:transparent !important;}&[", "='", "']{background:", ";}&[", "='", "']{background:", ";}&:focus{background:", ";outline:none;}&:active{background:", ";}", ""], get('space.2'), get('radii.2'), ({
|
|
59
|
-
variant,
|
|
60
|
-
item
|
|
61
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).color, ({
|
|
62
|
-
variant,
|
|
63
|
-
item
|
|
64
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).hoverBg, ({
|
|
65
|
-
variant,
|
|
66
|
-
item
|
|
67
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).hoverText, ({
|
|
68
|
-
variant,
|
|
69
|
-
item
|
|
70
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).hoverCursor, StyledDivider, StyledHeader, ({
|
|
71
|
-
showDivider
|
|
72
|
-
}) => showDivider ? `1px` : '0', DividedContent, get('colors.border.muted'), ({
|
|
73
|
-
showDivider
|
|
74
|
-
}) => showDivider ? `1px` : '0', DividedContent, DividedContent, DividedContent, DividedContent, isActiveDescendantAttribute, DividedContent, isActiveDescendantAttribute, DividedContent, isActiveDescendantAttribute, activeDescendantActivatedDirectly, ({
|
|
75
|
-
variant,
|
|
76
|
-
item
|
|
77
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).focusBg, isActiveDescendantAttribute, activeDescendantActivatedIndirectly, ({
|
|
78
|
-
variant,
|
|
79
|
-
item
|
|
80
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).hoverBg, ({
|
|
81
|
-
variant,
|
|
82
|
-
item
|
|
83
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).focusBg, ({
|
|
84
|
-
variant,
|
|
85
|
-
item
|
|
86
|
-
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).focusBg, sx);
|
|
87
|
-
const TextContainer = styled.span.withConfig({
|
|
88
|
-
displayName: "Item__TextContainer",
|
|
89
|
-
componentId: "sc-y6iv6t-3"
|
|
90
|
-
})([""]);
|
|
91
|
-
const BaseVisualContainer = styled.div.withConfig({
|
|
92
|
-
displayName: "Item__BaseVisualContainer",
|
|
93
|
-
componentId: "sc-y6iv6t-4"
|
|
94
|
-
})(["height:20px;width:", ";margin-right:", ";display:flex;justify-content:center;align-items:center;flex-shrink:0;"], get('space.3'), get('space.2'));
|
|
95
|
-
const ColoredVisualContainer = styled(BaseVisualContainer).withConfig({
|
|
96
|
-
displayName: "Item__ColoredVisualContainer",
|
|
97
|
-
componentId: "sc-y6iv6t-5"
|
|
98
|
-
})(["svg{fill:", ";font-size:", ";}"], ({
|
|
99
|
-
variant,
|
|
100
|
-
disabled
|
|
101
|
-
}) => getItemVariant(variant, disabled).iconColor, get('fontSizes.0'));
|
|
102
|
-
const LeadingVisualContainer = styled(ColoredVisualContainer).withConfig({
|
|
103
|
-
displayName: "Item__LeadingVisualContainer",
|
|
104
|
-
componentId: "sc-y6iv6t-6"
|
|
105
|
-
})(["display:flex;flex-direction:column;justify-content:center;"]);
|
|
106
|
-
const TrailingContent = styled(ColoredVisualContainer).withConfig({
|
|
107
|
-
displayName: "Item__TrailingContent",
|
|
108
|
-
componentId: "sc-y6iv6t-7"
|
|
109
|
-
})(["color:", ";margin-left:", ";margin-right:0;width:auto;div:nth-child(2){margin-left:", ";}"], ({
|
|
110
|
-
variant,
|
|
111
|
-
disabled
|
|
112
|
-
}) => getItemVariant(variant, disabled).annotationColor, get('space.2'), get('space.2'));
|
|
113
|
-
const DescriptionContainer = styled.span.withConfig({
|
|
114
|
-
displayName: "Item__DescriptionContainer",
|
|
115
|
-
componentId: "sc-y6iv6t-8"
|
|
116
|
-
})(["color:", ";font-size:", ";line-height:16px;margin-left:var(--description-container-margin-left);min-width:0;flex-grow:1;flex-basis:var(--description-container-flex-basis);"], get('colors.fg.muted'), get('fontSizes.0'));
|
|
117
|
-
const MultiSelectIcon = styled.svg.withConfig({
|
|
118
|
-
displayName: "Item__MultiSelectIcon",
|
|
119
|
-
componentId: "sc-y6iv6t-9"
|
|
120
|
-
})(["rect{fill:", ";stroke:", ";shape-rendering:auto;}path{fill:", ";boxshadow:", ";opacity:", ";}"], ({
|
|
121
|
-
selected
|
|
122
|
-
}) => selected ? get('colors.accent.fg') : get('colors.canvas.default'), ({
|
|
123
|
-
selected
|
|
124
|
-
}) => selected ? get('colors.accent.fg') : get('colors.border.default'), get('colors.fg.onEmphasis'), get('shadow.small'), ({
|
|
125
|
-
selected
|
|
126
|
-
}) => selected ? 1 : 0);
|
|
127
|
-
|
|
128
12
|
/**
|
|
129
13
|
* An actionable or selectable `Item` with an optional icon and description.
|
|
130
14
|
*/
|
|
131
15
|
const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
132
|
-
const $ = c(
|
|
133
|
-
let Component;
|
|
16
|
+
const $ = c(83);
|
|
134
17
|
let LeadingVisual;
|
|
135
18
|
let TrailingIcon;
|
|
136
19
|
let TrailingVisual;
|
|
137
20
|
let children;
|
|
21
|
+
let className;
|
|
138
22
|
let description;
|
|
139
23
|
let disabled;
|
|
140
24
|
let id;
|
|
@@ -147,21 +31,22 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
147
31
|
let showDivider;
|
|
148
32
|
let t0;
|
|
149
33
|
let t1;
|
|
34
|
+
let t2;
|
|
150
35
|
let text;
|
|
151
36
|
let trailingText;
|
|
152
37
|
if ($[0] !== itemProps) {
|
|
153
38
|
({
|
|
154
|
-
as:
|
|
39
|
+
as: t0,
|
|
155
40
|
text,
|
|
156
41
|
description,
|
|
157
|
-
descriptionVariant:
|
|
42
|
+
descriptionVariant: t1,
|
|
158
43
|
selected,
|
|
159
44
|
selectionVariant,
|
|
160
45
|
leadingVisual: LeadingVisual,
|
|
161
46
|
trailingIcon: TrailingIcon,
|
|
162
47
|
trailingVisual: TrailingVisual,
|
|
163
48
|
trailingText,
|
|
164
|
-
variant:
|
|
49
|
+
variant: t2,
|
|
165
50
|
showDivider,
|
|
166
51
|
disabled,
|
|
167
52
|
onAction,
|
|
@@ -169,14 +54,15 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
169
54
|
children,
|
|
170
55
|
onClick,
|
|
171
56
|
id,
|
|
57
|
+
className,
|
|
172
58
|
...props
|
|
173
59
|
} = itemProps);
|
|
174
60
|
$[0] = itemProps;
|
|
175
|
-
$[1] =
|
|
176
|
-
$[2] =
|
|
177
|
-
$[3] =
|
|
178
|
-
$[4] =
|
|
179
|
-
$[5] =
|
|
61
|
+
$[1] = LeadingVisual;
|
|
62
|
+
$[2] = TrailingIcon;
|
|
63
|
+
$[3] = TrailingVisual;
|
|
64
|
+
$[4] = children;
|
|
65
|
+
$[5] = className;
|
|
180
66
|
$[6] = description;
|
|
181
67
|
$[7] = disabled;
|
|
182
68
|
$[8] = id;
|
|
@@ -189,14 +75,15 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
189
75
|
$[15] = showDivider;
|
|
190
76
|
$[16] = t0;
|
|
191
77
|
$[17] = t1;
|
|
192
|
-
$[18] =
|
|
193
|
-
$[19] =
|
|
78
|
+
$[18] = t2;
|
|
79
|
+
$[19] = text;
|
|
80
|
+
$[20] = trailingText;
|
|
194
81
|
} else {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
82
|
+
LeadingVisual = $[1];
|
|
83
|
+
TrailingIcon = $[2];
|
|
84
|
+
TrailingVisual = $[3];
|
|
85
|
+
children = $[4];
|
|
86
|
+
className = $[5];
|
|
200
87
|
description = $[6];
|
|
201
88
|
disabled = $[7];
|
|
202
89
|
id = $[8];
|
|
@@ -209,16 +96,18 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
209
96
|
showDivider = $[15];
|
|
210
97
|
t0 = $[16];
|
|
211
98
|
t1 = $[17];
|
|
212
|
-
|
|
213
|
-
|
|
99
|
+
t2 = $[18];
|
|
100
|
+
text = $[19];
|
|
101
|
+
trailingText = $[20];
|
|
214
102
|
}
|
|
215
|
-
const
|
|
216
|
-
const
|
|
103
|
+
const Component = t0 === undefined ? "div" : t0;
|
|
104
|
+
const descriptionVariant = t1 === undefined ? "inline" : t1;
|
|
105
|
+
const variant = t2 === undefined ? "default" : t2;
|
|
217
106
|
const labelId = useId();
|
|
218
107
|
const descriptionId = useId();
|
|
219
|
-
let
|
|
220
|
-
if ($[
|
|
221
|
-
|
|
108
|
+
let t3;
|
|
109
|
+
if ($[21] !== disabled || $[22] !== itemProps || $[23] !== onAction || $[24] !== onKeyPress) {
|
|
110
|
+
t3 = event => {
|
|
222
111
|
var _onKeyPress;
|
|
223
112
|
if (disabled) {
|
|
224
113
|
return;
|
|
@@ -229,18 +118,18 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
229
118
|
(_onAction = onAction) === null || _onAction === void 0 ? void 0 : _onAction(itemProps, event);
|
|
230
119
|
}
|
|
231
120
|
};
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
121
|
+
$[21] = disabled;
|
|
122
|
+
$[22] = itemProps;
|
|
123
|
+
$[23] = onAction;
|
|
124
|
+
$[24] = onKeyPress;
|
|
125
|
+
$[25] = t3;
|
|
237
126
|
} else {
|
|
238
|
-
|
|
127
|
+
t3 = $[25];
|
|
239
128
|
}
|
|
240
|
-
const keyPressHandler =
|
|
241
|
-
let
|
|
242
|
-
if ($[
|
|
243
|
-
|
|
129
|
+
const keyPressHandler = t3;
|
|
130
|
+
let t4;
|
|
131
|
+
if ($[26] !== disabled || $[27] !== itemProps || $[28] !== onAction || $[29] !== onClick) {
|
|
132
|
+
t4 = event_0 => {
|
|
244
133
|
var _onClick;
|
|
245
134
|
if (disabled) {
|
|
246
135
|
return;
|
|
@@ -251,27 +140,42 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
251
140
|
(_onAction2 = onAction) === null || _onAction2 === void 0 ? void 0 : _onAction2(itemProps, event_0);
|
|
252
141
|
}
|
|
253
142
|
};
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
143
|
+
$[26] = disabled;
|
|
144
|
+
$[27] = itemProps;
|
|
145
|
+
$[28] = onAction;
|
|
146
|
+
$[29] = onClick;
|
|
147
|
+
$[30] = t4;
|
|
259
148
|
} else {
|
|
260
|
-
|
|
149
|
+
t4 = $[30];
|
|
261
150
|
}
|
|
262
|
-
const clickHandler =
|
|
151
|
+
const clickHandler = t4;
|
|
263
152
|
const {
|
|
264
153
|
theme
|
|
265
154
|
} = useTheme();
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
155
|
+
const t5 = disabled ? undefined : -1;
|
|
156
|
+
const t6 = text ? labelId : undefined;
|
|
157
|
+
const t7 = description ? descriptionId : undefined;
|
|
158
|
+
const t8 = showDivider ? "" : undefined;
|
|
159
|
+
const t9 = variant === "danger" && classes["Item--danger"];
|
|
160
|
+
const t10 = disabled && classes["Item--disabled"];
|
|
161
|
+
let t11;
|
|
162
|
+
if ($[31] !== className || $[32] !== t10 || $[33] !== t9) {
|
|
163
|
+
t11 = clsx(classes.Item, t9, t10, className);
|
|
164
|
+
$[31] = className;
|
|
165
|
+
$[32] = t10;
|
|
166
|
+
$[33] = t9;
|
|
167
|
+
$[34] = t11;
|
|
168
|
+
} else {
|
|
169
|
+
t11 = $[34];
|
|
170
|
+
}
|
|
171
|
+
let t12;
|
|
172
|
+
if ($[35] !== selected || $[36] !== selectionVariant || $[37] !== (theme === null || theme === void 0 ? void 0 : theme.colors)) {
|
|
173
|
+
t12 = !!selected === selected && /*#__PURE__*/jsx("div", {
|
|
174
|
+
className: classes.BaseVisualContainer,
|
|
272
175
|
children: selectionVariant === "multiple" ? /*#__PURE__*/jsx(Fragment, {
|
|
273
|
-
children: /*#__PURE__*/jsxs(
|
|
274
|
-
|
|
176
|
+
children: /*#__PURE__*/jsxs("svg", {
|
|
177
|
+
className: classes.MultiSelectIcon,
|
|
178
|
+
"data-selected": selected ? "" : undefined,
|
|
275
179
|
width: "16",
|
|
276
180
|
height: "16",
|
|
277
181
|
viewBox: "0 0 16 16",
|
|
@@ -293,59 +197,61 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
293
197
|
fill: theme === null || theme === void 0 ? void 0 : theme.colors.fg.default
|
|
294
198
|
})
|
|
295
199
|
});
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
200
|
+
$[35] = selected;
|
|
201
|
+
$[36] = selectionVariant;
|
|
202
|
+
$[37] = theme === null || theme === void 0 ? void 0 : theme.colors;
|
|
203
|
+
$[38] = t12;
|
|
300
204
|
} else {
|
|
301
|
-
|
|
205
|
+
t12 = $[38];
|
|
302
206
|
}
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
207
|
+
let t13;
|
|
208
|
+
if ($[39] !== LeadingVisual || $[40] !== disabled || $[41] !== variant) {
|
|
209
|
+
t13 = LeadingVisual && /*#__PURE__*/jsx("div", {
|
|
210
|
+
className: classes.LeadingVisualContainer,
|
|
211
|
+
"data-variant": variant,
|
|
212
|
+
"data-disabled": disabled ? "" : undefined,
|
|
308
213
|
children: /*#__PURE__*/jsx(LeadingVisual, {})
|
|
309
214
|
});
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
215
|
+
$[39] = LeadingVisual;
|
|
216
|
+
$[40] = disabled;
|
|
217
|
+
$[41] = variant;
|
|
218
|
+
$[42] = t13;
|
|
314
219
|
} else {
|
|
315
|
-
|
|
220
|
+
t13 = $[42];
|
|
316
221
|
}
|
|
317
|
-
const
|
|
318
|
-
let
|
|
319
|
-
if ($[
|
|
320
|
-
|
|
321
|
-
"--main-content-flex-direction":
|
|
222
|
+
const t14 = descriptionVariant === "inline" ? "row" : "column";
|
|
223
|
+
let t15;
|
|
224
|
+
if ($[43] !== t14) {
|
|
225
|
+
t15 = {
|
|
226
|
+
"--main-content-flex-direction": t14
|
|
322
227
|
};
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
228
|
+
$[43] = t14;
|
|
229
|
+
$[44] = t15;
|
|
325
230
|
} else {
|
|
326
|
-
|
|
231
|
+
t15 = $[44];
|
|
327
232
|
}
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
if ($[
|
|
331
|
-
|
|
233
|
+
const t16 = t15;
|
|
234
|
+
let t17;
|
|
235
|
+
if ($[45] !== labelId || $[46] !== text) {
|
|
236
|
+
t17 = text ? /*#__PURE__*/jsx("span", {
|
|
332
237
|
id: labelId,
|
|
333
238
|
children: text
|
|
334
239
|
}) : null;
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
240
|
+
$[45] = labelId;
|
|
241
|
+
$[46] = text;
|
|
242
|
+
$[47] = t17;
|
|
338
243
|
} else {
|
|
339
|
-
|
|
244
|
+
t17 = $[47];
|
|
340
245
|
}
|
|
341
|
-
let
|
|
342
|
-
if ($[
|
|
343
|
-
|
|
246
|
+
let t18;
|
|
247
|
+
if ($[48] !== description || $[49] !== descriptionId || $[50] !== descriptionVariant) {
|
|
248
|
+
t18 = description ? /*#__PURE__*/jsx("span", {
|
|
344
249
|
id: descriptionId,
|
|
345
250
|
style: {
|
|
346
|
-
"--description-container-margin-left": descriptionVariant === "inline" ?
|
|
251
|
+
"--description-container-margin-left": descriptionVariant === "inline" ? "var(--base-size-8)" : 0,
|
|
347
252
|
"--description-container-flex-basis": descriptionVariant === "inline" ? 0 : "auto"
|
|
348
253
|
},
|
|
254
|
+
className: classes.DescriptionContainer,
|
|
349
255
|
children: descriptionVariant === "block" ? description : /*#__PURE__*/jsx(Truncate, {
|
|
350
256
|
title: description,
|
|
351
257
|
inline: true,
|
|
@@ -353,97 +259,102 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
|
353
259
|
children: description
|
|
354
260
|
})
|
|
355
261
|
}) : null;
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[47] = t13;
|
|
262
|
+
$[48] = description;
|
|
263
|
+
$[49] = descriptionId;
|
|
264
|
+
$[50] = descriptionVariant;
|
|
265
|
+
$[51] = t18;
|
|
361
266
|
} else {
|
|
362
|
-
|
|
267
|
+
t18 = $[51];
|
|
363
268
|
}
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
367
|
-
style:
|
|
368
|
-
|
|
269
|
+
let t19;
|
|
270
|
+
if ($[52] !== children || $[53] !== t16 || $[54] !== t17 || $[55] !== t18) {
|
|
271
|
+
t19 = /*#__PURE__*/jsxs("div", {
|
|
272
|
+
style: t16,
|
|
273
|
+
className: classes.MainContent,
|
|
274
|
+
children: [children, t17, t18]
|
|
369
275
|
});
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
276
|
+
$[52] = children;
|
|
277
|
+
$[53] = t16;
|
|
278
|
+
$[54] = t17;
|
|
279
|
+
$[55] = t18;
|
|
280
|
+
$[56] = t19;
|
|
375
281
|
} else {
|
|
376
|
-
|
|
282
|
+
t19 = $[56];
|
|
377
283
|
}
|
|
378
|
-
let
|
|
379
|
-
if ($[
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
284
|
+
let t20;
|
|
285
|
+
if ($[57] !== TrailingIcon || $[58] !== TrailingVisual || $[59] !== disabled || $[60] !== trailingText || $[61] !== variant) {
|
|
286
|
+
t20 = TrailingVisual ? /*#__PURE__*/jsx("div", {
|
|
287
|
+
className: classes.TrailingContent,
|
|
288
|
+
"data-variant": variant,
|
|
289
|
+
"data-disabled": disabled ? "" : undefined,
|
|
383
290
|
children: typeof TrailingVisual !== "string" && isValidElementType(TrailingVisual) ? /*#__PURE__*/jsx(TrailingVisual, {}) : TrailingVisual
|
|
384
|
-
}) : TrailingIcon || trailingText ? /*#__PURE__*/jsxs(
|
|
385
|
-
|
|
386
|
-
|
|
291
|
+
}) : TrailingIcon || trailingText ? /*#__PURE__*/jsxs("div", {
|
|
292
|
+
className: classes.TrailingContent,
|
|
293
|
+
"data-variant": variant,
|
|
294
|
+
"data-disabled": disabled ? "" : undefined,
|
|
387
295
|
children: [trailingText, TrailingIcon && /*#__PURE__*/jsx(TrailingIcon, {})]
|
|
388
296
|
}) : null;
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
297
|
+
$[57] = TrailingIcon;
|
|
298
|
+
$[58] = TrailingVisual;
|
|
299
|
+
$[59] = disabled;
|
|
300
|
+
$[60] = trailingText;
|
|
301
|
+
$[61] = variant;
|
|
302
|
+
$[62] = t20;
|
|
395
303
|
} else {
|
|
396
|
-
|
|
304
|
+
t20 = $[62];
|
|
397
305
|
}
|
|
398
|
-
let
|
|
399
|
-
if ($[
|
|
400
|
-
|
|
401
|
-
|
|
306
|
+
let t21;
|
|
307
|
+
if ($[63] !== t19 || $[64] !== t20) {
|
|
308
|
+
t21 = /*#__PURE__*/jsxs("div", {
|
|
309
|
+
className: classes.DividedContent,
|
|
310
|
+
"data-component": "ActionList.DividedContent",
|
|
311
|
+
children: [t19, t20]
|
|
402
312
|
});
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
313
|
+
$[63] = t19;
|
|
314
|
+
$[64] = t20;
|
|
315
|
+
$[65] = t21;
|
|
406
316
|
} else {
|
|
407
|
-
|
|
317
|
+
t21 = $[65];
|
|
408
318
|
}
|
|
409
|
-
let
|
|
410
|
-
if ($[
|
|
411
|
-
|
|
319
|
+
let t22;
|
|
320
|
+
if ($[66] !== Component || $[67] !== clickHandler || $[68] !== id || $[69] !== keyPressHandler || $[70] !== props || $[71] !== ref || $[72] !== selected || $[73] !== t11 || $[74] !== t12 || $[75] !== t13 || $[76] !== t21 || $[77] !== t5 || $[78] !== t6 || $[79] !== t7 || $[80] !== t8 || $[81] !== variant) {
|
|
321
|
+
t22 = /*#__PURE__*/jsxs(Component, {
|
|
412
322
|
ref: ref,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
variant: variant,
|
|
416
|
-
showDivider: showDivider,
|
|
323
|
+
tabIndex: t5,
|
|
324
|
+
"data-variant": variant,
|
|
417
325
|
"aria-selected": selected,
|
|
418
|
-
"aria-labelledby":
|
|
419
|
-
"aria-describedby":
|
|
326
|
+
"aria-labelledby": t6,
|
|
327
|
+
"aria-describedby": t7,
|
|
328
|
+
"data-divider": t8,
|
|
420
329
|
...props,
|
|
421
330
|
"data-id": id,
|
|
422
331
|
onKeyPress: keyPressHandler,
|
|
423
332
|
onClick: clickHandler,
|
|
424
|
-
|
|
333
|
+
className: t11,
|
|
334
|
+
children: [t12, t13, t21]
|
|
425
335
|
});
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
336
|
+
$[66] = Component;
|
|
337
|
+
$[67] = clickHandler;
|
|
338
|
+
$[68] = id;
|
|
339
|
+
$[69] = keyPressHandler;
|
|
340
|
+
$[70] = props;
|
|
341
|
+
$[71] = ref;
|
|
342
|
+
$[72] = selected;
|
|
343
|
+
$[73] = t11;
|
|
344
|
+
$[74] = t12;
|
|
345
|
+
$[75] = t13;
|
|
346
|
+
$[76] = t21;
|
|
347
|
+
$[77] = t5;
|
|
348
|
+
$[78] = t6;
|
|
349
|
+
$[79] = t7;
|
|
350
|
+
$[80] = t8;
|
|
351
|
+
$[81] = variant;
|
|
352
|
+
$[82] = t22;
|
|
442
353
|
} else {
|
|
443
|
-
|
|
354
|
+
t22 = $[82];
|
|
444
355
|
}
|
|
445
|
-
return
|
|
356
|
+
return t22;
|
|
446
357
|
});
|
|
447
358
|
Item.displayName = 'ActionList.Item';
|
|
448
359
|
|
|
449
|
-
export { Item
|
|
360
|
+
export { Item };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './Item-cf87f98a.css';
|
|
2
|
+
|
|
3
|
+
var classes = {"DividedContent":"prc-ActionList-DividedContent-8DEkl","MainContent":"prc-ActionList-MainContent-hedcu","Item":"prc-ActionList-Item-7tsoh","Item--danger":"prc-ActionList-Item--danger-NZeC-","Item--disabled":"prc-ActionList-Item--disabled-vmKZN","BaseVisualContainer":"prc-ActionList-BaseVisualContainer-V5nw2","LeadingVisualContainer":"prc-ActionList-LeadingVisualContainer-akdrP","TrailingContent":"prc-ActionList-TrailingContent-HCZJO","DescriptionContainer":"prc-ActionList-DescriptionContainer-mEG-Z","MultiSelectIcon":"prc-ActionList-MultiSelectIcon-BOiIG"};
|
|
4
|
+
|
|
5
|
+
export { classes as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/deprecated/ActionList/List.module.css"],"names":[],"mappings":"AAAA,+FAEE,6BAA8B,CAC9B,6FACF","file":"List-1ec9d6d9.css","sourcesContent":[".List[data-has-active-descendant],\n.List:focus-within {\n --item-hover-bg-override: none;\n --item-hover-divider-border-color-override: var(--borderColor-muted);\n}\n"]}
|
|
@@ -58,6 +58,7 @@ export interface ListPropsBase {
|
|
|
58
58
|
* Whether to display a divider above each `Item` in this `List` when it does not follow a `Header` or `Divider`.
|
|
59
59
|
*/
|
|
60
60
|
showItemDividers?: boolean;
|
|
61
|
+
className?: string;
|
|
61
62
|
}
|
|
62
63
|
/**
|
|
63
64
|
* Contract for props passed to the `List` component, when its `Item`s are collected in `Group`s.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA;AACvC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAA;AAIrC,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAA;AAGlD,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,CAAC,YAAY,CAAA;AAEnE,MAAM,MAAM,SAAS,GACjB,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,GACvD,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG;IAAC,UAAU,EAAE,YAAY,CAAA;CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAC,CAAC,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,YAAY,CAAA;IAEzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,KAAK,CAAA;IAE1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,kBAAkB,GAAG,MAAM,CAAA;IAE/C;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;IAElD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA;AACvC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAA;AAIrC,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAA;AAGlD,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,CAAC,YAAY,CAAA;AAEnE,MAAM,MAAM,SAAS,GACjB,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,GACvD,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG;IAAC,UAAU,EAAE,YAAY,CAAA;CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAC,CAAC,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,YAAY,CAAA;IAEzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,KAAK,CAAA;IAE1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,kBAAkB,GAAG,MAAM,CAAA;IAE/C;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;IAElD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD;;;OAGG;IACH,aAAa,EAAE,CAAC,CACZ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG;QAAC,UAAU,CAAC,EAAE,YAAY,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,KAAK,CAAA;KAAC,EAAE,OAAO,CAAC,CAC/F,GAAG;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,EAAE,CAAA;IAExB;;;OAGG;IACH,KAAK,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG;QAAC,UAAU,EAAE,YAAY,CAAA;KAAC,CAAC,CAAC,GAAG;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,EAAE,CAAA;CAC/F;AAUD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAmCxD;;GAEG;AACH,eAAO,MAAM,IAAI,kFAwHf,CAAA"}
|