Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b17a434
feat(file-upload): added dropzone area (#DS-2356)
NikGurev Jan 16, 2026
f48ca84
chore: open local overlay via cdkOverlay
NikGurev Jan 19, 2026
4c06212
chore(file-upload): separated drop functionality
NikGurev Jan 20, 2026
8146a5d
chore(file-upload): implemented drop for fullscreen zone
NikGurev Jan 20, 2026
d1684a1
chore(file-upload): added integrated usage out of the box and separat…
NikGurev Jan 20, 2026
daeb012
chore(file-upload): implement dropzone data customization
NikGurev Jan 20, 2026
3fe5db9
chore(file-upload): added example of usage
NikGurev Jan 20, 2026
1a6dfe7
chore: disable drop listening
NikGurev Jan 21, 2026
75a1813
chore: localize dropzone text
NikGurev Jan 21, 2026
a1e2362
chore: refactor
NikGurev Jan 22, 2026
108c289
chore: refactor
NikGurev Jan 22, 2026
60fff6d
chore: refactor
NikGurev Jan 22, 2026
6c8163d
chore: input for built-in dropzone
NikGurev Jan 22, 2026
af27b65
chore: fixed types
NikGurev Jan 23, 2026
a1cce07
chore: fixed tests & golden files
NikGurev Jan 23, 2026
cf2f286
chore: added unit tests
NikGurev Jan 23, 2026
e7752ff
chore: added tests for fullscreen dropzone
NikGurev Jan 23, 2026
3d976d2
chore: added tests for local dropzone
NikGurev Jan 23, 2026
dedea15
chore: fixed e2e tests
NikGurev Jan 23, 2026
7840cd9
chore: added e2e tests
NikGurev Jan 23, 2026
aad45dd
chore: updated golden file
NikGurev Jan 23, 2026
c743207
test: updated e2e snapshots
NikGurev Jan 23, 2026
ab2daae
chore(file-upload): added MacOS support for dnd
NikGurev Jan 26, 2026
e5ad509
chore(file-upload): upd example
NikGurev Jan 26, 2026
6c2ee1a
chore(file-upload): upd golden file
NikGurev Jan 26, 2026
4273bdb
chore(file-upload): fixed tests & golden file
NikGurev Jan 26, 2026
72d70d2
chore(file-upload): after review
NikGurev Jan 27, 2026
afb1046
chore(file-upload): after review (subscriptions)
NikGurev Jan 27, 2026
ac304d8
chore(file-upload): updated api
NikGurev Jan 27, 2026
e69cd62
chore(file-upload): upd docs
NikGurev Jan 27, 2026
bebac3c
fix: after review
NikGurev Jan 28, 2026
eaa8ccf
fix: after review
NikGurev Jan 28, 2026
8444018
fix: fixed screenshots
NikGurev Jan 28, 2026
ca80503
test: updated e2e snapshots
NikGurev Jan 28, 2026
3fec83d
fix: fixed tests
NikGurev Jan 28, 2026
0a3c029
fix: after review
NikGurev Jan 28, 2026
93c5630
chore: trap focus when dropzone added
NikGurev Jan 30, 2026
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
7 changes: 5 additions & 2 deletions packages/components-dev/file-upload/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
import { KbqInputModule } from '@koobiq/components/input';
import { KbqRadioModule } from '@koobiq/components/radio';
import { interval, takeWhile, timer } from 'rxjs';
import { E2eFileUploadStateAndStyle } from '../../components/file-upload/e2e';
import { E2eFileUploadDropzone, E2eFileUploadStateAndStyle } from '../../components/file-upload/e2e';
import { FileUploadExamplesModule } from '../../docs-examples/components/file-upload';
import { DevLocaleSelector } from '../locale-selector';

Expand Down Expand Up @@ -104,6 +104,8 @@ export class DevCustomTextDirective {}
selector: 'dev-examples',
imports: [FileUploadExamplesModule],
template: `
<file-upload-dropzone-example />
<hr />
<file-upload-allowed-example />
<hr />
<file-upload-cva-overview-example />
Expand Down Expand Up @@ -209,7 +211,8 @@ export class DevMultipleFileUploadCompact {
KbqRadioModule,
DevMultipleFileUploadCompact,
DevCustomTextDirective,
E2eFileUploadStateAndStyle
E2eFileUploadStateAndStyle,
E2eFileUploadDropzone
],
templateUrl: 'template.html',
styleUrls: ['./styles.scss'],
Expand Down
2 changes: 2 additions & 0 deletions packages/components-dev/file-upload/template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<e2e-file-upload-state-and-style class="layout-margin-top-l layout-margin-bottom-l layout-column" />

<e2e-file-upload-dropzone />

<button kbq-button (click)="toggleDisabled()">Toggle Disabled</button>

<button kbq-button (click)="startLoading()">Loading imitation for single and multiple</button>
Expand Down
10 changes: 10 additions & 0 deletions packages/components/core/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ export const isNull = (value: unknown): value is null => {
return value === null;
};

/** Whether the value is HTMLElement. */
export const isHtmlElement = (value: unknown): value is HTMLElement => {
return value instanceof HTMLElement;
};

/** Whether the value is HTMLElement or null. */
export const isHtmlElementOrNull = (value: unknown): value is HTMLElement | null => {
return isHtmlElement(value) || isNull(value);
};

/**
* Will be removed in the next major release
*
Expand Down
Binary file modified packages/components/file-upload/__screenshots__/02-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/components/file-upload/__screenshots__/02-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions packages/components/file-upload/dropzone.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.kbq-dropzone-overlay {
--kbq-dropzone-padding: var(--kbq-size-s);
--kbq-dropzone-overlay-background: var(--kbq-background-overlay-theme);
--kbq-dropzone-component-background: var(--kbq-background-overlay-theme);
--kbq-dropzone-border-color: var(--kbq-line-theme-fade);

padding: var(--kbq-dropzone-padding);
background-color: var(--kbq-dropzone-overlay-background);

opacity: 0;
transition: opacity 100ms ease-in-out;

&.kbq-dropzone-overlay__attached {
opacity: 1;
}

.kbq-dropzone-content {
display: flex;
width: 100%;

align-items: center;
justify-content: center;

border-radius: var(--kbq-size-border-radius);
border: var(--kbq-size-border-width) dashed var(--kbq-dropzone-border-color);
background-color: var(--kbq-dropzone-component-background);

outline: none;
}
}

.kbq-fullscreen-dropzone {
--kbq-dropzone-component-background: transparent;
}

.kbq-local-dropzone {
--kbq-dropzone-overlay-background: transparent;

.kbq-empty-state.kbq-multiple-file-upload__empty-state {
--kbq-empty-state-size-compact-padding-top: 0;
--kbq-empty-state-size-compact-padding-horizontal: 0;
--kbq-empty-state-size-compact-padding-bottom: 0;

--kbq-empty-state-size-normal-padding-top: 0;
--kbq-empty-state-size-normal-padding-horizontal: 0;
--kbq-empty-state-size-normal-padding-bottom: 0;

--kbq-empty-state-size-big-padding-top: 0;
--kbq-empty-state-size-big-padding-horizontal: 0;
--kbq-empty-state-size-big-padding-bottom: 0;
}
}

.kbq-empty-state.kbq-multiple-file-upload__empty-state {
--kbq-empty-state-size-normal-image-margin-bottom: var(--kbq-size-m);
--kbq-empty-state-size-normal-title-margin-bottom: var(--kbq-size-xs);
}
Loading