fix(webui): unify continuous corners across shared surfaces
This commit is contained in:
1 parent
c4f9d79eb3
commit
3c47972a84
4 files changed
+21
-5
No files matched your search
@@ -561,7 +561,7 @@ export function WorkspaceProjectPicker({ isHero, disabled, scope, defaultScope,
|
||||
{compact && <Button variant="ghost" size="sm" aria-expanded={showLocations} onClick={() => setShowLocations(value => !value)} className="h-11 shrink-0 gap-1.5 rounded-control px-2 text-[12px]"><Star className="h-3.5 w-3.5" />{t("workspace.picker.shortcuts")}</Button>}
|
||||
<div className="relative min-w-0 flex-1">
|
||||
<Search className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
|
||||
<Input aria-label={t("workspace.picker.filter")} placeholder={t("workspace.picker.filter")} value={filterQuery} disabled={pickingFolder || editingPath || compact && showLocations} onChange={event => { setFilterQuery(event.target.value); setActiveIndex(0); setActiveColumn(currentColumnIndex); setHighlightActive(false); }} className={cn("h-11 rounded-[var(--picker-field-radius)] border-transparent pl-8 text-[16px] shadow-none sm:h-9 sm:text-[12px]", compact ? "bg-muted/60" : "bg-background/80")} />
|
||||
<Input aria-label={t("workspace.picker.filter")} placeholder={t("workspace.picker.filter")} value={filterQuery} disabled={pickingFolder || editingPath || compact && showLocations} onChange={event => { setFilterQuery(event.target.value); setActiveIndex(0); setActiveColumn(currentColumnIndex); setHighlightActive(false); }} className={cn("h-11 rounded-[var(--picker-field-radius)] border-transparent focus-visible:ring-0 pl-8 text-[16px] shadow-none sm:h-9 sm:text-[12px]", compact ? "bg-muted/60" : "bg-background/80")} />
|
||||
</div>
|
||||
</div>;
|
||||
|
||||
@@ -601,7 +601,7 @@ export function WorkspaceProjectPicker({ isHero, disabled, scope, defaultScope,
|
||||
onClick={() => history.previous && visitDirectory(history.previous)}><History className="h-4 w-4" /></PickerToolButton>
|
||||
</div>}
|
||||
<div className="flex min-w-0 flex-1 items-center rounded-[var(--picker-field-radius)] bg-background/80">
|
||||
{editingPath || !canBrowse ? <Input ref={inputRef} role="combobox" aria-expanded={open} aria-controls={`${optionsId}-${activeColumn}`} aria-activedescendant={highlightActive && activeOptions.length ? `${optionsId}-${activeColumn}-${activeOption}` : undefined} aria-autocomplete="list" aria-busy={loading} value={pathDraft} disabled={disabled || pickingFolder} onChange={event => changeDraft(event.target.value)} onBlur={event => { if (canBrowse && !keyboardInteraction && event.relatedTarget !== confirmRef.current) cancelPathEditing(false); }} placeholder={t("workspace.dialog.manual")} aria-label={t("workspace.dialog.manual")} aria-invalid={displayedError ? true : undefined} aria-describedby={displayedError ? errorId : undefined} className="h-9 min-w-0 flex-1 rounded-[var(--picker-field-radius)] text-[16px] sm:text-[13px]" onKeyDown={event => {
|
||||
{editingPath || !canBrowse ? <Input ref={inputRef} role="combobox" aria-expanded={open} aria-controls={`${optionsId}-${activeColumn}`} aria-activedescendant={highlightActive && activeOptions.length ? `${optionsId}-${activeColumn}-${activeOption}` : undefined} aria-autocomplete="list" aria-busy={loading} value={pathDraft} disabled={disabled || pickingFolder} onChange={event => changeDraft(event.target.value)} onBlur={event => { if (canBrowse && !keyboardInteraction && event.relatedTarget !== confirmRef.current) cancelPathEditing(false); }} placeholder={t("workspace.dialog.manual")} aria-label={t("workspace.dialog.manual")} aria-invalid={displayedError ? true : undefined} aria-describedby={displayedError ? errorId : undefined} className="h-9 min-w-0 flex-1 rounded-[var(--picker-field-radius)] border-transparent shadow-none focus-visible:ring-0 text-[16px] sm:text-[13px]" onKeyDown={event => {
|
||||
if (event.nativeEvent.isComposing) return;
|
||||
if ((event.key === "ArrowDown" || event.key === "ArrowUp") && !event.altKey && activeOptions.length) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -45,9 +45,10 @@
|
||||
--radius-control: 0.75rem;
|
||||
--radius-floating: 1.125rem;
|
||||
--radius-panel: 1.375rem;
|
||||
--radius-modal: 1.375rem;
|
||||
--radius-modal: 2rem;
|
||||
--radius-prominent: 1.75rem;
|
||||
--radius-pill: 9999px;
|
||||
--corner-shape: superellipse(1.5);
|
||||
--content-column-width: 49.5rem;
|
||||
--sidebar: 40 8% 96.8%;
|
||||
--sidebar-foreground: 0 0% 3.9%;
|
||||
@@ -112,6 +113,12 @@
|
||||
@apply border-border;
|
||||
}
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
corner-shape: var(--corner-shape);
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { clsx, type ClassValue } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import { extendTailwindMerge } from "tailwind-merge";
|
||||
|
||||
const twMerge = extendTailwindMerge({
|
||||
extend: {
|
||||
theme: {
|
||||
borderRadius: ["mark", "compact", "control", "floating", "panel", "modal", "prominent"],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export function cn(...inputs: ClassValue[]): string {
|
||||
return twMerge(clsx(inputs));
|
||||
|
||||
@@ -128,7 +128,8 @@ export default {
|
||||
plugins: [
|
||||
animate,
|
||||
typography,
|
||||
plugin(({ addVariant }) => {
|
||||
plugin(({ addVariant, addUtilities }) => {
|
||||
addUtilities({ ".rounded-full": { cornerShape: "round" } });
|
||||
// Revealing controls on emulated hover can consume the first Safari
|
||||
// tap. Keep these sidebar hover effects on hover-capable pointers.
|
||||
addVariant("media-hover", "@media (hover: hover)");
|
||||
|
||||
Reference in new issue
Block a user