@primer/react 0.0.0-20260220143956 → 0.0.0-20260220144103
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 +14 -4
- package/dist/ActionList/ActionList-c04a02d6.css +2 -0
- package/dist/ActionList/ActionList-c04a02d6.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +1 -0
- package/dist/Blankslate/{Blankslate-f5a9755a.css → Blankslate-a039d79a.css} +2 -2
- package/dist/Blankslate/Blankslate-a039d79a.css.map +1 -0
- package/dist/Blankslate/Blankslate.module.css.js +1 -1
- package/dist/PageLayout/PageLayout-06f4c069.css +2 -0
- package/dist/PageLayout/PageLayout-06f4c069.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts +72 -2
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +497 -44
- package/dist/PageLayout/PageLayout.module.css.js +2 -2
- package/dist/PageLayout/usePaneWidth.d.ts +18 -5
- package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
- package/dist/PageLayout/usePaneWidth.js +125 -111
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +152 -106
- package/dist/SplitPageLayout/SplitPageLayout.d.ts +4 -1
- package/dist/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/dist/SplitPageLayout/SplitPageLayout.js +54 -2
- package/dist/Text/Text.d.ts +1 -1
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +10 -13
- package/generated/components.json +187 -1
- package/package.json +1 -1
- package/dist/ActionList/ActionList-f4ac3b54.css +0 -2
- package/dist/ActionList/ActionList-f4ac3b54.css.map +0 -1
- package/dist/Blankslate/Blankslate-f5a9755a.css.map +0 -1
- package/dist/PageLayout/PageLayout-cb491b47.css +0 -2
- package/dist/PageLayout/PageLayout-cb491b47.css.map +0 -1
package/dist/Spinner/Spinner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import { useState, useEffect, useRef, useSyncExternalStore } from 'react';
|
|
4
4
|
import classes from './Spinner.module.css.js';
|
|
5
5
|
import { useMedia } from '../hooks/useMedia.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -8,7 +8,6 @@ import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
|
8
8
|
import { useId } from '../hooks/useId.js';
|
|
9
9
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
10
10
|
|
|
11
|
-
const ANIMATION_DURATION_MS = 1000;
|
|
12
11
|
const sizeMap = {
|
|
13
12
|
small: '16px',
|
|
14
13
|
medium: '32px',
|
|
@@ -16,7 +15,7 @@ const sizeMap = {
|
|
|
16
15
|
};
|
|
17
16
|
function Spinner(t0) {
|
|
18
17
|
var _ariaLabel;
|
|
19
|
-
const $ = c(
|
|
18
|
+
const $ = c(30);
|
|
20
19
|
let ariaLabel;
|
|
21
20
|
let className;
|
|
22
21
|
let props;
|
|
@@ -55,82 +54,50 @@ function Spinner(t0) {
|
|
|
55
54
|
const srText = t2 === undefined ? "Loading" : t2;
|
|
56
55
|
const delay = t3 === undefined ? false : t3;
|
|
57
56
|
const syncAnimationsEnabled = useFeatureFlag("primer_react_spinner_synchronize_animations");
|
|
58
|
-
const
|
|
57
|
+
const animationRef = useSpinnerAnimation();
|
|
59
58
|
const size = sizeMap[sizeKey];
|
|
60
59
|
const hasHiddenLabel = srText !== null && ariaLabel === undefined;
|
|
61
60
|
const labelId = useId();
|
|
61
|
+
const [isVisible, setIsVisible] = useState(!delay);
|
|
62
62
|
let t4;
|
|
63
|
+
let t5;
|
|
63
64
|
if ($[8] !== delay) {
|
|
64
|
-
t4 = () =>
|
|
65
|
-
isVisible: !delay,
|
|
66
|
-
syncDelay: !delay ? computeSyncDelay() : 0
|
|
67
|
-
});
|
|
68
|
-
$[8] = delay;
|
|
69
|
-
$[9] = t4;
|
|
70
|
-
} else {
|
|
71
|
-
t4 = $[9];
|
|
72
|
-
}
|
|
73
|
-
const [t5, setVisibleState] = useState(t4);
|
|
74
|
-
const {
|
|
75
|
-
isVisible,
|
|
76
|
-
syncDelay
|
|
77
|
-
} = t5;
|
|
78
|
-
let t6;
|
|
79
|
-
let t7;
|
|
80
|
-
if ($[10] !== delay) {
|
|
81
|
-
t6 = () => {
|
|
65
|
+
t4 = () => {
|
|
82
66
|
if (delay) {
|
|
83
67
|
const delayDuration = typeof delay === "number" ? delay : delay === "short" ? 300 : 1000;
|
|
84
68
|
const timeoutId = setTimeout(() => {
|
|
85
|
-
|
|
86
|
-
isVisible: true,
|
|
87
|
-
syncDelay: computeSyncDelay()
|
|
88
|
-
});
|
|
69
|
+
setIsVisible(true);
|
|
89
70
|
}, delayDuration);
|
|
90
71
|
return () => clearTimeout(timeoutId);
|
|
91
72
|
}
|
|
92
73
|
};
|
|
93
|
-
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
74
|
+
t5 = [delay];
|
|
75
|
+
$[8] = delay;
|
|
76
|
+
$[9] = t4;
|
|
77
|
+
$[10] = t5;
|
|
97
78
|
} else {
|
|
98
|
-
|
|
99
|
-
|
|
79
|
+
t4 = $[9];
|
|
80
|
+
t5 = $[10];
|
|
100
81
|
}
|
|
101
|
-
useEffect(
|
|
82
|
+
useEffect(t4, t5);
|
|
102
83
|
if (!isVisible) {
|
|
103
84
|
return null;
|
|
104
85
|
}
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
$[
|
|
113
|
-
$[14] = style;
|
|
114
|
-
$[15] = syncDelay;
|
|
115
|
-
$[16] = t8;
|
|
86
|
+
const t6 = syncAnimationsEnabled ? animationRef : undefined;
|
|
87
|
+
const t7 = (_ariaLabel = ariaLabel) !== null && _ariaLabel !== void 0 ? _ariaLabel : undefined;
|
|
88
|
+
const t8 = hasHiddenLabel ? labelId : undefined;
|
|
89
|
+
let t9;
|
|
90
|
+
if ($[11] !== className) {
|
|
91
|
+
t9 = clsx(className, classes.SpinnerAnimation);
|
|
92
|
+
$[11] = className;
|
|
93
|
+
$[12] = t9;
|
|
116
94
|
} else {
|
|
117
|
-
|
|
95
|
+
t9 = $[12];
|
|
118
96
|
}
|
|
119
|
-
|
|
120
|
-
const t9 = (_ariaLabel = ariaLabel) !== null && _ariaLabel !== void 0 ? _ariaLabel : undefined;
|
|
121
|
-
const t10 = hasHiddenLabel ? labelId : undefined;
|
|
97
|
+
let t10;
|
|
122
98
|
let t11;
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
125
|
-
$[17] = className;
|
|
126
|
-
$[18] = t11;
|
|
127
|
-
} else {
|
|
128
|
-
t11 = $[18];
|
|
129
|
-
}
|
|
130
|
-
let t12;
|
|
131
|
-
let t13;
|
|
132
|
-
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
-
t12 = /*#__PURE__*/jsx("circle", {
|
|
99
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
+
t10 = /*#__PURE__*/jsx("circle", {
|
|
134
101
|
cx: "8",
|
|
135
102
|
cy: "8",
|
|
136
103
|
r: "7",
|
|
@@ -139,84 +106,163 @@ function Spinner(t0) {
|
|
|
139
106
|
strokeWidth: "2",
|
|
140
107
|
vectorEffect: "non-scaling-stroke"
|
|
141
108
|
});
|
|
142
|
-
|
|
109
|
+
t11 = /*#__PURE__*/jsx("path", {
|
|
143
110
|
d: "M15 8a7.002 7.002 0 00-7-7",
|
|
144
111
|
stroke: "currentColor",
|
|
145
112
|
strokeWidth: "2",
|
|
146
113
|
strokeLinecap: "round",
|
|
147
114
|
vectorEffect: "non-scaling-stroke"
|
|
148
115
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
116
|
+
$[13] = t10;
|
|
117
|
+
$[14] = t11;
|
|
151
118
|
} else {
|
|
152
|
-
|
|
153
|
-
|
|
119
|
+
t10 = $[13];
|
|
120
|
+
t11 = $[14];
|
|
154
121
|
}
|
|
155
|
-
let
|
|
156
|
-
if ($[
|
|
157
|
-
|
|
122
|
+
let t12;
|
|
123
|
+
if ($[15] !== props || $[16] !== size || $[17] !== style || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9) {
|
|
124
|
+
t12 = /*#__PURE__*/jsxs("svg", {
|
|
125
|
+
ref: t6,
|
|
158
126
|
height: size,
|
|
159
127
|
width: size,
|
|
160
128
|
viewBox: "0 0 16 16",
|
|
161
129
|
fill: "none",
|
|
162
130
|
"aria-hidden": true,
|
|
163
|
-
"aria-label":
|
|
164
|
-
"aria-labelledby":
|
|
165
|
-
className:
|
|
166
|
-
style:
|
|
131
|
+
"aria-label": t7,
|
|
132
|
+
"aria-labelledby": t8,
|
|
133
|
+
className: t9,
|
|
134
|
+
style: style,
|
|
167
135
|
...props,
|
|
168
|
-
children: [
|
|
136
|
+
children: [t10, t11]
|
|
169
137
|
});
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
138
|
+
$[15] = props;
|
|
139
|
+
$[16] = size;
|
|
140
|
+
$[17] = style;
|
|
141
|
+
$[18] = t6;
|
|
142
|
+
$[19] = t7;
|
|
143
|
+
$[20] = t8;
|
|
144
|
+
$[21] = t9;
|
|
145
|
+
$[22] = t12;
|
|
177
146
|
} else {
|
|
178
|
-
|
|
147
|
+
t12 = $[22];
|
|
179
148
|
}
|
|
180
|
-
let
|
|
181
|
-
if ($[
|
|
182
|
-
|
|
149
|
+
let t13;
|
|
150
|
+
if ($[23] !== hasHiddenLabel || $[24] !== labelId || $[25] !== srText) {
|
|
151
|
+
t13 = hasHiddenLabel ? /*#__PURE__*/jsx(VisuallyHidden, {
|
|
183
152
|
id: labelId,
|
|
184
153
|
children: srText
|
|
185
154
|
}) : null;
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
155
|
+
$[23] = hasHiddenLabel;
|
|
156
|
+
$[24] = labelId;
|
|
157
|
+
$[25] = srText;
|
|
158
|
+
$[26] = t13;
|
|
190
159
|
} else {
|
|
191
|
-
|
|
160
|
+
t13 = $[26];
|
|
192
161
|
}
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
162
|
+
let t14;
|
|
163
|
+
if ($[27] !== t12 || $[28] !== t13) {
|
|
164
|
+
t14 = /*#__PURE__*/jsxs("span", {
|
|
196
165
|
className: classes.Box,
|
|
197
|
-
children: [
|
|
166
|
+
children: [t12, t13]
|
|
198
167
|
});
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
168
|
+
$[27] = t12;
|
|
169
|
+
$[28] = t13;
|
|
170
|
+
$[29] = t14;
|
|
202
171
|
} else {
|
|
203
|
-
|
|
172
|
+
t14 = $[29];
|
|
204
173
|
}
|
|
205
|
-
return
|
|
174
|
+
return t14;
|
|
206
175
|
}
|
|
207
176
|
Spinner.displayName = 'Spinner';
|
|
177
|
+
const animationTimingStore = {
|
|
178
|
+
subscribers: new Set(),
|
|
179
|
+
value: {
|
|
180
|
+
startTime: null
|
|
181
|
+
},
|
|
182
|
+
update(startTime) {
|
|
183
|
+
const value = {
|
|
184
|
+
startTime
|
|
185
|
+
};
|
|
186
|
+
animationTimingStore.value = value;
|
|
187
|
+
for (const subscriber of animationTimingStore.subscribers) {
|
|
188
|
+
subscriber();
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
subscribe(subscriber) {
|
|
192
|
+
animationTimingStore.subscribers.add(subscriber);
|
|
193
|
+
return () => {
|
|
194
|
+
animationTimingStore.subscribers.delete(subscriber);
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
getSnapshot() {
|
|
198
|
+
return animationTimingStore.value;
|
|
199
|
+
},
|
|
200
|
+
getServerSnapshot() {
|
|
201
|
+
return animationTimingStore.value;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* A utility hook for reading a common `startTime` value so that all animations
|
|
207
|
+
* are in sync. This is a global value and is coordinated through `useSyncExternalStore`.
|
|
208
|
+
*/
|
|
209
|
+
function useAnimationTiming() {
|
|
210
|
+
return useSyncExternalStore(animationTimingStore.subscribe, animationTimingStore.getSnapshot, animationTimingStore.getServerSnapshot);
|
|
211
|
+
}
|
|
208
212
|
|
|
209
213
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* references the same clock (performance.now()), the CSS animation engine
|
|
213
|
-
* keeps them visually in sync without any Web Animations API calls
|
|
214
|
-
* (getAnimations, element.animate, startTime), which are significantly
|
|
215
|
-
* slower in Safari/WebKit.
|
|
214
|
+
* Uses a technique from Spectrum to coordinate animations:
|
|
215
|
+
* @see https://github.com/adobe/react-spectrum/blob/ab5e6f3dba4235dafab9f81f8b5c506ce5f11230/packages/%40react-spectrum/s2/src/Skeleton.tsx#L21
|
|
216
216
|
*/
|
|
217
|
-
function
|
|
218
|
-
const
|
|
219
|
-
|
|
217
|
+
function useSpinnerAnimation() {
|
|
218
|
+
const $ = c(3);
|
|
219
|
+
const ref = useRef(null);
|
|
220
|
+
const noMotionPreference = useMedia("(prefers-reduced-motion: no-preference)", false);
|
|
221
|
+
const animationTiming = useAnimationTiming();
|
|
222
|
+
let t0;
|
|
223
|
+
if ($[0] !== animationTiming || $[1] !== noMotionPreference) {
|
|
224
|
+
t0 = element => {
|
|
225
|
+
if (!element) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (ref.current !== null) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (noMotionPreference) {
|
|
232
|
+
const cssAnimation = element.getAnimations().find(_temp);
|
|
233
|
+
cssAnimation === null || cssAnimation === void 0 ? void 0 : cssAnimation.pause();
|
|
234
|
+
ref.current = element.animate([{
|
|
235
|
+
transform: "rotate(0deg)"
|
|
236
|
+
}, {
|
|
237
|
+
transform: "rotate(360deg)"
|
|
238
|
+
}], {
|
|
239
|
+
duration: 1000,
|
|
240
|
+
easing: "cubic-bezier(0,0,1,1)",
|
|
241
|
+
iterations: Infinity
|
|
242
|
+
});
|
|
243
|
+
if (animationTiming.startTime === null) {
|
|
244
|
+
var _cssAnimation$startTi;
|
|
245
|
+
const startTime = (_cssAnimation$startTi = cssAnimation === null || cssAnimation === void 0 ? void 0 : cssAnimation.startTime) !== null && _cssAnimation$startTi !== void 0 ? _cssAnimation$startTi : 0;
|
|
246
|
+
animationTimingStore.update(startTime);
|
|
247
|
+
ref.current.startTime = startTime;
|
|
248
|
+
} else {
|
|
249
|
+
ref.current.startTime = animationTiming.startTime;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
$[0] = animationTiming;
|
|
254
|
+
$[1] = noMotionPreference;
|
|
255
|
+
$[2] = t0;
|
|
256
|
+
} else {
|
|
257
|
+
t0 = $[2];
|
|
258
|
+
}
|
|
259
|
+
return t0;
|
|
260
|
+
}
|
|
261
|
+
function _temp(animation) {
|
|
262
|
+
if (animation instanceof CSSAnimation) {
|
|
263
|
+
return animation.animationName.startsWith("Spinner") && animation.animationName.endsWith("rotate-keyframes");
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
220
266
|
}
|
|
221
267
|
|
|
222
268
|
export { Spinner as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { PageLayoutContentProps, PageLayoutFooterProps, PageLayoutHeaderProps, PageLayoutPaneProps } from '../PageLayout';
|
|
2
|
+
import type { PageLayoutContentProps, PageLayoutFooterProps, PageLayoutHeaderProps, PageLayoutPaneProps, PageLayoutSidebarProps } from '../PageLayout';
|
|
3
3
|
export type SplitPageLayoutProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
@@ -10,12 +10,15 @@ export type SplitPageLayoutContentProps = PageLayoutContentProps;
|
|
|
10
10
|
export declare const Content: React.FC<React.PropsWithChildren<SplitPageLayoutContentProps>>;
|
|
11
11
|
export type SplitPageLayoutPaneProps = PageLayoutPaneProps;
|
|
12
12
|
export declare const Pane: React.FC<React.PropsWithChildren<SplitPageLayoutPaneProps>>;
|
|
13
|
+
export type SplitPageLayoutSidebarProps = PageLayoutSidebarProps;
|
|
14
|
+
export declare const Sidebar: React.FC<React.PropsWithChildren<SplitPageLayoutSidebarProps>>;
|
|
13
15
|
export type SplitPageLayoutFooterProps = PageLayoutFooterProps;
|
|
14
16
|
export declare const Footer: React.FC<React.PropsWithChildren<SplitPageLayoutFooterProps>>;
|
|
15
17
|
export declare const SplitPageLayout: React.FC<React.PropsWithChildren<SplitPageLayoutProps>> & {
|
|
16
18
|
Header: React.FC<React.PropsWithChildren<PageLayoutHeaderProps>>;
|
|
17
19
|
Content: React.FC<React.PropsWithChildren<PageLayoutContentProps>>;
|
|
18
20
|
Pane: React.FC<React.PropsWithChildren<PageLayoutPaneProps>>;
|
|
21
|
+
Sidebar: React.FC<React.PropsWithChildren<PageLayoutSidebarProps>>;
|
|
19
22
|
Footer: React.FC<React.PropsWithChildren<PageLayoutFooterProps>>;
|
|
20
23
|
};
|
|
21
24
|
//# sourceMappingURL=SplitPageLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitPageLayout.d.ts","sourceRoot":"","sources":["../../src/SplitPageLayout/SplitPageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"SplitPageLayout.d.ts","sourceRoot":"","sources":["../../src/SplitPageLayout/SplitPageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,eAAe,CAAA;AAMtB,MAAM,MAAM,oBAAoB,GAAG;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAEvD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAexE,CAAA;AAOD,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAA;AAE9D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,CAOhF,CAAA;AAOD,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAA;AAEhE,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAMlF,CAAA;AAOD,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAA;AAE1D,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,CAgB5E,CAAA;AAMD,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAA;AAEhE,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAOlF,CAAA;AAOD,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAA;AAE9D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,CAOhF,CAAA;AAOD,eAAO,MAAM,eAAe;;;;;;CAM1B,CAAA"}
|
|
@@ -8,7 +8,8 @@ const Root = props => {
|
|
|
8
8
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9
9
|
t0 = {
|
|
10
10
|
header: Header,
|
|
11
|
-
footer: Footer
|
|
11
|
+
footer: Footer,
|
|
12
|
+
sidebar: Sidebar
|
|
12
13
|
};
|
|
13
14
|
$[0] = t0;
|
|
14
15
|
} else {
|
|
@@ -176,6 +177,56 @@ const Pane = t0 => {
|
|
|
176
177
|
};
|
|
177
178
|
Pane.displayName = 'SplitPageLayout.Pane';
|
|
178
179
|
|
|
180
|
+
// ----------------------------------------------------------------------------
|
|
181
|
+
// SplitPageLayout.Sidebar
|
|
182
|
+
|
|
183
|
+
const Sidebar = t0 => {
|
|
184
|
+
const $ = c(10);
|
|
185
|
+
let props;
|
|
186
|
+
let t1;
|
|
187
|
+
let t2;
|
|
188
|
+
let t3;
|
|
189
|
+
if ($[0] !== t0) {
|
|
190
|
+
({
|
|
191
|
+
position: t1,
|
|
192
|
+
padding: t2,
|
|
193
|
+
divider: t3,
|
|
194
|
+
...props
|
|
195
|
+
} = t0);
|
|
196
|
+
$[0] = t0;
|
|
197
|
+
$[1] = props;
|
|
198
|
+
$[2] = t1;
|
|
199
|
+
$[3] = t2;
|
|
200
|
+
$[4] = t3;
|
|
201
|
+
} else {
|
|
202
|
+
props = $[1];
|
|
203
|
+
t1 = $[2];
|
|
204
|
+
t2 = $[3];
|
|
205
|
+
t3 = $[4];
|
|
206
|
+
}
|
|
207
|
+
const position = t1 === undefined ? "start" : t1;
|
|
208
|
+
const padding = t2 === undefined ? "normal" : t2;
|
|
209
|
+
const divider = t3 === undefined ? "line" : t3;
|
|
210
|
+
let t4;
|
|
211
|
+
if ($[5] !== divider || $[6] !== padding || $[7] !== position || $[8] !== props) {
|
|
212
|
+
t4 = /*#__PURE__*/jsx(PageLayout.Sidebar, {
|
|
213
|
+
position: position,
|
|
214
|
+
padding: padding,
|
|
215
|
+
divider: divider,
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
$[5] = divider;
|
|
219
|
+
$[6] = padding;
|
|
220
|
+
$[7] = position;
|
|
221
|
+
$[8] = props;
|
|
222
|
+
$[9] = t4;
|
|
223
|
+
} else {
|
|
224
|
+
t4 = $[9];
|
|
225
|
+
}
|
|
226
|
+
return t4;
|
|
227
|
+
};
|
|
228
|
+
Sidebar.displayName = 'SplitPageLayout.Sidebar';
|
|
229
|
+
|
|
179
230
|
// ----------------------------------------------------------------------------
|
|
180
231
|
// SplitPageLayout.Footer
|
|
181
232
|
|
|
@@ -226,7 +277,8 @@ const SplitPageLayout = Object.assign(Root, {
|
|
|
226
277
|
Header,
|
|
227
278
|
Content,
|
|
228
279
|
Pane,
|
|
280
|
+
Sidebar,
|
|
229
281
|
Footer
|
|
230
282
|
});
|
|
231
283
|
|
|
232
|
-
export { Content, Footer, Header, Pane, Root, SplitPageLayout };
|
|
284
|
+
export { Content, Footer, Header, Pane, Root, Sidebar, SplitPageLayout };
|
package/dist/Text/Text.d.ts
CHANGED
package/dist/Text/Text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,SAAS,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CAC7E,EAAE,EACF,MAAM,EACN;IACE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACF,CAAA;yBAGa,EAAE,SAAS,KAAK,CAAC,WAAW;WAP/B,OAAO,GAAG,QAAQ,GAAG,OAAO;aAC1B,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU;gBACvC,MAAM;;WAFX,OAAO,GAAG,QAAQ,GAAG,OAAO;aAC1B,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU;gBACvC,MAAM;;;;AAetB,wBAAoC"}
|
package/dist/Text/Text.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import classes from './Text.module.css.js';
|
|
5
4
|
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
6
5
|
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
8
6
|
|
|
9
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
8
|
function Text(props, ref) {
|
|
11
|
-
const $ = c(
|
|
9
|
+
const $ = c(15);
|
|
12
10
|
let className;
|
|
13
11
|
let rest;
|
|
14
12
|
let size;
|
|
@@ -36,8 +34,6 @@ function Text(props, ref) {
|
|
|
36
34
|
weight = $[5];
|
|
37
35
|
}
|
|
38
36
|
const Component = t0 === undefined ? "span" : t0;
|
|
39
|
-
const innerRef = React.useRef(null);
|
|
40
|
-
useRefObjectAsForwardedRef(ref, innerRef);
|
|
41
37
|
let t1;
|
|
42
38
|
if ($[6] !== className) {
|
|
43
39
|
t1 = clsx(className, classes.Text);
|
|
@@ -47,22 +43,23 @@ function Text(props, ref) {
|
|
|
47
43
|
t1 = $[7];
|
|
48
44
|
}
|
|
49
45
|
let t2;
|
|
50
|
-
if ($[8] !== Component || $[9] !==
|
|
46
|
+
if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== size || $[12] !== t1 || $[13] !== weight) {
|
|
51
47
|
t2 = /*#__PURE__*/jsx(Component, {
|
|
52
48
|
className: t1,
|
|
53
49
|
"data-size": size,
|
|
54
50
|
"data-weight": weight,
|
|
55
51
|
...rest,
|
|
56
|
-
ref:
|
|
52
|
+
ref: ref
|
|
57
53
|
});
|
|
58
54
|
$[8] = Component;
|
|
59
|
-
$[9] =
|
|
60
|
-
$[10] =
|
|
61
|
-
$[11] =
|
|
62
|
-
$[12] =
|
|
63
|
-
$[13] =
|
|
55
|
+
$[9] = ref;
|
|
56
|
+
$[10] = rest;
|
|
57
|
+
$[11] = size;
|
|
58
|
+
$[12] = t1;
|
|
59
|
+
$[13] = weight;
|
|
60
|
+
$[14] = t2;
|
|
64
61
|
} else {
|
|
65
|
-
t2 = $[
|
|
62
|
+
t2 = $[14];
|
|
66
63
|
}
|
|
67
64
|
return t2;
|
|
68
65
|
}
|