@doist/reactist 33.2.0 → 33.2.2
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 +12 -0
- package/dist/reactist.cjs.development.js +364 -142
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/tabs/tabs.js +354 -125
- package/es/tabs/tabs.js.map +1 -1
- package/es/tooltip/tooltip.js +1 -12
- package/es/tooltip/tooltip.js.map +1 -1
- package/es/utils/common-helpers.js +11 -6
- package/es/utils/common-helpers.js.map +1 -1
- package/lib/tabs/tabs.js +353 -124
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tooltip/tooltip.js +1 -12
- package/lib/tooltip/tooltip.js.map +1 -1
- package/lib/utils/common-helpers.js +11 -6
- package/lib/utils/common-helpers.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [33.2.2](https://github.com/Doist/reactist/compare/v33.2.1...v33.2.2) (2026-06-19)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **tooltip:** Let ariakit merge the child ref to avoid React ref warning ([#1079](https://github.com/Doist/reactist/issues/1079)) ([bd2db2d](https://github.com/Doist/reactist/commit/bd2db2d828f2c2700964b3d44e6e33a0e9b66819))
|
|
6
|
+
|
|
7
|
+
## [33.2.1](https://github.com/Doist/reactist/compare/v33.2.0...v33.2.1) (2026-06-19)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- avoid ref access in useId ([#1078](https://github.com/Doist/reactist/issues/1078)) ([4d44edf](https://github.com/Doist/reactist/commit/4d44edfb09f436f37e81d28d7876a65a9e439ac0))
|
|
12
|
+
|
|
1
13
|
## [33.2.0](https://github.com/Doist/reactist/compare/v33.1.0...v33.2.0) (2026-06-19)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -666,19 +666,9 @@ const Tooltip = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
666
666
|
if (!child) {
|
|
667
667
|
return child;
|
|
668
668
|
}
|
|
669
|
-
|
|
670
|
-
/* eslint-disable react-hooks/refs */
|
|
671
|
-
const rawRef = 'ref' in child.props ? child.props.ref :
|
|
672
|
-
// child.ref access kept for React 18 compatibility
|
|
673
|
-
child.ref;
|
|
674
|
-
if (typeof rawRef === 'string') {
|
|
675
|
-
throw new Error('Tooltip: String refs cannot be used as they cannot be forwarded');
|
|
676
|
-
}
|
|
677
|
-
const childRef = rawRef;
|
|
678
669
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(react.TooltipAnchor, {
|
|
679
670
|
render: child,
|
|
680
|
-
store: tooltip
|
|
681
|
-
ref: childRef
|
|
671
|
+
store: tooltip
|
|
682
672
|
}), isOpen && content ? /*#__PURE__*/React__namespace.createElement(react.Tooltip, {
|
|
683
673
|
store: tooltip,
|
|
684
674
|
gutter: gapSize,
|
|
@@ -694,7 +684,6 @@ const Tooltip = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
694
684
|
textAlign: "center"
|
|
695
685
|
})
|
|
696
686
|
}, withArrow ? /*#__PURE__*/React__namespace.createElement(react.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
|
|
697
|
-
/* eslint-enable react-hooks/refs */
|
|
698
687
|
});
|
|
699
688
|
Tooltip.displayName = 'Tooltip';
|
|
700
689
|
|
|
@@ -1338,13 +1327,17 @@ function generateElementId(prefix) {
|
|
|
1338
1327
|
* @deprecated Use `useId` available from React 18 or above instead.
|
|
1339
1328
|
*/
|
|
1340
1329
|
function useId(providedId) {
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1330
|
+
const $ = reactCompilerRuntime.c(2);
|
|
1331
|
+
let t0;
|
|
1332
|
+
if ($[0] !== providedId) {
|
|
1333
|
+
t0 = () => providedId || generateElementId("element");
|
|
1334
|
+
$[0] = providedId;
|
|
1335
|
+
$[1] = t0;
|
|
1336
|
+
} else {
|
|
1337
|
+
t0 = $[1];
|
|
1345
1338
|
}
|
|
1346
|
-
|
|
1347
|
-
return
|
|
1339
|
+
const [id] = React__namespace.useState(t0);
|
|
1340
|
+
return id;
|
|
1348
1341
|
}
|
|
1349
1342
|
|
|
1350
1343
|
var modules_afa80466 = {"banner":"a9238c10","image":"_74fb1d6c","title":"_7d720b64","description":"e20c1413","secondary":"a4ec529c","typeIcon":"f7f9b63d","iconCopy":"_22bc210c","closeButton":"_97060900","copy":"_32c8bd8c","inlineLink":"_0569f1dd","actions":"_154f8e60","topContent":"f76860a9","content":"cb9aeb0c"};
|
|
@@ -6049,27 +6042,60 @@ const TabsContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
|
6049
6042
|
/**
|
|
6050
6043
|
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
6051
6044
|
*/
|
|
6052
|
-
function Tabs({
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
variant = 'neutral',
|
|
6057
|
-
onSelectedIdChange
|
|
6058
|
-
}) {
|
|
6059
|
-
const tabStore = react.useTabStore({
|
|
6060
|
-
defaultSelectedId,
|
|
6045
|
+
function Tabs(t0) {
|
|
6046
|
+
const $ = reactCompilerRuntime.c(11);
|
|
6047
|
+
const {
|
|
6048
|
+
children,
|
|
6061
6049
|
selectedId,
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6050
|
+
defaultSelectedId,
|
|
6051
|
+
variant: t1,
|
|
6052
|
+
onSelectedIdChange
|
|
6053
|
+
} = t0;
|
|
6054
|
+
const variant = t1 === undefined ? "neutral" : t1;
|
|
6055
|
+
let t2;
|
|
6056
|
+
if ($[0] !== defaultSelectedId || $[1] !== onSelectedIdChange || $[2] !== selectedId) {
|
|
6057
|
+
t2 = {
|
|
6058
|
+
defaultSelectedId,
|
|
6059
|
+
selectedId,
|
|
6060
|
+
setSelectedId: onSelectedIdChange
|
|
6061
|
+
};
|
|
6062
|
+
$[0] = defaultSelectedId;
|
|
6063
|
+
$[1] = onSelectedIdChange;
|
|
6064
|
+
$[2] = selectedId;
|
|
6065
|
+
$[3] = t2;
|
|
6066
|
+
} else {
|
|
6067
|
+
t2 = $[3];
|
|
6068
|
+
}
|
|
6069
|
+
const tabStore = react.useTabStore(t2);
|
|
6070
|
+
const actualSelectedId = react.useStoreState(tabStore, "selectedId");
|
|
6071
|
+
const t3 = selectedId ?? actualSelectedId ?? null;
|
|
6072
|
+
let t4;
|
|
6073
|
+
if ($[4] !== t3 || $[5] !== tabStore || $[6] !== variant) {
|
|
6074
|
+
t4 = {
|
|
6075
|
+
tabStore,
|
|
6076
|
+
variant,
|
|
6077
|
+
selectedId: t3
|
|
6078
|
+
};
|
|
6079
|
+
$[4] = t3;
|
|
6080
|
+
$[5] = tabStore;
|
|
6081
|
+
$[6] = variant;
|
|
6082
|
+
$[7] = t4;
|
|
6083
|
+
} else {
|
|
6084
|
+
t4 = $[7];
|
|
6085
|
+
}
|
|
6086
|
+
const memoizedTabState = t4;
|
|
6087
|
+
let t5;
|
|
6088
|
+
if ($[8] !== children || $[9] !== memoizedTabState) {
|
|
6089
|
+
t5 = /*#__PURE__*/React__namespace.createElement(TabsContext.Provider, {
|
|
6090
|
+
value: memoizedTabState
|
|
6091
|
+
}, children);
|
|
6092
|
+
$[8] = children;
|
|
6093
|
+
$[9] = memoizedTabState;
|
|
6094
|
+
$[10] = t5;
|
|
6095
|
+
} else {
|
|
6096
|
+
t5 = $[10];
|
|
6097
|
+
}
|
|
6098
|
+
return t5;
|
|
6073
6099
|
}
|
|
6074
6100
|
/**
|
|
6075
6101
|
* Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
|
|
@@ -6131,64 +6157,133 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab(t0, ref) {
|
|
|
6131
6157
|
/**
|
|
6132
6158
|
* A component used to group `<Tab>` elements together.
|
|
6133
6159
|
*/
|
|
6134
|
-
function TabList({
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6160
|
+
function TabList(t0) {
|
|
6161
|
+
const $ = reactCompilerRuntime.c(44);
|
|
6162
|
+
let children;
|
|
6163
|
+
let exceptionallySetClassName;
|
|
6164
|
+
let props;
|
|
6165
|
+
let space;
|
|
6166
|
+
let t1;
|
|
6167
|
+
let t2;
|
|
6168
|
+
if ($[0] !== t0) {
|
|
6169
|
+
({
|
|
6170
|
+
children,
|
|
6171
|
+
space,
|
|
6172
|
+
width: t1,
|
|
6173
|
+
align: t2,
|
|
6174
|
+
exceptionallySetClassName,
|
|
6175
|
+
...props
|
|
6176
|
+
} = t0);
|
|
6177
|
+
$[0] = t0;
|
|
6178
|
+
$[1] = children;
|
|
6179
|
+
$[2] = exceptionallySetClassName;
|
|
6180
|
+
$[3] = props;
|
|
6181
|
+
$[4] = space;
|
|
6182
|
+
$[5] = t1;
|
|
6183
|
+
$[6] = t2;
|
|
6184
|
+
} else {
|
|
6185
|
+
children = $[1];
|
|
6186
|
+
exceptionallySetClassName = $[2];
|
|
6187
|
+
props = $[3];
|
|
6188
|
+
space = $[4];
|
|
6189
|
+
t1 = $[5];
|
|
6190
|
+
t2 = $[6];
|
|
6191
|
+
}
|
|
6192
|
+
const width = t1 === undefined ? "maxContent" : t1;
|
|
6193
|
+
const align = t2 === undefined ? "start" : t2;
|
|
6142
6194
|
const tabListRef = React__namespace.useRef(null);
|
|
6143
6195
|
const tabListPrevWidthRef = React__namespace.useRef(0);
|
|
6144
6196
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6145
6197
|
const [selectedTabElement, setSelectedTabElement] = React__namespace.useState(null);
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
let animationFrameId = null;
|
|
6169
|
-
const tabListObserver = new ResizeObserver(([entry]) => {
|
|
6170
|
-
const width_0 = entry?.contentRect.width;
|
|
6171
|
-
if (width_0 && tabListPrevWidthRef.current !== width_0) {
|
|
6172
|
-
tabListPrevWidthRef.current = width_0;
|
|
6173
|
-
if (animationFrameId !== null) {
|
|
6174
|
-
cancelAnimationFrame(animationFrameId);
|
|
6175
|
-
}
|
|
6176
|
-
animationFrameId = requestAnimationFrame(() => {
|
|
6177
|
-
updateSelectedTabPosition();
|
|
6178
|
-
animationFrameId = null;
|
|
6198
|
+
let t3;
|
|
6199
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6200
|
+
t3 = {};
|
|
6201
|
+
$[7] = t3;
|
|
6202
|
+
} else {
|
|
6203
|
+
t3 = $[7];
|
|
6204
|
+
}
|
|
6205
|
+
const [selectedTabStyle, setSelectedTabStyle] = React__namespace.useState(t3);
|
|
6206
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6207
|
+
let t4;
|
|
6208
|
+
if ($[8] !== selectedId) {
|
|
6209
|
+
t4 = function updateSelectedTabPositionCallback() {
|
|
6210
|
+
if (!selectedId || !tabListRef.current) {
|
|
6211
|
+
return;
|
|
6212
|
+
}
|
|
6213
|
+
const tabs = tabListRef.current.querySelectorAll("[role=\"tab\"]");
|
|
6214
|
+
const selectedTab = Array.from(tabs).find(tab => tab.getAttribute("id") === selectedId);
|
|
6215
|
+
if (selectedTab) {
|
|
6216
|
+
setSelectedTabElement(selectedTab);
|
|
6217
|
+
setSelectedTabStyle({
|
|
6218
|
+
left: `${selectedTab.offsetLeft}px`,
|
|
6219
|
+
width: `${selectedTab.offsetWidth}px`
|
|
6179
6220
|
});
|
|
6180
6221
|
}
|
|
6181
|
-
}
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6222
|
+
};
|
|
6223
|
+
$[8] = selectedId;
|
|
6224
|
+
$[9] = t4;
|
|
6225
|
+
} else {
|
|
6226
|
+
t4 = $[9];
|
|
6227
|
+
}
|
|
6228
|
+
const updateSelectedTabPosition = t4;
|
|
6229
|
+
let t5;
|
|
6230
|
+
if ($[10] !== updateSelectedTabPosition) {
|
|
6231
|
+
t5 = function updateSelectedTabPositionOnTabChange() {
|
|
6232
|
+
updateSelectedTabPosition();
|
|
6233
|
+
};
|
|
6234
|
+
$[10] = updateSelectedTabPosition;
|
|
6235
|
+
$[11] = t5;
|
|
6236
|
+
} else {
|
|
6237
|
+
t5 = $[11];
|
|
6238
|
+
}
|
|
6239
|
+
let t6;
|
|
6240
|
+
if ($[12] !== selectedId || $[13] !== updateSelectedTabPosition) {
|
|
6241
|
+
t6 = [selectedId, updateSelectedTabPosition];
|
|
6242
|
+
$[12] = selectedId;
|
|
6243
|
+
$[13] = updateSelectedTabPosition;
|
|
6244
|
+
$[14] = t6;
|
|
6245
|
+
} else {
|
|
6246
|
+
t6 = $[14];
|
|
6247
|
+
}
|
|
6248
|
+
React__namespace.useEffect(t5, t6);
|
|
6249
|
+
let t7;
|
|
6250
|
+
let t8;
|
|
6251
|
+
if ($[15] !== updateSelectedTabPosition) {
|
|
6252
|
+
t7 = function observeTabListWidthChange() {
|
|
6253
|
+
let animationFrameId = null;
|
|
6254
|
+
const tabListObserver = new ResizeObserver(t9 => {
|
|
6255
|
+
const [entry] = t9;
|
|
6256
|
+
const width_0 = entry?.contentRect.width;
|
|
6257
|
+
if (width_0 && tabListPrevWidthRef.current !== width_0) {
|
|
6258
|
+
tabListPrevWidthRef.current = width_0;
|
|
6259
|
+
if (animationFrameId !== null) {
|
|
6260
|
+
cancelAnimationFrame(animationFrameId);
|
|
6261
|
+
}
|
|
6262
|
+
animationFrameId = requestAnimationFrame(() => {
|
|
6263
|
+
updateSelectedTabPosition();
|
|
6264
|
+
animationFrameId = null;
|
|
6265
|
+
});
|
|
6266
|
+
}
|
|
6267
|
+
});
|
|
6268
|
+
if (tabListRef.current) {
|
|
6269
|
+
tabListObserver.observe(tabListRef.current);
|
|
6188
6270
|
}
|
|
6189
|
-
|
|
6271
|
+
return function cleanupResizeObserver() {
|
|
6272
|
+
if (animationFrameId) {
|
|
6273
|
+
cancelAnimationFrame(animationFrameId);
|
|
6274
|
+
}
|
|
6275
|
+
tabListObserver.disconnect();
|
|
6276
|
+
};
|
|
6190
6277
|
};
|
|
6191
|
-
|
|
6278
|
+
t8 = [updateSelectedTabPosition];
|
|
6279
|
+
$[15] = updateSelectedTabPosition;
|
|
6280
|
+
$[16] = t7;
|
|
6281
|
+
$[17] = t8;
|
|
6282
|
+
} else {
|
|
6283
|
+
t7 = $[16];
|
|
6284
|
+
t8 = $[17];
|
|
6285
|
+
}
|
|
6286
|
+
React__namespace.useEffect(t7, t8);
|
|
6192
6287
|
if (!tabContextValue) {
|
|
6193
6288
|
return null;
|
|
6194
6289
|
}
|
|
@@ -6196,83 +6291,210 @@ function TabList({
|
|
|
6196
6291
|
tabStore,
|
|
6197
6292
|
variant
|
|
6198
6293
|
} = tabContextValue;
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6294
|
+
let t9;
|
|
6295
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6296
|
+
t9 = {
|
|
6297
|
+
start: "flexStart",
|
|
6298
|
+
end: "flexEnd",
|
|
6299
|
+
center: "center"
|
|
6300
|
+
};
|
|
6301
|
+
$[18] = t9;
|
|
6302
|
+
} else {
|
|
6303
|
+
t9 = $[18];
|
|
6304
|
+
}
|
|
6305
|
+
const justifyContentAlignMap = t9;
|
|
6306
|
+
const t10 = width === "full" ? "center" : justifyContentAlignMap[align];
|
|
6307
|
+
let t11;
|
|
6308
|
+
if ($[19] !== exceptionallySetClassName || $[20] !== width) {
|
|
6309
|
+
t11 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6310
|
+
position: "relative",
|
|
6311
|
+
width: width,
|
|
6312
|
+
className: exceptionallySetClassName
|
|
6313
|
+
});
|
|
6314
|
+
$[19] = exceptionallySetClassName;
|
|
6315
|
+
$[20] = width;
|
|
6316
|
+
$[21] = t11;
|
|
6317
|
+
} else {
|
|
6318
|
+
t11 = $[21];
|
|
6319
|
+
}
|
|
6320
|
+
const t12 = modules_40c67f5b[`track-${variant}`];
|
|
6321
|
+
let t13;
|
|
6322
|
+
if ($[22] !== t12) {
|
|
6323
|
+
t13 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6324
|
+
className: [modules_40c67f5b.track, t12]
|
|
6325
|
+
});
|
|
6326
|
+
$[22] = t12;
|
|
6327
|
+
$[23] = t13;
|
|
6328
|
+
} else {
|
|
6329
|
+
t13 = $[23];
|
|
6330
|
+
}
|
|
6331
|
+
let t14;
|
|
6332
|
+
if ($[24] !== selectedTabElement || $[25] !== selectedTabStyle || $[26] !== variant) {
|
|
6333
|
+
t14 = selectedTabElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6223
6334
|
className: [modules_40c67f5b.selected, modules_40c67f5b[`selected-${variant}`]],
|
|
6224
6335
|
style: selectedTabStyle
|
|
6225
|
-
}) : null
|
|
6336
|
+
}) : null;
|
|
6337
|
+
$[24] = selectedTabElement;
|
|
6338
|
+
$[25] = selectedTabStyle;
|
|
6339
|
+
$[26] = variant;
|
|
6340
|
+
$[27] = t14;
|
|
6341
|
+
} else {
|
|
6342
|
+
t14 = $[27];
|
|
6343
|
+
}
|
|
6344
|
+
const t15 = width === "full" ? modules_40c67f5b.fullTabList : null;
|
|
6345
|
+
let t16;
|
|
6346
|
+
if ($[28] !== t15) {
|
|
6347
|
+
t16 = classNames__default["default"](t15);
|
|
6348
|
+
$[28] = t15;
|
|
6349
|
+
$[29] = t16;
|
|
6350
|
+
} else {
|
|
6351
|
+
t16 = $[29];
|
|
6352
|
+
}
|
|
6353
|
+
let t17;
|
|
6354
|
+
if ($[30] !== children || $[31] !== space || $[32] !== t16) {
|
|
6355
|
+
t17 = /*#__PURE__*/React__namespace.createElement(Inline, {
|
|
6226
6356
|
space: space,
|
|
6227
|
-
exceptionallySetClassName:
|
|
6228
|
-
}, children)
|
|
6229
|
-
|
|
6357
|
+
exceptionallySetClassName: t16
|
|
6358
|
+
}, children);
|
|
6359
|
+
$[30] = children;
|
|
6360
|
+
$[31] = space;
|
|
6361
|
+
$[32] = t16;
|
|
6362
|
+
$[33] = t17;
|
|
6363
|
+
} else {
|
|
6364
|
+
t17 = $[33];
|
|
6365
|
+
}
|
|
6366
|
+
let t18;
|
|
6367
|
+
if ($[34] !== props || $[35] !== t11 || $[36] !== t13 || $[37] !== t14 || $[38] !== t17 || $[39] !== tabStore) {
|
|
6368
|
+
t18 = /*#__PURE__*/React__namespace.createElement(react.TabList, _extends__default["default"]({
|
|
6369
|
+
store: tabStore,
|
|
6370
|
+
render: t11,
|
|
6371
|
+
ref: tabListRef
|
|
6372
|
+
}, props), t13, t14, t17);
|
|
6373
|
+
$[34] = props;
|
|
6374
|
+
$[35] = t11;
|
|
6375
|
+
$[36] = t13;
|
|
6376
|
+
$[37] = t14;
|
|
6377
|
+
$[38] = t17;
|
|
6378
|
+
$[39] = tabStore;
|
|
6379
|
+
$[40] = t18;
|
|
6380
|
+
} else {
|
|
6381
|
+
t18 = $[40];
|
|
6382
|
+
}
|
|
6383
|
+
let t19;
|
|
6384
|
+
if ($[41] !== t10 || $[42] !== t18) {
|
|
6385
|
+
t19 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6386
|
+
display: "flex",
|
|
6387
|
+
justifyContent: t10
|
|
6388
|
+
}, t18);
|
|
6389
|
+
$[41] = t10;
|
|
6390
|
+
$[42] = t18;
|
|
6391
|
+
$[43] = t19;
|
|
6392
|
+
} else {
|
|
6393
|
+
t19 = $[43];
|
|
6394
|
+
}
|
|
6395
|
+
return t19;
|
|
6230
6396
|
}
|
|
6231
6397
|
/**
|
|
6232
6398
|
* Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a
|
|
6233
6399
|
* corresponding `<Tab>` component.
|
|
6234
6400
|
*/
|
|
6235
|
-
const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel({
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6401
|
+
const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(t0, ref) {
|
|
6402
|
+
const $ = reactCompilerRuntime.c(16);
|
|
6403
|
+
let children;
|
|
6404
|
+
let id;
|
|
6405
|
+
let props;
|
|
6406
|
+
let t1;
|
|
6407
|
+
if ($[0] !== t0) {
|
|
6408
|
+
({
|
|
6409
|
+
children,
|
|
6410
|
+
id,
|
|
6411
|
+
renderMode: t1,
|
|
6412
|
+
...props
|
|
6413
|
+
} = t0);
|
|
6414
|
+
$[0] = t0;
|
|
6415
|
+
$[1] = children;
|
|
6416
|
+
$[2] = id;
|
|
6417
|
+
$[3] = props;
|
|
6418
|
+
$[4] = t1;
|
|
6419
|
+
} else {
|
|
6420
|
+
children = $[1];
|
|
6421
|
+
id = $[2];
|
|
6422
|
+
props = $[3];
|
|
6423
|
+
t1 = $[4];
|
|
6424
|
+
}
|
|
6425
|
+
const renderMode = t1 === undefined ? "always" : t1;
|
|
6241
6426
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6242
6427
|
const [tabRendered, setTabRendered] = React__namespace.useState(false);
|
|
6243
|
-
const selectedId = tabContextValue?.tabStore
|
|
6428
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6244
6429
|
const tabIsActive = selectedId === id;
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6430
|
+
let t2;
|
|
6431
|
+
let t3;
|
|
6432
|
+
if ($[5] !== tabIsActive || $[6] !== tabRendered) {
|
|
6433
|
+
t2 = function trackTabRenderedState() {
|
|
6434
|
+
if (!tabRendered && tabIsActive) {
|
|
6435
|
+
setTabRendered(true);
|
|
6436
|
+
}
|
|
6437
|
+
};
|
|
6438
|
+
t3 = [tabRendered, tabIsActive];
|
|
6439
|
+
$[5] = tabIsActive;
|
|
6440
|
+
$[6] = tabRendered;
|
|
6441
|
+
$[7] = t2;
|
|
6442
|
+
$[8] = t3;
|
|
6443
|
+
} else {
|
|
6444
|
+
t2 = $[7];
|
|
6445
|
+
t3 = $[8];
|
|
6446
|
+
}
|
|
6447
|
+
React__namespace.useEffect(t2, t3);
|
|
6251
6448
|
if (!tabContextValue) {
|
|
6252
6449
|
return null;
|
|
6253
6450
|
}
|
|
6254
6451
|
const {
|
|
6255
6452
|
tabStore
|
|
6256
6453
|
} = tabContextValue;
|
|
6257
|
-
const shouldRender = renderMode ===
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6454
|
+
const shouldRender = renderMode === "always" || renderMode === "active" && tabIsActive || renderMode === "lazy" && (tabIsActive || tabRendered);
|
|
6455
|
+
let t4;
|
|
6456
|
+
if ($[9] !== children || $[10] !== id || $[11] !== props || $[12] !== ref || $[13] !== shouldRender || $[14] !== tabStore) {
|
|
6457
|
+
t4 = shouldRender ? /*#__PURE__*/React__namespace.createElement(react.TabPanel, _extends__default["default"]({}, props, {
|
|
6458
|
+
tabId: id,
|
|
6459
|
+
store: tabStore,
|
|
6460
|
+
ref: ref
|
|
6461
|
+
}), children) : null;
|
|
6462
|
+
$[9] = children;
|
|
6463
|
+
$[10] = id;
|
|
6464
|
+
$[11] = props;
|
|
6465
|
+
$[12] = ref;
|
|
6466
|
+
$[13] = shouldRender;
|
|
6467
|
+
$[14] = tabStore;
|
|
6468
|
+
$[15] = t4;
|
|
6469
|
+
} else {
|
|
6470
|
+
t4 = $[15];
|
|
6471
|
+
}
|
|
6472
|
+
return t4;
|
|
6263
6473
|
});
|
|
6264
6474
|
/**
|
|
6265
6475
|
* Allows content to be rendered based on the current tab being selected while outside of the
|
|
6266
6476
|
* TabPanel component. Can be placed freely within the main `<Tabs>` component.
|
|
6267
6477
|
*/
|
|
6268
|
-
function TabAwareSlot({
|
|
6269
|
-
|
|
6270
|
-
|
|
6478
|
+
function TabAwareSlot(t0) {
|
|
6479
|
+
const $ = reactCompilerRuntime.c(4);
|
|
6480
|
+
const {
|
|
6481
|
+
children
|
|
6482
|
+
} = t0;
|
|
6271
6483
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6272
|
-
const selectedId = tabContextValue?.tabStore
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6484
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6485
|
+
let t1;
|
|
6486
|
+
if ($[0] !== children || $[1] !== selectedId || $[2] !== tabContextValue) {
|
|
6487
|
+
t1 = tabContextValue ? children({
|
|
6488
|
+
selectedId
|
|
6489
|
+
}) : null;
|
|
6490
|
+
$[0] = children;
|
|
6491
|
+
$[1] = selectedId;
|
|
6492
|
+
$[2] = tabContextValue;
|
|
6493
|
+
$[3] = t1;
|
|
6494
|
+
} else {
|
|
6495
|
+
t1 = $[3];
|
|
6496
|
+
}
|
|
6497
|
+
return t1;
|
|
6276
6498
|
}
|
|
6277
6499
|
|
|
6278
6500
|
/** @deprecated */
|