oneslash-design-system 1.1.12 → 1.1.14
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/components/menuItem.tsx +4 -4
- package/components/tab.tsx +6 -6
- package/components/tabsContainer.tsx +23 -0
- package/components/tag.tsx +2 -0
- package/designTokens.js +4 -4
- package/dist/components/tab.jsx +6 -6
- package/dist/components/tabsContainer.d.ts +6 -0
- package/dist/components/tabsContainer.jsx +9 -0
- package/dist/components/tag.d.ts +2 -1
- package/dist/components/tag.jsx +1 -1
- package/dist/designTokens.js +4 -4
- package/dist/output.css +27 -20
- package/package.json +1 -1
package/components/menuItem.tsx
CHANGED
|
@@ -64,10 +64,10 @@ export default function MenuItem({
|
|
|
64
64
|
>
|
|
65
65
|
{/* render userImage. render dynamic icon if userImage is not available */}
|
|
66
66
|
{userImgUrl || userHandle ? (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
<UserImage userHandle={userHandle || ''} userImgUrl={userImgUrl || ''} />
|
|
68
|
+
) : (
|
|
69
|
+
IconLeft && <IconLeft className="w-6 h-6" />
|
|
70
|
+
)}
|
|
71
71
|
|
|
72
72
|
{/* label */}
|
|
73
73
|
<span className="whitespace-nowrap text-body1 px-2 text-light-text-primary dark:text-dark-text-primary">
|
package/components/tab.tsx
CHANGED
|
@@ -64,20 +64,20 @@ export default function Tab({
|
|
|
64
64
|
return (
|
|
65
65
|
<div
|
|
66
66
|
className={`
|
|
67
|
-
flex items-center space-x-1
|
|
67
|
+
flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-all duration-300 ease-in-out
|
|
68
68
|
${isSelected
|
|
69
|
-
? 'bg-light-primary-
|
|
70
|
-
: '
|
|
69
|
+
? 'bg-light-primary-dark dark:bg-dark-primary-dark text-light-text-contrast dark:text-dark-text-contrast'
|
|
70
|
+
: 'hover:bg-light-background-accent200 dark:hover:bg-dark-background-accent200'}
|
|
71
71
|
`}
|
|
72
72
|
onClick={handleClick}
|
|
73
73
|
>
|
|
74
|
-
{IconLeft && <IconLeft className="w-
|
|
75
|
-
<span className="whitespace-nowrap text-body1 px-
|
|
74
|
+
{IconLeft && <IconLeft className="w-6 h-6" />}
|
|
75
|
+
<span className="whitespace-nowrap text-body1 px-[6px]">
|
|
76
76
|
{label}
|
|
77
77
|
</span>
|
|
78
78
|
{IconRight && (
|
|
79
79
|
<div onClick={onClickActionIcon} className="cursor-pointer">
|
|
80
|
-
<IconRight className="w-
|
|
80
|
+
<IconRight className="w-6 h-6" />
|
|
81
81
|
</div>
|
|
82
82
|
)}
|
|
83
83
|
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface TabsContainerProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function TabsContainer({
|
|
9
|
+
children,
|
|
10
|
+
}: TabsContainerProps) {
|
|
11
|
+
const tabCount = React.Children.count(children);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div
|
|
15
|
+
className={`
|
|
16
|
+
flex space-x-2 p-1 rounded-[12px]
|
|
17
|
+
${tabCount > 0 ? 'bg-light-background-accent200 dark:bg-dark-background-accent200' : 'bg-transparent'}
|
|
18
|
+
`}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
package/components/tag.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import React, { useState, useEffect, useCallback } from 'react';
|
|
|
3
3
|
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
4
4
|
|
|
5
5
|
interface TagProps{
|
|
6
|
+
key?: any;
|
|
6
7
|
variant: "contained" | "textOnly";
|
|
7
8
|
size: "medium" | "small";
|
|
8
9
|
state?: "enabled" | "selected" ;
|
|
@@ -16,6 +17,7 @@ interface TagProps{
|
|
|
16
17
|
type IconType = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
17
18
|
|
|
18
19
|
export default function Tag({
|
|
20
|
+
key,
|
|
19
21
|
variant,
|
|
20
22
|
size,
|
|
21
23
|
state,
|
package/designTokens.js
CHANGED
|
@@ -46,10 +46,10 @@ module.exports = {
|
|
|
46
46
|
light: '#67C16B',
|
|
47
47
|
},
|
|
48
48
|
background:{
|
|
49
|
-
default: '#
|
|
50
|
-
accent100:'#
|
|
51
|
-
accent200:'#
|
|
52
|
-
accent300:'#
|
|
49
|
+
default: '#F2F2F2',
|
|
50
|
+
accent100:'#F5F5F5',
|
|
51
|
+
accent200:'#FAFAFA',
|
|
52
|
+
accent300:'#FFFFFF',
|
|
53
53
|
},
|
|
54
54
|
action:{
|
|
55
55
|
active: '#888888',
|
package/dist/components/tab.jsx
CHANGED
|
@@ -99,15 +99,15 @@ export default function Tab(_a) {
|
|
|
99
99
|
router.push(href);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
return (<div className={"\n flex items-center space-x-1
|
|
103
|
-
? 'bg-light-primary-
|
|
104
|
-
: '
|
|
105
|
-
{IconLeft && <IconLeft className="w-
|
|
106
|
-
<span className="whitespace-nowrap text-body1 px-
|
|
102
|
+
return (<div className={"\n flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-all duration-300 ease-in-out\n ".concat(isSelected
|
|
103
|
+
? 'bg-light-primary-dark dark:bg-dark-primary-dark text-light-text-contrast dark:text-dark-text-contrast'
|
|
104
|
+
: 'hover:bg-light-background-accent200 dark:hover:bg-dark-background-accent200', "\n ")} onClick={handleClick}>
|
|
105
|
+
{IconLeft && <IconLeft className="w-6 h-6"/>}
|
|
106
|
+
<span className="whitespace-nowrap text-body1 px-[6px]">
|
|
107
107
|
{label}
|
|
108
108
|
</span>
|
|
109
109
|
{IconRight && (<div onClick={onClickActionIcon} className="cursor-pointer">
|
|
110
|
-
<IconRight className="w-
|
|
110
|
+
<IconRight className="w-6 h-6"/>
|
|
111
111
|
</div>)}
|
|
112
112
|
</div>);
|
|
113
113
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export default function TabsContainer(_a) {
|
|
4
|
+
var children = _a.children;
|
|
5
|
+
var tabCount = React.Children.count(children);
|
|
6
|
+
return (<div className={"\n flex space-x-2 p-1 rounded-[12px]\n ".concat(tabCount > 0 ? 'bg-light-background-accent200 dark:bg-dark-background-accent200' : 'bg-transparent', "\n ")}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>);
|
|
9
|
+
}
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
3
3
|
interface TagProps {
|
|
4
|
+
key?: any;
|
|
4
5
|
variant: "contained" | "textOnly";
|
|
5
6
|
size: "medium" | "small";
|
|
6
7
|
state?: "enabled" | "selected";
|
|
@@ -10,5 +11,5 @@ interface TagProps {
|
|
|
10
11
|
onClick?: any;
|
|
11
12
|
color?: 'default' | 'info';
|
|
12
13
|
}
|
|
13
|
-
export default function Tag({ variant, size, state, label, iconName, isDeletable, onClick, color, }: TagProps): React.JSX.Element;
|
|
14
|
+
export default function Tag({ key, variant, size, state, label, iconName, isDeletable, onClick, color, }: TagProps): React.JSX.Element;
|
|
14
15
|
export {};
|
package/dist/components/tag.jsx
CHANGED
|
@@ -38,7 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
39
39
|
export default function Tag(_a) {
|
|
40
40
|
var _this = this;
|
|
41
|
-
var variant = _a.variant, size = _a.size, state = _a.state, label = _a.label, iconName = _a.iconName, isDeletable = _a.isDeletable, onClick = _a.onClick, _b = _a.color, color = _b === void 0 ? 'default' : _b;
|
|
41
|
+
var key = _a.key, variant = _a.variant, size = _a.size, state = _a.state, label = _a.label, iconName = _a.iconName, isDeletable = _a.isDeletable, onClick = _a.onClick, _b = _a.color, color = _b === void 0 ? 'default' : _b;
|
|
42
42
|
var _c = useState(false), isHovered = _c[0], setIsHovered = _c[1];
|
|
43
43
|
var _d = useState(null), Icon = _d[0], setIcon = _d[1];
|
|
44
44
|
var _e = useState(null), DeleteIcon = _e[0], setDeleteIcon = _e[1];
|
package/dist/designTokens.js
CHANGED
|
@@ -47,10 +47,10 @@ module.exports = {
|
|
|
47
47
|
light: '#67C16B',
|
|
48
48
|
},
|
|
49
49
|
background: {
|
|
50
|
-
default: '#
|
|
51
|
-
accent100: '#
|
|
52
|
-
accent200: '#
|
|
53
|
-
accent300: '#
|
|
50
|
+
default: '#F2F2F2',
|
|
51
|
+
accent100: '#F5F5F5',
|
|
52
|
+
accent200: '#FAFAFA',
|
|
53
|
+
accent300: '#FFFFFF',
|
|
54
54
|
},
|
|
55
55
|
action: {
|
|
56
56
|
active: '#888888',
|
package/dist/output.css
CHANGED
|
@@ -698,6 +698,9 @@ video {
|
|
|
698
698
|
.rounded {
|
|
699
699
|
border-radius: 0.25rem;
|
|
700
700
|
}
|
|
701
|
+
.rounded-\[12px\] {
|
|
702
|
+
border-radius: 12px;
|
|
703
|
+
}
|
|
701
704
|
.rounded-\[8px\] {
|
|
702
705
|
border-radius: 8px;
|
|
703
706
|
}
|
|
@@ -755,25 +758,21 @@ video {
|
|
|
755
758
|
--tw-bg-opacity: 1;
|
|
756
759
|
background-color: rgb(238 174 3 / var(--tw-bg-opacity));
|
|
757
760
|
}
|
|
758
|
-
.bg-light-action-selected {
|
|
759
|
-
--tw-bg-opacity: 1;
|
|
760
|
-
background-color: rgb(227 227 227 / var(--tw-bg-opacity));
|
|
761
|
-
}
|
|
762
761
|
.bg-light-actionBackground-disabled {
|
|
763
762
|
--tw-bg-opacity: 1;
|
|
764
763
|
background-color: rgb(238 238 238 / var(--tw-bg-opacity));
|
|
765
764
|
}
|
|
766
765
|
.bg-light-background-accent100 {
|
|
767
766
|
--tw-bg-opacity: 1;
|
|
768
|
-
background-color: rgb(
|
|
767
|
+
background-color: rgb(245 245 245 / var(--tw-bg-opacity));
|
|
769
768
|
}
|
|
770
769
|
.bg-light-background-accent200 {
|
|
771
770
|
--tw-bg-opacity: 1;
|
|
772
|
-
background-color: rgb(
|
|
771
|
+
background-color: rgb(250 250 250 / var(--tw-bg-opacity));
|
|
773
772
|
}
|
|
774
773
|
.bg-light-background-default {
|
|
775
774
|
--tw-bg-opacity: 1;
|
|
776
|
-
background-color: rgb(
|
|
775
|
+
background-color: rgb(242 242 242 / var(--tw-bg-opacity));
|
|
777
776
|
}
|
|
778
777
|
.bg-light-error-main {
|
|
779
778
|
--tw-bg-opacity: 1;
|
|
@@ -783,6 +782,10 @@ video {
|
|
|
783
782
|
--tw-bg-opacity: 1;
|
|
784
783
|
background-color: rgb(0 135 212 / var(--tw-bg-opacity));
|
|
785
784
|
}
|
|
785
|
+
.bg-light-primary-dark {
|
|
786
|
+
--tw-bg-opacity: 1;
|
|
787
|
+
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
788
|
+
}
|
|
786
789
|
.bg-light-primary-main {
|
|
787
790
|
--tw-bg-opacity: 1;
|
|
788
791
|
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
@@ -824,6 +827,10 @@ video {
|
|
|
824
827
|
padding-left: 0.5rem;
|
|
825
828
|
padding-right: 0.5rem;
|
|
826
829
|
}
|
|
830
|
+
.px-\[6px\] {
|
|
831
|
+
padding-left: 6px;
|
|
832
|
+
padding-right: 6px;
|
|
833
|
+
}
|
|
827
834
|
.py-1 {
|
|
828
835
|
padding-top: 0.25rem;
|
|
829
836
|
padding-bottom: 0.25rem;
|
|
@@ -935,7 +942,7 @@ video {
|
|
|
935
942
|
--tw-ring-offset-width: 4px;
|
|
936
943
|
}
|
|
937
944
|
.ring-offset-light-background-default {
|
|
938
|
-
--tw-ring-offset-color: #
|
|
945
|
+
--tw-ring-offset-color: #F2F2F2;
|
|
939
946
|
}
|
|
940
947
|
.blur {
|
|
941
948
|
--tw-blur: blur(8px);
|
|
@@ -985,15 +992,15 @@ body {
|
|
|
985
992
|
|
|
986
993
|
.hover\:bg-light-background-accent100:hover {
|
|
987
994
|
--tw-bg-opacity: 1;
|
|
988
|
-
background-color: rgb(
|
|
995
|
+
background-color: rgb(245 245 245 / var(--tw-bg-opacity));
|
|
989
996
|
}
|
|
990
997
|
|
|
991
|
-
.hover\:bg-light-background-
|
|
998
|
+
.hover\:bg-light-background-accent200:hover {
|
|
992
999
|
--tw-bg-opacity: 1;
|
|
993
|
-
background-color: rgb(
|
|
1000
|
+
background-color: rgb(250 250 250 / var(--tw-bg-opacity));
|
|
994
1001
|
}
|
|
995
1002
|
|
|
996
|
-
.hover\:bg-light-background-
|
|
1003
|
+
.hover\:bg-light-background-accent300:hover {
|
|
997
1004
|
--tw-bg-opacity: 1;
|
|
998
1005
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
999
1006
|
}
|
|
@@ -1034,11 +1041,6 @@ body {
|
|
|
1034
1041
|
background-color: rgb(255 205 41 / var(--tw-bg-opacity));
|
|
1035
1042
|
}
|
|
1036
1043
|
|
|
1037
|
-
.dark\:bg-dark-action-selected {
|
|
1038
|
-
--tw-bg-opacity: 1;
|
|
1039
|
-
background-color: rgb(78 78 78 / var(--tw-bg-opacity));
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
1044
|
.dark\:bg-dark-actionBackground-disabled {
|
|
1043
1045
|
--tw-bg-opacity: 1;
|
|
1044
1046
|
background-color: rgb(56 56 56 / var(--tw-bg-opacity));
|
|
@@ -1069,6 +1071,11 @@ body {
|
|
|
1069
1071
|
background-color: rgb(0 175 255 / var(--tw-bg-opacity));
|
|
1070
1072
|
}
|
|
1071
1073
|
|
|
1074
|
+
.dark\:bg-dark-primary-dark {
|
|
1075
|
+
--tw-bg-opacity: 1;
|
|
1076
|
+
background-color: rgb(233 233 233 / var(--tw-bg-opacity));
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1072
1079
|
.dark\:bg-dark-primary-main {
|
|
1073
1080
|
--tw-bg-opacity: 1;
|
|
1074
1081
|
background-color: rgb(213 213 213 / var(--tw-bg-opacity));
|
|
@@ -1091,7 +1098,7 @@ body {
|
|
|
1091
1098
|
|
|
1092
1099
|
.dark\:bg-light-background-accent300 {
|
|
1093
1100
|
--tw-bg-opacity: 1;
|
|
1094
|
-
background-color: rgb(
|
|
1101
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1095
1102
|
}
|
|
1096
1103
|
|
|
1097
1104
|
.dark\:text-dark-info-main {
|
|
@@ -1138,9 +1145,9 @@ body {
|
|
|
1138
1145
|
background-color: rgb(78 78 78 / var(--tw-bg-opacity));
|
|
1139
1146
|
}
|
|
1140
1147
|
|
|
1141
|
-
.dark\:hover\:bg-dark-
|
|
1148
|
+
.dark\:hover\:bg-dark-background-accent200:hover {
|
|
1142
1149
|
--tw-bg-opacity: 1;
|
|
1143
|
-
background-color: rgb(
|
|
1150
|
+
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
1144
1151
|
}
|
|
1145
1152
|
|
|
1146
1153
|
.dark\:hover\:bg-dark-background-accent300:hover {
|