@dreamtree-org/twreact-ui 1.1.52 → 1.1.53
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/dist/components/core/Tabs.d.ts.map +1 -1
- package/dist/index.esm.js +13 -5
- package/dist/index.js +13 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/core/Tabs.jsx"],"names":[],"mappings":"AA6CA;;;;;;;;;;4CA4CC;;;;;;;;AAGD;;;
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/core/Tabs.jsx"],"names":[],"mappings":"AA6CA;;;;;;;;;;4CA4CC;;;;;;;;AAGD;;;4CAuBC;AAGD;;;;;;;;4CAgHC;AAGD;;;4CAcC;AAED;;;;;mDAmCC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -15422,7 +15422,13 @@ function TabList(_ref2) {
|
|
|
15422
15422
|
role: "tablist",
|
|
15423
15423
|
"aria-orientation": orientation,
|
|
15424
15424
|
className: "flex ".concat(orientation === "vertical" ? "flex-col" : "flex-row", " gap-1 ").concat(className),
|
|
15425
|
-
children: children
|
|
15425
|
+
children: React__default.Children.map(children, function (child, i) {
|
|
15426
|
+
var _child$props$index;
|
|
15427
|
+
if (! /*#__PURE__*/React__default.isValidElement(child)) return child;
|
|
15428
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15429
|
+
index: (_child$props$index = child.props.index) !== null && _child$props$index !== void 0 ? _child$props$index : i
|
|
15430
|
+
});
|
|
15431
|
+
})
|
|
15426
15432
|
});
|
|
15427
15433
|
}
|
|
15428
15434
|
/* ------------------------- Tab ------------------------- */
|
|
@@ -15548,11 +15554,11 @@ function Panels(_ref4) {
|
|
|
15548
15554
|
return jsx("div", {
|
|
15549
15555
|
className: "relative w-full ".concat(className),
|
|
15550
15556
|
children: React__default.Children.map(children, function (child, i) {
|
|
15551
|
-
var _child$props$
|
|
15557
|
+
var _child$props$index2;
|
|
15552
15558
|
// inject index if missing
|
|
15553
15559
|
if (! /*#__PURE__*/React__default.isValidElement(child)) return child;
|
|
15554
15560
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15555
|
-
index: (_child$props$
|
|
15561
|
+
index: (_child$props$index2 = child.props.index) !== null && _child$props$index2 !== void 0 ? _child$props$index2 : i,
|
|
15556
15562
|
animated: animated
|
|
15557
15563
|
});
|
|
15558
15564
|
})
|
|
@@ -17125,9 +17131,11 @@ var Navbar = function Navbar(_ref3) {
|
|
|
17125
17131
|
}), user.menuItems && user.menuItems.length > 0 && jsx("div", {
|
|
17126
17132
|
className: "border-t border-gray-100",
|
|
17127
17133
|
children: user.menuItems.map(function (mi) {
|
|
17128
|
-
var _mi$onClick, _mi$onClick2;
|
|
17129
17134
|
return jsx("button", {
|
|
17130
|
-
onClick:
|
|
17135
|
+
onClick: function onClick(e) {
|
|
17136
|
+
var _mi$onClick;
|
|
17137
|
+
return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
|
|
17138
|
+
},
|
|
17131
17139
|
className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100",
|
|
17132
17140
|
children: mi.label
|
|
17133
17141
|
}, mi.id);
|
package/dist/index.js
CHANGED
|
@@ -15442,7 +15442,13 @@ function TabList(_ref2) {
|
|
|
15442
15442
|
role: "tablist",
|
|
15443
15443
|
"aria-orientation": orientation,
|
|
15444
15444
|
className: "flex ".concat(orientation === "vertical" ? "flex-col" : "flex-row", " gap-1 ").concat(className),
|
|
15445
|
-
children: children
|
|
15445
|
+
children: React.Children.map(children, function (child, i) {
|
|
15446
|
+
var _child$props$index;
|
|
15447
|
+
if (! /*#__PURE__*/React.isValidElement(child)) return child;
|
|
15448
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
15449
|
+
index: (_child$props$index = child.props.index) !== null && _child$props$index !== void 0 ? _child$props$index : i
|
|
15450
|
+
});
|
|
15451
|
+
})
|
|
15446
15452
|
});
|
|
15447
15453
|
}
|
|
15448
15454
|
/* ------------------------- Tab ------------------------- */
|
|
@@ -15568,11 +15574,11 @@ function Panels(_ref4) {
|
|
|
15568
15574
|
return jsxRuntime.jsx("div", {
|
|
15569
15575
|
className: "relative w-full ".concat(className),
|
|
15570
15576
|
children: React.Children.map(children, function (child, i) {
|
|
15571
|
-
var _child$props$
|
|
15577
|
+
var _child$props$index2;
|
|
15572
15578
|
// inject index if missing
|
|
15573
15579
|
if (! /*#__PURE__*/React.isValidElement(child)) return child;
|
|
15574
15580
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
15575
|
-
index: (_child$props$
|
|
15581
|
+
index: (_child$props$index2 = child.props.index) !== null && _child$props$index2 !== void 0 ? _child$props$index2 : i,
|
|
15576
15582
|
animated: animated
|
|
15577
15583
|
});
|
|
15578
15584
|
})
|
|
@@ -17145,9 +17151,11 @@ var Navbar = function Navbar(_ref3) {
|
|
|
17145
17151
|
}), user.menuItems && user.menuItems.length > 0 && jsxRuntime.jsx("div", {
|
|
17146
17152
|
className: "border-t border-gray-100",
|
|
17147
17153
|
children: user.menuItems.map(function (mi) {
|
|
17148
|
-
var _mi$onClick, _mi$onClick2;
|
|
17149
17154
|
return jsxRuntime.jsx("button", {
|
|
17150
|
-
onClick:
|
|
17155
|
+
onClick: function onClick(e) {
|
|
17156
|
+
var _mi$onClick;
|
|
17157
|
+
return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
|
|
17158
|
+
},
|
|
17151
17159
|
className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100",
|
|
17152
17160
|
children: mi.label
|
|
17153
17161
|
}, mi.id);
|