Skip to content

Commit 0d7d38d

Browse files
Merge pull request #1967 from Wai-Technologies/users/nitin/bug-1620-issue-identified-in-unit-testing
Resolved bug 1620 : Design System > Components > Issues identified during Unit Testing of Slider, Text Editor, Tabs, Text Area, Video Player
2 parents 533f04f + 59d26db commit 0d7d38d

File tree

5 files changed

+67
-21
lines changed

5 files changed

+67
-21
lines changed

raaghu-elements/src/rds-icon/Icons.tsx

Lines changed: 2 additions & 0 deletions
Large diffs are not rendered by default.

raaghu-elements/src/rds-slider/rds-slider.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@
8484
.tooltip {
8585
position: absolute;
8686
top: -20px;
87-
// transform: translateX(-50%);
88-
transform: translate(-6px, 15px);
87+
transform: translate(-8px, 15px);
8988
background-color: #333;
9089
font-size: 12px;
9190
white-space: nowrap;

raaghu-elements/src/rds-tab-group/rds-tab-group.css

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,38 @@
2727

2828
/* Flap */
2929
.flap {
30-
background-color: #9747ff;
31-
color: #fff;
32-
position: relative;
30+
background-color: #9747ff;
31+
color: #fff;
32+
position: relative;
3333
}
3434

3535
.flap::after {
36-
content: "";
37-
position: absolute;
38-
bottom: -8px;
39-
left: 50%;
40-
transform: translateX(-50%);
41-
width: 0;
42-
height: 0;
43-
border-left: 10px solid transparent;
44-
border-right: 10px solid transparent;
45-
border-top: 10px solid #9747ff;
36+
content: "";
37+
position: absolute;
38+
bottom: -8px;
39+
left: 50%;
40+
transform: translateX(-50%);
41+
width: 0;
42+
height: 0;
43+
border-left: 10px solid transparent;
44+
border-right: 10px solid transparent;
45+
border-top: 10px solid #9747ff;
46+
}
47+
48+
.flap-disabled::after {
49+
border-top-color: #b987ff !important;
50+
pointer-events: none;
51+
user-select: none;
52+
opacity: 1.5;
53+
color: #999 !important;
54+
}
55+
56+
.flap-hover:hover::after {
57+
border-top-color: #ebdcff !important;
58+
}
59+
60+
.theme-dark .tab-group svg {
61+
color: rgb(173 165 165) !important;
4662
}
4763

4864
/* Pill */
@@ -140,12 +156,14 @@
140156
height: 16px;
141157
}
142158

159+
/* Base styling for vertical flap */
143160
.vertical-flap {
144161
background: #9747ff;
145162
color: #fff;
146163
position: relative;
147164
}
148-
165+
166+
/* Creates the arrow using borders */
149167
.vertical-flap::after {
150168
content: "";
151169
position: absolute;
@@ -159,6 +177,27 @@
159177
border-bottom: 18px solid transparent;
160178
}
161179

180+
/* Disabled flap */
181+
.vertical-flap-disabled {
182+
background: #d8c9ed; /* Optional: adjust background if needed */
183+
color: #999 !important;
184+
pointer-events: none;
185+
user-select: none;
186+
opacity: 0.6;
187+
}
188+
189+
/* Disabled arrow */
190+
.vertical-flap-disabled::after {
191+
border-left-color: #d8c9ed !important;
192+
border-top-color: transparent;
193+
border-bottom-color: transparent;
194+
}
195+
196+
/* Hover state: arrow color changes on hover */
197+
.vertical-flap-hover:hover::after {
198+
border-left-color: #ebdcff !important;
199+
}
200+
162201
.vertical-pill {
163202
background: #9747ff;
164203
color: #fff;
@@ -225,7 +264,7 @@
225264
pointer-events: none;
226265
user-select: none;
227266
opacity: 0.5;
228-
background-color: #ebdcff;
267+
background-color: #d8c9ed;
229268
color: #999;
230269
}
231270

raaghu-elements/src/rds-tab-group/rds-tab-group.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ const meta: Meta = {
3737
control: { type: "select" },
3838
},
3939
leftIcon :{
40-
options: ["user_tab","plus","pencil","edit"],
40+
options: ["user_tab","plus_new","pencil","edit"],
4141
control: { type: "select" },
4242
},
4343
rightIcon :{
44-
options: ["user_tab","plus","pencil","edit"],
44+
options: ["user_tab","plus_new","pencil","edit"],
4545
control: { type: "select" },
4646
},
4747
state: {
@@ -77,7 +77,7 @@ export const Default : Story = {
7777
showLeftIcon: true,
7878
leftIcon: "user_tab",
7979
showRightIcon: true,
80-
rightIcon: "plus",
80+
rightIcon: "plus_new",
8181
icon: "cancel",
8282
}
8383
} satisfies Story;

raaghu-elements/src/rds-tab-group/rds-tab-group.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ const RdsTabGroup = (props: RdsTabGroupProps) => {
7474
return (
7575
<div
7676
style={{ marginLeft: props.type === TabType.Vertical ? level * 20 : 0 }}
77-
className={`tab-level ${props.state === TabState.Hover ? "tab-group-hover" : ""} ${props.layout === "Pill" ? "tab-group-pill" : ""} ${props.type === TabType.Vertical ? (props.layout ? layoutClassesForVertical[props.layout] : "") : (props.layout ? layoutClassesForHorizontal[props.layout] : "")}`}
77+
className={`tab-level ${props.state === TabState.Hover ? "tab-group-hover" : ""} ${props.layout === "Pill" ? "tab-group-pill" : ""}
78+
${props.layout === "Flap" && props.state === TabState.Hover ? "flap-hover" : ""}
79+
${props.layout === "Pill" ? "tab-group-pill" : ""}
80+
${props.layout === "Flap" && props.state === TabState.Disabled ? "flap-disabled" : ""}
81+
${props.layout === "Vertical-Flap" && props.state === TabState.Hover ? "vertical-flap-hover" : ""}
82+
${props.layout === "Vertical-Flap" && props.state === TabState.Disabled ? "vertical-flap-disabled" : ""}
83+
${props.type === TabType.Vertical ? (props.layout ? layoutClassesForVertical[props.layout] : "") : (props.layout ? layoutClassesForHorizontal[props.layout] : "")}`}
7884
>
7985
{tabs.map((item, index) => (
8086
<div key={index} className={props.type === TabType.Horizontal ? "d-inline-block" : ""}>

0 commit comments

Comments
 (0)