@ttoss/components 2.1.5 → 2.2.0
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/JsonEditor/index.d.ts +0 -1
- package/dist/Tabs/index.d.ts +18 -0
- package/dist/esm/Menu/index.js +2285 -13
- package/dist/esm/NotificationCard/index.js +2279 -7
- package/dist/esm/Tabs/index.js +70 -0
- package/package.json +11 -6
- package/dist/esm/chunk-X5PEMO2R.js +0 -2275
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
|
|
3
|
+
// src/components/Tabs/Tabs.tsx
|
|
4
|
+
import { Box } from "@ttoss/ui";
|
|
5
|
+
import { Tab, TabList, TabPanel, Tabs as ReactTabs } from "react-tabs";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Tabs = props => {
|
|
8
|
+
return /* @__PURE__ */jsx(Box, {
|
|
9
|
+
sx: ({
|
|
10
|
+
colors
|
|
11
|
+
}) => {
|
|
12
|
+
const themeColors = colors;
|
|
13
|
+
return {
|
|
14
|
+
/**
|
|
15
|
+
* Tabs
|
|
16
|
+
*/
|
|
17
|
+
".react-tabs": {
|
|
18
|
+
WebkitTapHighlightColor: "transparent"
|
|
19
|
+
},
|
|
20
|
+
".react-tabs__tab-list": {
|
|
21
|
+
borderBottom: "md",
|
|
22
|
+
borderColor: themeColors?.input?.border?.muted?.default
|
|
23
|
+
},
|
|
24
|
+
".react-tabs__tab--selected": {
|
|
25
|
+
backgroundColor: "transparent",
|
|
26
|
+
border: "none",
|
|
27
|
+
borderBottom: "lg",
|
|
28
|
+
borderColor: themeColors?.input?.border?.accent?.default
|
|
29
|
+
},
|
|
30
|
+
".react-tabs__tab": {
|
|
31
|
+
color: themeColors?.input?.text?.secondary?.default,
|
|
32
|
+
display: "inline-block",
|
|
33
|
+
padding: "3",
|
|
34
|
+
cursor: "pointer",
|
|
35
|
+
position: "relative",
|
|
36
|
+
listStyle: "none"
|
|
37
|
+
},
|
|
38
|
+
".react-tabs__tab--disabled": {
|
|
39
|
+
cursor: "not-allowed",
|
|
40
|
+
color: themeColors?.input?.text?.muted?.default
|
|
41
|
+
},
|
|
42
|
+
".react-tabs__tab:focus": {
|
|
43
|
+
outline: "none"
|
|
44
|
+
},
|
|
45
|
+
".react-tabs__tab:focus:after": {
|
|
46
|
+
position: "absolute",
|
|
47
|
+
height: "min",
|
|
48
|
+
left: "-2",
|
|
49
|
+
right: "-2",
|
|
50
|
+
bottom: "-3"
|
|
51
|
+
},
|
|
52
|
+
".react-tabs__tab-panel": {
|
|
53
|
+
display: "none"
|
|
54
|
+
},
|
|
55
|
+
".react-tabs__tab-panel--selected": {
|
|
56
|
+
display: "block"
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
...props,
|
|
61
|
+
children: /* @__PURE__ */jsx(ReactTabs, {
|
|
62
|
+
...props,
|
|
63
|
+
children: props.children
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
Tabs.TabList = TabList;
|
|
68
|
+
Tabs.Tab = Tab;
|
|
69
|
+
Tabs.TabPanel = TabPanel;
|
|
70
|
+
export { Tabs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "React components for ttoss ecosystem.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"types": "./dist/Table/index.d.ts",
|
|
63
63
|
"import": "./dist/esm/Table/index.js"
|
|
64
64
|
},
|
|
65
|
+
"./Tabs": {
|
|
66
|
+
"types": "./dist/Tabs/index.d.ts",
|
|
67
|
+
"import": "./dist/esm/Tabs/index.js"
|
|
68
|
+
},
|
|
65
69
|
"./Toast": {
|
|
66
70
|
"types": "./dist/Toast/index.d.ts",
|
|
67
71
|
"import": "./dist/esm/Toast/index.js"
|
|
@@ -82,14 +86,15 @@
|
|
|
82
86
|
"react-markdown": "^9.0.3",
|
|
83
87
|
"react-modal": "^3.16.3",
|
|
84
88
|
"react-modern-drawer": "^1.4.0",
|
|
89
|
+
"react-tabs": "^6.1.0",
|
|
85
90
|
"react-toastify": "^11.0.2",
|
|
86
91
|
"rehype-raw": "^7.0.0",
|
|
87
92
|
"remark-gfm": "^4.0.0"
|
|
88
93
|
},
|
|
89
94
|
"peerDependencies": {
|
|
90
95
|
"react": ">=16.8.0",
|
|
91
|
-
"@ttoss/
|
|
92
|
-
"@ttoss/
|
|
96
|
+
"@ttoss/react-hooks": "^2.0.10",
|
|
97
|
+
"@ttoss/ui": "^5.4.0"
|
|
93
98
|
},
|
|
94
99
|
"devDependencies": {
|
|
95
100
|
"@types/jest": "^29.5.14",
|
|
@@ -99,10 +104,10 @@
|
|
|
99
104
|
"tsup": "^8.3.5",
|
|
100
105
|
"tsx": "^4.19.2",
|
|
101
106
|
"@ttoss/config": "^1.35.2",
|
|
102
|
-
"@ttoss/react-
|
|
103
|
-
"@ttoss/ui": "^5.3.1",
|
|
107
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
104
108
|
"@ttoss/test-utils": "^2.1.22",
|
|
105
|
-
"@ttoss/
|
|
109
|
+
"@ttoss/ui": "^5.4.0",
|
|
110
|
+
"@ttoss/react-hooks": "^2.0.10"
|
|
106
111
|
},
|
|
107
112
|
"keywords": [
|
|
108
113
|
"React",
|