Skip to content

Commit 409b5f8

Browse files
refactor: standardize disabled state and cursor: default (#728)
* refactor: standardize-disabled-state * refactor: remove cursor:pointer and add disabled states
1 parent 0ff844a commit 409b5f8

16 files changed

Lines changed: 33 additions & 80 deletions

File tree

packages/raystack/components/breadcrumb/breadcrumb.module.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
}
5454

5555
.breadcrumb-link-disabled {
56-
color: var(--rs-color-foreground-base-tertiary);
5756
opacity: 0.5;
58-
cursor: not-allowed;
5957
pointer-events: none;
6058
}
6159

@@ -106,4 +104,4 @@
106104
.breadcrumb-dropdown-item:hover {
107105
background-color: var(--rs-color-background-base-primary-hover);
108106
border-radius: var(--rs-radius-2);
109-
}
107+
}

packages/raystack/components/button/button.module.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
.button:disabled,
3434
.button-disabled {
3535
opacity: 0.5;
36-
cursor: not-allowed;
3736
pointer-events: initial;
3837
}
3938

@@ -104,7 +103,7 @@
104103
.button-outline.button-disabled {
105104
opacity: 0.5;
106105
background-color: transparent;
107-
cursor: not-allowed;
106+
cursor: default;
108107
}
109108

110109
.button-outline:disabled:hover,
@@ -127,7 +126,6 @@
127126
background-color: transparent;
128127
color: var(--rs-color-foreground-accent-primary);
129128
border-color: var(--rs-color-border-accent-primary);
130-
cursor: not-allowed;
131129
}
132130

133131
.button-outline-accent.button-loading:hover {
@@ -170,7 +168,6 @@
170168
.button-ghost:disabled,
171169
.button-ghost.button-disabled {
172170
opacity: 0.5;
173-
cursor: not-allowed;
174171
}
175172

176173
.button-ghost:disabled:hover,
@@ -192,7 +189,6 @@
192189
.button-ghost.button-loading[data-radix-dropdown-menu-trigger][data-state="open"] {
193190
background-color: transparent;
194191
border-color: var(--rs-color-border-base-primary);
195-
cursor: not-allowed;
196192
}
197193

198194
.button-text {
@@ -210,15 +206,13 @@
210206
.button-text:disabled,
211207
.button-text.button-disabled {
212208
opacity: 0.5;
213-
cursor: not-allowed;
214209
}
215210

216211
.button-text.button-loading:hover,
217212
.button-text.button-loading:active,
218213
.button-text.button-loading[data-radix-popover-trigger][data-state="open"],
219214
.button-text.button-loading[data-radix-dropdown-menu-trigger][data-state="open"] {
220215
background-color: transparent;
221-
cursor: not-allowed;
222216
}
223217

224218
.button-text:disabled:hover,
@@ -243,7 +237,6 @@
243237
.button-loading[data-radix-popover-trigger][data-state="open"],
244238
.button-loading[data-radix-dropdown-menu-trigger][data-state="open"] {
245239
background-color: inherit;
246-
cursor: not-allowed;
247240
}
248241

249242
.loader {

packages/raystack/components/calendar/calendar.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@
198198
}
199199

200200
.disabled {
201-
color: var(--rs-color-foreground-base-tertiary);
202-
opacity: 0.8;
201+
opacity: 0.5;
203202
}
204203

205204
.day.today button::after {

packages/raystack/components/checkbox/checkbox.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848

4949
.checkbox[data-disabled] {
5050
opacity: 0.5;
51-
cursor: not-allowed;
5251
}
5352

5453
.checkbox[data-disabled]:hover {

packages/raystack/components/combobox/combobox.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
.menuitem[data-disabled] {
55-
opacity: 0.6;
55+
opacity: 0.5;
5656
pointer-events: none;
5757
}
5858

packages/raystack/components/icon-button/icon-button.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
}
1818

1919
.iconButton:disabled {
20-
cursor: not-allowed;
2120
opacity: 0.5;
22-
color: var(--rs-color-foreground-base-secondary);
21+
cursor: default;
2322
}
2423

2524
.iconButton:active:not(:disabled) {

packages/raystack/components/input-field/input-field.module.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@
5959
}
6060

6161
.input-disabled-wrapper {
62-
background: var(--rs-color-background-base-primary);
63-
border-color: var(--rs-color-border-base-tertiary);
64-
opacity: 0.4;
65-
cursor: not-allowed;
62+
opacity: 0.5;
6663
}
6764

6865
.leading-icon {
@@ -121,7 +118,6 @@
121118

122119
.input-disabled {
123120
color: var(--rs-color-foreground-base-tertiary);
124-
cursor: not-allowed;
125121
}
126122

127123
.helper-text {
@@ -310,4 +306,4 @@
310306
.input-error-wrapper.variant-borderless:hover,
311307
.input-error-wrapper.variant-borderless:focus-within {
312308
border-color: transparent;
313-
}
309+
}

packages/raystack/components/menu/cell.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
.cell[aria-disabled] {
26-
opacity: 0.6;
26+
opacity: 0.5;
2727
pointer-events: none;
2828
}
2929

packages/raystack/components/radio/radio.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
.radioitem[data-disabled]:hover {
3939
background: var(--rs-color-background-neutral-secondary);
4040
border-color: var(--rs-color-border-base-secondary);
41-
cursor: not-allowed;
4241
}
4342

4443
.radioitem[data-disabled][data-checked],
@@ -67,4 +66,4 @@
6766

6867
.radioitem[data-disabled] .indicator::after {
6968
background: var(--rs-color-foreground-base-emphasis);
70-
}
69+
}

packages/raystack/components/search/search.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
}
2323

2424
.clearButton:disabled {
25-
cursor: not-allowed;
2625
opacity: 0.5;
2726
}
2827

0 commit comments

Comments
 (0)