Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
line-height: 1rem;
white-space: nowrap;

&-text {
padding: 0 0.125rem;
}

&[data-align="start"] {
justify-content: start;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Button/Button.module.scss.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export declare const button: string;
export declare const buttonText: string;
2 changes: 1 addition & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonPr
</span>
)}
{text && (
<span>{text}</span>
<span className={styles.buttonText}>{text}</span>
)}
</>
);
Expand Down
8 changes: 0 additions & 8 deletions src/components/Checkbox/Checkbox.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
padding: 0;

outline: 0;

&[data-checked],
&[data-indeterminate] {
--variant-border: var(--color-solid-primary-bg);

color: var(--color-solid-primary-text);
background-color: var(--color-solid-primary-bg);
}
}

&-indicator {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const Checkbox = forwardRef<ElementRef<typeof BaseCheckbox.Root>, Checkbo
<BaseCheckbox.Root
ref={ref}
{...props}
className={clsx(getStyleClassNames({
variant: 'ghost',
intent: 'secondary',
className={(state) => clsx(getStyleClassNames({
variant: state.checked || state.indeterminate ? 'solid' : 'ghost',
intent: state.checked || state.indeterminate ? 'primary' : 'secondary',
border: true,
corners: 'tight',
}), styles.checkboxControl, className)}
Expand Down
6 changes: 6 additions & 0 deletions src/components/InputText/InputText.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
width: 2.5rem;
height: 2.5rem;

color: var(--color-text-muted);

svg {
width: 1rem;
height: 1rem;
}
}

&:has(input:disabled) .icon-wrapper {
opacity: 0.6;
}

input {
width: 100%;
height: 100%;
Expand Down
1 change: 1 addition & 0 deletions src/components/ScrollArea/ScrollArea.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
overflow: hidden;
display: flex;

box-sizing: border-box;
width: 100%;
height: 100%;

Expand Down
29 changes: 21 additions & 8 deletions src/components/ScrollArea/ScrollArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ import { getStyleClassNames } from '../../utils/getStyleClassNames';
import styles from './ScrollArea.module.scss';

type ScrollAreaProps = ComponentPropsWithoutRef<'div'> & {
disabled?: boolean;
focusable?: boolean;
offset?: Partial<Record<'top' | 'bottom' | 'left' | 'right', string | number | undefined>>;
};

export const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(({
className,
children,
disabled = false,
focusable = true,
onScroll,
offset,
style,
Expand All @@ -33,20 +37,29 @@ export const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(({
'--scroll-area-offset-left': getCssValue(offset?.left),
'--scroll-area-offset-right': getCssValue(offset?.right),
} as CSSProperties}
data-disabled={disabled || undefined}
Comment thread
ianpaschal marked this conversation as resolved.
{...props}
>
<BaseScrollArea.Viewport className={styles.scrollAreaViewport} onScroll={onScroll}>
<BaseScrollArea.Viewport
className={styles.scrollAreaViewport}
onScroll={onScroll}
{...(!focusable && { tabIndex: -1 })}
>
<BaseScrollArea.Content>
{children}
</BaseScrollArea.Content>
</BaseScrollArea.Viewport>
<BaseScrollArea.Scrollbar className={styles.scrollAreaScrollbar} orientation="vertical">
<BaseScrollArea.Thumb className={clsx(...getStyleClassNames({ variant: 'shaded', intent: 'secondary' }), styles.scrollAreaThumb)} />
</BaseScrollArea.Scrollbar>
<BaseScrollArea.Scrollbar className={styles.scrollAreaScrollbar} orientation="horizontal">
<BaseScrollArea.Thumb className={clsx(...getStyleClassNames({ variant: 'shaded', intent: 'secondary' }), styles.scrollAreaThumb)} />
</BaseScrollArea.Scrollbar>
<BaseScrollArea.Corner />
{!disabled && (
<>
<BaseScrollArea.Scrollbar className={styles.scrollAreaScrollbar} orientation="vertical">
<BaseScrollArea.Thumb className={clsx(...getStyleClassNames({ variant: 'shaded', intent: 'secondary' }), styles.scrollAreaThumb)} />
</BaseScrollArea.Scrollbar>
<BaseScrollArea.Scrollbar className={styles.scrollAreaScrollbar} orientation="horizontal">
<BaseScrollArea.Thumb className={clsx(...getStyleClassNames({ variant: 'shaded', intent: 'secondary' }), styles.scrollAreaThumb)} />
</BaseScrollArea.Scrollbar>
<BaseScrollArea.Corner />
</>
)}
</BaseScrollArea.Root>
));

Expand Down
61 changes: 61 additions & 0 deletions src/components/TransferList/TransferList.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@use "../../style/layers";
@use "../../style/flex";
@use "../../style/text";

@layer components {
.transfer-list {
display: grid;
gap: 0.5rem;

&[data-orientation="vertical"] {
grid-template-areas:
"available_label"
"available_list"
"selected_label"
"selected_list";
grid-template-columns: 100%;
grid-template-rows: auto 1fr auto 1fr;

&[data-batch] {
grid-template-areas:
"available_label"
"available_list"
"controls"
"selected_label"
"selected_list";
grid-template-rows: auto 1fr auto auto 1fr;
}
}

&[data-orientation="horizontal"] {
grid-template-areas:
"available_label selected_label"
"available_list selected_list";
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;

&[data-batch] {
grid-template-areas:
"available_label . selected_label"
"available_list controls selected_list";
grid-template-columns: 1fr auto 1fr;
}
}

&-available-label {
grid-area: available_label;
}

&-available-list {
grid-area: available_list;
}

&-selected-label {
grid-area: selected_label;
}

&-selected-list {
grid-area: selected_list;
}
}
}
5 changes: 5 additions & 0 deletions src/components/TransferList/TransferList.module.scss.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export declare const transferList: string;
export declare const transferListAvailableLabel: string;
export declare const transferListAvailableList: string;
export declare const transferListSelectedLabel: string;
export declare const transferListSelectedList: string;
Loading
Loading