@koobiq/components 17.0.0-rc.6 → 17.0.0-rc.7
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/alert/_alert-theme.scss +19 -33
- package/alert/alert.component.scss +41 -136
- package/autocomplete/_autocomplete-theme.scss +3 -2
- package/autocomplete/autocomplete.scss +7 -14
- package/badge/_badge-theme.scss +31 -45
- package/badge/badge.component.scss +15 -35
- package/button/_button-base.scss +7 -13
- package/button/_button-theme.scss +29 -85
- package/button/button.component.d.ts +3 -2
- package/button/button.scss +7 -16
- package/button-toggle/_button-toggle-theme.scss +18 -18
- package/button-toggle/button-toggle.scss +9 -32
- package/card/_card-theme.scss +19 -17
- package/card/card.component.scss +2 -4
- package/checkbox/_checkbox-theme.scss +44 -43
- package/checkbox/checkbox.scss +13 -18
- package/code-block/_code-block-theme.scss +27 -26
- package/code-block/actionbar.component.scss +7 -18
- package/code-block/code-block.scss +21 -66
- package/core/forms/_forms-theme.scss +4 -7
- package/core/forms/_forms.scss +13 -42
- package/core/option/_optgroup-theme.scss +4 -5
- package/core/option/_option-action-theme.scss +7 -7
- package/core/option/_option-theme.scss +16 -20
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -19
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -8
- package/core/styles/common/_groups.scss +3 -5
- package/core/styles/common/_list.scss +14 -18
- package/core/styles/common/_popup.scss +5 -4
- package/core/styles/common/_select.scss +11 -16
- package/core/styles/common/_tokens.scss +30 -9
- package/core/styles/theming/_components-theming.scss +151 -131
- package/core/styles/visual/_layout.scss +14 -16
- package/datepicker/_datepicker-theme.scss +24 -39
- package/datepicker/calendar-body.scss +3 -8
- package/datepicker/calendar-header.scss +4 -9
- package/datepicker/calendar.scss +5 -16
- package/datepicker/datepicker-content.scss +4 -12
- package/datepicker/datepicker-input.scss +0 -4
- package/datepicker/datepicker-toggle.scss +3 -2
- package/divider/_divider-theme.scss +3 -1
- package/divider/divider.scss +9 -25
- package/dl/_dl-theme.scss +5 -6
- package/dl/dl.scss +5 -19
- package/dropdown/_dropdown-theme.scss +21 -21
- package/dropdown/dropdown-item.scss +3 -11
- package/dropdown/dropdown.scss +6 -14
- package/esm2022/alert/alert.component.mjs +2 -2
- package/esm2022/button/button.component.mjs +13 -6
- package/esm2022/code-block/actionbar.component.mjs +2 -2
- package/esm2022/code-block/code-block.component.mjs +2 -2
- package/esm2022/core/version.mjs +2 -2
- 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 +2 -2
- package/esm2022/icon/icon-item.component.mjs +16 -6
- package/esm2022/markdown/markdown.component.mjs +2 -2
- package/esm2022/navbar/navbar-item.component.mjs +2 -2
- 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/scrollbar/scrollbar.component.mjs +2 -2
- package/esm2022/select/select.component.mjs +3 -3
- package/esm2022/tabs/tab-group.component.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/esm2022/timepicker/timepicker.directive.mjs +10 -2
- package/esm2022/timezone/timezone-select.component.mjs +2 -2
- package/esm2022/title/title.directive.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +3 -3
- package/esm2022/tree-select/tree-select.component.mjs +3 -3
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-alert.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-code-block.mjs +4 -4
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +1 -1
- package/fesm2022/koobiq-components-core.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 +2 -2
- 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-markdown.mjs +2 -2
- package/fesm2022/koobiq-components-navbar.mjs +6 -6
- 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-scrollbar.mjs +2 -2
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +2 -2
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +4 -4
- package/fesm2022/koobiq-components-timepicker.mjs +9 -1
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +1 -1
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +2 -2
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +2 -2
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +109 -68
- package/file-upload/file-upload.scss +0 -5
- package/file-upload/multiple-file-upload.component.scss +32 -98
- package/file-upload/single-file-upload.component.scss +12 -31
- package/form-field/_form-field-theme.scss +32 -34
- package/form-field/_hint-theme.scss +16 -19
- package/form-field/cleaner.scss +3 -8
- package/form-field/form-field.scss +11 -12
- package/form-field/hint.scss +3 -7
- package/form-field/password-toggle.scss +3 -9
- package/form-field/stepper.scss +4 -10
- package/icon/_icon-button-theme.scss +35 -35
- package/icon/_icon-item-theme.scss +46 -31
- package/icon/_icon-theme.scss +9 -15
- package/icon/icon-button.scss +5 -17
- package/icon/icon-item.component.d.ts +3 -1
- package/icon/icon-item.scss +12 -7
- package/icon/icon.scss +0 -5
- package/input/_input-theme.scss +2 -3
- package/input/input.scss +2 -1
- package/link/_link-theme.scss +25 -42
- package/list/_list-theme.scss +18 -17
- package/list/list.scss +0 -4
- package/loader-overlay/_loader-overlay-theme.scss +13 -16
- package/loader-overlay/loader-overlay.scss +9 -32
- package/markdown/_markdown-theme.scss +41 -44
- package/markdown/markdown.scss +38 -88
- package/modal/_modal-confirm.scss +2 -6
- package/modal/_modal-theme.scss +11 -12
- package/modal/modal.scss +18 -24
- package/navbar/_navbar-item_horizontal.scss +24 -27
- package/navbar/_navbar-item_vertical.scss +28 -27
- package/navbar/_navbar-theme.scss +21 -22
- package/navbar/navbar-brand.scss +24 -26
- package/navbar/navbar-divider.scss +4 -7
- package/navbar/navbar-item.scss +5 -13
- package/navbar/navbar.scss +2 -5
- package/navbar/vertical-navbar.scss +3 -5
- package/package.json +9 -9
- package/popover/_popover-theme.scss +9 -16
- package/popover/popover.scss +18 -24
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +7 -10
- package/progress-bar/progress-bar.scss +6 -18
- package/progress-spinner/_progress-spinner-theme.scss +6 -7
- package/progress-spinner/progress-spinner.scss +8 -17
- package/radio/_radio-theme.scss +29 -37
- package/radio/radio.scss +17 -38
- package/risk-level/_risk-level-theme.scss +25 -30
- package/risk-level/risk-level.component.scss +5 -8
- package/schematics/ng-add/index.js +6 -6
- package/scrollbar/_scrollbar-component-theme.scss +14 -17
- package/scrollbar/scrollbar.component.scss +7 -20
- package/select/_select-theme.scss +14 -15
- package/select/select.scss +3 -10
- package/sidepanel/_sidepanel-theme.scss +8 -9
- package/sidepanel/sidepanel.scss +19 -30
- package/splitter/_splitter-theme.scss +3 -3
- package/table/_table-theme.scss +9 -8
- package/table/table.scss +12 -12
- package/tabs/_tabs-common.scss +4 -7
- package/tabs/_tabs-theme.scss +77 -44
- package/tabs/tab-group.scss +2 -7
- package/tabs/tab-header.scss +0 -4
- package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -7
- package/tags/_tag-theme.scss +23 -26
- package/tags/tag-list.scss +6 -5
- package/tags/tag.scss +6 -9
- package/textarea/_textarea-theme.scss +2 -4
- package/textarea/textarea.scss +4 -6
- package/timepicker/timepicker.scss +2 -7
- package/timezone/_timezone-option-theme.scss +8 -9
- package/timezone/timezone-option.component.scss +5 -7
- package/timezone/timezone-select.component.scss +2 -3
- package/toast/_toast-theme.scss +15 -14
- package/toast/toast-container.component.scss +4 -7
- package/toast/toast.component.scss +20 -25
- package/toggle/_toggle-theme.scss +48 -42
- package/toggle/toggle.scss +9 -21
- package/tooltip/_tooltip-theme.scss +13 -16
- package/tooltip/tooltip.scss +8 -10
- package/tree/_tree-theme.scss +20 -22
- package/tree/toggle.scss +3 -5
- package/tree/tree-option.scss +5 -6
- package/tree-select/_tree-select-theme.scss +11 -13
- package/tree-select/tree-select.scss +0 -4
- package/core/styles/_variables.scss +0 -1
package/button/_button-base.scss
CHANGED
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/common/button';
|
|
5
5
|
|
|
6
|
-
@use '../core/styles/tokens'
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
$tokens: meta.module-variables(tokens) !default;
|
|
10
|
-
|
|
11
9
|
%kbq-button-base {
|
|
12
10
|
@include button.kbq-button-reset();
|
|
13
11
|
|
|
@@ -21,8 +19,8 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
21
19
|
|
|
22
20
|
margin: 0; /* Safari */
|
|
23
21
|
|
|
24
|
-
height:
|
|
25
|
-
min-height:
|
|
22
|
+
height: kbq-css-variable(button-size-height);
|
|
23
|
+
min-height: kbq-css-variable(button-size-height);
|
|
26
24
|
|
|
27
25
|
white-space: nowrap;
|
|
28
26
|
|
|
@@ -31,8 +29,8 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
31
29
|
|
|
32
30
|
vertical-align: baseline;
|
|
33
31
|
|
|
34
|
-
border:
|
|
35
|
-
border-radius:
|
|
32
|
+
border: kbq-css-variable(button-size-border-width) solid transparent;
|
|
33
|
+
border-radius: kbq-css-variable(button-size-border-radius);
|
|
36
34
|
|
|
37
35
|
&::-moz-focus-inner {
|
|
38
36
|
border: 0;
|
|
@@ -56,14 +54,10 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
& .kbq-icon_left {
|
|
59
|
-
margin-right:
|
|
60
|
-
--kbq-button-size-content-padding, map.get($tokens, button-size-content-padding)
|
|
61
|
-
);
|
|
57
|
+
margin-right: kbq-css-variable(button-size-content-padding);
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
& .kbq-icon_right {
|
|
65
|
-
margin-left:
|
|
66
|
-
--kbq-button-size-content-padding, map.get($tokens, button-size-content-padding)
|
|
67
|
-
);
|
|
61
|
+
margin-left: kbq-css-variable(button-size-content-padding);
|
|
68
62
|
}
|
|
69
63
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
|
|
6
7
|
|
|
7
8
|
@mixin _icon($left-icon, $right-icon) {
|
|
@@ -18,85 +19,43 @@
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
@mixin kbq-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
background: map.get($params, background);
|
|
22
|
+
@mixin kbq-button-type($component, $type, $sub-type) {
|
|
23
|
+
$style: map.get($component, $type, $sub-type);
|
|
24
|
+
$base-path: button-#{$type}-#{$sub-type};
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
border-color: kbq-css-variable(#{$base-path}-border, map.get($style, border));
|
|
27
|
+
color: kbq-css-variable(#{$base-path}-foreground, map.get($style, foreground));
|
|
28
|
+
background: kbq-css-variable(#{$base-path}-background, map.get($style, background));
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
&:active:not(.kbq-disabled),
|
|
34
|
-
&.kbq-active:not(.kbq-disabled) {
|
|
35
|
-
background: map.get($params, states_active_background);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.kbq-disabled {
|
|
39
|
-
color: map.get($params, states_disabled_foreground);
|
|
40
|
-
background: map.get($params, states_disabled_background);
|
|
41
|
-
|
|
42
|
-
@include _icon(map.get($params, states_disabled_left-icon), map.get($params, states_disabled_left-icon));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@mixin kbq-outline-button($params) {
|
|
47
|
-
border-color: map.get($params, border);
|
|
48
|
-
color: map.get($params, foreground);
|
|
49
|
-
background: map.get($params, background);
|
|
50
|
-
|
|
51
|
-
@include _icon(map.get($params, left-icon), map.get($params, right-icon));
|
|
30
|
+
@include _icon(
|
|
31
|
+
kbq-css-variable(#{$base-path}-left-icon, map.get($style, left-icon)),
|
|
32
|
+
kbq-css-variable(#{$base-path}-right-icon, map.get($style, right-icon))
|
|
33
|
+
);
|
|
52
34
|
|
|
53
35
|
&:hover:not(.kbq-disabled),
|
|
54
36
|
&.kbq-hover:not(.kbq-disabled) {
|
|
55
|
-
background: map.get($
|
|
37
|
+
background: kbq-css-variable(#{$base-path}-states-hover-background, map.get($style, states-hover-background));
|
|
56
38
|
}
|
|
57
39
|
|
|
58
40
|
&:active:not(.kbq-disabled),
|
|
59
41
|
&.kbq-active:not(.kbq-disabled) {
|
|
60
|
-
background: map.get($
|
|
42
|
+
background: kbq-css-variable(#{$base-path}-states-active-background, map.get($style, states-active-background));
|
|
61
43
|
}
|
|
62
44
|
|
|
63
45
|
&.kbq-disabled {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
color: map.get($params, foreground);
|
|
74
|
-
background: map.get($params, background);
|
|
75
|
-
|
|
76
|
-
@include _icon(map.get($params, left-icon), map.get($params, right-icon));
|
|
77
|
-
|
|
78
|
-
&:hover:not(.kbq-disabled),
|
|
79
|
-
&.kbq-hover:not(.kbq-disabled) {
|
|
80
|
-
background: map.get($params, states_hover_background);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:active:not(.kbq-disabled),
|
|
84
|
-
&.kbq-active:not(.kbq-disabled) {
|
|
85
|
-
background: map.get($params, states_active_background);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.kbq-disabled {
|
|
89
|
-
border-color: map.get($params, states_disabled_border);
|
|
90
|
-
color: map.get($params, states_disabled_foreground);
|
|
91
|
-
|
|
92
|
-
@include _icon(map.get($params, states_disabled_left-icon), map.get($params, states_disabled_left-icon));
|
|
46
|
+
color: kbq-css-variable(#{$base-path}-states-disabled-foreground, map.get($style, states-disabled-foreground));
|
|
47
|
+
background: kbq-css-variable(
|
|
48
|
+
#{$base-path}-states-disabled-background, map.get($style, states-disabled-background)
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
@include _icon(
|
|
52
|
+
kbq-css-variable(#{$base-path}-states-disabled-left-icon, map.get($style, states-disabled-left-icon)),
|
|
53
|
+
kbq-css-variable(#{$base-path}-states-disabled-right-icon, map.get($style, states-disabled-right-icon))
|
|
54
|
+
);
|
|
93
55
|
}
|
|
94
56
|
}
|
|
95
57
|
|
|
96
58
|
@mixin kbq-button-theme($theme) {
|
|
97
|
-
$primary: map.get($theme, theme);
|
|
98
|
-
$background: map.get($theme, background);
|
|
99
|
-
|
|
100
59
|
$button: map.get(map.get($theme, components), button);
|
|
101
60
|
|
|
102
61
|
.kbq-button-overlay {
|
|
@@ -109,43 +68,31 @@
|
|
|
109
68
|
|
|
110
69
|
&.kbq-button_filled {
|
|
111
70
|
&.kbq-contrast {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
@include kbq-filled-button($filled-contrast);
|
|
71
|
+
@include kbq-button-type($button, filled, contrast-fade-off);
|
|
115
72
|
}
|
|
116
73
|
|
|
117
74
|
&.kbq-contrast-fade {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
@include kbq-filled-button($filled-fade-contrast);
|
|
75
|
+
@include kbq-button-type($button, filled, contrast-fade-on);
|
|
121
76
|
}
|
|
122
77
|
}
|
|
123
78
|
|
|
124
79
|
&.kbq-button_outline {
|
|
125
80
|
&.kbq-theme-fade {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
@include kbq-outline-button($outline-theme-fade-on);
|
|
81
|
+
@include kbq-button-type($button, outline, theme-fade-on);
|
|
129
82
|
}
|
|
130
83
|
|
|
131
84
|
&.kbq-contrast-fade {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
@include kbq-outline-button($outline-contrast-fade-on);
|
|
85
|
+
@include kbq-button-type($button, outline, contrast-fade-on);
|
|
135
86
|
}
|
|
136
87
|
}
|
|
137
88
|
|
|
138
89
|
&.kbq-button_transparent {
|
|
139
90
|
&.kbq-theme {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
@include kbq-transparent-button($transparent-theme);
|
|
91
|
+
@include kbq-button-type($button, transparent, theme);
|
|
143
92
|
}
|
|
144
93
|
|
|
145
94
|
&.kbq-contrast {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
@include kbq-transparent-button($transparent-contrast);
|
|
95
|
+
@include kbq-button-type($button, transparent, contrast);
|
|
149
96
|
}
|
|
150
97
|
}
|
|
151
98
|
|
|
@@ -160,11 +107,9 @@
|
|
|
160
107
|
}
|
|
161
108
|
|
|
162
109
|
@mixin kbq-button-typography($config) {
|
|
163
|
-
$tokens: map.get($config, tokens);
|
|
164
|
-
|
|
165
110
|
.kbq-button,
|
|
166
111
|
.kbq-button-icon {
|
|
167
|
-
@include kbq-typography-
|
|
112
|
+
@include kbq-typography-css-variables(button, default);
|
|
168
113
|
}
|
|
169
114
|
|
|
170
115
|
.kbq-button-icon.kbq-button-wrapper {
|
|
@@ -173,4 +118,3 @@
|
|
|
173
118
|
}
|
|
174
119
|
}
|
|
175
120
|
}
|
|
176
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
2
|
import { ChangeDetectorRef, ElementRef, OnDestroy, Renderer2, QueryList, AfterContentInit } from '@angular/core';
|
|
3
|
-
import { CanColor, CanDisable, CanColorCtor, HasTabIndexCtor } from '@koobiq/components/core';
|
|
3
|
+
import { CanColor, CanDisable, CanColorCtor, HasTabIndexCtor, KbqTitleTextRef } from '@koobiq/components/core';
|
|
4
4
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare enum KbqButtonStyles {
|
|
@@ -32,10 +32,11 @@ export declare class KbqButtonBase {
|
|
|
32
32
|
}
|
|
33
33
|
/** @docs-private */
|
|
34
34
|
export declare const KbqButtonMixinBase: HasTabIndexCtor & CanColorCtor & typeof KbqButtonBase;
|
|
35
|
-
export declare class KbqButton extends KbqButtonMixinBase implements OnDestroy, CanDisable, CanColor {
|
|
35
|
+
export declare class KbqButton extends KbqButtonMixinBase implements OnDestroy, CanDisable, CanColor, KbqTitleTextRef {
|
|
36
36
|
private focusMonitor;
|
|
37
37
|
private styler;
|
|
38
38
|
hasFocus: boolean;
|
|
39
|
+
textElement: ElementRef;
|
|
39
40
|
get kbqStyle(): string;
|
|
40
41
|
set kbqStyle(value: string | KbqButtonStyles);
|
|
41
42
|
private _kbqStyle;
|
package/button/button.scss
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use 'button-base' as *;
|
|
5
5
|
|
|
6
6
|
@use '../core/styles/tokens';
|
|
7
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
$tokens: meta.module-variables(tokens) !default;
|
|
@@ -13,22 +14,18 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
13
14
|
|
|
14
15
|
// base padding + compensation (4px) - border-width (2px)
|
|
15
16
|
padding-left: calc(
|
|
16
|
-
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
|
|
17
|
-
4px -
|
|
18
|
-
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
17
|
+
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) + 4px
|
|
19
18
|
);
|
|
20
19
|
padding-right: calc(
|
|
21
|
-
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
|
|
22
|
-
4px -
|
|
23
|
-
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
20
|
+
var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) + 4px
|
|
24
21
|
);
|
|
25
22
|
|
|
26
23
|
&.kbq-button-icon_left {
|
|
27
|
-
padding-left:
|
|
24
|
+
padding-left: kbq-css-variable(button-size-horizontal-padding);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
&.kbq-button-icon_right {
|
|
31
|
-
padding-right:
|
|
28
|
+
padding-right: kbq-css-variable(button-size-horizontal-padding);
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
|
|
@@ -39,15 +36,9 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
39
36
|
.kbq-button-icon {
|
|
40
37
|
@extend %kbq-button-base;
|
|
41
38
|
|
|
42
|
-
padding-left:
|
|
43
|
-
var(--kbq-button-icon-size-horizontal-padding, map.get($tokens, button-icon-size-horizontal-padding)) -
|
|
44
|
-
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
45
|
-
);
|
|
39
|
+
padding-left: kbq-css-variable(button-icon-size-horizontal-padding);
|
|
46
40
|
|
|
47
|
-
padding-right:
|
|
48
|
-
var(--kbq-button-icon-size-horizontal-padding, map.get($tokens, button-icon-size-horizontal-padding)) -
|
|
49
|
-
var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
|
|
50
|
-
);
|
|
41
|
+
padding-right: kbq-css-variable(button-icon-size-horizontal-padding);
|
|
51
42
|
}
|
|
52
43
|
|
|
53
44
|
.kbq-button-overlay {
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/typography/typography-utils' as *;
|
|
5
5
|
|
|
6
|
-
@use '../core/styles/tokens'
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
$
|
|
9
|
+
@mixin kbq-button-toggle-state($component, $state-name) {
|
|
10
|
+
$state: map.get($component, $state-name);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
background: map.get($state, background);
|
|
12
|
+
background: kbq-css-variable(button-toggle-item-#{$state-name}-background, map.get($state, background));
|
|
13
13
|
|
|
14
|
-
color: map.get($state, text);
|
|
14
|
+
color: kbq-css-variable(button-toggle-item-#{$state-name}-text, map.get($state, text));
|
|
15
15
|
|
|
16
16
|
& .kbq-icon {
|
|
17
|
-
color: map.get($state, icon);
|
|
17
|
+
color: kbq-css-variable(button-toggle-item-#{$state-name}-icon, map.get($state, icon));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -22,43 +22,43 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
22
22
|
$button-toggle: map.get(map.get($theme, components), button-toggle);
|
|
23
23
|
|
|
24
24
|
.kbq-button-toggle-group {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
background: kbq-css-variable(
|
|
26
|
+
button-toggle-container-background, map.get($button-toggle, container, background)
|
|
27
|
+
);
|
|
28
28
|
|
|
29
29
|
.kbq-button-toggle {
|
|
30
30
|
$button: map.get($button-toggle, item);
|
|
31
31
|
|
|
32
32
|
& > .kbq-button,
|
|
33
33
|
& > .kbq-icon-button {
|
|
34
|
-
@include kbq-button-toggle-
|
|
34
|
+
@include kbq-button-toggle-state($button, default);
|
|
35
35
|
|
|
36
36
|
&:hover:not(.kbq-disabled) {
|
|
37
|
-
@include kbq-button-toggle-
|
|
37
|
+
@include kbq-button-toggle-state($button, states-hover);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:active:not(.kbq-disabled) {
|
|
41
|
-
@include kbq-button-toggle-
|
|
41
|
+
@include kbq-button-toggle-state($button, states-active);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&.kbq-selected:not(.kbq-disabled) {
|
|
45
|
-
@include kbq-button-toggle-
|
|
45
|
+
@include kbq-button-toggle-state($button, states-selected);
|
|
46
46
|
|
|
47
47
|
&:hover {
|
|
48
|
-
@include kbq-button-toggle-
|
|
48
|
+
@include kbq-button-toggle-state($button, states-selected-hover);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&:active {
|
|
52
|
-
@include kbq-button-toggle-
|
|
52
|
+
@include kbq-button-toggle-state($button, states-selected-active);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&.kbq-disabled {
|
|
57
|
-
@include kbq-button-toggle-
|
|
57
|
+
@include kbq-button-toggle-state($button, states-disabled);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&.kbq-disabled.kbq-selected {
|
|
61
|
-
@include kbq-button-toggle-
|
|
61
|
+
@include kbq-button-toggle-state($button, states-selected-disabled);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&.cdk-keyboard-focused {
|
|
@@ -71,7 +71,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
71
71
|
|
|
72
72
|
@mixin kbq-button-toggle-typography($config) {
|
|
73
73
|
.kbq-button-toggle .kbq-button-toggle-wrapper {
|
|
74
|
-
@include kbq-typography-
|
|
74
|
+
@include kbq-typography-css-variables(button-toggle, item);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use '../core/styles/common';
|
|
5
5
|
|
|
6
6
|
@use '../core/styles/tokens';
|
|
7
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
$tokens: meta.module-variables(tokens) !default;
|
|
@@ -14,25 +15,13 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
14
15
|
flex-direction: row;
|
|
15
16
|
align-items: center;
|
|
16
17
|
|
|
17
|
-
gap:
|
|
18
|
-
--kbq-button-toggle-size-container-content-gap-horizontal,
|
|
19
|
-
map.get($tokens, button-toggle-size-container-content-gap-horizontal)
|
|
20
|
-
);
|
|
18
|
+
gap: kbq-css-variable(button-toggle-size-container-content-gap-horizontal);
|
|
21
19
|
|
|
22
|
-
border-radius:
|
|
23
|
-
--kbq-button-toggle-size-container-border-radius,
|
|
24
|
-
map.get($tokens, button-toggle-size-container-border-radius)
|
|
25
|
-
);
|
|
20
|
+
border-radius: kbq-css-variable(button-toggle-size-container-border-radius);
|
|
26
21
|
|
|
27
22
|
padding:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
map.get($tokens, button-toggle-size-container-padding-vertical)
|
|
31
|
-
)
|
|
32
|
-
var(
|
|
33
|
-
--kbq-button-toggle-size-container-padding-horizontal,
|
|
34
|
-
map.get($tokens, button-toggle-size-container-padding-horizontal)
|
|
35
|
-
);
|
|
23
|
+
kbq-css-variable(button-toggle-size-container-padding-vertical)
|
|
24
|
+
kbq-css-variable(button-toggle-size-container-padding-horizontal);
|
|
36
25
|
|
|
37
26
|
.kbq-button-toggle {
|
|
38
27
|
display: flex;
|
|
@@ -43,17 +32,11 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
43
32
|
$padding-horizontal: map.get($tokens, button-toggle-size-item-padding-horizontal);
|
|
44
33
|
$outline-width: map.get($tokens, button-toggle-size-item-focus-outline-width);
|
|
45
34
|
|
|
46
|
-
border-radius:
|
|
47
|
-
--kbq-button-toggle-size-item-border-radius,
|
|
48
|
-
map.get($tokens, button-toggle-size-item-border-radius)
|
|
49
|
-
);
|
|
35
|
+
border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
|
|
50
36
|
|
|
51
37
|
> .kbq-button,
|
|
52
38
|
> .kbq-button-icon {
|
|
53
|
-
border-radius:
|
|
54
|
-
--kbq-button-toggle-size-item-border-radius,
|
|
55
|
-
map.get($tokens, button-toggle-size-item-border-radius)
|
|
56
|
-
);
|
|
39
|
+
border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
|
|
57
40
|
|
|
58
41
|
padding:
|
|
59
42
|
calc(var(--kbq-button-toggle-size-item-padding-vertical, $padding-vertical) - $outline-width)
|
|
@@ -73,10 +56,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
73
56
|
|
|
74
57
|
width: 100%;
|
|
75
58
|
|
|
76
|
-
gap:
|
|
77
|
-
--kbq-button-toggle-size-item-content-gap-horizontal,
|
|
78
|
-
map.get($tokens, button-toggle-size-item-content-gap-horizontal)
|
|
79
|
-
);
|
|
59
|
+
gap: kbq-css-variable(button-toggle-size-item-content-gap-horizontal);
|
|
80
60
|
}
|
|
81
61
|
}
|
|
82
62
|
}
|
|
@@ -105,10 +85,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
105
85
|
> .kbq-button-icon {
|
|
106
86
|
width: 100%;
|
|
107
87
|
|
|
108
|
-
border-radius:
|
|
109
|
-
--kbq-button-toggle-size-item-border-radius,
|
|
110
|
-
map.get($tokens, button-toggle-size-item-border-radius)
|
|
111
|
-
);
|
|
88
|
+
border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
|
|
112
89
|
}
|
|
113
90
|
}
|
|
114
91
|
}
|
package/card/_card-theme.scss
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
|
|
3
|
+
@use '../core/styles/common/tokens' as *;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@mixin kbq-card-style($component, $style-name) {
|
|
7
|
+
$style: map.get($component, $style-name);
|
|
3
8
|
|
|
4
|
-
@mixin kbq-card-type($card) {
|
|
5
9
|
box-shadow:
|
|
6
|
-
inset -1px 0 0 0 map.get($
|
|
7
|
-
inset 0 1px 0 0 map.get($
|
|
8
|
-
inset 0 -1px 0 0 map.get($
|
|
10
|
+
inset -1px 0 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
|
|
11
|
+
inset 0 1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
|
|
12
|
+
inset 0 -1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow));
|
|
9
13
|
|
|
10
|
-
background-color: map.get($
|
|
14
|
+
background-color: kbq-css-variable(card-#{$style-name}-background, map.get($style, background));
|
|
11
15
|
|
|
12
|
-
border-left-color: map.get($
|
|
16
|
+
border-left-color: kbq-css-variable(card-#{$style-name}-vertical-line, map.get($style, vertical-line));
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
@mixin kbq-card-theme($theme) {
|
|
@@ -19,43 +23,41 @@
|
|
|
19
23
|
$card: map.get(map.get($theme, components), card);
|
|
20
24
|
$popup: map.get(map.get($theme, components), popup);
|
|
21
25
|
|
|
22
|
-
$is-dark: map.get($theme, is-dark);
|
|
23
|
-
|
|
24
26
|
.kbq-card {
|
|
25
|
-
color: map.get($foreground, contrast);
|
|
27
|
+
color: kbq-css-variable(foreground-contrast, map.get($foreground, contrast));
|
|
26
28
|
|
|
27
29
|
&.kbq-card_error {
|
|
28
|
-
@include kbq-card-
|
|
30
|
+
@include kbq-card-style($card, error);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
&.kbq-card_warning {
|
|
32
|
-
@include kbq-card-
|
|
34
|
+
@include kbq-card-style($card, warning);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
&.kbq-card_success {
|
|
36
|
-
@include kbq-card-
|
|
38
|
+
@include kbq-card-style($card, success);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
&.kbq-card_info {
|
|
40
|
-
@include kbq-card-
|
|
42
|
+
@include kbq-card-style($card, info);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
&.kbq-card_white {
|
|
44
|
-
background-color: map.get($popup, background);
|
|
46
|
+
background-color: kbq-css-variable(popup-background, map.get($popup, background));
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
&.kbq-selected {
|
|
48
|
-
background-color:
|
|
50
|
+
background-color: kbq-css-variable(states-selected-color, map.get($theme, states, selected-color));
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
&:not(.kbq-card_readonly):hover {
|
|
52
54
|
.kbq-card__overlay {
|
|
53
|
-
background: map.get($background, overlay-hover);
|
|
55
|
+
background: kbq-css-variable(background-overlay-hover, map.get($background, overlay-hover));
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
&.cdk-keyboard-focused {
|
|
58
|
-
box-shadow: 0 0 0 2px
|
|
60
|
+
box-shadow: 0 0 0 2px kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
}
|
package/card/card.component.scss
CHANGED
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../core/styles/common/layout';
|
|
5
5
|
|
|
6
|
-
@use '../core/styles/tokens'
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
$tokens: meta.module-variables(tokens) !default;
|
|
10
|
-
|
|
11
9
|
.kbq-card {
|
|
12
10
|
position: relative;
|
|
13
11
|
box-sizing: border-box;
|
|
@@ -22,7 +20,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
border-left: {
|
|
25
|
-
width:
|
|
23
|
+
width: kbq-css-variable(card-size-vertical-line);
|
|
26
24
|
style: solid;
|
|
27
25
|
color: transparent;
|
|
28
26
|
};
|