@koobiq/components 17.0.0-beta.2 → 17.0.0-rc.10
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/README.md +1 -2
- package/alert/_alert-theme.scss +48 -24
- package/alert/alert.component.d.ts +23 -3
- package/alert/alert.component.scss +91 -59
- package/autocomplete/_autocomplete-theme.scss +3 -3
- package/autocomplete/autocomplete.scss +8 -18
- package/badge/_badge-theme.scss +30 -45
- package/badge/badge.component.scss +18 -39
- package/button/_button-base.scss +7 -14
- package/button/_button-theme.scss +30 -86
- package/button/button.component.d.ts +3 -2
- package/button/button.scss +7 -17
- package/button-toggle/_button-toggle-theme.scss +19 -20
- package/button-toggle/button-toggle.scss +17 -44
- package/card/_card-theme.scss +18 -17
- package/card/card.component.scss +3 -6
- package/checkbox/_checkbox-theme.scss +50 -50
- package/checkbox/checkbox.scss +31 -35
- package/code-block/README.md +18 -14
- package/code-block/_code-block-theme.scss +53 -23
- package/code-block/actionbar.component.scss +11 -25
- package/code-block/code-block.component.d.ts +12 -4
- package/code-block/code-block.scss +62 -77
- package/core/form-field/form-field-ref.d.ts +2 -0
- package/core/forms/_forms-theme.scss +4 -8
- package/core/forms/_forms.scss +13 -43
- package/core/locales/formatters.d.ts +96 -0
- package/core/locales/locale-service.d.ts +97 -0
- package/core/option/_optgroup-theme.scss +4 -6
- package/core/option/_option-action-theme.scss +8 -11
- package/core/option/_option-theme.scss +15 -20
- package/core/option/optgroup.scss +0 -1
- package/core/option/option.scss +0 -1
- package/core/pop-up/_pop-up.scss +0 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -1
- package/core/select/common.d.ts +35 -0
- package/core/select/index.d.ts +1 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +15 -19
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -9
- package/core/services/theme.service.d.ts +3 -2
- package/core/styles/_core.scss +0 -1
- package/core/styles/_koobiq-theme.scss +5 -3
- package/core/styles/common/_animation.scss +9 -8
- package/core/styles/common/_button.scss +0 -2
- package/core/styles/common/_clearfix.scss +1 -1
- package/core/styles/common/_groups.scss +3 -9
- package/core/styles/common/_list.scss +28 -31
- package/core/styles/common/_overlay.scss +4 -3
- package/core/styles/common/_popup.scss +5 -5
- package/core/styles/common/_rtl.scss +4 -4
- package/core/styles/common/_select.scss +48 -42
- package/core/styles/common/_tokens.scss +47 -0
- package/core/styles/functions/_number.scss +14 -19
- package/core/styles/functions/_string.scss +18 -19
- package/core/styles/functions/_timing.scss +24 -24
- package/core/styles/theming/_components-theming.scss +1380 -1384
- package/core/styles/theming/_scrollbar-theme.scss +8 -5
- package/core/styles/theming/_theming.scss +26 -29
- package/core/styles/typography/_typography-utils.scss +1 -2
- package/core/styles/typography/_typography.scss +138 -85
- package/core/styles/visual/_body.scss +0 -2
- package/core/styles/visual/_layout.scss +44 -38
- package/core/utils/data-size/config.d.ts +20 -2
- package/core/utils/data-size/data-size.pipe.d.ts +10 -9
- package/core/utils/data-size/size.d.ts +3 -4
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/calendar-body.scss +3 -11
- package/datepicker/calendar-header.scss +4 -10
- package/datepicker/calendar.scss +5 -17
- package/datepicker/datepicker-content.scss +5 -15
- package/datepicker/datepicker-input.scss +0 -5
- package/datepicker/datepicker-toggle.scss +3 -3
- package/divider/_divider-theme.scss +2 -1
- package/divider/divider.scss +9 -26
- package/dl/_dl-theme.scss +5 -8
- package/dl/dl.scss +5 -20
- package/dropdown/_dropdown-theme.scss +27 -22
- package/dropdown/dropdown-item.scss +5 -12
- package/dropdown/dropdown-trigger.directive.d.ts +2 -2
- package/dropdown/dropdown.scss +6 -15
- package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
- package/empty-state/README.md +0 -0
- package/empty-state/_empty-state-theme.scss +56 -0
- package/empty-state/empty-state.component.d.ts +31 -0
- package/empty-state/empty-state.module.d.ts +10 -0
- package/empty-state/empty-state.scss +81 -0
- package/empty-state/index.d.ts +1 -0
- package/empty-state/public-api.d.ts +2 -0
- package/esm2022/alert/alert.component.mjs +52 -5
- package/esm2022/badge/badge.component.mjs +2 -2
- package/esm2022/button/button.component.mjs +13 -6
- package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
- package/esm2022/checkbox/checkbox.mjs +2 -2
- package/esm2022/code-block/actionbar.component.mjs +2 -2
- package/esm2022/code-block/code-block.component.mjs +58 -14
- package/esm2022/core/animation/select-animations.mjs +4 -4
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/locales/formatters.mjs +97 -1
- package/esm2022/core/locales/locale-service.mjs +5 -2
- package/esm2022/core/option/option.mjs +2 -2
- package/esm2022/core/pop-up/pop-up-trigger.mjs +18 -11
- package/esm2022/core/select/common.mjs +120 -0
- package/esm2022/core/select/index.mjs +2 -1
- package/esm2022/core/services/theme.service.mjs +4 -1
- package/esm2022/core/utils/data-size/config.mjs +5 -17
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +36 -22
- package/esm2022/core/utils/data-size/size.mjs +10 -14
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/datepicker/datepicker-animations.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +4 -4
- package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -4
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
- package/esm2022/empty-state/empty-state.component.mjs +104 -0
- package/esm2022/empty-state/empty-state.module.mjs +50 -0
- package/esm2022/empty-state/index.mjs +2 -0
- package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
- package/esm2022/empty-state/public-api.mjs +3 -0
- package/esm2022/file-upload/file-upload.mjs +15 -1
- package/esm2022/file-upload/file-upload.module.mjs +15 -5
- package/esm2022/file-upload/multiple-file-upload.component.mjs +98 -49
- package/esm2022/file-upload/single-file-upload.component.mjs +110 -54
- package/esm2022/form-field/form-field.mjs +2 -2
- package/esm2022/form-field/hint.mjs +2 -2
- package/esm2022/form-field/password-hint.mjs +2 -2
- package/esm2022/form-field/password-toggle.mjs +11 -9
- package/esm2022/icon/icon-item.component.mjs +16 -6
- package/esm2022/input/input-number.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +2 -2
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +2 -2
- package/esm2022/modal/modal.component.mjs +8 -9
- package/esm2022/navbar/navbar-item.component.mjs +11 -11
- package/esm2022/navbar/navbar.component.mjs +2 -2
- package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/radio/radio.component.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
- package/esm2022/select/select-option.directive.mjs +7 -5
- package/esm2022/select/select.component.mjs +71 -125
- package/esm2022/select/select.module.mjs +28 -28
- package/esm2022/splitter/splitter.component.mjs +37 -17
- package/esm2022/table/table.component.mjs +29 -6
- package/esm2022/table/table.module.mjs +14 -6
- package/esm2022/tabs/tab-body.component.mjs +1 -1
- package/esm2022/tabs/tab-group.component.mjs +55 -13
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +17 -3
- package/esm2022/tags/tag-list.component.mjs +2 -2
- package/esm2022/tags/tag.component.mjs +4 -4
- package/esm2022/textarea/textarea.component.mjs +12 -10
- package/esm2022/timepicker/timepicker.directive.mjs +11 -3
- package/esm2022/timezone/timezone-option.component.mjs +2 -2
- package/esm2022/timezone/timezone-option.directive.mjs +7 -5
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/title/title.directive.mjs +3 -4
- package/esm2022/toast/toast-container.component.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +4 -4
- package/esm2022/toast/toast.service.mjs +18 -13
- package/esm2022/toast/toast.type.mjs +3 -1
- package/esm2022/tooltip/tooltip.component.mjs +28 -14
- package/esm2022/tree/padding.directive.mjs +2 -2
- package/esm2022/tree/tree-base.mjs +2 -2
- package/esm2022/tree/tree-option.component.mjs +2 -2
- package/esm2022/tree/tree-selection.component.mjs +6 -1
- package/esm2022/tree-select/tree-select.component.mjs +29 -44
- package/esm2022/tree-select/tree-select.module.mjs +31 -11
- package/fesm2022/koobiq-components-alert.mjs +52 -5
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -2
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +12 -5
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +57 -14
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +285 -67
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +2 -2
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +8 -8
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +5 -4
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +157 -0
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +225 -97
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +21 -21
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +14 -4
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +1 -1
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +4 -4
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +2 -2
- package/fesm2022/koobiq-components-modal.mjs +7 -8
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +14 -14
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +2 -2
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +102 -155
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +36 -16
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +41 -10
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +57 -15
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +21 -8
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +11 -9
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +10 -2
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +11 -10
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +2 -3
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +25 -17
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +26 -13
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +57 -51
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +9 -4
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +124 -73
- package/file-upload/file-upload.d.ts +1 -1
- package/file-upload/file-upload.module.d.ts +11 -9
- package/file-upload/file-upload.scss +0 -6
- package/file-upload/multiple-file-upload.component.d.ts +38 -10
- package/file-upload/multiple-file-upload.component.scss +50 -120
- package/file-upload/single-file-upload.component.d.ts +40 -13
- package/file-upload/single-file-upload.component.scss +12 -33
- package/form-field/_form-field-theme.scss +46 -36
- package/form-field/_hint-theme.scss +15 -20
- package/form-field/cleaner.scss +3 -9
- package/form-field/form-field.scss +23 -26
- package/form-field/hint.scss +5 -8
- package/form-field/password-toggle.d.ts +3 -2
- package/form-field/password-toggle.scss +3 -10
- package/form-field/stepper.scss +4 -11
- package/icon/_icon-button-theme.scss +47 -36
- package/icon/_icon-item-theme.scss +47 -26
- package/icon/_icon-theme.scss +12 -14
- package/icon/icon-button.scss +5 -20
- package/icon/icon-item.component.d.ts +3 -1
- package/icon/icon-item.scss +10 -8
- package/icon/icon.scss +0 -6
- package/input/_input-theme.scss +6 -4
- package/input/input.scss +11 -10
- package/link/_link-theme.scss +30 -49
- package/list/_list-theme.scss +21 -19
- package/list/list.scss +2 -6
- package/loader-overlay/_loader-overlay-theme.scss +17 -18
- package/loader-overlay/loader-overlay.scss +9 -33
- package/markdown/_markdown-theme.scss +47 -47
- package/markdown/markdown.scss +41 -91
- package/modal/README.md +5 -4
- package/modal/_modal-animation.scss +0 -1
- package/modal/_modal-confirm.scss +2 -7
- package/modal/_modal-theme.scss +11 -13
- package/modal/modal.component.d.ts +1 -1
- package/modal/modal.scss +15 -31
- package/navbar/README.md +21 -20
- package/navbar/_navbar-item_horizontal.scss +28 -29
- package/navbar/_navbar-item_vertical.scss +31 -31
- package/navbar/_navbar-theme.scss +20 -24
- package/navbar/navbar-brand.scss +24 -27
- package/navbar/navbar-divider.scss +4 -8
- package/navbar/navbar-item.component.d.ts +4 -4
- package/navbar/navbar-item.scss +13 -15
- package/navbar/navbar.scss +2 -6
- package/navbar/vertical-navbar.scss +4 -6
- package/package.json +23 -16
- package/popover/README.md +18 -14
- package/popover/_popover-theme.scss +9 -17
- package/popover/popover.scss +15 -29
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +7 -11
- package/progress-bar/progress-bar.scss +6 -19
- package/progress-spinner/_progress-spinner-theme.scss +6 -8
- package/progress-spinner/progress-spinner.scss +8 -18
- package/radio/_radio-theme.scss +36 -37
- package/radio/radio.scss +25 -40
- package/risk-level/_risk-level-theme.scss +25 -31
- package/risk-level/risk-level.component.scss +4 -10
- package/schematics/collection.json +11 -0
- package/schematics/ng-add/index.js +70 -0
- package/schematics/ng-add/schema.json +15 -0
- package/scrollbar/_scrollbar-component-theme.scss +15 -19
- package/scrollbar/scrollbar.component.scss +68 -63
- package/scrollbar/scrollbar.directive.d.ts +1 -0
- package/scrollbar/scrollbar.types.d.ts +1 -0
- package/select/_select-theme.scss +14 -16
- package/select/select-option.directive.d.ts +3 -2
- package/select/select.component.d.ts +12 -33
- package/select/select.module.d.ts +1 -1
- package/select/select.scss +3 -11
- package/sidepanel/_sidepanel-theme.scss +8 -10
- package/sidepanel/sidepanel.scss +20 -37
- package/splitter/_splitter-theme.scss +5 -6
- package/splitter/splitter.component.d.ts +10 -5
- package/splitter/splitter.scss +0 -1
- package/table/_table-theme.scss +16 -15
- package/table/table.component.d.ts +8 -1
- package/table/table.module.d.ts +1 -1
- package/table/table.scss +41 -42
- package/tabs/_tabs-common.scss +13 -15
- package/tabs/_tabs-theme.scss +76 -44
- package/tabs/tab-body.component.d.ts +1 -1
- package/tabs/tab-group.component.d.ts +9 -3
- package/tabs/tab-group.scss +2 -8
- package/tabs/tab-header.scss +0 -10
- package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -9
- package/tags/_tag-theme.scss +22 -27
- package/tags/tag-default-options.d.ts +1 -0
- package/tags/tag-input.d.ts +7 -1
- package/tags/tag-list.scss +15 -12
- package/tags/tag.component.d.ts +1 -1
- package/tags/tag.scss +5 -11
- package/textarea/_textarea-theme.scss +2 -5
- package/textarea/textarea.scss +5 -10
- package/timepicker/timepicker.directive.d.ts +1 -1
- package/timepicker/timepicker.scss +2 -8
- package/timezone/_timezone-option-theme.scss +8 -10
- package/timezone/timezone-option.component.scss +5 -8
- package/timezone/timezone-option.directive.d.ts +3 -2
- package/timezone/timezone-select.component.d.ts +2 -1
- package/timezone/timezone-select.component.scss +2 -4
- package/title/title.directive.d.ts +0 -1
- package/toast/_toast-theme.scss +20 -16
- package/toast/toast-container.component.scss +5 -6
- package/toast/toast.component.scss +28 -29
- package/toast/toast.service.d.ts +8 -4
- package/toast/toast.type.d.ts +2 -0
- package/toggle/_toggle-theme.scss +49 -42
- package/toggle/toggle.scss +9 -22
- package/tooltip/_tooltip-theme.scss +12 -16
- package/tooltip/tooltip.component.d.ts +12 -8
- package/tooltip/tooltip.scss +7 -13
- package/tree/_tree-theme.scss +20 -23
- package/tree/toggle.scss +3 -6
- package/tree/tree-base.d.ts +1 -1
- package/tree/tree-option.scss +17 -14
- package/tree/tree-selection.component.d.ts +1 -0
- package/tree-select/_tree-select-theme.scss +12 -15
- package/tree-select/tree-select.component.d.ts +8 -17
- package/tree-select/tree-select.module.d.ts +1 -2
- package/tree-select/tree-select.scss +1 -6
- package/core/styles/_variables.scss +0 -1
|
@@ -2,81 +2,107 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/typography/typography-utils' as *;
|
|
5
|
-
|
|
6
|
-
@use '../core/styles/tokens';
|
|
7
|
-
|
|
8
|
-
$tokens: meta.module-variables(tokens) !default;
|
|
9
|
-
|
|
10
|
-
/* stylelint-disable no-descending-specificity */
|
|
11
|
-
@mixin kbq-file-upload-text-color($states) {
|
|
12
|
-
&,
|
|
13
|
-
.kbq-icon,
|
|
14
|
-
.kbq-link {
|
|
15
|
-
color: map.get($states, border);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin kbq-file-upload-color($states) {
|
|
20
|
-
background-color: map.get($states, background);
|
|
21
|
-
border-color: map.get($states, border) !important;
|
|
22
|
-
}
|
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
|
23
6
|
|
|
24
7
|
@mixin kbq-file-upload-theme($theme) {
|
|
25
|
-
$file-upload: map.get(
|
|
26
|
-
|
|
27
|
-
$single: map.get($file-upload, single);
|
|
28
|
-
$single-states: map.get($single, states);
|
|
29
|
-
|
|
30
|
-
$multiple: map.get($file-upload, multiple);
|
|
31
|
-
$multiple-states: map.get($multiple, states);
|
|
8
|
+
$file-upload: map.get($theme, components, file-upload);
|
|
32
9
|
|
|
33
10
|
.kbq-file-upload {
|
|
34
|
-
.kbq-focused,
|
|
35
|
-
|
|
11
|
+
.kbq-focused,
|
|
12
|
+
.kbq-link.kbq-focused {
|
|
13
|
+
border: 2px solid
|
|
14
|
+
kbq-css-variable(file-upload-single-states-focused, map.get($file-upload, single, states, focused));
|
|
36
15
|
}
|
|
37
16
|
}
|
|
38
17
|
|
|
39
18
|
.kbq-single-file-upload {
|
|
40
19
|
.kbq-file-upload {
|
|
41
|
-
|
|
20
|
+
background-color: kbq-css-variable(
|
|
21
|
+
file-upload-single-default-background,
|
|
22
|
+
map.get($file-upload, single, default, background)
|
|
23
|
+
);
|
|
24
|
+
border-color: kbq-css-variable(
|
|
25
|
+
file-upload-single-default-border,
|
|
26
|
+
map.get($file-upload, single, default, border)
|
|
27
|
+
) !important;
|
|
42
28
|
|
|
43
29
|
&.dragover {
|
|
44
|
-
|
|
30
|
+
background-color: kbq-css-variable(
|
|
31
|
+
file-upload-single-states-on-drag-background,
|
|
32
|
+
map.get($file-upload, single, states, on-drag, background)
|
|
33
|
+
);
|
|
34
|
+
border-color: kbq-css-variable(
|
|
35
|
+
file-upload-single-states-on-drag-border,
|
|
36
|
+
map.get($file-upload, single, states, on-drag, border)
|
|
37
|
+
) !important;
|
|
45
38
|
}
|
|
46
39
|
|
|
47
40
|
&.kbq-error:not(.kbq-disabled) {
|
|
48
|
-
$state-error: map.get($single-states, error);
|
|
49
|
-
|
|
50
41
|
&:not(.dragover) {
|
|
51
|
-
|
|
42
|
+
background-color: kbq-css-variable(
|
|
43
|
+
file-upload-single-states-error-background,
|
|
44
|
+
map.get($file-upload, single, states, error, background)
|
|
45
|
+
);
|
|
46
|
+
border-color: kbq-css-variable(
|
|
47
|
+
file-upload-single-states-error-border,
|
|
48
|
+
map.get($file-upload, single, states, error, border)
|
|
49
|
+
) !important;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
*,
|
|
55
53
|
.kbq-icon {
|
|
56
|
-
color:
|
|
54
|
+
color: kbq-css-variable(
|
|
55
|
+
file-upload-single-states-error-text-block,
|
|
56
|
+
map.get($file-upload, single, states, error, text-block)
|
|
57
|
+
);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
&.kbq-disabled {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
background-color: kbq-css-variable(
|
|
63
|
+
file-upload-single-states-disabled-background,
|
|
64
|
+
map.get($file-upload, single, states, disabled, background)
|
|
65
|
+
);
|
|
66
|
+
border-color: kbq-css-variable(
|
|
67
|
+
file-upload-single-states-disabled-border,
|
|
68
|
+
map.get($file-upload, single, states, disabled, border)
|
|
69
|
+
) !important;
|
|
70
|
+
|
|
71
|
+
&,
|
|
72
|
+
.kbq-icon,
|
|
73
|
+
.kbq-link {
|
|
74
|
+
color: kbq-css-variable(
|
|
75
|
+
file-upload-single-states-disabled-border,
|
|
76
|
+
map.get($file-upload, single, states, disabled, border)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
}
|
|
67
82
|
|
|
68
83
|
.kbq-multiple-file-upload {
|
|
69
84
|
.kbq-file-upload {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
background-color: kbq-css-variable(
|
|
86
|
+
file-upload-multiple-default-background,
|
|
87
|
+
map.get($file-upload, multiple, default, background)
|
|
88
|
+
);
|
|
89
|
+
border-color: kbq-css-variable(
|
|
90
|
+
file-upload-multiple-default-border,
|
|
91
|
+
map.get($file-upload, multiple, default, border)
|
|
92
|
+
) !important;
|
|
73
93
|
|
|
74
94
|
.btn-upload {
|
|
75
|
-
border-top-color:
|
|
95
|
+
border-top-color: kbq-css-variable(
|
|
96
|
+
file-upload-multiple-default-border,
|
|
97
|
+
map.get($file-upload, multiple, default, border)
|
|
98
|
+
);
|
|
76
99
|
}
|
|
77
100
|
|
|
78
101
|
.kbq-file-multiple-uploaded__header {
|
|
79
|
-
border-bottom-color:
|
|
102
|
+
border-bottom-color: kbq-css-variable(
|
|
103
|
+
file-upload-multiple-default-grid-divider,
|
|
104
|
+
map.get($file-upload, multiple, default, grid-divider)
|
|
105
|
+
);
|
|
80
106
|
|
|
81
107
|
.kbq-file-multiple-uploaded__header-inner {
|
|
82
108
|
//color: map.get(map.get($multiple, default), border);;
|
|
@@ -84,49 +110,86 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
84
110
|
}
|
|
85
111
|
|
|
86
112
|
&.dragover {
|
|
87
|
-
|
|
113
|
+
background-color: kbq-css-variable(
|
|
114
|
+
file-upload-multiple-states-on-drag-background,
|
|
115
|
+
map.get($file-upload, multiple, states, on-drag, background)
|
|
116
|
+
);
|
|
117
|
+
border-color: kbq-css-variable(
|
|
118
|
+
file-upload-multiple-states-on-drag-border,
|
|
119
|
+
map.get($file-upload, multiple, states, on-drag, border)
|
|
120
|
+
) !important;
|
|
88
121
|
|
|
89
122
|
.kbq-file-multiple-uploaded__header {
|
|
90
|
-
border-bottom-color:
|
|
123
|
+
border-bottom-color: kbq-css-variable(
|
|
124
|
+
file-upload-multiple-states-on-drag-background,
|
|
125
|
+
map.get($file-upload, multiple, states, on-drag, background)
|
|
126
|
+
) !important;
|
|
91
127
|
}
|
|
92
128
|
|
|
93
129
|
&.selected {
|
|
94
130
|
.dropzone {
|
|
95
|
-
border-top-color:
|
|
131
|
+
border-top-color: kbq-css-variable(
|
|
132
|
+
file-upload-multiple-states-on-drag-border,
|
|
133
|
+
map.get($file-upload, multiple, states, on-drag, border)
|
|
134
|
+
);
|
|
96
135
|
}
|
|
97
136
|
}
|
|
98
137
|
}
|
|
99
138
|
|
|
100
139
|
&.kbq-disabled {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
140
|
+
background-color: kbq-css-variable(
|
|
141
|
+
file-upload-multiple-states-disabled-background,
|
|
142
|
+
map.get($file-upload, multiple, states, disabled, background)
|
|
143
|
+
);
|
|
144
|
+
border-color: kbq-css-variable(
|
|
145
|
+
file-upload-multiple-states-disabled-border,
|
|
146
|
+
map.get($file-upload, multiple, states, disabled, border)
|
|
147
|
+
) !important;
|
|
148
|
+
|
|
149
|
+
&,
|
|
150
|
+
.kbq-icon,
|
|
151
|
+
.kbq-link {
|
|
152
|
+
color: kbq-css-variable(
|
|
153
|
+
file-upload-multiple-states-disabled-border,
|
|
154
|
+
map.get($file-upload, multiple, states, disabled, border)
|
|
155
|
+
);
|
|
156
|
+
}
|
|
104
157
|
|
|
105
158
|
&.selected {
|
|
106
159
|
.dropzone {
|
|
107
|
-
border-top-color:
|
|
160
|
+
border-top-color: kbq-css-variable(
|
|
161
|
+
file-upload-multiple-states-disabled-border,
|
|
162
|
+
map.get($file-upload, multiple, states, disabled, border)
|
|
163
|
+
);
|
|
108
164
|
}
|
|
109
165
|
}
|
|
110
166
|
}
|
|
111
167
|
|
|
112
168
|
&:not(.kbq-disabled) {
|
|
113
169
|
.kbq-file-upload__row.error {
|
|
114
|
-
$state-error: map.get($multiple-states, error);
|
|
115
|
-
|
|
116
170
|
*,
|
|
117
171
|
.kbq-icon {
|
|
118
|
-
color:
|
|
172
|
+
color: kbq-css-variable(
|
|
173
|
+
file-upload-multiple-states-error-text-block,
|
|
174
|
+
map.get($file-upload, multiple, states, error, text-block)
|
|
175
|
+
);
|
|
119
176
|
}
|
|
120
177
|
}
|
|
121
178
|
}
|
|
122
179
|
|
|
123
180
|
.multiple__uploaded-item {
|
|
124
181
|
& .kbq-file-upload__file .kbq-icon {
|
|
125
|
-
color:
|
|
182
|
+
color: kbq-css-variable(
|
|
183
|
+
file-upload-multiple-default-left-icon,
|
|
184
|
+
map.get($file-upload, multiple, default, left-icon)
|
|
185
|
+
);
|
|
126
186
|
}
|
|
127
187
|
|
|
128
188
|
& .kbq-file-upload__action .kbq-icon {
|
|
129
|
-
color:
|
|
189
|
+
color: kbq-css-variable(
|
|
190
|
+
file-upload-multiple-default-icon-button,
|
|
191
|
+
map.get($file-upload, multiple, default, icon-button)
|
|
192
|
+
);
|
|
130
193
|
}
|
|
131
194
|
}
|
|
132
195
|
}
|
|
@@ -135,54 +198,43 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
135
198
|
.kbq-single-file-upload,
|
|
136
199
|
.kbq-multiple-file-upload {
|
|
137
200
|
.kbq-file-upload__hint:not(.kbq-error) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
color: map.get($form-field-hint, text);
|
|
201
|
+
color: kbq-css-variable(form-field-hint-text, map.get($theme, components, form-field-hint, text));
|
|
141
202
|
}
|
|
142
203
|
}
|
|
143
204
|
}
|
|
144
205
|
|
|
145
|
-
|
|
146
206
|
@mixin kbq-file-upload-typography($config) {
|
|
147
207
|
.kbq-single-file-upload {
|
|
148
208
|
& .file-item__text-wrapper,
|
|
149
209
|
& .dropzone__text {
|
|
150
|
-
@include kbq-typography-
|
|
210
|
+
@include kbq-typography-css-variables(file-upload, single-text-block);
|
|
151
211
|
}
|
|
152
212
|
}
|
|
153
213
|
|
|
154
214
|
.kbq-multiple-file-upload {
|
|
155
215
|
.multiple__header {
|
|
156
|
-
@include kbq-typography-
|
|
216
|
+
@include kbq-typography-css-variables(file-upload, multiple-title);
|
|
157
217
|
}
|
|
158
218
|
|
|
159
219
|
.multiple__caption {
|
|
160
220
|
&,
|
|
161
221
|
.kbq-link {
|
|
162
|
-
@include kbq-typography-
|
|
163
|
-
$config, map.get($tokens, file-upload-font-multiple-text-block)
|
|
164
|
-
);
|
|
222
|
+
@include kbq-typography-css-variables(file-upload, multiple-text-block);
|
|
165
223
|
}
|
|
166
224
|
}
|
|
167
225
|
|
|
168
226
|
.kbq-file-multiple-uploaded__header {
|
|
169
|
-
@include kbq-typography-
|
|
170
|
-
$config,
|
|
171
|
-
map.get($tokens, file-upload-font-multiple-grid)
|
|
172
|
-
);
|
|
227
|
+
@include kbq-typography-css-variables(file-upload, multiple-grid);
|
|
173
228
|
}
|
|
174
229
|
|
|
175
230
|
.multiple__uploaded-item {
|
|
176
|
-
@include kbq-typography-
|
|
231
|
+
@include kbq-typography-css-variables(file-upload, multiple-grid);
|
|
177
232
|
}
|
|
178
233
|
|
|
179
234
|
.kbq-file-upload {
|
|
180
235
|
.kbq-list-item,
|
|
181
236
|
.kbq-list-option {
|
|
182
|
-
@include kbq-typography-
|
|
183
|
-
$config,
|
|
184
|
-
map.get($tokens, file-upload-font-multiple-grid)
|
|
185
|
-
);
|
|
237
|
+
@include kbq-typography-css-variables(file-upload, multiple-grid);
|
|
186
238
|
}
|
|
187
239
|
}
|
|
188
240
|
}
|
|
@@ -190,8 +242,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
190
242
|
.kbq-single-file-upload,
|
|
191
243
|
.kbq-multiple-file-upload {
|
|
192
244
|
.kbq-file-upload__hint.kbq-hint .kbq-hint__text {
|
|
193
|
-
@include kbq-typography-
|
|
245
|
+
@include kbq-typography-css-variables(form-field-hint, text);
|
|
194
246
|
}
|
|
195
247
|
}
|
|
196
248
|
}
|
|
197
|
-
/* stylelint-enable no-descending-specificity */
|
|
@@ -11,7 +11,6 @@ export interface KbqFileItem {
|
|
|
11
11
|
}
|
|
12
12
|
export interface KbqInputFile {
|
|
13
13
|
disabled: boolean;
|
|
14
|
-
files: KbqFileItem[] | KbqFileItem | null;
|
|
15
14
|
accept?: string[];
|
|
16
15
|
onFileSelectedViaClick(event: Event): void;
|
|
17
16
|
onFileDropped(files: FileList | KbqFile[]): void;
|
|
@@ -23,3 +22,4 @@ export interface KbqInputFileLabel {
|
|
|
23
22
|
}
|
|
24
23
|
export type KbqFileValidatorFn = (file: File) => string | null;
|
|
25
24
|
export declare const KBQ_FILE_UPLOAD_CONFIGURATION: InjectionToken<KbqInputFileLabel>;
|
|
25
|
+
export declare const isCorrectExtension: (file: File, accept?: string[]) => boolean;
|
|
@@ -3,16 +3,18 @@ import * as i1 from "./file-drop";
|
|
|
3
3
|
import * as i2 from "./single-file-upload.component";
|
|
4
4
|
import * as i3 from "./multiple-file-upload.component";
|
|
5
5
|
import * as i4 from "@angular/common";
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "@koobiq/components/
|
|
8
|
-
import * as i7 from "@koobiq/components/
|
|
9
|
-
import * as i8 from "@koobiq/components/
|
|
10
|
-
import * as i9 from "@koobiq/components/
|
|
11
|
-
import * as i10 from "@koobiq/components/
|
|
12
|
-
import * as i11 from "@koobiq/components/
|
|
13
|
-
import * as i12 from "@koobiq/components/
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@koobiq/components/tooltip";
|
|
8
|
+
import * as i7 from "@koobiq/components/progress-spinner";
|
|
9
|
+
import * as i8 from "@koobiq/components/icon";
|
|
10
|
+
import * as i9 from "@koobiq/components/button";
|
|
11
|
+
import * as i10 from "@koobiq/components/list";
|
|
12
|
+
import * as i11 from "@koobiq/components/form-field";
|
|
13
|
+
import * as i12 from "@koobiq/components/ellipsis-center";
|
|
14
|
+
import * as i13 from "@koobiq/components/core";
|
|
15
|
+
import * as i14 from "@koobiq/components/link";
|
|
14
16
|
export declare class KbqFileUploadModule {
|
|
15
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqFileUploadModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqFileUploadModule, [typeof i1.KbqFileDropDirective, typeof i2.KbqSingleFileUploadComponent, typeof i3.KbqMultipleFileUploadComponent], [typeof i4.CommonModule, typeof i5.
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqFileUploadModule, [typeof i1.KbqFileDropDirective, typeof i2.KbqSingleFileUploadComponent, typeof i3.KbqMultipleFileUploadComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.KbqToolTipModule, typeof i7.KbqProgressSpinnerModule, typeof i8.KbqIconModule, typeof i9.KbqButtonModule, typeof i10.KbqListModule, typeof i11.KbqFormFieldModule, typeof i12.KbqEllipsisCenterModule, typeof i13.KbqDataSizePipe, typeof i14.KbqLinkModule], [typeof i2.KbqSingleFileUploadComponent, typeof i3.KbqMultipleFileUploadComponent, typeof i1.KbqFileDropDirective]>;
|
|
17
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<KbqFileUploadModule>;
|
|
18
20
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
1
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Renderer2, TemplateRef } from '@angular/core';
|
|
3
2
|
import { CanDisable, KbqLocaleService } from '@koobiq/components/core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
4
|
import { KbqFile, KbqFileItem, KbqFileValidatorFn, KbqInputFile, KbqInputFileLabel } from './file-upload';
|
|
5
|
+
import { ProgressSpinnerMode } from '@koobiq/components/progress-spinner';
|
|
6
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export interface KbqInputFileMultipleLabel extends KbqInputFileLabel {
|
|
7
9
|
captionTextWhenSelected: string;
|
|
@@ -13,19 +15,28 @@ export interface KbqInputFileMultipleLabel extends KbqInputFileLabel {
|
|
|
13
15
|
[k: string | number | symbol]: unknown;
|
|
14
16
|
}
|
|
15
17
|
export declare const KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: KbqInputFileMultipleLabel;
|
|
16
|
-
export declare class KbqMultipleFileUploadComponent implements AfterViewInit, OnDestroy, KbqInputFile, CanDisable {
|
|
17
|
-
private focusMonitor;
|
|
18
|
+
export declare class KbqMultipleFileUploadComponent implements AfterViewInit, OnDestroy, KbqInputFile, CanDisable, ControlValueAccessor {
|
|
18
19
|
private cdr;
|
|
19
20
|
private renderer;
|
|
20
21
|
readonly configuration: KbqInputFileMultipleLabel;
|
|
21
22
|
private localeService?;
|
|
23
|
+
ngControl?: NgControl | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* A value responsible for progress spinner type.
|
|
26
|
+
* Loading logic depends on selected mode */
|
|
27
|
+
progressMode: ProgressSpinnerMode;
|
|
22
28
|
accept?: string[];
|
|
23
29
|
disabled: boolean;
|
|
24
30
|
errors: string[];
|
|
25
|
-
files: KbqFileItem[];
|
|
26
31
|
size: 'compact' | 'default';
|
|
27
32
|
inputId: string;
|
|
33
|
+
/**
|
|
34
|
+
* Alternative for FormControl's validation
|
|
35
|
+
*/
|
|
28
36
|
customValidation?: KbqFileValidatorFn[];
|
|
37
|
+
private _files;
|
|
38
|
+
get files(): KbqFileItem[];
|
|
39
|
+
set files(currentFileList: KbqFileItem[]);
|
|
29
40
|
fileQueueChanged: EventEmitter<KbqFileItem[]>;
|
|
30
41
|
customFileIcon: TemplateRef<HTMLElement>;
|
|
31
42
|
input: ElementRef<HTMLInputElement>;
|
|
@@ -38,23 +49,40 @@ export declare class KbqMultipleFileUploadComponent implements AfterViewInit, On
|
|
|
38
49
|
separatedCaptionText: string[];
|
|
39
50
|
separatedCaptionTextWhenSelected: string[];
|
|
40
51
|
separatedCaptionTextForCompactSize: string[];
|
|
41
|
-
|
|
52
|
+
statusChangeSubscription?: Subscription;
|
|
53
|
+
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
|
|
54
|
+
cvaOnChange: (_: KbqFileItem[]) => void;
|
|
55
|
+
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
|
|
56
|
+
onTouched: () => void;
|
|
42
57
|
get acceptedFiles(): string;
|
|
43
58
|
get hasErrors(): boolean;
|
|
44
|
-
constructor(
|
|
59
|
+
constructor(cdr: ChangeDetectorRef, renderer: Renderer2, configuration: KbqInputFileMultipleLabel, localeService?: KbqLocaleService | undefined, ngControl?: NgControl | undefined);
|
|
45
60
|
ngAfterViewInit(): void;
|
|
46
61
|
ngOnDestroy(): void;
|
|
62
|
+
/** Implemented as part of ControlValueAccessor.
|
|
63
|
+
* @docs-private */
|
|
64
|
+
writeValue(files: FileList | KbqFileItem[] | null): void;
|
|
65
|
+
/** Implemented as part of ControlValueAccessor.
|
|
66
|
+
* @docs-private */
|
|
67
|
+
registerOnChange(fn: any): void;
|
|
68
|
+
/** Implemented as part of ControlValueAccessor.
|
|
69
|
+
* @docs-private */
|
|
70
|
+
registerOnTouched(fn: any): void;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
73
|
+
* @param isDisabled Whether the control should be disabled.
|
|
74
|
+
* @docs-private
|
|
75
|
+
*/
|
|
76
|
+
setDisabledState(isDisabled: boolean): void;
|
|
47
77
|
onFileSelectedViaClick({ target }: Event): void;
|
|
48
78
|
onFileDropped(files: FileList | KbqFile[]): void;
|
|
49
79
|
deleteFile(index: number, event?: MouseEvent): void;
|
|
50
80
|
onFileListChange(): void;
|
|
51
|
-
onFocus(focusState: boolean): void;
|
|
52
81
|
private updateLocaleParams;
|
|
53
82
|
private mapToFileItem;
|
|
54
83
|
private validateFile;
|
|
55
|
-
private isCorrectExtension;
|
|
56
84
|
private initDefaultParams;
|
|
57
85
|
private getCaptionText;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KbqMultipleFileUploadComponent, [null, null,
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqMultipleFileUploadComponent, "kbq-multiple-file-upload", never, { "
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqMultipleFileUploadComponent, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
87
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqMultipleFileUploadComponent, "kbq-multiple-file-upload,kbq-file-upload[multiple]", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "size": { "alias": "size"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "files": { "alias": "files"; "required": false; }; }, { "fileQueueChanged": "fileQueueChanged"; }, ["customFileIcon"], ["[hint]"], false, never>;
|
|
60
88
|
}
|