diff --git a/.eslintrc.yml b/.eslintrc.yml index aff44cbbb..a8907fe08 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -4,3 +4,4 @@ extends: rules: no-case-declarations: 0 no-restricted-syntax: 0 + react/no-unescaped-entities: 0 diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..544138be4 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/src/design-system/.eslintrc.yml b/src/design-system/.eslintrc.yml index 06c0229d9..b4a8496c9 100644 --- a/src/design-system/.eslintrc.yml +++ b/src/design-system/.eslintrc.yml @@ -54,6 +54,7 @@ rules: # pritter rules # ts rules + react/no-unescaped-entities: 0 react/jsx-filename-extension: 0 react/require-default-props : 0 "@typescript-eslint/no-unused-vars": diff --git a/src/design-system/components/atoms/badge.tsx b/src/design-system/components/atoms/badge.tsx index 7ee0c9e57..8cff77294 100644 --- a/src/design-system/components/atoms/badge.tsx +++ b/src/design-system/components/atoms/badge.tsx @@ -21,7 +21,8 @@ export const Badge = ({ className={cn( 'flex gap-md items-center py-md px-2xl w-fit rounded-full bodySm border select-none pulsable', { - 'border-border-default bg-surface-basic-default': type === 'neutral', + 'border-border-dark bg-surface-basic-subdued text-text-default': + type === 'neutral', 'border-border-primary bg-surface-primary-subdued text-text-primary': type === 'info', 'border-border-success bg-surface-success-subdued text-text-success ': diff --git a/src/design-system/components/atoms/radio.tsx b/src/design-system/components/atoms/radio.tsx index 768c666e3..5705e8585 100644 --- a/src/design-system/components/atoms/radio.tsx +++ b/src/design-system/components/atoms/radio.tsx @@ -47,6 +47,7 @@ export const Item = ({ }, className )} + aria-label={value} > { )} @@ -58,17 +58,17 @@ const DetailedLogo = ({ size, darkBg, color }: BaseLogoProps) => { )} diff --git a/src/design-system/components/css/index.scss b/src/design-system/components/css/index.scss index 435e2d212..d8c9d351f 100644 --- a/src/design-system/components/css/index.scss +++ b/src/design-system/components/css/index.scss @@ -174,6 +174,7 @@ --icon-critical: var(--red-600); --icon-warning: var(--amber-600); --icon-success: var(--green-600); + --icon-logo: var(--blue-600); /* Border */ --border-default: var(--zinc-200); --border-dark: var(--zinc-300); @@ -198,10 +199,10 @@ --surface-basic-active: var(--zinc-800); --surface-basic-overlay-bg: var(--zinc-900); /* Primary */ - --surface-primary-default: var(--blue-700); + --surface-primary-default: var(--blue-800); --surface-primary-subdued: var(--blue-1100); --surface-primary-hovered: var(--blue-600); - --surface-primary-pressed: var(--blue-800); + --surface-primary-pressed: var(--blue-900); --surface-primary-selected: var(--blue-1100); /* Secondary */ --surface-secondary-default: var(--amber-700); @@ -251,6 +252,7 @@ --icon-critical: var(--red-500); --icon-warning: var(--amber-500); --icon-success: var(--green-500); + --icon-logo: var(--zinc-100); /* Border */ --border-default: var(--zinc-800); --border-dark: var(--zinc-700); @@ -1793,6 +1795,10 @@ video { border-color: var(--border-critical); } +.border-border-dark { + border-color: var(--border-dark); +} + .border-border-default { border-color: var(--border-default); } @@ -1894,7 +1900,8 @@ video { } .bg-surface-basic-subdued { - background-color: var(--surface-basic-subdued); + --tw-bg-opacity: 1; + background-color: color-mix(in srgb, var(--surface-basic-subdued) calc(100% * var(--tw-bg-opacity)), transparent); } .bg-surface-critical-default { @@ -1986,8 +1993,8 @@ video { } .from-surface-basic-subdued { - --tw-gradient-from: var(--surface-basic-subdued) var(--tw-gradient-from-position); - --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position); + --tw-gradient-from: color-mix(in srgb, var(--surface-basic-subdued) calc(100% * 1), transparent) var(--tw-gradient-from-position); + --tw-gradient-to: color-mix(in srgb, var(--surface-basic-subdued) calc(100% * 0), transparent) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } @@ -2003,6 +2010,10 @@ video { fill: var(--icon-disabled); } +.fill-icon-logo { + fill: var(--icon-logo); +} + .fill-icon-primary { fill: var(--icon-primary); } diff --git a/src/design-system/components/molecule/profile.tsx b/src/design-system/components/molecule/profile.tsx index 405fba8be..a8d2a3bef 100644 --- a/src/design-system/components/molecule/profile.tsx +++ b/src/design-system/components/molecule/profile.tsx @@ -1,9 +1,9 @@ -import { ReactNode, forwardRef } from 'react'; +import { ComponentProps, ReactNode, forwardRef } from 'react'; import { AvatarBase, IAvatar } from '../atoms/avatar'; import { BounceIt } from '../bounce-it'; import { cn } from '../utils'; -interface IProfile extends IAvatar { +interface IProfile extends IAvatar, Omit,'color'|'name'> { name?: ReactNode; subtitle?: ReactNode; responsive?: boolean; diff --git a/src/design-system/css/dark.css b/src/design-system/css/dark.css index b3024da45..0ec7c52f5 100644 --- a/src/design-system/css/dark.css +++ b/src/design-system/css/dark.css @@ -9,10 +9,10 @@ --surface-basic-overlay-bg: var(--zinc-900); /* Primary */ - --surface-primary-default: var(--blue-700); + --surface-primary-default: var(--blue-800); --surface-primary-subdued: var(--blue-1100); --surface-primary-hovered: var(--blue-600); - --surface-primary-pressed: var(--blue-800); + --surface-primary-pressed: var(--blue-900); --surface-primary-selected: var(--blue-1100); /* Secondary */ @@ -71,6 +71,7 @@ --icon-critical: var(--red-500); --icon-warning: var(--amber-500); --icon-success: var(--green-500); +--icon-logo: var(--zinc-100); /* Border */ --border-default: var(--zinc-800); diff --git a/src/design-system/css/default.css b/src/design-system/css/default.css index a4622c06d..be9ec77a6 100644 --- a/src/design-system/css/default.css +++ b/src/design-system/css/default.css @@ -75,6 +75,7 @@ --icon-critical: var(--red-600); --icon-warning: var(--amber-600); --icon-success: var(--green-600); +--icon-logo: var(--blue-600); /* Border */ --border-default: var(--zinc-200); diff --git a/src/design-system/tailwind-base.js b/src/design-system/tailwind-base.js index b6107491e..96137eb4c 100644 --- a/src/design-system/tailwind-base.js +++ b/src/design-system/tailwind-base.js @@ -214,7 +214,8 @@ const config = { surface: { basic: { default: 'var(--surface-basic-default)', - subdued: 'var(--surface-basic-subdued)', + subdued: + 'color-mix(in srgb, var(--surface-basic-subdued) calc(100% * ), transparent)', hovered: 'var(--surface-basic-hovered)', pressed: 'var(--surface-basic-pressed)', input: 'var(--surface-basic-input)', @@ -290,6 +291,7 @@ const config = { critical: 'var(--icon-critical)', warning: 'var(--icon-warning)', success: 'var(--icon-success)', + logo: 'var(--icon-logo)', }, border: { default: 'var(--border-default)',