@brickclay-org/ui 0.0.66 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/brickclay-org-ui.mjs +247 -1
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +57 -2
- package/package.json +1 -1
- package/src/assets/icons/bin-gray.svg +7 -0
- package/src/assets/icons/check-green.svg +4 -0
- package/src/lib/file-card/file-card.css +107 -0
- package/src/lib/file-picker/file-picker.css +106 -0
- package/src/styles.css +2 -0
package/index.d.ts
CHANGED
|
@@ -1936,5 +1936,60 @@ declare class BkColumnSelect implements ControlValueAccessor, OnChanges {
|
|
|
1936
1936
|
static ɵcmp: i0.ɵɵComponentDeclaration<BkColumnSelect, "bk-column-select", never, { "searchable": { "alias": "searchable"; "required": false; }; "cacheKey": { "alias": "cacheKey"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "isOpened": { "alias": "isOpened"; "required": false; }; }, { "isOpenedChange": "isOpenedChange"; }, never, never, true, never>;
|
|
1937
1937
|
}
|
|
1938
1938
|
|
|
1939
|
-
|
|
1940
|
-
|
|
1939
|
+
declare class BkFilePicker implements ControlValueAccessor, Validator {
|
|
1940
|
+
id: string;
|
|
1941
|
+
name: string;
|
|
1942
|
+
accept: string;
|
|
1943
|
+
multi: boolean;
|
|
1944
|
+
disable: boolean;
|
|
1945
|
+
errorMessage: string;
|
|
1946
|
+
hasError: boolean;
|
|
1947
|
+
draggable: boolean;
|
|
1948
|
+
set required(val: boolean);
|
|
1949
|
+
get required(): boolean;
|
|
1950
|
+
private _required;
|
|
1951
|
+
change: EventEmitter<Event>;
|
|
1952
|
+
error: EventEmitter<string>;
|
|
1953
|
+
cancel: EventEmitter<void>;
|
|
1954
|
+
fileInputRef?: ElementRef<HTMLInputElement>;
|
|
1955
|
+
private _value;
|
|
1956
|
+
private _onValidatorChange?;
|
|
1957
|
+
private onChange;
|
|
1958
|
+
private onTouched;
|
|
1959
|
+
writeValue(value: File | File[] | null): void;
|
|
1960
|
+
registerOnChange(fn: any): void;
|
|
1961
|
+
registerOnTouched(fn: any): void;
|
|
1962
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1963
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
1964
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
1965
|
+
get pickerState(): 'default' | 'active' | 'disabled';
|
|
1966
|
+
onContainerClick(): void;
|
|
1967
|
+
onFileChange(event: Event): void;
|
|
1968
|
+
onCancel(): void;
|
|
1969
|
+
onDragOver(event: DragEvent): void;
|
|
1970
|
+
onDrop(event: DragEvent): void;
|
|
1971
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BkFilePicker, never>;
|
|
1972
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BkFilePicker, "bk-file-picker", never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "multi": { "alias": "multi"; "required": false; }; "disable": { "alias": "disable"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "change": "change"; "error": "error"; "cancel": "cancel"; }, never, never, true, never>;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
type FileState = 'uploading' | 'uploaded' | 'failed';
|
|
1976
|
+
declare class BkFileCard implements OnInit {
|
|
1977
|
+
id: string;
|
|
1978
|
+
state: FileState;
|
|
1979
|
+
fileName: string;
|
|
1980
|
+
fileSize: string | null;
|
|
1981
|
+
progress: number;
|
|
1982
|
+
errorMessage: string;
|
|
1983
|
+
remove: EventEmitter<string>;
|
|
1984
|
+
/**
|
|
1985
|
+
*
|
|
1986
|
+
*/
|
|
1987
|
+
constructor();
|
|
1988
|
+
ngOnInit(): void;
|
|
1989
|
+
onRemove(): void;
|
|
1990
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BkFileCard, never>;
|
|
1991
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BkFileCard, "bk-file-card", never, { "id": { "alias": "id"; "required": false; }; "state": { "alias": "state"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; }, { "remove": "remove"; }, never, never, true, never>;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
export { BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkAvatar, BkAvatarUploader, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkColumnFilterService, BkColumnSelect, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkFileCard, BkFilePicker, BkGrid, BkHierarchicalSelect, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToastr, BkToastrService, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, CalendarSelection, ColumnFilterOption, getDialogBackdropAnimation, getDialogPanelAnimation };
|
|
1995
|
+
export type { AvatarFallback, AvatarSize, AvatarVariant, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkAvatarFallback, BkAvatarSize, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputType, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, ButtonSize, ButtonVariant, CalendarRange, CountryOption, DotPosition, DotStatus, FileState, GroupItem, GroupMode, HierarchicalNode, IconButtonSize, IconButtonVariant, IconOrientation, PillColor, PillSize, PillVariant, ScheduledDateSelection, SortDirection, SpinnerSize, TabItem, TableAction, TableColumn, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
|
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M17.5 4.98332C14.725 4.70832 11.9333 4.56665 9.15 4.56665C7.5 4.56665 5.85 4.64998 4.2 4.81665L2.5 4.98332" stroke="#6B7080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M7.08337 4.14169L7.26671 3.05002C7.40004 2.25835 7.50004 1.66669 8.90837 1.66669H11.0917C12.5 1.66669 12.6084 2.29169 12.7334 3.05835L12.9167 4.14169" stroke="#6B7080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M15.7083 7.61664L15.1666 16.0083C15.075 17.3166 15 18.3333 12.675 18.3333H7.32496C4.99996 18.3333 4.92496 17.3166 4.83329 16.0083L4.29163 7.61664" stroke="#6B7080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M8.60828 13.75H11.3833" stroke="#6B7080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M7.91663 10.4167H12.0833" stroke="#6B7080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="14" height="14" rx="7" fill="#22973F"/>
|
|
3
|
+
<path d="M10.3333 4.5L5.74996 9.08333L3.66663 7" stroke="white" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* Base file-uploader styles */
|
|
2
|
+
.file-uploader {
|
|
3
|
+
@apply p-4 flex gap-4 border rounded-lg border-transparent bg-[white];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Uploading State */
|
|
7
|
+
.file-uploader--uploading {
|
|
8
|
+
@apply border-[#EFEFF1];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Uploaded State */
|
|
12
|
+
.file-uploader--uploaded {
|
|
13
|
+
@apply border-[#1434CB];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Failed State */
|
|
17
|
+
.file-uploader--failed {
|
|
18
|
+
@apply border-[#FDA4A8] bg-[#FFF1F1];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Icon container */
|
|
22
|
+
.file-uploader__icon-container {
|
|
23
|
+
@apply flex-shrink-0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Icon styles */
|
|
27
|
+
.file-uploader__icon {
|
|
28
|
+
@apply flex-shrink-0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Content container */
|
|
32
|
+
.file-uploader__content {
|
|
33
|
+
@apply flex flex-col flex-1 gap-0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Row 1: File Info + Delete */
|
|
37
|
+
.file-uploader__row-1 {
|
|
38
|
+
@apply flex items-start justify-between;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* File info container */
|
|
42
|
+
.file-uploader__file-info {
|
|
43
|
+
@apply flex flex-col;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* File name */
|
|
47
|
+
.file-uploader__file-name {
|
|
48
|
+
@apply font-medium text-sm text-[#1B223A];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.file-uploader__file-name--failed {
|
|
52
|
+
@apply text-[#B41E32] font-normal mb-1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* File size */
|
|
56
|
+
.file-uploader__file-size {
|
|
57
|
+
@apply text-[#1B223A] font-normal text-sm;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Row 2: Progress Bar + Percentage */
|
|
61
|
+
.file-uploader__row-2 {
|
|
62
|
+
@apply flex justify-between items-center gap-3 mt-1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Remove margin-top for failed state */
|
|
66
|
+
.file-uploader--failed .file-uploader__row-2 {
|
|
67
|
+
@apply mt-0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Progress bar */
|
|
71
|
+
.file-uploader__progress-bar {
|
|
72
|
+
@apply flex-1 h-2 bg-[#EFEFF1] rounded-full overflow-hidden;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Progress fill */
|
|
76
|
+
.file-uploader__progress-fill {
|
|
77
|
+
@apply h-full bg-[#1336EF] transition-all duration-300 rounded-full;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.file-uploader__progress-fill--complete {
|
|
81
|
+
@apply bg-[#22973F];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Progress text */
|
|
85
|
+
.file-uploader__progress-text {
|
|
86
|
+
@apply text-sm text-[#6B7080] font-medium;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Checkmark icon */
|
|
90
|
+
.file-uploader__checkmark {
|
|
91
|
+
@apply flex-shrink-0 size-[14px];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Error message */
|
|
95
|
+
.file-uploader__error-message {
|
|
96
|
+
@apply text-[#B41E32] font-medium text-sm;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Try again text */
|
|
100
|
+
/* .file-uploader__try-again {
|
|
101
|
+
@apply text-[#EF4444] font-normal text-sm cursor-pointer;
|
|
102
|
+
} */
|
|
103
|
+
|
|
104
|
+
/* Delete icon */
|
|
105
|
+
.file-uploader__delete-icon {
|
|
106
|
+
@apply flex-shrink-0 cursor-pointer size-5;
|
|
107
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* Wrapper for relative positioning of hidden input */
|
|
2
|
+
.file-picker-wrapper {
|
|
3
|
+
@apply relative w-full;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Hidden native file input */
|
|
7
|
+
.file-picker__input {
|
|
8
|
+
@apply absolute opacity-0 w-0 h-0 overflow-hidden pointer-events-none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Base file-picker styles */
|
|
12
|
+
.file-picker {
|
|
13
|
+
@apply py-4 px-6 inline-flex flex-col justify-center items-center rounded-lg cursor-pointer transition-all duration-200 w-full relative;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.file-picker-has-error {
|
|
17
|
+
@apply border-[#d11e14];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.file-picker-error {
|
|
21
|
+
@apply text-xs text-[#E7000B] font-normal;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Default State */
|
|
25
|
+
.file-picker--default {
|
|
26
|
+
@apply border border-[#E5F3FF] bg-white;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Active State */
|
|
30
|
+
.file-picker--active {
|
|
31
|
+
@apply border border-[#E5F3FF] bg-[#F4FAFF];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Disabled State */
|
|
35
|
+
.file-picker--disabled {
|
|
36
|
+
@apply border border-[#D6D7DC] bg-[#F4F4F6] opacity-60 cursor-not-allowed;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Icon styles */
|
|
40
|
+
.file-picker__icon {
|
|
41
|
+
@apply mb-3;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Text Primary */
|
|
45
|
+
.file-picker__text-primary {
|
|
46
|
+
@apply font-normal text-sm tracking-normal mb-1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.file-picker__text-primary--default {
|
|
50
|
+
@apply text-[#1B223A];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.file-picker__text-primary--active {
|
|
54
|
+
@apply text-[#1B223A];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.file-picker__text-primary--disabled {
|
|
58
|
+
@apply text-[#A1A3AE];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Text Primary Bold */
|
|
62
|
+
.file-picker__text-primary-bold--default {
|
|
63
|
+
@apply font-medium text-[#102BA5];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.file-picker__text-primary-bold--active {
|
|
67
|
+
@apply font-medium text-[#102BA5];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.file-picker__text-primary-bold--disabled {
|
|
71
|
+
@apply font-medium text-[#A1A3AE];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Text Secondary */
|
|
75
|
+
.file-picker__text-secondary {
|
|
76
|
+
@apply font-normal text-xs leading-[18px];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.file-picker__text-secondary--default {
|
|
80
|
+
@apply text-[#6B7080];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.file-picker__text-secondary--active {
|
|
84
|
+
@apply text-[#6B7080];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.file-picker__text-secondary--disabled {
|
|
88
|
+
@apply text-[#A1A3AE];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* File list item container */
|
|
92
|
+
.file-picker__file-item {
|
|
93
|
+
@apply p-4 border border-[#EFEFF1] rounded-lg bg-white flex items-start justify-between mb-1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.file-picker__file-content {
|
|
97
|
+
@apply flex gap-4;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.file-picker__file-info-title {
|
|
101
|
+
@apply font-medium text-sm text-[#1B223A];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.file-picker__file-info-size {
|
|
105
|
+
@apply text-[#1B223A] font-normal text-sm;
|
|
106
|
+
}
|
package/src/styles.css
CHANGED