@ptsecurity/mosaic 17.0.0 → 17.2.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/autocomplete/_autocomplete-theme.scss +2 -1
- package/autocomplete/autocomplete-trigger.directive.d.ts +7 -1
- package/autocomplete/autocomplete.scss +7 -11
- package/button/_button-base.scss +10 -10
- package/button/_button-theme.scss +32 -32
- package/button/button.scss +9 -15
- package/button-toggle/_button-toggle-theme.scss +32 -24
- package/button-toggle/button-toggle.scss +18 -57
- package/card/_card-theme.scss +23 -20
- package/card/card.component.scss +2 -1
- package/checkbox/_checkbox-theme.scss +33 -29
- package/checkbox/checkbox.scss +7 -6
- package/code-block/_code-block-theme.scss +201 -113
- package/code-block/actionbar.component.scss +5 -7
- package/code-block/code-block.scss +5 -6
- package/core/forms/_forms-theme.scss +17 -46
- package/core/option/_optgroup-theme.scss +5 -5
- package/core/option/_option-action-theme.scss +1 -4
- package/core/option/_option-theme.scss +8 -10
- package/core/option/option.scss +5 -4
- package/core/pop-up/pop-up-trigger.d.ts +3 -1
- package/core/styles/_mosaic-theme.scss +3 -3
- package/core/styles/common/_popup.scss +4 -3
- package/core/styles/common/_tokens.scss +39 -0
- package/core/styles/theming/_alerts.scss +16 -24
- package/core/styles/theming/_badges.scss +7 -8
- package/core/styles/theming/_components-theming.scss +4 -2
- package/core/styles/theming/_scrollbars.scss +17 -2
- package/datepicker/_datepicker-theme.scss +18 -19
- package/datepicker/calendar-body.scss +6 -9
- package/datepicker/calendar-header.scss +9 -26
- package/datepicker/calendar.scss +5 -16
- package/datepicker/datepicker-content.scss +2 -4
- package/datepicker/datepicker-input.scss +2 -1
- package/datepicker/datepicker-toggle.scss +3 -2
- package/divider/_divider-theme.scss +4 -2
- package/divider/divider.scss +5 -4
- package/dl/_dl-theme.scss +12 -36
- package/dl/dl.scss +13 -46
- package/dropdown/_dropdown-theme.scss +19 -17
- package/dropdown/dropdown-item.scss +7 -6
- package/dropdown/dropdown.scss +11 -26
- package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +14 -2
- package/esm2022/button/button.component.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/pop-up/pop-up-trigger.mjs +19 -11
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
- package/esm2022/file-upload/file-upload.module.mjs +8 -4
- package/esm2022/file-upload/multiple-file-upload.component.mjs +15 -34
- package/esm2022/file-upload/single-file-upload.component.mjs +15 -34
- package/esm2022/form-field/form-field.mjs +2 -2
- package/esm2022/input/input-password.mjs +2 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +2 -2
- package/esm2022/modal/modal.component.mjs +6 -6
- package/esm2022/navbar/navbar-item.component.mjs +9 -9
- package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +2 -2
- package/esm2022/select/select-option.directive.mjs +7 -5
- package/esm2022/select/select.component.mjs +16 -9
- 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-input.mjs +28 -8
- package/esm2022/timezone/timezone-option.directive.mjs +7 -5
- package/esm2022/timezone/timezone-select.component.mjs +2 -2
- package/esm2022/title/title.directive.mjs +2 -3
- package/esm2022/tooltip/tooltip.component.mjs +27 -12
- package/esm2022/tree-select/tree-select.component.mjs +21 -8
- package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +13 -1
- package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-code-block.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-core.mjs +19 -11
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-dropdown.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +5 -4
- package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs +26 -58
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-form-field.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-input.mjs +1 -2
- package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-markdown.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-markdown.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-modal.mjs +5 -5
- package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-navbar.mjs +8 -8
- package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-radio.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-radio.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-select.mjs +25 -17
- package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tabs.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tags.mjs +26 -7
- package/fesm2022/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-timezone.mjs +7 -6
- package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-title.mjs +1 -2
- package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tooltip.mjs +25 -11
- package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs +20 -7
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +87 -54
- package/file-upload/file-upload.module.d.ts +2 -1
- package/file-upload/file-upload.scss +0 -15
- package/file-upload/multiple-file-upload.component.d.ts +4 -12
- package/file-upload/multiple-file-upload.component.scss +58 -54
- package/file-upload/single-file-upload.component.d.ts +4 -12
- package/file-upload/single-file-upload.component.scss +15 -24
- package/form-field/_form-field-theme.scss +43 -34
- package/form-field/form-field.scss +14 -13
- package/icon/_icon-theme.scss +26 -25
- package/input/_input-base.scss +3 -2
- package/input/_input-theme.scss +14 -14
- package/input/input-password.d.ts +0 -1
- package/input/input.scss +3 -4
- package/link/_link-theme.scss +36 -32
- package/list/_list-base.scss +4 -3
- package/list/_list-theme.scss +8 -8
- package/list/list.scss +2 -1
- package/loader-overlay/_loader-overlay-theme.scss +8 -8
- package/loader-overlay/loader-overlay.scss +7 -12
- package/markdown/_markdown-theme.scss +61 -43
- package/markdown/markdown.scss +39 -80
- package/modal/_modal-confirm.scss +3 -2
- package/modal/_modal-theme.scss +20 -21
- package/modal/modal.scss +18 -15
- package/navbar/_navbar-theme.scss +19 -18
- package/navbar/navbar-brand.scss +7 -9
- package/navbar/navbar-item.component.d.ts +4 -4
- package/navbar/navbar-item.scss +8 -7
- package/navbar/vertical-navbar.scss +4 -12
- package/package.json +25 -25
- package/popover/_popover-theme.scss +35 -35
- package/popover/popover.scss +15 -14
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +6 -5
- package/progress-bar/progress-bar.scss +2 -1
- package/progress-spinner/_progress-spinner-theme.scss +4 -3
- package/progress-spinner/progress-spinner.scss +7 -12
- package/radio/_radio-theme.scss +32 -24
- package/radio/radio.scss +8 -11
- package/select/_select-theme.scss +13 -13
- package/select/select-option.directive.d.ts +3 -2
- package/select/select.component.d.ts +1 -0
- package/select/select.scss +19 -42
- package/sidepanel/_sidepanel-theme.scss +9 -9
- package/sidepanel/sidepanel.scss +11 -10
- package/splitter/_splitter-theme.scss +5 -3
- package/table/_table-theme.scss +9 -9
- package/table/table.scss +11 -14
- package/tabs/_tabs-common.scss +15 -14
- package/tabs/_tabs-theme.scss +67 -55
- package/tabs/tab-group.scss +2 -1
- package/tabs/tab-header.scss +16 -3
- package/tabs/tab-nav-bar/tab-nav-bar.scss +15 -2
- package/tags/_tag-theme.scss +30 -27
- package/tags/tag-input.d.ts +9 -4
- package/tags/tag-list.scss +4 -3
- package/tags/tag.scss +9 -8
- package/textarea/_textarea-base.scss +2 -4
- package/textarea/_textarea-theme.scss +8 -8
- package/textarea/textarea.scss +2 -4
- package/timepicker/timepicker.scss +2 -7
- package/timezone/_timezone-option-theme.scss +7 -7
- package/timezone/timezone-option.component.scss +5 -4
- package/timezone/timezone-option.directive.d.ts +3 -2
- package/title/title.directive.d.ts +0 -1
- package/toast/_toast-theme.scss +13 -16
- package/toast/toast-container.component.scss +2 -5
- package/toast/toast.component.scss +15 -17
- package/toggle/_toggle-theme.scss +22 -21
- package/toggle/toggle.scss +19 -21
- package/tooltip/_tooltip-theme.scss +26 -31
- package/tooltip/tooltip.component.d.ts +12 -8
- package/tooltip/tooltip.scss +13 -17
- package/tree/_tree-theme.scss +8 -8
- package/tree/toggle.scss +3 -5
- package/tree/tree-option.scss +5 -4
- package/tree-select/_tree-select-theme.scss +9 -9
- package/tree-select/tree-select.component.d.ts +1 -0
- package/tree-select/tree-select.scss +17 -35
- package/_theming.scss +0 -10827
- package/_visual.scss +0 -3541
- package/prebuilt-visual/default-visual.css +0 -1
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
@use '../core/styles/common/popup';
|
4
4
|
@use '../core/styles/theming/theming';
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
5
6
|
|
6
7
|
|
7
8
|
@mixin mc-autocomplete-theme($theme) {
|
@@ -15,7 +16,7 @@
|
|
15
16
|
.mc-selected {
|
16
17
|
$popup: map.get(map.get($theme, components), popup);
|
17
18
|
|
18
|
-
background-color: map
|
19
|
+
background-color: mc-css-variable(popup-background, map-get($popup, background));
|
19
20
|
}
|
20
21
|
}
|
21
22
|
}
|
@@ -90,6 +90,12 @@ export declare class McAutocompleteTrigger implements AfterViewInit, ControlValu
|
|
90
90
|
/** Stream of keyboard events that can close the panel. */
|
91
91
|
private readonly closeKeyEventStream;
|
92
92
|
constructor(elementRef: ElementRef<HTMLInputElement>, viewContainerRef: ViewContainerRef, changeDetectorRef: ChangeDetectorRef, overlay: Overlay, zone: NgZone, scrollStrategy: any, dir: Directionality, formField: McFormField, document: any, viewportRuler?: ViewportRuler | undefined);
|
93
|
+
/**
|
94
|
+
* Event handler for input blur events.
|
95
|
+
* Determines whether the blur event is triggered outside the specific target
|
96
|
+
* @returns A boolean indicating if the blur event happened outside the target element
|
97
|
+
*/
|
98
|
+
onInputBlur: (event: FocusEvent) => boolean;
|
93
99
|
ngAfterViewInit(): void;
|
94
100
|
ngOnDestroy(): void;
|
95
101
|
/** `View -> model callback called when value changes` */
|
@@ -153,5 +159,5 @@ export declare class McAutocompleteTrigger implements AfterViewInit, ControlValu
|
|
153
159
|
private resetActiveItem;
|
154
160
|
private canOpen;
|
155
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<McAutocompleteTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; host: true; }, { optional: true; }, null]>;
|
156
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<McAutocompleteTrigger, "input[mcAutocomplete], textarea[mcAutocomplete]", ["mcAutocompleteTrigger"], { "autocomplete": { "alias": "mcAutocomplete"; "required": false; }; "connectedTo": { "alias": "mcAutocompleteConnectedTo"; "required": false; }; "autocompleteAttribute": { "alias": "autocomplete"; "required": false; }; "autocompleteDisabled": { "alias": "mcAutocompleteDisabled"; "required": false; }; }, {}, never, never, false, never>;
|
162
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<McAutocompleteTrigger, "input[mcAutocomplete], textarea[mcAutocomplete]", ["mcAutocompleteTrigger"], { "autocomplete": { "alias": "mcAutocomplete"; "required": false; }; "connectedTo": { "alias": "mcAutocompleteConnectedTo"; "required": false; }; "autocompleteAttribute": { "alias": "autocomplete"; "required": false; }; "autocompleteDisabled": { "alias": "mcAutocompleteDisabled"; "required": false; }; "onInputBlur": { "alias": "mcAutocompleteOnBlur"; "required": false; }; }, {}, never, never, false, never>;
|
157
163
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@use 'sass:meta';
|
2
2
|
@use 'sass:map';
|
3
3
|
|
4
|
-
@use '../core/styles/tokens'
|
4
|
+
@use '../core/styles/common/tokens' as *;
|
5
5
|
|
6
6
|
|
7
7
|
$tokens: meta.module-variables(tokens) !default;
|
@@ -24,21 +24,17 @@ $tokens: meta.module-variables(tokens) !default;
|
|
24
24
|
width: 100%;
|
25
25
|
max-width: none;
|
26
26
|
|
27
|
-
max-height:
|
27
|
+
max-height: mc-css-variable(autocomplete-size-panel-max-height);
|
28
28
|
|
29
29
|
border: {
|
30
30
|
width: 1px;
|
31
31
|
style: solid;
|
32
32
|
}
|
33
33
|
|
34
|
-
border-bottom-left-radius:
|
35
|
-
|
36
|
-
);
|
37
|
-
border-bottom-right-radius: var(
|
38
|
-
--mc-autocomplete-size-panel-border-radius, map.get($tokens, autocomplete-size-panel-border-radius)
|
39
|
-
);
|
34
|
+
border-bottom-left-radius: mc-css-variable(autocomplete-size-panel-border-radius);
|
35
|
+
border-bottom-right-radius: mc-css-variable(autocomplete-size-panel-border-radius);
|
40
36
|
|
41
|
-
padding:
|
37
|
+
padding: mc-css-variable(autocomplete-size-panel-padding);
|
42
38
|
|
43
39
|
&.mc-autocomplete_visible {
|
44
40
|
visibility: visible;
|
@@ -50,8 +46,8 @@ $tokens: meta.module-variables(tokens) !default;
|
|
50
46
|
|
51
47
|
.mc-autocomplete-panel-above & {
|
52
48
|
border-radius:
|
53
|
-
|
54
|
-
|
49
|
+
mc-css-variable(autocomplete-size-panel-border-radius)
|
50
|
+
mc-css-variable(autocomplete-size-panel-border-radius)
|
55
51
|
0 0;
|
56
52
|
}
|
57
53
|
|
package/button/_button-base.scss
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
@use 'sass:map';
|
3
3
|
|
4
4
|
@use '../core/styles/common/button';
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
5
6
|
|
6
7
|
@use '../core/styles/tokens';
|
7
8
|
|
@@ -21,8 +22,8 @@ $tokens: meta.module-variables(tokens) !default;
|
|
21
22
|
|
22
23
|
margin: 0; /* Safari */
|
23
24
|
|
24
|
-
height:
|
25
|
-
min-height:
|
25
|
+
height: mc-css-variable(button-size-height);
|
26
|
+
min-height: mc-css-variable(button-size-height);
|
26
27
|
|
27
28
|
white-space: nowrap;
|
28
29
|
|
@@ -31,8 +32,11 @@ $tokens: meta.module-variables(tokens) !default;
|
|
31
32
|
|
32
33
|
vertical-align: baseline;
|
33
34
|
|
34
|
-
border:
|
35
|
-
border-
|
35
|
+
border-width: mc-css-variable(button-size-border-width);
|
36
|
+
border-style: solid;
|
37
|
+
border-color: transparent;
|
38
|
+
|
39
|
+
border-radius: mc-css-variable(button-size-border-radius);
|
36
40
|
|
37
41
|
&::-moz-focus-inner {
|
38
42
|
border: 0;
|
@@ -56,14 +60,10 @@ $tokens: meta.module-variables(tokens) !default;
|
|
56
60
|
}
|
57
61
|
|
58
62
|
& .mc-icon_left {
|
59
|
-
margin-right:
|
60
|
-
--mc-icon-button-size-left-icon-padding, map.get($tokens, icon-button-size-left-icon-padding)
|
61
|
-
);
|
63
|
+
margin-right: mc-css-variable(icon-button-size-left-icon-padding);
|
62
64
|
}
|
63
65
|
|
64
66
|
& .mc-icon_right {
|
65
|
-
margin-left:
|
66
|
-
--mc-icon-button-size-left-icon-padding, map.get($tokens, icon-button-size-left-icon-padding)
|
67
|
-
);
|
67
|
+
margin-left: mc-css-variable(icon-button-size-left-icon-padding);
|
68
68
|
}
|
69
69
|
}
|
@@ -2,32 +2,35 @@
|
|
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
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
@mixin mc-button-color($component, $style-name) {
|
9
|
+
$style: map-get($component, $style-name);
|
10
|
+
|
11
|
+
color: mc-css-variable(button-#{$style-name}-color, map-get($style, color));
|
12
|
+
border-color: mc-css-variable(button-#{$style-name}-border, map-get($style, border));
|
13
|
+
background: mc-css-variable(button-#{$style-name}-background, map-get($style, background));
|
10
14
|
|
11
15
|
.mc-icon {
|
12
|
-
color: map
|
16
|
+
color: mc-css-variable(button-#{$style-name}-icon, map-get($style, icon));
|
13
17
|
}
|
14
18
|
|
15
19
|
&:active:not([disabled]),
|
16
20
|
&.mc-active:not([disabled]) {
|
17
|
-
border-color: map
|
18
|
-
background: map
|
21
|
+
border-color: mc-css-variable(button-#{$style-name}-states-active-border, map-get($style, active_border));
|
22
|
+
background: mc-css-variable(button-#{$style-name}-states-active-background, map-get($style, active_background));
|
19
23
|
}
|
20
|
-
|
21
24
|
}
|
22
25
|
|
23
26
|
@mixin mc-button_transparent($theme) {
|
24
|
-
$background: map
|
27
|
+
$background: map-get($theme, background);
|
25
28
|
|
26
29
|
border-color: transparent;
|
27
30
|
background-color: transparent;
|
28
31
|
|
29
32
|
&:hover:not([disabled]) {
|
30
|
-
background-color: map
|
33
|
+
background-color: mc-css-variable(background-overlay-hover, map-get($background, overlay-hover));
|
31
34
|
|
32
35
|
& .mc-button-overlay {
|
33
36
|
background-color: transparent;
|
@@ -37,7 +40,7 @@
|
|
37
40
|
&:active:not([disabled]),
|
38
41
|
&.mc-active:not([disabled]) {
|
39
42
|
border-color: transparent;
|
40
|
-
background-color: map
|
43
|
+
background-color: mc-css-variable(background-overlay-active, map-get($background, overlay-active));
|
41
44
|
box-shadow: none;
|
42
45
|
|
43
46
|
& .mc-button-overlay {
|
@@ -52,10 +55,11 @@
|
|
52
55
|
}
|
53
56
|
|
54
57
|
@mixin mc-button-theme($theme) {
|
55
|
-
$background: map
|
56
|
-
$
|
58
|
+
$background: map-get($theme, background);
|
59
|
+
$theme-states: map-get($theme, states);
|
57
60
|
|
58
|
-
$button: map
|
61
|
+
$button: map-get($theme, components, button);
|
62
|
+
$primary_transparent: map-get($button, primary_transparent);
|
59
63
|
|
60
64
|
.mc-button-overlay {
|
61
65
|
background: transparent;
|
@@ -66,23 +70,21 @@
|
|
66
70
|
-webkit-font-smoothing: antialiased;
|
67
71
|
|
68
72
|
&.mc-primary {
|
69
|
-
@include mc-button-color(
|
73
|
+
@include mc-button-color($button, primary);
|
70
74
|
|
71
75
|
&.mc-button_transparent {
|
72
76
|
@include mc-button_transparent($theme);
|
73
77
|
|
74
|
-
|
75
|
-
|
76
|
-
color: map.get($primary_transparent, color);
|
78
|
+
color: mc-css-variable(button-primary_transparent-color, map-get($primary_transparent, color));
|
77
79
|
|
78
80
|
& .mc-icon {
|
79
|
-
color: map
|
81
|
+
color: mc-css-variable(button-primary_transparent-icon, map-get($primary_transparent, icon));
|
80
82
|
}
|
81
83
|
}
|
82
84
|
}
|
83
85
|
|
84
86
|
&.mc-secondary {
|
85
|
-
@include mc-button-color(
|
87
|
+
@include mc-button-color($button, secondary);
|
86
88
|
|
87
89
|
&.mc-button_transparent {
|
88
90
|
@include mc-button_transparent($theme);
|
@@ -90,7 +92,7 @@
|
|
90
92
|
}
|
91
93
|
|
92
94
|
&.mc-error {
|
93
|
-
@include mc-button-color(
|
95
|
+
@include mc-button-color($button, error);
|
94
96
|
|
95
97
|
&.mc-button_transparent {
|
96
98
|
@include mc-button_transparent($theme);
|
@@ -99,46 +101,44 @@
|
|
99
101
|
|
100
102
|
&:hover:not([disabled]) {
|
101
103
|
& .mc-button-overlay {
|
102
|
-
background: map
|
104
|
+
background: mc-css-variable(background-overlay-hover, map-get($background, overlay-hover));
|
103
105
|
}
|
104
106
|
}
|
105
107
|
|
106
108
|
&:active:not([disabled]),
|
107
109
|
&.mc-active:not([disabled]) {
|
108
|
-
box-shadow: map
|
110
|
+
box-shadow: mc-css-variable(button-active-shadow, map-get($button, active-shadow));
|
109
111
|
}
|
110
112
|
|
111
113
|
&.mc-primary,
|
112
114
|
&.mc-secondary,
|
113
115
|
&.mc-error {
|
114
116
|
&.cdk-keyboard-focused {
|
115
|
-
border-color:
|
117
|
+
border-color: mc-css-variable(states-focused-color, map-get($theme-states, focused-color));
|
116
118
|
box-shadow:
|
117
|
-
inset 0 0 0 1px map
|
118
|
-
0 0 0 1px
|
119
|
+
inset 0 0 0 1px mc-css-variable(background-background, map-get($background, background)),
|
120
|
+
0 0 0 1px mc-css-variable(states-focused-color, map-get($theme-states, focused-color));
|
119
121
|
}
|
120
122
|
}
|
121
123
|
|
122
124
|
&.mc-disabled,
|
123
125
|
&[disabled] {
|
124
|
-
opacity:
|
126
|
+
opacity: mc-css-variable(states-disabled-opacity, map-get($theme-states, disabled-opacity));
|
125
127
|
}
|
126
128
|
}
|
127
129
|
}
|
128
130
|
|
129
131
|
@mixin mc-button-typography($config) {
|
130
|
-
$tokens: map.get($config, tokens);
|
131
|
-
|
132
132
|
.mc-button,
|
133
133
|
.mc-icon-button {
|
134
|
-
@include mc-typography-
|
134
|
+
@include mc-typography-css-variables(button, default);
|
135
135
|
|
136
136
|
&.mc-primary {
|
137
|
-
@include mc-typography-
|
137
|
+
@include mc-typography-css-variables(button, primary);
|
138
138
|
}
|
139
139
|
|
140
140
|
&.mc-primary.mc-button_transparent {
|
141
|
-
@include mc-typography-
|
141
|
+
@include mc-typography-css-variables(button, primary-transparent);
|
142
142
|
}
|
143
143
|
}
|
144
144
|
|
package/button/button.scss
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
@use 'button-base' as *;
|
5
5
|
|
6
|
+
@use '../core/styles/common/tokens' as *;
|
6
7
|
@use '../core/styles/tokens';
|
7
8
|
|
8
9
|
|
@@ -11,8 +12,8 @@ $tokens: meta.module-variables(tokens) !default;
|
|
11
12
|
.mc-button {
|
12
13
|
@extend %mc-button-base;
|
13
14
|
|
14
|
-
padding-left:
|
15
|
-
padding-right:
|
15
|
+
padding-left: mc-css-variable(button-size-horizontal-padding);
|
16
|
+
padding-right: mc-css-variable(button-size-horizontal-padding);
|
16
17
|
}
|
17
18
|
|
18
19
|
.mc-light-button {
|
@@ -22,24 +23,17 @@ $tokens: meta.module-variables(tokens) !default;
|
|
22
23
|
.mc-icon-button {
|
23
24
|
@extend %mc-button-base;
|
24
25
|
|
25
|
-
padding-left:
|
26
|
-
|
27
|
-
var(--mc-button-size-border-width, map.get($tokens, button-size-border-width))
|
28
|
-
);
|
29
|
-
|
30
|
-
padding-right: calc(
|
31
|
-
var(--mc-icon-button-size-horizontal-padding, map.get($tokens, icon-button-size-horizontal-padding)) -
|
32
|
-
var(--mc-button-size-border-width, map.get($tokens, button-size-border-width))
|
33
|
-
);
|
26
|
+
padding-left: mc-css-variable(icon-button-size-horizontal-padding);
|
27
|
+
padding-right: mc-css-variable(icon-button-size-horizontal-padding);
|
34
28
|
}
|
35
29
|
|
36
30
|
.mc-button-overlay {
|
37
31
|
position: absolute;
|
38
32
|
|
39
|
-
top: -#{
|
40
|
-
left: -#{
|
41
|
-
right: -#{
|
42
|
-
bottom: -#{
|
33
|
+
top: -#{getToken(button-size-border-width)};
|
34
|
+
left: -#{getToken(button-size-border-width)};
|
35
|
+
right: -#{getToken(button-size-border-width)};
|
36
|
+
bottom: -#{getToken(button-size-border-width)};
|
43
37
|
|
44
38
|
border-radius: inherit;
|
45
39
|
}
|
@@ -2,36 +2,41 @@
|
|
2
2
|
@use 'sass:map';
|
3
3
|
|
4
4
|
@use '../core/styles/typography/typography-utils' as *;
|
5
|
+
@use '../core/styles/common/tokens' as *;
|
6
|
+
|
7
|
+
|
8
|
+
@mixin mc-button-toggle-color($component, $state-name) {
|
9
|
+
$state: map-get(map-get($component, states), $state-name);
|
5
10
|
|
6
|
-
@mixin mc-button-toggle-color($state) {
|
7
11
|
& .mc-button-overlay {
|
8
|
-
background: map
|
9
|
-
border-color: map.get($state, background);
|
12
|
+
background: mc-css-variable(button-toggle-states-#{$state-name}-background, map-get($state, background));
|
10
13
|
}
|
11
14
|
|
12
15
|
& .mc-icon {
|
13
|
-
color: map
|
16
|
+
color: mc-css-variable(button-toggle-states-#{$state-name}-icon, map-get($state, icon));
|
14
17
|
}
|
15
18
|
}
|
16
19
|
|
17
20
|
@mixin mc-button-toggle-theme($theme) {
|
18
|
-
$
|
19
|
-
|
20
|
-
$
|
21
|
+
$theme-states: map-get($theme, states);
|
22
|
+
|
23
|
+
$button-toggle-group: map-get(map-get(map-get($theme, components), button-toggle), button-toggle-group);
|
24
|
+
$button-toggle: map-get(map-get(map-get($theme, components), button-toggle), button-toggle);
|
25
|
+
$states: map-get($button-toggle, states);
|
21
26
|
|
22
27
|
.mc-button-toggle-group {
|
23
|
-
background: map
|
24
|
-
border-color:
|
28
|
+
background: mc-css-variable(button-toggle-group-background, map-get($button-toggle-group, background));
|
29
|
+
border-color: mc-css-variable(button-toggle-group-border, map-get($button-toggle-group, border));
|
25
30
|
|
26
31
|
.mc-button-toggle {
|
27
|
-
|
28
|
-
|
29
|
-
color: map
|
30
|
-
border-color: map
|
32
|
+
> .mc-button,
|
33
|
+
> .mc-icon-button {
|
34
|
+
color: mc-css-variable(button-toggle-color, map-get($button-toggle, color));
|
35
|
+
border-color: mc-css-variable(button-toggle-group-border, map-get($button-toggle-group, border));
|
31
36
|
background: inherit;
|
32
37
|
|
33
38
|
& .mc-icon {
|
34
|
-
color: map
|
39
|
+
color: mc-css-variable(button-toggle-icon, map-get($button-toggle, icon));
|
35
40
|
}
|
36
41
|
|
37
42
|
.mc-button-overlay {
|
@@ -39,27 +44,30 @@
|
|
39
44
|
}
|
40
45
|
|
41
46
|
&:hover:not([disabled], .mc-active) {
|
42
|
-
@include mc-button-toggle-color(
|
47
|
+
@include mc-button-toggle-color($button-toggle, hover);
|
43
48
|
}
|
44
49
|
|
45
50
|
&:active:not([disabled], .mc-active) {
|
46
|
-
@include mc-button-toggle-color(
|
51
|
+
@include mc-button-toggle-color($button-toggle, active);
|
47
52
|
}
|
48
53
|
|
49
54
|
&.mc-active {
|
50
|
-
$state: map
|
55
|
+
$state: map-get($states, pressed);
|
51
56
|
|
52
|
-
background: map
|
53
|
-
border-color: map
|
57
|
+
background: mc-css-variable(button-toggle-states-pressed-background, map-get($state, background));
|
58
|
+
border-color: mc-css-variable(button-toggle-states-pressed-background, map-get($state, background));
|
54
59
|
|
55
60
|
& .mc-icon {
|
56
|
-
color: map
|
61
|
+
color: mc-css-variable(button-toggle-states-pressed-icon, map-get($state, icon));
|
57
62
|
}
|
58
63
|
}
|
59
64
|
|
60
65
|
&.mc-disabled,
|
61
66
|
&[disabled] {
|
62
|
-
opacity:
|
67
|
+
opacity: mc-css-variable(
|
68
|
+
button-toggle-states-disabled-icon,
|
69
|
+
map-get(map-get($states, disabled), opacity)
|
70
|
+
);
|
63
71
|
}
|
64
72
|
|
65
73
|
&.cdk-keyboard-focused {
|
@@ -68,7 +76,7 @@
|
|
68
76
|
}
|
69
77
|
|
70
78
|
&.cdk-keyboard-focused {
|
71
|
-
box-shadow: 0 0 0 2px
|
79
|
+
box-shadow: 0 0 0 2px mc-css-variable(states-focused-color, map-get($theme-states, focused-color));
|
72
80
|
}
|
73
81
|
}
|
74
82
|
}
|
@@ -78,11 +86,11 @@
|
|
78
86
|
$tokens: map.get($config, tokens);
|
79
87
|
|
80
88
|
.mc-button-toggle {
|
81
|
-
@include mc-typography-
|
89
|
+
@include mc-typography-css-variables(button-toggle, default);
|
82
90
|
|
83
91
|
> .mc-button,
|
84
92
|
> .mc-icon-button {
|
85
|
-
@include mc-typography-
|
93
|
+
@include mc-typography-css-variables(button-toggle, default);
|
86
94
|
}
|
87
95
|
}
|
88
96
|
}
|
@@ -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;
|
@@ -15,53 +16,28 @@ $tokens: meta.module-variables(tokens) !default;
|
|
15
16
|
align-items: center;
|
16
17
|
gap: map.get($tokens, size-3xs);
|
17
18
|
|
18
|
-
border-width:
|
19
|
-
|
20
|
-
map.get($tokens, button-toggle-group-size-border-width)
|
21
|
-
);
|
22
|
-
border-radius: var(
|
23
|
-
--mc-button-toggle-group-size-border-radius,
|
24
|
-
map.get($tokens, button-toggle-group-size-border-radius)
|
25
|
-
);
|
19
|
+
border-width: mc-css-variable(button-toggle-group-size-border-width);
|
20
|
+
border-radius: mc-css-variable(button-toggle-group-size-border-radius);
|
26
21
|
border-style: solid;
|
27
|
-
padding:
|
28
|
-
--mc-button-toggle-group-size-padding,
|
29
|
-
map.get($tokens, button-toggle-group-size-padding)
|
30
|
-
);
|
22
|
+
padding: mc-css-variable(button-toggle-group-size-padding);
|
31
23
|
|
32
24
|
.mc-button-toggle {
|
33
25
|
display: flex;
|
34
26
|
overflow: hidden;
|
35
27
|
justify-content: flex-start;
|
36
28
|
|
37
|
-
border-radius:
|
38
|
-
--mc-button-toggle-size-border-radius,
|
39
|
-
map.get($tokens, button-toggle-size-border-radius)
|
40
|
-
);
|
29
|
+
border-radius: mc-css-variable(button-toggle-size-border-radius);
|
41
30
|
|
42
31
|
> .mc-button,
|
43
32
|
> .mc-icon-button {
|
44
33
|
border: none;
|
45
|
-
border-width:
|
46
|
-
|
47
|
-
|
48
|
-
);
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
);
|
53
|
-
min-width: var(
|
54
|
-
--mc-button-toggle-size-min-width,
|
55
|
-
map.get($tokens, button-toggle-size-min-width)
|
56
|
-
);
|
57
|
-
padding-left: var(
|
58
|
-
--mc-button-toggle-size-horizontal-padding,
|
59
|
-
map.get($tokens, button-toggle-size-horizontal-padding)
|
60
|
-
);
|
61
|
-
padding-right: var(
|
62
|
-
--mc-button-toggle-size-horizontal-padding,
|
63
|
-
map.get($tokens, button-toggle-size-horizontal-padding)
|
64
|
-
);
|
34
|
+
border-width: mc-css-variable(button-toggle-size-border-width);
|
35
|
+
border-radius: mc-css-variable(button-toggle-size-border-radius);
|
36
|
+
|
37
|
+
min-width: mc-css-variable(button-toggle-size-min-width);
|
38
|
+
|
39
|
+
padding-left: mc-css-variable(button-toggle-size-horizontal-padding);
|
40
|
+
padding-right: mc-css-variable(button-toggle-size-horizontal-padding);
|
65
41
|
|
66
42
|
& .mc-button-wrapper {
|
67
43
|
width: 100%;
|
@@ -84,10 +60,7 @@ $tokens: meta.module-variables(tokens) !default;
|
|
84
60
|
&.mc-button-toggle-icon-text {
|
85
61
|
> .mc-button,
|
86
62
|
> .mc-icon-button {
|
87
|
-
padding-left:
|
88
|
-
--mc-button-toggle-size-left-icon-padding,
|
89
|
-
map.get($tokens, button-toggle-size-left-icon-padding)
|
90
|
-
);
|
63
|
+
padding-left: mc-css-variable(button-toggle-size-left-icon-padding);
|
91
64
|
|
92
65
|
& .mc-icon {
|
93
66
|
margin-right: map.get($tokens, size-xxs);
|
@@ -111,17 +84,11 @@ $tokens: meta.module-variables(tokens) !default;
|
|
111
84
|
}
|
112
85
|
|
113
86
|
&.mc-button-toggle-icon {
|
114
|
-
width:
|
115
|
-
--mc-icon-button-toggle-size-width,
|
116
|
-
map.get($tokens, icon-button-toggle-size-width)
|
117
|
-
);
|
87
|
+
width: mc-css-variable(icon-button-toggle-size-width);
|
118
88
|
|
119
89
|
> .mc-button,
|
120
90
|
> .mc-icon-button {
|
121
|
-
width:
|
122
|
-
--mc-icon-button-toggle-size-width,
|
123
|
-
map.get($tokens, icon-button-toggle-size-width)
|
124
|
-
);
|
91
|
+
width: mc-css-variable(icon-button-toggle-size-width);
|
125
92
|
}
|
126
93
|
}
|
127
94
|
}
|
@@ -143,15 +110,9 @@ $tokens: meta.module-variables(tokens) !default;
|
|
143
110
|
> .mc-button,
|
144
111
|
> .mc-icon-button {
|
145
112
|
width: 100%;
|
146
|
-
border-width:
|
147
|
-
|
148
|
-
|
149
|
-
);
|
150
|
-
|
151
|
-
border-radius: var(
|
152
|
-
--mc-button-toggle-size-border-radius,
|
153
|
-
map.get($tokens, button-toggle-size-border-radius)
|
154
|
-
);
|
113
|
+
border-width: mc-css-variable(button-toggle-size-border-width);
|
114
|
+
|
115
|
+
border-radius: mc-css-variable(button-toggle-size-border-radius);
|
155
116
|
}
|
156
117
|
}
|
157
118
|
}
|