Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/raystack/components/button/button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.button-disabled {
opacity: 0.5;
pointer-events: initial;
cursor: default;
cursor: not-allowed;
}

.button:disabled:hover,
Expand Down Expand Up @@ -96,7 +96,7 @@
.button-outline.button-disabled {
opacity: 0.5;
background-color: transparent;
cursor: default;
cursor: not-allowed;
}

.button-outline:disabled:hover,
Expand Down
3 changes: 1 addition & 2 deletions packages/raystack/components/checkbox/checkbox.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
min-height: var(--rs-space-4);
}

.checkbox:hover {
.checkbox:not([data-disabled]):hover {
background: var(--rs-color-background-base-primary-hover);
border-color: var(--rs-color-border-base-focus);
}
Expand Down Expand Up @@ -84,7 +84,6 @@
.checkbox[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}

/* A4: Preserve checked state when disabled */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

.iconButton:disabled {
opacity: 0.5;
cursor: default;
cursor: not-allowed;
}

.iconButton-size-1 {
Expand Down
2 changes: 2 additions & 0 deletions packages/raystack/components/input/input.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

.input-wrapper[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
}

.input-wrapper[data-disabled]:hover {
Expand Down Expand Up @@ -91,6 +92,7 @@

.input-field[data-disabled] {
color: var(--rs-color-foreground-base-tertiary);
cursor: not-allowed;
}

.has-leading-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
.increment[data-disabled] {
pointer-events: none;
opacity: 0.5;
cursor: not-allowed;
}

.input {
Expand All @@ -65,6 +66,7 @@
.input[data-disabled] {
pointer-events: none;
opacity: 0.5;
cursor: not-allowed;
}

.scrub-area {
Expand Down
1 change: 1 addition & 0 deletions packages/raystack/components/radio/radio.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
.radioitem[data-disabled]:hover {
background: var(--rs-color-background-neutral-secondary);
border-color: var(--rs-color-border-base-secondary);
cursor: not-allowed;
}

.radioitem[data-disabled][data-checked],
Expand Down
1 change: 1 addition & 0 deletions packages/raystack/components/search/search.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

.clearButton:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.clearButton svg {
Expand Down
1 change: 1 addition & 0 deletions packages/raystack/components/switch/switch.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

.switch[data-disabled] {
background: var(--rs-color-background-neutral-primary);
cursor: not-allowed;
}

.switch[data-disabled][data-checked] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
.textarea[data-disabled],
.disabled {
opacity: 0.5;
cursor: not-allowed;
}

.textarea:read-only {
Expand Down
2 changes: 2 additions & 0 deletions packages/raystack/components/toggle/toggle.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
.toggle[data-disabled] {
opacity: 0.5;
pointer-events: none;
cursor: not-allowed;
}
Comment on lines 36 to 40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

cursor: not-allowed won’t take effect while pointer-events: none is set.

With pointer-events: none, these elements won’t receive hover hit-testing, so the new cursor style is effectively bypassed. If the goal is visible disabled cursor feedback, remove pointer-events: none here and rely on disabled-state guards in behavior/event handling.

Also applies to: 96-100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/raystack/components/toggle/toggle.module.css` around lines 36 - 40,
The CSS rule .toggle[data-disabled] sets pointer-events: none which prevents the
not-allowed cursor from showing; remove the pointer-events: none declaration
from .toggle[data-disabled] (and the identical rule around lines 96-100) so the
cursor: not-allowed is visible while keeping opacity: 0.5, and ensure
event/behavior-level guards in the Toggle component (event handlers that check
dataset/props disabled state) prevent interactions instead of relying on
pointer-events.


.size-1 {
Expand Down Expand Up @@ -95,4 +96,5 @@
.group[data-disabled] {
opacity: 0.5;
pointer-events: none;
cursor: not-allowed;
}
Loading