@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TextareaHTMLAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { FormValidationStatus } from '../utils/types/FormValidationStatus';
|
|
4
|
-
import type {
|
|
4
|
+
import type { WithSlotMarker } from '../utils/types';
|
|
5
5
|
export declare const DEFAULT_TEXTAREA_ROWS = 7;
|
|
6
6
|
export declare const DEFAULT_TEXTAREA_COLS = 30;
|
|
7
7
|
export declare const DEFAULT_TEXTAREA_RESIZE = "both";
|
|
@@ -42,7 +42,7 @@ export type TextareaProps = {
|
|
|
42
42
|
* CSS styles to apply to the Textarea
|
|
43
43
|
*/
|
|
44
44
|
style?: React.CSSProperties;
|
|
45
|
-
} & TextareaHTMLAttributes<HTMLTextAreaElement
|
|
45
|
+
} & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
46
46
|
/**
|
|
47
47
|
* An accessible, native textarea component that supports validation states.
|
|
48
48
|
* This component accepts all native HTML <textarea> attributes as props.
|
|
@@ -84,6 +84,7 @@ declare const Textarea: React.ForwardRefExoticComponent<{
|
|
|
84
84
|
* CSS styles to apply to the Textarea
|
|
85
85
|
*/
|
|
86
86
|
style?: React.CSSProperties;
|
|
87
|
-
} & TextareaHTMLAttributes<HTMLTextAreaElement> &
|
|
88
|
-
|
|
87
|
+
} & TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
88
|
+
declare const _default: WithSlotMarker<typeof Textarea>;
|
|
89
|
+
export default _default;
|
|
89
90
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAe,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAe,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAE7E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,qBAAqB,IAAI,CAAA;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAA;AACvC,eAAO,MAAM,uBAAuB,SAAS,CAAA;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAA;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAA;AAE/C;;;GAGG;AACH,QAAA,MAAM,QAAQ;IA1CZ;;OAEG;eACQ,OAAO;IAClB;;OAEG;uBACgB,oBAAoB;IACvC;;OAEG;YACK,OAAO;IACf;;OAEG;aACM,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU;IACpD;;OAEG;eACQ,OAAO;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;YACK,KAAK,CAAC,aAAa;2FAuD5B,CAAA;wBAK0B,cAAc,CAAC,OAAO,QAAQ,CAAC;AAA1D,wBAA0D"}
|
|
@@ -12,7 +12,7 @@ const DEFAULT_TEXTAREA_RESIZE = 'both';
|
|
|
12
12
|
* This component accepts all native HTML <textarea> attributes as props.
|
|
13
13
|
*/
|
|
14
14
|
const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
15
|
-
const $ = c(
|
|
15
|
+
const $ = c(37);
|
|
16
16
|
let block;
|
|
17
17
|
let className;
|
|
18
18
|
let contrast;
|
|
@@ -22,7 +22,6 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
22
22
|
let required;
|
|
23
23
|
let rest;
|
|
24
24
|
let style;
|
|
25
|
-
let sxProp;
|
|
26
25
|
let t1;
|
|
27
26
|
let t2;
|
|
28
27
|
let t3;
|
|
@@ -32,7 +31,6 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
32
31
|
({
|
|
33
32
|
value,
|
|
34
33
|
disabled,
|
|
35
|
-
sx: sxProp,
|
|
36
34
|
required,
|
|
37
35
|
validationStatus,
|
|
38
36
|
rows: t1,
|
|
@@ -56,12 +54,11 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
56
54
|
$[7] = required;
|
|
57
55
|
$[8] = rest;
|
|
58
56
|
$[9] = style;
|
|
59
|
-
$[10] =
|
|
60
|
-
$[11] =
|
|
61
|
-
$[12] =
|
|
62
|
-
$[13] =
|
|
63
|
-
$[14] =
|
|
64
|
-
$[15] = value;
|
|
57
|
+
$[10] = t1;
|
|
58
|
+
$[11] = t2;
|
|
59
|
+
$[12] = t3;
|
|
60
|
+
$[13] = validationStatus;
|
|
61
|
+
$[14] = value;
|
|
65
62
|
} else {
|
|
66
63
|
block = $[1];
|
|
67
64
|
className = $[2];
|
|
@@ -72,33 +69,32 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
72
69
|
required = $[7];
|
|
73
70
|
rest = $[8];
|
|
74
71
|
style = $[9];
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
value = $[15];
|
|
72
|
+
t1 = $[10];
|
|
73
|
+
t2 = $[11];
|
|
74
|
+
t3 = $[12];
|
|
75
|
+
validationStatus = $[13];
|
|
76
|
+
value = $[14];
|
|
81
77
|
}
|
|
82
78
|
const rows = t1 === undefined ? DEFAULT_TEXTAREA_ROWS : t1;
|
|
83
79
|
const cols = t2 === undefined ? DEFAULT_TEXTAREA_COLS : t2;
|
|
84
80
|
const resize = t3 === undefined ? DEFAULT_TEXTAREA_RESIZE : t3;
|
|
85
81
|
const t4 = validationStatus === "error" ? "true" : "false";
|
|
86
82
|
let t5;
|
|
87
|
-
if ($[
|
|
83
|
+
if ($[15] !== maxHeight || $[16] !== minHeight || $[17] !== style) {
|
|
88
84
|
t5 = {
|
|
89
85
|
minHeight,
|
|
90
86
|
maxHeight,
|
|
91
87
|
...style
|
|
92
88
|
};
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
89
|
+
$[15] = maxHeight;
|
|
90
|
+
$[16] = minHeight;
|
|
91
|
+
$[17] = style;
|
|
92
|
+
$[18] = t5;
|
|
97
93
|
} else {
|
|
98
|
-
t5 = $[
|
|
94
|
+
t5 = $[18];
|
|
99
95
|
}
|
|
100
96
|
let t6;
|
|
101
|
-
if ($[
|
|
97
|
+
if ($[19] !== cols || $[20] !== disabled || $[21] !== ref || $[22] !== required || $[23] !== resize || $[24] !== rest || $[25] !== rows || $[26] !== t4 || $[27] !== t5 || $[28] !== value) {
|
|
102
98
|
t6 = /*#__PURE__*/jsx("textarea", {
|
|
103
99
|
value: value,
|
|
104
100
|
"data-resize": resize,
|
|
@@ -112,24 +108,23 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
112
108
|
style: t5,
|
|
113
109
|
...rest
|
|
114
110
|
});
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
111
|
+
$[19] = cols;
|
|
112
|
+
$[20] = disabled;
|
|
113
|
+
$[21] = ref;
|
|
114
|
+
$[22] = required;
|
|
115
|
+
$[23] = resize;
|
|
116
|
+
$[24] = rest;
|
|
117
|
+
$[25] = rows;
|
|
118
|
+
$[26] = t4;
|
|
119
|
+
$[27] = t5;
|
|
120
|
+
$[28] = value;
|
|
121
|
+
$[29] = t6;
|
|
126
122
|
} else {
|
|
127
|
-
t6 = $[
|
|
123
|
+
t6 = $[29];
|
|
128
124
|
}
|
|
129
125
|
let t7;
|
|
130
|
-
if ($[
|
|
126
|
+
if ($[30] !== block || $[31] !== className || $[32] !== contrast || $[33] !== disabled || $[34] !== t6 || $[35] !== validationStatus) {
|
|
131
127
|
t7 = /*#__PURE__*/jsx(TextInputBaseWrapper, {
|
|
132
|
-
sx: sxProp,
|
|
133
128
|
validationStatus: validationStatus,
|
|
134
129
|
disabled: disabled,
|
|
135
130
|
block: block,
|
|
@@ -137,19 +132,19 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
137
132
|
className: className,
|
|
138
133
|
children: t6
|
|
139
134
|
});
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[38] = t7;
|
|
135
|
+
$[30] = block;
|
|
136
|
+
$[31] = className;
|
|
137
|
+
$[32] = contrast;
|
|
138
|
+
$[33] = disabled;
|
|
139
|
+
$[34] = t6;
|
|
140
|
+
$[35] = validationStatus;
|
|
141
|
+
$[36] = t7;
|
|
148
142
|
} else {
|
|
149
|
-
t7 = $[
|
|
143
|
+
t7 = $[36];
|
|
150
144
|
}
|
|
151
145
|
return t7;
|
|
152
146
|
});
|
|
153
147
|
Textarea.displayName = 'Textarea';
|
|
148
|
+
Textarea.__SLOT__ = Symbol('Textarea');
|
|
154
149
|
|
|
155
150
|
export { DEFAULT_TEXTAREA_COLS, DEFAULT_TEXTAREA_RESIZE, DEFAULT_TEXTAREA_ROWS, Textarea as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-Tooltip-Tooltip--1XZX{display:inline-block;position:relative}.prc-Tooltip-Tooltip--1XZX:after{display:none;font:normal normal var(--text-body-size-small,.75rem) /var(--text-body-lineHeight-small,1.6666) var(--fontStack-system,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");padding:.5em .75em;position:absolute;z-index:1000000;-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,var(--fgColor-onEmphasis,var(--color-fg-on-emphasis)));letter-spacing:normal;text-align:center;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;word-wrap:break-word;background:var(--tooltip-bgColor,var(--bgColor-emphasis,var(--color-neutral-emphasis-plus)));border-radius:var(--borderRadius-medium,.375rem);content:attr(aria-label);opacity:0;pointer-events:none;white-space:pre}@keyframes prc-Tooltip-tooltip-appear-Vhjuv{0%{opacity:0}to{opacity:1}}.prc-Tooltip-Tooltip--1XZX:active:after,.prc-Tooltip-Tooltip--1XZX:focus-within:after,.prc-Tooltip-Tooltip--1XZX:focus:after,.prc-Tooltip-Tooltip--1XZX:hover:after{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-Tooltip-tooltip-appear-Vhjuv;animation-timing-function:ease-in;display:inline-block;-webkit-text-decoration:none;text-decoration:none}.prc-Tooltip-Tooltip--noDelay-Kl98W:active:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:focus-within:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:focus:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:hover:after{animation-delay:0s}.prc-Tooltip-Tooltip--multiline-5KYEu:active:after,.prc-Tooltip-Tooltip--multiline-5KYEu:focus-within:after,.prc-Tooltip-Tooltip--multiline-5KYEu:focus:after,.prc-Tooltip-Tooltip--multiline-5KYEu:hover:after{display:table-cell}.prc-Tooltip-Tooltip--s-Z845o:after,.prc-Tooltip-Tooltip--se-4uqz7:after,.prc-Tooltip-Tooltip--sw-P5gHD:after{margin-top:6px;right:50%;top:100%}.prc-Tooltip-Tooltip--se-4uqz7:after{left:50%;margin-left:calc(var(--base-size-16,1rem)*-1);right:auto}.prc-Tooltip-Tooltip--sw-P5gHD:after{margin-right:calc(var(--base-size-16,1rem)*-1)}.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--ne-t2n1x:after,.prc-Tooltip-Tooltip--nw-PVis4:after{bottom:100%;margin-bottom:6px;right:50%}.prc-Tooltip-Tooltip--ne-t2n1x:after{left:50%;margin-left:calc(var(--base-size-16,1rem)*-1);right:auto}.prc-Tooltip-Tooltip--nw-PVis4:after{margin-right:calc(var(--base-size-16,1rem)*-1)}.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--s-Z845o:after{transform:translateX(50%)}.prc-Tooltip-Tooltip--w-c6nR3:after{margin-right:6px;right:100%}.prc-Tooltip-Tooltip--e-a4x1s:after,.prc-Tooltip-Tooltip--w-c6nR3:after{bottom:50%;transform:translateY(50%)}.prc-Tooltip-Tooltip--e-a4x1s:after{left:100%;margin-left:6px}.prc-Tooltip-Tooltip--multiline-5KYEu:after{max-width:250px;width:max-content;word-wrap:break-word;border-collapse:separate;white-space:pre-line}.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--s-Z845o:after{left:50%;right:auto;transform:translateX(-50%)}.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--e-a4x1s:after,.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--w-c6nR3:after{right:100%}.prc-Tooltip-Tooltip--alignRight-DdgpM:after{margin-right:0;right:0}.prc-Tooltip-Tooltip--alignLeft-7wr84:after{left:0;margin-left:0}
|
|
2
|
+
/*# sourceMappingURL=Tooltip-fffa9948.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Tooltip/Tooltip.module.css"],"names":[],"mappings":"AAEA,2BAEE,oBAAqB,CADrB,iBAEF,CAEA,iCAGE,YAAa,CAGb,+OAA2G,CAD3G,kBAAqB,CAJrB,iBAAkB,CAClB,eAAgB,CAKhB,2CAA4C,CAC5C,kFAAwD,CAKxD,qBAAsB,CAJtB,iBAAkB,CAClB,4BAAqB,CAArB,oBAAqB,CACrB,gBAAiB,CACjB,mBAAoB,CAEpB,oBAAqB,CAIrB,4FAA2D,CAC3D,gDAAyC,CAFzC,wBAAyB,CAGzB,SAAU,CAJV,mBAAoB,CADpB,eAMF,CAGA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,oKAUE,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,+CAA8B,CAG9B,iCAAkC,CALlC,oBAAqB,CACrB,4BAAqB,CAArB,oBAMF,CAEA,wMAIE,kBACF,CAEA,gNAIE,kBACF,CAGA,8GAME,cAAe,CAFf,SAAU,CADV,QAIF,CAEA,qCAEE,QAAS,CACT,6CAA2C,CAF3C,UAGF,CAEA,qCACE,8CACF,CAGA,8GAIE,WAAY,CAEZ,iBAAkB,CAHlB,SAIF,CAEA,qCAEE,QAAS,CACT,6CAA2C,CAF3C,UAGF,CAEA,qCACE,8CACF,CAGA,wEAEE,yBACF,CAGA,oCAIE,gBAAiB,CAHjB,UAKF,CAGA,wEAPE,UAAW,CAGX,yBAUF,CANA,oCAEE,SAAU,CAEV,eAEF,CAEA,4CAEE,eAAgB,CADhB,iBAAkB,CAElB,oBAAqB,CAErB,wBAAyB,CADzB,oBAEF,CAEA,kJAGE,QAAS,CADT,UAAW,CAEX,0BACF,CAEA,kJAEE,UACF,CAEA,6CAEE,cAAe,CADf,OAEF,CAEA,4CACE,MAAO,CACP,aACF","file":"Tooltip-fffa9948.css","sourcesContent":["/* stylelint-disable primer/typography, primer/borders, selector-class-pattern */\n\n.Tooltip {\n position: relative;\n display: inline-block;\n}\n\n.Tooltip::after {\n position: absolute;\n z-index: 1000000;\n display: none;\n /* stylelint-disable-next-line primer/spacing */\n padding: 0.5em 0.75em;\n font: normal normal var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-system);\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis));\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n pointer-events: none;\n content: attr(aria-label);\n background: var(--tooltip-bgColor, var(--bgColor-emphasis));\n border-radius: var(--borderRadius-medium);\n opacity: 0;\n}\n\n/* delay animation for tooltip */\n@keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.Tooltip:hover::after,\n.Tooltip:active::after,\n.Tooltip:focus::after,\n.Tooltip:focus-within::after {\n display: inline-block;\n text-decoration: none;\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n}\n\n.Tooltip--noDelay:hover::after,\n.Tooltip--noDelay:active::after,\n.Tooltip--noDelay:focus::after,\n.Tooltip--noDelay:focus-within::after {\n animation-delay: 0s;\n}\n\n.Tooltip--multiline:hover::after,\n.Tooltip--multiline:active::after,\n.Tooltip--multiline:focus::after,\n.Tooltip--multiline:focus-within::after {\n display: table-cell;\n}\n\n/* Tooltipped south */\n.Tooltip--s::after,\n.Tooltip--se::after,\n.Tooltip--sw::after {\n top: 100%;\n right: 50%;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: 6px;\n}\n\n.Tooltip--se::after {\n right: auto;\n left: 50%;\n margin-left: calc(-1 * var(--base-size-16));\n}\n\n.Tooltip--sw::after {\n margin-right: calc(-1 * var(--base-size-16));\n}\n\n/* Tooltips above the object */\n.Tooltip--n::after,\n.Tooltip--ne::after,\n.Tooltip--nw::after {\n right: 50%;\n bottom: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: 6px;\n}\n\n.Tooltip--ne::after {\n right: auto;\n left: 50%;\n margin-left: calc(-1 * var(--base-size-16));\n}\n\n.Tooltip--nw::after {\n margin-right: calc(-1 * var(--base-size-16));\n}\n\n/* Move the tooltip body to the center of the object. */\n.Tooltip--s::after,\n.Tooltip--n::after {\n transform: translateX(50%);\n}\n\n/* Tooltipped to the left */\n.Tooltip--w::after {\n right: 100%;\n bottom: 50%;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: 6px;\n transform: translateY(50%);\n}\n\n/* tooltipped to the right */\n.Tooltip--e::after {\n bottom: 50%;\n left: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: 6px;\n transform: translateY(50%);\n}\n\n.Tooltip--multiline::after {\n width: max-content;\n max-width: 250px;\n word-wrap: break-word;\n white-space: pre-line;\n border-collapse: separate;\n}\n\n.Tooltip--multiline.Tooltip--s::after,\n.Tooltip--multiline.Tooltip--n::after {\n right: auto;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.Tooltip--multiline.Tooltip--w::after,\n.Tooltip--multiline.Tooltip--e::after {\n right: 100%;\n}\n\n.Tooltip--alignRight::after {\n right: 0;\n margin-right: 0;\n}\n\n.Tooltip--alignLeft::after {\n left: 0;\n margin-left: 0;\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
declare const TooltipBase: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
|
+
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated
|
|
6
5
|
*/
|
|
@@ -10,17 +9,16 @@ export type TooltipProps = {
|
|
|
10
9
|
noDelay?: boolean;
|
|
11
10
|
align?: 'left' | 'right';
|
|
12
11
|
wrap?: boolean;
|
|
13
|
-
} & ComponentProps<
|
|
12
|
+
} & React.ComponentProps<'span'>;
|
|
14
13
|
export declare const TooltipContext: React.Context<{
|
|
15
14
|
tooltipId?: string;
|
|
16
15
|
}>;
|
|
17
16
|
/**
|
|
18
17
|
* @deprecated
|
|
19
18
|
*/
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
19
|
+
declare const Tooltip: PolymorphicForwardRefComponent<"span", TooltipProps> & {
|
|
20
|
+
alignments: string[];
|
|
21
|
+
directions: string[];
|
|
22
|
+
};
|
|
25
23
|
export default Tooltip;
|
|
26
24
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAI/F;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;AAEhC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E;;GAEG;AACH,QAAA,MAAM,OAAO,EAyBP,8BAA8B,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG;IAC3D,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAQD,eAAe,OAAO,CAAA"}
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -1,133 +1,59 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
1
|
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { get } from '../constants.js';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import classes from './Tooltip.module.css.js';
|
|
6
4
|
import { jsx } from 'react/jsx-runtime';
|
|
7
5
|
import { useId } from '../hooks/useId.js';
|
|
8
6
|
|
|
9
|
-
const TooltipBase = styled.span.withConfig({
|
|
10
|
-
displayName: "Tooltip__TooltipBase",
|
|
11
|
-
componentId: "sc-17tf59c-0"
|
|
12
|
-
})(["position:relative;display:inline-block;&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ", ";-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,", ");text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--tooltip-bgColor,", ");border-radius:", ";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&:hover,&:active,&:focus,&:focus-within{&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0s;}}&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus,&.tooltipped-no-delay:focus-within{&::after{animation-delay:0s;}}&.tooltipped-multiline:hover,&.tooltipped-multiline:active,&.tooltipped-multiline:focus,&.tooltipped-multiline:focus-within{&::after{display:table-cell;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-sw::after{margin-right:-", ";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-nw::after{margin-right:-", ";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}}&.tooltipped-multiline{&::after{width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}&.tooltipped-s::after,&.tooltipped-n::after{right:auto;left:50%;transform:translateX(-50%);}&.tooltipped-w::after,&.tooltipped-e::after{right:100%;}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}"], get('fonts.normal'), get('colors.fg.onEmphasis'), get('colors.neutral.emphasisPlus'), get('radii.2'), get('space.3'), get('space.3'), get('space.3'), get('space.3'));
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
7
|
const TooltipContext = /*#__PURE__*/React.createContext({});
|
|
19
8
|
|
|
20
9
|
/**
|
|
21
10
|
* @deprecated
|
|
22
11
|
*/
|
|
23
|
-
function Tooltip(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
({
|
|
36
|
-
direction: t1,
|
|
37
|
-
children,
|
|
38
|
-
className,
|
|
39
|
-
text,
|
|
40
|
-
noDelay,
|
|
41
|
-
align,
|
|
42
|
-
wrap,
|
|
43
|
-
id,
|
|
44
|
-
...rest
|
|
45
|
-
} = t0);
|
|
46
|
-
$[0] = t0;
|
|
47
|
-
$[1] = align;
|
|
48
|
-
$[2] = children;
|
|
49
|
-
$[3] = className;
|
|
50
|
-
$[4] = id;
|
|
51
|
-
$[5] = noDelay;
|
|
52
|
-
$[6] = rest;
|
|
53
|
-
$[7] = t1;
|
|
54
|
-
$[8] = text;
|
|
55
|
-
$[9] = wrap;
|
|
56
|
-
} else {
|
|
57
|
-
align = $[1];
|
|
58
|
-
children = $[2];
|
|
59
|
-
className = $[3];
|
|
60
|
-
id = $[4];
|
|
61
|
-
noDelay = $[5];
|
|
62
|
-
rest = $[6];
|
|
63
|
-
t1 = $[7];
|
|
64
|
-
text = $[8];
|
|
65
|
-
wrap = $[9];
|
|
66
|
-
}
|
|
67
|
-
const direction = t1 === undefined ? "n" : t1;
|
|
12
|
+
const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip({
|
|
13
|
+
as: Component = 'span',
|
|
14
|
+
direction = 'n',
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
text,
|
|
18
|
+
noDelay,
|
|
19
|
+
align,
|
|
20
|
+
wrap,
|
|
21
|
+
id,
|
|
22
|
+
...rest
|
|
23
|
+
}, ref) {
|
|
68
24
|
const tooltipId = useId(id);
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
let t7;
|
|
87
|
-
if ($[16] !== tooltipId) {
|
|
88
|
-
t7 = {
|
|
89
|
-
tooltipId
|
|
90
|
-
};
|
|
91
|
-
$[16] = tooltipId;
|
|
92
|
-
$[17] = t7;
|
|
93
|
-
} else {
|
|
94
|
-
t7 = $[17];
|
|
95
|
-
}
|
|
96
|
-
const value = t7;
|
|
97
|
-
let t8;
|
|
98
|
-
if ($[18] !== children || $[19] !== classes || $[20] !== rest || $[21] !== text || $[22] !== tooltipId) {
|
|
99
|
-
t8 = /*#__PURE__*/jsx(TooltipBase, {
|
|
100
|
-
role: "tooltip",
|
|
101
|
-
"aria-label": text,
|
|
102
|
-
id: tooltipId,
|
|
103
|
-
...rest,
|
|
104
|
-
className: classes,
|
|
105
|
-
children: children
|
|
106
|
-
});
|
|
107
|
-
$[18] = children;
|
|
108
|
-
$[19] = classes;
|
|
109
|
-
$[20] = rest;
|
|
110
|
-
$[21] = text;
|
|
111
|
-
$[22] = tooltipId;
|
|
112
|
-
$[23] = t8;
|
|
113
|
-
} else {
|
|
114
|
-
t8 = $[23];
|
|
115
|
-
}
|
|
116
|
-
let t9;
|
|
117
|
-
if ($[24] !== t8 || $[25] !== value) {
|
|
118
|
-
t9 = /*#__PURE__*/jsx(TooltipContext.Provider, {
|
|
25
|
+
const tooltipClasses = clsx(className, classes.Tooltip, classes[`Tooltip--${direction}`], {
|
|
26
|
+
[classes[`Tooltip--align${align === 'left' ? 'Left' : 'Right'}`]]: align,
|
|
27
|
+
[classes['Tooltip--noDelay']]: noDelay,
|
|
28
|
+
[classes['Tooltip--multiline']]: wrap,
|
|
29
|
+
// maintaining feature parity with old classes
|
|
30
|
+
[`tooltipped-${direction}`]: true,
|
|
31
|
+
[`tooltipped-align-${align === 'left' ? 'left' : 'right'}-2`]: align,
|
|
32
|
+
'tooltipped-no-delay': noDelay,
|
|
33
|
+
'tooltipped-multiline': wrap
|
|
34
|
+
});
|
|
35
|
+
const value = useMemo(() => ({
|
|
36
|
+
tooltipId
|
|
37
|
+
}), [tooltipId]);
|
|
38
|
+
return (
|
|
39
|
+
/*#__PURE__*/
|
|
40
|
+
// This provider is used to check if an icon button is wrapped with tooltip or not.
|
|
41
|
+
jsx(TooltipContext.Provider, {
|
|
119
42
|
value: value,
|
|
120
|
-
children:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
43
|
+
children: /*#__PURE__*/jsx(Component, {
|
|
44
|
+
role: "tooltip",
|
|
45
|
+
"aria-label": text,
|
|
46
|
+
id: tooltipId,
|
|
47
|
+
...rest,
|
|
48
|
+
className: tooltipClasses,
|
|
49
|
+
ref: ref,
|
|
50
|
+
children: children
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
});
|
|
130
55
|
Tooltip.alignments = ['left', 'right'];
|
|
131
56
|
Tooltip.directions = ['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'];
|
|
57
|
+
Tooltip.__SLOT__ = Symbol('DEPRECATED_Tooltip');
|
|
132
58
|
|
|
133
59
|
export { TooltipContext, Tooltip as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './Tooltip-fffa9948.css';
|
|
2
|
+
|
|
3
|
+
var classes = {"Tooltip":"prc-Tooltip-Tooltip--1XZX","tooltip-appear":"prc-Tooltip-tooltip-appear-Vhjuv","Tooltip--noDelay":"prc-Tooltip-Tooltip--noDelay-Kl98W","Tooltip--multiline":"prc-Tooltip-Tooltip--multiline-5KYEu","Tooltip--s":"prc-Tooltip-Tooltip--s-Z845o","Tooltip--se":"prc-Tooltip-Tooltip--se-4uqz7","Tooltip--sw":"prc-Tooltip-Tooltip--sw-P5gHD","Tooltip--n":"prc-Tooltip-Tooltip--n-BOOzB","Tooltip--ne":"prc-Tooltip-Tooltip--ne-t2n1x","Tooltip--nw":"prc-Tooltip-Tooltip--nw-PVis4","Tooltip--w":"prc-Tooltip-Tooltip--w-c6nR3","Tooltip--e":"prc-Tooltip-Tooltip--e-a4x1s","Tooltip--alignRight":"prc-Tooltip-Tooltip--alignRight-DdgpM","Tooltip--alignLeft":"prc-Tooltip-Tooltip--alignLeft-7wr84"};
|
|
4
|
+
|
|
5
|
+
export { classes as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type ForwardRefExoticComponent } from 'react';
|
|
2
2
|
import { type KeybindingHintProps } from '../KeybindingHint';
|
|
3
|
+
import type { SlotMarker } from '../utils/types';
|
|
3
4
|
export type TooltipDirection = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
|
|
4
5
|
export type TooltipProps = React.PropsWithChildren<{
|
|
5
6
|
direction?: TooltipDirection;
|
|
@@ -17,19 +18,5 @@ export type TooltipProps = React.PropsWithChildren<{
|
|
|
17
18
|
export declare const TooltipContext: React.Context<{
|
|
18
19
|
tooltipId?: string;
|
|
19
20
|
}>;
|
|
20
|
-
export declare const Tooltip: React.
|
|
21
|
-
direction?: TooltipDirection;
|
|
22
|
-
text: string;
|
|
23
|
-
type?: "label" | "description";
|
|
24
|
-
keybindingHint?: KeybindingHintProps["keys"];
|
|
25
|
-
/**
|
|
26
|
-
* Delay in milliseconds before showing the tooltip
|
|
27
|
-
* @default short (50ms)
|
|
28
|
-
* medium (400ms)
|
|
29
|
-
* long (1200ms)
|
|
30
|
-
*/
|
|
31
|
-
delay?: "short" | "medium" | "long";
|
|
32
|
-
} & {
|
|
33
|
-
children?: React.ReactNode | undefined;
|
|
34
|
-
} & React.HTMLAttributes<HTMLElement> & React.RefAttributes<unknown>>;
|
|
21
|
+
export declare const Tooltip: ForwardRefExoticComponent<React.PropsWithoutRef<TooltipProps> & React.RefAttributes<HTMLElement>> & SlotMarker;
|
|
35
22
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiD,KAAK,yBAAyB,EAAC,MAAM,OAAO,CAAA;AAS3G,OAAO,EAAoD,KAAK,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAG7G,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;CACpC,CAAC,GACA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAiEnC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAC7C,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CACvE,GACC,UA4QD,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Icon } from '@primer/octicons-react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { FCWithSlotMarker } from '../utils/types';
|
|
3
4
|
export type TreeViewProps = {
|
|
4
5
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
5
6
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
@@ -13,6 +14,8 @@ export type TreeViewSecondaryActions = {
|
|
|
13
14
|
label: string;
|
|
14
15
|
onClick: () => void;
|
|
15
16
|
icon: Icon;
|
|
17
|
+
count?: number | string;
|
|
18
|
+
className?: string;
|
|
16
19
|
};
|
|
17
20
|
export type TreeViewItemProps = {
|
|
18
21
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
@@ -60,7 +63,7 @@ export type TreeViewErrorDialogProps = {
|
|
|
60
63
|
};
|
|
61
64
|
export declare const TreeView: React.FC<TreeViewProps> & {
|
|
62
65
|
Item: React.ForwardRefExoticComponent<TreeViewItemProps & React.RefAttributes<HTMLElement>>;
|
|
63
|
-
SubTree:
|
|
66
|
+
SubTree: FCWithSlotMarker<TreeViewSubTreeProps>;
|
|
64
67
|
LeadingAction: React.FC<TreeViewVisualProps>;
|
|
65
68
|
LeadingVisual: React.FC<TreeViewVisualProps>;
|
|
66
69
|
TrailingVisual: React.FC<TreeViewVisualProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAAM,OAAO,CAAA;AAsBnD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAyCpD,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAC3D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAqFD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAC3D,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC9C,CAAA;AAwQD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEnE,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AA0MD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;IAG/E,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAqED,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,wBAAwB,EAAE,CAAA;IACjC,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AA0ED,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,wBAAwB,EAAE,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAwED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AA4CD,eAAO,MAAM,QAAQ;;;;;;;;CAQnB,CAAA"}
|
|
@@ -14,15 +14,21 @@ import { useRovingTabIndex, getFirstChildElement } from './useRovingTabIndex.js'
|
|
|
14
14
|
import { useTypeahead } from './useTypeahead.js';
|
|
15
15
|
import { Dialog } from '../Dialog/Dialog.js';
|
|
16
16
|
import { IconButton } from '../Button/IconButton.js';
|
|
17
|
+
import { ButtonComponent } from '../Button/Button.js';
|
|
17
18
|
import { ActionList } from '../ActionList/index.js';
|
|
19
|
+
import { isSlot } from '../utils/is-slot.js';
|
|
18
20
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
21
|
import { useIsMacOS } from '../hooks/useIsMacOS.js';
|
|
20
22
|
import Spinner from '../Spinner/Spinner.js';
|
|
23
|
+
import { Tooltip } from '../TooltipV2/Tooltip.js';
|
|
21
24
|
import Text from '../Text/Text.js';
|
|
22
25
|
import { SkeletonAvatar } from '../SkeletonAvatar/SkeletonAvatar.js';
|
|
23
26
|
import { SkeletonText } from '../SkeletonText/SkeletonText.js';
|
|
24
27
|
import { getAccessibleKeybindingHintString } from '../KeybindingHint/KeybindingHint.js';
|
|
25
28
|
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
30
|
+
// Context
|
|
31
|
+
|
|
26
32
|
const RootContext = /*#__PURE__*/React.createContext({
|
|
27
33
|
announceUpdate: () => {},
|
|
28
34
|
expandedStateCache: {
|
|
@@ -664,6 +670,7 @@ const SubTree = t0 => {
|
|
|
664
670
|
return t11;
|
|
665
671
|
};
|
|
666
672
|
SubTree.displayName = 'TreeView.SubTree';
|
|
673
|
+
SubTree.__SLOT__ = Symbol('TreeView.SubTree');
|
|
667
674
|
function usePreviousValue(value) {
|
|
668
675
|
const ref = React.useRef(value);
|
|
669
676
|
React.useEffect(() => {
|
|
@@ -845,10 +852,10 @@ function useSubTree(children) {
|
|
|
845
852
|
// ----------------------------------------------------------------------------
|
|
846
853
|
// TreeView.LeadingVisual and TreeView.TrailingVisual
|
|
847
854
|
function _temp5(child_0) {
|
|
848
|
-
return !(/*#__PURE__*/React.isValidElement(child_0) && child_0.type === SubTree);
|
|
855
|
+
return !(/*#__PURE__*/React.isValidElement(child_0) && (child_0.type === SubTree || isSlot(child_0, SubTree)));
|
|
849
856
|
}
|
|
850
857
|
function _temp4(child) {
|
|
851
|
-
return /*#__PURE__*/React.isValidElement(child) && child.type === SubTree;
|
|
858
|
+
return /*#__PURE__*/React.isValidElement(child) && (child.type === SubTree || isSlot(child, SubTree));
|
|
852
859
|
}
|
|
853
860
|
const LeadingVisual = props => {
|
|
854
861
|
const $ = c(13);
|
|
@@ -1092,7 +1099,7 @@ const TrailingAction = props => {
|
|
|
1092
1099
|
t1 = /*#__PURE__*/jsxs("div", {
|
|
1093
1100
|
id: trailingActionId,
|
|
1094
1101
|
className: t0,
|
|
1095
|
-
children: ["
|
|
1102
|
+
children: ["- ", shortcutText]
|
|
1096
1103
|
});
|
|
1097
1104
|
$[1] = shortcutText;
|
|
1098
1105
|
$[2] = trailingActionId;
|
|
@@ -1108,19 +1115,40 @@ const TrailingAction = props => {
|
|
|
1108
1115
|
const {
|
|
1109
1116
|
label,
|
|
1110
1117
|
onClick,
|
|
1111
|
-
icon
|
|
1118
|
+
icon,
|
|
1119
|
+
count,
|
|
1120
|
+
className
|
|
1112
1121
|
} = t4;
|
|
1122
|
+
if (count) {
|
|
1123
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
1124
|
+
text: label,
|
|
1125
|
+
children: /*#__PURE__*/jsx(ButtonComponent, {
|
|
1126
|
+
"aria-label": label,
|
|
1127
|
+
leadingVisual: icon,
|
|
1128
|
+
variant: "invisible",
|
|
1129
|
+
className: clsx(className, classes.TreeViewItemTrailingActionButton),
|
|
1130
|
+
onClick: onClick,
|
|
1131
|
+
onKeyDown: () => {
|
|
1132
|
+
const parentElement = document.getElementById(itemId);
|
|
1133
|
+
parentElement === null || parentElement === void 0 ? void 0 : parentElement.focus();
|
|
1134
|
+
},
|
|
1135
|
+
tabIndex: -1,
|
|
1136
|
+
"aria-hidden": true,
|
|
1137
|
+
count: count
|
|
1138
|
+
})
|
|
1139
|
+
}, index);
|
|
1140
|
+
}
|
|
1113
1141
|
return /*#__PURE__*/jsx(IconButton, {
|
|
1114
1142
|
icon: icon,
|
|
1115
1143
|
variant: "invisible",
|
|
1116
1144
|
"aria-label": label,
|
|
1117
|
-
className: classes.TreeViewItemTrailingActionButton,
|
|
1145
|
+
className: clsx(className, classes.TreeViewItemTrailingActionButton),
|
|
1118
1146
|
onClick: onClick,
|
|
1119
1147
|
tabIndex: -1,
|
|
1120
1148
|
"aria-hidden": true,
|
|
1121
1149
|
onKeyDown: () => {
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1150
|
+
const parentElement_0 = document.getElementById(itemId);
|
|
1151
|
+
parentElement_0 === null || parentElement_0 === void 0 ? void 0 : parentElement_0.focus();
|
|
1124
1152
|
}
|
|
1125
1153
|
}, index);
|
|
1126
1154
|
};
|
|
@@ -1370,13 +1398,18 @@ function _temp0(t0, index) {
|
|
|
1370
1398
|
const {
|
|
1371
1399
|
label,
|
|
1372
1400
|
onClick,
|
|
1373
|
-
icon: Icon
|
|
1401
|
+
icon: Icon,
|
|
1402
|
+
count
|
|
1374
1403
|
} = t0;
|
|
1375
1404
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
1376
1405
|
onSelect: onClick,
|
|
1377
1406
|
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
1378
1407
|
children: /*#__PURE__*/jsx(Icon, {})
|
|
1379
|
-
}), label
|
|
1408
|
+
}), label, count ? /*#__PURE__*/jsxs(ActionList.TrailingVisual, {
|
|
1409
|
+
children: [count, /*#__PURE__*/jsx(VisuallyHidden, {
|
|
1410
|
+
children: "items"
|
|
1411
|
+
})]
|
|
1412
|
+
}) : null]
|
|
1380
1413
|
}, index);
|
|
1381
1414
|
}
|
|
1382
1415
|
_temp0.displayName = "_temp0";
|