Add default role to workspace (#10444)

## Context
Adding a defaultRole to each workspace, this role will be automatically
added when a member joins a workspace via invite link or public link
(seeds work differently though).
Took the occasion to refactor a bit the frontend components, splitting
them in smaller components for more readability.

## Test
<img width="948" alt="Screenshot 2025-02-24 at 14 54 02"
src="https://github.com/user-attachments/assets/13ef1452-d3c9-4385-940c-2ced0f0b05ef"
/>
This commit is contained in:
Weiko
2025-02-25 11:26:35 +01:00
committed by GitHub
parent a1eea40cf7
commit 0220672fa9
29 changed files with 538 additions and 273 deletions

View File

@ -102,7 +102,7 @@ const StyledInput = styled.input<InputProps>`
checkboxSize === CheckboxSize.Large ? '18px' : '12px'};
background: ${({ theme, indeterminate, isChecked, disabled }) =>
disabled && isChecked
? theme.color.blue30
? theme.color.blue
: indeterminate || isChecked
? theme.color.blue
: 'transparent'};
@ -114,8 +114,10 @@ const StyledInput = styled.input<InputProps>`
disabled,
}) => {
switch (true) {
case isChecked:
return theme.color.blue;
case disabled:
return isChecked ? theme.color.blue30 : theme.font.color.extraLight;
return theme.background.transparent.medium;
case indeterminate || isChecked:
return theme.color.blue;
case variant === CheckboxVariant.Primary:
@ -150,7 +152,7 @@ const StyledInput = styled.input<InputProps>`
height: var(--size);
left: var(--padding);
position: absolute;
stroke: ${({ theme }) => theme.grayScale.gray0};
stroke: ${({ theme }) => theme.font.color.inverted};
top: var(--padding);
width: var(--size);
}