@doist/reactist 33.1.0 → 33.2.1
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 +378 -144
- 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/checkbox-field/checkbox-field.js.map +1 -1
- package/es/components/color-picker/deprecated-button/deprecated-button.js +0 -5
- package/es/components/color-picker/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/color-picker/deprecated-dropdown/dropdown.js +5 -4
- package/es/components/color-picker/deprecated-dropdown/dropdown.js.map +1 -1
- package/es/icons/alert-icon.js.map +1 -1
- package/es/icons/banner-icon.js.map +1 -1
- package/es/icons/close-icon.js.map +1 -1
- package/es/icons/password-hidden-icon.js.map +1 -1
- package/es/icons/password-visible-icon.js.map +1 -1
- package/es/select-field/select-field.js.map +1 -1
- package/es/stack/stack.js +3 -1
- package/es/stack/stack.js.map +1 -1
- package/es/tabs/tabs.js +354 -125
- package/es/tabs/tabs.js.map +1 -1
- package/es/text-area/text-area.js.map +1 -1
- package/es/toast/use-toasts.js +1 -1
- package/es/toast/use-toasts.js.map +1 -1
- package/es/tooltip/tooltip.js +6 -2
- 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/es/utils/polymorphism.js.map +1 -1
- package/lib/checkbox-field/checkbox-field.d.ts +1 -0
- package/lib/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/components/color-picker/deprecated-button/deprecated-button.js +0 -5
- package/lib/components/color-picker/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/color-picker/deprecated-dropdown/dropdown.d.ts +5 -3
- package/lib/components/color-picker/deprecated-dropdown/dropdown.js +5 -5
- package/lib/components/color-picker/deprecated-dropdown/dropdown.js.map +1 -1
- package/lib/components/icons/ThreeDotsIcon.svg.d.ts +3 -9
- package/lib/icons/alert-icon.d.ts +2 -2
- package/lib/icons/alert-icon.js.map +1 -1
- package/lib/icons/banner-icon.d.ts +2 -2
- package/lib/icons/banner-icon.js.map +1 -1
- package/lib/icons/close-icon.d.ts +2 -2
- package/lib/icons/close-icon.js.map +1 -1
- package/lib/icons/password-hidden-icon.d.ts +2 -2
- package/lib/icons/password-hidden-icon.js.map +1 -1
- package/lib/icons/password-visible-icon.d.ts +2 -2
- package/lib/icons/password-visible-icon.js.map +1 -1
- package/lib/modal/modal-stories-components.d.ts +10 -9
- package/lib/select-field/select-field.js.map +1 -1
- package/lib/stack/stack.js +3 -1
- package/lib/stack/stack.js.map +1 -1
- package/lib/tabs/tabs.js +353 -124
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/text-area/text-area.js.map +1 -1
- package/lib/toast/use-toasts.js +1 -1
- package/lib/toast/use-toasts.js.map +1 -1
- package/lib/tooltip/tooltip.d.ts +2 -1
- package/lib/tooltip/tooltip.js +6 -2
- 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/lib/utils/polymorphism.d.ts +1 -2
- package/lib/utils/polymorphism.js.map +1 -1
- package/lib/utils/storybook-helper.d.ts +4 -3
- package/package.json +23 -11
- /package/styles/{stack.css → divider.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [33.2.1](https://github.com/Doist/reactist/compare/v33.2.0...v33.2.1) (2026-06-19)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- avoid ref access in useId ([#1078](https://github.com/Doist/reactist/issues/1078)) ([4d44edf](https://github.com/Doist/reactist/commit/4d44edfb09f436f37e81d28d7876a65a9e439ac0))
|
|
6
|
+
|
|
7
|
+
## [33.2.0](https://github.com/Doist/reactist/compare/v33.1.0...v33.2.0) (2026-06-19)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- support React 19 ([#1074](https://github.com/Doist/reactist/issues/1074)) ([0637971](https://github.com/Doist/reactist/commit/06379714f9410ce1cc75e80c1f8e6d0a39a621c9))
|
|
12
|
+
|
|
1
13
|
## [33.1.0](https://github.com/Doist/reactist/compare/v33.0.1...v33.1.0) (2026-06-11)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -6,7 +6,6 @@ var reactCompilerRuntime = require('react-compiler-runtime');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var classNames = require('classnames');
|
|
8
8
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
9
|
-
var ReactDOM = require('react-dom');
|
|
10
9
|
var react = require('@ariakit/react');
|
|
11
10
|
var dayjs = require('dayjs');
|
|
12
11
|
var LocalizedFormat = require('dayjs/plugin/localizedFormat');
|
|
@@ -39,7 +38,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
39
38
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
39
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
41
40
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
42
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
43
41
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
44
42
|
var LocalizedFormat__default = /*#__PURE__*/_interopDefaultLegacy(LocalizedFormat);
|
|
45
43
|
var flattenChildren__default = /*#__PURE__*/_interopDefaultLegacy(flattenChildren);
|
|
@@ -551,7 +549,9 @@ const Stack = polymorphicComponent(function Stack({
|
|
|
551
549
|
as: as,
|
|
552
550
|
className: exceptionallySetClassName,
|
|
553
551
|
ref: ref
|
|
554
|
-
}), dividers !== 'none' ? React__namespace.Children.map(
|
|
552
|
+
}), dividers !== 'none' ? React__namespace.Children.map(
|
|
553
|
+
// react-keyed-flatten-children returns ReactChild[], a type removed in React 19.
|
|
554
|
+
flattenChildren__default["default"](children), (child, index) => index > 0 ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Divider, {
|
|
555
555
|
weight: dividers
|
|
556
556
|
}), child) : child) : children);
|
|
557
557
|
});
|
|
@@ -668,13 +668,17 @@ const Tooltip = /*#__PURE__*/React__namespace.forwardRef(({
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
/* eslint-disable react-hooks/refs */
|
|
671
|
-
|
|
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') {
|
|
672
675
|
throw new Error('Tooltip: String refs cannot be used as they cannot be forwarded');
|
|
673
676
|
}
|
|
677
|
+
const childRef = rawRef;
|
|
674
678
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(react.TooltipAnchor, {
|
|
675
679
|
render: child,
|
|
676
680
|
store: tooltip,
|
|
677
|
-
ref:
|
|
681
|
+
ref: childRef
|
|
678
682
|
}), isOpen && content ? /*#__PURE__*/React__namespace.createElement(react.Tooltip, {
|
|
679
683
|
store: tooltip,
|
|
680
684
|
gutter: gapSize,
|
|
@@ -1334,13 +1338,17 @@ function generateElementId(prefix) {
|
|
|
1334
1338
|
* @deprecated Use `useId` available from React 18 or above instead.
|
|
1335
1339
|
*/
|
|
1336
1340
|
function useId(providedId) {
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1341
|
+
const $ = reactCompilerRuntime.c(2);
|
|
1342
|
+
let t0;
|
|
1343
|
+
if ($[0] !== providedId) {
|
|
1344
|
+
t0 = () => providedId || generateElementId("element");
|
|
1345
|
+
$[0] = providedId;
|
|
1346
|
+
$[1] = t0;
|
|
1347
|
+
} else {
|
|
1348
|
+
t0 = $[1];
|
|
1341
1349
|
}
|
|
1342
|
-
|
|
1343
|
-
return
|
|
1350
|
+
const [id] = React__namespace.useState(t0);
|
|
1351
|
+
return id;
|
|
1344
1352
|
}
|
|
1345
1353
|
|
|
1346
1354
|
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"};
|
|
@@ -2410,7 +2418,7 @@ const InternalToast = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
2410
2418
|
onRemoveToast
|
|
2411
2419
|
} = t0;
|
|
2412
2420
|
const showDismissButton = t1 === undefined ? true : t1;
|
|
2413
|
-
const timeoutRef = React__default["default"].useRef();
|
|
2421
|
+
const timeoutRef = React__default["default"].useRef(undefined);
|
|
2414
2422
|
let t2;
|
|
2415
2423
|
if ($[0] !== onDismiss || $[1] !== onRemoveToast || $[2] !== toastId) {
|
|
2416
2424
|
t2 = function removeToast() {
|
|
@@ -6045,27 +6053,60 @@ const TabsContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
|
6045
6053
|
/**
|
|
6046
6054
|
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
6047
6055
|
*/
|
|
6048
|
-
function Tabs({
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
variant = 'neutral',
|
|
6053
|
-
onSelectedIdChange
|
|
6054
|
-
}) {
|
|
6055
|
-
const tabStore = react.useTabStore({
|
|
6056
|
-
defaultSelectedId,
|
|
6056
|
+
function Tabs(t0) {
|
|
6057
|
+
const $ = reactCompilerRuntime.c(11);
|
|
6058
|
+
const {
|
|
6059
|
+
children,
|
|
6057
6060
|
selectedId,
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6061
|
+
defaultSelectedId,
|
|
6062
|
+
variant: t1,
|
|
6063
|
+
onSelectedIdChange
|
|
6064
|
+
} = t0;
|
|
6065
|
+
const variant = t1 === undefined ? "neutral" : t1;
|
|
6066
|
+
let t2;
|
|
6067
|
+
if ($[0] !== defaultSelectedId || $[1] !== onSelectedIdChange || $[2] !== selectedId) {
|
|
6068
|
+
t2 = {
|
|
6069
|
+
defaultSelectedId,
|
|
6070
|
+
selectedId,
|
|
6071
|
+
setSelectedId: onSelectedIdChange
|
|
6072
|
+
};
|
|
6073
|
+
$[0] = defaultSelectedId;
|
|
6074
|
+
$[1] = onSelectedIdChange;
|
|
6075
|
+
$[2] = selectedId;
|
|
6076
|
+
$[3] = t2;
|
|
6077
|
+
} else {
|
|
6078
|
+
t2 = $[3];
|
|
6079
|
+
}
|
|
6080
|
+
const tabStore = react.useTabStore(t2);
|
|
6081
|
+
const actualSelectedId = react.useStoreState(tabStore, "selectedId");
|
|
6082
|
+
const t3 = selectedId ?? actualSelectedId ?? null;
|
|
6083
|
+
let t4;
|
|
6084
|
+
if ($[4] !== t3 || $[5] !== tabStore || $[6] !== variant) {
|
|
6085
|
+
t4 = {
|
|
6086
|
+
tabStore,
|
|
6087
|
+
variant,
|
|
6088
|
+
selectedId: t3
|
|
6089
|
+
};
|
|
6090
|
+
$[4] = t3;
|
|
6091
|
+
$[5] = tabStore;
|
|
6092
|
+
$[6] = variant;
|
|
6093
|
+
$[7] = t4;
|
|
6094
|
+
} else {
|
|
6095
|
+
t4 = $[7];
|
|
6096
|
+
}
|
|
6097
|
+
const memoizedTabState = t4;
|
|
6098
|
+
let t5;
|
|
6099
|
+
if ($[8] !== children || $[9] !== memoizedTabState) {
|
|
6100
|
+
t5 = /*#__PURE__*/React__namespace.createElement(TabsContext.Provider, {
|
|
6101
|
+
value: memoizedTabState
|
|
6102
|
+
}, children);
|
|
6103
|
+
$[8] = children;
|
|
6104
|
+
$[9] = memoizedTabState;
|
|
6105
|
+
$[10] = t5;
|
|
6106
|
+
} else {
|
|
6107
|
+
t5 = $[10];
|
|
6108
|
+
}
|
|
6109
|
+
return t5;
|
|
6069
6110
|
}
|
|
6070
6111
|
/**
|
|
6071
6112
|
* Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
|
|
@@ -6127,64 +6168,133 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab(t0, ref) {
|
|
|
6127
6168
|
/**
|
|
6128
6169
|
* A component used to group `<Tab>` elements together.
|
|
6129
6170
|
*/
|
|
6130
|
-
function TabList({
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6171
|
+
function TabList(t0) {
|
|
6172
|
+
const $ = reactCompilerRuntime.c(44);
|
|
6173
|
+
let children;
|
|
6174
|
+
let exceptionallySetClassName;
|
|
6175
|
+
let props;
|
|
6176
|
+
let space;
|
|
6177
|
+
let t1;
|
|
6178
|
+
let t2;
|
|
6179
|
+
if ($[0] !== t0) {
|
|
6180
|
+
({
|
|
6181
|
+
children,
|
|
6182
|
+
space,
|
|
6183
|
+
width: t1,
|
|
6184
|
+
align: t2,
|
|
6185
|
+
exceptionallySetClassName,
|
|
6186
|
+
...props
|
|
6187
|
+
} = t0);
|
|
6188
|
+
$[0] = t0;
|
|
6189
|
+
$[1] = children;
|
|
6190
|
+
$[2] = exceptionallySetClassName;
|
|
6191
|
+
$[3] = props;
|
|
6192
|
+
$[4] = space;
|
|
6193
|
+
$[5] = t1;
|
|
6194
|
+
$[6] = t2;
|
|
6195
|
+
} else {
|
|
6196
|
+
children = $[1];
|
|
6197
|
+
exceptionallySetClassName = $[2];
|
|
6198
|
+
props = $[3];
|
|
6199
|
+
space = $[4];
|
|
6200
|
+
t1 = $[5];
|
|
6201
|
+
t2 = $[6];
|
|
6202
|
+
}
|
|
6203
|
+
const width = t1 === undefined ? "maxContent" : t1;
|
|
6204
|
+
const align = t2 === undefined ? "start" : t2;
|
|
6138
6205
|
const tabListRef = React__namespace.useRef(null);
|
|
6139
6206
|
const tabListPrevWidthRef = React__namespace.useRef(0);
|
|
6140
6207
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6141
6208
|
const [selectedTabElement, setSelectedTabElement] = React__namespace.useState(null);
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
let animationFrameId = null;
|
|
6165
|
-
const tabListObserver = new ResizeObserver(([entry]) => {
|
|
6166
|
-
const width_0 = entry?.contentRect.width;
|
|
6167
|
-
if (width_0 && tabListPrevWidthRef.current !== width_0) {
|
|
6168
|
-
tabListPrevWidthRef.current = width_0;
|
|
6169
|
-
if (animationFrameId !== null) {
|
|
6170
|
-
cancelAnimationFrame(animationFrameId);
|
|
6171
|
-
}
|
|
6172
|
-
animationFrameId = requestAnimationFrame(() => {
|
|
6173
|
-
updateSelectedTabPosition();
|
|
6174
|
-
animationFrameId = null;
|
|
6209
|
+
let t3;
|
|
6210
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6211
|
+
t3 = {};
|
|
6212
|
+
$[7] = t3;
|
|
6213
|
+
} else {
|
|
6214
|
+
t3 = $[7];
|
|
6215
|
+
}
|
|
6216
|
+
const [selectedTabStyle, setSelectedTabStyle] = React__namespace.useState(t3);
|
|
6217
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6218
|
+
let t4;
|
|
6219
|
+
if ($[8] !== selectedId) {
|
|
6220
|
+
t4 = function updateSelectedTabPositionCallback() {
|
|
6221
|
+
if (!selectedId || !tabListRef.current) {
|
|
6222
|
+
return;
|
|
6223
|
+
}
|
|
6224
|
+
const tabs = tabListRef.current.querySelectorAll("[role=\"tab\"]");
|
|
6225
|
+
const selectedTab = Array.from(tabs).find(tab => tab.getAttribute("id") === selectedId);
|
|
6226
|
+
if (selectedTab) {
|
|
6227
|
+
setSelectedTabElement(selectedTab);
|
|
6228
|
+
setSelectedTabStyle({
|
|
6229
|
+
left: `${selectedTab.offsetLeft}px`,
|
|
6230
|
+
width: `${selectedTab.offsetWidth}px`
|
|
6175
6231
|
});
|
|
6176
6232
|
}
|
|
6177
|
-
}
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6233
|
+
};
|
|
6234
|
+
$[8] = selectedId;
|
|
6235
|
+
$[9] = t4;
|
|
6236
|
+
} else {
|
|
6237
|
+
t4 = $[9];
|
|
6238
|
+
}
|
|
6239
|
+
const updateSelectedTabPosition = t4;
|
|
6240
|
+
let t5;
|
|
6241
|
+
if ($[10] !== updateSelectedTabPosition) {
|
|
6242
|
+
t5 = function updateSelectedTabPositionOnTabChange() {
|
|
6243
|
+
updateSelectedTabPosition();
|
|
6244
|
+
};
|
|
6245
|
+
$[10] = updateSelectedTabPosition;
|
|
6246
|
+
$[11] = t5;
|
|
6247
|
+
} else {
|
|
6248
|
+
t5 = $[11];
|
|
6249
|
+
}
|
|
6250
|
+
let t6;
|
|
6251
|
+
if ($[12] !== selectedId || $[13] !== updateSelectedTabPosition) {
|
|
6252
|
+
t6 = [selectedId, updateSelectedTabPosition];
|
|
6253
|
+
$[12] = selectedId;
|
|
6254
|
+
$[13] = updateSelectedTabPosition;
|
|
6255
|
+
$[14] = t6;
|
|
6256
|
+
} else {
|
|
6257
|
+
t6 = $[14];
|
|
6258
|
+
}
|
|
6259
|
+
React__namespace.useEffect(t5, t6);
|
|
6260
|
+
let t7;
|
|
6261
|
+
let t8;
|
|
6262
|
+
if ($[15] !== updateSelectedTabPosition) {
|
|
6263
|
+
t7 = function observeTabListWidthChange() {
|
|
6264
|
+
let animationFrameId = null;
|
|
6265
|
+
const tabListObserver = new ResizeObserver(t9 => {
|
|
6266
|
+
const [entry] = t9;
|
|
6267
|
+
const width_0 = entry?.contentRect.width;
|
|
6268
|
+
if (width_0 && tabListPrevWidthRef.current !== width_0) {
|
|
6269
|
+
tabListPrevWidthRef.current = width_0;
|
|
6270
|
+
if (animationFrameId !== null) {
|
|
6271
|
+
cancelAnimationFrame(animationFrameId);
|
|
6272
|
+
}
|
|
6273
|
+
animationFrameId = requestAnimationFrame(() => {
|
|
6274
|
+
updateSelectedTabPosition();
|
|
6275
|
+
animationFrameId = null;
|
|
6276
|
+
});
|
|
6277
|
+
}
|
|
6278
|
+
});
|
|
6279
|
+
if (tabListRef.current) {
|
|
6280
|
+
tabListObserver.observe(tabListRef.current);
|
|
6184
6281
|
}
|
|
6185
|
-
|
|
6282
|
+
return function cleanupResizeObserver() {
|
|
6283
|
+
if (animationFrameId) {
|
|
6284
|
+
cancelAnimationFrame(animationFrameId);
|
|
6285
|
+
}
|
|
6286
|
+
tabListObserver.disconnect();
|
|
6287
|
+
};
|
|
6186
6288
|
};
|
|
6187
|
-
|
|
6289
|
+
t8 = [updateSelectedTabPosition];
|
|
6290
|
+
$[15] = updateSelectedTabPosition;
|
|
6291
|
+
$[16] = t7;
|
|
6292
|
+
$[17] = t8;
|
|
6293
|
+
} else {
|
|
6294
|
+
t7 = $[16];
|
|
6295
|
+
t8 = $[17];
|
|
6296
|
+
}
|
|
6297
|
+
React__namespace.useEffect(t7, t8);
|
|
6188
6298
|
if (!tabContextValue) {
|
|
6189
6299
|
return null;
|
|
6190
6300
|
}
|
|
@@ -6192,83 +6302,210 @@ function TabList({
|
|
|
6192
6302
|
tabStore,
|
|
6193
6303
|
variant
|
|
6194
6304
|
} = tabContextValue;
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6305
|
+
let t9;
|
|
6306
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6307
|
+
t9 = {
|
|
6308
|
+
start: "flexStart",
|
|
6309
|
+
end: "flexEnd",
|
|
6310
|
+
center: "center"
|
|
6311
|
+
};
|
|
6312
|
+
$[18] = t9;
|
|
6313
|
+
} else {
|
|
6314
|
+
t9 = $[18];
|
|
6315
|
+
}
|
|
6316
|
+
const justifyContentAlignMap = t9;
|
|
6317
|
+
const t10 = width === "full" ? "center" : justifyContentAlignMap[align];
|
|
6318
|
+
let t11;
|
|
6319
|
+
if ($[19] !== exceptionallySetClassName || $[20] !== width) {
|
|
6320
|
+
t11 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6321
|
+
position: "relative",
|
|
6322
|
+
width: width,
|
|
6323
|
+
className: exceptionallySetClassName
|
|
6324
|
+
});
|
|
6325
|
+
$[19] = exceptionallySetClassName;
|
|
6326
|
+
$[20] = width;
|
|
6327
|
+
$[21] = t11;
|
|
6328
|
+
} else {
|
|
6329
|
+
t11 = $[21];
|
|
6330
|
+
}
|
|
6331
|
+
const t12 = modules_40c67f5b[`track-${variant}`];
|
|
6332
|
+
let t13;
|
|
6333
|
+
if ($[22] !== t12) {
|
|
6334
|
+
t13 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6335
|
+
className: [modules_40c67f5b.track, t12]
|
|
6336
|
+
});
|
|
6337
|
+
$[22] = t12;
|
|
6338
|
+
$[23] = t13;
|
|
6339
|
+
} else {
|
|
6340
|
+
t13 = $[23];
|
|
6341
|
+
}
|
|
6342
|
+
let t14;
|
|
6343
|
+
if ($[24] !== selectedTabElement || $[25] !== selectedTabStyle || $[26] !== variant) {
|
|
6344
|
+
t14 = selectedTabElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6219
6345
|
className: [modules_40c67f5b.selected, modules_40c67f5b[`selected-${variant}`]],
|
|
6220
6346
|
style: selectedTabStyle
|
|
6221
|
-
}) : null
|
|
6347
|
+
}) : null;
|
|
6348
|
+
$[24] = selectedTabElement;
|
|
6349
|
+
$[25] = selectedTabStyle;
|
|
6350
|
+
$[26] = variant;
|
|
6351
|
+
$[27] = t14;
|
|
6352
|
+
} else {
|
|
6353
|
+
t14 = $[27];
|
|
6354
|
+
}
|
|
6355
|
+
const t15 = width === "full" ? modules_40c67f5b.fullTabList : null;
|
|
6356
|
+
let t16;
|
|
6357
|
+
if ($[28] !== t15) {
|
|
6358
|
+
t16 = classNames__default["default"](t15);
|
|
6359
|
+
$[28] = t15;
|
|
6360
|
+
$[29] = t16;
|
|
6361
|
+
} else {
|
|
6362
|
+
t16 = $[29];
|
|
6363
|
+
}
|
|
6364
|
+
let t17;
|
|
6365
|
+
if ($[30] !== children || $[31] !== space || $[32] !== t16) {
|
|
6366
|
+
t17 = /*#__PURE__*/React__namespace.createElement(Inline, {
|
|
6222
6367
|
space: space,
|
|
6223
|
-
exceptionallySetClassName:
|
|
6224
|
-
}, children)
|
|
6225
|
-
|
|
6368
|
+
exceptionallySetClassName: t16
|
|
6369
|
+
}, children);
|
|
6370
|
+
$[30] = children;
|
|
6371
|
+
$[31] = space;
|
|
6372
|
+
$[32] = t16;
|
|
6373
|
+
$[33] = t17;
|
|
6374
|
+
} else {
|
|
6375
|
+
t17 = $[33];
|
|
6376
|
+
}
|
|
6377
|
+
let t18;
|
|
6378
|
+
if ($[34] !== props || $[35] !== t11 || $[36] !== t13 || $[37] !== t14 || $[38] !== t17 || $[39] !== tabStore) {
|
|
6379
|
+
t18 = /*#__PURE__*/React__namespace.createElement(react.TabList, _extends__default["default"]({
|
|
6380
|
+
store: tabStore,
|
|
6381
|
+
render: t11,
|
|
6382
|
+
ref: tabListRef
|
|
6383
|
+
}, props), t13, t14, t17);
|
|
6384
|
+
$[34] = props;
|
|
6385
|
+
$[35] = t11;
|
|
6386
|
+
$[36] = t13;
|
|
6387
|
+
$[37] = t14;
|
|
6388
|
+
$[38] = t17;
|
|
6389
|
+
$[39] = tabStore;
|
|
6390
|
+
$[40] = t18;
|
|
6391
|
+
} else {
|
|
6392
|
+
t18 = $[40];
|
|
6393
|
+
}
|
|
6394
|
+
let t19;
|
|
6395
|
+
if ($[41] !== t10 || $[42] !== t18) {
|
|
6396
|
+
t19 = /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
6397
|
+
display: "flex",
|
|
6398
|
+
justifyContent: t10
|
|
6399
|
+
}, t18);
|
|
6400
|
+
$[41] = t10;
|
|
6401
|
+
$[42] = t18;
|
|
6402
|
+
$[43] = t19;
|
|
6403
|
+
} else {
|
|
6404
|
+
t19 = $[43];
|
|
6405
|
+
}
|
|
6406
|
+
return t19;
|
|
6226
6407
|
}
|
|
6227
6408
|
/**
|
|
6228
6409
|
* Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a
|
|
6229
6410
|
* corresponding `<Tab>` component.
|
|
6230
6411
|
*/
|
|
6231
|
-
const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel({
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6412
|
+
const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(t0, ref) {
|
|
6413
|
+
const $ = reactCompilerRuntime.c(16);
|
|
6414
|
+
let children;
|
|
6415
|
+
let id;
|
|
6416
|
+
let props;
|
|
6417
|
+
let t1;
|
|
6418
|
+
if ($[0] !== t0) {
|
|
6419
|
+
({
|
|
6420
|
+
children,
|
|
6421
|
+
id,
|
|
6422
|
+
renderMode: t1,
|
|
6423
|
+
...props
|
|
6424
|
+
} = t0);
|
|
6425
|
+
$[0] = t0;
|
|
6426
|
+
$[1] = children;
|
|
6427
|
+
$[2] = id;
|
|
6428
|
+
$[3] = props;
|
|
6429
|
+
$[4] = t1;
|
|
6430
|
+
} else {
|
|
6431
|
+
children = $[1];
|
|
6432
|
+
id = $[2];
|
|
6433
|
+
props = $[3];
|
|
6434
|
+
t1 = $[4];
|
|
6435
|
+
}
|
|
6436
|
+
const renderMode = t1 === undefined ? "always" : t1;
|
|
6237
6437
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6238
6438
|
const [tabRendered, setTabRendered] = React__namespace.useState(false);
|
|
6239
|
-
const selectedId = tabContextValue?.tabStore
|
|
6439
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6240
6440
|
const tabIsActive = selectedId === id;
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6441
|
+
let t2;
|
|
6442
|
+
let t3;
|
|
6443
|
+
if ($[5] !== tabIsActive || $[6] !== tabRendered) {
|
|
6444
|
+
t2 = function trackTabRenderedState() {
|
|
6445
|
+
if (!tabRendered && tabIsActive) {
|
|
6446
|
+
setTabRendered(true);
|
|
6447
|
+
}
|
|
6448
|
+
};
|
|
6449
|
+
t3 = [tabRendered, tabIsActive];
|
|
6450
|
+
$[5] = tabIsActive;
|
|
6451
|
+
$[6] = tabRendered;
|
|
6452
|
+
$[7] = t2;
|
|
6453
|
+
$[8] = t3;
|
|
6454
|
+
} else {
|
|
6455
|
+
t2 = $[7];
|
|
6456
|
+
t3 = $[8];
|
|
6457
|
+
}
|
|
6458
|
+
React__namespace.useEffect(t2, t3);
|
|
6247
6459
|
if (!tabContextValue) {
|
|
6248
6460
|
return null;
|
|
6249
6461
|
}
|
|
6250
6462
|
const {
|
|
6251
6463
|
tabStore
|
|
6252
6464
|
} = tabContextValue;
|
|
6253
|
-
const shouldRender = renderMode ===
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6465
|
+
const shouldRender = renderMode === "always" || renderMode === "active" && tabIsActive || renderMode === "lazy" && (tabIsActive || tabRendered);
|
|
6466
|
+
let t4;
|
|
6467
|
+
if ($[9] !== children || $[10] !== id || $[11] !== props || $[12] !== ref || $[13] !== shouldRender || $[14] !== tabStore) {
|
|
6468
|
+
t4 = shouldRender ? /*#__PURE__*/React__namespace.createElement(react.TabPanel, _extends__default["default"]({}, props, {
|
|
6469
|
+
tabId: id,
|
|
6470
|
+
store: tabStore,
|
|
6471
|
+
ref: ref
|
|
6472
|
+
}), children) : null;
|
|
6473
|
+
$[9] = children;
|
|
6474
|
+
$[10] = id;
|
|
6475
|
+
$[11] = props;
|
|
6476
|
+
$[12] = ref;
|
|
6477
|
+
$[13] = shouldRender;
|
|
6478
|
+
$[14] = tabStore;
|
|
6479
|
+
$[15] = t4;
|
|
6480
|
+
} else {
|
|
6481
|
+
t4 = $[15];
|
|
6482
|
+
}
|
|
6483
|
+
return t4;
|
|
6259
6484
|
});
|
|
6260
6485
|
/**
|
|
6261
6486
|
* Allows content to be rendered based on the current tab being selected while outside of the
|
|
6262
6487
|
* TabPanel component. Can be placed freely within the main `<Tabs>` component.
|
|
6263
6488
|
*/
|
|
6264
|
-
function TabAwareSlot({
|
|
6265
|
-
|
|
6266
|
-
|
|
6489
|
+
function TabAwareSlot(t0) {
|
|
6490
|
+
const $ = reactCompilerRuntime.c(4);
|
|
6491
|
+
const {
|
|
6492
|
+
children
|
|
6493
|
+
} = t0;
|
|
6267
6494
|
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
6268
|
-
const selectedId = tabContextValue?.tabStore
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6495
|
+
const selectedId = react.useStoreState(tabContextValue?.tabStore, "selectedId");
|
|
6496
|
+
let t1;
|
|
6497
|
+
if ($[0] !== children || $[1] !== selectedId || $[2] !== tabContextValue) {
|
|
6498
|
+
t1 = tabContextValue ? children({
|
|
6499
|
+
selectedId
|
|
6500
|
+
}) : null;
|
|
6501
|
+
$[0] = children;
|
|
6502
|
+
$[1] = selectedId;
|
|
6503
|
+
$[2] = tabContextValue;
|
|
6504
|
+
$[3] = t1;
|
|
6505
|
+
} else {
|
|
6506
|
+
t1 = $[3];
|
|
6507
|
+
}
|
|
6508
|
+
return t1;
|
|
6272
6509
|
}
|
|
6273
6510
|
|
|
6274
6511
|
/** @deprecated */
|
|
@@ -6370,15 +6607,11 @@ const Button$1 = /*#__PURE__*/React__namespace.forwardRef(function Button(t0, re
|
|
|
6370
6607
|
return t5;
|
|
6371
6608
|
});
|
|
6372
6609
|
Button$1.displayName = 'Button';
|
|
6373
|
-
Button$1.defaultProps = {
|
|
6374
|
-
size: 'default',
|
|
6375
|
-
loading: false,
|
|
6376
|
-
disabled: false
|
|
6377
|
-
};
|
|
6378
6610
|
|
|
6379
6611
|
var Button = Button$1;
|
|
6380
6612
|
|
|
6381
6613
|
class Box extends React__namespace.Component {
|
|
6614
|
+
rootRef = /*#__PURE__*/React__namespace.createRef();
|
|
6382
6615
|
constructor(props, context) {
|
|
6383
6616
|
super(props, context);
|
|
6384
6617
|
this.state = {
|
|
@@ -6394,7 +6627,7 @@ class Box extends React__namespace.Component {
|
|
|
6394
6627
|
}
|
|
6395
6628
|
}
|
|
6396
6629
|
_handleClickOutside = event => {
|
|
6397
|
-
const dropdownDOMNode =
|
|
6630
|
+
const dropdownDOMNode = this.rootRef.current;
|
|
6398
6631
|
if (dropdownDOMNode && !dropdownDOMNode.contains(event.target)) this._toggleShowBody();else if (!this.props.allowBodyInteractions) {
|
|
6399
6632
|
// won't close when body interactions are allowed
|
|
6400
6633
|
this._timeout = setTimeout(() => {
|
|
@@ -6430,11 +6663,11 @@ class Box extends React__namespace.Component {
|
|
|
6430
6663
|
if (body) {
|
|
6431
6664
|
const scrollingParent = document.getElementById(this.props.scrolling_parent ? this.props.scrolling_parent : '');
|
|
6432
6665
|
if (scrollingParent) {
|
|
6433
|
-
const dropdown =
|
|
6666
|
+
const dropdown = this.rootRef.current;
|
|
6434
6667
|
if (!dropdown) {
|
|
6435
6668
|
return;
|
|
6436
6669
|
}
|
|
6437
|
-
const dropdownVerticalPosition =
|
|
6670
|
+
const dropdownVerticalPosition = dropdown.offsetTop;
|
|
6438
6671
|
const dropdownTrigger = dropdown.querySelector('.trigger');
|
|
6439
6672
|
if (!dropdownTrigger) {
|
|
6440
6673
|
return;
|
|
@@ -6490,6 +6723,7 @@ class Box extends React__namespace.Component {
|
|
|
6490
6723
|
top
|
|
6491
6724
|
} = this.state;
|
|
6492
6725
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
6726
|
+
ref: this.rootRef,
|
|
6493
6727
|
style: {
|
|
6494
6728
|
display: 'inline-block'
|
|
6495
6729
|
},
|