@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,102 +2,57 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/tokens';
|
|
5
|
-
|
|
6
|
-
@use '../core/styles/common';
|
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
6
|
|
|
8
7
|
$tokens: meta.module-variables(tokens) !default;
|
|
9
8
|
|
|
10
|
-
//todo нужно рефакторить со стилями тут сложно
|
|
11
|
-
/* stylelint-disable no-descending-specificity */
|
|
12
|
-
|
|
9
|
+
// todo нужно рефакторить со стилями тут сложно
|
|
13
10
|
.kbq-multiple-file-upload .kbq-file-upload {
|
|
14
|
-
border-radius:
|
|
15
|
-
|
|
16
|
-
map.get($tokens, file-upload-size-multiple-big-container-border-radius)
|
|
17
|
-
);
|
|
18
|
-
border-width: var(
|
|
19
|
-
--kbq-file-upload-size-multiple-big-container-border-width,
|
|
20
|
-
map.get($tokens, file-upload-size-multiple-big-container-border-width)
|
|
21
|
-
);
|
|
11
|
+
border-radius: kbq-css-variable(file-upload-size-multiple-big-container-border-radius);
|
|
12
|
+
border-width: kbq-css-variable(file-upload-size-multiple-big-container-border-width);
|
|
22
13
|
border-style: dashed;
|
|
23
14
|
|
|
24
15
|
&.default:not(.selected) {
|
|
25
16
|
justify-content: center;
|
|
26
17
|
|
|
27
|
-
padding:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
--kbq-file-upload-size-multiple-big-container-padding-vertical,
|
|
34
|
-
map.get($tokens, file-upload-size-multiple-big-container-padding-vertical)
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
min-height: var(
|
|
38
|
-
--kbq-file-upload-size-multiple-big-container-min-height,
|
|
39
|
-
map.get($tokens, file-upload-size-multiple-big-container-min-height)
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
min-width: var(
|
|
43
|
-
--kbq-file-upload-size-multiple-big-container-min-width,
|
|
44
|
-
map.get($tokens, file-upload-size-multiple-big-container-min-width)
|
|
45
|
-
);
|
|
18
|
+
padding: kbq-css-variable(file-upload-size-multiple-big-container-padding-vertical)
|
|
19
|
+
kbq-css-variable(file-upload-size-multiple-big-container-padding-vertical);
|
|
20
|
+
|
|
21
|
+
min-height: kbq-css-variable(file-upload-size-multiple-big-container-min-height);
|
|
22
|
+
|
|
23
|
+
min-width: kbq-css-variable(file-upload-size-multiple-big-container-min-width);
|
|
46
24
|
|
|
47
25
|
& .dropzone {
|
|
48
|
-
gap:
|
|
49
|
-
--kbq-file-upload-size-multiple-big-container-content-gap-horizontal,
|
|
50
|
-
map.get($tokens, file-upload-size-multiple-big-container-content-gap-horizontal)
|
|
51
|
-
);
|
|
26
|
+
gap: kbq-css-variable(file-upload-size-multiple-big-container-content-gap-horizontal);
|
|
52
27
|
}
|
|
53
28
|
|
|
54
29
|
& .dropzone__text {
|
|
55
|
-
& .
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
map.get($tokens, file-upload-size-multiple-big-text-block-content-gap-vertical)
|
|
59
|
-
);
|
|
30
|
+
& .multiple__header {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
60
33
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
34
|
+
& .multiple__caption {
|
|
35
|
+
display: block;
|
|
36
|
+
padding-top: kbq-css-variable(file-upload-size-multiple-big-text-block-content-gap-vertical);
|
|
37
|
+
// гап не применяется тк не флекс. в целом гап не нужен, тк по логике дизайна ссылка от текста отделяется пробелом
|
|
38
|
+
gap: kbq-css-variable(file-upload-size-multiple-big-text-block-content-gap-horizontal);
|
|
65
39
|
}
|
|
66
40
|
}
|
|
67
41
|
}
|
|
68
42
|
|
|
69
43
|
&.compact:not(.selected) {
|
|
70
|
-
padding:
|
|
71
|
-
|
|
72
|
-
--kbq-file-upload-size-single-container-padding-vertical,
|
|
73
|
-
map.get($tokens, file-upload-size-single-container-padding-vertical)
|
|
74
|
-
)
|
|
75
|
-
var(
|
|
76
|
-
--kbq-file-upload-size-single-container-padding-horizontal,
|
|
77
|
-
map.get($tokens, file-upload-size-single-container-padding-horizontal)
|
|
78
|
-
);
|
|
44
|
+
padding: kbq-css-variable(file-upload-size-single-container-padding-vertical)
|
|
45
|
+
kbq-css-variable(file-upload-size-single-container-padding-horizontal);
|
|
79
46
|
|
|
80
47
|
& .dropzone {
|
|
81
|
-
gap:
|
|
82
|
-
--kbq-file-upload-size-single-container-content-gap-horizontal,
|
|
83
|
-
map.get($tokens, file-upload-size-single-container-content-gap-horizontal)
|
|
84
|
-
);
|
|
48
|
+
gap: kbq-css-variable(file-upload-size-single-container-content-gap-horizontal);
|
|
85
49
|
|
|
86
50
|
& .dropzone__text.multiple__caption {
|
|
87
|
-
padding-top:
|
|
88
|
-
--kbq-file-upload-size-single-text-block-padding-vertical,
|
|
89
|
-
map.get($tokens, file-upload-size-single-text-block-padding-vertical)
|
|
90
|
-
);
|
|
51
|
+
padding-top: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
91
52
|
|
|
92
|
-
padding-bottom:
|
|
93
|
-
--kbq-file-upload-size-single-text-block-padding-vertical,
|
|
94
|
-
map.get($tokens, file-upload-size-single-text-block-padding-vertical)
|
|
95
|
-
);
|
|
53
|
+
padding-bottom: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
96
54
|
|
|
97
|
-
gap:
|
|
98
|
-
--kbq-file-upload-size-single-text-block-content-gap-horizontal,
|
|
99
|
-
map.get($tokens, file-upload-size-single-text-block-content-gap-horizontal)
|
|
100
|
-
);
|
|
55
|
+
gap: kbq-css-variable(file-upload-size-single-text-block-content-gap-horizontal);
|
|
101
56
|
}
|
|
102
57
|
}
|
|
103
58
|
}
|
|
@@ -110,14 +65,17 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
110
65
|
$padding-horizontal: map.get($tokens, file-upload-size-multiple-big-grid-cell-padding-horizontal);
|
|
111
66
|
$outline-width: map.get($tokens, list-size-container-focus-outline-width);
|
|
112
67
|
|
|
113
|
-
padding:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
68
|
+
padding: calc(
|
|
69
|
+
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, $padding-vertical) - var(
|
|
70
|
+
--kbq-list-size-container-focus-outline-width,
|
|
71
|
+
$outline-width
|
|
72
|
+
)
|
|
117
73
|
)
|
|
118
74
|
calc(
|
|
119
|
-
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, $padding-horizontal) -
|
|
120
|
-
|
|
75
|
+
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, $padding-horizontal) - var(
|
|
76
|
+
--kbq-list-size-container-focus-outline-width,
|
|
77
|
+
$outline-width
|
|
78
|
+
)
|
|
121
79
|
);
|
|
122
80
|
}
|
|
123
81
|
|
|
@@ -139,10 +97,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
139
97
|
width: 65%;
|
|
140
98
|
max-width: 65%;
|
|
141
99
|
|
|
142
|
-
gap:
|
|
143
|
-
--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal,
|
|
144
|
-
map.get($tokens, file-upload-size-multiple-big-grid-cell-content-gap-horizontal)
|
|
145
|
-
);
|
|
100
|
+
gap: kbq-css-variable(file-upload-size-multiple-big-grid-cell-content-gap-horizontal);
|
|
146
101
|
}
|
|
147
102
|
|
|
148
103
|
.kbq-file-upload__size {
|
|
@@ -154,7 +109,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
154
109
|
|
|
155
110
|
.kbq-file-upload__file,
|
|
156
111
|
.kbq-file-upload__size,
|
|
157
|
-
.kbq-file-upload__action
|
|
112
|
+
.kbq-file-upload__action {
|
|
158
113
|
//padding-left: $horizontal-padding-item;
|
|
159
114
|
//padding-right: $horizontal-padding-item;
|
|
160
115
|
}
|
|
@@ -179,19 +134,17 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
179
134
|
.kbq-file-multiple-uploaded__header-inner {
|
|
180
135
|
$padding-vertical: map.get($tokens, file-upload-size-multiple-big-grid-cell-padding-vertical);
|
|
181
136
|
$padding-horizontal: map.get($tokens, file-upload-size-multiple-big-grid-cell-padding-horizontal);
|
|
182
|
-
$compensation:
|
|
137
|
+
$compensation: 2px;
|
|
183
138
|
|
|
184
|
-
padding:
|
|
185
|
-
calc(
|
|
139
|
+
padding: calc(
|
|
186
140
|
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, $padding-vertical) +
|
|
187
|
-
|
|
141
|
+
$compensation
|
|
188
142
|
)
|
|
189
143
|
calc(
|
|
190
144
|
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, $padding-horizontal) +
|
|
191
|
-
|
|
145
|
+
$compensation
|
|
192
146
|
);
|
|
193
147
|
}
|
|
194
|
-
|
|
195
148
|
}
|
|
196
149
|
|
|
197
150
|
.btn-upload {
|
|
@@ -199,46 +152,24 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
199
152
|
$padding-horizontal: map.get($tokens, file-upload-size-single-container-padding-horizontal);
|
|
200
153
|
$border-width: map.get($tokens, file-upload-size-single-container-border-width);
|
|
201
154
|
|
|
202
|
-
padding:
|
|
203
|
-
calc(var(--kbq-file-upload-size-single-container-padding-vertical, $padding-vertical) - $border-width)
|
|
155
|
+
padding: calc(var(--kbq-file-upload-size-single-container-padding-vertical, $padding-vertical) - $border-width)
|
|
204
156
|
calc(var(--kbq-file-upload-size-single-container-padding-horizontal, $padding-horizontal) - $border-width);
|
|
205
157
|
|
|
206
|
-
border-top-left-radius:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
);
|
|
210
|
-
|
|
211
|
-
border-top-right-radius: var(
|
|
212
|
-
--kbq-file-upload-size-single-container-border-radius,
|
|
213
|
-
map.get($tokens, file-upload-size-single-container-border-radius)
|
|
214
|
-
);
|
|
215
|
-
border-top-width: var(
|
|
216
|
-
--kbq-file-upload-size-single-container-border-width,
|
|
217
|
-
map.get($tokens, file-upload-size-single-container-border-width)
|
|
218
|
-
);
|
|
158
|
+
border-top-left-radius: kbq-css-variable(file-upload-size-single-container-border-radius);
|
|
159
|
+
|
|
160
|
+
border-top-right-radius: kbq-css-variable(file-upload-size-single-container-border-radius);
|
|
161
|
+
border-top-width: kbq-css-variable(file-upload-size-single-container-border-width);
|
|
219
162
|
border-top-style: dashed;
|
|
220
163
|
|
|
221
164
|
& .dropzone {
|
|
222
|
-
gap:
|
|
223
|
-
--kbq-file-upload-size-single-container-content-gap-horizontal,
|
|
224
|
-
map.get($tokens, file-upload-size-single-container-content-gap-horizontal)
|
|
225
|
-
);
|
|
165
|
+
gap: kbq-css-variable(file-upload-size-single-container-content-gap-horizontal);
|
|
226
166
|
|
|
227
167
|
& .dropzone__text.multiple__caption {
|
|
228
|
-
padding-top:
|
|
229
|
-
--kbq-file-upload-size-single-text-block-padding-vertical,
|
|
230
|
-
map.get($tokens, file-upload-size-single-text-block-padding-vertical)
|
|
231
|
-
);
|
|
168
|
+
padding-top: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
232
169
|
|
|
233
|
-
padding-bottom:
|
|
234
|
-
--kbq-file-upload-size-single-text-block-padding-vertical,
|
|
235
|
-
map.get($tokens, file-upload-size-single-text-block-padding-vertical)
|
|
236
|
-
);
|
|
170
|
+
padding-bottom: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
237
171
|
|
|
238
|
-
gap:
|
|
239
|
-
--kbq-file-upload-size-single-text-block-content-gap-horizontal,
|
|
240
|
-
map.get($tokens, file-upload-size-single-text-block-content-gap-horizontal)
|
|
241
|
-
);
|
|
172
|
+
gap: kbq-css-variable(file-upload-size-single-text-block-content-gap-horizontal);
|
|
242
173
|
}
|
|
243
174
|
}
|
|
244
175
|
}
|
|
@@ -254,6 +185,5 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
254
185
|
}
|
|
255
186
|
|
|
256
187
|
.kbq-file-upload__hint {
|
|
257
|
-
margin-top:
|
|
188
|
+
margin-top: kbq-css-variable(form-field-hint-size-margin-top);
|
|
258
189
|
}
|
|
259
|
-
/* stylelint-enable no-descending-specificity */
|
|
@@ -1,41 +1,68 @@
|
|
|
1
|
-
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
1
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
|
|
3
2
|
import { CanDisable, KbqLocaleService } from '@koobiq/components/core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { ProgressSpinnerMode } from '@koobiq/components/progress-spinner';
|
|
5
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
6
|
import { KbqFile, KbqFileItem, KbqFileValidatorFn, KbqInputFile, KbqInputFileLabel } from './file-upload';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare const KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: KbqInputFileLabel;
|
|
7
|
-
export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDestroy, KbqInputFile, CanDisable {
|
|
8
|
-
private focusMonitor;
|
|
9
|
+
export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDestroy, KbqInputFile, CanDisable, ControlValueAccessor {
|
|
9
10
|
private cdr;
|
|
10
11
|
private renderer;
|
|
11
12
|
readonly configuration: KbqInputFileLabel;
|
|
12
13
|
private localeService?;
|
|
13
|
-
|
|
14
|
+
ngControl?: NgControl | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* A value responsible for progress spinner type.
|
|
17
|
+
* Loading logic depends on selected mode */
|
|
18
|
+
progressMode: ProgressSpinnerMode;
|
|
19
|
+
accept?: string[];
|
|
14
20
|
disabled: boolean;
|
|
15
21
|
errors: string[];
|
|
16
|
-
files: KbqFileItem[];
|
|
17
22
|
inputId: string;
|
|
23
|
+
/**
|
|
24
|
+
* Alternative for FormControl's validation
|
|
25
|
+
*/
|
|
18
26
|
customValidation?: KbqFileValidatorFn[];
|
|
19
|
-
|
|
27
|
+
private _file;
|
|
28
|
+
get file(): KbqFileItem | null;
|
|
29
|
+
set file(currentFile: KbqFileItem | null);
|
|
30
|
+
fileQueueChange: EventEmitter<KbqFileItem | null>;
|
|
20
31
|
input: ElementRef<HTMLInputElement>;
|
|
21
|
-
hasFocus: boolean;
|
|
22
32
|
config: KbqInputFileLabel;
|
|
23
33
|
separatedCaptionText: string[];
|
|
24
|
-
|
|
34
|
+
statusChangeSubscription?: Subscription;
|
|
35
|
+
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
|
|
36
|
+
cvaOnChange: (_: KbqFileItem | null) => void;
|
|
37
|
+
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
|
|
38
|
+
onTouched: () => void;
|
|
25
39
|
get acceptedFiles(): string;
|
|
26
|
-
constructor(
|
|
40
|
+
constructor(cdr: ChangeDetectorRef, renderer: Renderer2, configuration: KbqInputFileLabel, localeService?: KbqLocaleService | undefined, ngControl?: NgControl | undefined);
|
|
27
41
|
ngAfterViewInit(): void;
|
|
28
42
|
ngOnDestroy(): void;
|
|
43
|
+
/** Implemented as part of ControlValueAccessor.
|
|
44
|
+
* @docs-private */
|
|
45
|
+
writeValue(file: File | KbqFileItem | null): void;
|
|
46
|
+
/** Implemented as part of ControlValueAccessor.
|
|
47
|
+
* @docs-private */
|
|
48
|
+
registerOnChange(fn: any): void;
|
|
49
|
+
/** Implemented as part of ControlValueAccessor.
|
|
50
|
+
* @docs-private */
|
|
51
|
+
registerOnTouched(fn: any): void;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
54
|
+
* @param isDisabled Whether the control should be disabled.
|
|
55
|
+
* @docs-private
|
|
56
|
+
*/
|
|
57
|
+
setDisabledState(isDisabled: boolean): void;
|
|
29
58
|
onFileSelectedViaClick({ target }: Event): void;
|
|
30
59
|
deleteItem(event?: MouseEvent): void;
|
|
31
60
|
onFileDropped(files: FileList | KbqFile[]): void;
|
|
32
|
-
onFocus(focusState: boolean): void;
|
|
33
61
|
private updateLocaleParams;
|
|
34
62
|
private mapToFileItem;
|
|
35
63
|
private validateFile;
|
|
36
|
-
private isCorrectExtension;
|
|
37
64
|
private initDefaultParams;
|
|
38
65
|
private getCaptionText;
|
|
39
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSingleFileUploadComponent, [null, null,
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload", never, { "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSingleFileUploadComponent, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload,kbq-file-upload:not([multiple])", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "file": { "alias": "file"; "required": false; }; }, { "fileQueueChange": "fileQueueChange"; }, never, ["[hint]", "[kbq-icon]"], false, never>;
|
|
41
68
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use '../core/styles/tokens';
|
|
5
5
|
|
|
6
6
|
@use '../core/styles/common';
|
|
7
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
8
|
|
|
8
9
|
$tokens: meta.module-variables(tokens) !default;
|
|
9
10
|
|
|
@@ -12,42 +13,23 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
12
13
|
$padding-horizontal: map.get($tokens, file-upload-size-single-container-padding-horizontal);
|
|
13
14
|
$border-width: map.get($tokens, file-upload-size-single-container-border-width);
|
|
14
15
|
|
|
15
|
-
padding:
|
|
16
|
-
calc(var(--kbq-file-upload-size-single-container-padding-vertical, $padding-vertical) - $border-width)
|
|
16
|
+
padding: calc(var(--kbq-file-upload-size-single-container-padding-vertical, $padding-vertical) - $border-width)
|
|
17
17
|
calc(var(--kbq-file-upload-size-single-container-padding-horizontal, $padding-horizontal) - $border-width);
|
|
18
18
|
|
|
19
|
-
border-radius:
|
|
20
|
-
|
|
21
|
-
map.get($tokens, file-upload-size-single-container-border-radius)
|
|
22
|
-
);
|
|
23
|
-
border-width: var(
|
|
24
|
-
--kbq-file-upload-size-single-container-border-width,
|
|
25
|
-
map.get($tokens, file-upload-size-single-container-border-width)
|
|
26
|
-
);
|
|
19
|
+
border-radius: kbq-css-variable(file-upload-size-single-container-border-radius);
|
|
20
|
+
border-width: kbq-css-variable(file-upload-size-single-container-border-width);
|
|
27
21
|
border-style: dashed;
|
|
28
22
|
|
|
29
23
|
& .dropzone__text {
|
|
30
|
-
padding-top:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
padding-bottom: var(
|
|
36
|
-
--kbq-file-upload-size-single-text-block-padding-vertical,
|
|
37
|
-
map.get($tokens, file-upload-size-single-text-block-padding-vertical)
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
gap: var(
|
|
41
|
-
--kbq-file-upload-size-single-text-block-content-gap-horizontal,
|
|
42
|
-
map.get($tokens, file-upload-size-single-text-block-content-gap-horizontal)
|
|
43
|
-
);
|
|
24
|
+
padding-top: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
25
|
+
|
|
26
|
+
padding-bottom: kbq-css-variable(file-upload-size-single-text-block-padding-vertical);
|
|
27
|
+
|
|
28
|
+
gap: kbq-css-variable(file-upload-size-single-text-block-content-gap-horizontal);
|
|
44
29
|
}
|
|
45
30
|
|
|
46
31
|
& .dropzone {
|
|
47
|
-
gap:
|
|
48
|
-
--kbq-file-upload-size-single-container-content-gap-horizontal,
|
|
49
|
-
map.get($tokens, file-upload-size-single-container-content-gap-horizontal)
|
|
50
|
-
);
|
|
32
|
+
gap: kbq-css-variable(file-upload-size-single-container-content-gap-horizontal);
|
|
51
33
|
}
|
|
52
34
|
|
|
53
35
|
.file-item {
|
|
@@ -58,10 +40,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
58
40
|
align-items: center;
|
|
59
41
|
width: 100%;
|
|
60
42
|
|
|
61
|
-
gap:
|
|
62
|
-
--kbq-file-upload-size-single-container-content-gap-horizontal,
|
|
63
|
-
map.get($tokens, file-upload-size-single-container-content-gap-horizontal)
|
|
64
|
-
);
|
|
43
|
+
gap: kbq-css-variable(file-upload-size-single-container-content-gap-horizontal);
|
|
65
44
|
|
|
66
45
|
.file-item__text {
|
|
67
46
|
width: 120px;
|
|
@@ -76,5 +55,5 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
76
55
|
}
|
|
77
56
|
|
|
78
57
|
.kbq-file-upload__hint {
|
|
79
|
-
margin-top:
|
|
58
|
+
margin-top: kbq-css-variable(form-field-hint-size-margin-top);
|
|
80
59
|
}
|
|
@@ -3,104 +3,114 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/theming/theming' as *;
|
|
5
5
|
@use '../core/styles/typography/typography-utils' as *;
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
6
7
|
|
|
8
|
+
@mixin kbq-form-field-state($component, $state-name) {
|
|
9
|
+
$state: map.get($component, $state-name);
|
|
7
10
|
|
|
8
|
-
@mixin kbq-form-field-state($state) {
|
|
9
11
|
.kbq-form-field__container {
|
|
10
|
-
border-color: map.get($state, border);
|
|
11
|
-
background-color: map.get($state, background);
|
|
12
|
+
border-color: kbq-css-variable(form-field-#{$state-name}-border, map.get($state, border));
|
|
13
|
+
background-color: kbq-css-variable(form-field-#{$state-name}-background, map.get($state, background));
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
.kbq-input,
|
|
15
17
|
.kbq-tag-input,
|
|
16
18
|
.kbq-textarea {
|
|
17
|
-
color: map.get($state, text);
|
|
19
|
+
color: kbq-css-variable(form-field-#{$state-name}-text, map.get($state, text));
|
|
18
20
|
|
|
19
21
|
&::placeholder {
|
|
20
|
-
color: map.get($state, placeholder);
|
|
22
|
+
color: kbq-css-variable(form-field-#{$state-name}-placeholder, map.get($state, placeholder));
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
&::-ms-input-placeholder {
|
|
24
|
-
color: map.get($state, placeholder);
|
|
26
|
+
color: kbq-css-variable(form-field-#{$state-name}-placeholder, map.get($state, placeholder));
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
&::-webkit-input-placeholder {
|
|
28
|
-
color: map.get($state, placeholder);
|
|
30
|
+
color: kbq-css-variable(form-field-#{$state-name}-placeholder, map.get($state, placeholder));
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
@mixin kbq-form-field-theme($theme) {
|
|
34
|
-
$foreground: map.get($theme, foreground);
|
|
35
|
-
|
|
36
36
|
.kbq-form-field {
|
|
37
|
-
$form-field: map.get(
|
|
38
|
-
|
|
39
|
-
$default: map.get($form-field, default);
|
|
40
|
-
$autofill: map.get($form-field, autofill);
|
|
41
|
-
$error: map.get($form-field, error);
|
|
42
|
-
$focused: map.get($form-field, focused);
|
|
43
|
-
$disabled: map.get($form-field, disabled);
|
|
37
|
+
$form-field: map.get($theme, components, form-field);
|
|
44
38
|
|
|
45
|
-
@include kbq-form-field-state($default);
|
|
39
|
+
@include kbq-form-field-state($form-field, default);
|
|
46
40
|
|
|
47
|
-
/* stylelint-disable no-descending-specificity */
|
|
48
41
|
& .kbq-input {
|
|
49
42
|
//https://css-tricks.com/almanac/selectors/a/autofill/
|
|
50
43
|
&:-webkit-autofill,
|
|
51
44
|
&:-webkit-autofill:hover,
|
|
52
45
|
&:-webkit-autofill:focus {
|
|
53
|
-
-webkit-box-shadow: 0 0 0 40rem
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
-webkit-box-shadow: 0 0 0 40rem
|
|
47
|
+
kbq-css-variable(
|
|
48
|
+
form-field-states-autofill-background,
|
|
49
|
+
map.get($form-field, states-autofill, background)
|
|
50
|
+
)
|
|
51
|
+
inset;
|
|
52
|
+
-webkit-text-fill-color: kbq-css-variable(
|
|
53
|
+
form-field-states-autofill-text,
|
|
54
|
+
map.get($form-field, states-autofill, text)
|
|
55
|
+
);
|
|
56
|
+
caret-color: kbq-css-variable(
|
|
57
|
+
form-field-states-autofill-text,
|
|
58
|
+
map.get($form-field, states-autofill, text)
|
|
59
|
+
);
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
&.cdk-focused {
|
|
60
|
-
@include kbq-form-field-state($focused);
|
|
64
|
+
@include kbq-form-field-state($form-field, states-focused);
|
|
61
65
|
|
|
62
66
|
& .kbq-form-field__container {
|
|
63
|
-
box-shadow: 0 0 0 1px
|
|
67
|
+
box-shadow: 0 0 0.1px 1px
|
|
68
|
+
kbq-css-variable(
|
|
69
|
+
form-field-states-focused-focu-outline,
|
|
70
|
+
map.get($form-field, states-focused, focus-outline)
|
|
71
|
+
);
|
|
64
72
|
}
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
&.kbq-form-field_invalid,
|
|
68
76
|
&.ng-invalid {
|
|
69
|
-
@include kbq-form-field-state($error);
|
|
77
|
+
@include kbq-form-field-state($form-field, states-error);
|
|
70
78
|
|
|
71
79
|
&.cdk-focused .kbq-form-field__container {
|
|
72
|
-
box-shadow: 0 0 0 1px
|
|
80
|
+
box-shadow: 0 0 0.1px 1px
|
|
81
|
+
kbq-css-variable(
|
|
82
|
+
form-field-states-error-focu-outline,
|
|
83
|
+
map.get($form-field, states-error, focus-outline)
|
|
84
|
+
);
|
|
73
85
|
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
&.kbq-disabled {
|
|
77
|
-
@include kbq-form-field-state($disabled);
|
|
89
|
+
@include kbq-form-field-state($form-field, states-disabled);
|
|
78
90
|
|
|
79
91
|
.kbq-icon {
|
|
80
|
-
color: map.get($disabled, text);
|
|
81
|
-
-webkit-text-fill-color:
|
|
92
|
+
color: kbq-css-variable(form-field-disabled-text, map.get($form-field, disabled, text));
|
|
93
|
+
-webkit-text-fill-color: kbq-css-variable(
|
|
94
|
+
form-field-disabled-text,
|
|
95
|
+
map.get($form-field, disabled, text)
|
|
96
|
+
);
|
|
82
97
|
}
|
|
83
98
|
}
|
|
84
|
-
/* stylelint-enable no-descending-specificity */
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
.kbq-form-field__hint {
|
|
88
102
|
& > .kbq-hint:not(.kbq-password-hint, .kbq-contrast-fade, .kbq-success, .kbq-warning, .kbq-error) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
color: map.get($form-field-hint, text);
|
|
103
|
+
color: kbq-css-variable(form-field-hint-text, map.get($theme, components, form-field-hint, text));
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
}
|
|
95
107
|
|
|
96
108
|
@mixin kbq-form-field-typography($config) {
|
|
97
|
-
$tokens: map.get($config, tokens);
|
|
98
|
-
|
|
99
109
|
.kbq-form-field {
|
|
100
|
-
@include kbq-typography-
|
|
110
|
+
@include kbq-typography-css-variables(form-field, text);
|
|
101
111
|
}
|
|
102
112
|
|
|
103
113
|
.kbq-form-field__hint > .kbq-hint:not(.kbq-password-hint) .kbq-hint__text {
|
|
104
|
-
@include kbq-typography-
|
|
114
|
+
@include kbq-typography-css-variables(form-field-hint, text);
|
|
105
115
|
}
|
|
106
116
|
}
|
|
@@ -3,69 +3,64 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/theming/theming' as *;
|
|
5
5
|
@use '../core/styles/typography/typography-utils' as *;
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
6
7
|
|
|
8
|
+
@mixin kbq-hint-color($component, $type, $style-name) {
|
|
9
|
+
$style: map.get($component, $type, $style-name);
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
color: map.get($hint, text);
|
|
11
|
+
color: kbq-css-variable(hint-#{$type}-#{$style-name}-text, map.get($style, text));
|
|
10
12
|
|
|
11
13
|
& .kbq-icon {
|
|
12
|
-
color: map.get($
|
|
14
|
+
color: kbq-css-variable(hint-#{$type}-#{$style-name}-icon, map.get($style, icon)) !important;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
|
|
17
18
|
@mixin kbq-hint-theme($theme) {
|
|
18
19
|
$hint: map.get(map.get($theme, components), hint);
|
|
19
20
|
|
|
20
21
|
.kbq-hint {
|
|
21
|
-
$fill-text-on: map.get($hint, fill-text-on);
|
|
22
|
-
|
|
23
22
|
&.kbq-contrast-fade {
|
|
24
|
-
@include kbq-hint-color(
|
|
23
|
+
@include kbq-hint-color($hint, fill-text-on, fade-contrast);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
&.kbq-success {
|
|
28
|
-
@include kbq-hint-color(
|
|
27
|
+
@include kbq-hint-color($hint, fill-text-on, success);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
&.kbq-warning {
|
|
32
|
-
@include kbq-hint-color(
|
|
31
|
+
@include kbq-hint-color($hint, fill-text-on, warning);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
&.kbq-error {
|
|
36
|
-
@include kbq-hint-color(
|
|
35
|
+
@include kbq-hint-color($hint, fill-text-on, error);
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
.kbq-hint.kbq-hint_fill-text-off {
|
|
41
|
-
$fill-text-off: map.get($hint, fill-text-off);
|
|
42
|
-
|
|
43
40
|
&.kbq-contrast-fade {
|
|
44
|
-
@include kbq-hint-color(
|
|
41
|
+
@include kbq-hint-color($hint, fill-text-off, fade-contrast);
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
&.kbq-success {
|
|
48
|
-
@include kbq-hint-color(
|
|
45
|
+
@include kbq-hint-color($hint, fill-text-off, success);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
&.kbq-warning {
|
|
52
|
-
@include kbq-hint-color(
|
|
49
|
+
@include kbq-hint-color($hint, fill-text-off, warning);
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
&.kbq-error {
|
|
56
|
-
@include kbq-hint-color(
|
|
53
|
+
@include kbq-hint-color($hint, fill-text-off, error);
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
@mixin kbq-hint-typography($config) {
|
|
62
|
-
$tokens: map.get($config, tokens);
|
|
63
|
-
|
|
64
59
|
.kbq-hint .kbq-hint__text {
|
|
65
|
-
@include kbq-typography-
|
|
60
|
+
@include kbq-typography-css-variables(hint, normal-text);
|
|
66
61
|
}
|
|
67
62
|
|
|
68
63
|
.kbq-hint.kbq-hint_compact .kbq-hint__text {
|
|
69
|
-
@include kbq-typography-
|
|
64
|
+
@include kbq-typography-css-variables(hint, compact-text);
|
|
70
65
|
}
|
|
71
66
|
}
|