@primer/react 38.0.0-rc.1 → 38.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/browser.esm.js +3 -3
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/dist/components.css +660 -23
- package/generated/components.json +58 -121
- package/lib/AvatarStack/AvatarStack.d.ts +2 -3
- package/lib/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/lib/AvatarStack/AvatarStack.js +1 -3
- package/lib/Banner/Banner.d.ts.map +1 -1
- package/lib/Banner/Banner.js +3 -1
- package/lib/Blankslate/Blankslate.js +38 -40
- package/lib/BranchName/BranchName.d.ts +6 -3
- package/lib/BranchName/BranchName.d.ts.map +1 -1
- package/lib/BranchName/BranchName.js +1 -3
- package/lib/Button/ButtonBase.js +2 -2
- package/lib/Checkbox/Checkbox.js +187 -56
- package/lib/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/lib/CircleBadge/CircleBadge.js +4 -0
- package/lib/DataTable/useTable.js +63 -82
- package/lib/Details/Details.d.ts +2 -3
- package/lib/Details/Details.d.ts.map +1 -1
- package/lib/Details/Details.js +1 -3
- package/lib/FeatureFlags/FeatureFlags.js +10 -12
- package/lib/FilteredActionList/useAnnouncements.js +31 -40
- package/lib/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/lib/LabelGroup/LabelGroup.js +13 -16
- package/lib/NavList/NavList.js +219 -53
- package/lib/PageLayout/PageLayout.js +53 -55
- package/lib/PointerBox/PointerBox.d.ts +8 -0
- package/lib/PointerBox/PointerBox.d.ts.map +1 -1
- package/lib/PointerBox/PointerBox.js +4 -0
- package/{lib-esm/ProgressBar/ProgressBar-a0957632.css → lib/ProgressBar/ProgressBar-36f689cb.css} +2 -2
- package/lib/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib/ProgressBar/index.d.ts +2 -2
- package/lib/ProgressBar/index.d.ts.map +1 -1
- package/lib/Select/Select.d.ts +1 -1
- package/lib/Select/Select.d.ts.map +1 -1
- package/lib/Select/Select.js +53 -65
- package/lib/SelectPanel/{SelectPanel-06900070.css → SelectPanel-e11ce210.css} +2 -2
- package/lib/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib/SelectPanel/SelectPanel.d.ts +1 -1
- package/lib/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/lib/SelectPanel/SelectPanel.js +2 -9
- package/lib/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib/SideNav.d.ts +2 -3
- package/lib/SideNav.d.ts.map +1 -1
- package/lib/SideNav.js +4 -10
- package/lib/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib/StateLabel/StateLabel.d.ts +6 -5
- package/lib/StateLabel/StateLabel.d.ts.map +1 -1
- package/lib/StateLabel/StateLabel.js +54 -126
- package/lib/StateLabel/StateLabel.module.css.js +2 -2
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/lib/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib/ToggleSwitch/ToggleSwitch.d.ts +1 -3
- package/lib/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +120 -152
- package/lib/ToggleSwitch/ToggleSwitch.module.css.js +2 -2
- package/lib/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib/Token/IssueLabelToken.d.ts.map +1 -1
- package/lib/Token/IssueLabelToken.js +7 -65
- package/lib/Token/IssueLabelToken.module.css.js +1 -1
- package/lib/Token/TokenBase.js +73 -82
- package/lib/Token/_RemoveTokenButton.js +106 -26
- package/lib/Tooltip/Tooltip.js +15 -17
- package/lib/TreeView/TreeView.js +18 -20
- package/lib/deprecated/ActionList/List.d.ts.map +1 -1
- package/lib/deprecated/ActionList/List.js +115 -138
- package/lib/deprecated/ActionMenu.js +19 -21
- package/lib/deprecated/index.d.ts +2 -0
- package/lib/deprecated/index.d.ts.map +1 -1
- package/lib/deprecated/index.js +2 -0
- package/lib/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib/hooks/useMnemonics.js +37 -76
- package/lib/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib/hooks/useOverflow.js +7 -11
- package/lib/hooks/useScrollFlash.js +25 -14
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -10
- package/lib/internal/components/BoxWithFallback.js +40 -35
- package/lib/internal/components/Caret-e686f04c.css +2 -0
- package/lib/internal/components/Caret-e686f04c.css.map +1 -0
- package/lib/internal/components/Caret.d.ts +1 -3
- package/lib/internal/components/Caret.d.ts.map +1 -1
- package/lib/internal/components/Caret.js +14 -48
- package/lib/internal/components/Caret.module.css.js +7 -0
- package/lib/internal/components/LiveRegion.js +8 -10
- package/lib/internal/utils/getGlobalFocusStyles.js +1 -1
- package/lib-esm/AvatarStack/AvatarStack.d.ts +2 -3
- package/lib-esm/AvatarStack/AvatarStack.js +1 -3
- package/lib-esm/Banner/Banner.js +3 -1
- package/lib-esm/Blankslate/Blankslate.js +38 -40
- package/lib-esm/BranchName/BranchName.d.ts +6 -3
- package/lib-esm/BranchName/BranchName.js +1 -3
- package/lib-esm/Button/ButtonBase.js +2 -2
- package/lib-esm/Checkbox/Checkbox.js +187 -56
- package/lib-esm/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib-esm/CircleBadge/CircleBadge.js +4 -0
- package/lib-esm/DataTable/useTable.js +64 -83
- package/lib-esm/Details/Details.d.ts +2 -3
- package/lib-esm/Details/Details.js +1 -3
- package/lib-esm/FeatureFlags/FeatureFlags.js +10 -12
- package/lib-esm/FilteredActionList/useAnnouncements.js +31 -40
- package/lib-esm/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib-esm/LabelGroup/LabelGroup.js +13 -16
- package/lib-esm/NavList/NavList.js +219 -53
- package/lib-esm/PageLayout/PageLayout.js +53 -55
- package/lib-esm/PointerBox/PointerBox.d.ts +8 -0
- package/lib-esm/PointerBox/PointerBox.js +4 -0
- package/{lib/ProgressBar/ProgressBar-a0957632.css → lib-esm/ProgressBar/ProgressBar-36f689cb.css} +2 -2
- package/lib-esm/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib-esm/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib-esm/ProgressBar/index.d.ts +2 -2
- package/lib-esm/Select/Select.d.ts +1 -1
- package/lib-esm/Select/Select.js +53 -65
- package/lib-esm/SelectPanel/{SelectPanel-06900070.css → SelectPanel-e11ce210.css} +2 -2
- package/lib-esm/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib-esm/SelectPanel/SelectPanel.d.ts +1 -1
- package/lib-esm/SelectPanel/SelectPanel.js +2 -9
- package/lib-esm/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib-esm/SideNav.d.ts +2 -3
- package/lib-esm/SideNav.js +4 -10
- package/lib-esm/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib-esm/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib-esm/StateLabel/StateLabel.d.ts +6 -5
- package/lib-esm/StateLabel/StateLabel.js +55 -123
- package/lib-esm/StateLabel/StateLabel.module.css.js +2 -2
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch.d.ts +1 -3
- package/lib-esm/ToggleSwitch/ToggleSwitch.js +120 -151
- package/lib-esm/ToggleSwitch/ToggleSwitch.module.css.js +2 -2
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib-esm/Token/IssueLabelToken.js +7 -65
- package/lib-esm/Token/IssueLabelToken.module.css.js +1 -1
- package/lib-esm/Token/TokenBase.js +73 -82
- package/lib-esm/Token/_RemoveTokenButton.js +106 -26
- package/lib-esm/Tooltip/Tooltip.js +15 -17
- package/lib-esm/TreeView/TreeView.js +18 -20
- package/lib-esm/deprecated/ActionList/List.js +116 -138
- package/lib-esm/deprecated/ActionMenu.js +19 -21
- package/lib-esm/deprecated/index.d.ts +2 -0
- package/lib-esm/deprecated/index.js +1 -0
- package/lib-esm/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib-esm/hooks/useMnemonics.js +37 -76
- package/lib-esm/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib-esm/hooks/useOverflow.js +7 -11
- package/lib-esm/hooks/useScrollFlash.js +25 -14
- package/lib-esm/index.d.ts +4 -3
- package/lib-esm/index.js +1 -1
- package/lib-esm/internal/components/BoxWithFallback.js +40 -35
- package/lib-esm/internal/components/Caret-e686f04c.css +2 -0
- package/lib-esm/internal/components/Caret-e686f04c.css.map +1 -0
- package/lib-esm/internal/components/Caret.d.ts +1 -3
- package/lib-esm/internal/components/Caret.js +14 -44
- package/lib-esm/internal/components/Caret.module.css.js +5 -0
- package/lib-esm/internal/components/LiveRegion.js +8 -10
- package/lib-esm/internal/utils/getGlobalFocusStyles.js +1 -1
- package/package.json +10 -10
- package/lib/CircleOcticon/CircleOcticon.d.ts +0 -16
- package/lib/CircleOcticon/CircleOcticon.d.ts.map +0 -1
- package/lib/CircleOcticon/CircleOcticon.js +0 -99
- package/lib/CircleOcticon/index.d.ts +0 -3
- package/lib/CircleOcticon/index.d.ts.map +0 -1
- package/lib/ProgressBar/ProgressBar-a0957632.css.map +0 -1
- package/lib/SelectPanel/SelectPanel-06900070.css.map +0 -1
- package/lib/StateLabel/StateLabel-cd27f475.css +0 -2
- package/lib/StateLabel/StateLabel-cd27f475.css.map +0 -1
- package/lib/ToggleSwitch/ToggleSwitch-65936b4b.css +0 -4
- package/lib/ToggleSwitch/ToggleSwitch-65936b4b.css.map +0 -1
- package/lib/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib/Token/IssueLabelToken-99c9b914.css.map +0 -1
- package/lib-esm/CircleOcticon/CircleOcticon.d.ts +0 -16
- package/lib-esm/CircleOcticon/CircleOcticon.js +0 -97
- package/lib-esm/CircleOcticon/index.d.ts +0 -3
- package/lib-esm/ProgressBar/ProgressBar-a0957632.css.map +0 -1
- package/lib-esm/SelectPanel/SelectPanel-06900070.css.map +0 -1
- package/lib-esm/StateLabel/StateLabel-cd27f475.css +0 -2
- package/lib-esm/StateLabel/StateLabel-cd27f475.css.map +0 -1
- package/lib-esm/ToggleSwitch/ToggleSwitch-65936b4b.css +0 -4
- package/lib-esm/ToggleSwitch/ToggleSwitch-65936b4b.css.map +0 -1
- package/lib-esm/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib-esm/Token/IssueLabelToken-99c9b914.css.map +0 -1
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var reactCompilerRuntime = require('react-compiler-runtime');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var Group = require('./Group.js');
|
|
6
5
|
var Item = require('./Item.js');
|
|
7
6
|
var Divider = require('./Divider.js');
|
|
8
|
-
var styled = require('styled-components');
|
|
9
|
-
var constants = require('../../constants.js');
|
|
10
7
|
var behaviors = require('@primer/behaviors');
|
|
8
|
+
var BoxWithFallback = require('../../internal/components/BoxWithFallback.js');
|
|
11
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
10
|
|
|
13
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
12
|
|
|
15
13
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
|
-
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* Asserts that the given value fulfills the `GroupedListProps` contract.
|
|
@@ -27,13 +24,16 @@ function isGroupedListProps(props) {
|
|
|
27
24
|
* Contract for props passed to the `List` component.
|
|
28
25
|
*/
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
// Base styles for the List component
|
|
28
|
+
const listStyles = {
|
|
29
|
+
fontSize: 'var(--text-body-size-medium, 14px)',
|
|
30
|
+
// 14px font-size * 1.428571429 = 20px line height
|
|
31
|
+
// TODO: When rem-based spacing on a 4px scale lands, replace hardcoded '20px'
|
|
32
|
+
lineHeight: '20px'
|
|
33
|
+
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Returns
|
|
36
|
+
* Returns style objects for `List` children matching the given `List` style variation.
|
|
37
37
|
* @param variant `List` style variation.
|
|
38
38
|
*/
|
|
39
39
|
function useListVariant(variant = 'inset') {
|
|
@@ -41,7 +41,8 @@ function useListVariant(variant = 'inset') {
|
|
|
41
41
|
case 'full':
|
|
42
42
|
return {
|
|
43
43
|
headerStyle: {
|
|
44
|
-
|
|
44
|
+
paddingLeft: 'var(--base-size-8, 8px)',
|
|
45
|
+
paddingRight: 'var(--base-size-8, 8px)'
|
|
45
46
|
},
|
|
46
47
|
itemStyle: {
|
|
47
48
|
borderRadius: 0
|
|
@@ -50,13 +51,14 @@ function useListVariant(variant = 'inset') {
|
|
|
50
51
|
default:
|
|
51
52
|
return {
|
|
52
53
|
firstGroupStyle: {
|
|
53
|
-
marginTop:
|
|
54
|
+
marginTop: 'var(--base-size-8, 8px)'
|
|
54
55
|
},
|
|
55
56
|
lastGroupStyle: {
|
|
56
|
-
marginBottom:
|
|
57
|
+
marginBottom: 'var(--base-size-8, 8px)'
|
|
57
58
|
},
|
|
58
59
|
itemStyle: {
|
|
59
|
-
|
|
60
|
+
marginLeft: 'var(--base-size-8, 8px)',
|
|
61
|
+
marginRight: 'var(--base-size-8, 8px)'
|
|
60
62
|
}
|
|
61
63
|
};
|
|
62
64
|
}
|
|
@@ -66,103 +68,113 @@ function useListVariant(variant = 'inset') {
|
|
|
66
68
|
* Lists `Item`s, either grouped or ungrouped, with a `Divider` between each `Group`.
|
|
67
69
|
*/
|
|
68
70
|
const List = /*#__PURE__*/React__default.default.forwardRef((props, forwardedRef) => {
|
|
69
|
-
|
|
71
|
+
// Extract style prop to avoid conflicts with BoxWithFallback
|
|
72
|
+
const {
|
|
73
|
+
style,
|
|
74
|
+
...restProps
|
|
75
|
+
} = props;
|
|
76
|
+
// Get style objects for `List` children matching the given `List` style variation.
|
|
70
77
|
const {
|
|
71
78
|
firstGroupStyle,
|
|
72
79
|
lastGroupStyle,
|
|
73
80
|
headerStyle,
|
|
74
81
|
itemStyle
|
|
75
|
-
} = useListVariant(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
} = useListVariant(restProps.variant);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Render a `Group` using the first of the following renderers that is defined:
|
|
86
|
+
* A `Group`-level or `List`-level custom `Group` renderer, or
|
|
87
|
+
* the default `Group` renderer.
|
|
88
|
+
*/
|
|
89
|
+
const renderGroup = groupProps => {
|
|
90
|
+
var _ref;
|
|
91
|
+
const GroupComponent = ((_ref = 'renderGroup' in groupProps && groupProps.renderGroup) !== null && _ref !== void 0 ? _ref : restProps.renderGroup) || Group.Group;
|
|
92
|
+
return /*#__PURE__*/React.createElement(GroupComponent, {
|
|
93
|
+
...groupProps,
|
|
94
|
+
key: groupProps.groupId
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Render an `Item` using the first of the following renderers that is defined:
|
|
100
|
+
* An `Item`-level, `Group`-level, or `List`-level custom `Item` renderer,
|
|
101
|
+
* or the default `Item` renderer.
|
|
102
|
+
*/
|
|
103
|
+
const renderItem = (itemProps, item, itemIndex) => {
|
|
104
|
+
var _ref2, _ref3, _itemProps$id;
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
106
|
+
const ItemComponent = 'renderItem' in itemProps && itemProps.renderItem || restProps.renderItem || Item.Item;
|
|
107
|
+
const key = (_ref2 = (_ref3 = 'key' in itemProps ? itemProps.key : undefined) !== null && _ref3 !== void 0 ? _ref3 : (_itemProps$id = itemProps.id) === null || _itemProps$id === void 0 ? void 0 : _itemProps$id.toString()) !== null && _ref2 !== void 0 ? _ref2 : itemIndex.toString();
|
|
108
|
+
return /*#__PURE__*/React.createElement(ItemComponent, {
|
|
109
|
+
showDivider: restProps.showItemDividers,
|
|
110
|
+
selectionVariant: restProps.selectionVariant,
|
|
111
|
+
...itemProps,
|
|
112
|
+
key: key,
|
|
113
|
+
sx: {
|
|
114
|
+
...itemStyle,
|
|
115
|
+
...itemProps.sx
|
|
116
|
+
},
|
|
117
|
+
item: item
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* An array of `Group`s, each with an associated `Header` and with an array of `Item`s belonging to that `Group`.
|
|
123
|
+
*/
|
|
124
|
+
let groups = [];
|
|
125
|
+
|
|
126
|
+
// Collect rendered `Item`s into `Group`s, avoiding excess iteration over the lists of `items` and `groupMetadata`:
|
|
127
|
+
if (!isGroupedListProps(restProps)) {
|
|
128
|
+
// When no `groupMetadata`s is provided, collect rendered `Item`s into a single anonymous `Group`.
|
|
129
|
+
groups = [{
|
|
130
|
+
items: restProps.items.map((item_0, index) => renderItem(item_0, item_0, index)),
|
|
131
|
+
groupId: '0'
|
|
132
|
+
}];
|
|
88
133
|
} else {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
134
|
+
// When `groupMetadata` is provided, collect rendered `Item`s into their associated `Group`s.
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A map of group identifiers to `Group`s, each with an associated array of `Item`s belonging to that `Group`.
|
|
138
|
+
*/
|
|
139
|
+
const groupMap = restProps.groupMetadata.reduce((groupAccumulator, groupMetadata) => groupAccumulator.set(groupMetadata.groupId, groupMetadata), new Map());
|
|
140
|
+
for (const itemProps_0 of restProps.items) {
|
|
141
|
+
var _group$items$length, _group$items, _group$items2;
|
|
142
|
+
// Look up the group associated with the current item.
|
|
143
|
+
const group = groupMap.get(itemProps_0.groupId);
|
|
144
|
+
const itemIndex_0 = (_group$items$length = group === null || group === void 0 ? void 0 : (_group$items = group.items) === null || _group$items === void 0 ? void 0 : _group$items.length) !== null && _group$items$length !== void 0 ? _group$items$length : 0;
|
|
145
|
+
|
|
146
|
+
// Upsert the group to include the current item (rendered).
|
|
147
|
+
groupMap.set(itemProps_0.groupId, {
|
|
148
|
+
...group,
|
|
149
|
+
items: [...((_group$items2 = group === null || group === void 0 ? void 0 : group.items) !== null && _group$items2 !== void 0 ? _group$items2 : []), renderItem({
|
|
150
|
+
showDivider: group === null || group === void 0 ? void 0 : group.showItemDividers,
|
|
151
|
+
...(group && 'renderItem' in group && {
|
|
152
|
+
renderItem: group.renderItem
|
|
153
|
+
}),
|
|
154
|
+
...itemProps_0
|
|
155
|
+
}, itemProps_0, itemIndex_0)]
|
|
108
156
|
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
$[3] = props.renderItem;
|
|
112
|
-
$[4] = props.selectionVariant;
|
|
113
|
-
$[5] = props.showItemDividers;
|
|
114
|
-
$[6] = t1;
|
|
115
|
-
} else {
|
|
116
|
-
t1 = $[6];
|
|
157
|
+
}
|
|
158
|
+
groups = [...groupMap.values()];
|
|
117
159
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
$[18] = renderItem;
|
|
130
|
-
$[19] = t5;
|
|
131
|
-
} else {
|
|
132
|
-
t5 = $[19];
|
|
160
|
+
return /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
|
|
161
|
+
...restProps,
|
|
162
|
+
ref: forwardedRef,
|
|
163
|
+
style: {
|
|
164
|
+
...listStyles,
|
|
165
|
+
...(style || {})
|
|
166
|
+
},
|
|
167
|
+
sx: {
|
|
168
|
+
[`&[${behaviors.hasActiveDescendantAttribute}], &:focus-within`]: {
|
|
169
|
+
'--item-hover-bg-override': 'none',
|
|
170
|
+
'--item-hover-divider-border-color-override': 'var(--borderColor-muted)'
|
|
133
171
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
const
|
|
140
|
-
for (const itemProps_0 of props.items) {
|
|
141
|
-
var _group$items$length, _group$items, _group$items2;
|
|
142
|
-
const group = groupMap.get(itemProps_0.groupId);
|
|
143
|
-
const itemIndex_0 = (_group$items$length = group === null || group === void 0 ? void 0 : (_group$items = group.items) === null || _group$items === void 0 ? void 0 : _group$items.length) !== null && _group$items$length !== void 0 ? _group$items$length : 0;
|
|
144
|
-
groupMap.set(itemProps_0.groupId, {
|
|
145
|
-
...group,
|
|
146
|
-
items: [...((_group$items2 = group === null || group === void 0 ? void 0 : group.items) !== null && _group$items2 !== void 0 ? _group$items2 : []), renderItem({
|
|
147
|
-
showDivider: group === null || group === void 0 ? void 0 : group.showItemDividers,
|
|
148
|
-
...(group && "renderItem" in group && {
|
|
149
|
-
renderItem: group.renderItem
|
|
150
|
-
}),
|
|
151
|
-
...itemProps_0
|
|
152
|
-
}, itemProps_0, itemIndex_0)]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
groups = [...groupMap.values()];
|
|
156
|
-
}
|
|
157
|
-
T0 = StyledList;
|
|
158
|
-
t2 = props;
|
|
159
|
-
t3 = forwardedRef;
|
|
160
|
-
t4 = groups.map((t5, index_0) => {
|
|
161
|
-
const {
|
|
162
|
-
header,
|
|
163
|
-
...groupProps_0
|
|
164
|
-
} = t5;
|
|
165
|
-
const hasFilledHeader = (header === null || header === void 0 ? void 0 : header.variant) === "filled";
|
|
172
|
+
},
|
|
173
|
+
children: groups.map(({
|
|
174
|
+
header,
|
|
175
|
+
...groupProps_0
|
|
176
|
+
}, index_0) => {
|
|
177
|
+
const hasFilledHeader = (header === null || header === void 0 ? void 0 : header.variant) === 'filled';
|
|
166
178
|
const shouldShowDivider = index_0 > 0 && !hasFilledHeader;
|
|
167
179
|
return /*#__PURE__*/jsxRuntime.jsxs(React__default.default.Fragment, {
|
|
168
180
|
children: [shouldShowDivider ? /*#__PURE__*/jsxRuntime.jsx(Divider.Divider, {}, `${groupProps_0.groupId}-divider`) : null, renderGroup({
|
|
@@ -185,44 +197,9 @@ const List = /*#__PURE__*/React__default.default.forwardRef((props, forwardedRef
|
|
|
185
197
|
...groupProps_0
|
|
186
198
|
})]
|
|
187
199
|
}, groupProps_0.groupId);
|
|
188
|
-
})
|
|
189
|
-
|
|
190
|
-
$[8] = forwardedRef;
|
|
191
|
-
$[9] = headerStyle;
|
|
192
|
-
$[10] = lastGroupStyle;
|
|
193
|
-
$[11] = props;
|
|
194
|
-
$[12] = renderGroup;
|
|
195
|
-
$[13] = renderItem;
|
|
196
|
-
$[14] = T0;
|
|
197
|
-
$[15] = t2;
|
|
198
|
-
$[16] = t3;
|
|
199
|
-
$[17] = t4;
|
|
200
|
-
} else {
|
|
201
|
-
T0 = $[14];
|
|
202
|
-
t2 = $[15];
|
|
203
|
-
t3 = $[16];
|
|
204
|
-
t4 = $[17];
|
|
205
|
-
}
|
|
206
|
-
let t5;
|
|
207
|
-
if ($[20] !== T0 || $[21] !== t2 || $[22] !== t3 || $[23] !== t4) {
|
|
208
|
-
t5 = /*#__PURE__*/jsxRuntime.jsx(T0, {
|
|
209
|
-
...t2,
|
|
210
|
-
ref: t3,
|
|
211
|
-
children: t4
|
|
212
|
-
});
|
|
213
|
-
$[20] = T0;
|
|
214
|
-
$[21] = t2;
|
|
215
|
-
$[22] = t3;
|
|
216
|
-
$[23] = t4;
|
|
217
|
-
$[24] = t5;
|
|
218
|
-
} else {
|
|
219
|
-
t5 = $[24];
|
|
220
|
-
}
|
|
221
|
-
return t5;
|
|
200
|
+
})
|
|
201
|
+
});
|
|
222
202
|
});
|
|
223
203
|
List.displayName = 'ActionList';
|
|
224
|
-
function _temp(groupAccumulator, groupMetadata) {
|
|
225
|
-
return groupAccumulator.set(groupMetadata.groupId, groupMetadata);
|
|
226
|
-
}
|
|
227
204
|
|
|
228
205
|
exports.List = List;
|
|
@@ -119,11 +119,10 @@ const ActionMenuBase = t0 => {
|
|
|
119
119
|
}
|
|
120
120
|
const renderMenuAnchor = t4;
|
|
121
121
|
let t5;
|
|
122
|
-
let t6;
|
|
123
122
|
if ($[17] !== items || $[18] !== onAction || $[19] !== onClose) {
|
|
124
|
-
let
|
|
123
|
+
let t6;
|
|
125
124
|
if ($[21] !== onAction || $[22] !== onClose) {
|
|
126
|
-
|
|
125
|
+
t6 = item => ({
|
|
127
126
|
...item,
|
|
128
127
|
role: "menuitem",
|
|
129
128
|
onAction: (props_0, event) => {
|
|
@@ -137,43 +136,42 @@ const ActionMenuBase = t0 => {
|
|
|
137
136
|
});
|
|
138
137
|
$[21] = onAction;
|
|
139
138
|
$[22] = onClose;
|
|
140
|
-
$[23] =
|
|
139
|
+
$[23] = t6;
|
|
141
140
|
} else {
|
|
142
|
-
|
|
141
|
+
t6 = $[23];
|
|
143
142
|
}
|
|
144
|
-
|
|
143
|
+
t5 = items.map(t6);
|
|
145
144
|
$[17] = items;
|
|
146
145
|
$[18] = onAction;
|
|
147
146
|
$[19] = onClose;
|
|
148
|
-
$[20] =
|
|
147
|
+
$[20] = t5;
|
|
149
148
|
} else {
|
|
150
|
-
|
|
149
|
+
t5 = $[20];
|
|
151
150
|
}
|
|
152
|
-
t5 = t6;
|
|
153
151
|
const itemsToRender = t5;
|
|
154
|
-
let
|
|
152
|
+
let t6;
|
|
155
153
|
if ($[24] !== itemsToRender || $[25] !== listProps) {
|
|
156
|
-
|
|
154
|
+
t6 = /*#__PURE__*/jsxRuntime.jsx(List.List, {
|
|
157
155
|
...listProps,
|
|
158
156
|
role: "menu",
|
|
159
157
|
items: itemsToRender
|
|
160
158
|
});
|
|
161
159
|
$[24] = itemsToRender;
|
|
162
160
|
$[25] = listProps;
|
|
163
|
-
$[26] =
|
|
161
|
+
$[26] = t6;
|
|
164
162
|
} else {
|
|
165
|
-
|
|
163
|
+
t6 = $[26];
|
|
166
164
|
}
|
|
167
|
-
let
|
|
168
|
-
if ($[27] !== anchorRef || $[28] !== combinedOpenState || $[29] !== onClose || $[30] !== onOpen || $[31] !== overlayProps || $[32] !== renderMenuAnchor || $[33] !==
|
|
169
|
-
|
|
165
|
+
let t7;
|
|
166
|
+
if ($[27] !== anchorRef || $[28] !== combinedOpenState || $[29] !== onClose || $[30] !== onOpen || $[31] !== overlayProps || $[32] !== renderMenuAnchor || $[33] !== t6) {
|
|
167
|
+
t7 = /*#__PURE__*/jsxRuntime.jsx(AnchoredOverlay.AnchoredOverlay, {
|
|
170
168
|
renderAnchor: renderMenuAnchor,
|
|
171
169
|
anchorRef: anchorRef,
|
|
172
170
|
open: combinedOpenState,
|
|
173
171
|
onOpen: onOpen,
|
|
174
172
|
onClose: onClose,
|
|
175
173
|
overlayProps: overlayProps,
|
|
176
|
-
children:
|
|
174
|
+
children: t6
|
|
177
175
|
});
|
|
178
176
|
$[27] = anchorRef;
|
|
179
177
|
$[28] = combinedOpenState;
|
|
@@ -181,12 +179,12 @@ const ActionMenuBase = t0 => {
|
|
|
181
179
|
$[30] = onOpen;
|
|
182
180
|
$[31] = overlayProps;
|
|
183
181
|
$[32] = renderMenuAnchor;
|
|
184
|
-
$[33] =
|
|
185
|
-
$[34] =
|
|
182
|
+
$[33] = t6;
|
|
183
|
+
$[34] = t7;
|
|
186
184
|
} else {
|
|
187
|
-
|
|
185
|
+
t7 = $[34];
|
|
188
186
|
}
|
|
189
|
-
return
|
|
187
|
+
return t7;
|
|
190
188
|
};
|
|
191
189
|
ActionMenuBase.displayName = 'ActionMenu';
|
|
192
190
|
|
|
@@ -23,4 +23,6 @@ export { default as TabNav } from '../TabNav';
|
|
|
23
23
|
export type { TabNavProps, TabNavLinkProps } from '../TabNav';
|
|
24
24
|
export { default as Tooltip } from '../Tooltip/Tooltip';
|
|
25
25
|
export type { TooltipProps } from '../Tooltip/Tooltip';
|
|
26
|
+
export { default as PointerBox } from '../PointerBox';
|
|
27
|
+
export type { PointerBoxProps } from '../PointerBox';
|
|
26
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deprecated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,SAAS,IAAI,mBAAmB,EAChC,UAAU,IAAI,oBAAoB,EAClC,gBAAgB,IAAI,0BAA0B,EAC9C,SAAS,IAAI,mBAAmB,GACjC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAKjD,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC1D,YAAY,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,YAAY,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,gBAAgB,CAAA;AAI5E,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAClC,YAAY,EAAC,WAAW,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,YAAY,CAAA;AAC7C,YAAY,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,aAAa,CAAA;AAC/C,YAAY,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,WAAW,CAAA;AAC3C,YAAY,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,oBAAoB,CAAA;AACrD,YAAY,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deprecated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,SAAS,IAAI,mBAAmB,EAChC,UAAU,IAAI,oBAAoB,EAClC,gBAAgB,IAAI,0BAA0B,EAC9C,SAAS,IAAI,mBAAmB,GACjC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAKjD,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC1D,YAAY,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,YAAY,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,gBAAgB,CAAA;AAI5E,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAClC,YAAY,EAAC,WAAW,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,YAAY,CAAA;AAC7C,YAAY,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,aAAa,CAAA;AAC/C,YAAY,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,WAAW,CAAA;AAC3C,YAAY,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,oBAAoB,CAAA;AACrD,YAAY,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAIpD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,eAAe,CAAA;AACnD,YAAY,EAAC,eAAe,EAAC,MAAM,eAAe,CAAA"}
|
package/lib/deprecated/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var Tooltip = require('../Tooltip/Tooltip.js');
|
|
|
7
7
|
var FilteredSearch = require('./FilteredSearch/FilteredSearch.js');
|
|
8
8
|
var Octicon = require('../Octicon/Octicon.js');
|
|
9
9
|
var Pagehead = require('../Pagehead/Pagehead.js');
|
|
10
|
+
var PointerBox = require('../PointerBox/PointerBox.js');
|
|
10
11
|
var UnderlineNav = require('./UnderlineNav/UnderlineNav.js');
|
|
11
12
|
var Dialog = require('../DialogV1/Dialog.js');
|
|
12
13
|
var TabNav = require('../TabNav/TabNav.js');
|
|
@@ -19,6 +20,7 @@ exports.Tooltip = Tooltip.default;
|
|
|
19
20
|
exports.FilteredSearch = FilteredSearch;
|
|
20
21
|
exports.Octicon = Octicon;
|
|
21
22
|
exports.Pagehead = Pagehead;
|
|
23
|
+
exports.PointerBox = PointerBox;
|
|
22
24
|
exports.UnderlineNav = UnderlineNav;
|
|
23
25
|
exports.Dialog = Dialog;
|
|
24
26
|
exports.TabNav = TabNav;
|
|
@@ -31,9 +31,10 @@ const useMenuKeyboardNavigation = (open, onClose, containerRef, anchorRef, t0) =
|
|
|
31
31
|
* and the focus should naturally move to the next item
|
|
32
32
|
*/
|
|
33
33
|
const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
34
|
-
const $ = reactCompilerRuntime.c(
|
|
34
|
+
const $ = reactCompilerRuntime.c(6);
|
|
35
35
|
let t0;
|
|
36
|
-
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[0] !== anchorRef || $[1] !== containerRef || $[2] !== onClose || $[3] !== open) {
|
|
37
38
|
t0 = () => {
|
|
38
39
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
39
40
|
const anchor = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current;
|
|
@@ -49,24 +50,16 @@ const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
|
49
50
|
anchor === null || anchor === void 0 ? void 0 : anchor.removeEventListener("keydown", handler);
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
-
$[
|
|
53
|
+
t1 = [open, onClose, containerRef, anchorRef];
|
|
54
|
+
$[0] = anchorRef;
|
|
55
|
+
$[1] = containerRef;
|
|
54
56
|
$[2] = onClose;
|
|
55
57
|
$[3] = open;
|
|
56
58
|
$[4] = t0;
|
|
59
|
+
$[5] = t1;
|
|
57
60
|
} else {
|
|
58
61
|
t0 = $[4];
|
|
59
|
-
|
|
60
|
-
let t1;
|
|
61
|
-
if ($[5] !== anchorRef || $[6] !== containerRef || $[7] !== onClose || $[8] !== open) {
|
|
62
|
-
t1 = [open, onClose, containerRef, anchorRef];
|
|
63
|
-
$[5] = anchorRef;
|
|
64
|
-
$[6] = containerRef;
|
|
65
|
-
$[7] = onClose;
|
|
66
|
-
$[8] = open;
|
|
67
|
-
$[9] = t1;
|
|
68
|
-
} else {
|
|
69
|
-
t1 = $[9];
|
|
62
|
+
t1 = $[5];
|
|
70
63
|
}
|
|
71
64
|
React__default.default.useEffect(t0, t1);
|
|
72
65
|
};
|
|
@@ -75,9 +68,10 @@ const useCloseMenuOnTab = (open, onClose, containerRef, anchorRef) => {
|
|
|
75
68
|
* Close submenu when left arrow key is pressed
|
|
76
69
|
*/
|
|
77
70
|
const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
78
|
-
const $ = reactCompilerRuntime.c(
|
|
71
|
+
const $ = reactCompilerRuntime.c(6);
|
|
79
72
|
let t0;
|
|
80
|
-
|
|
73
|
+
let t1;
|
|
74
|
+
if ($[0] !== containerRef || $[1] !== isSubmenu || $[2] !== onClose || $[3] !== open) {
|
|
81
75
|
t0 = () => {
|
|
82
76
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
83
77
|
const handler = event => {
|
|
@@ -90,24 +84,16 @@ const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
|
90
84
|
container === null || container === void 0 ? void 0 : container.removeEventListener("keydown", handler);
|
|
91
85
|
};
|
|
92
86
|
};
|
|
93
|
-
|
|
87
|
+
t1 = [open, onClose, containerRef, isSubmenu];
|
|
88
|
+
$[0] = containerRef;
|
|
94
89
|
$[1] = isSubmenu;
|
|
95
90
|
$[2] = onClose;
|
|
96
91
|
$[3] = open;
|
|
97
92
|
$[4] = t0;
|
|
93
|
+
$[5] = t1;
|
|
98
94
|
} else {
|
|
99
95
|
t0 = $[4];
|
|
100
|
-
|
|
101
|
-
let t1;
|
|
102
|
-
if ($[5] !== containerRef || $[6] !== isSubmenu || $[7] !== onClose || $[8] !== open) {
|
|
103
|
-
t1 = [open, onClose, containerRef, isSubmenu];
|
|
104
|
-
$[5] = containerRef;
|
|
105
|
-
$[6] = isSubmenu;
|
|
106
|
-
$[7] = onClose;
|
|
107
|
-
$[8] = open;
|
|
108
|
-
$[9] = t1;
|
|
109
|
-
} else {
|
|
110
|
-
t1 = $[9];
|
|
96
|
+
t1 = $[5];
|
|
111
97
|
}
|
|
112
98
|
React__default.default.useEffect(t0, t1);
|
|
113
99
|
};
|
|
@@ -117,9 +103,10 @@ const useCloseSubmenuOnArrow = (open, isSubmenu, onClose, containerRef) => {
|
|
|
117
103
|
* focus should move to a menu item
|
|
118
104
|
*/
|
|
119
105
|
const useMoveFocusToMenuItem = (open, containerRef, anchorRef) => {
|
|
120
|
-
const $ = reactCompilerRuntime.c(
|
|
106
|
+
const $ = reactCompilerRuntime.c(5);
|
|
121
107
|
let t0;
|
|
122
|
-
|
|
108
|
+
let t1;
|
|
109
|
+
if ($[0] !== anchorRef || $[1] !== containerRef || $[2] !== open) {
|
|
123
110
|
t0 = () => {
|
|
124
111
|
const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
125
112
|
const anchor = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current;
|
|
@@ -142,22 +129,15 @@ const useMoveFocusToMenuItem = (open, containerRef, anchorRef) => {
|
|
|
142
129
|
anchor === null || anchor === void 0 ? void 0 : anchor.addEventListener("keydown", handler);
|
|
143
130
|
return () => anchor === null || anchor === void 0 ? void 0 : anchor.addEventListener("keydown", handler);
|
|
144
131
|
};
|
|
145
|
-
|
|
146
|
-
$[
|
|
132
|
+
t1 = [open, containerRef, anchorRef];
|
|
133
|
+
$[0] = anchorRef;
|
|
134
|
+
$[1] = containerRef;
|
|
147
135
|
$[2] = open;
|
|
148
136
|
$[3] = t0;
|
|
137
|
+
$[4] = t1;
|
|
149
138
|
} else {
|
|
150
139
|
t0 = $[3];
|
|
151
|
-
|
|
152
|
-
let t1;
|
|
153
|
-
if ($[4] !== anchorRef || $[5] !== containerRef || $[6] !== open) {
|
|
154
|
-
t1 = [open, containerRef, anchorRef];
|
|
155
|
-
$[4] = anchorRef;
|
|
156
|
-
$[5] = containerRef;
|
|
157
|
-
$[6] = open;
|
|
158
|
-
$[7] = t1;
|
|
159
|
-
} else {
|
|
160
|
-
t1 = $[7];
|
|
140
|
+
t1 = $[4];
|
|
161
141
|
}
|
|
162
142
|
React__default.default.useEffect(t0, t1);
|
|
163
143
|
};
|