diff --git a/web/lib/opal/src/components/buttons/chevron.css b/web/lib/opal/src/components/buttons/chevron.css index ef4498d164..fef5259177 100644 --- a/web/lib/opal/src/components/buttons/chevron.css +++ b/web/lib/opal/src/components/buttons/chevron.css @@ -1,8 +1,8 @@ -.opal-button-chevron { +.opal-chevron { transition: rotate 200ms ease; } -.interactive[data-interaction="hover"] .opal-button-chevron, -.interactive[data-interaction="active"] .opal-button-chevron { +.interactive[data-interaction="hover"] .opal-chevron, +.interactive[data-interaction="active"] .opal-chevron { rotate: -180deg; } diff --git a/web/lib/opal/src/components/buttons/chevron.tsx b/web/lib/opal/src/components/buttons/chevron.tsx index 0b00669ba6..d52821a052 100644 --- a/web/lib/opal/src/components/buttons/chevron.tsx +++ b/web/lib/opal/src/components/buttons/chevron.tsx @@ -12,10 +12,7 @@ import { cn } from "@opal/utils"; */ function ChevronIcon({ className, ...props }: IconProps) { return ( - + ); } diff --git a/web/lib/opal/src/components/buttons/link-button/components.tsx b/web/lib/opal/src/components/buttons/link-button/components.tsx index df56f71359..8706bf4df9 100644 --- a/web/lib/opal/src/components/buttons/link-button/components.tsx +++ b/web/lib/opal/src/components/buttons/link-button/components.tsx @@ -66,9 +66,7 @@ function LinkButton({ }: LinkButtonProps) { const inner = ( <> - - {children} - + {children} {/* The glyph is aria-hidden, so new-window behavior needs a spoken cue. */} {target === "_blank" && ( (opens in new tab) diff --git a/web/lib/opal/src/components/buttons/link-button/styles.css b/web/lib/opal/src/components/buttons/link-button/styles.css index cd67c0d3be..93e6e75a47 100644 --- a/web/lib/opal/src/components/buttons/link-button/styles.css +++ b/web/lib/opal/src/components/buttons/link-button/styles.css @@ -28,6 +28,6 @@ /* `font-secondary-body` is a plain CSS class defined in globals.css (not a Tailwind utility), so `@apply` can't consume it — other Opal components attach it via `className` on the JSX element, and we do the same here. */ -.opal-link-button-label { +.opal-link-label { @apply underline; } diff --git a/web/lib/opal/src/components/buttons/select-button/README.md b/web/lib/opal/src/components/buttons/select-button/README.md index ce6cc644c3..430def37eb 100644 --- a/web/lib/opal/src/components/buttons/select-button/README.md +++ b/web/lib/opal/src/components/buttons/select-button/README.md @@ -28,10 +28,10 @@ Use SelectButton for general-purpose stateful toggles. Use `OpenButton` for popo ``` Interactive.Stateful <- variant, state, interaction, disabled, onClick └─ Interactive.Container <- height, rounding, padding (from `size`) - └─ div.opal-select-button.interactive-foreground + └─ div.opal-select-content.interactive-foreground ├─ Icon? (interactive-foreground-icon) ├─ [Foldable]? (wraps label + rightIcon when foldable) - │ ├─ .opal-select-button-label + │ ├─ .opal-select-content-label │ └─ RightIcon? └─ ? / RightIcon? (non-foldable) ``` diff --git a/web/lib/opal/src/components/buttons/select-button/components.tsx b/web/lib/opal/src/components/buttons/select-button/components.tsx index c31cd2d5ca..8ab2277e6a 100644 --- a/web/lib/opal/src/components/buttons/select-button/components.tsx +++ b/web/lib/opal/src/components/buttons/select-button/components.tsx @@ -102,7 +102,7 @@ function SelectButton({ > diff --git a/web/lib/opal/src/components/buttons/select-button/styles.css b/web/lib/opal/src/components/buttons/select-button/styles.css index 50ae7e9912..45b5be4341 100644 --- a/web/lib/opal/src/components/buttons/select-button/styles.css +++ b/web/lib/opal/src/components/buttons/select-button/styles.css @@ -2,6 +2,6 @@ /* SelectButton — layout only; colors handled by Interactive.Stateful */ -.opal-select-button { +.opal-select-content { @apply flex flex-row items-center gap-1; } diff --git a/web/lib/opal/src/components/buttons/text-button/README.md b/web/lib/opal/src/components/buttons/text-button/README.md index afd70adc9b..e9b65c1232 100644 --- a/web/lib/opal/src/components/buttons/text-button/README.md +++ b/web/lib/opal/src/components/buttons/text-button/README.md @@ -15,7 +15,7 @@ slots). ``` Interactive.Stateless <- always variant="default" / prominence="tertiary"; disabled, href, onClick - └─ / <- .opal-text-button.interactive-foreground, no height/rounding/padding/border + └─ / <- .opal-text-label.interactive-foreground, no height/rounding/padding/border └─ ``` diff --git a/web/lib/opal/src/components/buttons/text-button/components.tsx b/web/lib/opal/src/components/buttons/text-button/components.tsx index 40fda2cf96..c9614642fd 100644 --- a/web/lib/opal/src/components/buttons/text-button/components.tsx +++ b/web/lib/opal/src/components/buttons/text-button/components.tsx @@ -81,12 +81,12 @@ function TextButton({ href={(disabled ? undefined : href) as Route} target={target} rel={target === "_blank" ? "noopener noreferrer" : undefined} - className="opal-text-button interactive-foreground" + className="opal-text-label interactive-foreground" > {label} ) : ( - {label} + {label} )} ); diff --git a/web/lib/opal/src/components/buttons/text-button/styles.css b/web/lib/opal/src/components/buttons/text-button/styles.css index df034e8298..24e2657eb4 100644 --- a/web/lib/opal/src/components/buttons/text-button/styles.css +++ b/web/lib/opal/src/components/buttons/text-button/styles.css @@ -14,6 +14,6 @@ plain `Text` node with hover/active color animation. ============================================================================ */ -.opal-text-button { +.opal-text-label { @apply bg-transparent; } diff --git a/web/src/app/css/attachment-button.css b/web/src/app/css/attachment-item.css similarity index 69% rename from web/src/app/css/attachment-button.css rename to web/src/app/css/attachment-item.css index 020a32f9ee..a7ae375fae 100644 --- a/web/src/app/css/attachment-button.css +++ b/web/src/app/css/attachment-item.css @@ -1,6 +1,6 @@ /* AttachmentButton styles */ -.attachment-button { +.attachment-item { display: flex; flex-direction: row; width: 100%; @@ -10,15 +10,15 @@ gap: 0.5rem; } -.attachment-button:hover { +.attachment-item:hover { background-color: var(--background-tint-02); } -.attachment-button[data-state="selected"] { +.attachment-item[data-state="selected"] { background-color: var(--action-selection-01); } -.attachment-button__content { +.attachment-item__content { flex: 1; display: flex; flex-direction: row; @@ -26,7 +26,7 @@ min-width: 0; } -.attachment-button__icon-wrapper { +.attachment-item__icon-wrapper { height: 100%; aspect-ratio: 1; background-color: var(--background-tint-01); @@ -38,17 +38,17 @@ flex-shrink: 0; } -.attachment-button__icon { +.attachment-item__icon { height: 1rem; width: 1rem; stroke: var(--text-02); } -.attachment-button[data-state="processing"] .attachment-button__icon { +.attachment-item[data-state="processing"] .attachment-item__icon { stroke: var(--text-01); } -.attachment-button__text-container { +.attachment-item__text-container { display: flex; flex-direction: column; align-items: flex-start; @@ -57,7 +57,7 @@ flex: 1; } -.attachment-button__title-row { +.attachment-item__title-row { display: flex; flex-direction: row; align-items: center; @@ -66,23 +66,23 @@ min-width: 0; } -.attachment-button__title-wrapper { +.attachment-item__title-wrapper { max-width: 70%; min-width: 0; flex-shrink: 1; overflow: hidden; } -.attachment-button__view-button { +.attachment-item__view { flex-shrink: 0; visibility: hidden; } -.attachment-button:hover .attachment-button__view-button { +.attachment-item:hover .attachment-item__view { visibility: visible; } -.attachment-button__actions { +.attachment-item__actions { display: flex; flex-direction: row; align-self: stretch; @@ -93,10 +93,10 @@ flex-shrink: 0; } -.attachment-button__action-button { +.attachment-item__action { visibility: hidden; } -.attachment-button:hover .attachment-button__action-button { +.attachment-item:hover .attachment-item__action { visibility: visible; } diff --git a/web/src/app/css/line-item.css b/web/src/app/css/line-item.css index 6224b0e9be..edbfed84a8 100644 --- a/web/src/app/css/line-item.css +++ b/web/src/app/css/line-item.css @@ -1,6 +1,6 @@ /* LineItem Button Variants */ /* Hover styles are disabled when keyboard navigation is active (data-keyboard-nav on parent) */ -.line-item-button-main { +.line-item-row-main { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -8,7 +8,7 @@ } } -.line-item-button-main-emphasized { +.line-item-row-main-emphasized { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -25,7 +25,7 @@ } } -.line-item-button-strikethrough { +.line-item-row-strikethrough { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -33,7 +33,7 @@ } } -.line-item-button-strikethrough-emphasized { +.line-item-row-strikethrough-emphasized { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -41,15 +41,15 @@ } } -.line-item-button-disabled { +.line-item-row-disabled { @apply bg-transparent cursor-not-allowed; } -.line-item-button-disabled-emphasized { +.line-item-row-disabled-emphasized { @apply bg-transparent cursor-not-allowed; } -.line-item-button-danger { +.line-item-row-danger { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -57,7 +57,7 @@ } } -.line-item-button-danger-emphasized { +.line-item-row-danger-emphasized { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -75,7 +75,7 @@ } /* Action Variant - same background behavior as main */ -.line-item-button-action { +.line-item-row-action { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -83,7 +83,7 @@ } } -.line-item-button-action-emphasized { +.line-item-row-action-emphasized { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -101,7 +101,7 @@ } /* Muted Variant - subdued styling for less prominent items */ -.line-item-button-muted { +.line-item-row-muted { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -109,7 +109,7 @@ } } -.line-item-button-muted-emphasized { +.line-item-row-muted-emphasized { @apply bg-transparent hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { @@ -127,7 +127,7 @@ } /* Skeleton Variant - dashed border placeholder style */ -.line-item-button-skeleton { +.line-item-row-skeleton { @apply bg-transparent border border-dashed border-border-01 hover:bg-background-tint-01; [data-keyboard-nav="true"] &:hover { @@ -135,7 +135,7 @@ } } -.line-item-button-skeleton-emphasized { +.line-item-row-skeleton-emphasized { @apply bg-transparent border border-dashed border-border-01 hover:bg-background-tint-02; [data-keyboard-nav="true"] &:hover { diff --git a/web/src/app/globals.css b/web/src/app/globals.css index c2f277e3f5..b9806cd389 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -1,5 +1,5 @@ @import "@onyx-ai/opal/root.css"; -@import "./css/attachment-button.css" layer(base); +@import "./css/attachment-item.css" layer(base); @import "./css/button.css" layer(base); @import "./css/content-editable.css" layer(base); @import "./css/card.css" layer(base); diff --git a/web/src/layouts/general-layouts.tsx b/web/src/layouts/general-layouts.tsx index baf51f6e31..1cfcf57a78 100644 --- a/web/src/layouts/general-layouts.tsx +++ b/web/src/layouts/general-layouts.tsx @@ -37,10 +37,10 @@ function AttachmentItemLayout({ - + diff --git a/web/src/refresh-components/buttons/AttachmentButton.tsx b/web/src/refresh-components/buttons/AttachmentButton.tsx index 815d097767..cb314424dd 100644 --- a/web/src/refresh-components/buttons/AttachmentButton.tsx +++ b/web/src/refresh-components/buttons/AttachmentButton.tsx @@ -110,21 +110,21 @@ export default function AttachmentButton({ return ( - - + + {selected ? ( ) : ( - + )} - - - + + + {children} @@ -135,7 +135,7 @@ export default function AttachmentButton({ icon={SvgExternalLink} onClick={noProp(onView)} internal - className="attachment-button__view-button" + className="attachment-item__view" /> )} @@ -147,14 +147,14 @@ export default function AttachmentButton({ - + {rightText && ( {rightText} )} {actionIcon && onAction && ( - + secondary: { enabled: [ "stroke-text-03", - "group-hover/IconButton:stroke-text-04", + "group-hover/IconAction:stroke-text-04", transient && "stroke-text-04", - "group-active/IconButton:stroke-text-05", + "group-active/IconAction:stroke-text-05", ], disabled: ["stroke-text-01"], }, tertiary: { enabled: [ "stroke-text-03", - "group-hover/IconButton:stroke-text-04", + "group-hover/IconAction:stroke-text-04", transient && "stroke-text-04", - "group-active/IconButton:stroke-text-05", + "group-active/IconAction:stroke-text-05", ], disabled: ["stroke-text-01"], }, internal: { enabled: [ "stroke-text-02", - "group-hover/IconButton:stroke-text-04", + "group-hover/IconAction:stroke-text-04", transient && "stroke-text-04", - "group-active/IconButton:stroke-text-05", + "group-active/IconAction:stroke-text-05", ], disabled: ["stroke-text-01"], }, small: { enabled: [ "stroke-text-02", - "group-hover/IconButton:stroke-text-04", + "group-hover/IconAction:stroke-text-04", transient && "stroke-text-04", - "group-active/IconButton:stroke-text-05", + "group-active/IconAction:stroke-text-05", ], disabled: ["stroke-text-01"], }, @@ -202,36 +202,36 @@ const iconClasses = (transient: boolean | undefined) => secondary: { enabled: [ "stroke-action-selection-05", - "group-hover/IconButton:stroke-action-selection-05", + "group-hover/IconAction:stroke-action-selection-05", transient && "stroke-action-selection-05", - "group-active/IconButton:stroke-action-selection-06", + "group-active/IconAction:stroke-action-selection-06", ], disabled: ["stroke-action-selection-02"], }, tertiary: { enabled: [ "stroke-action-selection-05", - "group-hover/IconButton:stroke-action-selection-05", + "group-hover/IconAction:stroke-action-selection-05", transient && "stroke-action-selection-05", - "group-active/IconButton:stroke-action-selection-06", + "group-active/IconAction:stroke-action-selection-06", ], disabled: ["stroke-action-selection-02"], }, internal: { enabled: [ "stroke-action-selection-05", - "group-hover/IconButton:stroke-action-selection-05", + "group-hover/IconAction:stroke-action-selection-05", transient && "stroke-action-selection-05", - "group-active/IconButton:stroke-action-selection-06", + "group-active/IconAction:stroke-action-selection-06", ], disabled: ["stroke-action-selection-02"], }, small: { enabled: [ "stroke-action-selection-05", - "group-hover/IconButton:stroke-action-selection-05", + "group-hover/IconAction:stroke-action-selection-05", transient && "stroke-action-selection-05", - "group-active/IconButton:stroke-action-selection-06", + "group-active/IconAction:stroke-action-selection-06", ], disabled: ["stroke-action-selection-02"], }, @@ -244,36 +244,36 @@ const iconClasses = (transient: boolean | undefined) => secondary: { enabled: [ "stroke-action-danger-05", - "group-hover/IconButton:stroke-action-danger-05", + "group-hover/IconAction:stroke-action-danger-05", transient && "stroke-action-danger-05", - "group-active/IconButton:stroke-action-danger-06", + "group-active/IconAction:stroke-action-danger-06", ], disabled: ["stroke-action-danger-02"], }, tertiary: { enabled: [ "stroke-action-danger-05", - "group-hover/IconButton:stroke-action-danger-05", + "group-hover/IconAction:stroke-action-danger-05", transient && "stroke-action-danger-05", - "group-active/IconButton:stroke-action-danger-06", + "group-active/IconAction:stroke-action-danger-06", ], disabled: ["stroke-action-danger-02"], }, internal: { enabled: [ "stroke-action-danger-05", - "group-hover/IconButton:stroke-action-danger-05", + "group-hover/IconAction:stroke-action-danger-05", transient && "stroke-action-danger-05", - "group-active/IconButton:stroke-action-danger-06", + "group-active/IconAction:stroke-action-danger-06", ], disabled: ["stroke-action-danger-02"], }, small: { enabled: [ "stroke-action-danger-05", - "group-hover/IconButton:stroke-action-danger-05", + "group-hover/IconAction:stroke-action-danger-05", transient && "stroke-action-danger-05", - "group-active/IconButton:stroke-action-danger-06", + "group-active/IconAction:stroke-action-danger-06", ], disabled: ["stroke-action-danger-02"], }, @@ -365,7 +365,7 @@ export default function IconButton({ main: { enabled: [ "stroke-text-03", - "group-hover/SelectButton:stroke-text-04", + "group-hover/SelectAction:stroke-text-04", transient && "stroke-text-04", - "group-active/SelectButton:stroke-text-05", + "group-active/SelectAction:stroke-text-05", ], disabled: ["stroke-text-02"], }, @@ -47,11 +47,11 @@ const iconClassNames = (engaged?: boolean, transient?: boolean) => enabled: [ engaged ? "stroke-action-selection-05" : "stroke-text-03", engaged - ? "group-hover/SelectButton:stroke-action-selection-05" - : "group-hover/SelectButton:stroke-text-04", + ? "group-hover/SelectAction:stroke-action-selection-05" + : "group-hover/SelectAction:stroke-text-04", engaged - ? "group-active/SelectButton:stroke-action-selection-06" - : "group-active/SelectButton:stroke-text-05", + ? "group-active/SelectAction:stroke-action-selection-06" + : "group-active/SelectAction:stroke-text-05", ], disabled: ["stroke-action-selection-03"], }, @@ -62,9 +62,9 @@ const textClassNames = (engaged?: boolean, transient?: boolean) => main: { enabled: [ "text-text-03", - "group-hover/SelectButton:text-text-04", + "group-hover/SelectAction:text-text-04", transient && "text-text-04", - "group-active/SelectButton:text-text-05", + "group-active/SelectAction:text-text-05", ], disabled: ["text-text-01"], }, @@ -72,11 +72,11 @@ const textClassNames = (engaged?: boolean, transient?: boolean) => enabled: [ engaged ? "text-action-selection-05" : "text-text-03", engaged - ? "group-hover/SelectButton:text-action-selection-05" - : "group-hover/SelectButton:text-text-04", + ? "group-hover/SelectAction:text-action-selection-05" + : "group-hover/SelectAction:text-text-04", engaged - ? "group-active/SelectButton:text-action-selection-06" - : "group-active/SelectButton:text-text-05", + ? "group-active/SelectAction:text-action-selection-06" + : "group-active/SelectAction:text-text-05", ], disabled: ["stroke-action-selection-03"], }, @@ -175,7 +175,7 @@ export default function SelectButton({