@koobiq/components 16.0.0-beta.2 → 16.0.0-beta.5
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/autocomplete/autocomplete.scss +0 -3
- package/button/button.scss +5 -2
- package/core/common-behaviors/color.d.ts +1 -1
- package/core/forms/_forms-theme.scss +4 -4
- package/core/forms/_forms.scss +1 -3
- package/core/option/_option-theme.scss +39 -16
- package/core/option/action.scss +3 -4
- package/core/option/option.scss +6 -51
- package/core/styles/_koobiq-theme.scss +3 -0
- package/core/styles/common/_list.scss +123 -0
- package/core/styles/common/_select.scss +218 -0
- package/core/styles/theming/_components-theming.scss +414 -47
- package/dropdown/_dropdown-theme.scss +30 -37
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +18 -40
- package/dropdown/dropdown.scss +16 -39
- package/esm2022/alert/alert.component.mjs +1 -1
- package/esm2022/autocomplete/autocomplete.component.mjs +2 -2
- package/esm2022/badge/badge.component.mjs +1 -1
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/code-block/code-block.component.mjs +3 -3
- package/esm2022/core/common-behaviors/color.mjs +1 -1
- package/esm2022/core/option/action.mjs +5 -5
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/overlay/overlay-position-map.mjs +2 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/dropdown/dropdown-item.component.mjs +3 -3
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +4 -4
- package/esm2022/form-field/password-toggle.mjs +2 -2
- package/esm2022/icon/icon.component.mjs +3 -3
- package/esm2022/list/list-selection.component.mjs +20 -7
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/list/list.module.mjs +8 -4
- package/esm2022/loader-overlay/loader-overlay.component.mjs +20 -19
- package/esm2022/modal/modal.component.mjs +6 -20
- package/esm2022/progress-spinner/progress-spinner.component.mjs +1 -1
- package/esm2022/risk-level/index.mjs +2 -0
- package/esm2022/risk-level/koobiq-components-risk-level.mjs +5 -0
- package/esm2022/risk-level/public-api.mjs +3 -0
- package/esm2022/risk-level/risk-level.component.mjs +40 -0
- package/esm2022/risk-level/risk-level.module.mjs +28 -0
- package/esm2022/select/select.component.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-directives.mjs +7 -9
- package/esm2022/tabs/tab-group.component.mjs +16 -21
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +3 -3
- package/esm2022/tabs/tab-label.directive.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -7
- package/esm2022/tabs/tabs.module.mjs +2 -6
- package/esm2022/tags/tag-list.component.mjs +2 -2
- package/esm2022/timezone/timezone-option.component.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +25 -13
- package/esm2022/toast/toast.module.mjs +14 -5
- package/esm2022/toast/toast.type.mjs +6 -1
- package/esm2022/tree/padding.directive.mjs +4 -4
- package/esm2022/tree/toggle.mjs +5 -4
- package/esm2022/tree/tree-option.component.mjs +4 -7
- package/esm2022/tree/tree.module.mjs +13 -4
- package/esm2022/tree-select/tree-select.component.mjs +16 -10
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +2 -2
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +2 -2
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +2 -2
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +8 -7
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +4 -4
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +4 -4
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +4 -4
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +28 -11
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +19 -18
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +5 -19
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +72 -0
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -0
- package/fesm2022/koobiq-components-select.mjs +3 -3
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +9 -10
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +38 -37
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +2 -2
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +4 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +41 -15
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +15 -9
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +27 -20
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +2 -2
- package/input/input.scss +3 -1
- package/link/_link-theme.scss +1 -3
- package/list/_list-theme.scss +35 -15
- package/list/list-selection.component.d.ts +5 -1
- package/list/list.module.d.ts +1 -1
- package/list/list.scss +3 -12
- package/loader-overlay/_loader-overlay-theme.scss +43 -11
- package/loader-overlay/loader-overlay.component.d.ts +6 -5
- package/loader-overlay/loader-overlay.scss +53 -22
- package/modal/_modal-confirm.scss +20 -28
- package/modal/_modal-theme.scss +5 -35
- package/modal/modal.component.d.ts +3 -6
- package/modal/modal.scss +32 -36
- package/package.json +9 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-spinner/progress-spinner.component.d.ts +2 -2
- package/risk-level/README.md +0 -0
- package/risk-level/_risk-level-theme.scss +88 -0
- package/risk-level/index.d.ts +1 -0
- package/risk-level/public-api.d.ts +2 -0
- package/risk-level/risk-level.component.d.ts +18 -0
- package/risk-level/risk-level.component.scss +26 -0
- package/risk-level/risk-level.module.d.ts +10 -0
- package/select/_select-theme.scss +8 -0
- package/select/select.scss +5 -189
- package/sidepanel/_sidepanel-theme.scss +6 -41
- package/sidepanel/sidepanel-directives.d.ts +0 -2
- package/sidepanel/sidepanel.scss +33 -35
- package/tabs/_tabs-common.scss +27 -146
- package/tabs/_tabs-theme.scss +81 -175
- package/tabs/tab-group.component.d.ts +5 -8
- package/tabs/tab-group.scss +10 -10
- package/tabs/tab-header.scss +2 -24
- package/tabs/tab-label-wrapper.directive.d.ts +1 -1
- package/tabs/tab-label.directive.d.ts +1 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +3 -1
- package/tabs/tab-nav-bar/tab-nav-bar.scss +9 -16
- package/tabs/tabs.module.d.ts +1 -1
- package/tags/_tag-theme.scss +0 -24
- package/tags/tag-list.scss +20 -16
- package/toast/_toast-theme.scss +21 -33
- package/toast/toast-container.component.scss +2 -1
- package/toast/toast.component.d.ts +4 -1
- package/toast/toast.component.scss +41 -34
- package/toast/toast.module.d.ts +1 -1
- package/toast/toast.type.d.ts +8 -5
- package/tree/_tree-theme.scss +46 -34
- package/tree/tree-option.component.d.ts +0 -1
- package/tree/tree-option.scss +34 -23
- package/tree/tree.module.d.ts +2 -1
- package/tree-select/_tree-select-theme.scss +9 -1
- package/tree-select/tree-select.component.d.ts +5 -3
- package/tree-select/tree-select.scss +5 -194
- package/list/_list-base.scss +0 -54
package/button/button.scss
CHANGED
|
@@ -11,13 +11,16 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
11
11
|
.kbq-button {
|
|
12
12
|
@extend %kbq-button-base;
|
|
13
13
|
|
|
14
|
+
// base padding + compensation (4px) - border-width (2px)
|
|
14
15
|
padding-left: calc(
|
|
15
16
|
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
|
|
16
|
-
4px
|
|
17
|
+
4px -
|
|
18
|
+
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
17
19
|
);
|
|
18
20
|
padding-right: calc(
|
|
19
21
|
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
|
|
20
|
-
4px
|
|
22
|
+
4px -
|
|
23
|
+
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
21
24
|
);
|
|
22
25
|
|
|
23
26
|
&.kbq-button-icon_left {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { AbstractConstructor, Constructor } from './constructor';
|
|
3
3
|
export interface CanColor {
|
|
4
|
-
color: KbqComponentColors | ThemePalette;
|
|
4
|
+
color: KbqComponentColors | ThemePalette | string;
|
|
5
5
|
}
|
|
6
6
|
/** @docs-private */
|
|
7
7
|
export type CanColorCtor = Constructor<CanColor> & AbstractConstructor<CanColor>;
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
$tokens: map.get($config, tokens);
|
|
26
26
|
|
|
27
27
|
.kbq-form__label {
|
|
28
|
-
@include kbq-typography-level-to-styles($config, map.get($tokens, forms-font-
|
|
28
|
+
@include kbq-typography-level-to-styles($config, map.get($tokens, forms-font-label));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
31
|
+
//.kbq-form__legend {
|
|
32
|
+
// @include kbq-typography-level-to-styles($config, map.get($tokens, forms-font-default-legend));
|
|
33
|
+
//}
|
|
34
34
|
}
|
package/core/forms/_forms.scss
CHANGED
|
@@ -20,10 +20,8 @@
|
|
|
20
20
|
.kbq-form-horizontal {
|
|
21
21
|
$config: kbq-typography-config($tokens);
|
|
22
22
|
|
|
23
|
-
$line-height: kbq-line-height($config,
|
|
24
|
-
|
|
23
|
+
$line-height: kbq-line-height($config, map.get($tokens, forms-font-label));
|
|
25
24
|
$form-field-size-height: map.get($tokens, form-field-size-height);
|
|
26
|
-
|
|
27
25
|
$label-padding-top: calc(($form-field-size-height - $line-height) / 2);
|
|
28
26
|
|
|
29
27
|
& .kbq-form-row_margin {
|
|
@@ -4,33 +4,52 @@
|
|
|
4
4
|
@use '../styles/typography/typography-utils' as *;
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
@mixin kbq-option
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
@mixin kbq-option($state) {
|
|
8
|
+
background: map.get($state, container-background);
|
|
9
|
+
|
|
10
|
+
.kbq-option-text {
|
|
11
|
+
color: map.get($state, text);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.kbq-icon {
|
|
15
|
+
color: map.get($state, icon);
|
|
16
|
+
}
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
.kbq-option-action .kbq-icon {
|
|
19
|
+
color: map.get($state, icon-button);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.kbq-option-caption {
|
|
23
|
+
color: map.get($state, caption);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin kbq-option-theme($theme) {
|
|
28
|
+
$list-item: map.get(map.get($theme, components), list-item);
|
|
12
29
|
|
|
13
30
|
.kbq-option {
|
|
14
|
-
|
|
31
|
+
@include kbq-option(map.get($list-item, default));
|
|
15
32
|
|
|
16
|
-
&:hover:not(.kbq-disabled) {
|
|
17
|
-
|
|
18
|
-
background: map.get($background, overlay-hover);
|
|
19
|
-
}
|
|
33
|
+
&:hover:not(.kbq-disabled):not([disabled]) {
|
|
34
|
+
@include kbq-option(map.get($list-item, hover));
|
|
20
35
|
}
|
|
21
36
|
|
|
37
|
+
&.kbq-focused,
|
|
22
38
|
&.kbq-active {
|
|
23
|
-
border-color: map.get(map.get($
|
|
39
|
+
border-color: map.get(map.get($list-item, focused), focus-outline);
|
|
24
40
|
}
|
|
25
41
|
|
|
26
42
|
&.kbq-selected {
|
|
27
|
-
|
|
28
|
-
}
|
|
43
|
+
@include kbq-option(map.get($list-item, selected));
|
|
29
44
|
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
&:hover:not(.kbq-disabled):not([disabled]) {
|
|
46
|
+
@include kbq-option(map.get($list-item, selected-hover));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
&.kbq-disabled,
|
|
51
|
+
&[disabled] {
|
|
52
|
+
@include kbq-option(map.get($list-item, disabled));
|
|
34
53
|
}
|
|
35
54
|
}
|
|
36
55
|
}
|
|
@@ -39,6 +58,10 @@
|
|
|
39
58
|
$tokens: map.get($config, tokens);
|
|
40
59
|
|
|
41
60
|
.kbq-option {
|
|
42
|
-
@include kbq-typography-level-to-styles($config, map.get($tokens,
|
|
61
|
+
@include kbq-typography-level-to-styles($config, map.get($tokens, list-font-text));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.kbq-list-option-caption {
|
|
65
|
+
@include kbq-typography-level-to-styles($config, map.get($tokens, list-font-caption));
|
|
43
66
|
}
|
|
44
67
|
}
|
package/core/option/action.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.kbq-option-action {
|
|
2
|
-
box-sizing:
|
|
2
|
+
box-sizing: border-box;
|
|
3
3
|
|
|
4
4
|
position: relative;
|
|
5
5
|
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
margin-right: -2px;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: 100%;
|
|
13
|
+
width: 24px;
|
|
14
|
+
height: 24px;
|
|
16
15
|
|
|
17
16
|
cursor: pointer;
|
|
18
17
|
|
package/core/option/option.scss
CHANGED
|
@@ -1,62 +1,17 @@
|
|
|
1
1
|
@use 'sass:meta';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
|
-
@use '../styles/
|
|
4
|
+
@use '../styles/common';
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
$tokens: meta.module-variables(tokens) !default;
|
|
8
|
-
|
|
9
7
|
.kbq-option {
|
|
10
|
-
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
align-items: center;
|
|
13
|
-
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
|
|
16
|
-
position: relative;
|
|
17
|
-
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
|
|
20
|
-
height: var(--kbq-option-size-height, map.get($tokens, option-size-height));
|
|
21
|
-
|
|
22
|
-
border: var(--kbq-option-size-border-width, map.get($tokens, option-size-border-width)) solid transparent;
|
|
23
|
-
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
|
|
26
|
-
outline: none;
|
|
27
|
-
|
|
28
|
-
padding-left: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
|
|
29
|
-
padding-right: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
|
|
30
|
-
|
|
31
|
-
-webkit-tap-highlight-color: transparent;
|
|
32
|
-
|
|
33
|
-
&.kbq-disabled {
|
|
34
|
-
cursor: default;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
& .kbq-pseudo-checkbox {
|
|
38
|
-
margin-right: 8px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
& .kbq-option-overlay {
|
|
42
|
-
position: absolute;
|
|
43
|
-
|
|
44
|
-
top: calc(-1 * var(--kbq-option-size-border-width, #{map.get($tokens, option-size-border-width)}));
|
|
45
|
-
left: calc(-1 * var(--kbq-option-size-border-width, #{map.get($tokens, option-size-border-width)}));
|
|
46
|
-
right: calc(-1 * var(--kbq-option-size-border-width, #{map.get($tokens, option-size-border-width)}));
|
|
47
|
-
bottom: calc(-1 * var(--kbq-option-size-border-width, #{map.get($tokens, option-size-border-width)}));
|
|
48
|
-
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
border-radius: inherit;
|
|
51
|
-
}
|
|
8
|
+
@include common.kbq-list-item-base();
|
|
52
9
|
}
|
|
53
10
|
|
|
54
11
|
.kbq-option-text {
|
|
55
|
-
|
|
56
|
-
flex-grow: 1;
|
|
12
|
+
@include common.kbq-list-text();
|
|
57
13
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
text-overflow: ellipsis;
|
|
14
|
+
&:not(.kbq-disabled):not([disabled]) {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
62
17
|
}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
@use '../../progress-bar/progress-bar-theme' as *;
|
|
31
31
|
@use '../../progress-spinner/progress-spinner-theme' as *;
|
|
32
32
|
@use '../../radio/radio-theme' as *;
|
|
33
|
+
@use '../../risk-level/risk-level-theme' as *;
|
|
33
34
|
@use '../../select/select-theme' as *;
|
|
34
35
|
@use '../../sidepanel/sidepanel-theme' as *;
|
|
35
36
|
@use '../../splitter/splitter-theme' as *;
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
@include kbq-progress-spinner-theme($theme);
|
|
87
88
|
@include kbq-pseudo-checkbox-theme($theme);
|
|
88
89
|
@include kbq-radio-theme($theme);
|
|
90
|
+
@include kbq-risk-level-theme($theme);
|
|
89
91
|
@include kbq-scrollbar-theme($theme);
|
|
90
92
|
@include kbq-select-theme($theme);
|
|
91
93
|
@include kbq-sidepanel-theme($theme);
|
|
@@ -136,6 +138,7 @@
|
|
|
136
138
|
@include kbq-progress-bar-typography($config);
|
|
137
139
|
@include kbq-progress-spinner-typography($config);
|
|
138
140
|
@include kbq-radio-typography($config);
|
|
141
|
+
@include kbq-risk-level-typography($config);
|
|
139
142
|
@include kbq-select-typography($config);
|
|
140
143
|
@include kbq-sidepanel-typography($config);
|
|
141
144
|
@include kbq-tabs-typography($config);
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
@use '../tokens';
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
// This mixin will ensure that lines that overflow the container will hide the overflow and
|
|
2
8
|
// truncate neatly with an ellipsis.
|
|
3
9
|
@mixin kbq-truncate-line() {
|
|
@@ -41,6 +47,123 @@
|
|
|
41
47
|
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
|
|
42
48
|
}
|
|
43
49
|
|
|
50
|
+
@mixin kbq-list-text() {
|
|
51
|
+
$tokens: meta.module-variables(tokens) !default;
|
|
52
|
+
|
|
53
|
+
@include kbq-line-wrapper-base();
|
|
54
|
+
display: inline-block;
|
|
55
|
+
|
|
56
|
+
@include kbq-truncate-line();
|
|
57
|
+
|
|
58
|
+
padding-top: var(--kbq-list-size-text-padding-vertical, map.get($tokens, list-size-text-padding-vertical));
|
|
59
|
+
padding-bottom: var(--kbq-list-size-text-padding-vertical, map.get($tokens, list-size-text-padding-vertical));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// This mixin provides all list-item styles, changing font size and height based on whether the list is in dense mode.
|
|
63
|
+
@mixin kbq-list-item-base() {
|
|
64
|
+
$tokens: meta.module-variables(tokens) !default;
|
|
65
|
+
|
|
66
|
+
$outline-width: map.get($tokens, list-size-container-focus-outline-width);
|
|
67
|
+
|
|
68
|
+
$padding-vertical: map.get($tokens, list-size-container-padding-vertical);
|
|
69
|
+
$padding-left: map.get($tokens, list-size-container-padding-left);
|
|
70
|
+
$padding-right: map.get($tokens, list-size-container-padding-right);
|
|
71
|
+
|
|
72
|
+
position: relative;
|
|
73
|
+
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
align-items: center;
|
|
77
|
+
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
|
|
80
|
+
outline: none;
|
|
81
|
+
-webkit-tap-highlight-color: transparent;
|
|
82
|
+
|
|
83
|
+
min-height: 32px;
|
|
84
|
+
|
|
85
|
+
gap: var(
|
|
86
|
+
--kbq-list-size-container-content-gap-horizontal, map.get($tokens, list-size-container-content-gap-horizontal)
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
border-width: var(--kbq-list-size-container-focus-outline-width, $outline-width);
|
|
90
|
+
border-style: solid;
|
|
91
|
+
border-color: transparent;
|
|
92
|
+
|
|
93
|
+
padding:
|
|
94
|
+
calc(
|
|
95
|
+
var(--kbq-list-size-container-padding-vertical, $padding-vertical) -
|
|
96
|
+
var(--kbq-list-size-container-focus-outline-width, $outline-width)
|
|
97
|
+
)
|
|
98
|
+
calc(
|
|
99
|
+
var(--kbq-list-size-container-padding-right, $padding-right) -
|
|
100
|
+
var(--kbq-list-size-container-focus-outline-width, $outline-width)
|
|
101
|
+
)
|
|
102
|
+
calc(
|
|
103
|
+
var(--kbq-list-size-container-padding-vertical, $padding-vertical) -
|
|
104
|
+
var(--kbq-list-size-container-focus-outline-width, $outline-width)
|
|
105
|
+
)
|
|
106
|
+
calc(
|
|
107
|
+
var(--kbq-list-size-container-padding-left, $padding-left) -
|
|
108
|
+
var(--kbq-list-size-container-focus-outline-width, $outline-width)
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
.kbq-list-text {
|
|
112
|
+
@include kbq-list-text();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.kbq-list-option-caption {
|
|
116
|
+
padding-top: var(
|
|
117
|
+
--kbq-list-size-container-content-gap-vertical,
|
|
118
|
+
map.get($tokens, list-size-container-content-gap-vertical)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@mixin kbq-list-header-base() {
|
|
124
|
+
$tokens: meta.module-variables(tokens) !default;
|
|
125
|
+
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: row;
|
|
128
|
+
align-items: center;
|
|
129
|
+
|
|
130
|
+
box-sizing: border-box;
|
|
131
|
+
|
|
132
|
+
min-height: 32px;
|
|
133
|
+
|
|
134
|
+
padding:
|
|
135
|
+
var(--kbq-list-size-header-padding-top, map.get($tokens, list-size-header-padding-top))
|
|
136
|
+
var(--kbq-list-size-header-padding-horizontal, map.get($tokens, list-size-header-padding-horizontal))
|
|
137
|
+
var(--kbq-list-size-header-padding-bottom, map.get($tokens, list-size-header-padding-bottom))
|
|
138
|
+
var(--kbq-list-size-header-padding-horizontal, map.get($tokens, list-size-header-padding-horizontal));
|
|
139
|
+
|
|
140
|
+
.kbq-list-text {
|
|
141
|
+
@include kbq-list-text();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@mixin kbq-list-subheading-base() {
|
|
146
|
+
$tokens: meta.module-variables(tokens) !default;
|
|
147
|
+
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: row;
|
|
150
|
+
align-items: center;
|
|
151
|
+
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
|
|
154
|
+
min-height: 32px;
|
|
155
|
+
|
|
156
|
+
padding:
|
|
157
|
+
var(--kbq-list-size-subheading-padding-top, map.get($tokens, list-size-subheading-padding-top))
|
|
158
|
+
var(--kbq-list-size-subheading-padding-horizontal, map.get($tokens, list-size-subheading-padding-horizontal))
|
|
159
|
+
var(--kbq-list-size-subheading-padding-bottom, map.get($tokens, list-size-subheading-padding-bottom))
|
|
160
|
+
var(--kbq-list-size-subheading-padding-horizontal, map.get($tokens, list-size-subheading-padding-horizontal));
|
|
161
|
+
|
|
162
|
+
.kbq-list-text {
|
|
163
|
+
@include kbq-list-text();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
44
167
|
.kbq-no-select {
|
|
45
168
|
@include kbq-no-select;
|
|
46
169
|
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
@use '../common/vendor-prefixes';
|
|
5
|
+
@use '../tokens';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
$tokens: meta.module-variables(tokens) !default;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
%kbq-select-base {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
|
|
14
|
+
display: inline-block;
|
|
15
|
+
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
outline: none;
|
|
19
|
+
|
|
20
|
+
.kbq-select__matcher {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
|
|
24
|
+
width: 100%;
|
|
25
|
+
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
|
|
30
|
+
// todo
|
|
31
|
+
& > span {
|
|
32
|
+
flex: 1;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
$border-width: map.get($tokens, form-field-size-border-width);
|
|
38
|
+
|
|
39
|
+
.kbq-select__trigger {
|
|
40
|
+
display: flex;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
position: relative;
|
|
43
|
+
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
height: calc(
|
|
47
|
+
var(--kbq-form-field-size-height, map.get($tokens, form-field-size-height)) -
|
|
48
|
+
(var(--kbq-form-field-size-border-width, map.get($tokens, form-field-size-border-width)) * 2)
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
& .kbq-select__matcher {
|
|
52
|
+
$padding-vertical: map.get($tokens, select-size-single-padding-vertical);
|
|
53
|
+
|
|
54
|
+
padding:
|
|
55
|
+
calc(
|
|
56
|
+
var(--kbq-select-size-single-padding-vertical, #{$padding-vertical}) -
|
|
57
|
+
var(--kbq-form-field-size-border-width, #{$border-width})
|
|
58
|
+
)
|
|
59
|
+
calc(
|
|
60
|
+
var(--kbq-select-size-single-padding-right, #{map.get($tokens, select-size-single-padding-right)}) -
|
|
61
|
+
var(--kbq-form-field-size-border-width, #{$border-width})
|
|
62
|
+
)
|
|
63
|
+
calc(
|
|
64
|
+
var(--kbq-select-size-single-padding-vertical, #{$padding-vertical}) -
|
|
65
|
+
var(--kbq-form-field-size-border-width, #{$border-width})
|
|
66
|
+
)
|
|
67
|
+
calc(
|
|
68
|
+
var(--kbq-select-size-single-padding-left, #{map.get($tokens, select-size-single-padding-left)}) -
|
|
69
|
+
var(--kbq-form-field-size-border-width, #{$border-width})
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) {
|
|
75
|
+
& .kbq-select__matcher {
|
|
76
|
+
padding-left: calc(
|
|
77
|
+
var(--kbq-select-size-multiple-padding-left, #{map.get($tokens, select-size-multiple-padding-left)}) -
|
|
78
|
+
var(--kbq-form-field-size-border-width, #{$border-width})
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
.kbq-select__match-container {
|
|
82
|
+
display: flex;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.kbq-select__match-container {
|
|
88
|
+
width: 100%;
|
|
89
|
+
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
|
|
93
|
+
& .kbq-select__match-hidden-text {
|
|
94
|
+
flex: 0 0 70px;
|
|
95
|
+
align-self: center;
|
|
96
|
+
padding-left: 4px;
|
|
97
|
+
padding-right: var(
|
|
98
|
+
--kbq-select-size-multiple-content-gap, #{map.get($tokens, select-size-multiple-content-gap)}
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
text-align: right;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.kbq-select__match-list {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-wrap: wrap;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
|
|
110
|
+
$padding-vertical: map.get($tokens, select-size-multiple-padding-vertical);
|
|
111
|
+
|
|
112
|
+
max-height: calc(
|
|
113
|
+
var(--kbq-form-field-size-height, map.get($tokens, form-field-size-height)) -
|
|
114
|
+
(var(--kbq-select-size-multiple-padding-vertical, $padding-vertical) * 2)
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
height: calc(
|
|
118
|
+
var(--kbq-form-field-size-height, map.get($tokens, form-field-size-height)) -
|
|
119
|
+
(var(--kbq-select-size-multiple-padding-vertical, $padding-vertical) * 2)
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
gap: var(
|
|
123
|
+
--kbq-select-size-multiple-content-gap, #{map.get($tokens, select-size-multiple-content-gap)}
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
margin-right: var(
|
|
127
|
+
--kbq-select-size-multiple-content-gap, #{map.get($tokens, select-size-multiple-content-gap)}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.kbq-select__arrow-wrapper {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-self: center;
|
|
134
|
+
|
|
135
|
+
padding: 4px;
|
|
136
|
+
|
|
137
|
+
// When used in a box or standard appearance form-field the arrow should be shifted up 50%.
|
|
138
|
+
.kbq-form-field-appearance-fill &,
|
|
139
|
+
.kbq-form-field-appearance-standard & {
|
|
140
|
+
transform: translateY(-50%);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// When used in a outline form-field the arrow should be shifted up 25%.
|
|
144
|
+
.kbq-form-field-appearance-outline & {
|
|
145
|
+
transform: translateY(-25%);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.kbq-select__no-options-message {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: row;
|
|
152
|
+
align-items: center;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
|
|
155
|
+
position: relative;
|
|
156
|
+
|
|
157
|
+
max-width: 100%;
|
|
158
|
+
height: var(--kbq-option-size-height, map.get($tokens, option-size-height));
|
|
159
|
+
|
|
160
|
+
cursor: default;
|
|
161
|
+
outline: none;
|
|
162
|
+
|
|
163
|
+
padding-left: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
|
|
164
|
+
padding-right: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
|
|
165
|
+
|
|
166
|
+
border: var(--kbq-option-size-border-width, map.get($tokens, option-size-border-width)) solid transparent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.kbq-select__search-container {
|
|
170
|
+
border-bottom: {
|
|
171
|
+
width: 1px;
|
|
172
|
+
style: solid;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.kbq-disabled {
|
|
177
|
+
& .kbq-select__trigger {
|
|
178
|
+
@include vendor-prefixes.user-select(none);
|
|
179
|
+
|
|
180
|
+
cursor: default;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
%kbq-select-panel {
|
|
186
|
+
min-width: 100%; // prevents some animation twitching and test inconsistencies in IE11
|
|
187
|
+
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
|
|
190
|
+
border-radius: var(
|
|
191
|
+
--kbq-select-panel-size-border-radius, map.get($tokens, select-panel-size-border-radius)
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
// Override optgroup and option to scale based on font-size of the trigger.
|
|
195
|
+
.kbq-optgroup-label,
|
|
196
|
+
.kbq-option {
|
|
197
|
+
font-size: inherit;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
%kbq-select-content {
|
|
202
|
+
max-height: var(--kbq-select-panel-size-max-height, map.get($tokens, select-panel-size-max-height));
|
|
203
|
+
padding: 4px 0;
|
|
204
|
+
overflow: hidden auto;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
%kbq-select-footer {
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
box-sizing: border-box;
|
|
211
|
+
|
|
212
|
+
min-height: 40px;
|
|
213
|
+
|
|
214
|
+
border-top-width: 1px;
|
|
215
|
+
border-top-style: solid;
|
|
216
|
+
|
|
217
|
+
padding: map.get($tokens, size-xxs) map.get($tokens, size-m);
|
|
218
|
+
}
|