hds-web 1.6.3 → 1.6.4
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.css +2 -2
- package/dist/index.es.css +2 -2
- package/dist/index.es.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/HDS/components/Buttons/button.js +11 -1
- package/src/HDS/components/Tabs/tab.js +13 -4
- package/src/styles/tailwind.css +5 -0
package/package.json
CHANGED
@@ -38,12 +38,22 @@ const Buttonclasses = {
|
|
38
38
|
'default': {
|
39
39
|
'base': 'db:w-fit tb:w-fit w-full justify-center border-2 border-blue-500 text-blue-500',
|
40
40
|
|
41
|
-
'hover': 'hover:text-neutral-0 hover:bg-blue-700 hover:border-2 hover:border-blue-700 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:
|
41
|
+
'hover': 'hover:text-neutral-0 hover:bg-blue-700 hover:border-2 hover:border-blue-700 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:duration-300',
|
42
42
|
|
43
43
|
'focus': 'focus:bg-blue-200 focus:text-blue-500 focus:border-2 border-blue-500 focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none focus:text-blue-500',
|
44
44
|
},
|
45
45
|
'disabled': 'bg-neutral-200 text-neutral-400',
|
46
46
|
},
|
47
|
+
'secondaryWhite': {
|
48
|
+
'default': {
|
49
|
+
'base': 'db:w-fit tb:w-fit w-full justify-center border-2 border-neutral-0 text-neutral-0 ',
|
50
|
+
|
51
|
+
'hover': 'hover:text-neutral-0 hover:border-2 hover:border-neutral-0 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:duration-300',
|
52
|
+
|
53
|
+
'focus': 'focus:text-neutrak-0 focus:border-2 border-neutral-0 focus:outline-none focus:text-neutral-0',
|
54
|
+
},
|
55
|
+
'disabled': 'bg-neutral-200 text-neutral-400',
|
56
|
+
},
|
47
57
|
|
48
58
|
'ghost': {
|
49
59
|
'default': {
|
@@ -7,8 +7,7 @@ export default function Tab(props) {
|
|
7
7
|
const {
|
8
8
|
tabs,
|
9
9
|
onTabClick,
|
10
|
-
pillColor
|
11
|
-
|
10
|
+
pillColor,
|
12
11
|
} = props;
|
13
12
|
const [activeTab, setActiveTab] = useState(tabs.find(tab => tab.current) || tabs[0]);
|
14
13
|
const pillRef = useRef(null);
|
@@ -16,6 +15,7 @@ export default function Tab(props) {
|
|
16
15
|
if(pillColor){
|
17
16
|
pillColorClass = HDSColor(pillColor);
|
18
17
|
}
|
18
|
+
|
19
19
|
|
20
20
|
const handleTabClick = (event, clickedTab) => {
|
21
21
|
event.preventDefault();
|
@@ -36,10 +36,19 @@ export default function Tab(props) {
|
|
36
36
|
pill.style.width = `${pillWidth}px`;
|
37
37
|
}
|
38
38
|
};
|
39
|
+
let tabTextClass = '';
|
39
40
|
|
40
41
|
function tabClass(name) {
|
42
|
+
|
43
|
+
// console.log(currentTab['tabTextColorClass']);
|
44
|
+
|
45
|
+
if(activeTab['tabTextColorClass']){
|
46
|
+
tabTextClass = HDSColor(activeTab['tabTextColorClass']);
|
47
|
+
}
|
48
|
+
else tabTextClass = 'text-neutral-500'
|
49
|
+
|
41
50
|
let classActive = ' text-neutral-0 transition-all rounded-full ' + pillColorClass;
|
42
|
-
let clasnInActive = '
|
51
|
+
let clasnInActive = ' flex-nowrap rounded-full ' + tabTextClass;
|
43
52
|
if (activeTab.name === name) {
|
44
53
|
return classActive;
|
45
54
|
}
|
@@ -79,5 +88,5 @@ export default function Tab(props) {
|
|
79
88
|
}
|
80
89
|
|
81
90
|
Tab.defaultProps = {
|
82
|
-
pillColor: 'bg-blue-500'
|
91
|
+
pillColor: 'bg-blue-500',
|
83
92
|
}
|
package/src/styles/tailwind.css
CHANGED
@@ -8107,6 +8107,11 @@ select {
|
|
8107
8107
|
border-color: rgb(210 214 219 / var(--tw-border-opacity));
|
8108
8108
|
}
|
8109
8109
|
|
8110
|
+
.hover\:border-neutral-0:hover {
|
8111
|
+
--tw-border-opacity: 1;
|
8112
|
+
border-color: rgb(255 255 255 / var(--tw-border-opacity));
|
8113
|
+
}
|
8114
|
+
|
8110
8115
|
.hover\:bg-blue-100:hover {
|
8111
8116
|
--tw-bg-opacity: 1;
|
8112
8117
|
background-color: rgb(240 244 255 / var(--tw-bg-opacity));
|