@sortsys/ui 0.1.33 → 0.1.34
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/dev.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/dev.js
CHANGED
|
@@ -482,7 +482,7 @@ function SSDropdown(props) {
|
|
|
482
482
|
var _el$3 = _tmpl$14();
|
|
483
483
|
insert(_el$3, createComponent(For, {
|
|
484
484
|
get each() {
|
|
485
|
-
return props.items;
|
|
485
|
+
return props.items.filter((item) => !item.hideIf);
|
|
486
486
|
},
|
|
487
487
|
children: (item) => (() => {
|
|
488
488
|
var _el$5 = _tmpl$43(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
@@ -2221,6 +2221,7 @@ function SSTabList(props) {
|
|
|
2221
2221
|
})();
|
|
2222
2222
|
}
|
|
2223
2223
|
function SSTab(props) {
|
|
2224
|
+
if (props.hideIf) return null;
|
|
2224
2225
|
const context = useContext(SSTabsContext);
|
|
2225
2226
|
if (!context) {
|
|
2226
2227
|
throw new Error("SSTab must be used within SSTabs");
|
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ type SSDropdownItem = {
|
|
|
89
89
|
icon: JSXElement;
|
|
90
90
|
onclick?: () => PromiseOr$2<any>;
|
|
91
91
|
checked?: boolean;
|
|
92
|
+
hideIf?: boolean;
|
|
92
93
|
};
|
|
93
94
|
type SSDropdownProps = {
|
|
94
95
|
items: SSDropdownItem[];
|
|
@@ -407,6 +408,7 @@ type SSTabListProps = {
|
|
|
407
408
|
type SSTabProps = {
|
|
408
409
|
children: JSXElement;
|
|
409
410
|
disabled?: boolean;
|
|
411
|
+
hideIf?: boolean;
|
|
410
412
|
class?: string;
|
|
411
413
|
style?: string;
|
|
412
414
|
};
|
package/dist/index.js
CHANGED
|
@@ -482,7 +482,7 @@ function SSDropdown(props) {
|
|
|
482
482
|
var _el$3 = _tmpl$14();
|
|
483
483
|
insert(_el$3, createComponent(For, {
|
|
484
484
|
get each() {
|
|
485
|
-
return props.items;
|
|
485
|
+
return props.items.filter((item) => !item.hideIf);
|
|
486
486
|
},
|
|
487
487
|
children: (item) => (() => {
|
|
488
488
|
var _el$5 = _tmpl$43(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
@@ -2221,6 +2221,7 @@ function SSTabList(props) {
|
|
|
2221
2221
|
})();
|
|
2222
2222
|
}
|
|
2223
2223
|
function SSTab(props) {
|
|
2224
|
+
if (props.hideIf) return null;
|
|
2224
2225
|
const context = useContext(SSTabsContext);
|
|
2225
2226
|
if (!context) {
|
|
2226
2227
|
throw new Error("SSTab must be used within SSTabs");
|