@rango-dev/ui 0.38.1-next.1 → 0.38.1-next.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/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/ui.build.json +1 -1
- package/dist/widget/ui/src/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Tabs/Tabs.styles.d.ts +6 -6
- package/dist/widget/ui/src/components/Tabs/Tabs.styles.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/Tabs/Tabs.styles.tsx +33 -0
- package/src/components/Tabs/Tabs.tsx +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,qBAyFjD"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
/// <reference types="trusted-types" />
|
|
4
4
|
export declare const Tabs: import("@stitches/react/types/styled-component.js").StyledComponent<"div", {
|
|
5
|
-
type?: "primary" | "secondary" | undefined;
|
|
6
|
-
borderRadius?: "small" | "medium" | "full" | undefined;
|
|
5
|
+
type?: "primary" | "secondary" | "bordered" | undefined;
|
|
6
|
+
borderRadius?: "small" | "medium" | "none" | "full" | undefined;
|
|
7
7
|
}, {
|
|
8
8
|
xs: string;
|
|
9
9
|
sm: string;
|
|
@@ -445,8 +445,8 @@ export declare const Tab: import("@stitches/react/types/styled-component.js").St
|
|
|
445
445
|
} & {
|
|
446
446
|
children?: import("react").ReactNode;
|
|
447
447
|
} & import("react").RefAttributes<HTMLButtonElement>>, {
|
|
448
|
-
borderRadius?: "small" | "medium" | "full" | undefined;
|
|
449
|
-
type?: "primary" | "secondary" | undefined;
|
|
448
|
+
borderRadius?: "small" | "medium" | "none" | "full" | undefined;
|
|
449
|
+
type?: "primary" | "secondary" | "bordered" | undefined;
|
|
450
450
|
isActive?: boolean | "true" | "false" | undefined;
|
|
451
451
|
}, {
|
|
452
452
|
xs: string;
|
|
@@ -609,8 +609,8 @@ export declare const Tab: import("@stitches/react/types/styled-component.js").St
|
|
|
609
609
|
transitions: {};
|
|
610
610
|
}, import("@stitches/react/types/config.js").DefaultThemeMap, {}>>;
|
|
611
611
|
export declare const BackdropTab: import("@stitches/react/types/styled-component.js").StyledComponent<"div", {
|
|
612
|
-
type?: "primary" | "secondary" | undefined;
|
|
613
|
-
borderRadius?: "small" | "medium" | "full" | undefined;
|
|
612
|
+
type?: "primary" | "secondary" | "bordered" | undefined;
|
|
613
|
+
borderRadius?: "small" | "medium" | "none" | "full" | undefined;
|
|
614
614
|
}, {
|
|
615
615
|
xs: string;
|
|
616
616
|
sm: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tabs/Tabs.styles.tsx"],"names":[],"mappings":";;;AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Tabs.styles.d.ts","sour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0.38.1-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@radix-ui/react-select": "^2.0.0",
|
|
54
54
|
"@radix-ui/react-switch": "^1.0.1",
|
|
55
55
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
56
|
-
"@rango-dev/wallets-shared": "^0.36.1-next.
|
|
56
|
+
"@rango-dev/wallets-shared": "^0.36.1-next.2",
|
|
57
57
|
"@stitches/react": "^1.2.8",
|
|
58
58
|
"copy-to-clipboard": "^3.3.3",
|
|
59
59
|
"rango-types": "^0.1.69",
|
|
@@ -23,6 +23,7 @@ export const Tabs = styled('div', {
|
|
|
23
23
|
borderStyle: 'solid',
|
|
24
24
|
backgroundColor: '$$color',
|
|
25
25
|
},
|
|
26
|
+
bordered: { backgroundColor: 'inherit' },
|
|
26
27
|
},
|
|
27
28
|
borderRadius: {
|
|
28
29
|
small: {
|
|
@@ -34,12 +35,16 @@ export const Tabs = styled('div', {
|
|
|
34
35
|
full: {
|
|
35
36
|
borderRadius: '$xm',
|
|
36
37
|
},
|
|
38
|
+
none: {
|
|
39
|
+
borderRadius: 'unset',
|
|
40
|
+
},
|
|
37
41
|
},
|
|
38
42
|
},
|
|
39
43
|
});
|
|
40
44
|
|
|
41
45
|
export const Tab = styled(Button, {
|
|
42
46
|
color: '$neutral700',
|
|
47
|
+
flex: 1,
|
|
43
48
|
backgroundColor: 'transparent',
|
|
44
49
|
height: '100%',
|
|
45
50
|
zIndex: 10,
|
|
@@ -60,6 +65,9 @@ export const Tab = styled(Button, {
|
|
|
60
65
|
full: {
|
|
61
66
|
borderRadius: '$xm',
|
|
62
67
|
},
|
|
68
|
+
none: {
|
|
69
|
+
borderRadius: 'unset',
|
|
70
|
+
},
|
|
63
71
|
},
|
|
64
72
|
type: {
|
|
65
73
|
primary: {
|
|
@@ -67,6 +75,7 @@ export const Tab = styled(Button, {
|
|
|
67
75
|
height: '100%',
|
|
68
76
|
},
|
|
69
77
|
secondary: {},
|
|
78
|
+
bordered: {},
|
|
70
79
|
},
|
|
71
80
|
isActive: {
|
|
72
81
|
true: {
|
|
@@ -122,6 +131,24 @@ export const Tab = styled(Button, {
|
|
|
122
131
|
},
|
|
123
132
|
},
|
|
124
133
|
},
|
|
134
|
+
{
|
|
135
|
+
type: 'bordered',
|
|
136
|
+
isActive: true,
|
|
137
|
+
css: {
|
|
138
|
+
color: '$secondary500',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'bordered',
|
|
143
|
+
isActive: false,
|
|
144
|
+
css: {
|
|
145
|
+
color: '$neutral600',
|
|
146
|
+
fontWeight: '$regular',
|
|
147
|
+
'&:hover': {
|
|
148
|
+
color: '$secondary550',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
125
152
|
],
|
|
126
153
|
});
|
|
127
154
|
|
|
@@ -141,6 +168,9 @@ export const BackdropTab = styled('div', {
|
|
|
141
168
|
primary: {
|
|
142
169
|
backgroundColor: '$background',
|
|
143
170
|
},
|
|
171
|
+
bordered: {
|
|
172
|
+
borderBottom: '$secondary500 solid 2px',
|
|
173
|
+
},
|
|
144
174
|
},
|
|
145
175
|
borderRadius: {
|
|
146
176
|
small: {
|
|
@@ -152,6 +182,9 @@ export const BackdropTab = styled('div', {
|
|
|
152
182
|
full: {
|
|
153
183
|
borderRadius: '$xm',
|
|
154
184
|
},
|
|
185
|
+
none: {
|
|
186
|
+
borderRadius: 'unset',
|
|
187
|
+
},
|
|
155
188
|
},
|
|
156
189
|
},
|
|
157
190
|
});
|
|
@@ -15,7 +15,6 @@ export function TabsComponent(props: TabsPropTypes) {
|
|
|
15
15
|
container = document.body,
|
|
16
16
|
value,
|
|
17
17
|
type,
|
|
18
|
-
borderRadius = 'medium',
|
|
19
18
|
className,
|
|
20
19
|
} = props;
|
|
21
20
|
const [tabWidth, setTabWidth] = useState(0);
|
|
@@ -25,6 +24,12 @@ export function TabsComponent(props: TabsPropTypes) {
|
|
|
25
24
|
// State variable to track the initial render
|
|
26
25
|
const [initialRender, setInitialRender] = useState(true);
|
|
27
26
|
const transformPosition = currentIndex * tabWidth;
|
|
27
|
+
let borderRadius: TabsPropTypes['borderRadius'] = 'medium';
|
|
28
|
+
if (type === 'bordered') {
|
|
29
|
+
borderRadius = 'none';
|
|
30
|
+
} else if (props.borderRadius) {
|
|
31
|
+
borderRadius = props.borderRadius;
|
|
32
|
+
}
|
|
28
33
|
|
|
29
34
|
useEffect(() => {
|
|
30
35
|
const updateTabWidth = () => {
|