@db-ux/core-components 4.4.3 → 4.5.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/CHANGELOG.md +8 -0
- package/build/components/accordion-item/accordion-item.css +38 -7
- package/build/components/accordion-item/accordion-item.scss +1 -1
- package/build/components/badge/badge.css +75 -11
- package/build/components/badge/badge.scss +6 -1
- package/build/components/brand/brand.css +2 -0
- package/build/components/brand/brand.scss +2 -0
- package/build/components/button/button.css +245 -60
- package/build/components/button/button.scss +1 -105
- package/build/components/card/card.css +88 -16
- package/build/components/checkbox/checkbox.css +1 -0
- package/build/components/custom-button/custom-button.css +892 -0
- package/build/components/custom-button/custom-button.scss +78 -0
- package/build/components/custom-select/custom-select.css +19 -3
- package/build/components/custom-select-dropdown/custom-select-dropdown.css +1 -0
- package/build/components/custom-select-dropdown/custom-select-dropdown.scss +1 -0
- package/build/components/custom-select-list-item/custom-select-list-item.css +36 -6
- package/build/components/drawer/drawer.css +4 -0
- package/build/components/drawer/drawer.scss +4 -0
- package/build/components/infotext/infotext.css +4 -0
- package/build/components/infotext/infotext.scss +4 -0
- package/build/components/input/input.css +19 -3
- package/build/components/link/link.css +73 -12
- package/build/components/navigation-item/navigation-item.css +111 -21
- package/build/components/navigation-item/navigation-item.scss +2 -1
- package/build/components/notification/notification.css +37 -6
- package/build/components/select/select.css +19 -3
- package/build/components/switch/switch.css +1 -0
- package/build/components/tab-item/tab-item.css +52 -10
- package/build/components/tabs/tabs.css +2 -0
- package/build/components/tabs/tabs.scss +2 -0
- package/build/components/tag/tag.css +856 -125
- package/build/components/textarea/textarea.css +18 -3
- package/build/components/tooltip/tooltip.css +4 -1
- package/build/components/tooltip/tooltip.scss +12 -10
- package/build/styles/absolute.css +9 -9
- package/build/styles/index.css +8 -8
- package/build/styles/index.scss +1 -0
- package/build/styles/internal/_button-components.scss +140 -2
- package/build/styles/internal/_custom-elements.scss +1 -1
- package/build/styles/internal/_icon-passing.scss +23 -3
- package/build/styles/internal/_popover-component.scss +4 -4
- package/build/styles/relative.css +9 -9
- package/build/styles/rollup.css +9 -9
- package/build/styles/wc-workarounds.css +1 -1
- package/build/styles/webpack.css +9 -9
- package/package.json +5 -5
package/build/styles/index.scss
CHANGED
|
@@ -35,3 +35,4 @@
|
|
|
35
35
|
@forward "../components/custom-select-dropdown/custom-select-dropdown";
|
|
36
36
|
@forward "../components/custom-select-list/custom-select-list";
|
|
37
37
|
@forward "../components/custom-select-list-item/custom-select-list-item";
|
|
38
|
+
@forward "../components/custom-button/custom-button";
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
2
|
+
@use "@db-ux/core-foundations/build/styles/fonts";
|
|
3
|
+
@use "@db-ux/core-foundations/build/styles/variables";
|
|
4
|
+
@use "@db-ux/core-foundations/build/styles/colors";
|
|
5
|
+
@use "@db-ux/core-foundations/build/styles/icons";
|
|
6
|
+
@use "./component";
|
|
2
7
|
|
|
3
8
|
%default-button {
|
|
4
9
|
font-weight: 700;
|
|
@@ -6,9 +11,142 @@
|
|
|
6
11
|
white-space: pre-line; // Multiple lines support
|
|
7
12
|
justify-content: center;
|
|
8
13
|
text-align: center;
|
|
14
|
+
align-items: center; // Centering the content vertically and horizontally
|
|
15
|
+
vertical-align: top; // Alignment of inline-flex buttons with different content
|
|
9
16
|
|
|
10
17
|
@include helpers.display(inline-flex);
|
|
18
|
+
}
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
%button-outlined-ghost-colors {
|
|
21
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-full-default;
|
|
22
|
+
|
|
23
|
+
@include helpers.hover {
|
|
24
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-full-hovered;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include helpers.active {
|
|
28
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-full-pressed;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
%button-brand-colors {
|
|
33
|
+
background-color: colors.$db-brand-origin-default;
|
|
34
|
+
color: colors.$db-brand-on-origin-default;
|
|
35
|
+
border-color: colors.$db-brand-on-bg-basic-emphasis-70-default;
|
|
36
|
+
|
|
37
|
+
@include helpers.hover {
|
|
38
|
+
background-color: colors.$db-brand-origin-hovered;
|
|
39
|
+
border-color: colors.$db-brand-on-bg-basic-emphasis-70-default;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include helpers.active {
|
|
43
|
+
background-color: colors.$db-brand-origin-pressed;
|
|
44
|
+
border-color: colors.$db-brand-on-bg-basic-emphasis-70-default;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin set-basic-button($selector: "&") {
|
|
49
|
+
#{$selector} {
|
|
50
|
+
@extend %default-interactive-component;
|
|
51
|
+
@extend %default-button;
|
|
52
|
+
@extend %db-overwrite-font-size-md;
|
|
53
|
+
|
|
54
|
+
max-inline-size: 100%;
|
|
55
|
+
color: colors.$db-adaptive-on-bg-basic-emphasis-100-default;
|
|
56
|
+
min-block-size: variables.$db-sizing-md;
|
|
57
|
+
block-size: max-content;
|
|
58
|
+
inline-size: fit-content;
|
|
59
|
+
padding: variables.$db-spacing-fixed-2xs variables.$db-spacing-fixed-md;
|
|
60
|
+
|
|
61
|
+
// disable text-decoration if someone wants to use the button for an <a> tag
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Square icon only buttons
|
|
66
|
+
&[data-no-text="true"] {
|
|
67
|
+
#{$selector} {
|
|
68
|
+
padding: 0;
|
|
69
|
+
aspect-ratio: 1;
|
|
70
|
+
inline-size: variables.$db-sizing-md;
|
|
71
|
+
|
|
72
|
+
@include icons.is-icon-text-replace;
|
|
73
|
+
|
|
74
|
+
&::before {
|
|
75
|
+
margin: auto;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[data-wrap="false"] {
|
|
81
|
+
#{$selector} {
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&[data-size="small"] {
|
|
87
|
+
#{$selector} {
|
|
88
|
+
@extend %db-overwrite-font-size-sm;
|
|
89
|
+
|
|
90
|
+
font-weight: 700;
|
|
91
|
+
min-block-size: variables.$db-sizing-sm;
|
|
92
|
+
|
|
93
|
+
&:not([data-no-text="true"]) {
|
|
94
|
+
// stylelint-disable-next-line db-ux/use-spacings
|
|
95
|
+
padding: 1px variables.$db-spacing-fixed-sm;
|
|
96
|
+
|
|
97
|
+
&::before {
|
|
98
|
+
margin-inline-end: variables.$db-spacing-fixed-2xs;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Square icon only buttons
|
|
103
|
+
&[data-no-text="true"] {
|
|
104
|
+
inline-size: variables.$db-sizing-sm;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[data-width="full"] {
|
|
110
|
+
#{$selector} {
|
|
111
|
+
inline-size: 100%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@if $selector == "&" {
|
|
116
|
+
&[data-variant="brand"] {
|
|
117
|
+
#{$selector} {
|
|
118
|
+
@extend %button-brand-colors;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&[data-variant="filled"],
|
|
124
|
+
&[data-variant="ghost"] {
|
|
125
|
+
#{$selector} {
|
|
126
|
+
@extend %transparent-border;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&[data-variant="outlined"],
|
|
131
|
+
&:not([data-variant]),
|
|
132
|
+
&[data-variant=""],
|
|
133
|
+
&[data-variant="ghost"] {
|
|
134
|
+
#{$selector} {
|
|
135
|
+
@extend %button-outlined-ghost-colors;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&[data-variant="filled"] {
|
|
140
|
+
#{$selector} {
|
|
141
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-semi-default;
|
|
142
|
+
|
|
143
|
+
@include helpers.hover {
|
|
144
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-semi-hovered;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@include helpers.active {
|
|
148
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-semi-pressed;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
14
152
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
$custom-elements: //hygen-insert
|
|
2
2
|
|
|
3
|
-
db-custom-select-list-item, db-custom-select-list,
|
|
3
|
+
db-custom-button, db-custom-select-list-item, db-custom-select-list,
|
|
4
4
|
db-custom-select-dropdown, db-custom-select-form-field, db-custom-select,
|
|
5
5
|
db-stack, db-switch, db-tab-panel, db-tabs, db-tab-list, db-tab-item,
|
|
6
6
|
db-tab-bar, db-tooltip, db-popover, db-textarea, db-navigation,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
@use "@db-ux/core-foundations/build/styles/variables";
|
|
2
2
|
@use "@db-ux/core-foundations/build/styles/icons";
|
|
3
3
|
|
|
4
|
+
$interactive-button-selectors: "label,button,a";
|
|
5
|
+
|
|
4
6
|
@mixin icon-passing($inline-start: variables.$db-spacing-fixed-sm) {
|
|
7
|
+
&[data-icon-leading]:not([data-show-icon-leading="false"]),
|
|
5
8
|
&[data-icon]:not([data-show-icon="false"]) {
|
|
6
9
|
&::before {
|
|
7
10
|
position: absolute;
|
|
@@ -11,9 +14,7 @@
|
|
|
11
14
|
z-index: 1;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
button,
|
|
16
|
-
label {
|
|
17
|
+
#{$interactive-button-selectors} {
|
|
17
18
|
--db-padding-inline-start: calc(
|
|
18
19
|
#{$inline-start} + #{icons.$default-icon-margin-end} +
|
|
19
20
|
var(--db-icon-font-size)
|
|
@@ -24,3 +25,22 @@
|
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
|
|
29
|
+
@mixin icon-passing-trailing($inline-end: variables.$db-spacing-fixed-sm) {
|
|
30
|
+
&[data-icon-trailing]:not([data-show-icon-trailing="false"]) {
|
|
31
|
+
&::after {
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset-block-start: calc(50% - 0.5em);
|
|
34
|
+
inset-inline-end: $inline-end;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
z-index: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#{$interactive-button-selectors} {
|
|
40
|
+
padding-inline-end: calc(
|
|
41
|
+
#{$inline-end} + #{icons.$default-icon-margin-end} +
|
|
42
|
+
var(--db-icon-font-size)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -46,7 +46,7 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
46
46
|
&::before {
|
|
47
47
|
inset-block-end: 100%;
|
|
48
48
|
inset-inline: 0;
|
|
49
|
-
block-size:
|
|
49
|
+
block-size: $popover-gap-size;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
55
55
|
&::before {
|
|
56
56
|
inset-block-start: 100%;
|
|
57
57
|
inset-inline: 0;
|
|
58
|
-
block-size:
|
|
58
|
+
block-size: $popover-gap-size;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -64,7 +64,7 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
64
64
|
&::before {
|
|
65
65
|
inset-inline-end: 100%;
|
|
66
66
|
inset-block: 0;
|
|
67
|
-
inline-size:
|
|
67
|
+
inline-size: $popover-gap-size;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -73,7 +73,7 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
73
73
|
&::before {
|
|
74
74
|
inset-inline-start: 100%;
|
|
75
75
|
inset-block: 0;
|
|
76
|
-
inline-size:
|
|
76
|
+
inline-size: $popover-gap-size;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|