Skip to content

Commit 70cf609

Browse files
committed
Revert "feat(ui): Select, dropdown, popover styles & transitions (anomalyco#11675)"
This reverts commit 377bf7f.
1 parent 2f76b49 commit 70cf609

19 files changed

Lines changed: 129 additions & 620 deletions

packages/app/src/components/dialog-select-model.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ const ModelList: Component<{
9090

9191
export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
9292
provider?: string
93-
children?: JSX.Element | ((open: boolean) => JSX.Element)
93+
children?: JSX.Element
9494
triggerAs?: T
9595
triggerProps?: ComponentProps<T>
96-
gutter?: number
9796
}) {
9897
const [store, setStore] = createStore<{
9998
open: boolean
@@ -176,14 +175,14 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
176175
}}
177176
modal={false}
178177
placement="top-start"
179-
gutter={props.gutter ?? 8}
178+
gutter={8}
180179
>
181180
<Kobalte.Trigger
182181
ref={(el) => setStore("trigger", el)}
183182
as={props.triggerAs ?? "div"}
184183
{...(props.triggerProps as any)}
185184
>
186-
{typeof props.children === "function" ? props.children(store.open) : props.children}
185+
{props.children}
187186
</Kobalte.Trigger>
188187
<Kobalte.Portal>
189188
<Kobalte.Content

packages/app/src/components/prompt-input.tsx

Lines changed: 42 additions & 83 deletions
Large diffs are not rendered by default.

packages/app/src/components/settings-general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export const SettingsGeneral: Component = () => {
226226
variant="secondary"
227227
size="small"
228228
triggerVariant="settings"
229-
triggerStyle={{ "font-family": monoFontFamily(settings.appearance.font()), "field-sizing": "content" }}
229+
triggerStyle={{ "font-family": monoFontFamily(settings.appearance.font()), "min-width": "180px" }}
230230
>
231231
{(option) => (
232232
<span style={{ "font-family": monoFontFamily(option?.value) }}>

packages/ui/src/components/button.css

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
user-select: none;
1010
cursor: default;
1111
outline: none;
12-
padding: 4px 8px;
1312
white-space: nowrap;
14-
transition-property: background-color, border-color, color, box-shadow, opacity;
15-
transition-duration: var(--transition-duration);
16-
transition-timing-function: var(--transition-easing);
17-
outline: none;
18-
line-height: 20px;
1913

2014
&[data-variant="primary"] {
2115
background-color: var(--button-primary-base);
@@ -100,6 +94,7 @@
10094
&:active:not(:disabled) {
10195
background-color: var(--button-secondary-base);
10296
scale: 0.99;
97+
transition: all 150ms ease-out;
10398
}
10499
&:disabled {
105100
border-color: var(--border-disabled);
@@ -115,32 +110,33 @@
115110

116111
&[data-size="small"] {
117112
height: 22px;
118-
padding: 4px 8px;
113+
padding: 0 8px;
119114
&[data-icon] {
120-
padding: 4px 12px 4px 4px;
115+
padding: 0 12px 0 4px;
121116
}
122117

118+
font-size: var(--font-size-small);
119+
line-height: var(--line-height-large);
123120
gap: 4px;
124121

125122
/* text-12-medium */
126123
font-family: var(--font-family-sans);
127-
font-size: var(--font-size-base);
124+
font-size: var(--font-size-small);
128125
font-style: normal;
129126
font-weight: var(--font-weight-medium);
127+
line-height: var(--line-height-large); /* 166.667% */
130128
letter-spacing: var(--letter-spacing-normal);
131129
}
132130

133131
&[data-size="normal"] {
134132
height: 24px;
135-
padding: 4px 6px;
133+
line-height: 24px;
134+
padding: 0 6px;
136135
&[data-icon] {
137-
padding: 4px 12px 4px 4px;
138-
}
139-
140-
&[aria-haspopup] {
141-
padding: 4px 6px 4px 8px;
136+
padding: 0 12px 0 4px;
142137
}
143138

139+
font-size: var(--font-size-small);
144140
gap: 6px;
145141

146142
/* text-12-medium */

packages/ui/src/components/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon, IconProps } from "./icon"
44

55
export interface ButtonProps
66
extends ComponentProps<typeof Kobalte>,
7-
Pick<ComponentProps<"button">, "class" | "classList" | "children" | "style"> {
7+
Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
88
size?: "small" | "normal" | "large"
99
variant?: "primary" | "secondary" | "ghost"
1010
icon?: IconProps["name"]

packages/ui/src/components/cycle-label.css

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/ui/src/components/cycle-label.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)