@primer/react 0.0.0-20260219212149 → 0.0.0-20260219220240
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 +1 -3
- package/dist/ActionList/Description.d.ts.map +1 -1
- package/dist/ActionList/Description.js +40 -76
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +63 -108
- package/dist/ActionList/shared.d.ts +0 -1
- package/dist/ActionList/shared.d.ts.map +1 -1
- package/dist/Autocomplete/Autocomplete.js +76 -159
- package/dist/Autocomplete/AutocompleteMenu.js +128 -333
- package/dist/Autocomplete/AutocompleteOverlay.js +49 -130
- package/dist/Banner/Banner.js +64 -238
- package/dist/Button/Button.js +11 -34
- package/dist/Button/IconButton.js +51 -140
- package/dist/Button/LinkButton.js +11 -39
- package/dist/Checkbox/Checkbox.js +55 -163
- package/dist/Dialog/Dialog.js +105 -347
- package/dist/PageLayout/PageLayout.js +622 -1560
- package/dist/UnderlineNav/UnderlineNavItem.js +56 -149
- package/dist/experimental/SelectPanel2/SelectPanel.js +209 -593
- package/dist/hooks/useScrollFlash.js +12 -25
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useContext, useRef, useEffect } from 'react';
|
|
1
|
+
import { useContext, useRef, useEffect, useCallback } from 'react';
|
|
3
2
|
import { AutocompleteContext } from './AutocompleteContext.js';
|
|
4
3
|
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
5
4
|
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
@@ -11,150 +10,70 @@ import Overlay from '../Overlay/Overlay.js';
|
|
|
11
10
|
|
|
12
11
|
// TODO: consider making 'aria-labelledby' required
|
|
13
12
|
|
|
14
|
-
function AutocompleteOverlay(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if ($[0] !== t0) {
|
|
22
|
-
({
|
|
23
|
-
menuAnchorRef,
|
|
24
|
-
overlayProps: oldOverlayProps,
|
|
25
|
-
children,
|
|
26
|
-
className,
|
|
27
|
-
...newOverlayProps
|
|
28
|
-
} = t0);
|
|
29
|
-
$[0] = t0;
|
|
30
|
-
$[1] = children;
|
|
31
|
-
$[2] = className;
|
|
32
|
-
$[3] = menuAnchorRef;
|
|
33
|
-
$[4] = newOverlayProps;
|
|
34
|
-
$[5] = oldOverlayProps;
|
|
35
|
-
} else {
|
|
36
|
-
children = $[1];
|
|
37
|
-
className = $[2];
|
|
38
|
-
menuAnchorRef = $[3];
|
|
39
|
-
newOverlayProps = $[4];
|
|
40
|
-
oldOverlayProps = $[5];
|
|
41
|
-
}
|
|
13
|
+
function AutocompleteOverlay({
|
|
14
|
+
menuAnchorRef,
|
|
15
|
+
overlayProps: oldOverlayProps,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...newOverlayProps
|
|
19
|
+
}) {
|
|
42
20
|
const autocompleteContext = useContext(AutocompleteContext);
|
|
43
21
|
if (autocompleteContext === null) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
}
|
|
46
|
-
let t1;
|
|
47
|
-
if ($[6] !== newOverlayProps || $[7] !== oldOverlayProps) {
|
|
48
|
-
t1 = {
|
|
49
|
-
...oldOverlayProps,
|
|
50
|
-
...newOverlayProps
|
|
51
|
-
};
|
|
52
|
-
$[6] = newOverlayProps;
|
|
53
|
-
$[7] = oldOverlayProps;
|
|
54
|
-
$[8] = t1;
|
|
55
|
-
} else {
|
|
56
|
-
t1 = $[8];
|
|
22
|
+
throw new Error('AutocompleteContext returned null values');
|
|
57
23
|
}
|
|
58
|
-
const overlayProps =
|
|
24
|
+
const overlayProps = {
|
|
25
|
+
...oldOverlayProps,
|
|
26
|
+
...newOverlayProps
|
|
27
|
+
};
|
|
59
28
|
const {
|
|
60
29
|
inputRef,
|
|
61
30
|
scrollContainerRef,
|
|
62
31
|
selectedItemLength,
|
|
63
32
|
setShowMenu,
|
|
64
|
-
showMenu
|
|
33
|
+
showMenu = false
|
|
65
34
|
} = autocompleteContext;
|
|
66
|
-
const showMenu = t2 === undefined ? false : t2;
|
|
67
35
|
const computedAnchorRef = useRef(null);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const tokensRoot = (_tokensContainer$pare = tokensContainer === null || tokensContainer === void 0 ? void 0 : tokensContainer.parentElement) !== null && _tokensContainer$pare !== void 0 ? _tokensContainer$pare : null;
|
|
76
|
-
computedAnchorRef.current = (_ref = explicit !== null && explicit !== void 0 ? explicit : tokensRoot) !== null && _ref !== void 0 ? _ref : inputRef.current;
|
|
77
|
-
};
|
|
78
|
-
t4 = [menuAnchorRef, inputRef];
|
|
79
|
-
$[9] = inputRef;
|
|
80
|
-
$[10] = menuAnchorRef;
|
|
81
|
-
$[11] = t3;
|
|
82
|
-
$[12] = t4;
|
|
83
|
-
} else {
|
|
84
|
-
t3 = $[11];
|
|
85
|
-
t4 = $[12];
|
|
86
|
-
}
|
|
87
|
-
useEffect(t3, t4);
|
|
88
|
-
let t5;
|
|
89
|
-
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
90
|
-
t5 = {
|
|
91
|
-
side: "outside-bottom",
|
|
92
|
-
align: "start",
|
|
93
|
-
anchorElementRef: computedAnchorRef
|
|
94
|
-
};
|
|
95
|
-
$[13] = t5;
|
|
96
|
-
} else {
|
|
97
|
-
t5 = $[13];
|
|
98
|
-
}
|
|
99
|
-
let t6;
|
|
100
|
-
if ($[14] !== selectedItemLength || $[15] !== showMenu) {
|
|
101
|
-
t6 = [showMenu, selectedItemLength];
|
|
102
|
-
$[14] = selectedItemLength;
|
|
103
|
-
$[15] = showMenu;
|
|
104
|
-
$[16] = t6;
|
|
105
|
-
} else {
|
|
106
|
-
t6 = $[16];
|
|
107
|
-
}
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
var _menuAnchorRef$curren, _tokensContainer$pare, _ref;
|
|
38
|
+
const explicit = (_menuAnchorRef$curren = menuAnchorRef === null || menuAnchorRef === void 0 ? void 0 : menuAnchorRef.current) !== null && _menuAnchorRef$curren !== void 0 ? _menuAnchorRef$curren : null;
|
|
39
|
+
const tokensContainer = inputRef.current ? inputRef.current.closest('[data-prevent-token-wrapping]') : null;
|
|
40
|
+
const tokensRoot = (_tokensContainer$pare = tokensContainer === null || tokensContainer === void 0 ? void 0 : tokensContainer.parentElement) !== null && _tokensContainer$pare !== void 0 ? _tokensContainer$pare : null;
|
|
41
|
+
computedAnchorRef.current = (_ref = explicit !== null && explicit !== void 0 ? explicit : tokensRoot) !== null && _ref !== void 0 ? _ref : inputRef.current;
|
|
42
|
+
}, [menuAnchorRef, inputRef]);
|
|
108
43
|
const {
|
|
109
44
|
floatingElementRef,
|
|
110
45
|
position
|
|
111
|
-
} = useAnchoredPosition(
|
|
46
|
+
} = useAnchoredPosition({
|
|
47
|
+
side: 'outside-bottom',
|
|
48
|
+
align: 'start',
|
|
49
|
+
anchorElementRef: computedAnchorRef
|
|
50
|
+
}, [showMenu, selectedItemLength]);
|
|
112
51
|
useRefObjectAsForwardedRef(scrollContainerRef, floatingElementRef);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
$[17] = setShowMenu;
|
|
119
|
-
$[18] = t7;
|
|
120
|
-
} else {
|
|
121
|
-
t7 = $[18];
|
|
122
|
-
}
|
|
123
|
-
const closeOptionList = t7;
|
|
124
|
-
if (typeof window === "undefined") {
|
|
52
|
+
const closeOptionList = useCallback(() => {
|
|
53
|
+
setShowMenu(false);
|
|
54
|
+
}, [setShowMenu]);
|
|
55
|
+
if (typeof window === 'undefined') {
|
|
125
56
|
return null;
|
|
126
57
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
$[21] = closeOptionList;
|
|
147
|
-
$[22] = floatingElementRef;
|
|
148
|
-
$[23] = inputRef;
|
|
149
|
-
$[24] = overlayProps;
|
|
150
|
-
$[25] = position === null || position === void 0 ? void 0 : position.left;
|
|
151
|
-
$[26] = position === null || position === void 0 ? void 0 : position.top;
|
|
152
|
-
$[27] = showMenu;
|
|
153
|
-
$[28] = t8;
|
|
154
|
-
} else {
|
|
155
|
-
t8 = $[28];
|
|
156
|
-
}
|
|
157
|
-
return t8;
|
|
58
|
+
return showMenu ? /*#__PURE__*/jsx(Overlay, {
|
|
59
|
+
returnFocusRef: inputRef,
|
|
60
|
+
preventFocusOnOpen: true,
|
|
61
|
+
onClickOutside: closeOptionList,
|
|
62
|
+
onEscape: closeOptionList,
|
|
63
|
+
ref: floatingElementRef,
|
|
64
|
+
top: position === null || position === void 0 ? void 0 : position.top,
|
|
65
|
+
left: position === null || position === void 0 ? void 0 : position.left,
|
|
66
|
+
className: clsx(classes.Overlay, className),
|
|
67
|
+
...overlayProps,
|
|
68
|
+
children: children
|
|
69
|
+
}) :
|
|
70
|
+
/*#__PURE__*/
|
|
71
|
+
// HACK: This ensures AutocompleteMenu is still mounted when closing the menu and all of the hooks inside of it are still called.
|
|
72
|
+
// A better way to do this would be to move the hooks to AutocompleteOverlay or somewhere that won't get unmounted.
|
|
73
|
+
jsx(VisuallyHidden, {
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
children: children
|
|
76
|
+
});
|
|
158
77
|
}
|
|
159
78
|
AutocompleteOverlay.displayName = 'AutocompleteOverlay';
|
|
160
79
|
AutocompleteOverlay.__SLOT__ = Symbol('Autocomplete.Overlay');
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
1
|
import { clsx } from 'clsx';
|
|
3
2
|
import React, { useEffect, forwardRef } from 'react';
|
|
4
3
|
import { XIcon, AlertIcon, InfoIcon, CheckCircleIcon, StopIcon } from '@primer/octicons-react';
|
|
@@ -110,253 +109,80 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner({
|
|
|
110
109
|
});
|
|
111
110
|
});
|
|
112
111
|
function BannerTitle(props) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if ($[0] !== props) {
|
|
121
|
-
({
|
|
122
|
-
as: t0,
|
|
123
|
-
className,
|
|
124
|
-
children,
|
|
125
|
-
id,
|
|
126
|
-
...rest
|
|
127
|
-
} = props);
|
|
128
|
-
$[0] = props;
|
|
129
|
-
$[1] = children;
|
|
130
|
-
$[2] = className;
|
|
131
|
-
$[3] = id;
|
|
132
|
-
$[4] = rest;
|
|
133
|
-
$[5] = t0;
|
|
134
|
-
} else {
|
|
135
|
-
children = $[1];
|
|
136
|
-
className = $[2];
|
|
137
|
-
id = $[3];
|
|
138
|
-
rest = $[4];
|
|
139
|
-
t0 = $[5];
|
|
140
|
-
}
|
|
141
|
-
const Heading = t0 === undefined ? "h2" : t0;
|
|
112
|
+
const {
|
|
113
|
+
as: Heading = 'h2',
|
|
114
|
+
className,
|
|
115
|
+
children,
|
|
116
|
+
id,
|
|
117
|
+
...rest
|
|
118
|
+
} = props;
|
|
142
119
|
const context = React.useContext(BannerContext);
|
|
143
|
-
const titleId =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
let t2;
|
|
153
|
-
if ($[8] !== Heading || $[9] !== children || $[10] !== rest || $[11] !== t1 || $[12] !== titleId) {
|
|
154
|
-
t2 = /*#__PURE__*/jsx(Heading, {
|
|
155
|
-
...rest,
|
|
156
|
-
id: titleId,
|
|
157
|
-
className: t1,
|
|
158
|
-
"data-banner-title": "",
|
|
159
|
-
children: children
|
|
160
|
-
});
|
|
161
|
-
$[8] = Heading;
|
|
162
|
-
$[9] = children;
|
|
163
|
-
$[10] = rest;
|
|
164
|
-
$[11] = t1;
|
|
165
|
-
$[12] = titleId;
|
|
166
|
-
$[13] = t2;
|
|
167
|
-
} else {
|
|
168
|
-
t2 = $[13];
|
|
169
|
-
}
|
|
170
|
-
return t2;
|
|
120
|
+
const titleId = id !== null && id !== void 0 ? id : context === null || context === void 0 ? void 0 : context.titleId;
|
|
121
|
+
return /*#__PURE__*/jsx(Heading, {
|
|
122
|
+
...rest,
|
|
123
|
+
id: titleId,
|
|
124
|
+
className: clsx(className, classes.BannerTitle),
|
|
125
|
+
"data-banner-title": "",
|
|
126
|
+
children: children
|
|
127
|
+
});
|
|
171
128
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
$[0] = t0;
|
|
184
|
-
$[1] = children;
|
|
185
|
-
$[2] = className;
|
|
186
|
-
$[3] = rest;
|
|
187
|
-
} else {
|
|
188
|
-
children = $[1];
|
|
189
|
-
className = $[2];
|
|
190
|
-
rest = $[3];
|
|
191
|
-
}
|
|
192
|
-
let t1;
|
|
193
|
-
if ($[4] !== className) {
|
|
194
|
-
t1 = clsx("BannerDescription", className);
|
|
195
|
-
$[4] = className;
|
|
196
|
-
$[5] = t1;
|
|
197
|
-
} else {
|
|
198
|
-
t1 = $[5];
|
|
199
|
-
}
|
|
200
|
-
let t2;
|
|
201
|
-
if ($[6] !== children || $[7] !== rest || $[8] !== t1) {
|
|
202
|
-
t2 = /*#__PURE__*/jsx("div", {
|
|
203
|
-
...rest,
|
|
204
|
-
className: t1,
|
|
205
|
-
children: children
|
|
206
|
-
});
|
|
207
|
-
$[6] = children;
|
|
208
|
-
$[7] = rest;
|
|
209
|
-
$[8] = t1;
|
|
210
|
-
$[9] = t2;
|
|
211
|
-
} else {
|
|
212
|
-
t2 = $[9];
|
|
213
|
-
}
|
|
214
|
-
return t2;
|
|
129
|
+
BannerTitle.displayName = "BannerTitle";
|
|
130
|
+
function BannerDescription({
|
|
131
|
+
children,
|
|
132
|
+
className,
|
|
133
|
+
...rest
|
|
134
|
+
}) {
|
|
135
|
+
return /*#__PURE__*/jsx("div", {
|
|
136
|
+
...rest,
|
|
137
|
+
className: clsx('BannerDescription', className),
|
|
138
|
+
children: children
|
|
139
|
+
});
|
|
215
140
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
let t3;
|
|
225
|
-
if ($[0] !== t1 || $[1] !== t2) {
|
|
226
|
-
t3 = /*#__PURE__*/jsxs("div", {
|
|
141
|
+
BannerDescription.displayName = "BannerDescription";
|
|
142
|
+
function BannerActions({
|
|
143
|
+
primaryAction,
|
|
144
|
+
secondaryAction
|
|
145
|
+
}) {
|
|
146
|
+
return /*#__PURE__*/jsxs("div", {
|
|
147
|
+
className: classes.BannerActions,
|
|
148
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
227
149
|
className: classes.BannerActionsContainer,
|
|
228
150
|
"data-primary-action": "trailing",
|
|
229
|
-
children: [
|
|
230
|
-
})
|
|
231
|
-
$[0] = t1;
|
|
232
|
-
$[1] = t2;
|
|
233
|
-
$[2] = t3;
|
|
234
|
-
} else {
|
|
235
|
-
t3 = $[2];
|
|
236
|
-
}
|
|
237
|
-
const t4 = primaryAction !== null && primaryAction !== void 0 ? primaryAction : null;
|
|
238
|
-
const t5 = secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null;
|
|
239
|
-
let t6;
|
|
240
|
-
if ($[3] !== t4 || $[4] !== t5) {
|
|
241
|
-
t6 = /*#__PURE__*/jsxs("div", {
|
|
151
|
+
children: [secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null, primaryAction !== null && primaryAction !== void 0 ? primaryAction : null]
|
|
152
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
242
153
|
className: classes.BannerActionsContainer,
|
|
243
154
|
"data-primary-action": "leading",
|
|
244
|
-
children: [
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
$[4] = t5;
|
|
248
|
-
$[5] = t6;
|
|
249
|
-
} else {
|
|
250
|
-
t6 = $[5];
|
|
251
|
-
}
|
|
252
|
-
let t7;
|
|
253
|
-
if ($[6] !== t3 || $[7] !== t6) {
|
|
254
|
-
t7 = /*#__PURE__*/jsxs("div", {
|
|
255
|
-
className: classes.BannerActions,
|
|
256
|
-
children: [t3, t6]
|
|
257
|
-
});
|
|
258
|
-
$[6] = t3;
|
|
259
|
-
$[7] = t6;
|
|
260
|
-
$[8] = t7;
|
|
261
|
-
} else {
|
|
262
|
-
t7 = $[8];
|
|
263
|
-
}
|
|
264
|
-
return t7;
|
|
155
|
+
children: [primaryAction !== null && primaryAction !== void 0 ? primaryAction : null, secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null]
|
|
156
|
+
})]
|
|
157
|
+
});
|
|
265
158
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
$[2] = className;
|
|
280
|
-
$[3] = rest;
|
|
281
|
-
} else {
|
|
282
|
-
children = $[1];
|
|
283
|
-
className = $[2];
|
|
284
|
-
rest = $[3];
|
|
285
|
-
}
|
|
286
|
-
let t1;
|
|
287
|
-
if ($[4] !== className) {
|
|
288
|
-
t1 = clsx("BannerPrimaryAction", className);
|
|
289
|
-
$[4] = className;
|
|
290
|
-
$[5] = t1;
|
|
291
|
-
} else {
|
|
292
|
-
t1 = $[5];
|
|
293
|
-
}
|
|
294
|
-
let t2;
|
|
295
|
-
if ($[6] !== children || $[7] !== forwardedRef || $[8] !== rest || $[9] !== t1) {
|
|
296
|
-
t2 = /*#__PURE__*/jsx(ButtonComponent, {
|
|
297
|
-
ref: forwardedRef,
|
|
298
|
-
className: t1,
|
|
299
|
-
variant: "default",
|
|
300
|
-
...rest,
|
|
301
|
-
children: children
|
|
302
|
-
});
|
|
303
|
-
$[6] = children;
|
|
304
|
-
$[7] = forwardedRef;
|
|
305
|
-
$[8] = rest;
|
|
306
|
-
$[9] = t1;
|
|
307
|
-
$[10] = t2;
|
|
308
|
-
} else {
|
|
309
|
-
t2 = $[10];
|
|
310
|
-
}
|
|
311
|
-
return t2;
|
|
159
|
+
BannerActions.displayName = "BannerActions";
|
|
160
|
+
const BannerPrimaryAction = /*#__PURE__*/forwardRef(({
|
|
161
|
+
children,
|
|
162
|
+
className,
|
|
163
|
+
...rest
|
|
164
|
+
}, forwardedRef) => {
|
|
165
|
+
return /*#__PURE__*/jsx(ButtonComponent, {
|
|
166
|
+
ref: forwardedRef,
|
|
167
|
+
className: clsx('BannerPrimaryAction', className),
|
|
168
|
+
variant: "default",
|
|
169
|
+
...rest,
|
|
170
|
+
children: children
|
|
171
|
+
});
|
|
312
172
|
});
|
|
313
173
|
BannerPrimaryAction.displayName = 'BannerPrimaryAction';
|
|
314
|
-
const BannerSecondaryAction = /*#__PURE__*/forwardRef((
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
$[1] = children;
|
|
327
|
-
$[2] = className;
|
|
328
|
-
$[3] = rest;
|
|
329
|
-
} else {
|
|
330
|
-
children = $[1];
|
|
331
|
-
className = $[2];
|
|
332
|
-
rest = $[3];
|
|
333
|
-
}
|
|
334
|
-
let t1;
|
|
335
|
-
if ($[4] !== className) {
|
|
336
|
-
t1 = clsx("BannerPrimaryAction", className);
|
|
337
|
-
$[4] = className;
|
|
338
|
-
$[5] = t1;
|
|
339
|
-
} else {
|
|
340
|
-
t1 = $[5];
|
|
341
|
-
}
|
|
342
|
-
let t2;
|
|
343
|
-
if ($[6] !== children || $[7] !== forwardedRef || $[8] !== rest || $[9] !== t1) {
|
|
344
|
-
t2 = /*#__PURE__*/jsx(ButtonComponent, {
|
|
345
|
-
ref: forwardedRef,
|
|
346
|
-
className: t1,
|
|
347
|
-
variant: "invisible",
|
|
348
|
-
...rest,
|
|
349
|
-
children: children
|
|
350
|
-
});
|
|
351
|
-
$[6] = children;
|
|
352
|
-
$[7] = forwardedRef;
|
|
353
|
-
$[8] = rest;
|
|
354
|
-
$[9] = t1;
|
|
355
|
-
$[10] = t2;
|
|
356
|
-
} else {
|
|
357
|
-
t2 = $[10];
|
|
358
|
-
}
|
|
359
|
-
return t2;
|
|
174
|
+
const BannerSecondaryAction = /*#__PURE__*/forwardRef(({
|
|
175
|
+
children,
|
|
176
|
+
className,
|
|
177
|
+
...rest
|
|
178
|
+
}, forwardedRef) => {
|
|
179
|
+
return /*#__PURE__*/jsx(ButtonComponent, {
|
|
180
|
+
ref: forwardedRef,
|
|
181
|
+
className: clsx('BannerPrimaryAction', className),
|
|
182
|
+
variant: "invisible",
|
|
183
|
+
...rest,
|
|
184
|
+
children: children
|
|
185
|
+
});
|
|
360
186
|
});
|
|
361
187
|
BannerSecondaryAction.displayName = 'BannerSecondaryAction';
|
|
362
188
|
|
package/dist/Button/Button.js
CHANGED
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
1
|
import { forwardRef } from 'react';
|
|
3
2
|
import { ButtonBase } from './ButtonBase.js';
|
|
4
3
|
import { jsx } from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
|
-
const ButtonComponent = /*#__PURE__*/forwardRef((
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$[2] = props;
|
|
18
|
-
} else {
|
|
19
|
-
children = $[1];
|
|
20
|
-
props = $[2];
|
|
21
|
-
}
|
|
22
|
-
let t1;
|
|
23
|
-
if ($[3] !== children || $[4] !== forwardedRef || $[5] !== props) {
|
|
24
|
-
t1 = /*#__PURE__*/jsx(ButtonBase, {
|
|
25
|
-
ref: forwardedRef,
|
|
26
|
-
as: "button",
|
|
27
|
-
type: "button",
|
|
28
|
-
...props,
|
|
29
|
-
children: children
|
|
30
|
-
});
|
|
31
|
-
$[3] = children;
|
|
32
|
-
$[4] = forwardedRef;
|
|
33
|
-
$[5] = props;
|
|
34
|
-
$[6] = t1;
|
|
35
|
-
} else {
|
|
36
|
-
t1 = $[6];
|
|
37
|
-
}
|
|
38
|
-
return t1;
|
|
5
|
+
const ButtonComponent = /*#__PURE__*/forwardRef(({
|
|
6
|
+
children,
|
|
7
|
+
...props
|
|
8
|
+
}, forwardedRef) => {
|
|
9
|
+
return /*#__PURE__*/jsx(ButtonBase, {
|
|
10
|
+
ref: forwardedRef,
|
|
11
|
+
as: "button",
|
|
12
|
+
type: "button",
|
|
13
|
+
...props,
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
39
16
|
});
|
|
40
17
|
ButtonComponent.displayName = 'Button';
|
|
41
18
|
ButtonComponent.__SLOT__ = Symbol('Button');
|