funda-ui 2.0.375 → 2.0.475
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/Tabs/index.js +16 -11
- package/lib/cjs/Tabs/index.js +16 -11
- package/lib/esm/Tabs/TabList.tsx +8 -1
- package/lib/esm/Tabs/TabPanel.tsx +16 -7
- package/lib/esm/Tabs/Tabs.tsx +2 -2
- package/package.json +1 -1
package/Tabs/index.js
CHANGED
|
@@ -141,21 +141,26 @@ var TabPanel = function TabPanel(props) {
|
|
|
141
141
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
142
142
|
var _expandClassName = typeof expandedActiveClassNameForPanel !== 'undefined' ? expandedActiveClassNameForPanel : '';
|
|
143
143
|
var activedClassName = typeof defaultActive !== 'undefined' && defaultActive !== false ? " active ".concat(_expandClassName) : " ".concat(_expandClassName);
|
|
144
|
-
|
|
145
|
-
// !!!Special note:
|
|
146
|
-
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
147
|
-
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
148
|
-
var activedStyles = typeof defaultActive !== 'undefined' && defaultActive !== false ? {} : {
|
|
149
|
-
height: '0',
|
|
150
|
-
overflow: 'hidden'
|
|
151
|
-
};
|
|
152
144
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", _extends({
|
|
153
145
|
"data-index": index,
|
|
154
146
|
"data-tabpanel-index": index,
|
|
155
147
|
role: "tabpanel",
|
|
156
148
|
id: targetId,
|
|
157
149
|
className: tabpanelClass ? "tab-pane d-block ".concat(tabpanelClass, " ").concat(activedClassName) : "tab-pane d-block ".concat(activedClassName),
|
|
158
|
-
|
|
150
|
+
ref: function ref(node) {
|
|
151
|
+
if (node) {
|
|
152
|
+
// !!!Special note:
|
|
153
|
+
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
154
|
+
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
155
|
+
if (typeof defaultActive !== 'undefined' && defaultActive !== false) {
|
|
156
|
+
node.style.removeProperty('height');
|
|
157
|
+
node.style.removeProperty('overflow');
|
|
158
|
+
} else {
|
|
159
|
+
node.style.setProperty('height', '0', 'important');
|
|
160
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
159
164
|
}, attributes)));
|
|
160
165
|
};
|
|
161
166
|
/* harmony default export */ const src_TabPanel = (TabPanel);
|
|
@@ -193,8 +198,8 @@ var Tabs = function Tabs(props) {
|
|
|
193
198
|
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
194
199
|
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
195
200
|
if (type === 'hide') {
|
|
196
|
-
node.style.setProperty('height', '0');
|
|
197
|
-
node.style.setProperty('overflow', 'hidden');
|
|
201
|
+
node.style.setProperty('height', '0', 'important');
|
|
202
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
198
203
|
} else {
|
|
199
204
|
node.style.removeProperty('height');
|
|
200
205
|
node.style.removeProperty('overflow');
|
package/lib/cjs/Tabs/index.js
CHANGED
|
@@ -141,21 +141,26 @@ var TabPanel = function TabPanel(props) {
|
|
|
141
141
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
142
142
|
var _expandClassName = typeof expandedActiveClassNameForPanel !== 'undefined' ? expandedActiveClassNameForPanel : '';
|
|
143
143
|
var activedClassName = typeof defaultActive !== 'undefined' && defaultActive !== false ? " active ".concat(_expandClassName) : " ".concat(_expandClassName);
|
|
144
|
-
|
|
145
|
-
// !!!Special note:
|
|
146
|
-
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
147
|
-
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
148
|
-
var activedStyles = typeof defaultActive !== 'undefined' && defaultActive !== false ? {} : {
|
|
149
|
-
height: '0',
|
|
150
|
-
overflow: 'hidden'
|
|
151
|
-
};
|
|
152
144
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", _extends({
|
|
153
145
|
"data-index": index,
|
|
154
146
|
"data-tabpanel-index": index,
|
|
155
147
|
role: "tabpanel",
|
|
156
148
|
id: targetId,
|
|
157
149
|
className: tabpanelClass ? "tab-pane d-block ".concat(tabpanelClass, " ").concat(activedClassName) : "tab-pane d-block ".concat(activedClassName),
|
|
158
|
-
|
|
150
|
+
ref: function ref(node) {
|
|
151
|
+
if (node) {
|
|
152
|
+
// !!!Special note:
|
|
153
|
+
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
154
|
+
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
155
|
+
if (typeof defaultActive !== 'undefined' && defaultActive !== false) {
|
|
156
|
+
node.style.removeProperty('height');
|
|
157
|
+
node.style.removeProperty('overflow');
|
|
158
|
+
} else {
|
|
159
|
+
node.style.setProperty('height', '0', 'important');
|
|
160
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
159
164
|
}, attributes)));
|
|
160
165
|
};
|
|
161
166
|
/* harmony default export */ const src_TabPanel = (TabPanel);
|
|
@@ -193,8 +198,8 @@ var Tabs = function Tabs(props) {
|
|
|
193
198
|
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
194
199
|
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
195
200
|
if (type === 'hide') {
|
|
196
|
-
node.style.setProperty('height', '0');
|
|
197
|
-
node.style.setProperty('overflow', 'hidden');
|
|
201
|
+
node.style.setProperty('height', '0', 'important');
|
|
202
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
198
203
|
} else {
|
|
199
204
|
node.style.removeProperty('height');
|
|
200
205
|
node.style.removeProperty('overflow');
|
package/lib/esm/Tabs/TabList.tsx
CHANGED
|
@@ -30,7 +30,14 @@ const TabList = (props: TabListProps) => {
|
|
|
30
30
|
return (
|
|
31
31
|
<>
|
|
32
32
|
|
|
33
|
-
<li
|
|
33
|
+
<li
|
|
34
|
+
data-index={index}
|
|
35
|
+
data-tablist-index={index}
|
|
36
|
+
className={`position-relative nav-item ${activedClassName}`}
|
|
37
|
+
role="presentation"
|
|
38
|
+
onClick={switchEv}
|
|
39
|
+
data-tab={targetId}
|
|
40
|
+
>
|
|
34
41
|
{children}
|
|
35
42
|
</li>
|
|
36
43
|
|
|
@@ -24,13 +24,7 @@ const TabPanel = (props: TabPanelProps) => {
|
|
|
24
24
|
const _expandClassName = typeof(expandedActiveClassNameForPanel) !== 'undefined' ? expandedActiveClassNameForPanel : '';
|
|
25
25
|
const activedClassName = typeof(defaultActive) !== 'undefined' && defaultActive !== false ? ` active ${_expandClassName}` : ` ${_expandClassName}`;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
// !!!Special note:
|
|
29
|
-
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
30
|
-
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
31
|
-
const activedStyles = typeof(defaultActive) !== 'undefined' && defaultActive !== false ? {} : {height: '0', overflow: 'hidden'}
|
|
32
27
|
|
|
33
|
-
|
|
34
28
|
return (
|
|
35
29
|
<>
|
|
36
30
|
|
|
@@ -39,7 +33,22 @@ const TabPanel = (props: TabPanelProps) => {
|
|
|
39
33
|
data-tabpanel-index={index}
|
|
40
34
|
role="tabpanel" id={targetId}
|
|
41
35
|
className={ tabpanelClass ? `tab-pane d-block ${tabpanelClass} ${activedClassName}` : `tab-pane d-block ${activedClassName}`}
|
|
42
|
-
|
|
36
|
+
ref={(node) => {
|
|
37
|
+
if (node) {
|
|
38
|
+
|
|
39
|
+
// !!!Special note:
|
|
40
|
+
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
41
|
+
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
42
|
+
if (typeof(defaultActive) !== 'undefined' && defaultActive !== false) {
|
|
43
|
+
node.style.removeProperty('height');
|
|
44
|
+
node.style.removeProperty('overflow');
|
|
45
|
+
} else {
|
|
46
|
+
node.style.setProperty('height', '0', 'important');
|
|
47
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
}}
|
|
43
52
|
{...attributes}
|
|
44
53
|
></div>
|
|
45
54
|
|
package/lib/esm/Tabs/Tabs.tsx
CHANGED
|
@@ -49,8 +49,8 @@ const Tabs = (props: TabsProps) => {
|
|
|
49
49
|
// If you want to hide the tab in advance, please use `{ height: 0; overflow: hidden; }`, do not use `{ display: none }`
|
|
50
50
|
// Otherwise it will cause the scrollHeight of the element inside the child node to be 0
|
|
51
51
|
if (type === 'hide') {
|
|
52
|
-
node.style.setProperty('height', '0');
|
|
53
|
-
node.style.setProperty('overflow', 'hidden');
|
|
52
|
+
node.style.setProperty('height', '0', 'important');
|
|
53
|
+
node.style.setProperty('overflow', 'hidden', 'important');
|
|
54
54
|
} else {
|
|
55
55
|
node.style.removeProperty('height');
|
|
56
56
|
node.style.removeProperty('overflow');
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.475",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|