1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 00:09:40 +02:00

chore(deps): upgrade tailwind and prettier [EE-5218] (#10068)

This commit is contained in:
Chaim Lev-Ari 2023-09-04 16:20:36 +01:00 committed by GitHub
parent cb7377ead6
commit 0e2eb17220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 444 additions and 316 deletions

View file

@ -22,7 +22,7 @@ export function FormSectionTitle({
<label
htmlFor={htmlFor}
className={clsx(
'col-sm-12 mt-1 mb-2 flex cursor-pointer items-center pl-0 font-medium',
'col-sm-12 mb-2 mt-1 flex cursor-pointer items-center pl-0 font-medium',
tailwindTitleSize[titleSize]
)}
>
@ -33,7 +33,7 @@ export function FormSectionTitle({
return (
<div
className={clsx(
'col-sm-12 mt-1 mb-2 pl-0 font-medium',
'col-sm-12 mb-2 mt-1 pl-0 font-medium',
tailwindTitleSize[titleSize]
)}
>

View file

@ -14,7 +14,7 @@ export function InputGroupButtonWrapper({
'input-group-btn [&>button]:!ml-0',
// the button should be rounded at the end (right) if it's the last child and start (left) if it's the first child
// if the button is in the middle of the group, it shouldn't be rounded
'[&>button]:!rounded-none [&:last-child>button]:!rounded-r-[5px] [&:first-child>button]:!rounded-l-[5px]'
'[&:first-child>button]:!rounded-l-[5px] [&:last-child>button]:!rounded-r-[5px] [&>button]:!rounded-none'
)}
>
{children}

View file

@ -57,16 +57,28 @@
/* Match the same box shadow styles as the other portainer inputs, which are inherited from the bootstrap form-control class */
.portainer-selector-root .portainer-selector__control--is-focused {
border-color: #66afe9;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
-webkit-box-shadow:
inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 8px rgba(102, 175, 233, 0.6);
box-shadow:
inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 8px rgba(102, 175, 233, 0.6);
transition:
border-color ease-in-out 0.15s,
-webkit-box-shadow ease-in-out 0.15s;
}
.portainer-selector-root .portainer-selector__control--is-focused:hover {
border-color: #66afe9;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
-webkit-box-shadow:
inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 8px rgba(102, 175, 233, 0.6);
box-shadow:
inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 8px rgba(102, 175, 233, 0.6);
transition:
border-color ease-in-out 0.15s,
-webkit-box-shadow ease-in-out 0.15s;
}
.portainer-selector-root.sm .portainer-selector__control {

View file

@ -19,7 +19,7 @@ interface DefaultOption {
type RegularProps<
Option = DefaultOption,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
Group extends GroupBase<Option> = GroupBase<Option>,
> = { isCreatable?: false; size?: 'sm' | 'md' } & ReactSelectProps<
Option,
IsMulti,
@ -30,7 +30,7 @@ type RegularProps<
type CreatableProps<
Option = DefaultOption,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
Group extends GroupBase<Option> = GroupBase<Option>,
> = { isCreatable: true; size?: 'sm' | 'md' } & ReactSelectCreatableProps<
Option,
IsMulti,
@ -40,7 +40,7 @@ type CreatableProps<
type Props<
Option = DefaultOption,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
Group extends GroupBase<Option> = GroupBase<Option>,
> =
| CreatableProps<Option, IsMulti, Group>
| RegularProps<Option, IsMulti, Group>;
@ -48,7 +48,7 @@ type Props<
export function Select<
Option = DefaultOption,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
Group extends GroupBase<Option> = GroupBase<Option>,
>({
className,
isCreatable = false,
@ -70,7 +70,7 @@ export function Select<
export function Creatable<
Option = DefaultOption,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
Group extends GroupBase<Option> = GroupBase<Option>,
>({ className, ...props }: ReactSelectCreatableProps<Option, IsMulti, Group>) {
return (
<ReactSelectCreatable

View file

@ -38,9 +38,15 @@
.switch :checked + i {
padding-right: 0;
padding-left: var(--switch-size);
-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #337ab7;
-moz-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #337ab7;
box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #337ab7;
-webkit-box-shadow:
inset 0 0 1px rgba(0, 0, 0, 0.5),
inset 0 0 40px #337ab7;
-moz-box-shadow:
inset 0 0 1px rgba(0, 0, 0, 0.5),
inset 0 0 40px #337ab7;
box-shadow:
inset 0 0 1px rgba(0, 0, 0, 0.5),
inset 0 0 40px #337ab7;
}
.switch :disabled + i {
@ -60,7 +66,9 @@
.switch.business i {
background-color: var(--BE-only);
box-shadow: inset 0 0 1px rgb(0 0 0 / 50%), inset 0 0 40px var(--BE-only);
box-shadow:
inset 0 0 1px rgb(0 0 0 / 50%),
inset 0 0 40px var(--BE-only);
}
.switch input[type='checkbox']:disabled + .slider {

View file

@ -1,7 +1,7 @@
import { useRef, useState, useCallback, useEffect } from 'react';
export function useCaretPosition<
T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement
T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement,
>() {
const node = useRef<T>(null);
const [start, setStart] = useState(0);