@koobiq/components 17.0.0-rc.2 → 17.0.0-rc.4

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.
Files changed (100) hide show
  1. package/alert/_alert-theme.scss +47 -20
  2. package/alert/alert.component.d.ts +23 -3
  3. package/alert/alert.component.scss +89 -56
  4. package/code-block/_code-block-theme.scss +23 -1
  5. package/code-block/actionbar.component.scss +2 -2
  6. package/code-block/code-block.component.d.ts +12 -4
  7. package/code-block/code-block.scss +36 -9
  8. package/core/locales/formatters.d.ts +96 -0
  9. package/core/locales/locale-service.d.ts +96 -0
  10. package/core/pop-up/pop-up-trigger.d.ts +3 -1
  11. package/core/styles/_variables.scss +1 -1
  12. package/core/styles/common/_tokens.scss +28 -0
  13. package/core/styles/theming/_components-theming.scss +67 -10
  14. package/core/styles/theming/_theming.scss +2 -2
  15. package/core/styles/typography/_typography.scss +35 -2
  16. package/core/utils/data-size/config.d.ts +20 -2
  17. package/core/utils/data-size/data-size.pipe.d.ts +10 -9
  18. package/core/utils/data-size/size.d.ts +3 -4
  19. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
  20. package/esm2022/alert/alert.component.mjs +52 -5
  21. package/esm2022/code-block/actionbar.component.mjs +2 -2
  22. package/esm2022/code-block/code-block.component.mjs +58 -14
  23. package/esm2022/core/animation/select-animations.mjs +4 -4
  24. package/esm2022/core/locales/formatters.mjs +97 -1
  25. package/esm2022/core/pop-up/pop-up-trigger.mjs +18 -11
  26. package/esm2022/core/utils/data-size/config.mjs +5 -17
  27. package/esm2022/core/utils/data-size/data-size.pipe.mjs +36 -22
  28. package/esm2022/core/utils/data-size/size.mjs +10 -14
  29. package/esm2022/core/version.mjs +2 -2
  30. package/esm2022/dropdown/dropdown-animations.mjs +4 -4
  31. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
  32. package/esm2022/file-upload/file-upload.module.mjs +4 -5
  33. package/esm2022/form-field/password-toggle.mjs +11 -9
  34. package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
  35. package/esm2022/modal/modal.component.mjs +5 -6
  36. package/esm2022/navbar/navbar-item.component.mjs +9 -9
  37. package/esm2022/select/select-option.directive.mjs +7 -5
  38. package/esm2022/splitter/splitter.component.mjs +36 -16
  39. package/esm2022/textarea/textarea.component.mjs +12 -10
  40. package/esm2022/timezone/timezone-option.directive.mjs +7 -5
  41. package/esm2022/title/title.directive.mjs +2 -3
  42. package/esm2022/toast/toast-container.component.mjs +2 -2
  43. package/esm2022/toast/toast.component.mjs +4 -4
  44. package/esm2022/toast/toast.service.mjs +2 -2
  45. package/esm2022/toast/toast.type.mjs +3 -1
  46. package/esm2022/tooltip/tooltip.component.mjs +26 -12
  47. package/esm2022/tree/padding.directive.mjs +2 -2
  48. package/fesm2022/koobiq-components-alert.mjs +52 -5
  49. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-code-block.mjs +57 -14
  51. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-core.mjs +160 -62
  53. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-dropdown.mjs +3 -3
  55. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-ellipsis-center.mjs +5 -4
  57. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-file-upload.mjs +3 -4
  59. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-form-field.mjs +15 -15
  61. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-loader-overlay.mjs +1 -1
  63. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-modal.mjs +4 -5
  65. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  66. package/fesm2022/koobiq-components-navbar.mjs +8 -8
  67. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  68. package/fesm2022/koobiq-components-select.mjs +5 -4
  69. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-splitter.mjs +35 -15
  71. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  72. package/fesm2022/koobiq-components-textarea.mjs +11 -9
  73. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-timezone.mjs +5 -4
  75. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-title.mjs +1 -2
  77. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-toast.mjs +8 -6
  79. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-tooltip.mjs +24 -11
  81. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-tree.mjs +1 -1
  83. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  84. package/file-upload/file-upload.module.d.ts +1 -1
  85. package/form-field/password-toggle.d.ts +3 -2
  86. package/link/_link-theme.scss +4 -2
  87. package/navbar/navbar-item.component.d.ts +4 -4
  88. package/package.json +6 -6
  89. package/prebuilt-themes/dark-theme.css +1 -1
  90. package/prebuilt-themes/light-theme.css +1 -1
  91. package/schematics/ng-add/index.js +4 -4
  92. package/select/select-option.directive.d.ts +3 -2
  93. package/splitter/splitter.component.d.ts +10 -5
  94. package/timezone/timezone-option.directive.d.ts +3 -2
  95. package/title/title.directive.d.ts +0 -1
  96. package/toast/_toast-theme.scss +10 -5
  97. package/toast/toast-container.component.scss +4 -1
  98. package/toast/toast.component.scss +22 -17
  99. package/toast/toast.type.d.ts +2 -0
  100. package/tooltip/tooltip.component.d.ts +12 -8
@@ -1,49 +1,72 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
+ @use '../core/styles/common/tokens' as *;
4
5
  @use '../core/styles/typography/typography-utils' as *;
5
6
 
6
7
 
7
- @mixin kbq-alert-theme($alert) {
8
- background-color: map.get($alert, background);
9
- border-color: map.get($alert, border);
8
+ @mixin kbq-alert($component, $style-name, $color-name) {
9
+ $style: map.get($component, $style-name);
10
10
 
11
- .kbq-icon.kbq-alert__icon {
12
- color: map.get($alert, icon);
11
+ background: cssVar('alert-light-#{$style-name}-#{$color-name}-container-background');
12
+
13
+ .kbq-alert__title {
14
+ color: cssVar('alert-light-#{$style-name}-#{$color-name}-container-title');
15
+ }
16
+
17
+ .kbq-alert__text {
18
+ color: cssVar('alert-light-#{$style-name}-#{$color-name}-container-text');
13
19
  }
14
20
  }
15
21
 
16
22
  @mixin kbq-alert-theme($theme) {
17
23
  $alert: map.get(map.get($theme, components), alert);
18
24
 
19
- $alert-contrast: map.get($alert, contrast);
20
- $alert-error: map.get($alert, error);
21
-
22
25
  .kbq-alert__close:focus {
23
26
  outline: none;
24
27
  }
25
28
 
26
- .kbq-alert {
27
- background: map.get($alert-contrast, background);
29
+ .kbq-alert.kbq-alert_default {
30
+ &.kbq-alert_contrast {
31
+ @include kbq-alert($alert, default, contrast);
32
+ }
33
+
34
+ &.kbq-alert_error {
35
+ @include kbq-alert($alert, default, error);
36
+ }
28
37
 
29
- & .kbq-alert__title {
30
- color: map.get($alert-contrast, title);
38
+ &.kbq-alert_warning {
39
+ @include kbq-alert($alert, default, warning);
31
40
  }
32
41
 
33
- & .kbq-alert__text {
34
- color: map.get($alert-contrast, text);
42
+ &.kbq-alert_success {
43
+ @include kbq-alert($alert, default, success);
44
+ }
45
+
46
+ &.kbq-alert_theme {
47
+ @include kbq-alert($alert, default, theme);
35
48
  }
36
49
  }
37
50
 
38
- .kbq-alert.kbq-alert_error {
39
- background: map.get($alert-error, background);
51
+ .kbq-alert.kbq-alert_colored {
52
+ &.kbq-alert_contrast {
53
+ @include kbq-alert($alert, colored, contrast);
54
+ }
55
+
56
+ &.kbq-alert_error {
57
+ @include kbq-alert($alert, colored, error);
58
+ }
59
+
60
+ &.kbq-alert_warning {
61
+ @include kbq-alert($alert, colored, warning);
62
+ }
40
63
 
41
- & .kbq-alert__title {
42
- color: map.get($alert-error, title);
64
+ &.kbq-alert_success {
65
+ @include kbq-alert($alert, colored, success);
43
66
  }
44
67
 
45
- & .kbq-alert__text {
46
- color: map.get($alert-error, text);
68
+ &.kbq-alert_theme {
69
+ @include kbq-alert($alert, colored, theme);
47
70
  }
48
71
  }
49
72
  }
@@ -57,5 +80,9 @@
57
80
  .kbq-alert__title {
58
81
  @include kbq-typography-level-to-styles($config, map.get($tokens, alert-font-title));
59
82
  }
83
+
84
+ &.kbq-alert_compact .kbq-alert__title {
85
+ @include kbq-typography-level-to-styles($config, map.get($tokens, alert-font-title-compact));
86
+ }
60
87
  }
61
88
  }
@@ -1,5 +1,17 @@
1
- import { KbqIconItem } from '@koobiq/components/icon';
1
+ import { AfterContentInit } from '@angular/core';
2
+ import { KbqIcon, KbqIconItem } from '@koobiq/components/icon';
2
3
  import * as i0 from "@angular/core";
4
+ export declare enum KbqAlertStyles {
5
+ Default = "default",
6
+ Colored = "colored"
7
+ }
8
+ export declare enum KbqAlertColors {
9
+ Contrast = "contrast",
10
+ Error = "error",
11
+ Warning = "warning",
12
+ Success = "success",
13
+ Theme = "theme"
14
+ }
3
15
  export declare class KbqAlertTitle {
4
16
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqAlertTitle, never>;
5
17
  static ɵdir: i0.ɵɵDirectiveDeclaration<KbqAlertTitle, "[kbq-alert-title]", never, {}, {}, never, never, false, never>;
@@ -12,11 +24,19 @@ export declare class KbqAlertControl {
12
24
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqAlertControl, never>;
13
25
  static ɵdir: i0.ɵɵDirectiveDeclaration<KbqAlertControl, "[kbq-alert-control]", never, {}, {}, never, never, false, never>;
14
26
  }
15
- export declare class KbqAlert {
27
+ export declare class KbqAlert implements AfterContentInit {
16
28
  iconItem: KbqIconItem;
29
+ icon: KbqIcon;
17
30
  title: KbqAlertTitle;
18
31
  control: KbqAlertControl;
19
32
  closeButton: KbqAlertCloseButton;
33
+ compact: boolean;
34
+ alertStyle: KbqAlertStyles | string;
35
+ get alertColor(): string;
36
+ set alertColor(value: string | KbqAlertColors);
37
+ private _alertColor;
38
+ get isColored(): boolean;
39
+ ngAfterContentInit(): void;
20
40
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqAlert, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqAlert, "kbq-alert", never, {}, {}, ["iconItem", "title", "control", "closeButton"], ["[kbq-icon-item]", "[kbq-alert-title]", "*", "[kbq-alert-control]", "[kbq-alert-close-button]"], false, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqAlert, "kbq-alert", never, { "compact": { "alias": "compact"; "required": false; }; "alertStyle": { "alias": "alertStyle"; "required": false; }; "alertColor": { "alias": "alertColor"; "required": false; }; }, {}, ["iconItem", "icon", "title", "control", "closeButton"], ["[kbq-icon-item],[kbq-icon]", "[kbq-alert-title]", "*", "[kbq-alert-control]", "[kbq-alert-close-button]"], false, never>;
22
42
  }
@@ -1,7 +1,7 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
6
 
7
7
  $tokens: meta.module-variables(tokens) !default;
@@ -9,53 +9,10 @@ $tokens: meta.module-variables(tokens) !default;
9
9
  .kbq-alert {
10
10
  display: flex;
11
11
 
12
- border-radius: var(--kbq-alert-size-container-border-radius, map.get($tokens, alert-size-container-border-radius));
12
+ box-sizing: border-box;
13
13
 
14
- min-width: var(--kbq-alert-size-container-min-width, map.get($tokens, alert-size-container-min-width));
15
- min-height: calc(
16
- var(--kbq-alert-size-container-min-height, map.get($tokens, alert-size-container-min-height)) -
17
- (var(--kbq-alert-size-container-padding-vertical, map.get($tokens, alert-size-container-padding-vertical)) * 2)
18
- );
19
-
20
- padding:
21
- var(--kbq-alert-size-container-padding-vertical, map.get($tokens, alert-size-container-padding-vertical))
22
- var(--kbq-alert-size-container-padding-horizontal, map.get($tokens, alert-size-container-padding-horizontal));
23
- }
24
-
25
- .kbq-alert__icon {
26
- margin-right: var(
27
- --kbq-alert-size-container-content-gap-horizontal,
28
- map.get($tokens, alert-size-container-content-gap-horizontal)
29
- );
30
- }
31
-
32
- .kbq-alert__title {
33
- margin-bottom: var(
34
- --kbq-alert-size-container-content-gap-vertical,
35
- map.get($tokens, alert-size-container-content-gap-vertical)
36
- );
37
- }
38
-
39
- .kbq-alert__controls {
40
- margin-top: var(
41
- --kbq-alert-size-container-content-gap-vertical,
42
- map.get($tokens, alert-size-container-content-gap-vertical)
43
- );
44
-
45
- padding-top: var(
46
- --kbq-alert-size-button-stack-content-padding-top,
47
- map.get($tokens, alert-size-button-stack-padding-top)
48
- );
49
-
50
- & .kbq-button {
51
- margin-right: var(
52
- --kbq-alert-size-button-stack-content-content-gap-horizontal,
53
- map.get($tokens, alert-size-button-stack-content-gap-horizontal)
54
- );
55
- }
56
-
57
- & .kbq-link {
58
- margin-right: 16px;
14
+ & .kbq-alert__content_title {
15
+ margin-bottom: cssVar(size-xxs);
59
16
  }
60
17
  }
61
18
 
@@ -67,15 +24,91 @@ $tokens: meta.module-variables(tokens) !default;
67
24
  justify-content: center;
68
25
  }
69
26
 
70
- .kbq-alert__close-button {
71
- margin-left: var(
72
- --kbq-alert-size-container-content-gap-horizontal,
73
- map.get($tokens, alert-size-container-content-gap-horizontal)
74
- );
27
+ .kbq-alert.kbq-alert_normal {
28
+ border-radius: cssVar(alert-size-normal-container-border-radius);
29
+
30
+ padding:
31
+ cssVar(alert-size-normal-container-padding-top)
32
+ cssVar(alert-size-normal-container-padding-right)
33
+ cssVar(alert-size-normal-container-padding-bottom)
34
+ cssVar(alert-size-normal-container-padding-left);
35
+
36
+ & .kbq-alert__icon {
37
+ margin:
38
+ cssVar(alert-size-normal-icon-margin-top)
39
+ cssVar(alert-size-normal-icon-margin-right)
40
+ cssVar(alert-size-normal-icon-margin-bottom)
41
+ cssVar(alert-size-normal-icon-margin-left);
42
+
43
+ &.kbq-alert__icon_title .kbq-icon {
44
+ margin-top: cssVar(alert-size-normal-icon-margin-addon-title);
45
+ }
46
+ }
47
+
48
+ & .kbq-alert__content {
49
+ padding:
50
+ cssVar(alert-size-normal-content-padding-top)
51
+ cssVar(alert-size-normal-content-padding-right)
52
+ cssVar(alert-size-normal-content-padding-bottom)
53
+ cssVar(alert-size-normal-content-padding-left);
54
+ }
55
+
56
+ & .kbq-alert__title {
57
+ margin-bottom: cssVar(alert-size-normal-title-margin-bottom);
58
+ }
59
+
60
+ & .kbq-alert__button-stack {
61
+ padding-top: cssVar(alert-size-normal-button-stack-padding-top);
62
+
63
+ padding-bottom: cssVar(alert-size-normal-button-stack-padding-bottom);
64
+ }
65
+
66
+ & .kbq-alert__close-button {
67
+ margin-top: cssVar(alert-size-normal-close-button-margin-top);
68
+ margin-left: cssVar(alert-size-normal-close-button-margin-left);
69
+ }
75
70
  }
76
71
 
77
- .kbq-alert_dismissible .kbq-alert__close-button {
78
- margin-top: var(--kbq-alert-size-close-button-margin-top, map.get($tokens, alert-size-close-button-margin-top));
79
- margin-right:
80
- var(--kbq-alert-size-close-button-margin-right, map.get($tokens, alert-size-close-button-margin-right));
72
+ .kbq-alert.kbq-alert_compact {
73
+ border-radius: cssVar(alert-size-compact-container-border-radius);
74
+
75
+ padding:
76
+ cssVar(alert-size-compact-container-padding-top)
77
+ cssVar(alert-size-compact-container-padding-right)
78
+ cssVar(alert-size-compact-container-padding-bottom)
79
+ cssVar(alert-size-compact-container-padding-left);
80
+
81
+ & .kbq-alert__icon {
82
+ margin-top: cssVar(alert-size-compact-icon-margin-top);
83
+
84
+ margin-right: cssVar(alert-size-compact-icon-margin-right);
85
+
86
+ &.kbq-alert__icon_title .kbq-icon {
87
+ margin-top: cssVar(alert-size-compact-icon-margin-addon-title);
88
+ }
89
+ }
90
+
91
+ & .kbq-alert__content {
92
+ padding:
93
+ cssVar(alert-size-compact-content-padding-top)
94
+ cssVar(alert-size-compact-content-padding-right)
95
+ cssVar(alert-size-compact-content-padding-bottom)
96
+ cssVar(alert-size-compact-content-padding-left);
97
+ }
98
+
99
+ & .kbq-alert__title {
100
+ margin-bottom: cssVar(alert-size-compact-title-margin-bottom);
101
+ }
102
+
103
+ & .kbq-alert__button-stack {
104
+ padding-top: cssVar(alert-size-compact-button-stack-padding-top);
105
+
106
+ padding-bottom: cssVar(alert-size-compact-button-stack-padding-bottom);
107
+ }
108
+
109
+ & .kbq-alert__close-button {
110
+ margin-top: cssVar(alert-size-compact-close-button-margin-top);
111
+
112
+ margin-left: cssVar(alert-size-compact-close-button-margin-left);
113
+ }
81
114
  }
@@ -11,12 +11,22 @@
11
11
  $actionbar: map.get($style, actionbar);
12
12
  $collapse: map.get($style, collapse);
13
13
 
14
- border-color: map.get($container, border);
15
14
  background: map.get($container, background);
16
15
 
17
16
  & .kbq-tab-header {
18
17
  $header: map.get($style, header);
19
18
  background: map.get($header, background) !important;
19
+ border-color: map.get($container, border);
20
+ }
21
+
22
+ .kbq-tab-body__wrapper {
23
+ border-color: map.get($container, border);
24
+ }
25
+
26
+ &:not(.kbq-code-block_no-header) {
27
+ .kbq-tab-body__wrapper {
28
+ border-top-color: transparent;
29
+ }
20
30
  }
21
31
 
22
32
  & .kbq-code-block-actionbar {
@@ -335,6 +345,18 @@
335
345
  @include kbq-code-block-style(map.get($code-block, filled));
336
346
  }
337
347
 
348
+ .kbq-tab-group.kbq-focused {
349
+ // paint focus border from the top since because of border constraints
350
+ .kbq-tab-header {
351
+ box-shadow: 0 3px 0 -1px map.get(map.get($theme, states), focused-color);
352
+ }
353
+
354
+ .kbq-tab-body__wrapper {
355
+ border-color: map.get(map.get($theme, states), focused-color);
356
+ box-shadow: inset 0 0 0 1px map.get(map.get($theme, states), focused-color);
357
+ }
358
+ }
359
+
338
360
  .kbq-tab-header {
339
361
  & .kbq-tab-label.kbq-tab-label_horizontal,
340
362
  & .kbq-tab-header__pagination {
@@ -16,7 +16,7 @@ $tokens: meta.module-variables(tokens) !default;
16
16
  top: -1px;
17
17
  right: 0;
18
18
 
19
- padding:
19
+ margin:
20
20
  var(
21
21
  --kbq-code-block-size-actionbar-padding-vertical,
22
22
  map.get($tokens, code-block-size-actionbar-padding-vertical)
@@ -38,7 +38,7 @@ $tokens: meta.module-variables(tokens) !default;
38
38
  --kbq-code-block-size-actionbar-fade-gradient-width,
39
39
  map.get($tokens, code-block-size-actionbar-fade-gradient-width)
40
40
  );
41
- height: 40px;
41
+ height: 32px;
42
42
 
43
43
  margin-top: calc(
44
44
  var(
@@ -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
- constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, clipboard: Clipboard, renderer: Renderer2, config: KbqCodeBlockConfiguration);
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
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlockComponent, [null, null, null, null, { optional: true; }]>;
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
  }
@@ -4,6 +4,12 @@
4
4
 
5
5
  $tokens: meta.module-variables(tokens) !default;
6
6
 
7
+ $border-radius: var(
8
+ --kbq-code-block-size-container-border-radius, map.get($tokens, code-block-size-container-border-radius)
9
+ );
10
+ $border-width: var(
11
+ --kbq-code-block-size-container-border-width, map.get($tokens, code-block-size-container-border-width)
12
+ );
7
13
 
8
14
  /* stylelint-disable no-descending-specificity */
9
15
  .kbq-code-block {
@@ -18,13 +24,8 @@ $tokens: meta.module-variables(tokens) !default;
18
24
  -moz-hyphens: none;
19
25
  -webkit-hyphens: none;
20
26
 
21
- border-width: var(
22
- --kbq-code-block-size-container-border-width, map.get($tokens, code-block-size-container-border-width)
23
- );
24
- border-style: solid;
25
- border-radius: var(
26
- --kbq-code-block-size-container-border-radius, map.get($tokens, code-block-size-container-border-radius)
27
- );
27
+ border-radius: $border-radius;
28
+ border-width: 0;
28
29
 
29
30
  .kbq-tab-header {
30
31
  // 4 buttons + margin
@@ -46,6 +47,10 @@ $tokens: meta.module-variables(tokens) !default;
46
47
  --kbq-code-block-size-header-padding-left,
47
48
  map.get($tokens, code-block-size-header-padding-left)
48
49
  );
50
+
51
+ border-width: $border-width $border-width 0 $border-width;
52
+ border-style: solid;
53
+ border-radius: $border-radius $border-radius 0 0;
49
54
  }
50
55
 
51
56
  .kbq-code-block__code {
@@ -66,6 +71,12 @@ $tokens: meta.module-variables(tokens) !default;
66
71
  --kbq-code-block-size-with-header-content-padding-horizontal,
67
72
  map.get($tokens, code-block-size-with-header-content-padding-horizontal)
68
73
  );
74
+
75
+ border-radius: $border-radius;
76
+
77
+ &:focus-visible {
78
+ outline: none;
79
+ }
69
80
  }
70
81
 
71
82
  .hljs-ln-numbers {
@@ -92,11 +103,22 @@ $tokens: meta.module-variables(tokens) !default;
92
103
  }
93
104
  }
94
105
 
106
+ &:not(.kbq-code-block_no-header) {
107
+ .kbq-tab-body__wrapper {
108
+ border-top-width: 0;
109
+ }
110
+ }
111
+
95
112
  &.kbq-code-block_no-header {
96
113
  .kbq-tab-header {
97
114
  display: none;
98
115
  }
99
116
 
117
+ .kbq-tab-body__wrapper {
118
+ border-width: $border-width;
119
+ border-radius: $border-radius;
120
+ }
121
+
100
122
  .kbq-code-block__code {
101
123
  position: relative;
102
124
 
@@ -134,6 +156,10 @@ $tokens: meta.module-variables(tokens) !default;
134
156
  .kbq-tab-body__wrapper {
135
157
  flex-direction: column;
136
158
  position: unset;
159
+
160
+ border-width: $border-width;
161
+ border-style: solid;
162
+ border-radius: 0 0 $border-radius $border-radius;
137
163
  }
138
164
 
139
165
  .kbq-tab-body.kbq-tab-body__active {
@@ -176,10 +202,11 @@ $tokens: meta.module-variables(tokens) !default;
176
202
  justify-content: center;
177
203
  overflow: hidden;
178
204
 
179
- width: 100%;
205
+ width: calc(100% - $border-width * 2);
180
206
 
181
207
  position: absolute;
182
- bottom: 0;
208
+ bottom: $border-width;
209
+ border-radius: $border-radius;
183
210
 
184
211
  &.kbq-code-block__show-more_collapsed {
185
212
  padding-top: var(
@@ -17,6 +17,22 @@ export declare const enUSFormattersData: {
17
17
  fractionSeparator: string;
18
18
  };
19
19
  };
20
+ sizeUnits: {
21
+ defaultUnitSystem: string;
22
+ defaultPrecision: number;
23
+ unitSystems: {
24
+ SI: {
25
+ abbreviations: string[];
26
+ base: number;
27
+ power: number;
28
+ };
29
+ IEC: {
30
+ abbreviations: string[];
31
+ base: number;
32
+ power: number;
33
+ };
34
+ };
35
+ };
20
36
  };
21
37
  export declare const esLAFormattersData: {
22
38
  formatters: {
@@ -37,6 +53,22 @@ export declare const esLAFormattersData: {
37
53
  fractionSeparator: string;
38
54
  };
39
55
  };
56
+ sizeUnits: {
57
+ defaultUnitSystem: string;
58
+ defaultPrecision: number;
59
+ unitSystems: {
60
+ SI: {
61
+ abbreviations: string[];
62
+ base: number;
63
+ power: number;
64
+ };
65
+ IEC: {
66
+ abbreviations: string[];
67
+ base: number;
68
+ power: number;
69
+ };
70
+ };
71
+ };
40
72
  };
41
73
  export declare const faIRFormattersData: {
42
74
  formatters: {
@@ -58,6 +90,22 @@ export declare const faIRFormattersData: {
58
90
  fractionSeparator: string;
59
91
  };
60
92
  };
93
+ sizeUnits: {
94
+ defaultUnitSystem: string;
95
+ defaultPrecision: number;
96
+ unitSystems: {
97
+ SI: {
98
+ abbreviations: string[];
99
+ base: number;
100
+ power: number;
101
+ };
102
+ IEC: {
103
+ abbreviations: string[];
104
+ base: number;
105
+ power: number;
106
+ };
107
+ };
108
+ };
61
109
  };
62
110
  export declare const ptBRFormattersData: {
63
111
  formatters: {
@@ -78,6 +126,22 @@ export declare const ptBRFormattersData: {
78
126
  fractionSeparator: string;
79
127
  };
80
128
  };
129
+ sizeUnits: {
130
+ defaultUnitSystem: string;
131
+ defaultPrecision: number;
132
+ unitSystems: {
133
+ SI: {
134
+ abbreviations: string[];
135
+ base: number;
136
+ power: number;
137
+ };
138
+ IEC: {
139
+ abbreviations: string[];
140
+ base: number;
141
+ power: number;
142
+ };
143
+ };
144
+ };
81
145
  };
82
146
  export declare const ruRUFormattersData: {
83
147
  formatters: {
@@ -99,6 +163,22 @@ export declare const ruRUFormattersData: {
99
163
  startFormattingFrom: number;
100
164
  };
101
165
  };
166
+ sizeUnits: {
167
+ defaultUnitSystem: string;
168
+ defaultPrecision: number;
169
+ unitSystems: {
170
+ SI: {
171
+ abbreviations: string[];
172
+ base: number;
173
+ power: number;
174
+ };
175
+ IEC: {
176
+ abbreviations: string[];
177
+ base: number;
178
+ power: number;
179
+ };
180
+ };
181
+ };
102
182
  };
103
183
  export declare const zhCNFormattersData: {
104
184
  formatters: {
@@ -118,4 +198,20 @@ export declare const zhCNFormattersData: {
118
198
  fractionSeparator: string;
119
199
  };
120
200
  };
201
+ sizeUnits: {
202
+ defaultUnitSystem: string;
203
+ defaultPrecision: number;
204
+ unitSystems: {
205
+ SI: {
206
+ abbreviations: string[];
207
+ base: number;
208
+ power: number;
209
+ };
210
+ IEC: {
211
+ abbreviations: string[];
212
+ base: number;
213
+ power: number;
214
+ };
215
+ };
216
+ };
121
217
  };