@primer/react 38.31.0-rc.f96563b64 → 38.31.1-rc.43134a516
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 +8 -0
- package/dist/ActionBar/ActionBar.js +93 -98
- package/dist/Autocomplete/Autocomplete.js +131 -74
- package/dist/Autocomplete/AutocompleteMenu.js +277 -119
- package/dist/Autocomplete/AutocompleteOverlay.js +113 -38
- package/dist/Banner/Banner.js +414 -96
- package/dist/Button/Button.js +29 -8
- package/dist/Button/IconButton.js +120 -28
- package/dist/Button/LinkButton.js +34 -8
- package/dist/ConfirmationDialog/ConfirmationDialog.js +86 -24
- package/dist/PageLayout/PageLayout.js +1274 -478
- package/dist/Pagination/Pagination.js +196 -70
- package/dist/SelectPanel/SelectPanelMessage.js +72 -29
- package/dist/UnderlineNav/UnderlineNav.js +214 -63
- package/dist/UnderlineNav/UnderlineNavItem.js +94 -22
- package/dist/hooks/useMergedRefs.js +20 -11
- package/dist/hooks/useScrollFlash.js +24 -10
- package/dist/internal/components/OverflowObserverProvider.js +157 -0
- package/dist/internal/hooks/useOverflowObserver.js +57 -0
- package/dist/utils/descendant-registry.js +79 -42
- package/package.json +1 -1
package/dist/Banner/Banner.js
CHANGED
|
@@ -5,6 +5,7 @@ import { IconButton } from "../Button/IconButton.js";
|
|
|
5
5
|
import { ButtonComponent } from "../Button/Button.js";
|
|
6
6
|
import { useDevOnlyEffect } from "../internal/hooks/useDevOnlyEffect.js";
|
|
7
7
|
import Banner_module_css_default from "./Banner.module.css.js";
|
|
8
|
+
import { c } from "react-compiler-runtime";
|
|
8
9
|
import { clsx } from "clsx";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import React, { forwardRef } from "react";
|
|
@@ -18,128 +19,445 @@ const iconForVariant = {
|
|
|
18
19
|
upsell: /*#__PURE__*/ jsx(InfoIcon, {}),
|
|
19
20
|
warning: /*#__PURE__*/ jsx(AlertIcon, {})
|
|
20
21
|
};
|
|
21
|
-
const Banner = /*#__PURE__*/ React.forwardRef(function Banner(
|
|
22
|
+
const Banner = /*#__PURE__*/ React.forwardRef(function Banner(t0, forwardRef) {
|
|
23
|
+
var _leadingVisual, _labelledBy;
|
|
24
|
+
const $ = c(64);
|
|
25
|
+
let children;
|
|
26
|
+
let className;
|
|
27
|
+
let description;
|
|
28
|
+
let hideTitle;
|
|
29
|
+
let icon;
|
|
30
|
+
let label;
|
|
31
|
+
let labelledBy;
|
|
32
|
+
let leadingVisual;
|
|
33
|
+
let onDismiss;
|
|
34
|
+
let primaryAction;
|
|
35
|
+
let rest;
|
|
36
|
+
let secondaryAction;
|
|
37
|
+
let t1;
|
|
38
|
+
let t2;
|
|
39
|
+
let t3;
|
|
40
|
+
let title;
|
|
41
|
+
if ($[0] !== t0) {
|
|
42
|
+
({"aria-label": label, "aria-labelledby": labelledBy, children, className, description, hideTitle, icon, leadingVisual, onDismiss, primaryAction, secondaryAction, title, variant: t1, actionsLayout: t2, flush: t3, ...rest} = t0);
|
|
43
|
+
$[0] = t0;
|
|
44
|
+
$[1] = children;
|
|
45
|
+
$[2] = className;
|
|
46
|
+
$[3] = description;
|
|
47
|
+
$[4] = hideTitle;
|
|
48
|
+
$[5] = icon;
|
|
49
|
+
$[6] = label;
|
|
50
|
+
$[7] = labelledBy;
|
|
51
|
+
$[8] = leadingVisual;
|
|
52
|
+
$[9] = onDismiss;
|
|
53
|
+
$[10] = primaryAction;
|
|
54
|
+
$[11] = rest;
|
|
55
|
+
$[12] = secondaryAction;
|
|
56
|
+
$[13] = t1;
|
|
57
|
+
$[14] = t2;
|
|
58
|
+
$[15] = t3;
|
|
59
|
+
$[16] = title;
|
|
60
|
+
} else {
|
|
61
|
+
children = $[1];
|
|
62
|
+
className = $[2];
|
|
63
|
+
description = $[3];
|
|
64
|
+
hideTitle = $[4];
|
|
65
|
+
icon = $[5];
|
|
66
|
+
label = $[6];
|
|
67
|
+
labelledBy = $[7];
|
|
68
|
+
leadingVisual = $[8];
|
|
69
|
+
onDismiss = $[9];
|
|
70
|
+
primaryAction = $[10];
|
|
71
|
+
rest = $[11];
|
|
72
|
+
secondaryAction = $[12];
|
|
73
|
+
t1 = $[13];
|
|
74
|
+
t2 = $[14];
|
|
75
|
+
t3 = $[15];
|
|
76
|
+
title = $[16];
|
|
77
|
+
}
|
|
78
|
+
const variant = t1 === void 0 ? "info" : t1;
|
|
79
|
+
const actionsLayout = t2 === void 0 ? "default" : t2;
|
|
80
|
+
const flush = t3 === void 0 ? false : t3;
|
|
22
81
|
const dismissible = !!onDismiss;
|
|
23
82
|
const hasActions = primaryAction || secondaryAction;
|
|
24
83
|
const bannerRef = React.useRef(null);
|
|
25
84
|
const ref = useMergedRefs(forwardRef, bannerRef);
|
|
26
85
|
const supportsCustomIcon = variant === "info" || variant === "upsell";
|
|
27
86
|
const titleId = useId$1();
|
|
28
|
-
const visual = leadingVisual !== null &&
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
87
|
+
const visual = (_leadingVisual = leadingVisual) !== null && _leadingVisual !== void 0 ? _leadingVisual : icon;
|
|
88
|
+
let t4;
|
|
89
|
+
let t5;
|
|
90
|
+
if ($[17] !== title) {
|
|
91
|
+
t4 = () => {
|
|
92
|
+
if (title) return;
|
|
93
|
+
const { current: banner } = bannerRef;
|
|
94
|
+
if (!banner) return;
|
|
95
|
+
if (!banner.querySelector("[data-banner-title]")) throw new Error("Expected a title to be provided to the <Banner> component with the `title` prop or through `<Banner.Title>` but no title was found");
|
|
96
|
+
};
|
|
97
|
+
t5 = [title];
|
|
98
|
+
$[17] = title;
|
|
99
|
+
$[18] = t4;
|
|
100
|
+
$[19] = t5;
|
|
101
|
+
} else {
|
|
102
|
+
t4 = $[18];
|
|
103
|
+
t5 = $[19];
|
|
104
|
+
}
|
|
105
|
+
useDevOnlyEffect(t4, t5);
|
|
106
|
+
let t6;
|
|
107
|
+
if ($[20] !== titleId) {
|
|
108
|
+
t6 = { titleId };
|
|
109
|
+
$[20] = titleId;
|
|
110
|
+
$[21] = t6;
|
|
111
|
+
} else t6 = $[21];
|
|
112
|
+
const t7 = (_labelledBy = labelledBy) !== null && _labelledBy !== void 0 ? _labelledBy : label ? void 0 : titleId;
|
|
113
|
+
const t8 = labelledBy ? void 0 : label;
|
|
114
|
+
let t9;
|
|
115
|
+
if ($[22] !== className) {
|
|
116
|
+
t9 = clsx(className, Banner_module_css_default.Banner);
|
|
117
|
+
$[22] = className;
|
|
118
|
+
$[23] = t9;
|
|
119
|
+
} else t9 = $[23];
|
|
120
|
+
const t10 = onDismiss ? "" : void 0;
|
|
121
|
+
const t11 = hasActions ? "" : void 0;
|
|
122
|
+
const t12 = hideTitle ? "" : void 0;
|
|
123
|
+
const t13 = rest.layout || "default";
|
|
124
|
+
const t14 = flush ? "" : void 0;
|
|
125
|
+
const t15 = visual && supportsCustomIcon ? visual : iconForVariant[variant];
|
|
126
|
+
let t16;
|
|
127
|
+
if ($[24] !== t15) {
|
|
128
|
+
t16 = /*#__PURE__*/ jsx("div", {
|
|
129
|
+
"data-component": "Banner.Icon",
|
|
130
|
+
className: Banner_module_css_default.BannerIcon,
|
|
131
|
+
children: t15
|
|
132
|
+
});
|
|
133
|
+
$[24] = t15;
|
|
134
|
+
$[25] = t16;
|
|
135
|
+
} else t16 = $[25];
|
|
136
|
+
let t17;
|
|
137
|
+
if ($[26] !== hideTitle || $[27] !== title) {
|
|
138
|
+
t17 = title ? hideTitle ? /*#__PURE__*/ jsx(VisuallyHidden, { children: /*#__PURE__*/ jsx(BannerTitle, { children: title }) }) : /*#__PURE__*/ jsx(BannerTitle, { children: title }) : null;
|
|
139
|
+
$[26] = hideTitle;
|
|
140
|
+
$[27] = title;
|
|
141
|
+
$[28] = t17;
|
|
142
|
+
} else t17 = $[28];
|
|
143
|
+
let t18;
|
|
144
|
+
if ($[29] !== description) {
|
|
145
|
+
t18 = description ? /*#__PURE__*/ jsx(BannerDescription, { children: description }) : null;
|
|
146
|
+
$[29] = description;
|
|
147
|
+
$[30] = t18;
|
|
148
|
+
} else t18 = $[30];
|
|
149
|
+
let t19;
|
|
150
|
+
if ($[31] !== children || $[32] !== t17 || $[33] !== t18) {
|
|
151
|
+
t19 = /*#__PURE__*/ jsxs("div", {
|
|
152
|
+
"data-component": "Banner.Content",
|
|
153
|
+
className: Banner_module_css_default.BannerContent,
|
|
154
|
+
children: [
|
|
155
|
+
t17,
|
|
156
|
+
t18,
|
|
157
|
+
children
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
$[31] = children;
|
|
161
|
+
$[32] = t17;
|
|
162
|
+
$[33] = t18;
|
|
163
|
+
$[34] = t19;
|
|
164
|
+
} else t19 = $[34];
|
|
165
|
+
let t20;
|
|
166
|
+
if ($[35] !== hasActions || $[36] !== primaryAction || $[37] !== secondaryAction) {
|
|
167
|
+
t20 = hasActions ? /*#__PURE__*/ jsx(BannerActions, {
|
|
168
|
+
primaryAction,
|
|
169
|
+
secondaryAction
|
|
170
|
+
}) : null;
|
|
171
|
+
$[35] = hasActions;
|
|
172
|
+
$[36] = primaryAction;
|
|
173
|
+
$[37] = secondaryAction;
|
|
174
|
+
$[38] = t20;
|
|
175
|
+
} else t20 = $[38];
|
|
176
|
+
let t21;
|
|
177
|
+
if ($[39] !== t19 || $[40] !== t20) {
|
|
178
|
+
t21 = /*#__PURE__*/ jsxs("div", {
|
|
179
|
+
className: Banner_module_css_default.BannerContainer,
|
|
180
|
+
children: [t19, t20]
|
|
181
|
+
});
|
|
182
|
+
$[39] = t19;
|
|
183
|
+
$[40] = t20;
|
|
184
|
+
$[41] = t21;
|
|
185
|
+
} else t21 = $[41];
|
|
186
|
+
let t22;
|
|
187
|
+
if ($[42] !== dismissible || $[43] !== onDismiss) {
|
|
188
|
+
t22 = dismissible ? /*#__PURE__*/ jsx(IconButton, {
|
|
189
|
+
"aria-label": "Dismiss banner",
|
|
190
|
+
onClick: onDismiss,
|
|
191
|
+
className: Banner_module_css_default.BannerDismiss,
|
|
192
|
+
icon: XIcon,
|
|
193
|
+
variant: "invisible"
|
|
194
|
+
}) : null;
|
|
195
|
+
$[42] = dismissible;
|
|
196
|
+
$[43] = onDismiss;
|
|
197
|
+
$[44] = t22;
|
|
198
|
+
} else t22 = $[44];
|
|
199
|
+
let t23;
|
|
200
|
+
if ($[45] !== actionsLayout || $[46] !== ref || $[47] !== rest || $[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t16 || $[54] !== t21 || $[55] !== t22 || $[56] !== t7 || $[57] !== t8 || $[58] !== t9 || $[59] !== variant) {
|
|
201
|
+
t23 = /*#__PURE__*/ jsxs("section", {
|
|
38
202
|
"data-component": "Banner",
|
|
39
203
|
...rest,
|
|
40
|
-
"aria-labelledby":
|
|
41
|
-
"aria-label":
|
|
42
|
-
className:
|
|
43
|
-
"data-dismissible":
|
|
44
|
-
"data-has-actions":
|
|
45
|
-
"data-title-hidden":
|
|
204
|
+
"aria-labelledby": t7,
|
|
205
|
+
"aria-label": t8,
|
|
206
|
+
className: t9,
|
|
207
|
+
"data-dismissible": t10,
|
|
208
|
+
"data-has-actions": t11,
|
|
209
|
+
"data-title-hidden": t12,
|
|
46
210
|
"data-variant": variant,
|
|
47
211
|
"data-actions-layout": actionsLayout,
|
|
48
212
|
tabIndex: -1,
|
|
49
213
|
ref,
|
|
50
|
-
"data-layout":
|
|
51
|
-
"data-flush":
|
|
214
|
+
"data-layout": t13,
|
|
215
|
+
"data-flush": t14,
|
|
52
216
|
children: [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
children: visual && supportsCustomIcon ? visual : iconForVariant[variant]
|
|
57
|
-
}),
|
|
58
|
-
/*#__PURE__*/ jsxs("div", {
|
|
59
|
-
className: Banner_module_css_default.BannerContainer,
|
|
60
|
-
children: [/*#__PURE__*/ jsxs("div", {
|
|
61
|
-
"data-component": "Banner.Content",
|
|
62
|
-
className: Banner_module_css_default.BannerContent,
|
|
63
|
-
children: [
|
|
64
|
-
title ? hideTitle ? /*#__PURE__*/ jsx(VisuallyHidden, { children: /*#__PURE__*/ jsx(BannerTitle, { children: title }) }) : /*#__PURE__*/ jsx(BannerTitle, { children: title }) : null,
|
|
65
|
-
description ? /*#__PURE__*/ jsx(BannerDescription, { children: description }) : null,
|
|
66
|
-
children
|
|
67
|
-
]
|
|
68
|
-
}), hasActions ? /*#__PURE__*/ jsx(BannerActions, {
|
|
69
|
-
primaryAction,
|
|
70
|
-
secondaryAction
|
|
71
|
-
}) : null]
|
|
72
|
-
}),
|
|
73
|
-
dismissible ? /*#__PURE__*/ jsx(IconButton, {
|
|
74
|
-
"aria-label": "Dismiss banner",
|
|
75
|
-
onClick: onDismiss,
|
|
76
|
-
className: Banner_module_css_default.BannerDismiss,
|
|
77
|
-
icon: XIcon,
|
|
78
|
-
variant: "invisible"
|
|
79
|
-
}) : null
|
|
217
|
+
t16,
|
|
218
|
+
t21,
|
|
219
|
+
t22
|
|
80
220
|
]
|
|
81
|
-
})
|
|
82
|
-
|
|
221
|
+
});
|
|
222
|
+
$[45] = actionsLayout;
|
|
223
|
+
$[46] = ref;
|
|
224
|
+
$[47] = rest;
|
|
225
|
+
$[48] = t10;
|
|
226
|
+
$[49] = t11;
|
|
227
|
+
$[50] = t12;
|
|
228
|
+
$[51] = t13;
|
|
229
|
+
$[52] = t14;
|
|
230
|
+
$[53] = t16;
|
|
231
|
+
$[54] = t21;
|
|
232
|
+
$[55] = t22;
|
|
233
|
+
$[56] = t7;
|
|
234
|
+
$[57] = t8;
|
|
235
|
+
$[58] = t9;
|
|
236
|
+
$[59] = variant;
|
|
237
|
+
$[60] = t23;
|
|
238
|
+
} else t23 = $[60];
|
|
239
|
+
let t24;
|
|
240
|
+
if ($[61] !== t23 || $[62] !== t6) {
|
|
241
|
+
t24 = /*#__PURE__*/ jsx(BannerContext.Provider, {
|
|
242
|
+
value: t6,
|
|
243
|
+
children: t23
|
|
244
|
+
});
|
|
245
|
+
$[61] = t23;
|
|
246
|
+
$[62] = t6;
|
|
247
|
+
$[63] = t24;
|
|
248
|
+
} else t24 = $[63];
|
|
249
|
+
return t24;
|
|
83
250
|
});
|
|
84
251
|
function BannerTitle(props) {
|
|
85
|
-
|
|
252
|
+
var _id;
|
|
253
|
+
const $ = c(14);
|
|
254
|
+
let children;
|
|
255
|
+
let className;
|
|
256
|
+
let id;
|
|
257
|
+
let rest;
|
|
258
|
+
let t0;
|
|
259
|
+
if ($[0] !== props) {
|
|
260
|
+
({as: t0, className, children, id, ...rest} = props);
|
|
261
|
+
$[0] = props;
|
|
262
|
+
$[1] = children;
|
|
263
|
+
$[2] = className;
|
|
264
|
+
$[3] = id;
|
|
265
|
+
$[4] = rest;
|
|
266
|
+
$[5] = t0;
|
|
267
|
+
} else {
|
|
268
|
+
children = $[1];
|
|
269
|
+
className = $[2];
|
|
270
|
+
id = $[3];
|
|
271
|
+
rest = $[4];
|
|
272
|
+
t0 = $[5];
|
|
273
|
+
}
|
|
274
|
+
const Heading = t0 === void 0 ? "h2" : t0;
|
|
86
275
|
const context = React.useContext(BannerContext);
|
|
87
|
-
const titleId = id !== null &&
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
276
|
+
const titleId = (_id = id) !== null && _id !== void 0 ? _id : context === null || context === void 0 ? void 0 : context.titleId;
|
|
277
|
+
let t1;
|
|
278
|
+
if ($[6] !== className) {
|
|
279
|
+
t1 = clsx(className, Banner_module_css_default.BannerTitle);
|
|
280
|
+
$[6] = className;
|
|
281
|
+
$[7] = t1;
|
|
282
|
+
} else t1 = $[7];
|
|
283
|
+
let t2;
|
|
284
|
+
if ($[8] !== Heading || $[9] !== children || $[10] !== rest || $[11] !== t1 || $[12] !== titleId) {
|
|
285
|
+
t2 = /*#__PURE__*/ jsx(Heading, {
|
|
286
|
+
...rest,
|
|
287
|
+
id: titleId,
|
|
288
|
+
className: t1,
|
|
289
|
+
"data-component": "Banner.Title",
|
|
290
|
+
"data-banner-title": "",
|
|
291
|
+
children
|
|
292
|
+
});
|
|
293
|
+
$[8] = Heading;
|
|
294
|
+
$[9] = children;
|
|
295
|
+
$[10] = rest;
|
|
296
|
+
$[11] = t1;
|
|
297
|
+
$[12] = titleId;
|
|
298
|
+
$[13] = t2;
|
|
299
|
+
} else t2 = $[13];
|
|
300
|
+
return t2;
|
|
96
301
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
children
|
|
104
|
-
|
|
302
|
+
function BannerDescription(t0) {
|
|
303
|
+
const $ = c(10);
|
|
304
|
+
let children;
|
|
305
|
+
let className;
|
|
306
|
+
let rest;
|
|
307
|
+
if ($[0] !== t0) {
|
|
308
|
+
({children, className, ...rest} = t0);
|
|
309
|
+
$[0] = t0;
|
|
310
|
+
$[1] = children;
|
|
311
|
+
$[2] = className;
|
|
312
|
+
$[3] = rest;
|
|
313
|
+
} else {
|
|
314
|
+
children = $[1];
|
|
315
|
+
className = $[2];
|
|
316
|
+
rest = $[3];
|
|
317
|
+
}
|
|
318
|
+
let t1;
|
|
319
|
+
if ($[4] !== className) {
|
|
320
|
+
t1 = clsx("BannerDescription", className);
|
|
321
|
+
$[4] = className;
|
|
322
|
+
$[5] = t1;
|
|
323
|
+
} else t1 = $[5];
|
|
324
|
+
let t2;
|
|
325
|
+
if ($[6] !== children || $[7] !== rest || $[8] !== t1) {
|
|
326
|
+
t2 = /*#__PURE__*/ jsx("div", {
|
|
327
|
+
...rest,
|
|
328
|
+
className: t1,
|
|
329
|
+
"data-component": "Banner.Description",
|
|
330
|
+
children
|
|
331
|
+
});
|
|
332
|
+
$[6] = children;
|
|
333
|
+
$[7] = rest;
|
|
334
|
+
$[8] = t1;
|
|
335
|
+
$[9] = t2;
|
|
336
|
+
} else t2 = $[9];
|
|
337
|
+
return t2;
|
|
105
338
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
339
|
+
function BannerActions(t0) {
|
|
340
|
+
const $ = c(9);
|
|
341
|
+
const { primaryAction, secondaryAction } = t0;
|
|
342
|
+
const t1 = secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null;
|
|
343
|
+
const t2 = primaryAction !== null && primaryAction !== void 0 ? primaryAction : null;
|
|
344
|
+
let t3;
|
|
345
|
+
if ($[0] !== t1 || $[1] !== t2) {
|
|
346
|
+
t3 = /*#__PURE__*/ jsxs("div", {
|
|
112
347
|
className: Banner_module_css_default.BannerActionsContainer,
|
|
113
348
|
"data-primary-action": "trailing",
|
|
114
|
-
children: [
|
|
115
|
-
})
|
|
349
|
+
children: [t1, t2]
|
|
350
|
+
});
|
|
351
|
+
$[0] = t1;
|
|
352
|
+
$[1] = t2;
|
|
353
|
+
$[2] = t3;
|
|
354
|
+
} else t3 = $[2];
|
|
355
|
+
const t4 = primaryAction !== null && primaryAction !== void 0 ? primaryAction : null;
|
|
356
|
+
const t5 = secondaryAction !== null && secondaryAction !== void 0 ? secondaryAction : null;
|
|
357
|
+
let t6;
|
|
358
|
+
if ($[3] !== t4 || $[4] !== t5) {
|
|
359
|
+
t6 = /*#__PURE__*/ jsxs("div", {
|
|
116
360
|
className: Banner_module_css_default.BannerActionsContainer,
|
|
117
361
|
"data-primary-action": "leading",
|
|
118
|
-
children: [
|
|
119
|
-
})
|
|
120
|
-
|
|
362
|
+
children: [t4, t5]
|
|
363
|
+
});
|
|
364
|
+
$[3] = t4;
|
|
365
|
+
$[4] = t5;
|
|
366
|
+
$[5] = t6;
|
|
367
|
+
} else t6 = $[5];
|
|
368
|
+
let t7;
|
|
369
|
+
if ($[6] !== t3 || $[7] !== t6) {
|
|
370
|
+
t7 = /*#__PURE__*/ jsxs("div", {
|
|
371
|
+
className: Banner_module_css_default.BannerActions,
|
|
372
|
+
"data-component": "Banner.Actions",
|
|
373
|
+
children: [t3, t6]
|
|
374
|
+
});
|
|
375
|
+
$[6] = t3;
|
|
376
|
+
$[7] = t6;
|
|
377
|
+
$[8] = t7;
|
|
378
|
+
} else t7 = $[8];
|
|
379
|
+
return t7;
|
|
121
380
|
}
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
children
|
|
131
|
-
|
|
381
|
+
const BannerPrimaryAction = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
382
|
+
const $ = c(11);
|
|
383
|
+
let children;
|
|
384
|
+
let className;
|
|
385
|
+
let rest;
|
|
386
|
+
if ($[0] !== t0) {
|
|
387
|
+
({children, className, ...rest} = t0);
|
|
388
|
+
$[0] = t0;
|
|
389
|
+
$[1] = children;
|
|
390
|
+
$[2] = className;
|
|
391
|
+
$[3] = rest;
|
|
392
|
+
} else {
|
|
393
|
+
children = $[1];
|
|
394
|
+
className = $[2];
|
|
395
|
+
rest = $[3];
|
|
396
|
+
}
|
|
397
|
+
let t1;
|
|
398
|
+
if ($[4] !== className) {
|
|
399
|
+
t1 = clsx("BannerPrimaryAction", className);
|
|
400
|
+
$[4] = className;
|
|
401
|
+
$[5] = t1;
|
|
402
|
+
} else t1 = $[5];
|
|
403
|
+
let t2;
|
|
404
|
+
if ($[6] !== children || $[7] !== forwardedRef || $[8] !== rest || $[9] !== t1) {
|
|
405
|
+
t2 = /*#__PURE__*/ jsx(ButtonComponent, {
|
|
406
|
+
"data-component": "Banner.PrimaryAction",
|
|
407
|
+
ref: forwardedRef,
|
|
408
|
+
className: t1,
|
|
409
|
+
variant: "default",
|
|
410
|
+
...rest,
|
|
411
|
+
children
|
|
412
|
+
});
|
|
413
|
+
$[6] = children;
|
|
414
|
+
$[7] = forwardedRef;
|
|
415
|
+
$[8] = rest;
|
|
416
|
+
$[9] = t1;
|
|
417
|
+
$[10] = t2;
|
|
418
|
+
} else t2 = $[10];
|
|
419
|
+
return t2;
|
|
132
420
|
});
|
|
133
421
|
BannerPrimaryAction.displayName = "BannerPrimaryAction";
|
|
134
|
-
const BannerSecondaryAction = /*#__PURE__*/ forwardRef((
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
...rest
|
|
141
|
-
|
|
142
|
-
|
|
422
|
+
const BannerSecondaryAction = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
423
|
+
const $ = c(11);
|
|
424
|
+
let children;
|
|
425
|
+
let className;
|
|
426
|
+
let rest;
|
|
427
|
+
if ($[0] !== t0) {
|
|
428
|
+
({children, className, ...rest} = t0);
|
|
429
|
+
$[0] = t0;
|
|
430
|
+
$[1] = children;
|
|
431
|
+
$[2] = className;
|
|
432
|
+
$[3] = rest;
|
|
433
|
+
} else {
|
|
434
|
+
children = $[1];
|
|
435
|
+
className = $[2];
|
|
436
|
+
rest = $[3];
|
|
437
|
+
}
|
|
438
|
+
let t1;
|
|
439
|
+
if ($[4] !== className) {
|
|
440
|
+
t1 = clsx("BannerPrimaryAction", className);
|
|
441
|
+
$[4] = className;
|
|
442
|
+
$[5] = t1;
|
|
443
|
+
} else t1 = $[5];
|
|
444
|
+
let t2;
|
|
445
|
+
if ($[6] !== children || $[7] !== forwardedRef || $[8] !== rest || $[9] !== t1) {
|
|
446
|
+
t2 = /*#__PURE__*/ jsx(ButtonComponent, {
|
|
447
|
+
"data-component": "Banner.SecondaryAction",
|
|
448
|
+
ref: forwardedRef,
|
|
449
|
+
className: t1,
|
|
450
|
+
variant: "invisible",
|
|
451
|
+
...rest,
|
|
452
|
+
children
|
|
453
|
+
});
|
|
454
|
+
$[6] = children;
|
|
455
|
+
$[7] = forwardedRef;
|
|
456
|
+
$[8] = rest;
|
|
457
|
+
$[9] = t1;
|
|
458
|
+
$[10] = t2;
|
|
459
|
+
} else t2 = $[10];
|
|
460
|
+
return t2;
|
|
143
461
|
});
|
|
144
462
|
BannerSecondaryAction.displayName = "BannerSecondaryAction";
|
|
145
463
|
//#endregion
|
package/dist/Button/Button.js
CHANGED
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import { ButtonBase } from "./ButtonBase.js";
|
|
2
|
+
import { c } from "react-compiler-runtime";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef } from "react";
|
|
4
5
|
//#region src/Button/Button.tsx
|
|
5
|
-
const ButtonComponent = /*#__PURE__*/ forwardRef((
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...props
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const ButtonComponent = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
7
|
+
const $ = c(7);
|
|
8
|
+
let children;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({children, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = children;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
} else {
|
|
16
|
+
children = $[1];
|
|
17
|
+
props = $[2];
|
|
18
|
+
}
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[3] !== children || $[4] !== forwardedRef || $[5] !== props) {
|
|
21
|
+
t1 = /*#__PURE__*/ jsx(ButtonBase, {
|
|
22
|
+
ref: forwardedRef,
|
|
23
|
+
as: "button",
|
|
24
|
+
type: "button",
|
|
25
|
+
...props,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
$[3] = children;
|
|
29
|
+
$[4] = forwardedRef;
|
|
30
|
+
$[5] = props;
|
|
31
|
+
$[6] = t1;
|
|
32
|
+
} else t1 = $[6];
|
|
33
|
+
return t1;
|
|
13
34
|
});
|
|
14
35
|
ButtonComponent.displayName = "Button";
|
|
15
36
|
ButtonComponent.__SLOT__ = Symbol("Button");
|