@mw-kit/mw-ui 1.7.10 → 1.7.12
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AbsoluteContainerProps } from '../../../AbsoluteContainer/interfaces';
|
|
3
3
|
import { TimeProps } from '../../../Input/components/Time/interfaces';
|
|
4
|
-
import { BasicCalendarProps
|
|
4
|
+
import { BasicCalendarProps } from '../Basic/interfaces';
|
|
5
5
|
export declare type Value = [Date | null, Date | null];
|
|
6
6
|
export declare type InputTimeProps = Omit<TimeProps, 'type' | 'value' | 'setValue' | 'minWidth'>;
|
|
7
7
|
declare type GetInputTimeProps = (value: Date | null) => InputTimeProps | undefined;
|
|
8
|
+
declare type OnChangeMonth = Exclude<BasicCalendarProps['onChangeMonth'], undefined>;
|
|
8
9
|
export interface Common extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
9
10
|
initialValue?: Value;
|
|
10
11
|
value?: [Value, (value: Value) => void];
|
|
@@ -14,7 +15,7 @@ export interface Common extends Pick<BasicCalendarProps, 'initialMonth' | 'max'
|
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
};
|
|
16
17
|
invalid?: [[boolean, boolean], (invalid: [boolean, boolean]) => void];
|
|
17
|
-
onChangeMonth?: (calendar:
|
|
18
|
+
onChangeMonth?: (calendar: Parameters<OnChangeMonth>[0], side: 'left' | 'right') => ReturnType<OnChangeMonth>;
|
|
18
19
|
getDay?: (day: Date, side: 'left' | 'right') => Partial<ReturnType<BasicCalendarProps['getDay']>>;
|
|
19
20
|
}
|
|
20
21
|
export declare type AbsoluteIntervalCalendarProps = Common & Omit<AbsoluteContainerProps, 'onSubmit'>;
|
package/dist/index.js
CHANGED
|
@@ -12607,6 +12607,15 @@ var Tabs$1 = function Tabs$1(props) {
|
|
|
12607
12607
|
});
|
|
12608
12608
|
};
|
|
12609
12609
|
|
|
12610
|
+
var getClose = props.alwaysOpen ? function () {
|
|
12611
|
+
return undefined;
|
|
12612
|
+
} : function (index) {
|
|
12613
|
+
return React__default.createElement(SvgClose, {
|
|
12614
|
+
onClick: function onClick() {
|
|
12615
|
+
return removeTab(index);
|
|
12616
|
+
}
|
|
12617
|
+
});
|
|
12618
|
+
};
|
|
12610
12619
|
return React__default.createElement(Container$6, null, React__default.createElement(Tabs, {
|
|
12611
12620
|
internal: +(internal || false)
|
|
12612
12621
|
}, tabs.map(function (tab, index) {
|
|
@@ -12616,11 +12625,7 @@ var Tabs$1 = function Tabs$1(props) {
|
|
|
12616
12625
|
onClick: function onClick(event) {
|
|
12617
12626
|
return updateActiveTab(index, event);
|
|
12618
12627
|
}
|
|
12619
|
-
}, React__default.createElement("span", null, tab.label),
|
|
12620
|
-
onClick: function onClick() {
|
|
12621
|
-
return removeTab(index);
|
|
12622
|
-
}
|
|
12623
|
-
}));
|
|
12628
|
+
}, React__default.createElement("span", null, tab.label), getClose(index));
|
|
12624
12629
|
})));
|
|
12625
12630
|
};
|
|
12626
12631
|
|