diff --git a/packages/dify-ui/docs/styling.md b/packages/dify-ui/docs/styling.md index 3d39c5c198e..a0db9db9253 100644 --- a/packages/dify-ui/docs/styling.md +++ b/packages/dify-ui/docs/styling.md @@ -65,9 +65,16 @@ opens a surface (Popover, DropdownMenu, Collapsible, Combobox, Dialog, AlertDial share one ring. Rows inside a composite defer to its highlight. Parts that only attach behavior (Tooltip, PreviewCard, and ContextMenu triggers, and Close parts) add no styles. -Attach focus-visible styling to the element that visually represents focus. If a visible wrapper -contains the native focus target, select that descendant state from the wrapper; for example, -`SliderThumb` uses `has-[:focus-visible]` because its internal range input receives focus. +Text controls (Input, Textarea, InputGroup, NumberField, and the Combobox and Autocomplete input +groups) draw that ring on the visible field. It replaces the hover border, and an invalid field +keeps its border and fill inside it. Switch, Checkbox, and Radio leave a gap between the control and +the indicator, because their checked fill is the indicator color. + +Attach the indicator to the element that visually represents focus. If a visible wrapper contains +the native focus target, select that descendant state from the wrapper; for example, `SliderThumb` +uses `has-[:focus-visible]` because its internal range input receives focus. Select +`:focus-visible`, except on a text control, which selects `:focus` because it shows focus however +it was reached. [Tailwind CSS functions and directives]: https://tailwindcss.com/docs/functions-and-directives [Tailwind CSS v4 upgrade guide]: https://tailwindcss.com/docs/upgrade-guide diff --git a/packages/dify-ui/src/autocomplete/index.tsx b/packages/dify-ui/src/autocomplete/index.tsx index bfeddde8c48..393f9a35928 100644 --- a/packages/dify-ui/src/autocomplete/index.tsx +++ b/packages/dify-ui/src/autocomplete/index.tsx @@ -6,7 +6,7 @@ import type { Placement } from '../placement' import { Autocomplete as BaseAutocomplete } from '@base-ui/react/autocomplete' import { cva } from 'class-variance-authority' import { cn } from '../cn' -import { textControlCompoundInputFocusClassName } from '../form-control-shared' +import { textControlGroupClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' import { floatingGroupLabelClassName, @@ -84,16 +84,7 @@ const autocompleteItemClassName = [ ] const autocompleteInputGroupVariants = cva( - [ - 'group/autocomplete flex w-full min-w-0 items-center border border-transparent bg-components-input-bg-normal text-components-input-text-filled shadow-none outline-hidden transition-[background-color,border-color]', - 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', - textControlCompoundInputFocusClassName, - 'data-focused:border-components-input-border-active data-focused:bg-components-input-bg-active data-focused:shadow-xs', - 'data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-components-input-bg-disabled data-disabled:text-components-input-text-filled-disabled', - 'data-disabled:hover:border-transparent data-disabled:hover:bg-components-input-bg-disabled', - 'data-readonly:shadow-none data-readonly:hover:border-transparent data-readonly:hover:bg-components-input-bg-normal', - 'motion-reduce:transition-none', - ], + [textControlGroupClassName, 'group/autocomplete items-center'], { variants: { size: { diff --git a/packages/dify-ui/src/checkbox/index.tsx b/packages/dify-ui/src/checkbox/index.tsx index e724ec8443e..d3d8032920a 100644 --- a/packages/dify-ui/src/checkbox/index.tsx +++ b/packages/dify-ui/src/checkbox/index.tsx @@ -4,13 +4,14 @@ import type { Checkbox as BaseCheckboxNS } from '@base-ui/react/checkbox' import type * as React from 'react' import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox' import { cn } from '../cn' +import { checkedControlFocusClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' const checkboxRootClassName = cn( 'inline-flex size-4 shrink-0 touch-manipulation items-center justify-center rounded-sm shadow-xs shadow-shadow-shadow-3 transition-colors motion-reduce:transition-none', 'border border-components-checkbox-border bg-components-checkbox-bg-unchecked text-components-checkbox-icon', 'hover:border-components-checkbox-border-hover hover:bg-components-checkbox-bg-unchecked-hover', - 'focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:ring-offset-0 focus-visible:outline-hidden', + checkedControlFocusClassName, 'data-checked:border-transparent data-checked:bg-components-checkbox-bg data-checked:hover:bg-components-checkbox-bg-hover', 'data-indeterminate:border-transparent data-indeterminate:bg-components-checkbox-bg data-indeterminate:hover:bg-components-checkbox-bg-hover', 'data-disabled:cursor-not-allowed data-disabled:border-components-checkbox-border-disabled data-disabled:bg-components-checkbox-bg-disabled', diff --git a/packages/dify-ui/src/combobox/index.tsx b/packages/dify-ui/src/combobox/index.tsx index a32f977aa67..f3d31062f63 100644 --- a/packages/dify-ui/src/combobox/index.tsx +++ b/packages/dify-ui/src/combobox/index.tsx @@ -6,7 +6,7 @@ import type { Placement } from '../placement' import { Combobox as BaseCombobox } from '@base-ui/react/combobox' import { cva } from 'class-variance-authority' import { cn } from '../cn' -import { formLabelClassName, textControlCompoundInputFocusClassName } from '../form-control-shared' +import { formLabelClassName, textControlGroupClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' import { floatingGroupLabelClassName, @@ -107,31 +107,18 @@ function ComboboxTrigger({ className, type = 'button', ...props }: ComboboxTrigg ) } -const comboboxInputGroupVariants = cva( - [ - 'group/combobox flex w-full min-w-0 items-center border border-transparent bg-components-input-bg-normal text-components-input-text-filled shadow-none outline-hidden transition-[background-color,border-color]', - 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', - textControlCompoundInputFocusClassName, - 'data-focused:border-components-input-border-active data-focused:bg-components-input-bg-active data-focused:shadow-xs', - 'data-popup-open:border-components-input-border-active data-popup-open:bg-components-input-bg-active', - 'data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-components-input-bg-disabled data-disabled:text-components-input-text-filled-disabled', - 'data-disabled:hover:border-transparent data-disabled:hover:bg-components-input-bg-disabled', - 'data-readonly:shadow-none data-readonly:hover:border-transparent data-readonly:hover:bg-components-input-bg-normal', - 'motion-reduce:transition-none', - ], - { - variants: { - size: { - small: 'min-h-6 rounded-md', - medium: 'min-h-8 rounded-lg', - large: 'min-h-9 rounded-[10px]', - }, - }, - defaultVariants: { - size: 'medium', +const comboboxInputGroupVariants = cva([textControlGroupClassName, 'group/combobox items-center'], { + variants: { + size: { + small: 'min-h-6 rounded-md', + medium: 'min-h-8 rounded-lg', + large: 'min-h-9 rounded-[10px]', }, }, -) + defaultVariants: { + size: 'medium', + }, +}) type ComboboxInputGroupProps = BaseCombobox.InputGroup.Props & VariantProps diff --git a/packages/dify-ui/src/form-control-shared.ts b/packages/dify-ui/src/form-control-shared.ts index 6707af62f56..8eedfbda990 100644 --- a/packages/dify-ui/src/form-control-shared.ts +++ b/packages/dify-ui/src/form-control-shared.ts @@ -1,8 +1,39 @@ export const formLabelClassName = 'w-fit cursor-default py-1 text-text-secondary system-sm-medium data-disabled:cursor-not-allowed' -export const textControlFocusClassName = - 'focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs' +// The focus indicator of a control whose checked fill is the indicator color (Switch, Checkbox, Radio). +// The gap keeps it distinct from that fill. The color is set at rest so it does not animate in. +export const checkedControlFocusClassName = + 'outline-state-accent-solid focus-visible:outline-2 focus-visible:outline-offset-2' -export const textControlCompoundInputFocusClassName = - 'has-[input:focus]:border-components-input-border-active has-[input:focus]:bg-components-input-bg-active has-[input:focus]:shadow-xs has-[textarea:focus]:border-components-input-border-active has-[textarea:focus]:bg-components-input-bg-active has-[textarea:focus]:shadow-xs' +// The field surface when the native control is the visible field (Input, Textarea). +// Focus selects `:focus`, not `data-focused`: a text control shows focus however it was reached, and +// Base UI sets `data-focused` only inside a Field. It exposes no read-only attribute on a plain control +// either, so that state uses the pseudo-class, limited to enabled controls because `:read-only` also +// matches a disabled one. +export const textControlClassName = [ + 'w-full appearance-none border border-transparent bg-components-input-bg-normal text-components-input-text-filled caret-primary-600 outline-hidden transition-[background-color,border-color]', + 'placeholder:text-components-input-text-placeholder', + 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', + 'focus:border-transparent focus:bg-components-input-bg-active focus:ring-2 focus:ring-state-accent-solid focus:transition-none', + 'data-invalid:border-components-input-border-destructive data-invalid:bg-components-input-bg-destructive', + 'read-only:cursor-default enabled:read-only:not-data-invalid:hover:border-transparent enabled:read-only:not-data-invalid:hover:bg-components-input-bg-normal enabled:read-only:not-data-invalid:focus:bg-components-input-bg-normal', + 'disabled:cursor-not-allowed disabled:bg-components-input-bg-disabled disabled:text-components-input-text-filled-disabled', + 'disabled:hover:border-transparent disabled:hover:bg-components-input-bg-disabled', + 'motion-reduce:transition-none', +] + +// The same surface on a Base UI group part that wraps the control (NumberField, Combobox, Autocomplete). +// The group reads focus from its input, so buttons inside it keep their own indicator. +export const textControlGroupClassName = [ + 'flex w-full min-w-0 border border-transparent bg-components-input-bg-normal text-components-input-text-filled transition-[background-color,border-color]', + 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', + 'has-[input:focus]:border-transparent has-[input:focus]:bg-components-input-bg-active has-[input:focus]:ring-2 has-[input:focus]:ring-state-accent-solid has-[input:focus]:transition-none', + 'data-invalid:border-components-input-border-destructive data-invalid:bg-components-input-bg-destructive', + // The focus rule outranks a single data attribute, so an invalid group restates its colors while focused. + 'data-invalid:has-[input:focus]:border-components-input-border-destructive data-invalid:has-[input:focus]:bg-components-input-bg-destructive', + 'data-readonly:not-data-disabled:not-data-invalid:hover:border-transparent data-readonly:not-data-disabled:not-data-invalid:hover:bg-components-input-bg-normal data-readonly:not-data-invalid:has-[input:focus]:bg-components-input-bg-normal', + 'data-disabled:cursor-not-allowed data-disabled:bg-components-input-bg-disabled data-disabled:text-components-input-text-filled-disabled', + 'data-disabled:hover:border-transparent data-disabled:hover:bg-components-input-bg-disabled', + 'motion-reduce:transition-none', +] diff --git a/packages/dify-ui/src/input-group/index.tsx b/packages/dify-ui/src/input-group/index.tsx index 86e089053e2..695ae846134 100644 --- a/packages/dify-ui/src/input-group/index.tsx +++ b/packages/dify-ui/src/input-group/index.tsx @@ -21,13 +21,12 @@ function InputGroup({ className, onMouseDown, ...props }: InputGroupProps) { className={cn( [ 'flex min-h-8 w-full min-w-0 items-center rounded-lg border border-transparent bg-components-input-bg-normal transition-[background-color,border-color]', - 'has-[>input:enabled]:not-has-[>input:is([readonly],[data-invalid])]:hover:border-components-input-border-hover has-[>input:enabled]:not-has-[>input:is([readonly],[data-invalid])]:hover:bg-components-input-bg-hover', - 'has-[>input:focus]:not-has-[>input:is([readonly],[data-invalid])]:border-components-input-border-active has-[>input:focus]:not-has-[>input:is([readonly],[data-invalid])]:bg-components-input-bg-active has-[>input:focus]:not-has-[>input[readonly]]:shadow-xs', + 'has-[>input:enabled:not(:focus)]:not-has-[>input:is([readonly],[data-invalid])]:hover:border-components-input-border-hover has-[>input:enabled:not(:focus)]:not-has-[>input:is([readonly],[data-invalid])]:hover:bg-components-input-bg-hover', + 'has-[>input:focus]:ring-2 has-[>input:focus]:ring-state-accent-solid has-[>input:focus]:transition-none has-[>input:focus]:not-has-[>input:is([readonly],[data-invalid])]:bg-components-input-bg-active', 'has-[>input[data-invalid]]:border-components-input-border-destructive has-[>input[data-invalid]]:bg-components-input-bg-destructive', 'has-[>input[data-disabled]]:cursor-not-allowed has-[>input[data-disabled]]:border-transparent has-[>input[data-disabled]]:bg-components-input-bg-disabled has-[>input[data-disabled]]:text-components-input-text-filled-disabled', 'has-[>input[data-disabled]]:*:data-align:cursor-not-allowed has-[>input[data-disabled]]:*:data-align:text-components-input-text-filled-disabled', 'has-[>input[readonly]]:cursor-default has-[>input[readonly]]:*:data-align:cursor-default', - 'has-[>input[readonly]:focus-visible]:ring-2 has-[>input[readonly]:focus-visible]:ring-state-accent-solid', 'has-[>[data-align=inline-start]]:[&>input]:ps-0', 'has-[>[data-align=inline-end]]:[&>input]:pe-0', 'motion-reduce:transition-none', diff --git a/packages/dify-ui/src/input/index.tsx b/packages/dify-ui/src/input/index.tsx index d1efbd4cba2..f8995116ed0 100644 --- a/packages/dify-ui/src/input/index.tsx +++ b/packages/dify-ui/src/input/index.tsx @@ -3,7 +3,7 @@ import type { Input as BaseInputNS } from '@base-ui/react/input' import { Input as BaseInput } from '@base-ui/react/input' import { cn } from '../cn' -import { textControlFocusClassName } from '../form-control-shared' +import { textControlClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' type InputProps = Omit @@ -13,17 +13,8 @@ function Input({ className, ...props }: InputProps) { cn( - [ - 'w-full appearance-none rounded-lg border border-transparent bg-components-input-bg-normal px-3 py-1.75 system-sm-regular text-components-input-text-filled caret-primary-600 outline-hidden transition-[background-color,border-color]', - 'placeholder:text-components-input-text-placeholder', - 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', - textControlFocusClassName, - 'data-invalid:border-components-input-border-destructive data-invalid:bg-components-input-bg-destructive', - 'read-only:cursor-default read-only:shadow-none read-only:hover:border-transparent read-only:hover:bg-components-input-bg-normal read-only:focus:border-transparent read-only:focus:bg-components-input-bg-normal read-only:focus:shadow-none read-only:focus-visible:ring-2 read-only:focus-visible:ring-state-accent-solid', - 'disabled:cursor-not-allowed disabled:border-transparent disabled:bg-components-input-bg-disabled disabled:text-components-input-text-filled-disabled', - 'disabled:hover:border-transparent disabled:hover:bg-components-input-bg-disabled', - 'motion-reduce:transition-none', - ], + textControlClassName, + 'rounded-lg px-3 py-1.75 system-sm-regular', resolveClassName(className, state), ) } diff --git a/packages/dify-ui/src/number-field/index.tsx b/packages/dify-ui/src/number-field/index.tsx index f789d595c05..28da2fde34e 100644 --- a/packages/dify-ui/src/number-field/index.tsx +++ b/packages/dify-ui/src/number-field/index.tsx @@ -5,24 +5,14 @@ import type * as React from 'react' import { NumberField as BaseNumberField } from '@base-ui/react/number-field' import { cva } from 'class-variance-authority' import { cn } from '../cn' -import { textControlCompoundInputFocusClassName } from '../form-control-shared' +import { textControlGroupClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' const NumberField = BaseNumberField.Root type NumberFieldProps = BaseNumberField.Root.Props const numberFieldGroupVariants = cva( - [ - 'group/number-field flex w-full min-w-0 items-stretch overflow-hidden border border-transparent bg-components-input-bg-normal text-components-input-text-filled shadow-none outline-hidden transition-[background-color,border-color]', - 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', - textControlCompoundInputFocusClassName, - 'data-focused:border-components-input-border-active data-focused:bg-components-input-bg-active data-focused:shadow-xs', - 'data-invalid:border-components-input-border-destructive data-invalid:bg-components-input-bg-destructive', - 'data-invalid:has-[input:focus]:border-components-input-border-destructive data-invalid:has-[input:focus]:bg-components-input-bg-destructive', - 'data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-components-input-bg-disabled data-disabled:text-components-input-text-filled-disabled', - 'data-disabled:hover:border-transparent data-disabled:hover:bg-components-input-bg-disabled', - 'data-readonly:shadow-none data-readonly:hover:border-transparent data-readonly:hover:bg-components-input-bg-normal motion-reduce:transition-none', - ], + [textControlGroupClassName, 'group/number-field items-stretch overflow-hidden'], { variants: { size: { diff --git a/packages/dify-ui/src/radio-group/index.tsx b/packages/dify-ui/src/radio-group/index.tsx index 4051edc8785..016f257ebf9 100644 --- a/packages/dify-ui/src/radio-group/index.tsx +++ b/packages/dify-ui/src/radio-group/index.tsx @@ -6,6 +6,7 @@ import type * as React from 'react' import { Radio as BaseRadio } from '@base-ui/react/radio' import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group' import { cn } from '../cn' +import { checkedControlFocusClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' type RadioGroupProps = BaseRadioGroupNS.Props @@ -37,7 +38,6 @@ function RadioControl({ className, ...props }: RadioControlProps) { 'inline-flex size-4 shrink-0 touch-manipulation items-center justify-center rounded-full p-0 transition-colors motion-reduce:transition-none', 'border border-components-radio-border bg-components-radio-bg shadow-xs shadow-shadow-shadow-3', 'hover:border-components-radio-border-hover hover:bg-components-radio-bg-hover', - 'focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:ring-offset-0 focus-visible:outline-hidden', 'data-checked:border-[5px] data-checked:border-components-radio-border-checked data-checked:hover:border-components-radio-border-checked-hover', 'data-disabled:cursor-not-allowed data-disabled:border-components-radio-border-disabled data-disabled:bg-components-radio-bg-disabled', 'data-disabled:hover:border-components-radio-border-disabled data-disabled:hover:bg-components-radio-bg-disabled', @@ -60,7 +60,7 @@ function Radio({ className, ...props }: RadioProps) { 'inline-flex size-4 shrink-0 touch-manipulation items-center justify-center rounded-full p-0 transition-colors motion-reduce:transition-none', 'border border-components-radio-border bg-components-radio-bg shadow-xs shadow-shadow-shadow-3', 'hover:border-components-radio-border-hover hover:bg-components-radio-bg-hover', - 'focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:ring-offset-0 focus-visible:outline-hidden', + checkedControlFocusClassName, 'data-checked:border-[5px] data-checked:border-components-radio-border-checked data-checked:hover:border-components-radio-border-checked-hover', 'data-disabled:cursor-not-allowed data-disabled:border-components-radio-border-disabled data-disabled:bg-components-radio-bg-disabled', 'data-disabled:hover:border-components-radio-border-disabled data-disabled:hover:bg-components-radio-bg-disabled', diff --git a/packages/dify-ui/src/switch/index.tsx b/packages/dify-ui/src/switch/index.tsx index 43fc9e94fe4..2900272f27e 100644 --- a/packages/dify-ui/src/switch/index.tsx +++ b/packages/dify-ui/src/switch/index.tsx @@ -6,13 +6,16 @@ import type * as React from 'react' import { Switch as BaseSwitch } from '@base-ui/react/switch' import { cva } from 'class-variance-authority' import { cn } from '../cn' +import { checkedControlFocusClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' -const switchRootStateClassName = - 'bg-components-toggle-bg-unchecked hover:bg-components-toggle-bg-unchecked-hover data-checked:bg-components-toggle-bg data-checked:hover:bg-components-toggle-bg-hover data-disabled:cursor-not-allowed data-disabled:bg-components-toggle-bg-unchecked-disabled data-disabled:hover:bg-components-toggle-bg-unchecked-disabled data-disabled:data-checked:bg-components-toggle-bg-disabled data-disabled:data-checked:hover:bg-components-toggle-bg-disabled' - const switchRootVariants = cva( - `group relative inline-flex shrink-0 cursor-pointer touch-manipulation items-center outline-hidden transition-colors duration-200 ease-in-out focus-visible:ring-2 focus-visible:ring-state-accent-solid motion-reduce:transition-none ${switchRootStateClassName}`, + [ + 'group relative inline-flex shrink-0 cursor-pointer touch-manipulation items-center transition-colors duration-200 ease-in-out motion-reduce:transition-none', + checkedControlFocusClassName, + 'bg-components-toggle-bg-unchecked hover:bg-components-toggle-bg-unchecked-hover data-checked:bg-components-toggle-bg data-checked:hover:bg-components-toggle-bg-hover', + 'data-disabled:cursor-not-allowed data-disabled:bg-components-toggle-bg-unchecked-disabled data-disabled:hover:bg-components-toggle-bg-unchecked-disabled data-disabled:data-checked:bg-components-toggle-bg-disabled data-disabled:data-checked:hover:bg-components-toggle-bg-disabled', + ], { variants: { size: { diff --git a/packages/dify-ui/src/textarea/index.tsx b/packages/dify-ui/src/textarea/index.tsx index 04f7fbc0ee8..5c93e51d7f4 100644 --- a/packages/dify-ui/src/textarea/index.tsx +++ b/packages/dify-ui/src/textarea/index.tsx @@ -6,34 +6,21 @@ import type * as React from 'react' import { Field as BaseField } from '@base-ui/react/field' import { cva } from 'class-variance-authority' import { cn } from '../cn' -import { textControlFocusClassName } from '../form-control-shared' +import { textControlClassName } from '../form-control-shared' import { resolveClassName } from '../internals/resolve-class-name' -const textareaVariants = cva( - [ - 'min-h-20 w-full appearance-none overflow-auto border border-transparent bg-components-input-bg-normal text-components-input-text-filled caret-primary-600 outline-hidden transition-[background-color,border-color]', - 'placeholder:text-components-input-text-placeholder', - 'hover:border-components-input-border-hover hover:bg-components-input-bg-hover', - textControlFocusClassName, - 'data-invalid:border-components-input-border-destructive data-invalid:bg-components-input-bg-destructive', - 'read-only:cursor-default read-only:shadow-none read-only:hover:border-transparent read-only:hover:bg-components-input-bg-normal read-only:focus:border-transparent read-only:focus:bg-components-input-bg-normal read-only:focus:shadow-none read-only:focus-visible:ring-2 read-only:focus-visible:ring-state-accent-solid', - 'disabled:cursor-not-allowed disabled:border-transparent disabled:bg-components-input-bg-disabled disabled:text-components-input-text-filled-disabled', - 'disabled:hover:border-transparent disabled:hover:bg-components-input-bg-disabled', - 'motion-reduce:transition-none', - ], - { - variants: { - size: { - small: 'rounded-md px-2 py-1 system-xs-regular', - medium: 'rounded-lg px-3 py-2 system-sm-regular', - large: 'rounded-[10px] px-4 py-2 system-md-regular', - }, - }, - defaultVariants: { - size: 'medium', +const textareaVariants = cva([textControlClassName, 'min-h-20 overflow-auto'], { + variants: { + size: { + small: 'rounded-md px-2 py-1 system-xs-regular', + medium: 'rounded-lg px-3 py-2 system-sm-regular', + large: 'rounded-[10px] px-4 py-2 system-md-regular', }, }, -) + defaultVariants: { + size: 'medium', + }, +}) type TextareaValue = string | number type TextareaChangeEventDetails = BaseFieldNS.Control.ChangeEventDetails diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.tsx index 1ebea04f321..4f916204d95 100644 --- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.tsx +++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.tsx @@ -119,13 +119,13 @@ const PrePopulate: FC = ({