feat: add transitions to more components (#15916)
* add transitions to more components * chore: Remove duplicate class
This commit is contained in:
1 parent
2c517f4878
commit
825573da8e
18 files changed
+26
-27
No files matched your search
@@ -94,7 +94,6 @@ export default function ICSFeedSetup() {
|
||||
|
||||
<div className="mt-3 flex items-center">
|
||||
<CheckboxField
|
||||
type="checkbox"
|
||||
id="skipWriting"
|
||||
checked={skipWriting}
|
||||
onChange={(e) => setSkipWriting(e.target.checked)}
|
||||
|
||||
@@ -85,7 +85,7 @@ function UserToInviteItem({
|
||||
id={`${member.user.id}`}
|
||||
checked={isSelected}
|
||||
type="checkbox"
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default hover:bg-subtle inline-flex h-4 w-4 place-self-center justify-self-end rounded checked:bg-gray-800"
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default hover:bg-subtle inline-flex h-4 w-4 place-self-center justify-self-end rounded transition checked:bg-gray-800"
|
||||
onChange={() => {
|
||||
onChange();
|
||||
}}
|
||||
|
||||
@@ -153,7 +153,7 @@ const Filter = (props: {
|
||||
<input
|
||||
id="yourWorkflows"
|
||||
type="checkbox"
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded transition "
|
||||
checked={!!checked.userId}
|
||||
onChange={(e) => {
|
||||
if (e.target.checked) {
|
||||
@@ -217,7 +217,7 @@ const Filter = (props: {
|
||||
}
|
||||
}
|
||||
}}
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded transition "
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -122,7 +122,7 @@ const ChooseEmbedTypesDialogContent = ({ types }: { types: EmbedTypes }) => {
|
||||
embedType: embed.type,
|
||||
});
|
||||
}}>
|
||||
<div className="bg-default order-none box-border flex-none rounded-md border border-solid dark:bg-transparent dark:invert">
|
||||
<div className="bg-default order-none box-border flex-none rounded-md border border-solid transition dark:bg-transparent dark:invert">
|
||||
{embed.illustration}
|
||||
</div>
|
||||
<div className="text-emphasis mt-4 font-semibold">{embed.title}</div>
|
||||
|
||||
@@ -164,7 +164,7 @@ export const FilterCheckboxField = forwardRef<HTMLInputElement, Props>(({ label,
|
||||
{...rest}
|
||||
ref={ref}
|
||||
type="checkbox"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default h-4 w-4 rounded hover:cursor-pointer"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default h-4 w-4 rounded transition hover:cursor-pointer"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
@@ -349,7 +349,7 @@ export const Components: Record<FieldType, Component> = {
|
||||
}
|
||||
setValue(newValue);
|
||||
}}
|
||||
className="border-default dark:border-default hover:bg-subtle checked:hover:bg-brand-default checked:bg-brand-default dark:checked:bg-brand-default dark:bg-darkgray-100 dark:hover:bg-subtle dark:checked:hover:bg-brand-default h-4 w-4 cursor-pointer rounded ltr:mr-2 rtl:ml-2"
|
||||
className="border-default dark:border-default hover:bg-subtle checked:hover:bg-brand-default checked:bg-brand-default dark:checked:bg-brand-default dark:bg-darkgray-100 dark:hover:bg-subtle dark:checked:hover:bg-brand-default h-4 w-4 cursor-pointer rounded transition ltr:mr-2 rtl:ml-2"
|
||||
value={option.value}
|
||||
checked={value.includes(option.value)}
|
||||
/>
|
||||
|
||||
@@ -448,7 +448,7 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
</span>
|
||||
<Icon
|
||||
name="chevron-down"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 rtl:mr-4"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 transition rtl:mr-4"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
@@ -1250,7 +1250,7 @@ function ProfileDropdown() {
|
||||
</span>
|
||||
<Icon
|
||||
name="chevron-down"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 rtl:mr-4"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 transition rtl:mr-4"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
|
||||
@@ -80,7 +80,7 @@ const CheckboxField = forwardRef<HTMLInputElement, Props>(
|
||||
disabled={disabled}
|
||||
id={rest.id ? rest.id : id}
|
||||
className={classNames(
|
||||
"text-emphasis focus:ring-emphasis dark:text-muted border-default bg-default focus:bg-default active:bg-default h-4 w-4 rounded checked:hover:bg-gray-600 focus:outline-none focus:ring-0 ltr:mr-2 rtl:ml-2",
|
||||
"text-emphasis focus:ring-emphasis dark:text-muted border-default bg-default focus:bg-default active:bg-default h-4 w-4 rounded transition checked:hover:bg-gray-600 focus:outline-none focus:ring-0 ltr:mr-2 rtl:ml-2",
|
||||
!error && disabled
|
||||
? "cursor-not-allowed bg-gray-300 checked:bg-gray-300 hover:bg-gray-300 hover:checked:bg-gray-300"
|
||||
: "hover:bg-subtle hover:border-emphasis checked:bg-gray-800",
|
||||
|
||||
@@ -41,7 +41,7 @@ const InputOption: React.FC<OptionProps<Option, boolean, GroupBase<Option>>> = (
|
||||
innerProps={props}>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default h-4 w-4 rounded ltr:mr-2 rtl:ml-2"
|
||||
className="text-emphasis focus:ring-emphasis dark:text-muted border-default h-4 w-4 rounded transition ltr:mr-2 rtl:ml-2"
|
||||
checked={isSelected}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
@@ -87,7 +87,7 @@ export const DropdownMenuCheckboxItem = forwardRef<HTMLDivElement, DropdownMenuC
|
||||
aria-readonly
|
||||
checked={false}
|
||||
type="checkbox"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default ml-auto h-4 w-4 rounded hover:cursor-pointer"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default ml-auto h-4 w-4 rounded transition hover:cursor-pointer"
|
||||
/>
|
||||
)}
|
||||
<DropdownMenuPrimitive.ItemIndicator asChild>
|
||||
@@ -97,7 +97,7 @@ export const DropdownMenuCheckboxItem = forwardRef<HTMLDivElement, DropdownMenuC
|
||||
aria-label={typeof children === "string" ? `Active ${children}` : undefined}
|
||||
checked={true}
|
||||
type="checkbox"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default h-4 w-4 rounded hover:cursor-pointer"
|
||||
className="text-emphasis dark:text-muted focus:ring-emphasis border-default bg-default h-4 w-4 rounded transition hover:cursor-pointer"
|
||||
/>
|
||||
</DropdownMenuPrimitive.ItemIndicator>
|
||||
</DropdownMenuPrimitive.CheckboxItem>
|
||||
|
||||
@@ -186,8 +186,8 @@ export const FilterSearchField = forwardRef<HTMLInputElement, InputFieldProps>(f
|
||||
return (
|
||||
<div
|
||||
dir="ltr"
|
||||
className="focus-within:ring-brand-default group relative mx-3 mb-1 mt-2.5 flex items-center rounded-md focus-within:outline-none focus-within:ring-2">
|
||||
<div className="addon-wrapper border-default [input:hover_+_&]:border-emphasis [input:hover_+_&]:border-l-default [&:has(+_input:hover)]:border-emphasis [&:has(+_input:hover)]:border-r-default flex h-7 items-center justify-center rounded-l-md border border-r-0">
|
||||
className="focus-within:ring-brand-default group relative mx-3 mb-1 mt-2.5 flex items-center rounded-md transition focus-within:outline-none focus-within:ring-2">
|
||||
<div className="addon-wrapper border-default [input:hover_+_&]:border-emphasis [input:hover_+_&]:border-l-default [&:has(+_input:hover)]:border-emphasis [&:has(+_input:hover)]:border-r-default flex h-7 items-center justify-center rounded-l-md border border-r-0 transition">
|
||||
<Icon name="search" className="ms-3 h-4 w-4" data-testid="search-icon" />
|
||||
</div>
|
||||
<Input
|
||||
|
||||
@@ -37,7 +37,7 @@ const Addon = ({ isFilled, children, className, error, onClickAddon }: AddonProp
|
||||
<div
|
||||
onClick={onClickAddon && onClickAddon}
|
||||
className={classNames(
|
||||
"addon-wrapper border-default [input:hover_+_&]:border-emphasis [input:hover_+_&]:border-l-default [&:has(+_input:hover)]:border-emphasis [&:has(+_input:hover)]:border-r-default h-9 border px-3",
|
||||
"addon-wrapper border-default [input:hover_+_&]:border-emphasis [input:hover_+_&]:border-l-default [&:has(+_input:hover)]:border-emphasis [&:has(+_input:hover)]:border-r-default h-9 border px-3 transition",
|
||||
isFilled && "bg-subtle",
|
||||
onClickAddon && "cursor-pointer disabled:hover:cursor-not-allowed",
|
||||
className
|
||||
|
||||
@@ -63,7 +63,7 @@ export const Select = <
|
||||
dropdownIndicator: () => "text-default",
|
||||
control: (state) =>
|
||||
cx(
|
||||
"bg-default border-default !min-h-9 h-9 text-sm leading-4 placeholder:text-sm placeholder:font-normal dark:focus:border-emphasis focus-within:outline-none focus-within:ring-2 focus-within:ring-brand-default hover:border-emphasis rounded-md border",
|
||||
"bg-default border-default !min-h-9 h-9 text-sm leading-4 placeholder:text-sm placeholder:font-normal dark:focus:border-emphasis focus-within:outline-none focus-within:ring-2 focus-within:ring-brand-default hover:border-emphasis rounded-md transition border",
|
||||
state.isMulti
|
||||
? variant === "checkbox"
|
||||
? "px-3 py-2 h-fit"
|
||||
|
||||
@@ -54,7 +54,7 @@ export const BooleanToggleGroup = function BooleanToggleGroup({
|
||||
}
|
||||
const commonClass = classNames(
|
||||
getVariantStyles(variant).commonClass,
|
||||
"inline-flex items-center justify-center rounded text-sm font-medium leading-4",
|
||||
"inline-flex items-center justify-center rounded text-sm font-medium leading-4 transition",
|
||||
disabled && "cursor-not-allowed"
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user