jy-headless 0.1.9 → 0.1.10
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/tabs/Tab.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +9 -11
|
@@ -6,7 +6,7 @@ interface TabProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
declare const Tab: {
|
|
7
7
|
({ children, currentTab, onChangeTab, ...restProps }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Item: {
|
|
9
|
-
({ children,
|
|
9
|
+
({ children, tabId, ...restProps }: TabItemProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -905,13 +905,13 @@ const Tab = (_a) => {
|
|
|
905
905
|
}, children: children }) })));
|
|
906
906
|
};
|
|
907
907
|
const TabItem = (_a) => {
|
|
908
|
-
var { children,
|
|
908
|
+
var { children, tabId } = _a, restProps = __rest(_a, ["children", "tabId"]);
|
|
909
909
|
const context = useContext(TabContext);
|
|
910
910
|
if (!context) {
|
|
911
911
|
throw new Error('ModalCloseButton must be used within a ModalContext.Provider');
|
|
912
912
|
}
|
|
913
913
|
const { currentTabId, onChangeTab } = context;
|
|
914
|
-
return (jsxRuntimeExports.jsx("span", Object.assign({}, restProps, { onClick: () => onChangeTab(tabId),
|
|
914
|
+
return (jsxRuntimeExports.jsx("span", Object.assign({}, restProps, { onClick: () => onChangeTab(tabId), children: children })));
|
|
915
915
|
};
|
|
916
916
|
TabItem.displayName = 'Tab.Item';
|
|
917
917
|
Tab.Item = TabItem;
|
package/dist/index.js
CHANGED
|
@@ -907,13 +907,13 @@ const Tab = (_a) => {
|
|
|
907
907
|
}, children: children }) })));
|
|
908
908
|
};
|
|
909
909
|
const TabItem = (_a) => {
|
|
910
|
-
var { children,
|
|
910
|
+
var { children, tabId } = _a, restProps = __rest(_a, ["children", "tabId"]);
|
|
911
911
|
const context = React.useContext(TabContext);
|
|
912
912
|
if (!context) {
|
|
913
913
|
throw new Error('ModalCloseButton must be used within a ModalContext.Provider');
|
|
914
914
|
}
|
|
915
915
|
const { currentTabId, onChangeTab } = context;
|
|
916
|
-
return (jsxRuntimeExports.jsx("span", Object.assign({}, restProps, { onClick: () => onChangeTab(tabId),
|
|
916
|
+
return (jsxRuntimeExports.jsx("span", Object.assign({}, restProps, { onClick: () => onChangeTab(tabId), children: children })));
|
|
917
917
|
};
|
|
918
918
|
TabItem.displayName = 'Tab.Item';
|
|
919
919
|
Tab.Item = TabItem;
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jy-headless",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "A lightweight and customizable headless UI library for React components",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
8
8
|
"repository": "https://github.com/yCZwIqY/jy-headless",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": " rollup -c",
|
|
11
|
+
"storybook": "storybook dev -p 6006",
|
|
12
|
+
"build-storybook": "storybook build"
|
|
13
|
+
},
|
|
9
14
|
"files": [
|
|
10
15
|
"dist"
|
|
11
16
|
],
|
|
@@ -17,14 +22,12 @@
|
|
|
17
22
|
"import": "./dist/index.esm.js",
|
|
18
23
|
"require": "./dist/index.cjs"
|
|
19
24
|
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"react",
|
|
25
|
+
"keywords": [ "react",
|
|
22
26
|
"headless-ui",
|
|
23
27
|
"react-components",
|
|
24
28
|
"ui-library",
|
|
25
29
|
"tailwind",
|
|
26
|
-
"storybook"
|
|
27
|
-
],
|
|
30
|
+
"storybook"],
|
|
28
31
|
"author": "",
|
|
29
32
|
"license": "MIT",
|
|
30
33
|
"type": "module",
|
|
@@ -64,10 +67,5 @@
|
|
|
64
67
|
},
|
|
65
68
|
"dependencies": {
|
|
66
69
|
"tslib": "^2.8.1"
|
|
67
|
-
},
|
|
68
|
-
"scripts": {
|
|
69
|
-
"build": " rollup -c",
|
|
70
|
-
"storybook": "storybook dev -p 6006",
|
|
71
|
-
"build-storybook": "storybook build"
|
|
72
70
|
}
|
|
73
|
-
}
|
|
71
|
+
}
|