@primer/react 38.30.0 → 38.30.1-rc.0d136c1b7

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @primer/react
2
2
 
3
+ ## 38.30.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8054](https://github.com/primer/react/pull/8054) [`1775f2e`](https://github.com/primer/react/commit/1775f2e8b968d59a1189456b14cff15e527937cb) Thanks [@joshblack](https://github.com/joshblack)! - AvatarStack: Improve rendering performance with React Compiler support
8
+
9
+ - [#8053](https://github.com/primer/react/pull/8053) [`b2151ae`](https://github.com/primer/react/commit/b2151ae2d5719f09efb0b89731e52e4ca50e8bf1) Thanks [@joshblack](https://github.com/joshblack)! - Checkbox, CheckboxGroup, and RadioGroup: Improve rendering performance with React Compiler support
10
+
11
+ - [#8052](https://github.com/primer/react/pull/8052) [`a1b24cf`](https://github.com/primer/react/commit/a1b24cf3411566641aeb846e62069dc26505da6b) Thanks [@joshblack](https://github.com/joshblack)! - Heading, Link, Pagehead, Portal, and SideNav: Improve rendering performance with React Compiler support
12
+
3
13
  ## 38.30.0
4
14
 
5
15
  ### Minor Changes
@@ -1,10 +1,11 @@
1
+ import { c } from 'react-compiler-runtime';
1
2
  import { clsx } from 'clsx';
2
3
  import React, { useState, useRef, useEffect } from 'react';
3
4
  import { DEFAULT_AVATAR_SIZE } from '../Avatar/Avatar.js';
4
5
  import { isResponsiveValue } from '../hooks/useResponsiveValue.js';
5
6
  import classes from './AvatarStack.module.css.js';
6
7
  import { hasInteractiveNodes } from '../internal/utils/hasInteractiveNodes.js';
7
- import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
9
 
9
10
  const transformChildren = (children, shape) => {
10
11
  return React.Children.map(children, child => {
@@ -16,136 +17,249 @@ const transformChildren = (children, shape) => {
16
17
  });
17
18
  });
18
19
  };
19
- const AvatarStackBody = ({
20
- disableExpand,
21
- hasInteractiveChildren,
22
- stackContainer,
23
- children
24
- }) => {
25
- return /*#__PURE__*/jsx("div", {
26
- "data-component": "AvatarStack.Body",
27
- "data-disable-expand": disableExpand ? '' : undefined,
28
- className: clsx({
29
- 'pc-AvatarStack--disableExpand': disableExpand
30
- }, 'pc-AvatarStackBody', classes.AvatarStackBody),
31
- tabIndex: !hasInteractiveChildren && !disableExpand ? 0 : undefined,
32
- ref: stackContainer,
33
- children: children
34
- });
20
+ const AvatarStackBody = t0 => {
21
+ const $ = c(8);
22
+ const {
23
+ disableExpand,
24
+ hasInteractiveChildren,
25
+ stackContainer,
26
+ children
27
+ } = t0;
28
+ const t1 = disableExpand ? "" : undefined;
29
+ let t2;
30
+ if ($[0] !== disableExpand) {
31
+ t2 = clsx({
32
+ "pc-AvatarStack--disableExpand": disableExpand
33
+ }, "pc-AvatarStackBody", classes.AvatarStackBody);
34
+ $[0] = disableExpand;
35
+ $[1] = t2;
36
+ } else {
37
+ t2 = $[1];
38
+ }
39
+ const t3 = !hasInteractiveChildren && !disableExpand ? 0 : undefined;
40
+ let t4;
41
+ if ($[2] !== children || $[3] !== stackContainer || $[4] !== t1 || $[5] !== t2 || $[6] !== t3) {
42
+ t4 = /*#__PURE__*/jsx("div", {
43
+ "data-component": "AvatarStack.Body",
44
+ "data-disable-expand": t1,
45
+ className: t2,
46
+ tabIndex: t3,
47
+ ref: stackContainer,
48
+ children: children
49
+ });
50
+ $[2] = children;
51
+ $[3] = stackContainer;
52
+ $[4] = t1;
53
+ $[5] = t2;
54
+ $[6] = t3;
55
+ $[7] = t4;
56
+ } else {
57
+ t4 = $[7];
58
+ }
59
+ return t4;
35
60
  };
36
- AvatarStackBody.displayName = "AvatarStackBody";
37
- const AvatarStack = ({
38
- children,
39
- variant = 'cascade',
40
- shape = 'circle',
41
- alignRight,
42
- disableExpand,
43
- size,
44
- className,
45
- style
46
- }) => {
61
+ const AvatarStack = t0 => {
62
+ const $ = c(36);
63
+ const {
64
+ children,
65
+ variant: t1,
66
+ shape: t2,
67
+ alignRight,
68
+ disableExpand,
69
+ size,
70
+ className,
71
+ style
72
+ } = t0;
73
+ const variant = t1 === undefined ? "cascade" : t1;
74
+ const shape = t2 === undefined ? "circle" : t2;
47
75
  const [hasInteractiveChildren, setHasInteractiveChildren] = useState(false);
48
76
  const stackContainer = useRef(null);
49
77
  const count = React.Children.count(children);
50
- const getAvatarChildSizes = () => {
51
- const avatarSizeMap = {
52
- narrow: [],
53
- regular: [],
54
- wide: []
55
- };
56
- return React.Children.toArray(children).reduce((acc, child) => {
57
- // if child is not an Avatar, return the default avatar sizes from the accumulator
58
- if (! /*#__PURE__*/React.isValidElement(child)) return acc;
59
- for (const responsiveKey of Object.keys(avatarSizeMap)) {
60
- // if the child has responsive `size` prop values, push the value to the appropriate viewport property in the avatarSizeMap
61
- if (isResponsiveValue(child.props.size)) {
62
- avatarSizeMap[responsiveKey].push(child.props.size[responsiveKey] || DEFAULT_AVATAR_SIZE);
78
+ let t3;
79
+ if ($[0] !== children) {
80
+ const getAvatarChildSizes = () => {
81
+ const avatarSizeMap = {
82
+ narrow: [],
83
+ regular: [],
84
+ wide: []
85
+ };
86
+ return React.Children.toArray(children).reduce((acc, child) => {
87
+ if (! /*#__PURE__*/React.isValidElement(child)) {
88
+ return acc;
63
89
  }
64
- // otherwise, the size is a number (or undefined), so push the value to all viewport properties in the avatarSizeMap
65
- else {
66
- avatarSizeMap[responsiveKey].push(child.props.size || DEFAULT_AVATAR_SIZE);
90
+ for (const responsiveKey of Object.keys(avatarSizeMap)) {
91
+ if (isResponsiveValue(child.props.size)) {
92
+ avatarSizeMap[responsiveKey].push(child.props.size[responsiveKey] || DEFAULT_AVATAR_SIZE);
93
+ } else {
94
+ avatarSizeMap[responsiveKey].push(child.props.size || DEFAULT_AVATAR_SIZE);
95
+ }
96
+ acc[responsiveKey] = Math.min(...avatarSizeMap[responsiveKey]);
67
97
  }
68
-
69
- // set the smallest size in each viewport property as the value for that viewport property in the accumulator
70
- acc[responsiveKey] = Math.min(...avatarSizeMap[responsiveKey]);
71
- }
72
- return acc;
73
- }, {
74
- narrow: DEFAULT_AVATAR_SIZE,
75
- regular: DEFAULT_AVATAR_SIZE,
76
- wide: DEFAULT_AVATAR_SIZE
77
- });
78
- };
79
- const childSizes = getAvatarChildSizes();
80
- useEffect(() => {
81
- if (stackContainer.current) {
82
- const interactiveChildren = () => {
83
- setHasInteractiveChildren(hasInteractiveNodes(stackContainer.current));
84
- };
85
- const observer = new MutationObserver(interactiveChildren);
86
- observer.observe(stackContainer.current, {
87
- childList: true
98
+ return acc;
99
+ }, {
100
+ narrow: DEFAULT_AVATAR_SIZE,
101
+ regular: DEFAULT_AVATAR_SIZE,
102
+ wide: DEFAULT_AVATAR_SIZE
88
103
  });
89
-
90
- // Call on initial render, then call it again only if there's a mutation
91
- // eslint-disable-next-line react-you-might-not-need-an-effect/no-initialize-state
92
- interactiveChildren();
93
- return () => {
94
- observer.disconnect();
95
- };
96
- }
97
- }, []);
98
- const getResponsiveAvatarSizeStyles = () => {
99
- // if there is no size set on the AvatarStack, use the `size` props of the Avatar children to set the `--avatar-stack-size` CSS variable
100
- if (!size) {
101
- return {
102
- '--stackSize-narrow': `${childSizes.narrow}px`,
103
- '--stackSize-regular': `${childSizes.regular}px`,
104
- '--stackSize-wide': `${childSizes.wide}px`
105
- };
106
- }
107
-
108
- // if the `size` prop is set and responsive, set the `--avatar-stack-size` CSS variable for each viewport
109
- if (isResponsiveValue(size)) {
104
+ };
105
+ t3 = getAvatarChildSizes();
106
+ $[0] = children;
107
+ $[1] = t3;
108
+ } else {
109
+ t3 = $[1];
110
+ }
111
+ const childSizes = t3;
112
+ let t4;
113
+ let t5;
114
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
115
+ t4 = () => {
116
+ if (stackContainer.current) {
117
+ const interactiveChildren = () => {
118
+ setHasInteractiveChildren(hasInteractiveNodes(stackContainer.current));
119
+ };
120
+ const observer = new MutationObserver(interactiveChildren);
121
+ observer.observe(stackContainer.current, {
122
+ childList: true
123
+ });
124
+ interactiveChildren();
125
+ return () => {
126
+ observer.disconnect();
127
+ };
128
+ }
129
+ };
130
+ t5 = [];
131
+ $[2] = t4;
132
+ $[3] = t5;
133
+ } else {
134
+ t4 = $[2];
135
+ t5 = $[3];
136
+ }
137
+ useEffect(t4, t5);
138
+ let t6;
139
+ if ($[4] !== childSizes || $[5] !== size) {
140
+ t6 = () => {
141
+ if (!size) {
142
+ return {
143
+ "--stackSize-narrow": `${childSizes.narrow}px`,
144
+ "--stackSize-regular": `${childSizes.regular}px`,
145
+ "--stackSize-wide": `${childSizes.wide}px`
146
+ };
147
+ }
148
+ if (isResponsiveValue(size)) {
149
+ return {
150
+ "--stackSize-narrow": `${size.narrow || DEFAULT_AVATAR_SIZE}px`,
151
+ "--stackSize-regular": `${size.regular || DEFAULT_AVATAR_SIZE}px`,
152
+ "--stackSize-wide": `${size.wide || DEFAULT_AVATAR_SIZE}px`
153
+ };
154
+ }
110
155
  return {
111
- '--stackSize-narrow': `${size.narrow || DEFAULT_AVATAR_SIZE}px`,
112
- '--stackSize-regular': `${size.regular || DEFAULT_AVATAR_SIZE}px`,
113
- '--stackSize-wide': `${size.wide || DEFAULT_AVATAR_SIZE}px`
156
+ "--avatar-stack-size": `${size}px`
114
157
  };
115
- }
116
-
117
- // if the `size` prop is set and not responsive, it is a number, so we can just set the `--avatar-stack-size` CSS variable to that number
118
- return {
119
- '--avatar-stack-size': `${size}px`
120
158
  };
121
- };
122
- return /*#__PURE__*/jsx("span", {
123
- "data-component": "AvatarStack",
124
- "data-variant": variant,
125
- "data-shape": shape,
126
- "data-avatar-count": count > 3 ? '3+' : count,
127
- "data-align-right": alignRight ? '' : undefined,
128
- "data-responsive": !size || isResponsiveValue(size) ? '' : undefined,
129
- className: clsx({
130
- 'pc-AvatarStack--variant': variant,
131
- 'pc-AvatarStack--shape': shape,
132
- 'pc-AvatarStack--two': count === 2,
133
- 'pc-AvatarStack--three': count === 3,
134
- 'pc-AvatarStack--three-plus': count > 3,
135
- 'pc-AvatarStack--right': alignRight
136
- }, className, classes.AvatarStack),
137
- style: {
138
- ...getResponsiveAvatarSizeStyles(),
159
+ $[4] = childSizes;
160
+ $[5] = size;
161
+ $[6] = t6;
162
+ } else {
163
+ t6 = $[6];
164
+ }
165
+ const getResponsiveAvatarSizeStyles = t6;
166
+ const t7 = count > 3 ? "3+" : count;
167
+ const t8 = alignRight ? "" : undefined;
168
+ const t9 = !size || isResponsiveValue(size) ? "" : undefined;
169
+ const t10 = count === 2;
170
+ const t11 = count === 3;
171
+ const t12 = count > 3;
172
+ let t13;
173
+ if ($[7] !== alignRight || $[8] !== className || $[9] !== shape || $[10] !== t10 || $[11] !== t11 || $[12] !== t12 || $[13] !== variant) {
174
+ t13 = clsx({
175
+ "pc-AvatarStack--variant": variant,
176
+ "pc-AvatarStack--shape": shape,
177
+ "pc-AvatarStack--two": t10,
178
+ "pc-AvatarStack--three": t11,
179
+ "pc-AvatarStack--three-plus": t12,
180
+ "pc-AvatarStack--right": alignRight
181
+ }, className, classes.AvatarStack);
182
+ $[7] = alignRight;
183
+ $[8] = className;
184
+ $[9] = shape;
185
+ $[10] = t10;
186
+ $[11] = t11;
187
+ $[12] = t12;
188
+ $[13] = variant;
189
+ $[14] = t13;
190
+ } else {
191
+ t13 = $[14];
192
+ }
193
+ let t14;
194
+ if ($[15] !== getResponsiveAvatarSizeStyles) {
195
+ t14 = getResponsiveAvatarSizeStyles();
196
+ $[15] = getResponsiveAvatarSizeStyles;
197
+ $[16] = t14;
198
+ } else {
199
+ t14 = $[16];
200
+ }
201
+ let t15;
202
+ if ($[17] !== style || $[18] !== t14) {
203
+ t15 = {
204
+ ...t14,
139
205
  ...style
140
- },
141
- children: /*#__PURE__*/jsxs(AvatarStackBody, {
206
+ };
207
+ $[17] = style;
208
+ $[18] = t14;
209
+ $[19] = t15;
210
+ } else {
211
+ t15 = $[19];
212
+ }
213
+ let t16;
214
+ if ($[20] !== children || $[21] !== shape) {
215
+ t16 = transformChildren(children, shape);
216
+ $[20] = children;
217
+ $[21] = shape;
218
+ $[22] = t16;
219
+ } else {
220
+ t16 = $[22];
221
+ }
222
+ let t17;
223
+ if ($[23] !== disableExpand || $[24] !== hasInteractiveChildren || $[25] !== t16) {
224
+ t17 = /*#__PURE__*/jsxs(AvatarStackBody, {
142
225
  disableExpand: disableExpand,
143
226
  hasInteractiveChildren: hasInteractiveChildren,
144
227
  stackContainer: stackContainer,
145
- children: [' ', transformChildren(children, shape)]
146
- })
147
- });
228
+ children: [" ", t16]
229
+ });
230
+ $[23] = disableExpand;
231
+ $[24] = hasInteractiveChildren;
232
+ $[25] = t16;
233
+ $[26] = t17;
234
+ } else {
235
+ t17 = $[26];
236
+ }
237
+ let t18;
238
+ if ($[27] !== shape || $[28] !== t13 || $[29] !== t15 || $[30] !== t17 || $[31] !== t7 || $[32] !== t8 || $[33] !== t9 || $[34] !== variant) {
239
+ t18 = /*#__PURE__*/jsx("span", {
240
+ "data-component": "AvatarStack",
241
+ "data-variant": variant,
242
+ "data-shape": shape,
243
+ "data-avatar-count": t7,
244
+ "data-align-right": t8,
245
+ "data-responsive": t9,
246
+ className: t13,
247
+ style: t15,
248
+ children: t17
249
+ });
250
+ $[27] = shape;
251
+ $[28] = t13;
252
+ $[29] = t15;
253
+ $[30] = t17;
254
+ $[31] = t7;
255
+ $[32] = t8;
256
+ $[33] = t9;
257
+ $[34] = variant;
258
+ $[35] = t18;
259
+ } else {
260
+ t18 = $[35];
261
+ }
262
+ return t18;
148
263
  };
149
- AvatarStack.displayName = "AvatarStack";
150
264
 
151
265
  export { AvatarStack as default };
@@ -1,3 +1,4 @@
1
+ import { c } from 'react-compiler-runtime';
1
2
  import { clsx } from 'clsx';
2
3
  import React, { forwardRef } from 'react';
3
4
  import { useDevOnlyEffect } from '../internal/hooks/useDevOnlyEffect.js';
@@ -5,27 +6,76 @@ import classes from './Heading.module.css.js';
5
6
  import { jsx } from 'react/jsx-runtime';
6
7
  import { useMergedRefs } from '../hooks/useMergedRefs.js';
7
8
 
8
- const Heading = /*#__PURE__*/forwardRef(({
9
- as: Component = 'h2',
10
- className,
11
- variant,
12
- ...props
13
- }, forwardedRef) => {
9
+ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
10
+ const $ = c(15);
11
+ let className;
12
+ let props;
13
+ let t1;
14
+ let variant;
15
+ if ($[0] !== t0) {
16
+ ({
17
+ as: t1,
18
+ className,
19
+ variant,
20
+ ...props
21
+ } = t0);
22
+ $[0] = t0;
23
+ $[1] = className;
24
+ $[2] = props;
25
+ $[3] = t1;
26
+ $[4] = variant;
27
+ } else {
28
+ className = $[1];
29
+ props = $[2];
30
+ t1 = $[3];
31
+ variant = $[4];
32
+ }
33
+ const Component = t1 === undefined ? "h2" : t1;
14
34
  const innerRef = React.useRef(null);
15
35
  const mergedRef = useMergedRefs(forwardedRef, innerRef);
16
- useDevOnlyEffect(() => {
17
- if (innerRef.current && !(innerRef.current instanceof HTMLHeadingElement)) {
18
- // eslint-disable-next-line no-console
19
- console.warn('This Heading component should be an instanceof of h1-h6');
20
- }
21
- }, [innerRef]);
22
- return /*#__PURE__*/jsx(Component, {
23
- className: clsx(className, classes.Heading),
24
- "data-variant": variant,
25
- "data-component": "Heading",
26
- ...props,
27
- ref: mergedRef
28
- });
36
+ let t2;
37
+ let t3;
38
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
39
+ t2 = () => {
40
+ if (innerRef.current && !(innerRef.current instanceof HTMLHeadingElement)) {
41
+ console.warn("This Heading component should be an instanceof of h1-h6");
42
+ }
43
+ };
44
+ t3 = [innerRef];
45
+ $[5] = t2;
46
+ $[6] = t3;
47
+ } else {
48
+ t2 = $[5];
49
+ t3 = $[6];
50
+ }
51
+ useDevOnlyEffect(t2, t3);
52
+ let t4;
53
+ if ($[7] !== className) {
54
+ t4 = clsx(className, classes.Heading);
55
+ $[7] = className;
56
+ $[8] = t4;
57
+ } else {
58
+ t4 = $[8];
59
+ }
60
+ let t5;
61
+ if ($[9] !== Component || $[10] !== mergedRef || $[11] !== props || $[12] !== t4 || $[13] !== variant) {
62
+ t5 = /*#__PURE__*/jsx(Component, {
63
+ className: t4,
64
+ "data-variant": variant,
65
+ "data-component": "Heading",
66
+ ...props,
67
+ ref: mergedRef
68
+ });
69
+ $[9] = Component;
70
+ $[10] = mergedRef;
71
+ $[11] = props;
72
+ $[12] = t4;
73
+ $[13] = variant;
74
+ $[14] = t5;
75
+ } else {
76
+ t5 = $[14];
77
+ }
78
+ return t5;
29
79
  });
30
80
  Heading.displayName = 'Heading';
31
81
 
package/dist/Link/Link.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { c } from 'react-compiler-runtime';
1
2
  import { clsx } from 'clsx';
2
3
  import React from 'react';
3
4
  import { useDevOnlyEffect } from '../internal/hooks/useDevOnlyEffect.js';
@@ -7,34 +8,89 @@ import { jsx } from 'react/jsx-runtime';
7
8
  import { useMergedRefs } from '../hooks/useMergedRefs.js';
8
9
 
9
10
  const UnwrappedLink = (props, ref) => {
10
- const {
11
- as: Component = 'a',
12
- className,
13
- inline,
14
- muted,
15
- hoverColor,
16
- ...restProps
17
- } = props;
11
+ const $ = c(19);
12
+ let className;
13
+ let hoverColor;
14
+ let inline;
15
+ let muted;
16
+ let restProps;
17
+ let t0;
18
+ if ($[0] !== props) {
19
+ ({
20
+ as: t0,
21
+ className,
22
+ inline,
23
+ muted,
24
+ hoverColor,
25
+ ...restProps
26
+ } = props);
27
+ $[0] = props;
28
+ $[1] = className;
29
+ $[2] = hoverColor;
30
+ $[3] = inline;
31
+ $[4] = muted;
32
+ $[5] = restProps;
33
+ $[6] = t0;
34
+ } else {
35
+ className = $[1];
36
+ hoverColor = $[2];
37
+ inline = $[3];
38
+ muted = $[4];
39
+ restProps = $[5];
40
+ t0 = $[6];
41
+ }
42
+ const Component = t0 === undefined ? "a" : t0;
18
43
  const innerRef = React.useRef(null);
19
44
  const mergedRef = useMergedRefs(ref, innerRef);
20
- useDevOnlyEffect(() => {
21
- if (innerRef.current && !(innerRef.current instanceof HTMLButtonElement) && !(innerRef.current instanceof HTMLAnchorElement)) {
22
- // eslint-disable-next-line no-console
23
- console.error('Error: Found `Link` component that renders an inaccessible element', innerRef.current, 'Please ensure `Link` always renders as <a> or <button>');
24
- }
25
- }, [innerRef]);
26
- return /*#__PURE__*/jsx(Component, {
27
- className: clsx(className, classes.Link),
28
- "data-component": "Link",
29
- "data-muted": muted,
30
- "data-inline": inline,
31
- "data-hover-color": hoverColor,
32
- ...restProps,
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- ref: mergedRef
35
- });
45
+ let t1;
46
+ let t2;
47
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
48
+ t1 = () => {
49
+ if (innerRef.current && !(innerRef.current instanceof HTMLButtonElement) && !(innerRef.current instanceof HTMLAnchorElement)) {
50
+ console.error("Error: Found `Link` component that renders an inaccessible element", innerRef.current, "Please ensure `Link` always renders as <a> or <button>");
51
+ }
52
+ };
53
+ t2 = [innerRef];
54
+ $[7] = t1;
55
+ $[8] = t2;
56
+ } else {
57
+ t1 = $[7];
58
+ t2 = $[8];
59
+ }
60
+ useDevOnlyEffect(t1, t2);
61
+ let t3;
62
+ if ($[9] !== className) {
63
+ t3 = clsx(className, classes.Link);
64
+ $[9] = className;
65
+ $[10] = t3;
66
+ } else {
67
+ t3 = $[10];
68
+ }
69
+ const t4 = mergedRef;
70
+ let t5;
71
+ if ($[11] !== Component || $[12] !== hoverColor || $[13] !== inline || $[14] !== muted || $[15] !== restProps || $[16] !== t3 || $[17] !== t4) {
72
+ t5 = /*#__PURE__*/jsx(Component, {
73
+ className: t3,
74
+ "data-component": "Link",
75
+ "data-muted": muted,
76
+ "data-inline": inline,
77
+ "data-hover-color": hoverColor,
78
+ ...restProps,
79
+ ref: t4
80
+ });
81
+ $[11] = Component;
82
+ $[12] = hoverColor;
83
+ $[13] = inline;
84
+ $[14] = muted;
85
+ $[15] = restProps;
86
+ $[16] = t3;
87
+ $[17] = t4;
88
+ $[18] = t5;
89
+ } else {
90
+ t5 = $[18];
91
+ }
92
+ return t5;
36
93
  };
37
- UnwrappedLink.displayName = "UnwrappedLink";
38
94
  const LinkComponent = fixedForwardRef(UnwrappedLink);
39
95
  const Link = Object.assign(LinkComponent, {
40
96
  displayName: 'Link'
@@ -1,18 +1,52 @@
1
+ import { c } from 'react-compiler-runtime';
1
2
  import { clsx } from 'clsx';
2
3
  import classes from './Pagehead.module.css.js';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
 
5
- const Pagehead = ({
6
- as: BaseComponent = 'div',
7
- className,
8
- ...rest
9
- }) => {
10
- return /*#__PURE__*/jsx(BaseComponent, {
11
- className: clsx(classes.Pagehead, className),
12
- "data-component": "Pagehead",
13
- ...rest
14
- });
6
+ const Pagehead = t0 => {
7
+ const $ = c(10);
8
+ let className;
9
+ let rest;
10
+ let t1;
11
+ if ($[0] !== t0) {
12
+ ({
13
+ as: t1,
14
+ className,
15
+ ...rest
16
+ } = t0);
17
+ $[0] = t0;
18
+ $[1] = className;
19
+ $[2] = rest;
20
+ $[3] = t1;
21
+ } else {
22
+ className = $[1];
23
+ rest = $[2];
24
+ t1 = $[3];
25
+ }
26
+ const BaseComponent = t1 === undefined ? "div" : t1;
27
+ let t2;
28
+ if ($[4] !== className) {
29
+ t2 = clsx(classes.Pagehead, className);
30
+ $[4] = className;
31
+ $[5] = t2;
32
+ } else {
33
+ t2 = $[5];
34
+ }
35
+ let t3;
36
+ if ($[6] !== BaseComponent || $[7] !== rest || $[8] !== t2) {
37
+ t3 = /*#__PURE__*/jsx(BaseComponent, {
38
+ className: t2,
39
+ "data-component": "Pagehead",
40
+ ...rest
41
+ });
42
+ $[6] = BaseComponent;
43
+ $[7] = rest;
44
+ $[8] = t2;
45
+ $[9] = t3;
46
+ } else {
47
+ t3 = $[9];
48
+ }
49
+ return t3;
15
50
  };
16
- Pagehead.displayName = "Pagehead";
17
51
 
18
52
  export { Pagehead as default };