@koobiq/components 21.0.1 → 21.1.0
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/badge/_badge-theme.scss +31 -0
- package/breadcrumbs/breadcrumbs.scss +5 -1
- package/checkbox/_checkbox-theme.scss +0 -17
- package/checkbox/checkbox-tokens.scss +0 -4
- package/code-block/_code-block-theme.scss +7 -6
- package/code-block/code-block-tokens.scss +8 -4
- package/code-block/code-block.scss +54 -32
- package/content-panel/content-panel-header.scss +2 -3
- package/content-panel/content-panel.scss +3 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox-tokens.scss +0 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -2
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
- package/fesm2022/koobiq-components-app-switcher.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-breadcrumbs.mjs +2 -2
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +18 -8
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +78 -10
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +63 -379
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +4 -4
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +300 -37
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +151 -60
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +3 -3
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +3 -3
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +17 -8
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +115 -36
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +3 -3
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +90 -27
- 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-inline-edit.mjs +19 -2
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +76 -17
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +1 -1
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +3 -3
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +86 -25
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +4 -4
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +116 -38
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +86 -7
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +41 -19
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +29 -17
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +49 -12
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +198 -186
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +49 -25
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +30 -11
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +28 -11
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +2 -2
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +71 -16
- 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-toast.mjs +2 -2
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +25 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +90 -17
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +27 -7
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +4 -4
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +71 -27
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +0 -12
- package/file-upload/file-upload-tokens.scss +0 -1
- package/file-upload/file-upload.scss +0 -1
- package/filter-bar/_filter-bar-theme.scss +7 -8
- package/filter-bar/filter-bar.scss +0 -1
- package/filter-bar/pipes/base-pipe.scss +36 -2
- package/filter-bar/pipes/pipe-multi-tree-select.scss +27 -0
- package/form-field/_fieldset-theme.scss +2 -7
- package/form-field/_form-field-theme.scss +9 -22
- package/form-field/_hint-theme.scss +20 -0
- package/form-field/fieldset-tokens.scss +0 -1
- package/form-field/fieldset.scss +0 -3
- package/form-field/form-field-tokens.scss +1 -1
- package/form-field/form-field.scss +9 -0
- package/form-field/hint-tokens.scss +3 -0
- package/modal/modal.scss +2 -0
- package/navbar/_navbar-item_vertical.scss +48 -2
- package/navbar/_navbar-theme.scss +11 -3
- package/navbar/navbar-item.scss +17 -0
- package/navbar/navbar-tokens.scss +3 -0
- package/package.json +4 -4
- package/popover/popover.scss +1 -1
- package/radio/_radio-theme.scss +0 -30
- package/radio/radio-tokens.scss +0 -2
- package/schematics/migrations/deprecated-icons/README.md +21 -5
- package/schematics/migrations/deprecated-icons/index.cjs +8 -22
- package/schematics/migrations/deprecated-icons/schema.json +1 -1
- package/schematics/migrations/icons-replacement/README.md +16 -2
- package/schematics/migrations/icons-replacement/index.cjs +18 -16
- package/schematics/migrations/icons-replacement/schema.json +12 -3
- package/schematics/migrations/new-icons-pack/README.md +37 -25
- package/schematics/migrations/new-icons-pack/index.cjs +22 -32
- package/schematics/migrations/new-icons-pack/replacement.json +2 -14
- package/schematics/migrations/new-icons-pack/schema.json +3 -3
- package/schematics/ng-add/index.cjs +4 -4
- package/schematics/utils/custom-data.cjs +64 -0
- package/schematics/utils/icon-migration.cjs +9 -3
- package/schematics/utils/messages.cjs +4 -0
- package/schematics/utils/package-config.cjs +19 -0
- package/select/select.scss +7 -0
- package/tabs/_tabs-common.scss +23 -0
- package/textarea/textarea-tokens.scss +4 -1
- package/toast/toast.component.scss +1 -0
- package/toggle/_toggle-theme.scss +0 -17
- package/tooltip/tooltip.scss +1 -1
- package/top-bar/top-bar-tokens.scss +1 -0
- package/top-bar/top-bar.scss +10 -0
- package/types/koobiq-components-accordion.d.ts +25 -0
- package/types/koobiq-components-button-toggle.d.ts +6 -0
- package/types/koobiq-components-checkbox.d.ts +30 -0
- package/types/koobiq-components-clamped-text.d.ts +16 -3
- package/types/koobiq-components-code-block.d.ts +17 -3
- package/types/koobiq-components-core.d.ts +226 -13
- package/types/koobiq-components-datepicker.d.ts +28 -1
- package/types/koobiq-components-divider.d.ts +28 -10
- package/types/koobiq-components-dropdown.d.ts +19 -0
- package/types/koobiq-components-filter-bar.d.ts +77 -4
- package/types/koobiq-components-flag.d.ts +18 -0
- package/types/koobiq-components-form-field.d.ts +87 -6
- package/types/koobiq-components-icon.d.ts +15 -0
- package/types/koobiq-components-inline-edit.d.ts +8 -1
- package/types/koobiq-components-input.d.ts +22 -3
- package/types/koobiq-components-list.d.ts +6 -0
- package/types/koobiq-components-modal.d.ts +7 -0
- package/types/koobiq-components-navbar.d.ts +71 -7
- package/types/koobiq-components-notification-center.d.ts +13 -0
- package/types/koobiq-components-overflow-items.d.ts +26 -2
- package/types/koobiq-components-popover.d.ts +38 -3
- package/types/koobiq-components-radio.d.ts +30 -0
- package/types/koobiq-components-search-expandable.d.ts +10 -0
- package/types/koobiq-components-select.d.ts +36 -4
- package/types/koobiq-components-sidepanel.d.ts +52 -1
- package/types/koobiq-components-splitter.d.ts +13 -4
- package/types/koobiq-components-tabs.d.ts +4 -0
- package/types/koobiq-components-tags.d.ts +6 -0
- package/types/koobiq-components-textarea.d.ts +9 -2
- package/types/koobiq-components-timepicker.d.ts +15 -0
- package/types/koobiq-components-toggle.d.ts +30 -0
- package/types/koobiq-components-tooltip.d.ts +55 -10
- package/types/koobiq-components-top-bar.d.ts +11 -3
- package/types/koobiq-components-tree-select.d.ts +12 -0
- package/types/koobiq-components-tree.d.ts +37 -2
package/badge/_badge-theme.scss
CHANGED
|
@@ -95,6 +95,35 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
// Blink rounds the font metrics and the half-leading of a line, so under a fractional page zoom a label centred as a
|
|
99
|
+
// line box sits up to a device pixel above the middle. Baseline alignment leaves the line box out of it: the empty
|
|
100
|
+
// `::before` puts the baseline half a cap height below the middle of the badge, which centres the capitals.
|
|
101
|
+
// Goes last in `kbq-badge-typography()`, whose line height it replaces.
|
|
102
|
+
@mixin _kbq-badge-label-alignment() {
|
|
103
|
+
@supports (height: 1cap) {
|
|
104
|
+
.kbq-badge {
|
|
105
|
+
align-items: baseline;
|
|
106
|
+
// A flex line starts at the item with the longest way to its baseline. In the content box of an outlined
|
|
107
|
+
// badge a 16px line would take that place from `::before` and push the label down.
|
|
108
|
+
line-height: 1;
|
|
109
|
+
|
|
110
|
+
&::before {
|
|
111
|
+
content: '';
|
|
112
|
+
|
|
113
|
+
height: calc(50% + 0.5cap);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
& > .kbq-icon {
|
|
117
|
+
align-self: center;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
& .kbq-badge-caption {
|
|
121
|
+
line-height: 1;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
98
127
|
@mixin kbq-badge-typography() {
|
|
99
128
|
.kbq-badge {
|
|
100
129
|
@include kbq-typography-level-to-styles-css-variables(typography, text-normal-medium);
|
|
@@ -111,4 +140,6 @@
|
|
|
111
140
|
@include kbq-typography-level-to-styles-css-variables(typography, text-compact);
|
|
112
141
|
}
|
|
113
142
|
}
|
|
143
|
+
|
|
144
|
+
@include _kbq-badge-label-alignment();
|
|
114
145
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
.kbq-overflow-items {
|
|
18
18
|
// add space not to cut focus outline
|
|
19
19
|
padding: 1px;
|
|
20
|
+
margin: -1px;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// `display: contents` would keep the list's items as the host's direct flex children, but it also
|
|
@@ -40,10 +41,13 @@
|
|
|
40
41
|
// flex algorithm hands it, so the trail stops being squeezed and `KbqOverflowItems` — which
|
|
41
42
|
// measures its own box — concludes that every item fits and collapses nothing.
|
|
42
43
|
&.kbq-breadcrumbs_first-item-negative-margin {
|
|
43
|
-
.kbq-overflow-items,
|
|
44
44
|
.kbq-breadcrumbs__list {
|
|
45
45
|
margin-left: var(--kbq-breadcrumb-item-negative-margin);
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
.kbq-overflow-items {
|
|
49
|
+
margin-left: calc(var(--kbq-breadcrumb-item-negative-margin) - 1px);
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
&.kbq-breadcrumbs_wrap {
|
|
@@ -17,11 +17,6 @@
|
|
|
17
17
|
color: var(--kbq-#{$base}-default-text);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
// A projected `kbq-error` is a hint too, and keeps its own color. `:where` leaves the specificity as it was.
|
|
21
|
-
& .kbq-hint:where(:not(.kbq-error)) .kbq-hint__text {
|
|
22
|
-
color: var(--kbq-#{$base}-default-caption);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
20
|
&:hover,
|
|
26
21
|
&.kbq-hover {
|
|
27
22
|
.kbq-checkbox__frame {
|
|
@@ -76,10 +71,6 @@
|
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
73
|
|
|
79
|
-
& .kbq-hint .kbq-hint__text {
|
|
80
|
-
color: var(--kbq-#{$base}-states-disabled-caption);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
74
|
.kbq-checkbox-label {
|
|
84
75
|
color: var(--kbq-#{$base}-states-disabled-text);
|
|
85
76
|
}
|
|
@@ -100,17 +91,9 @@
|
|
|
100
91
|
@mixin kbq-checkbox-typography() {
|
|
101
92
|
.kbq-checkbox {
|
|
102
93
|
@include kbq-typography-level-to-styles-css-variables(typography, text-normal);
|
|
103
|
-
|
|
104
|
-
& .kbq-hint .kbq-hint__text {
|
|
105
|
-
@include kbq-typography-level-to-styles-css-variables(typography, text-compact);
|
|
106
|
-
}
|
|
107
94
|
}
|
|
108
95
|
|
|
109
96
|
.kbq-checkbox.kbq-checkbox_big {
|
|
110
97
|
@include kbq-typography-level-to-styles-css-variables(typography, text-big);
|
|
111
|
-
|
|
112
|
-
& .kbq-hint .kbq-hint__text {
|
|
113
|
-
@include kbq-typography-level-to-styles-css-variables(typography, text-normal);
|
|
114
|
-
}
|
|
115
98
|
}
|
|
116
99
|
}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
--kbq-checkbox-theme-default-color: var(--kbq-icon-white);
|
|
17
17
|
--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);
|
|
18
18
|
--kbq-checkbox-theme-default-background: var(--kbq-background-bg);
|
|
19
|
-
--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);
|
|
20
19
|
--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);
|
|
21
20
|
--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);
|
|
22
21
|
--kbq-checkbox-theme-states-checked-border: transparent;
|
|
@@ -33,12 +32,10 @@
|
|
|
33
32
|
--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);
|
|
34
33
|
--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);
|
|
35
34
|
--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);
|
|
36
|
-
--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);
|
|
37
35
|
--kbq-checkbox-error-default-border: var(--kbq-line-error);
|
|
38
36
|
--kbq-checkbox-error-default-color: var(--kbq-icon-white);
|
|
39
37
|
--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);
|
|
40
38
|
--kbq-checkbox-error-default-background: var(--kbq-background-error-less);
|
|
41
|
-
--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);
|
|
42
39
|
--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);
|
|
43
40
|
--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);
|
|
44
41
|
--kbq-checkbox-error-states-checked-border: transparent;
|
|
@@ -55,5 +52,4 @@
|
|
|
55
52
|
--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);
|
|
56
53
|
--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);
|
|
57
54
|
--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);
|
|
58
|
-
--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled);
|
|
59
55
|
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
&.kbq-code-block_hide-tabs {
|
|
18
18
|
.kbq-code-block__actionbar {
|
|
19
|
+
background: var(--kbq-#{$base}-actionbar-plate-background);
|
|
20
|
+
|
|
19
21
|
.kbq-code-block__actionbar__button-stack {
|
|
20
22
|
border-color: var(--kbq-#{$base}-actionbar-border-color);
|
|
21
23
|
background: var(--kbq-#{$base}-actionbar-background);
|
|
@@ -24,17 +26,16 @@
|
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
.kbq-code-block__view-all {
|
|
27
|
-
.kbq-code-block__view-all__wrapper {
|
|
28
|
-
background: var(--kbq-#{$base}-collapse-button-expand-background);
|
|
29
|
-
opacity: 90%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
29
|
&.kbq-code-block__view-all_expanded {
|
|
33
30
|
background: var(--kbq-#{$base}-collapse-expanded-background);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
&.kbq-code-block__view-all_collapsed {
|
|
37
34
|
background: var(--kbq-#{$base}-collapse-collapsed-background);
|
|
35
|
+
|
|
36
|
+
.kbq-code-block__view-all__wrapper {
|
|
37
|
+
background: color-mix(in srgb, var(--kbq-#{$base}-collapse-button-expand-background) 90%, transparent);
|
|
38
|
+
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -300,7 +301,7 @@
|
|
|
300
301
|
color: kbq-code-block-hljs-attr(variable-language-color);
|
|
301
302
|
}
|
|
302
303
|
|
|
303
|
-
.
|
|
304
|
+
.kbq-code-block__line::before {
|
|
304
305
|
color: kbq-code-block-hljs-attr(line-numbers-color);
|
|
305
306
|
}
|
|
306
307
|
|
|
@@ -21,24 +21,28 @@
|
|
|
21
21
|
--kbq-code-block-filled-header-background: transparent;
|
|
22
22
|
--kbq-code-block-filled-actionbar-background: var(--kbq-background-card);
|
|
23
23
|
--kbq-code-block-filled-actionbar-border-color: var(--kbq-line-contrast-less);
|
|
24
|
+
// The translucent container background cannot hide the code under the actionbar plate and the collapse fade:
|
|
25
|
+
// `bg-tertiary` is how the container looks over the page background.
|
|
26
|
+
--kbq-code-block-filled-actionbar-plate-background: var(--kbq-background-bg-tertiary);
|
|
24
27
|
--kbq-code-block-filled-collapse-expanded-background: transparent;
|
|
25
28
|
--kbq-code-block-filled-collapse-collapsed-background: linear-gradient(
|
|
26
29
|
180deg,
|
|
27
30
|
transparent,
|
|
28
|
-
var(--kbq-background-bg-
|
|
31
|
+
var(--kbq-background-bg-tertiary) 100%
|
|
29
32
|
);
|
|
30
|
-
--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-
|
|
33
|
+
--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-tertiary);
|
|
31
34
|
--kbq-code-block-outline-container-background: var(--kbq-background-card);
|
|
32
35
|
--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));
|
|
33
36
|
--kbq-code-block-outline-header-background: var(--kbq-background-card);
|
|
34
37
|
--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);
|
|
35
38
|
--kbq-code-block-outline-actionbar-border-color: var(--kbq-line-contrast-less);
|
|
39
|
+
--kbq-code-block-outline-actionbar-plate-background: var(--kbq-code-block-outline-container-background);
|
|
36
40
|
--kbq-code-block-outline-collapse-expanded-background: transparent;
|
|
37
41
|
--kbq-code-block-outline-collapse-collapsed-background: linear-gradient(
|
|
38
42
|
180deg,
|
|
39
43
|
transparent,
|
|
40
|
-
var(--kbq-background
|
|
44
|
+
var(--kbq-code-block-outline-container-background) 100%
|
|
41
45
|
);
|
|
42
|
-
--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-
|
|
46
|
+
--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-bg);
|
|
43
47
|
--kbq-code-block-tab-size: 4;
|
|
44
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use './code-block-theme' as theme;
|
|
2
|
-
@use '../core/styles/common/squircle'
|
|
2
|
+
@use '../core/styles/common/squircle';
|
|
3
3
|
|
|
4
4
|
.kbq-code-block {
|
|
5
5
|
display: flex;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
border-width: var(--kbq-code-block-size-container-border-width);
|
|
10
10
|
border-style: solid;
|
|
11
|
-
@include kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
11
|
+
@include squircle.kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
12
12
|
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
|
|
@@ -41,10 +41,14 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
// The expanded "view all" button lies over the end of the code, so the code makes room for the button and the
|
|
45
|
+
// spacing under it.
|
|
44
46
|
&:has(.kbq-code-block__view-all) {
|
|
45
47
|
.kbq-code-block__main {
|
|
46
48
|
.kbq-code-block__code {
|
|
47
|
-
padding-bottom:
|
|
49
|
+
padding-bottom: calc(
|
|
50
|
+
var(--kbq-size-3xl) + var(--kbq-code-block-size-collapse-expanded-padding-bottom)
|
|
51
|
+
) !important;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
}
|
|
@@ -53,7 +57,7 @@
|
|
|
53
57
|
flex-grow: 1;
|
|
54
58
|
flex-direction: column;
|
|
55
59
|
|
|
56
|
-
@include kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
60
|
+
@include squircle.kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
57
61
|
|
|
58
62
|
&.cdk-keyboard-focused {
|
|
59
63
|
outline-style: solid;
|
|
@@ -67,6 +71,8 @@
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
.kbq-code-block__code {
|
|
74
|
+
--kbq-code-block-line-numbers-gap: var(--kbq-code-block-size-with-header-content-content-gap-horizontal);
|
|
75
|
+
|
|
70
76
|
tab-size: var(--kbq-code-block-tab-size);
|
|
71
77
|
padding: var(--kbq-code-block-size-with-header-content-padding-top)
|
|
72
78
|
var(--kbq-code-block-size-with-header-content-padding-horizontal)
|
|
@@ -83,28 +89,40 @@
|
|
|
83
89
|
display: block;
|
|
84
90
|
}
|
|
85
91
|
|
|
86
|
-
.
|
|
87
|
-
|
|
88
|
-
vertical-align: baseline;
|
|
89
|
-
text-align: right;
|
|
92
|
+
.kbq-code-block__line {
|
|
93
|
+
display: block;
|
|
90
94
|
}
|
|
95
|
+
}
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
// The numbers come from a counter, so they are neither selected nor copied with the code. A line is indented by
|
|
98
|
+
// the column of numbers and its first line outdented back, so that a wrapped line goes on under the code rather
|
|
99
|
+
// than under its number.
|
|
100
|
+
&:not(.kbq-code-block_hide-line-numbers) .kbq-code-block__code_line-numbers {
|
|
101
|
+
--kbq-code-block-line-numbers-width: calc(var(--kbq-code-block-line-numbers-digits) * 1ch);
|
|
102
|
+
--kbq-code-block-line-numbers-indent: calc(
|
|
103
|
+
var(--kbq-code-block-line-numbers-width) + var(--kbq-code-block-line-numbers-gap)
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
counter-reset: kbq-code-block-line var(--kbq-code-block-line-numbers-start);
|
|
107
|
+
|
|
108
|
+
.kbq-code-block__line {
|
|
109
|
+
counter-increment: kbq-code-block-line;
|
|
110
|
+
padding-inline-start: var(--kbq-code-block-line-numbers-indent);
|
|
111
|
+
text-indent: calc(var(--kbq-code-block-line-numbers-indent) * -1);
|
|
112
|
+
|
|
113
|
+
&::before {
|
|
114
|
+
// The empty alternative text keeps the numbers from assistive technology.
|
|
115
|
+
content: counter(kbq-code-block-line) / '';
|
|
116
|
+
display: inline-block;
|
|
117
|
+
width: var(--kbq-code-block-line-numbers-width);
|
|
118
|
+
margin-inline-end: var(--kbq-code-block-line-numbers-gap);
|
|
119
|
+
text-align: end;
|
|
120
|
+
// Otherwise the number would take the outdent of its line.
|
|
121
|
+
text-indent: 0;
|
|
122
|
+
// Soft wrap would otherwise break a number that its column fits only to a fraction of a pixel.
|
|
123
|
+
white-space: nowrap;
|
|
98
124
|
}
|
|
99
125
|
}
|
|
100
|
-
|
|
101
|
-
.hljs-ln-n:before {
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.kbq-code-block_hide-line-numbers .hljs-ln-line.hljs-ln-numbers {
|
|
107
|
-
display: none;
|
|
108
126
|
}
|
|
109
127
|
|
|
110
128
|
&.kbq-code-block_soft-wrap {
|
|
@@ -138,6 +156,10 @@
|
|
|
138
156
|
}
|
|
139
157
|
|
|
140
158
|
&.kbq-code-block_hide-tabs {
|
|
159
|
+
// The actionbar reaches the right edge, over the top of the vertical scrollbar track. Isolated by the block
|
|
160
|
+
// rather than by the scrollport, the track's z-index keeps the track above the actionbar and inside the block.
|
|
161
|
+
isolation: isolate;
|
|
162
|
+
|
|
141
163
|
.kbq-code-block__header {
|
|
142
164
|
padding: 0;
|
|
143
165
|
}
|
|
@@ -147,26 +169,26 @@
|
|
|
147
169
|
position: absolute;
|
|
148
170
|
top: 0;
|
|
149
171
|
right: 0;
|
|
150
|
-
|
|
172
|
+
padding: var(--kbq-size-s) var(--kbq-size-s) 0 0;
|
|
173
|
+
@include squircle.kbq-squircle(var(--kbq-code-block-size-container-border-radius), border-top-right-radius);
|
|
151
174
|
|
|
152
175
|
.kbq-code-block__actionbar__button-stack {
|
|
153
176
|
border-width: 1px;
|
|
154
177
|
border-style: solid;
|
|
155
|
-
@include kbq-squircle(calc(var(--kbq-size-border-radius) + 1px));
|
|
178
|
+
@include squircle.kbq-squircle(calc(var(--kbq-size-border-radius) + 1px));
|
|
156
179
|
}
|
|
157
180
|
}
|
|
158
181
|
|
|
159
182
|
.kbq-code-block__main {
|
|
160
183
|
position: relative;
|
|
184
|
+
isolation: auto;
|
|
161
185
|
|
|
162
186
|
.kbq-code-block__code {
|
|
187
|
+
--kbq-code-block-line-numbers-gap: var(--kbq-code-block-size-no-header-content-content-gap-horizontal);
|
|
188
|
+
|
|
163
189
|
padding: var(--kbq-code-block-size-no-header-content-padding-vertical)
|
|
164
190
|
var(--kbq-code-block-size-no-header-content-padding-horizontal);
|
|
165
191
|
}
|
|
166
|
-
|
|
167
|
-
.hljs-ln-numbers {
|
|
168
|
-
padding-right: var(--kbq-code-block-size-no-header-content-content-gap-horizontal);
|
|
169
|
-
}
|
|
170
192
|
}
|
|
171
193
|
}
|
|
172
194
|
|
|
@@ -174,11 +196,11 @@
|
|
|
174
196
|
$radius: var(--kbq-code-block-size-container-border-radius);
|
|
175
197
|
|
|
176
198
|
.kbq-code-block__header {
|
|
177
|
-
@include kbq-squircle($radius $radius 0 0);
|
|
199
|
+
@include squircle.kbq-squircle($radius $radius 0 0);
|
|
178
200
|
}
|
|
179
201
|
|
|
180
202
|
.kbq-code-block__main {
|
|
181
|
-
@include kbq-squircle(0 0 $radius $radius);
|
|
203
|
+
@include squircle.kbq-squircle(0 0 $radius $radius);
|
|
182
204
|
}
|
|
183
205
|
}
|
|
184
206
|
|
|
@@ -200,10 +222,10 @@
|
|
|
200
222
|
position: absolute;
|
|
201
223
|
bottom: calc(var(--kbq-code-block-size-container-border-width) * -1);
|
|
202
224
|
|
|
203
|
-
@include kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
225
|
+
@include squircle.kbq-squircle(var(--kbq-code-block-size-container-border-radius));
|
|
204
226
|
|
|
205
227
|
.kbq-code-block__view-all__wrapper {
|
|
206
|
-
@include kbq-squircle(var(--kbq-size-border-radius));
|
|
228
|
+
@include squircle.kbq-squircle(var(--kbq-size-border-radius));
|
|
207
229
|
}
|
|
208
230
|
|
|
209
231
|
&.kbq-code-block__view-all_collapsed {
|
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
.kbq-content-panel-header__wrapper {
|
|
9
9
|
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
.kbq-content-panel-header__actions {
|
|
14
13
|
display: flex;
|
|
15
|
-
|
|
14
|
+
margin-inline-start: auto;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
.kbq-content-panel-header__close-button {
|
|
19
|
-
margin-
|
|
18
|
+
margin-inline-start: var(--kbq-size-m);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.kbq-content-panel-header-title {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
.kbq-content-panel {
|
|
4
4
|
display: flex;
|
|
5
|
+
flex-grow: 1;
|
|
6
|
+
min-width: 0;
|
|
5
7
|
@include kbq-squircle(var(--kbq-content-panel-border-radius));
|
|
6
8
|
background-color: var(--kbq-content-panel-background-color);
|
|
7
9
|
border: var(--kbq-content-panel-border);
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
display: flex;
|
|
14
16
|
flex: 1;
|
|
15
17
|
flex-direction: column;
|
|
18
|
+
min-width: 0;
|
|
16
19
|
@include kbq-squircle-inherit(border-top-right-radius border-bottom-right-radius);
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
--kbq-checkbox-theme-default-color: var(--kbq-icon-white);
|
|
17
17
|
--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);
|
|
18
18
|
--kbq-checkbox-theme-default-background: var(--kbq-background-bg);
|
|
19
|
-
--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);
|
|
20
19
|
--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);
|
|
21
20
|
--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);
|
|
22
21
|
--kbq-checkbox-theme-states-checked-border: transparent;
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
--kbq-checkbox-error-default-color: var(--kbq-icon-white);
|
|
39
38
|
--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);
|
|
40
39
|
--kbq-checkbox-error-default-background: var(--kbq-background-error-less);
|
|
41
|
-
--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);
|
|
42
40
|
--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);
|
|
43
41
|
--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);
|
|
44
42
|
--kbq-checkbox-error-states-checked-border: transparent;
|
|
@@ -31,7 +31,7 @@ class KbqAccordionContentDirective {
|
|
|
31
31
|
/**
|
|
32
32
|
* Value of `data-state`.
|
|
33
33
|
*
|
|
34
|
-
* @
|
|
34
|
+
* @docs-private
|
|
35
35
|
*/
|
|
36
36
|
this.dataState = computed(() => this.item.dataState, ...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
|
|
37
37
|
/** @docs-private */
|
|
@@ -186,13 +186,13 @@ class KbqAccordionTriggerDirective {
|
|
|
186
186
|
/**
|
|
187
187
|
* Value of `aria-expanded`.
|
|
188
188
|
*
|
|
189
|
-
* @
|
|
189
|
+
* @docs-private
|
|
190
190
|
*/
|
|
191
191
|
this.expanded = computed(() => this.item.expanded, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
192
192
|
/**
|
|
193
193
|
* Value of `data-state`.
|
|
194
194
|
*
|
|
195
|
-
* @
|
|
195
|
+
* @docs-private
|
|
196
196
|
*/
|
|
197
197
|
this.dataState = computed(() => this.item.dataState, ...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
|
|
198
198
|
}
|
|
@@ -950,7 +950,7 @@ class KbqAccordionHeader {
|
|
|
950
950
|
/**
|
|
951
951
|
* Value of `data-state`.
|
|
952
952
|
*
|
|
953
|
-
* @
|
|
953
|
+
* @docs-private
|
|
954
954
|
*/
|
|
955
955
|
this.dataState = computed(() => this.item.dataState, ...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
|
|
956
956
|
}
|