@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,130 +2,130 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/typography/typography-utils' as *;
|
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
|
5
6
|
|
|
7
|
+
@mixin kbq-checkbox-color($component, $style-name) {
|
|
8
|
+
$style: map.get($component, $style-name);
|
|
9
|
+
$base: checkbox-#{$style-name};
|
|
6
10
|
|
|
7
|
-
/* stylelint-disable no-descending-specificity */
|
|
8
|
-
@mixin kbq-checkbox-state($state) {
|
|
9
11
|
.kbq-checkbox__frame {
|
|
10
|
-
border-color: map.get($
|
|
12
|
+
border-color: kbq-css-variable(#{$base}-default-border, map.get($style, default, border));
|
|
11
13
|
|
|
12
|
-
background-color: map.get($
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@mixin kbq-checkbox-color($checkbox) {
|
|
17
|
-
$default: map.get($checkbox, default);
|
|
18
|
-
|
|
19
|
-
@include kbq-checkbox-state($default);
|
|
20
|
-
|
|
21
|
-
.kbq-checkbox-label {
|
|
22
|
-
color: map.get($default, text);
|
|
23
|
-
}
|
|
14
|
+
background-color: kbq-css-variable(#{$base}-default-background, map.get($style, default, background));
|
|
24
15
|
|
|
25
|
-
.kbq-checkbox__frame {
|
|
26
16
|
& .kbq-checkbox-checkmark,
|
|
27
17
|
& .kbq-checkbox-mixedmark {
|
|
28
|
-
color: map.get($default, color);
|
|
18
|
+
color: kbq-css-variable(#{$base}-default-color, map.get($style, default, color));
|
|
29
19
|
}
|
|
30
20
|
}
|
|
31
21
|
|
|
22
|
+
.kbq-checkbox-label {
|
|
23
|
+
color: kbq-css-variable(#{$base}-default-text, map.get($style, default, text));
|
|
24
|
+
}
|
|
25
|
+
|
|
32
26
|
& .kbq-hint .kbq-hint__text {
|
|
33
|
-
color: map.get($default, caption);
|
|
27
|
+
color: kbq-css-variable(#{$base}-default-caption, map.get($style, default, caption));
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
&:hover,
|
|
37
31
|
&.kbq-hover {
|
|
38
|
-
|
|
32
|
+
.kbq-checkbox__frame {
|
|
33
|
+
border-color: kbq-css-variable(#{$base}-hover-border, map.get($style, hover, border));
|
|
34
|
+
|
|
35
|
+
background-color: kbq-css-variable(#{$base}-hover-background, map.get($style, hover, background));
|
|
36
|
+
}
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
&.kbq-checked,
|
|
42
40
|
&.kbq-indeterminate {
|
|
43
|
-
|
|
41
|
+
.kbq-checkbox__frame {
|
|
42
|
+
border-color: kbq-css-variable(#{$base}-checked-border, map.get($style, checked, border));
|
|
43
|
+
|
|
44
|
+
background-color: kbq-css-variable(#{$base}-checked-background, map.get($style, checked, background));
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
&.kbq-checked:not(.kbq-disabled),
|
|
47
49
|
&.kbq-indeterminate:not(.kbq-disabled) {
|
|
48
50
|
&:hover,
|
|
49
51
|
&.kbq-hover {
|
|
50
|
-
|
|
52
|
+
.kbq-checkbox__frame {
|
|
53
|
+
border-color: kbq-css-variable(#{$base}-hover-border, map.get($style, checked-hover, border));
|
|
54
|
+
|
|
55
|
+
background-color: kbq-css-variable(
|
|
56
|
+
#{$base}-hover-background,
|
|
57
|
+
map.get($style, checked-hover, background)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
& .kbq-checkbox-input.cdk-keyboard-focused {
|
|
54
63
|
+ .kbq-checkbox__frame {
|
|
55
|
-
$
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
border-color: kbq-css-variable(#{$base}-focused-border, map.get($style, checked-focused, border));
|
|
65
|
+
background-color: kbq-css-variable(
|
|
66
|
+
#{$base}-focused-background,
|
|
67
|
+
map.get($style, checked-focused, background)
|
|
68
|
+
);
|
|
69
|
+
outline: kbq-css-variable(#{$base}-focused-outline, map.get($style, checked-focused, outline));
|
|
60
70
|
}
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
& .kbq-checkbox-input.cdk-keyboard-focused {
|
|
65
75
|
+ .kbq-checkbox__frame {
|
|
66
|
-
$focused
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
background-color: map.get($focused, background);
|
|
70
|
-
outline: map.get($focused, outline);
|
|
76
|
+
border-color: kbq-css-variable(#{$base}-focused-border, map.get($style, focused, border));
|
|
77
|
+
background-color: kbq-css-variable(#{$base}-focused-background, map.get($style, focused, background));
|
|
78
|
+
outline: kbq-css-variable(#{$base}-focused-outline, map.get($style, focused, outline));
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
&.kbq-disabled {
|
|
75
|
-
$disabled: map.get($checkbox, disabled);
|
|
76
|
-
|
|
77
83
|
.kbq-checkbox__frame {
|
|
78
|
-
border-color: map.get($disabled, border);
|
|
79
|
-
background-color: map.get($disabled, background);
|
|
84
|
+
border-color: kbq-css-variable(#{$base}-disabled-border, map.get($style, disabled, border));
|
|
85
|
+
background-color: kbq-css-variable(#{$base}-disabled-background, map.get($style, disabled, background));
|
|
80
86
|
|
|
81
87
|
& .kbq-checkbox-checkmark,
|
|
82
88
|
& .kbq-checkbox-mixedmark {
|
|
83
|
-
color: map.get($disabled, color);
|
|
89
|
+
color: kbq-css-variable(#{$base}-disabled-color, map.get($style, disabled, color));
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
& .kbq-hint .kbq-hint__text {
|
|
88
|
-
color: map.get($disabled, caption);
|
|
94
|
+
color: kbq-css-variable(#{$base}-disabled-caption, map.get($style, disabled, caption));
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
.kbq-checkbox-label {
|
|
92
|
-
color: map.get($disabled, text);
|
|
98
|
+
color: kbq-css-variable(#{$base}-disabled-text, map.get($style, disabled, text));
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
|
-
/* stylelint-enable no-descending-specificity */
|
|
97
102
|
|
|
98
103
|
@mixin kbq-checkbox-theme($theme) {
|
|
99
104
|
$checkbox: map.get(map.get($theme, components), checkbox);
|
|
100
105
|
|
|
101
|
-
$checkbox-theme: map.get($checkbox, theme);
|
|
102
|
-
$checkbox-error: map.get($checkbox, error);
|
|
103
|
-
|
|
104
106
|
.kbq-checkbox {
|
|
105
|
-
@include kbq-checkbox-color($checkbox
|
|
107
|
+
@include kbq-checkbox-color($checkbox, theme);
|
|
106
108
|
|
|
107
109
|
&.kbq-error {
|
|
108
|
-
@include kbq-checkbox-color($checkbox
|
|
110
|
+
@include kbq-checkbox-color($checkbox, error);
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
@mixin kbq-checkbox-typography($config) {
|
|
114
|
-
$tokens: map.get($config, tokens);
|
|
115
|
-
|
|
116
116
|
.kbq-checkbox {
|
|
117
|
-
@include kbq-typography-
|
|
117
|
+
@include kbq-typography-css-variables(checkbox, normal-label);
|
|
118
118
|
|
|
119
119
|
& .kbq-hint .kbq-hint__text {
|
|
120
|
-
@include kbq-typography-
|
|
120
|
+
@include kbq-typography-css-variables(checkbox, normal-caption);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.kbq-checkbox.kbq-checkbox_big {
|
|
125
|
-
@include kbq-typography-
|
|
125
|
+
@include kbq-typography-css-variables(checkbox, big-label);
|
|
126
126
|
|
|
127
127
|
& .kbq-hint .kbq-hint__text {
|
|
128
|
-
@include kbq-typography-
|
|
128
|
+
@include kbq-typography-css-variables(checkbox, big-caption);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
package/checkbox/checkbox.scss
CHANGED
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
@use '../core/styles/common/layout';
|
|
6
6
|
|
|
7
7
|
@use '../core/styles/tokens';
|
|
8
|
-
|
|
8
|
+
@use '../core/styles/common/tokens' as *;
|
|
9
9
|
|
|
10
10
|
$tokens: meta.module-variables(tokens) !default;
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
.kbq-checkbox-checkmark,
|
|
14
13
|
.kbq-checkbox-mixedmark {
|
|
15
14
|
display: none;
|
|
@@ -24,15 +23,15 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
24
23
|
pointer-events: none;
|
|
25
24
|
background-color: transparent;
|
|
26
25
|
|
|
27
|
-
border-radius:
|
|
26
|
+
border-radius: kbq-css-variable(checkbox-size-normal-border-radius);
|
|
28
27
|
|
|
29
28
|
border: {
|
|
30
|
-
width:
|
|
29
|
+
width: kbq-css-variable(checkbox-size-normal-border-width);
|
|
31
30
|
style: solid;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
height:
|
|
35
|
-
width:
|
|
33
|
+
height: kbq-css-variable(checkbox-size-normal-width);
|
|
34
|
+
width: kbq-css-variable(checkbox-size-normal-width);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
.kbq-checkbox__layout {
|
|
@@ -44,12 +43,16 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
44
43
|
// (e.g. pointer by default, regular when disabled), instead of the browser default.
|
|
45
44
|
cursor: inherit;
|
|
46
45
|
|
|
46
|
+
padding-top: kbq-css-variable(checkbox-size-normal-paddding-top);
|
|
47
|
+
|
|
48
|
+
padding-bottom: kbq-css-variable(checkbox-size-normal-paddding-bottom);
|
|
49
|
+
|
|
47
50
|
padding-left: calc(
|
|
48
51
|
var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
var(
|
|
53
|
+
--kbq-checkbox-size-normal-horizontal-content-padding,
|
|
54
|
+
map.get($tokens, checkbox-size-normal-horizontal-content-padding)
|
|
55
|
+
)
|
|
53
56
|
);
|
|
54
57
|
|
|
55
58
|
vertical-align: top;
|
|
@@ -59,11 +62,11 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
59
62
|
display: inline-block;
|
|
60
63
|
|
|
61
64
|
position: absolute;
|
|
62
|
-
top:
|
|
65
|
+
top: kbq-css-variable(checkbox-size-normal-top);
|
|
63
66
|
left: 0;
|
|
64
67
|
|
|
65
|
-
height:
|
|
66
|
-
width:
|
|
68
|
+
height: kbq-css-variable(checkbox-size-normal-width);
|
|
69
|
+
width: kbq-css-variable(checkbox-size-normal-width);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
.kbq-checkbox {
|
|
@@ -101,10 +104,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
& .kbq-hint {
|
|
104
|
-
margin-top:
|
|
105
|
-
--kbq-checkbox-size-normal-vertical-content-padding,
|
|
106
|
-
map.get($tokens, checkbox-size-normal-vertical-content-padding)
|
|
107
|
-
);
|
|
107
|
+
margin-top: kbq-css-variable(checkbox-size-normal-vertical-content-padding);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -112,33 +112,30 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
112
112
|
& .kbq-checkbox__layout {
|
|
113
113
|
padding-left: calc(
|
|
114
114
|
var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
var(
|
|
116
|
+
--kbq-checkbox-size-normal-horizontal-content-padding,
|
|
117
|
+
map.get($tokens, checkbox-size-normal-horizontal-content-padding)
|
|
118
|
+
)
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
& .kbq-checkbox__inner-container {
|
|
123
|
-
top:
|
|
124
|
-
height:
|
|
125
|
-
width:
|
|
123
|
+
top: kbq-css-variable(checkbox-size-big-top);
|
|
124
|
+
height: kbq-css-variable(checkbox-size-big-width);
|
|
125
|
+
width: kbq-css-variable(checkbox-size-big-width);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
& .kbq-checkbox__frame {
|
|
129
|
-
border-radius:
|
|
129
|
+
border-radius: kbq-css-variable(checkbox-size-big-border-radius);
|
|
130
130
|
|
|
131
131
|
border: {
|
|
132
|
-
width:
|
|
132
|
+
width: kbq-css-variable(checkbox-size-big-border-width);
|
|
133
133
|
style: solid;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
& .kbq-hint {
|
|
138
|
-
margin-top:
|
|
139
|
-
--kbq-checkbox-size-big-vertical-content-padding,
|
|
140
|
-
map.get($tokens, checkbox-size-big-vertical-content-padding)
|
|
141
|
-
);
|
|
138
|
+
margin-top: kbq-css-variable(checkbox-size-big-vertical-content-padding);
|
|
142
139
|
}
|
|
143
140
|
}
|
|
144
141
|
|
|
@@ -154,16 +151,15 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
154
151
|
}
|
|
155
152
|
}
|
|
156
153
|
|
|
157
|
-
/* stylelint-disable no-descending-specificity */
|
|
158
154
|
.kbq-checkbox_label-before {
|
|
159
155
|
.kbq-checkbox__layout {
|
|
160
156
|
padding-left: 0;
|
|
161
157
|
padding-right: calc(
|
|
162
158
|
var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
var(
|
|
160
|
+
--kbq-checkbox-size-normal-horizontal-content-padding,
|
|
161
|
+
map.get($tokens, checkbox-size-normal-horizontal-content-padding)
|
|
162
|
+
)
|
|
167
163
|
);
|
|
168
164
|
}
|
|
169
165
|
|
package/code-block/README.md
CHANGED
|
@@ -2,31 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## API
|
|
4
4
|
|
|
5
|
-
| Property
|
|
6
|
-
|
|
7
|
-
| kbqPlacement
|
|
8
|
-
| kbqTrigger
|
|
9
|
-
| kbqVisible
|
|
10
|
-
| kbqPopoverHeader
|
|
11
|
-
| kbqPopoverContent
|
|
12
|
-
| kbqPopoverFooter
|
|
13
|
-
| kbqPopoverDisabled
|
|
14
|
-
| kbqPopoverClass
|
|
15
|
-
| kbqVisibleChange
|
|
5
|
+
| Property | Description | Type | Default | |
|
|
6
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------- | --- |
|
|
7
|
+
| kbqPlacement | Место для показа относительно элемента, к которому он привязан. Возможные значения: top, bottom, left, right | string | bottom | |
|
|
8
|
+
| kbqTrigger | Триггер для показа Возможные значения: hover, manual, click, focus | string | hover | |
|
|
9
|
+
| kbqVisible | Ручное управление показом, используется только при kbqTrigger="manual" | boolean | false | |
|
|
10
|
+
| kbqPopoverHeader | Содержимое шапки Обрати внимание: если используешь строку, то используй аккуратно, желательно предварительно сделать escape строки, чтобы избежать потенциальной XSS уязвимости. | string | ng-template | – |
|
|
11
|
+
| kbqPopoverContent | Содержимое компонента Обрати внимание: если используешь строку, то используй аккуратно, желательно предварительно сделать escape строки, чтобы избежать потенциальной XSS уязвимости. | string | ng-template | – |
|
|
12
|
+
| kbqPopoverFooter | Содержимое подвала Обрати внимание: если используешь строку, то используй аккуратно, желательно предварительно сделать escape строки, чтобы избежать потенциальной XSS уязвимости. | string | ng-template | – |
|
|
13
|
+
| kbqPopoverDisabled | Флаг для запрета показа | boolean | false | |
|
|
14
|
+
| kbqPopoverClass | Добавление своих классов | string | string[] | – |
|
|
15
|
+
| kbqVisibleChange | Callback на изменение видимости компонента | EventEmitter<boolean> | – | |
|
|
16
16
|
|
|
17
17
|
## Example
|
|
18
18
|
|
|
19
|
+
<!-- cspell:ignore Э́йяфьядлайё̀кюдль, Эйяфьядлайёкюдль -->
|
|
20
|
+
|
|
19
21
|
```html
|
|
20
22
|
<ng-template #customContent>
|
|
21
|
-
Э́йяфьядлайё̀кюдль — шестой по величине ледник Исландии. Расположен на юге Исландии в 125 км к востоку от Рейкьявика.
|
|
23
|
+
Э́йяфьядлайё̀кюдль — шестой по величине ледник Исландии. Расположен на юге Исландии в 125 км к востоку от Рейкьявика.
|
|
24
|
+
Под этим ледником находится одноимённый вулкан конической формы.
|
|
22
25
|
</ng-template>
|
|
23
|
-
|
|
26
|
+
|
|
24
27
|
<button
|
|
25
28
|
kbqPopover
|
|
26
29
|
[kbqTrigger]="'hover'"
|
|
27
30
|
[kbqPlacement]="'top'"
|
|
28
31
|
[kbqPopoverHeader]="'Это header'"
|
|
29
|
-
[kbqPopoverContent]="customContent"
|
|
32
|
+
[kbqPopoverContent]="customContent"
|
|
33
|
+
>
|
|
30
34
|
Найти Эйяфьядлайёкюдль
|
|
31
35
|
</button>
|
|
32
36
|
```
|
|
@@ -3,29 +3,36 @@
|
|
|
3
3
|
@use 'sass:list';
|
|
4
4
|
|
|
5
5
|
@use '../core/styles/typography/typography-utils' as *;
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
6
7
|
|
|
8
|
+
@mixin kbq-code-block-style($component, $style-name) {
|
|
9
|
+
$style: map.get($component, $style-name);
|
|
10
|
+
$base: code-block-#{$style-name};
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
$header: map.get($style, header);
|
|
10
|
-
$container: map.get($style, container);
|
|
11
|
-
$actionbar: map.get($style, actionbar);
|
|
12
|
-
$collapse: map.get($style, collapse);
|
|
13
|
-
|
|
14
|
-
border-color: map.get($container, border);
|
|
15
|
-
background: map.get($container, background);
|
|
12
|
+
background: kbq-css-variable(#{$base}-container-background, map.get($style, container, background));
|
|
16
13
|
|
|
17
14
|
& .kbq-tab-header {
|
|
18
|
-
$header
|
|
19
|
-
|
|
15
|
+
background: kbq-css-variable(#{$base}-header-background, map.get($style, header, background)) !important;
|
|
16
|
+
border-color: kbq-css-variable(#{$base}-container-border, map.get($style, container, border));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kbq-tab-body__wrapper {
|
|
20
|
+
border-color: kbq-css-variable(#{$base}-container-border, map.get($style, container, border));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:not(.kbq-code-block_no-header) {
|
|
24
|
+
.kbq-tab-body__wrapper {
|
|
25
|
+
border-top-color: transparent;
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
& .kbq-code-block-actionbar {
|
|
23
|
-
background: map.get($actionbar, background);
|
|
30
|
+
background: kbq-css-variable(#{$base}-actionbar-background, map.get($style, actionbar, background));
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
&.kbq-code-block_header-with-shadow {
|
|
27
34
|
& .kbq-tab-header {
|
|
28
|
-
box-shadow: map.get($header, shadow);
|
|
35
|
+
box-shadow: kbq-css-variable(#{$base}-header-shadow, map.get($style, header, shadow));
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
|
|
@@ -33,23 +40,32 @@
|
|
|
33
40
|
& .kbq-code-block__fade-gradient {
|
|
34
41
|
display: block;
|
|
35
42
|
|
|
36
|
-
background: map.get($actionbar, fade-gradient)
|
|
43
|
+
background: kbq-css-variable(#{$base}-actionbar-fade-gradient, map.get($style, actionbar, fade-gradient));
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
.kbq-code-block__show-more {
|
|
41
48
|
.bg-wrapper {
|
|
42
|
-
background:
|
|
49
|
+
background: kbq-css-variable(
|
|
50
|
+
#{$base}-collapse-button-expand-background,
|
|
51
|
+
map.get($style, collapse, button-expand-background)
|
|
52
|
+
);
|
|
43
53
|
opacity: 90%;
|
|
44
54
|
}
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
& .kbq-code-block__show-more_expanded {
|
|
48
|
-
background:
|
|
58
|
+
background: kbq-css-variable(
|
|
59
|
+
#{$base}-collapse-expanded-background,
|
|
60
|
+
map.get($style, collapse, expanded-background)
|
|
61
|
+
);
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
& .kbq-code-block__show-more_collapsed {
|
|
52
|
-
background:
|
|
65
|
+
background: kbq-css-variable(
|
|
66
|
+
#{$base}-collapse-collapsed-background,
|
|
67
|
+
map.get($style, collapse, collapsed-background)
|
|
68
|
+
);
|
|
53
69
|
}
|
|
54
70
|
}
|
|
55
71
|
|
|
@@ -328,11 +344,11 @@
|
|
|
328
344
|
}
|
|
329
345
|
|
|
330
346
|
&.kbq-code-block_outline {
|
|
331
|
-
@include kbq-code-block-style(
|
|
347
|
+
@include kbq-code-block-style($code-block, outline);
|
|
332
348
|
}
|
|
333
349
|
|
|
334
350
|
&.kbq-code-block_filled {
|
|
335
|
-
@include kbq-code-block-style(
|
|
351
|
+
@include kbq-code-block-style($code-block, filled);
|
|
336
352
|
}
|
|
337
353
|
|
|
338
354
|
.kbq-tab-header {
|
|
@@ -341,24 +357,38 @@
|
|
|
341
357
|
border-bottom-color: transparent;
|
|
342
358
|
}
|
|
343
359
|
}
|
|
360
|
+
|
|
361
|
+
.kbq-tab-group.kbq-focused {
|
|
362
|
+
// paint focus border from the top since because of border constraints
|
|
363
|
+
.kbq-tab-header {
|
|
364
|
+
box-shadow: 0 3px 0 -1px kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.kbq-tab-body__wrapper {
|
|
368
|
+
border-color: kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
|
|
369
|
+
box-shadow: inset 0 0 0.1 1px
|
|
370
|
+
kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
|
|
371
|
+
}
|
|
372
|
+
}
|
|
344
373
|
}
|
|
345
374
|
|
|
346
375
|
.kbq-code-block-actionbar {
|
|
347
376
|
.kbq-code-block-actionbar_less-contrast {
|
|
348
|
-
background-color:
|
|
377
|
+
background-color: kbq-css-variable(
|
|
378
|
+
code-block-actionbar-bg-less-contrast,
|
|
379
|
+
map.get($code-block, actionbar, bg-less-contrast)
|
|
380
|
+
);
|
|
349
381
|
}
|
|
350
382
|
|
|
351
383
|
&.kbq-actionbar-block_floating {
|
|
352
|
-
background-color: map
|
|
384
|
+
background-color: kbq-css-variable(code-block-actionbar-bg, map.get($code-block, actionbar, bg));
|
|
353
385
|
}
|
|
354
386
|
}
|
|
355
387
|
}
|
|
356
388
|
|
|
357
389
|
@mixin kbq-code-block-typography($config) {
|
|
358
|
-
$tokens: map.get($config, tokens);
|
|
359
|
-
|
|
360
390
|
.kbq-code-block {
|
|
361
|
-
@include kbq-typography-
|
|
391
|
+
@include kbq-typography-css-variables(code-block, default);
|
|
362
392
|
|
|
363
393
|
& .kbq-code-block__code {
|
|
364
394
|
font: inherit;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
@use 'sass:meta';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use '../core/styles/tokens';
|
|
4
|
-
|
|
4
|
+
@use '../core/styles/common/tokens' as *;
|
|
5
5
|
|
|
6
6
|
$tokens: meta.module-variables(tokens) !default;
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
.kbq-code-block-actionbar {
|
|
10
9
|
display: flex;
|
|
11
10
|
justify-content: right;
|
|
@@ -16,40 +15,27 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
16
15
|
top: -1px;
|
|
17
16
|
right: 0;
|
|
18
17
|
|
|
19
|
-
padding
|
|
20
|
-
|
|
21
|
-
--kbq-code-block-size-actionbar-padding-vertical,
|
|
22
|
-
map.get($tokens, code-block-size-actionbar-padding-vertical)
|
|
23
|
-
)
|
|
24
|
-
var(
|
|
25
|
-
--kbq-code-block-size-actionbar-padding-horizontal,
|
|
26
|
-
map.get($tokens, code-block-size-actionbar-padding-horizontal)
|
|
27
|
-
);
|
|
18
|
+
margin: kbq-css-variable(code-block-size-actionbar-padding-vertical)
|
|
19
|
+
kbq-css-variable(code-block-size-actionbar-padding-horizontal);
|
|
28
20
|
|
|
29
|
-
gap:
|
|
30
|
-
--kbq-code-block-size-actionbar-content-gap-horizontal,
|
|
31
|
-
map.get($tokens, code-block-size-actionbar-content-gap-horizontal)
|
|
32
|
-
);
|
|
21
|
+
gap: kbq-css-variable(code-block-size-actionbar-content-gap-horizontal);
|
|
33
22
|
|
|
34
23
|
& .kbq-code-block__fade-gradient {
|
|
35
24
|
display: none;
|
|
36
25
|
|
|
37
|
-
width:
|
|
38
|
-
|
|
39
|
-
map.get($tokens, code-block-size-actionbar-fade-gradient-width)
|
|
40
|
-
);
|
|
41
|
-
height: 40px;
|
|
26
|
+
width: kbq-css-variable(code-block-size-actionbar-fade-gradient-width);
|
|
27
|
+
height: 32px;
|
|
42
28
|
|
|
43
29
|
margin-top: calc(
|
|
44
30
|
var(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
--kbq-code-block-size-actionbar-padding-vertical,
|
|
32
|
+
map.get($tokens, code-block-size-actionbar-padding-vertical)
|
|
33
|
+
) * -1
|
|
48
34
|
);
|
|
49
35
|
}
|
|
50
36
|
|
|
51
37
|
&.kbq-actionbar-block_floating {
|
|
52
|
-
top:
|
|
53
|
-
right:
|
|
38
|
+
top: kbq-css-variable(code-block-size-actionbar-margin-top);
|
|
39
|
+
right: kbq-css-variable(code-block-size-actionbar-margin-right);
|
|
54
40
|
}
|
|
55
41
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
2
|
-
import { InjectionToken, ElementRef, ChangeDetectorRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import { InjectionToken, ElementRef, ChangeDetectorRef, OnDestroy, Renderer2, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { KbqTabChangeEvent, KbqTabGroup } from '@koobiq/components/tabs';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { KbqCodeBlockConfiguration, KbqCodeFile } from './code-block.types';
|
|
6
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare const COPIED_MESSAGE_TOOLTIP_TIMEOUT = 100;
|
|
8
9
|
export declare const DEFAULT_EXTENSION = "txt";
|
|
@@ -35,11 +36,12 @@ export declare const KBQ_CODE_BLOCK_DEFAULT_CONFIGURATION: {
|
|
|
35
36
|
viewLessText: string;
|
|
36
37
|
openExternalSystemTooltip: string;
|
|
37
38
|
};
|
|
38
|
-
export declare class KbqCodeBlockComponent implements OnDestroy {
|
|
39
|
+
export declare class KbqCodeBlockComponent implements AfterViewInit, OnDestroy {
|
|
39
40
|
private elementRef;
|
|
40
41
|
private changeDetectorRef;
|
|
41
42
|
private clipboard;
|
|
42
43
|
private renderer;
|
|
44
|
+
private focusMonitor;
|
|
43
45
|
config: KbqCodeBlockConfiguration;
|
|
44
46
|
tabGroup: KbqTabGroup;
|
|
45
47
|
lineNumbers: boolean;
|
|
@@ -54,10 +56,14 @@ export declare class KbqCodeBlockComponent implements OnDestroy {
|
|
|
54
56
|
viewAll: boolean;
|
|
55
57
|
multiLine: boolean;
|
|
56
58
|
isTopOverflow: boolean;
|
|
59
|
+
hasFocus: boolean;
|
|
57
60
|
readonly resizeStream: Subject<Event>;
|
|
61
|
+
readonly currentCodeBlock: Subject<HTMLElement>;
|
|
58
62
|
private readonly resizeDebounceInterval;
|
|
59
63
|
private resizeSubscription;
|
|
60
|
-
|
|
64
|
+
private codeBlockSubscription;
|
|
65
|
+
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, clipboard: Clipboard, renderer: Renderer2, focusMonitor: FocusMonitor, config: KbqCodeBlockConfiguration);
|
|
66
|
+
ngAfterViewInit(): void;
|
|
61
67
|
ngOnDestroy(): void;
|
|
62
68
|
updateHeader: () => void;
|
|
63
69
|
toggleSoftWrap(): void;
|
|
@@ -70,8 +76,10 @@ export declare class KbqCodeBlockComponent implements OnDestroy {
|
|
|
70
76
|
onSelectTab($event: KbqTabChangeEvent): void;
|
|
71
77
|
checkOverflow(currentCodeContentElement: HTMLElement): void;
|
|
72
78
|
onShowMoreClick(currentCodeContentElement: HTMLPreElement): void;
|
|
79
|
+
canShowFocus(currentCodeContent: HTMLPreElement): boolean;
|
|
73
80
|
private updateMultiline;
|
|
74
81
|
private getFullFileName;
|
|
75
|
-
|
|
82
|
+
onEnter(currentCodeBlock: HTMLPreElement): void;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlockComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
76
84
|
static ɵcmp: i0.ɵɵComponentDeclaration<KbqCodeBlockComponent, "kbq-code-block", ["kbqCodeBlock"], { "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "codeFiles": { "alias": "codeFiles"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "softWrap": { "alias": "softWrap"; "required": false; }; }, {}, never, never, false, never>;
|
|
77
85
|
}
|