@primer/react 0.0.0-20260220145113 → 0.0.0-20260220145222
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 -9
- package/dist/Autocomplete/Autocomplete.js +159 -76
- package/dist/Autocomplete/AutocompleteMenu.js +333 -128
- package/dist/Autocomplete/AutocompleteOverlay.js +130 -49
- package/dist/Banner/Banner.js +238 -64
- package/dist/Button/Button.js +34 -11
- package/dist/Button/IconButton.js +140 -51
- package/dist/Button/LinkButton.js +39 -11
- package/dist/Checkbox/Checkbox.js +163 -55
- package/dist/Dialog/Dialog.js +347 -105
- package/dist/PageLayout/PageLayout.js +1560 -622
- package/dist/Text/Text.d.ts +1 -1
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +13 -10
- package/dist/UnderlineNav/UnderlineNavItem.js +149 -56
- package/dist/experimental/SelectPanel2/SelectPanel.js +593 -209
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +2 -10
- package/dist/hooks/useScrollFlash.d.ts.map +1 -1
- package/dist/hooks/useScrollFlash.js +22 -14
- package/dist/hooks/useSlots.d.ts +6 -50
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +36 -114
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useContext, useRef, useEffect } from 'react';
|
|
2
3
|
import { AutocompleteContext } from './AutocompleteContext.js';
|
|
3
4
|
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
4
5
|
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
@@ -10,70 +11,150 @@ import Overlay from '../Overlay/Overlay.js';
|
|
|
10
11
|
|
|
11
12
|
// TODO: consider making 'aria-labelledby' required
|
|
12
13
|
|
|
13
|
-
function AutocompleteOverlay({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
function AutocompleteOverlay(t0) {
|
|
15
|
+
const $ = c(29);
|
|
16
|
+
let children;
|
|
17
|
+
let className;
|
|
18
|
+
let menuAnchorRef;
|
|
19
|
+
let newOverlayProps;
|
|
20
|
+
let oldOverlayProps;
|
|
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
|
+
}
|
|
20
42
|
const autocompleteContext = useContext(AutocompleteContext);
|
|
21
43
|
if (autocompleteContext === null) {
|
|
22
|
-
throw new Error(
|
|
44
|
+
throw new Error("AutocompleteContext returned null values");
|
|
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];
|
|
23
57
|
}
|
|
24
|
-
const overlayProps =
|
|
25
|
-
...oldOverlayProps,
|
|
26
|
-
...newOverlayProps
|
|
27
|
-
};
|
|
58
|
+
const overlayProps = t1;
|
|
28
59
|
const {
|
|
29
60
|
inputRef,
|
|
30
61
|
scrollContainerRef,
|
|
31
62
|
selectedItemLength,
|
|
32
63
|
setShowMenu,
|
|
33
|
-
showMenu
|
|
64
|
+
showMenu: t2
|
|
34
65
|
} = autocompleteContext;
|
|
66
|
+
const showMenu = t2 === undefined ? false : t2;
|
|
35
67
|
const computedAnchorRef = useRef(null);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
let t3;
|
|
69
|
+
let t4;
|
|
70
|
+
if ($[9] !== inputRef || $[10] !== menuAnchorRef) {
|
|
71
|
+
t3 = () => {
|
|
72
|
+
var _menuAnchorRef$curren, _menuAnchorRef, _tokensContainer$pare, _ref;
|
|
73
|
+
const explicit = (_menuAnchorRef$curren = (_menuAnchorRef = menuAnchorRef) === null || _menuAnchorRef === void 0 ? void 0 : _menuAnchorRef.current) !== null && _menuAnchorRef$curren !== void 0 ? _menuAnchorRef$curren : null;
|
|
74
|
+
const tokensContainer = inputRef.current ? inputRef.current.closest("[data-prevent-token-wrapping]") : null;
|
|
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
|
+
}
|
|
43
108
|
const {
|
|
44
109
|
floatingElementRef,
|
|
45
110
|
position
|
|
46
|
-
} = useAnchoredPosition(
|
|
47
|
-
side: 'outside-bottom',
|
|
48
|
-
align: 'start',
|
|
49
|
-
anchorElementRef: computedAnchorRef
|
|
50
|
-
}, [showMenu, selectedItemLength]);
|
|
111
|
+
} = useAnchoredPosition(t5, t6);
|
|
51
112
|
useRefObjectAsForwardedRef(scrollContainerRef, floatingElementRef);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
113
|
+
let t7;
|
|
114
|
+
if ($[17] !== setShowMenu) {
|
|
115
|
+
t7 = () => {
|
|
116
|
+
setShowMenu(false);
|
|
117
|
+
};
|
|
118
|
+
$[17] = setShowMenu;
|
|
119
|
+
$[18] = t7;
|
|
120
|
+
} else {
|
|
121
|
+
t7 = $[18];
|
|
122
|
+
}
|
|
123
|
+
const closeOptionList = t7;
|
|
124
|
+
if (typeof window === "undefined") {
|
|
56
125
|
return null;
|
|
57
126
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
127
|
+
let t8;
|
|
128
|
+
if ($[19] !== children || $[20] !== className || $[21] !== closeOptionList || $[22] !== floatingElementRef || $[23] !== inputRef || $[24] !== overlayProps || $[25] !== (position === null || position === void 0 ? void 0 : position.left) || $[26] !== (position === null || position === void 0 ? void 0 : position.top) || $[27] !== showMenu) {
|
|
129
|
+
t8 = showMenu ? /*#__PURE__*/jsx(Overlay, {
|
|
130
|
+
returnFocusRef: inputRef,
|
|
131
|
+
preventFocusOnOpen: true,
|
|
132
|
+
onClickOutside: closeOptionList,
|
|
133
|
+
onEscape: closeOptionList,
|
|
134
|
+
ref: floatingElementRef,
|
|
135
|
+
top: position === null || position === void 0 ? void 0 : position.top,
|
|
136
|
+
left: position === null || position === void 0 ? void 0 : position.left,
|
|
137
|
+
className: clsx(classes.Overlay, className),
|
|
138
|
+
...overlayProps,
|
|
139
|
+
children: children
|
|
140
|
+
}) : /*#__PURE__*/jsx(VisuallyHidden, {
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
children: children
|
|
143
|
+
});
|
|
144
|
+
$[19] = children;
|
|
145
|
+
$[20] = className;
|
|
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;
|
|
77
158
|
}
|
|
78
159
|
AutocompleteOverlay.displayName = 'AutocompleteOverlay';
|
|
79
160
|
AutocompleteOverlay.__SLOT__ = Symbol('Autocomplete.Overlay');
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import React, { useEffect, forwardRef } from 'react';
|
|
3
4
|
import { XIcon, AlertIcon, InfoIcon, CheckCircleIcon, StopIcon } from '@primer/octicons-react';
|
|
@@ -109,80 +110,253 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner({
|
|
|
109
110
|
});
|
|
110
111
|
});
|
|
111
112
|
function BannerTitle(props) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
var _id;
|
|
114
|
+
const $ = c(14);
|
|
115
|
+
let children;
|
|
116
|
+
let className;
|
|
117
|
+
let id;
|
|
118
|
+
let rest;
|
|
119
|
+
let t0;
|
|
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;
|
|
119
142
|
const context = React.useContext(BannerContext);
|
|
120
|
-
const titleId = id !== null &&
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
143
|
+
const titleId = (_id = id) !== null && _id !== void 0 ? _id : context === null || context === void 0 ? void 0 : context.titleId;
|
|
144
|
+
let t1;
|
|
145
|
+
if ($[6] !== className) {
|
|
146
|
+
t1 = clsx(className, classes.BannerTitle);
|
|
147
|
+
$[6] = className;
|
|
148
|
+
$[7] = t1;
|
|
149
|
+
} else {
|
|
150
|
+
t1 = $[7];
|
|
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;
|
|
128
171
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
children
|
|
132
|
-
className
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
172
|
+
function BannerDescription(t0) {
|
|
173
|
+
const $ = c(10);
|
|
174
|
+
let children;
|
|
175
|
+
let className;
|
|
176
|
+
let rest;
|
|
177
|
+
if ($[0] !== t0) {
|
|
178
|
+
({
|
|
179
|
+
children,
|
|
180
|
+
className,
|
|
181
|
+
...rest
|
|
182
|
+
} = t0);
|
|
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;
|
|
140
215
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
216
|
+
function BannerActions(t0) {
|
|
217
|
+
const $ = c(9);
|
|
218
|
+
const {
|
|
219
|
+
primaryAction,
|
|
220
|
+
secondaryAction
|
|
221
|
+
} = t0;
|
|
222
|
+
const t1 = secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null;
|
|
223
|
+
const t2 = primaryAction !== null && primaryAction !== void 0 ? primaryAction : null;
|
|
224
|
+
let t3;
|
|
225
|
+
if ($[0] !== t1 || $[1] !== t2) {
|
|
226
|
+
t3 = /*#__PURE__*/jsxs("div", {
|
|
149
227
|
className: classes.BannerActionsContainer,
|
|
150
228
|
"data-primary-action": "trailing",
|
|
151
|
-
children: [
|
|
152
|
-
})
|
|
229
|
+
children: [t1, t2]
|
|
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", {
|
|
153
242
|
className: classes.BannerActionsContainer,
|
|
154
243
|
"data-primary-action": "leading",
|
|
155
|
-
children: [
|
|
156
|
-
})
|
|
157
|
-
|
|
244
|
+
children: [t4, t5]
|
|
245
|
+
});
|
|
246
|
+
$[3] = t4;
|
|
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;
|
|
158
265
|
}
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
children
|
|
162
|
-
className
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
266
|
+
const BannerPrimaryAction = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
267
|
+
const $ = c(11);
|
|
268
|
+
let children;
|
|
269
|
+
let className;
|
|
270
|
+
let rest;
|
|
271
|
+
if ($[0] !== t0) {
|
|
272
|
+
({
|
|
273
|
+
children,
|
|
274
|
+
className,
|
|
275
|
+
...rest
|
|
276
|
+
} = t0);
|
|
277
|
+
$[0] = t0;
|
|
278
|
+
$[1] = children;
|
|
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;
|
|
172
312
|
});
|
|
173
313
|
BannerPrimaryAction.displayName = 'BannerPrimaryAction';
|
|
174
|
-
const BannerSecondaryAction = /*#__PURE__*/forwardRef(({
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
314
|
+
const BannerSecondaryAction = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
315
|
+
const $ = c(11);
|
|
316
|
+
let children;
|
|
317
|
+
let className;
|
|
318
|
+
let rest;
|
|
319
|
+
if ($[0] !== t0) {
|
|
320
|
+
({
|
|
321
|
+
children,
|
|
322
|
+
className,
|
|
323
|
+
...rest
|
|
324
|
+
} = t0);
|
|
325
|
+
$[0] = t0;
|
|
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;
|
|
186
360
|
});
|
|
187
361
|
BannerSecondaryAction.displayName = 'BannerSecondaryAction';
|
|
188
362
|
|
package/dist/Button/Button.js
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
3
|
import { ButtonBase } from './ButtonBase.js';
|
|
3
4
|
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
const ButtonComponent = /*#__PURE__*/forwardRef(({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
const ButtonComponent = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
7
|
+
const $ = c(7);
|
|
8
|
+
let children;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = children;
|
|
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;
|
|
16
39
|
});
|
|
17
40
|
ButtonComponent.displayName = 'Button';
|
|
18
41
|
ButtonComponent.__SLOT__ = Symbol('Button');
|