@dbcdk/react-components 0.0.157 → 0.0.158
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/dist/components/button/Button.module.css +1 -1
- package/dist/components/forms/input/Input.module.css +12 -0
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +10 -3
- package/dist/components/headline/CollapsibleHeadline.cjs +1 -0
- package/dist/components/headline/CollapsibleHeadline.js +1 -0
- package/dist/components/headline/Headline.module.css +2 -26
- package/dist/components/icon/Icon.cjs +16 -5
- package/dist/components/icon/Icon.d.ts +3 -1
- package/dist/components/icon/Icon.js +17 -6
- package/dist/components/icon/Icon.module.css +1 -1
- package/dist/components/menu/Menu.module.css +12 -0
- package/dist/components/table/Table.module.css +16 -6
- package/dist/components/table/components/TableHeaderCell.cjs +3 -4
- package/dist/components/table/components/TableHeaderCell.js +4 -5
- package/dist/components/tabs/Tabs.module.css +1 -1
- package/dist/styles/styles.css +37 -61
- package/dist/styles/themes/dbc/colors.css +2 -3
- package/dist/styles.css +37 -61
- package/package.json +1 -1
|
@@ -464,3 +464,15 @@
|
|
|
464
464
|
min-inline-size: calc(16px + (var(--spacing-xxs) * 2));
|
|
465
465
|
min-block-size: calc(16px + (var(--spacing-xxs) * 2));
|
|
466
466
|
}
|
|
467
|
+
|
|
468
|
+
.clearSlot > * {
|
|
469
|
+
opacity: 0;
|
|
470
|
+
pointer-events: none;
|
|
471
|
+
transition: opacity var(--transition-fast) var(--ease-standard);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.field:hover .clearSlot > *,
|
|
475
|
+
.field:focus-within .clearSlot > * {
|
|
476
|
+
opacity: 1;
|
|
477
|
+
pointer-events: auto;
|
|
478
|
+
}
|
|
@@ -56,9 +56,16 @@
|
|
|
56
56
|
transform: scale(1);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
/* hover (only when not disabled)
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
/* hover (only when not disabled/checked) — triggers from anywhere in the
|
|
60
|
+
control, not just the input itself, so hovering the label or an
|
|
61
|
+
interactive endAdornment (e.g. a menu trigger) also highlights the radio
|
|
62
|
+
icon. Reads a CSS variable (rather than a hardcoded color) so an
|
|
63
|
+
ancestor outside this module — e.g. a Menu row that already shows its
|
|
64
|
+
own hover feedback — can suppress this by setting the variable; that
|
|
65
|
+
works across CSS-module file boundaries where class-name hashing would
|
|
66
|
+
otherwise prevent one module's selectors from targeting another's. */
|
|
67
|
+
.container:hover .radio:not(.disabled):not(.checked) {
|
|
68
|
+
border-color: var(--radio-hover-border-color, var(--color-brand-hover));
|
|
62
69
|
}
|
|
63
70
|
|
|
64
71
|
/* focus ring */
|
|
@@ -52,34 +52,10 @@
|
|
|
52
52
|
display: contents;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/* CollapsibleHeadline toggle button */
|
|
56
|
-
.toggleButton {
|
|
57
|
-
all: unset;
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
display: inline-flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
flex: 0 0 auto;
|
|
63
|
-
padding: var(--spacing-2xs);
|
|
64
|
-
border-radius: var(--border-radius-sm);
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
color: var(--color-fg-subtle);
|
|
67
|
-
transition: color var(--transition-fast) var(--ease-standard);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.toggleButton:hover {
|
|
71
|
-
color: var(--color-fg-default);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.toggleButton:focus-visible {
|
|
75
|
-
outline: none;
|
|
76
|
-
box-shadow: var(--focus-ring);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
55
|
.toggleChevron {
|
|
80
56
|
display: block;
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
57
|
+
width: 0.85em;
|
|
58
|
+
height: 0.85em;
|
|
83
59
|
transition: transform var(--transition-normal) var(--ease-standard);
|
|
84
60
|
}
|
|
85
61
|
|
|
@@ -17,11 +17,22 @@ const SeverityIcon = {
|
|
|
17
17
|
brand: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, {}),
|
|
18
18
|
accent: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, {})
|
|
19
19
|
};
|
|
20
|
-
function Icon({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function Icon({
|
|
21
|
+
severity,
|
|
22
|
+
label,
|
|
23
|
+
customIcon,
|
|
24
|
+
size = "md",
|
|
25
|
+
iconPosition = "start"
|
|
26
|
+
}) {
|
|
27
|
+
const iconEl = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.icon} ${severity ? styles__default.default[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null });
|
|
28
|
+
const labelEl = label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label });
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.container, "data-size": size, children: iconPosition === "end" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30
|
+
labelEl,
|
|
31
|
+
iconEl
|
|
32
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33
|
+
iconEl,
|
|
34
|
+
labelEl
|
|
35
|
+
] }) });
|
|
25
36
|
}
|
|
26
37
|
|
|
27
38
|
exports.Icon = Icon;
|
|
@@ -2,11 +2,13 @@ import type { ReactNode, JSX } from 'react';
|
|
|
2
2
|
import { Severity } from '../../constants/severity.types';
|
|
3
3
|
export declare const SeverityIcon: Record<Severity, ReactNode>;
|
|
4
4
|
type IconSize = 'xs' | 'md';
|
|
5
|
+
type IconPosition = 'start' | 'end';
|
|
5
6
|
interface IconProps {
|
|
6
7
|
severity?: Severity;
|
|
7
8
|
customIcon?: ReactNode;
|
|
8
9
|
label?: string;
|
|
9
10
|
size?: IconSize;
|
|
11
|
+
iconPosition?: IconPosition;
|
|
10
12
|
}
|
|
11
|
-
export declare function Icon({ severity, label, customIcon, size }: IconProps): JSX.Element;
|
|
13
|
+
export declare function Icon({ severity, label, customIcon, size, iconPosition, }: IconProps): JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Sparkles, Building2, CircleAlert, Info, CircleX, CircleCheck } from 'lucide-react';
|
|
3
3
|
import styles from './Icon.module.css';
|
|
4
4
|
|
|
@@ -11,11 +11,22 @@ const SeverityIcon = {
|
|
|
11
11
|
brand: /* @__PURE__ */ jsx(Building2, {}),
|
|
12
12
|
accent: /* @__PURE__ */ jsx(Sparkles, {})
|
|
13
13
|
};
|
|
14
|
-
function Icon({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
function Icon({
|
|
15
|
+
severity,
|
|
16
|
+
label,
|
|
17
|
+
customIcon,
|
|
18
|
+
size = "md",
|
|
19
|
+
iconPosition = "start"
|
|
20
|
+
}) {
|
|
21
|
+
const iconEl = /* @__PURE__ */ jsx("span", { className: `${styles.icon} ${severity ? styles[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null });
|
|
22
|
+
const labelEl = label && /* @__PURE__ */ jsx("span", { children: label });
|
|
23
|
+
return /* @__PURE__ */ jsx("div", { className: styles.container, "data-size": size, children: iconPosition === "end" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
labelEl,
|
|
25
|
+
iconEl
|
|
26
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
|
+
iconEl,
|
|
28
|
+
labelEl
|
|
29
|
+
] }) });
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
export { Icon, SeverityIcon };
|
|
@@ -133,6 +133,18 @@
|
|
|
133
133
|
background-color: var(--color-bg-toolbar-hover);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/* The row already conveys hover via the background color above, covering
|
|
137
|
+
the whole item consistently. Suppress RadioButton's own icon hover
|
|
138
|
+
border here — otherwise it only lights up when the pointer happens to
|
|
139
|
+
be over the icon/label/endAdornment rather than anywhere in the row.
|
|
140
|
+
RadioButton's hashed class names can't be targeted directly from this
|
|
141
|
+
module, so this relies on a CSS custom property that RadioButton's own
|
|
142
|
+
hover rule reads — custom properties inherit through the DOM regardless
|
|
143
|
+
of CSS-module class hashing. */
|
|
144
|
+
.row:hover > .interactiveChild {
|
|
145
|
+
--radio-hover-border-color: var(--color-border-default);
|
|
146
|
+
}
|
|
147
|
+
|
|
136
148
|
/* Focus ring: support both cases */
|
|
137
149
|
.interactive:focus-visible {
|
|
138
150
|
outline: none;
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
.tableRoot {
|
|
49
49
|
--table-component-header-bg: var(--table-header-bg);
|
|
50
50
|
--table-component-header-fg: var(--table-header-fg);
|
|
51
|
-
--table-component-header-border: var(--table-border-header);
|
|
52
51
|
--table-component-header-font-weight: var(--font-weight-medium);
|
|
53
52
|
--table-component-row-bg: var(--table-row-bg);
|
|
54
53
|
--table-component-row-bg-alt: var(--table-row-bg-alt);
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
.embedded {
|
|
79
78
|
--table-component-header-bg: transparent;
|
|
80
79
|
--table-component-header-fg: var(--color-fg-subtle);
|
|
81
|
-
--table-component-header-border: transparent;
|
|
82
80
|
--table-component-header-font-weight: var(--font-weight-default);
|
|
83
81
|
--table-component-row-bg: transparent;
|
|
84
82
|
--table-component-row-bg-alt: color-mix(
|
|
@@ -162,13 +160,10 @@
|
|
|
162
160
|
.headerCell {
|
|
163
161
|
vertical-align: middle;
|
|
164
162
|
background-color: var(--table-component-header-bg);
|
|
165
|
-
border-block-end: 1px solid var(--table-component-header-border);
|
|
166
163
|
padding-block: var(--spacing-xxs);
|
|
167
164
|
padding-inline: var(--spacing-sm);
|
|
168
165
|
font-size: var(--font-size-xs);
|
|
169
166
|
font-weight: var(--table-component-header-font-weight);
|
|
170
|
-
letter-spacing: var(--letter-spacing-wide);
|
|
171
|
-
text-transform: uppercase;
|
|
172
167
|
color: var(--table-component-header-fg);
|
|
173
168
|
white-space: nowrap;
|
|
174
169
|
}
|
|
@@ -395,7 +390,7 @@
|
|
|
395
390
|
all: unset;
|
|
396
391
|
display: inline-flex;
|
|
397
392
|
align-items: center;
|
|
398
|
-
gap:
|
|
393
|
+
gap: var(--spacing-2xs);
|
|
399
394
|
min-width: 0;
|
|
400
395
|
max-inline-size: 100%;
|
|
401
396
|
cursor: pointer;
|
|
@@ -404,6 +399,17 @@
|
|
|
404
399
|
padding-block: 2px;
|
|
405
400
|
padding-inline: 2px;
|
|
406
401
|
justify-content: flex-start;
|
|
402
|
+
transition: color var(--transition-fast) var(--ease-standard);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.thButton:hover {
|
|
406
|
+
color: var(--color-fg-default);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.thButton:focus-visible {
|
|
410
|
+
outline: none;
|
|
411
|
+
color: var(--color-fg-default);
|
|
412
|
+
box-shadow: inset 0 0 0 1px var(--color-border-selected);
|
|
407
413
|
}
|
|
408
414
|
|
|
409
415
|
.thButtonRight {
|
|
@@ -469,6 +475,10 @@
|
|
|
469
475
|
opacity: 0.45;
|
|
470
476
|
}
|
|
471
477
|
|
|
478
|
+
.activeSort {
|
|
479
|
+
color: var(--color-fg-default);
|
|
480
|
+
}
|
|
481
|
+
|
|
472
482
|
.cellContent {
|
|
473
483
|
display: flex;
|
|
474
484
|
inline-size: 100%;
|
|
@@ -21,7 +21,6 @@ function TableHeaderCell({
|
|
|
21
21
|
const active = table_utils.isActiveSort(sortById, column.id);
|
|
22
22
|
const ariaSort = table_utils.getAriaSort(column.sortable, active, sortDirection != null ? sortDirection : null);
|
|
23
23
|
const align = table_classes.getAlignValue(column);
|
|
24
|
-
const dividerClass = table_classes.getDividerClass(column);
|
|
25
24
|
const alignClasses = table_classes.getHeaderAlignClasses(align);
|
|
26
25
|
const handleToggleSort = () => {
|
|
27
26
|
if (!column.sortable || !onSortChange) return;
|
|
@@ -31,7 +30,7 @@ function TableHeaderCell({
|
|
|
31
30
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32
31
|
"th",
|
|
33
32
|
{
|
|
34
|
-
className:
|
|
33
|
+
className: styles__default.default.headerCell,
|
|
35
34
|
scope: "col",
|
|
36
35
|
"aria-sort": ariaSort,
|
|
37
36
|
"data-align": align,
|
|
@@ -52,8 +51,8 @@ function TableHeaderCell({
|
|
|
52
51
|
children: [
|
|
53
52
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: alignClasses.label, children: table_utils.getHeaderLabel(column.header) }),
|
|
54
53
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles__default.default.sortIndicator, "aria-hidden": "true", children: [
|
|
55
|
-
active && sortDirection === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, {}),
|
|
56
|
-
active && sortDirection === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, {}),
|
|
54
|
+
active && sortDirection === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: styles__default.default.activeSort }),
|
|
55
|
+
active && sortDirection === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: styles__default.default.activeSort }),
|
|
57
56
|
!active && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: styles__default.default.inActiveSort })
|
|
58
57
|
] })
|
|
59
58
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { ArrowUp, ArrowDown } from 'lucide-react';
|
|
3
|
-
import { getAlignValue,
|
|
3
|
+
import { getAlignValue, getHeaderAlignClasses } from '../table.classes';
|
|
4
4
|
import styles from '../Table.module.css';
|
|
5
5
|
import { isActiveSort, getAriaSort, getHeaderLabel, shouldToggleOnKey, getNextSortDirection } from '../table.utils';
|
|
6
6
|
|
|
@@ -15,7 +15,6 @@ function TableHeaderCell({
|
|
|
15
15
|
const active = isActiveSort(sortById, column.id);
|
|
16
16
|
const ariaSort = getAriaSort(column.sortable, active, sortDirection != null ? sortDirection : null);
|
|
17
17
|
const align = getAlignValue(column);
|
|
18
|
-
const dividerClass = getDividerClass(column);
|
|
19
18
|
const alignClasses = getHeaderAlignClasses(align);
|
|
20
19
|
const handleToggleSort = () => {
|
|
21
20
|
if (!column.sortable || !onSortChange) return;
|
|
@@ -25,7 +24,7 @@ function TableHeaderCell({
|
|
|
25
24
|
return /* @__PURE__ */ jsxs(
|
|
26
25
|
"th",
|
|
27
26
|
{
|
|
28
|
-
className:
|
|
27
|
+
className: styles.headerCell,
|
|
29
28
|
scope: "col",
|
|
30
29
|
"aria-sort": ariaSort,
|
|
31
30
|
"data-align": align,
|
|
@@ -46,8 +45,8 @@ function TableHeaderCell({
|
|
|
46
45
|
children: [
|
|
47
46
|
/* @__PURE__ */ jsx("span", { className: alignClasses.label, children: getHeaderLabel(column.header) }),
|
|
48
47
|
/* @__PURE__ */ jsxs("span", { className: styles.sortIndicator, "aria-hidden": "true", children: [
|
|
49
|
-
active && sortDirection === "asc" && /* @__PURE__ */ jsx(ArrowUp, {}),
|
|
50
|
-
active && sortDirection === "desc" && /* @__PURE__ */ jsx(ArrowDown, {}),
|
|
48
|
+
active && sortDirection === "asc" && /* @__PURE__ */ jsx(ArrowUp, { className: styles.activeSort }),
|
|
49
|
+
active && sortDirection === "desc" && /* @__PURE__ */ jsx(ArrowDown, { className: styles.activeSort }),
|
|
51
50
|
!active && /* @__PURE__ */ jsx(ArrowDown, { className: styles.inActiveSort })
|
|
52
51
|
] })
|
|
53
52
|
]
|
package/dist/styles/styles.css
CHANGED
|
@@ -89,6 +89,7 @@ body.dbc-app {
|
|
|
89
89
|
.dbc-table th,
|
|
90
90
|
.dbc-table td {
|
|
91
91
|
padding-block: var(--spacing-xxs);
|
|
92
|
+
padding-inline: var(--spacing-xxs);
|
|
92
93
|
vertical-align: baseline;
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -101,9 +102,7 @@ body.dbc-app {
|
|
|
101
102
|
font-size: var(--font-size-xs);
|
|
102
103
|
color: var(--color-fg-subtle);
|
|
103
104
|
letter-spacing: var(--letter-spacing-wide);
|
|
104
|
-
text-transform: uppercase;
|
|
105
105
|
font-weight: var(--font-weight-default);
|
|
106
|
-
padding-right: var(--spacing-lg);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
.dbc-table td {
|
|
@@ -115,8 +114,37 @@ body.dbc-app {
|
|
|
115
114
|
word-break: break-word;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
/* Larger vertical padding (default is --spacing-xxs) */
|
|
118
|
+
.dbc-table--md th,
|
|
119
|
+
.dbc-table--md td {
|
|
120
|
+
padding-block: var(--spacing-xs);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* --hover can go on the <table> (every row hovers) or directly on a <tr>
|
|
124
|
+
(opt in only specific rows, leaving the rest unaffected). */
|
|
125
|
+
.dbc-table--hover tbody tr:hover,
|
|
126
|
+
tr.dbc-table--hover:hover {
|
|
119
127
|
background-color: var(--color-bg-contextual);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Round the hovered row's leading/trailing edge (tr itself can't take a
|
|
132
|
+
border-radius reliably in table layout) — same token as Menu.item's
|
|
133
|
+
hover background. */
|
|
134
|
+
.dbc-table--hover tbody tr:hover th:first-child,
|
|
135
|
+
.dbc-table--hover tbody tr:hover td:first-child,
|
|
136
|
+
tr.dbc-table--hover:hover th:first-child,
|
|
137
|
+
tr.dbc-table--hover:hover td:first-child {
|
|
138
|
+
border-top-left-radius: var(--border-radius-md);
|
|
139
|
+
border-bottom-left-radius: var(--border-radius-md);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.dbc-table--hover tbody tr:hover th:last-child,
|
|
143
|
+
.dbc-table--hover tbody tr:hover td:last-child,
|
|
144
|
+
tr.dbc-table--hover:hover th:last-child,
|
|
145
|
+
tr.dbc-table--hover:hover td:last-child {
|
|
146
|
+
border-top-right-radius: var(--border-radius-md);
|
|
147
|
+
border-bottom-right-radius: var(--border-radius-md);
|
|
120
148
|
}
|
|
121
149
|
|
|
122
150
|
.dbc-table--clickableRow tbody tr:hover {
|
|
@@ -128,7 +156,8 @@ body.dbc-app {
|
|
|
128
156
|
background-color: var(--table-row-bg-alt);
|
|
129
157
|
}
|
|
130
158
|
|
|
131
|
-
.dbc-table--striped.dbc-table--hover tbody tr:hover
|
|
159
|
+
.dbc-table--striped.dbc-table--hover tbody tr:hover,
|
|
160
|
+
.dbc-table--striped tr.dbc-table--hover:hover {
|
|
132
161
|
background-color: var(--table-row-bg-hover);
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -162,66 +191,13 @@ body.dbc-app {
|
|
|
162
191
|
vertical-align: middle;
|
|
163
192
|
}
|
|
164
193
|
|
|
165
|
-
/*
|
|
166
|
-
|
|
167
|
-
.dbc-table--
|
|
168
|
-
|
|
169
|
-
border-collapse: collapse;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.dbc-table--matrix th,
|
|
173
|
-
.dbc-table--matrix td {
|
|
174
|
-
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
175
|
-
border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
|
|
176
|
-
line-height: var(--line-height-tight);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.dbc-table--matrix thead th {
|
|
180
|
-
color: var(--table-header-fg);
|
|
181
|
-
background-color: transparent;
|
|
182
|
-
font-size: var(--font-size-xs);
|
|
183
|
-
font-weight: var(--font-weight-medium);
|
|
184
|
-
letter-spacing: var(--letter-spacing-wide);
|
|
185
|
-
text-transform: uppercase;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.dbc-table--matrix tbody th {
|
|
189
|
-
color: var(--color-fg-default);
|
|
190
|
-
font-size: var(--font-size-sm);
|
|
191
|
-
font-weight: var(--font-weight-medium);
|
|
192
|
-
letter-spacing: normal;
|
|
193
|
-
text-transform: none;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.dbc-table--matrix td {
|
|
197
|
-
color: var(--table-cell-fg);
|
|
198
|
-
text-align: right;
|
|
199
|
-
font-variant-numeric: tabular-nums;
|
|
200
|
-
white-space: nowrap;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.dbc-table--matrix th:not(:first-child) {
|
|
194
|
+
/* Per-cell text alignment. Apply directly to a th/td to right-align that
|
|
195
|
+
column's header/content. */
|
|
196
|
+
.dbc-table th.dbc-table--align-right,
|
|
197
|
+
.dbc-table td.dbc-table--align-right {
|
|
204
198
|
text-align: right;
|
|
205
199
|
}
|
|
206
200
|
|
|
207
|
-
.dbc-table--matrix tr:last-child th,
|
|
208
|
-
.dbc-table--matrix tr:last-child td {
|
|
209
|
-
border-bottom: 0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.dbc-table--matrix-group-header th {
|
|
213
|
-
border-bottom: 0;
|
|
214
|
-
text-align: center;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.dbc-table--matrix-group-header th:first-child {
|
|
218
|
-
text-align: left;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.dbc-table--matrix-current {
|
|
222
|
-
background-color: color-mix(in srgb, var(--color-bg-selected) 45%, var(--color-bg-surface));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
201
|
/* ==========================================================================
|
|
226
202
|
Text / utility classes
|
|
227
203
|
========================================================================== */
|
|
@@ -240,7 +240,7 @@ html {
|
|
|
240
240
|
--button-fg-primary: var(--color-fg-on-brand);
|
|
241
241
|
|
|
242
242
|
/* Tables */
|
|
243
|
-
--table-header-bg: light-dark(#
|
|
243
|
+
--table-header-bg: light-dark(#f8f9fb, #1b2533);
|
|
244
244
|
--table-row-bg: light-dark(#ffffff, #111827);
|
|
245
245
|
--table-row-bg-alt: light-dark(#f7f9fc, #141d2a);
|
|
246
246
|
--table-row-bg-hover: light-dark(#eef2f7, #172131);
|
|
@@ -248,10 +248,9 @@ html {
|
|
|
248
248
|
--table-row-bg-selected-hover: var(--dbc-blue-150);
|
|
249
249
|
|
|
250
250
|
--table-border-subtle: light-dark(#eef1f4, rgba(255, 255, 255, 0.08));
|
|
251
|
-
--table-border-header: light-dark(#e2e6ea, rgba(255, 255, 255, 0.12));
|
|
252
251
|
--table-divider: light-dark(#e8ebef, rgba(255, 255, 255, 0.08));
|
|
253
252
|
|
|
254
|
-
--table-header-fg: var(--color-fg-
|
|
253
|
+
--table-header-fg: var(--color-fg-subtle);
|
|
255
254
|
--table-cell-fg: var(--color-fg-default);
|
|
256
255
|
|
|
257
256
|
/* ==========================================================================
|
package/dist/styles.css
CHANGED
|
@@ -89,6 +89,7 @@ body.dbc-app {
|
|
|
89
89
|
.dbc-table th,
|
|
90
90
|
.dbc-table td {
|
|
91
91
|
padding-block: var(--spacing-xxs);
|
|
92
|
+
padding-inline: var(--spacing-xxs);
|
|
92
93
|
vertical-align: baseline;
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -101,9 +102,7 @@ body.dbc-app {
|
|
|
101
102
|
font-size: var(--font-size-xs);
|
|
102
103
|
color: var(--color-fg-subtle);
|
|
103
104
|
letter-spacing: var(--letter-spacing-wide);
|
|
104
|
-
text-transform: uppercase;
|
|
105
105
|
font-weight: var(--font-weight-default);
|
|
106
|
-
padding-right: var(--spacing-lg);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
.dbc-table td {
|
|
@@ -115,8 +114,37 @@ body.dbc-app {
|
|
|
115
114
|
word-break: break-word;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
/* Larger vertical padding (default is --spacing-xxs) */
|
|
118
|
+
.dbc-table--md th,
|
|
119
|
+
.dbc-table--md td {
|
|
120
|
+
padding-block: var(--spacing-xs);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* --hover can go on the <table> (every row hovers) or directly on a <tr>
|
|
124
|
+
(opt in only specific rows, leaving the rest unaffected). */
|
|
125
|
+
.dbc-table--hover tbody tr:hover,
|
|
126
|
+
tr.dbc-table--hover:hover {
|
|
119
127
|
background-color: var(--color-bg-contextual);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Round the hovered row's leading/trailing edge (tr itself can't take a
|
|
132
|
+
border-radius reliably in table layout) — same token as Menu.item's
|
|
133
|
+
hover background. */
|
|
134
|
+
.dbc-table--hover tbody tr:hover th:first-child,
|
|
135
|
+
.dbc-table--hover tbody tr:hover td:first-child,
|
|
136
|
+
tr.dbc-table--hover:hover th:first-child,
|
|
137
|
+
tr.dbc-table--hover:hover td:first-child {
|
|
138
|
+
border-top-left-radius: var(--border-radius-md);
|
|
139
|
+
border-bottom-left-radius: var(--border-radius-md);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.dbc-table--hover tbody tr:hover th:last-child,
|
|
143
|
+
.dbc-table--hover tbody tr:hover td:last-child,
|
|
144
|
+
tr.dbc-table--hover:hover th:last-child,
|
|
145
|
+
tr.dbc-table--hover:hover td:last-child {
|
|
146
|
+
border-top-right-radius: var(--border-radius-md);
|
|
147
|
+
border-bottom-right-radius: var(--border-radius-md);
|
|
120
148
|
}
|
|
121
149
|
|
|
122
150
|
.dbc-table--clickableRow tbody tr:hover {
|
|
@@ -128,7 +156,8 @@ body.dbc-app {
|
|
|
128
156
|
background-color: var(--table-row-bg-alt);
|
|
129
157
|
}
|
|
130
158
|
|
|
131
|
-
.dbc-table--striped.dbc-table--hover tbody tr:hover
|
|
159
|
+
.dbc-table--striped.dbc-table--hover tbody tr:hover,
|
|
160
|
+
.dbc-table--striped tr.dbc-table--hover:hover {
|
|
132
161
|
background-color: var(--table-row-bg-hover);
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -162,66 +191,13 @@ body.dbc-app {
|
|
|
162
191
|
vertical-align: middle;
|
|
163
192
|
}
|
|
164
193
|
|
|
165
|
-
/*
|
|
166
|
-
|
|
167
|
-
.dbc-table--
|
|
168
|
-
|
|
169
|
-
border-collapse: collapse;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.dbc-table--matrix th,
|
|
173
|
-
.dbc-table--matrix td {
|
|
174
|
-
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
175
|
-
border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
|
|
176
|
-
line-height: var(--line-height-tight);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.dbc-table--matrix thead th {
|
|
180
|
-
color: var(--table-header-fg);
|
|
181
|
-
background-color: transparent;
|
|
182
|
-
font-size: var(--font-size-xs);
|
|
183
|
-
font-weight: var(--font-weight-medium);
|
|
184
|
-
letter-spacing: var(--letter-spacing-wide);
|
|
185
|
-
text-transform: uppercase;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.dbc-table--matrix tbody th {
|
|
189
|
-
color: var(--color-fg-default);
|
|
190
|
-
font-size: var(--font-size-sm);
|
|
191
|
-
font-weight: var(--font-weight-medium);
|
|
192
|
-
letter-spacing: normal;
|
|
193
|
-
text-transform: none;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.dbc-table--matrix td {
|
|
197
|
-
color: var(--table-cell-fg);
|
|
198
|
-
text-align: right;
|
|
199
|
-
font-variant-numeric: tabular-nums;
|
|
200
|
-
white-space: nowrap;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.dbc-table--matrix th:not(:first-child) {
|
|
194
|
+
/* Per-cell text alignment. Apply directly to a th/td to right-align that
|
|
195
|
+
column's header/content. */
|
|
196
|
+
.dbc-table th.dbc-table--align-right,
|
|
197
|
+
.dbc-table td.dbc-table--align-right {
|
|
204
198
|
text-align: right;
|
|
205
199
|
}
|
|
206
200
|
|
|
207
|
-
.dbc-table--matrix tr:last-child th,
|
|
208
|
-
.dbc-table--matrix tr:last-child td {
|
|
209
|
-
border-bottom: 0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.dbc-table--matrix-group-header th {
|
|
213
|
-
border-bottom: 0;
|
|
214
|
-
text-align: center;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.dbc-table--matrix-group-header th:first-child {
|
|
218
|
-
text-align: left;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.dbc-table--matrix-current {
|
|
222
|
-
background-color: color-mix(in srgb, var(--color-bg-selected) 45%, var(--color-bg-surface));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
201
|
/* ==========================================================================
|
|
226
202
|
Text / utility classes
|
|
227
203
|
========================================================================== */
|