@koobiq/components 17.0.0-rc.6 → 17.0.0-rc.8
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 +49 -141
- 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 +18 -38
- 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 +14 -34
- 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 +23 -21
- 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/form-field/form-field-ref.d.ts +2 -0
- package/core/forms/_forms-theme.scss +4 -7
- package/core/forms/_forms.scss +13 -42
- package/core/locales/locale-service.d.ts +1 -0
- 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/select/common.d.ts +35 -0
- package/core/select/index.d.ts +1 -0
- 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 +5 -11
- package/dropdown/dropdown-trigger.directive.d.ts +2 -2
- package/dropdown/dropdown.scss +6 -14
- package/esm2022/alert/alert.component.mjs +2 -2
- 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 +2 -2
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/locales/locale-service.mjs +5 -2
- package/esm2022/core/option/option.mjs +2 -2
- package/esm2022/core/select/common.mjs +120 -0
- package/esm2022/core/select/index.mjs +2 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -4
- 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/form-field/hint.mjs +2 -2
- package/esm2022/form-field/password-hint.mjs +2 -2
- package/esm2022/icon/icon-item.component.mjs +16 -6
- package/esm2022/list/list-selection.component.mjs +2 -2
- package/esm2022/list/list.component.mjs +2 -2
- 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/radio/radio.component.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
- package/esm2022/select/select.component.mjs +18 -114
- package/esm2022/select/select.module.mjs +28 -28
- package/esm2022/table/table.component.mjs +2 -2
- package/esm2022/tabs/tab-group.component.mjs +54 -12
- 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 +2 -2
- package/esm2022/timepicker/timepicker.directive.mjs +10 -2
- package/esm2022/timezone/timezone-option.component.mjs +2 -2
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/title/title.directive.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +3 -3
- package/esm2022/toast/toast.service.mjs +17 -12
- package/esm2022/tooltip/tooltip.component.mjs +2 -2
- package/esm2022/tree/tree-option.component.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +9 -37
- package/esm2022/tree-select/tree-select.module.mjs +31 -11
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- 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 +4 -4
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +124 -7
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +5 -5
- 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 +6 -6
- 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-list.mjs +4 -4
- package/fesm2022/koobiq-components-list.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-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 +46 -142
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +2 -2
- package/fesm2022/koobiq-components-tabs.mjs +56 -14
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +20 -7
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +9 -1
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +6 -6
- 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 +19 -13
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +2 -2
- package/fesm2022/koobiq-components-tree-select.mjs +37 -44
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +2 -2
- package/fesm2022/koobiq-components-tree.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 +35 -99
- 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 +5 -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 +3 -5
- 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 +28 -28
- package/navbar/_navbar-item_vertical.scss +31 -30
- 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 +11 -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 +20 -39
- 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 +13 -20
- package/select/_select-theme.scss +14 -15
- package/select/select.component.d.ts +2 -32
- package/select/select.module.d.ts +1 -1
- 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.component.d.ts +9 -3
- 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-default-options.d.ts +1 -0
- package/tags/tag-input.d.ts +7 -1
- 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.d.ts +2 -1
- 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/toast/toast.service.d.ts +8 -4
- 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 +12 -14
- package/tree-select/tree-select.component.d.ts +4 -17
- package/tree-select/tree-select.module.d.ts +1 -2
- package/tree-select/tree-select.scss +1 -5
- package/core/styles/_variables.scss +0 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
4
|
@use '../tokens';
|
|
5
|
+
@use './tokens' as *;
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
// This mixin will ensure that lines that overflow the container will hide the overflow and
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
|
|
56
57
|
@include kbq-truncate-line();
|
|
57
58
|
|
|
58
|
-
padding-top:
|
|
59
|
-
padding-bottom:
|
|
59
|
+
padding-top: kbq-css-variable(list-size-text-padding-vertical);
|
|
60
|
+
padding-bottom: kbq-css-variable(list-size-text-padding-vertical);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
// This mixin provides all list-item styles, changing font size and height based on whether the list is in dense mode.
|
|
@@ -82,11 +83,9 @@
|
|
|
82
83
|
|
|
83
84
|
min-height: 32px;
|
|
84
85
|
|
|
85
|
-
gap:
|
|
86
|
-
--kbq-list-size-container-content-gap-horizontal, map.get($tokens, list-size-container-content-gap-horizontal)
|
|
87
|
-
);
|
|
86
|
+
gap: kbq-css-variable(list-size-container-content-gap-horizontal);
|
|
88
87
|
|
|
89
|
-
border-width:
|
|
88
|
+
border-width: kbq-css-variable(list-size-container-focus-outline-width);
|
|
90
89
|
border-style: solid;
|
|
91
90
|
border-color: transparent;
|
|
92
91
|
|
|
@@ -113,10 +112,7 @@
|
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
.kbq-list-option-caption {
|
|
116
|
-
padding-top:
|
|
117
|
-
--kbq-list-size-container-content-gap-vertical,
|
|
118
|
-
map.get($tokens, list-size-container-content-gap-vertical)
|
|
119
|
-
);
|
|
115
|
+
padding-top: kbq-css-variable(list-size-container-content-gap-vertical);
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
118
|
|
|
@@ -132,10 +128,10 @@
|
|
|
132
128
|
min-height: 32px;
|
|
133
129
|
|
|
134
130
|
padding:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
kbq-css-variable(list-size-header-padding-top)
|
|
132
|
+
kbq-css-variable(list-size-header-padding-horizontal)
|
|
133
|
+
kbq-css-variable(list-size-header-padding-bottom)
|
|
134
|
+
kbq-css-variable(list-size-header-padding-horizontal);
|
|
139
135
|
|
|
140
136
|
.kbq-list-text {
|
|
141
137
|
@include kbq-list-text();
|
|
@@ -154,10 +150,10 @@
|
|
|
154
150
|
min-height: 32px;
|
|
155
151
|
|
|
156
152
|
padding:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
kbq-css-variable(list-size-subheading-padding-top)
|
|
154
|
+
kbq-css-variable(list-size-subheading-padding-horizontal)
|
|
155
|
+
kbq-css-variable(list-size-subheading-padding-bottom)
|
|
156
|
+
kbq-css-variable(list-size-subheading-padding-horizontal);
|
|
161
157
|
|
|
162
158
|
.kbq-list-text {
|
|
163
159
|
@include kbq-list-text();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use './tokens' as *;
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
@mixin popup-params($theme) {
|
|
5
|
-
$popup: map.get(
|
|
6
|
+
$popup: map.get($theme, components, popup);
|
|
6
7
|
|
|
7
|
-
box-shadow: map.get($popup, shadow);
|
|
8
|
-
border-color: map.get($popup, border);
|
|
8
|
+
box-shadow: kbq-css-variable(popup-shadow, map.get($popup, shadow));
|
|
9
|
+
border-color: kbq-css-variable(popup-border, map.get($popup, border));
|
|
9
10
|
|
|
10
|
-
background-color: map.get($popup, background);
|
|
11
|
+
background-color: kbq-css-variable(popup-background, map.get($popup, background));
|
|
11
12
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../common/vendor-prefixes';
|
|
5
5
|
@use '../tokens';
|
|
6
|
+
@use './tokens' as *;
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
$tokens: meta.module-variables(tokens) !default;
|
|
@@ -116,11 +117,9 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
116
117
|
(var(--kbq-select-size-multiple-padding-vertical, $padding-vertical) * 2)
|
|
117
118
|
);
|
|
118
119
|
|
|
119
|
-
gap:
|
|
120
|
+
gap: kbq-css-variable(select-size-multiple-content-gap);
|
|
120
121
|
|
|
121
|
-
margin-right:
|
|
122
|
-
--kbq-select-size-multiple-content-gap, map.get($tokens, select-size-multiple-content-gap)
|
|
123
|
-
);
|
|
122
|
+
margin-right: kbq-css-variable(select-size-multiple-content-gap);
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
125
|
}
|
|
@@ -135,9 +134,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
135
134
|
flex: 0 0 70px;
|
|
136
135
|
align-self: center;
|
|
137
136
|
padding-left: 4px;
|
|
138
|
-
padding-right:
|
|
139
|
-
--kbq-select-size-multiple-content-gap, map.get($tokens, select-size-multiple-content-gap)
|
|
140
|
-
);
|
|
137
|
+
padding-right: kbq-css-variable(select-size-multiple-content-gap);
|
|
141
138
|
|
|
142
139
|
text-align: right;
|
|
143
140
|
}
|
|
@@ -175,9 +172,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
175
172
|
|
|
176
173
|
overflow: hidden;
|
|
177
174
|
|
|
178
|
-
border-radius:
|
|
179
|
-
--kbq-select-panel-size-border-radius, map.get($tokens, select-panel-size-border-radius)
|
|
180
|
-
);
|
|
175
|
+
border-radius: kbq-css-variable(select-panel-size-border-radius);
|
|
181
176
|
|
|
182
177
|
// Override optgroup and option to scale based on font-size of the trigger.
|
|
183
178
|
.kbq-optgroup-label,
|
|
@@ -194,15 +189,15 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
194
189
|
position: relative;
|
|
195
190
|
|
|
196
191
|
max-width: 100%;
|
|
197
|
-
height:
|
|
192
|
+
height: kbq-css-variable(option-size-height);
|
|
198
193
|
|
|
199
194
|
cursor: default;
|
|
200
195
|
outline: none;
|
|
201
196
|
|
|
202
|
-
padding-left:
|
|
203
|
-
padding-right:
|
|
197
|
+
padding-left: kbq-css-variable(option-size-horizontal-padding);
|
|
198
|
+
padding-right: kbq-css-variable(option-size-horizontal-padding);
|
|
204
199
|
|
|
205
|
-
border:
|
|
200
|
+
border: kbq-css-variable(option-size-border-width) solid transparent;
|
|
206
201
|
}
|
|
207
202
|
|
|
208
203
|
.kbq-select__search-container {
|
|
@@ -214,7 +209,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
214
209
|
}
|
|
215
210
|
|
|
216
211
|
%kbq-select-content {
|
|
217
|
-
max-height:
|
|
212
|
+
max-height: kbq-css-variable(select-panel-size-max-height);
|
|
218
213
|
padding: 4px 0;
|
|
219
214
|
overflow: hidden auto;
|
|
220
215
|
}
|
|
@@ -229,5 +224,5 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
229
224
|
border-top-width: 1px;
|
|
230
225
|
border-top-style: solid;
|
|
231
226
|
|
|
232
|
-
padding:
|
|
227
|
+
padding: kbq-css-variable(size-xxs) kbq-css-variable(size-m);
|
|
233
228
|
}
|
|
@@ -9,15 +9,9 @@
|
|
|
9
9
|
$tokens: meta.module-variables(tokens) !default;
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@function
|
|
13
|
-
@if
|
|
14
|
-
$
|
|
15
|
-
|
|
16
|
-
@each $part in string.split($name, '-light') {
|
|
17
|
-
$short-name: $short-name + $part;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@return var(--kbq-#{$short-name}, map.get($tokens, $name));
|
|
12
|
+
@function kbq-css-variable($name, $value: null) {
|
|
13
|
+
@if $value {
|
|
14
|
+
@return var(--kbq-#{$name}, $value);
|
|
21
15
|
} @else {
|
|
22
16
|
@return var(--kbq-#{$name}, map.get($tokens, $name));
|
|
23
17
|
}
|
|
@@ -26,3 +20,30 @@ $tokens: meta.module-variables(tokens) !default;
|
|
|
26
20
|
@function getToken($name) {
|
|
27
21
|
@return map.get($tokens, $name);
|
|
28
22
|
}
|
|
23
|
+
|
|
24
|
+
@mixin kbq-css-font-variable($component, $component-property, $font-property, $font) {
|
|
25
|
+
#{$font-property}: var(
|
|
26
|
+
--kbq-#{$component}-#{$font}#{$component-property}-#{$font-property},
|
|
27
|
+
map.get($tokens, #{$component}-#{$font}#{$component-property}-#{$font-property})
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin kbq-typography-css-variables($component, $property) {
|
|
32
|
+
@include kbq-css-font-variable($component, $property, font-size, font-);
|
|
33
|
+
@include kbq-css-font-variable($component, $property, font-weight, font-);
|
|
34
|
+
@include kbq-css-font-variable($component, $property, line-height, font-);
|
|
35
|
+
@include kbq-css-font-variable($component, $property, font-family, font-);
|
|
36
|
+
@include kbq-css-font-variable($component, $property, text-transform, font-);
|
|
37
|
+
@include kbq-css-font-variable($component, $property, font-feature-settings, font-);
|
|
38
|
+
@include kbq-css-font-variable($component, $property, letter-spacing, font-);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin kbq-typography-level-to-styles_css-variables($component, $property) {
|
|
42
|
+
@include kbq-css-font-variable($component, $property, font-size, '');
|
|
43
|
+
@include kbq-css-font-variable($component, $property, font-weight, '');
|
|
44
|
+
@include kbq-css-font-variable($component, $property, line-height, '');
|
|
45
|
+
@include kbq-css-font-variable($component, $property, font-family, '');
|
|
46
|
+
@include kbq-css-font-variable($component, $property, text-transform, '');
|
|
47
|
+
@include kbq-css-font-variable($component, $property, font-feature-settings, '');
|
|
48
|
+
@include kbq-css-font-variable($component, $property, letter-spacing, '');
|
|
49
|
+
}
|