@ttoss/components 2.1.5 → 2.2.1
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 +75 -0
- package/package.json +11 -6
- package/dist/esm/chunk-X5PEMO2R.js +0 -2275
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
const {
|
|
9
|
+
sx: customSx,
|
|
10
|
+
...restProps
|
|
11
|
+
} = props;
|
|
12
|
+
return /* @__PURE__ */jsx(Box, {
|
|
13
|
+
sx: ({
|
|
14
|
+
colors
|
|
15
|
+
}) => {
|
|
16
|
+
const themeColors = colors;
|
|
17
|
+
return {
|
|
18
|
+
/**
|
|
19
|
+
* Tabs
|
|
20
|
+
*/
|
|
21
|
+
".react-tabs": {
|
|
22
|
+
WebkitTapHighlightColor: "transparent"
|
|
23
|
+
},
|
|
24
|
+
".react-tabs__tab-list": {
|
|
25
|
+
borderBottom: "md",
|
|
26
|
+
borderColor: themeColors?.input?.border?.muted?.default
|
|
27
|
+
},
|
|
28
|
+
".react-tabs__tab--selected": {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
border: "none",
|
|
31
|
+
borderBottom: "lg",
|
|
32
|
+
borderColor: themeColors?.input?.border?.accent?.default
|
|
33
|
+
},
|
|
34
|
+
".react-tabs__tab": {
|
|
35
|
+
color: themeColors?.input?.text?.secondary?.default,
|
|
36
|
+
display: "inline-block",
|
|
37
|
+
padding: "3",
|
|
38
|
+
cursor: "pointer",
|
|
39
|
+
position: "relative",
|
|
40
|
+
listStyle: "none"
|
|
41
|
+
},
|
|
42
|
+
".react-tabs__tab--disabled": {
|
|
43
|
+
cursor: "not-allowed",
|
|
44
|
+
color: themeColors?.input?.text?.muted?.default
|
|
45
|
+
},
|
|
46
|
+
".react-tabs__tab:focus": {
|
|
47
|
+
outline: "none"
|
|
48
|
+
},
|
|
49
|
+
".react-tabs__tab:focus:after": {
|
|
50
|
+
position: "absolute",
|
|
51
|
+
height: "min",
|
|
52
|
+
left: "-2",
|
|
53
|
+
right: "-2",
|
|
54
|
+
bottom: "-3"
|
|
55
|
+
},
|
|
56
|
+
".react-tabs__tab-panel": {
|
|
57
|
+
display: "none"
|
|
58
|
+
},
|
|
59
|
+
".react-tabs__tab-panel--selected": {
|
|
60
|
+
display: "block"
|
|
61
|
+
},
|
|
62
|
+
...customSx
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
...restProps,
|
|
66
|
+
children: /* @__PURE__ */jsx(ReactTabs, {
|
|
67
|
+
...props,
|
|
68
|
+
children: props.children
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
Tabs.TabList = TabList;
|
|
73
|
+
Tabs.Tab = Tab;
|
|
74
|
+
Tabs.TabPanel = TabPanel;
|
|
75
|
+
export { Tabs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
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",
|
|
@@ -98,11 +103,11 @@
|
|
|
98
103
|
"react": "^19.0.0",
|
|
99
104
|
"tsup": "^8.3.5",
|
|
100
105
|
"tsx": "^4.19.2",
|
|
101
|
-
"@ttoss/config": "^1.35.2",
|
|
102
106
|
"@ttoss/react-hooks": "^2.0.10",
|
|
103
|
-
"@ttoss/
|
|
107
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
108
|
+
"@ttoss/config": "^1.35.2",
|
|
104
109
|
"@ttoss/test-utils": "^2.1.22",
|
|
105
|
-
"@ttoss/
|
|
110
|
+
"@ttoss/ui": "^5.4.0"
|
|
106
111
|
},
|
|
107
112
|
"keywords": [
|
|
108
113
|
"React",
|