@dbcdk/react-components 0.0.131 → 0.0.133
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.
|
@@ -8,9 +8,9 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
8
8
|
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
9
9
|
|
|
10
10
|
const PRESETS = {
|
|
11
|
-
production: { label: "Produktionsmilj\xF8", severity: "
|
|
11
|
+
production: { label: "Produktionsmilj\xF8", severity: "error" },
|
|
12
12
|
staging: { label: "Staging-milj\xF8", severity: "warning" },
|
|
13
|
-
test: { label: "Test-milj\xF8", severity: "
|
|
13
|
+
test: { label: "Test-milj\xF8", severity: "success" }
|
|
14
14
|
};
|
|
15
15
|
function EnvironmentBanner(props) {
|
|
16
16
|
const { label, severity } = props.environment != null ? PRESETS[props.environment] : { label: props.customLabel, severity: props.customSeverity };
|
|
@@ -2,9 +2,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import styles from './EnvironmentBanner.module.css';
|
|
3
3
|
|
|
4
4
|
const PRESETS = {
|
|
5
|
-
production: { label: "Produktionsmilj\xF8", severity: "
|
|
5
|
+
production: { label: "Produktionsmilj\xF8", severity: "error" },
|
|
6
6
|
staging: { label: "Staging-milj\xF8", severity: "warning" },
|
|
7
|
-
test: { label: "Test-milj\xF8", severity: "
|
|
7
|
+
test: { label: "Test-milj\xF8", severity: "success" }
|
|
8
8
|
};
|
|
9
9
|
function EnvironmentBanner(props) {
|
|
10
10
|
const { label, severity } = props.environment != null ? PRESETS[props.environment] : { label: props.customLabel, severity: props.customSeverity };
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
color: var(--env-banner-fg);
|
|
13
13
|
letter-spacing: var(--letter-spacing-wide);
|
|
14
14
|
font-size: var(--font-size-md);
|
|
15
|
-
font-weight: var(--font-weight-
|
|
15
|
+
font-weight: var(--font-weight-medium);
|
|
16
16
|
text-transform: uppercase;
|
|
17
17
|
line-height: var(--line-height-normal);
|
|
18
18
|
user-select: none;
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
|
|
21
21
|
.banner[data-severity='success'] {
|
|
22
22
|
--env-banner-bg: var(--color-status-success);
|
|
23
|
-
--env-banner-fg: var(--color-status-success
|
|
23
|
+
--env-banner-fg: var(--color-fg-on-status-success);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.banner[data-severity='warning'] {
|
|
27
27
|
--env-banner-bg: var(--color-status-warning);
|
|
28
|
-
--env-banner-fg: var(--color-status-warning
|
|
28
|
+
--env-banner-fg: var(--color-fg-on-status-warning);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.banner[data-severity='error'] {
|
|
32
32
|
--env-banner-bg: var(--color-status-error);
|
|
33
|
-
--env-banner-fg: var(--color-status-error
|
|
33
|
+
--env-banner-fg: var(--color-fg-on-status-error);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.banner[data-severity='info'] {
|
|
37
37
|
--env-banner-bg: var(--color-status-info);
|
|
38
|
-
--env-banner-fg: var(--color-status-info
|
|
38
|
+
--env-banner-fg: var(--color-fg-on-status-info);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.banner[data-severity='brand'] {
|
|
@@ -48,7 +48,7 @@ html {
|
|
|
48
48
|
--dbc-gray-600: light-dark(#4b5563, #6b7280);
|
|
49
49
|
|
|
50
50
|
/* Status colors */
|
|
51
|
-
--dbc-green-500: light-dark(#
|
|
51
|
+
--dbc-green-500: light-dark(#0da874, #22c55e);
|
|
52
52
|
--dbc-green-100: light-dark(#e6f9f3, #052e1f);
|
|
53
53
|
--dbc-green-700: light-dark(#065f46, #86efac);
|
|
54
54
|
--dbc-green-300: light-dark(#34d399, #4ade80);
|
|
@@ -125,21 +125,25 @@ html {
|
|
|
125
125
|
|
|
126
126
|
/* Status */
|
|
127
127
|
--color-status-success: var(--dbc-green-500);
|
|
128
|
+
--color-fg-on-status-success: light-dark(#ffffff, #f9fafb);
|
|
128
129
|
--color-status-success-bg: var(--dbc-green-100);
|
|
129
130
|
--color-status-success-border: color-mix(in srgb, var(--dbc-green-500) 24%, transparent);
|
|
130
131
|
--color-status-success-fg: var(--dbc-green-700);
|
|
131
132
|
|
|
132
133
|
--color-status-warning: var(--dbc-amber-700);
|
|
134
|
+
--color-fg-on-status-warning: light-dark(#ffffff, #f9fafb);
|
|
133
135
|
--color-status-warning-bg: var(--dbc-amber-100);
|
|
134
136
|
--color-status-warning-border: color-mix(in srgb, var(--dbc-amber-700) 24%, transparent);
|
|
135
137
|
--color-status-warning-fg: var(--dbc-amber-800);
|
|
136
138
|
|
|
137
139
|
--color-status-error: var(--dbc-red-600);
|
|
140
|
+
--color-fg-on-status-error: light-dark(#ffffff, #f9fafb);
|
|
138
141
|
--color-status-error-bg: var(--dbc-red-100);
|
|
139
142
|
--color-status-error-border: color-mix(in srgb, var(--dbc-red-600) 24%, transparent);
|
|
140
143
|
--color-status-error-fg: var(--dbc-red-800);
|
|
141
144
|
|
|
142
145
|
--color-status-info: var(--dbc-info-500);
|
|
146
|
+
--color-fg-on-status-info: light-dark(#ffffff, #f9fafb);
|
|
143
147
|
--color-status-info-bg: var(--dbc-info-100);
|
|
144
148
|
--color-status-info-border: color-mix(in srgb, var(--dbc-info-500) 24%, transparent);
|
|
145
149
|
--color-status-info-fg: var(--dbc-info-700);
|