Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
406 changes: 406 additions & 0 deletions src/big-picture/src/components/common/file-explorer-modal/index.tsx

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions src/big-picture/src/components/common/file-explorer-modal/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
.file-explorer {
display: flex;
flex-direction: column;
gap: calc(var(--spacing-unit) * 2);
min-height: 0;
flex: 1;

&__path-input-wrapper {
position: relative;
display: flex;
align-items: center;
width: 100%;

> [data-focus-wrapper] {
width: 100%;
}
}

&__path-input {
width: 100%;
height: 44px;
padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
padding-left: 46px;
border-radius: calc(var(--spacing-unit) * 2);
font-family: var(--font-space-grotesk);
font-size: 14px;
line-height: 16.59px;
border: 1px solid var(--secondary-border);
background-color: var(--background);
color: var(--text);
transition: border-color 0.2s ease-in-out;

&:hover {
border-color: var(--secondary-hover);
}

&:focus-visible,
[data-focus-visible="true"] & {
outline: none;
border-color: rgba(255, 255, 255, 0.6);
}

&::placeholder {
color: var(--text-secondary);
}
}

&__path-input-icon {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
left: 10px;
color: var(--text-secondary);
pointer-events: none;
}

&__list {
flex: 1;
min-height: 0;
overflow-y: auto;
}

&__skeleton-group {
display: flex;
flex-direction: column;
gap: calc(var(--spacing-unit) * 2);
padding: calc(var(--spacing-unit) * 2) 0;
}

&__skeleton {
height: 36px;
border-radius: calc(var(--spacing-unit) * 1.5);
}

&__status {
display: flex;
align-items: center;
justify-content: center;
padding: calc(var(--spacing-unit) * 8);
color: var(--text-secondary);
font-size: 0.875rem;

&--error {
color: var(--text-error);
}
}

&__section-label {
font-size: 0.75rem;
color: var(--text-secondary);
padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
text-transform: uppercase;
letter-spacing: 0.05em;
}

&__item {
display: flex;
align-items: center;
gap: calc(var(--spacing-unit) * 2);
padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
border-radius: calc(var(--spacing-unit) * 1.5);
cursor: pointer;
transition: background-color 0.15s ease;
color: var(--text);
font-size: 0.875rem;
width: 100%;
text-align: left;
border: none;
font-family: var(--font-space-grotesk), sans-serif;
background: transparent;

&:hover {
background-color: var(--secondary-hover);
}

&[data-focus-visible="true"] {
background-color: var(--secondary-hover);
outline: none;
}

&--select-dir {
&:hover,
&[data-focus-visible="true"] {
background-color: var(--secondary-hover);
}
}
}

&__item-icon {
display: flex;
align-items: center;
flex-shrink: 0;
opacity: 0.7;
}

&__item-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

&__item-meta {
margin-left: auto;
font-size: 0.75rem;
color: var(--text-secondary);
opacity: 0;
transition: opacity 0.15s ease;
white-space: nowrap;
flex-shrink: 0;
}

&__item:hover &__item-meta,
&__item[data-focus-visible="true"] &__item-meta {
opacity: 0.6;
}

&__empty {
padding: calc(var(--spacing-unit) * 4) 0 calc(var(--spacing-unit) * 16) 0;
}
}
1 change: 1 addition & 0 deletions src/big-picture/src/components/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export * from "./diagnostics";
export * from "./dropdown-select";
export * from "./download-source-card";
export * from "./empty-state";
export * from "./file-explorer-modal";
export * from "./context-menu";
export * from "./scroll-area";
export * from "./route-anchor";
Expand Down
6 changes: 3 additions & 3 deletions src/big-picture/src/components/common/modal/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
overflow: hidden;

width: min(100%, 42rem);
max-height: min(100%, calc(100vh - 4rem));
max-height: min(100%, calc(100vh - 4rem), 60vh);
border-radius: calc(var(--spacing-unit) * 3);

background-color: var(--background);
Expand All @@ -14,11 +14,11 @@
&__header {
display: flex;
position: relative;
align-items: flex-start;
justify-content: space-between;
overflow: hidden;

padding: calc(var(--spacing-unit) * 6);
gap: calc(var(--spacing-unit) * 2);
flex-shrink: 0;

flex-direction: column;

Expand Down
Loading
Loading