@luscii-healthtech/web-ui 0.10.0 → 0.10.3
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/PaginationMenu/PaginationMenu.types.d.ts +1 -1
- package/dist/components/Tabbar/Tabbar.d.ts +6 -2
- package/dist/index.d.ts +1 -1
- package/dist/web-ui.cjs.development.js +19 -26
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +19 -26
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/List/List.tsx +6 -9
- package/src/components/PaginationMenu/PaginationMenu.types.ts +1 -1
- package/src/components/PaginationMenu/PaginationMenu.utils.ts +1 -1
- package/src/components/Tabbar/Tabbar.tsx +12 -13
- package/src/index.tsx +7 -1
|
@@ -23,7 +23,7 @@ export interface PaginationMenuLargeProps {
|
|
|
23
23
|
resultCount?: number;
|
|
24
24
|
}
|
|
25
25
|
export declare type OnPaginationChange = (pageNumber: number, pageSize?: PageSize) => void;
|
|
26
|
-
export declare type PageSize =
|
|
26
|
+
export declare type PageSize = 25 | 50 | 75 | 100;
|
|
27
27
|
export interface Localization {
|
|
28
28
|
display: string;
|
|
29
29
|
page: string;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TabItemDetails } from "./TabbarItem";
|
|
3
|
-
interface TabbarProps {
|
|
3
|
+
export interface TabbarProps {
|
|
4
4
|
tabs?: TabItemDetails[];
|
|
5
5
|
selectedIndex?: number;
|
|
6
|
-
onSelect?: (
|
|
6
|
+
onSelect?: (params: {
|
|
7
|
+
index: number;
|
|
8
|
+
selectedTab: TabItemDetails;
|
|
9
|
+
}) => void;
|
|
7
10
|
className?: string;
|
|
8
11
|
}
|
|
12
|
+
export { TabItemDetails };
|
|
9
13
|
export declare const Tabbar: ({ tabs, selectedIndex, onSelect, className, }: TabbarProps) => JSX.Element;
|
|
10
14
|
export default Tabbar;
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { SettingsMenuButton, SettingsMenuButtonProps, } from "./components/Setti
|
|
|
40
40
|
export { Spinner } from "./components/Spinner/Spinner";
|
|
41
41
|
export { Steps } from "./components/Steps/Steps";
|
|
42
42
|
export { default as Switcher } from "./components/Switcher/Switcher";
|
|
43
|
-
export { default as Tabbar } from "./components/Tabbar/Tabbar";
|
|
43
|
+
export { default as Tabbar, TabbarProps, TabItemDetails, } from "./components/Tabbar/Tabbar";
|
|
44
44
|
export { default as TabLinks } from "./components/TabLinks/TabLinks";
|
|
45
45
|
export { default as Tag } from "./components/Tag/Tag";
|
|
46
46
|
export { default as TagGroup } from "./components/Tag/TagGroup";
|
|
@@ -2313,7 +2313,7 @@ var CustomSelect = /*#__PURE__*/React__default.forwardRef(function (props, _ref)
|
|
|
2313
2313
|
}));
|
|
2314
2314
|
});
|
|
2315
2315
|
|
|
2316
|
-
var PAGE_SIZES = [
|
|
2316
|
+
var PAGE_SIZES = [25, 50, 75, 100];
|
|
2317
2317
|
var PAGE_SIZE_OPTIONS = /*#__PURE__*/PAGE_SIZES.map(function (pageSize) {
|
|
2318
2318
|
return {
|
|
2319
2319
|
label: pageSize.toString(),
|
|
@@ -2733,15 +2733,11 @@ var List = function List(_ref) {
|
|
|
2733
2733
|
};
|
|
2734
2734
|
|
|
2735
2735
|
var setupDragging = function setupDragging() {
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
return dragulaInstance;
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
return null;
|
|
2736
|
+
var dragulaInstance = dragula([listRef.current], {
|
|
2737
|
+
revertOnSpill: true
|
|
2738
|
+
});
|
|
2739
|
+
dragulaInstance.on("dragend", handleDragEnd);
|
|
2740
|
+
return dragulaInstance;
|
|
2745
2741
|
};
|
|
2746
2742
|
|
|
2747
2743
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4020,35 +4016,32 @@ var TabbarItem = function TabbarItem(_ref) {
|
|
|
4020
4016
|
};
|
|
4021
4017
|
|
|
4022
4018
|
var Tabbar = function Tabbar(_ref) {
|
|
4023
|
-
var tabs = _ref.tabs,
|
|
4019
|
+
var _ref$tabs = _ref.tabs,
|
|
4020
|
+
tabs = _ref$tabs === void 0 ? [] : _ref$tabs,
|
|
4024
4021
|
selectedIndex = _ref.selectedIndex,
|
|
4025
4022
|
onSelect = _ref.onSelect,
|
|
4026
4023
|
_ref$className = _ref.className,
|
|
4027
4024
|
className = _ref$className === void 0 ? "" : _ref$className;
|
|
4028
4025
|
|
|
4029
|
-
var _useState = React.useState(
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
var _useState2 = React.useState(selectedIndex),
|
|
4034
|
-
innerSelectedIndex = _useState2[0],
|
|
4035
|
-
setInnerSelectedIndex = _useState2[1];
|
|
4026
|
+
var _useState = React.useState(selectedIndex),
|
|
4027
|
+
innerSelectedIndex = _useState[0],
|
|
4028
|
+
setInnerSelectedIndex = _useState[1];
|
|
4036
4029
|
|
|
4037
4030
|
React.useEffect(function () {
|
|
4038
|
-
|
|
4039
|
-
}, [
|
|
4040
|
-
React.useEffect(function () {
|
|
4041
|
-
setInnerSelectedIndex(innerSelectedIndex);
|
|
4042
|
-
}, [innerSelectedIndex]);
|
|
4031
|
+
setInnerSelectedIndex(selectedIndex);
|
|
4032
|
+
}, [selectedIndex]);
|
|
4043
4033
|
|
|
4044
4034
|
function handleOnTabSelect(index) {
|
|
4045
4035
|
setInnerSelectedIndex(index);
|
|
4046
|
-
onSelect == null ? void 0 : onSelect(
|
|
4036
|
+
onSelect == null ? void 0 : onSelect({
|
|
4037
|
+
index: index,
|
|
4038
|
+
selectedTab: tabs[index]
|
|
4039
|
+
});
|
|
4047
4040
|
}
|
|
4048
4041
|
|
|
4049
4042
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4050
|
-
className: "flex flex-row w-full bg-white rounded-xl " + className
|
|
4051
|
-
},
|
|
4043
|
+
className: "flex flex-row w-full bg-white rounded-xl p-2 " + className
|
|
4044
|
+
}, tabs == null ? void 0 : tabs.map(function (tabItemProps, index) {
|
|
4052
4045
|
var _tabItemProps$dataTes;
|
|
4053
4046
|
|
|
4054
4047
|
var itemProps = _extends({
|