@dbcdk/react-components 0.0.101 → 0.0.103
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/accordion/Accordion.d.ts +3 -1
- package/dist/components/accordion/components/AccordionRow.d.ts +3 -1
- package/dist/components/card/Card.d.ts +2 -0
- package/dist/components/headline/Headline.d.ts +2 -1
- package/dist/components/hyperlink/Hyperlink.d.ts +1 -0
- package/dist/components/inline-status/InlineStatus.d.ts +11 -0
- package/dist/components/page/Page.d.ts +3 -1
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +2 -1
- package/dist/index.cjs +122 -39
- package/dist/index.css +329 -56
- package/dist/index.d.ts +1 -0
- package/dist/index.js +122 -40
- package/dist/styles/styles.css +7 -3
- package/dist/styles/themes/dbc/colors.css +14 -9
- package/dist/styles.css +7 -3
- package/dist/tanstack.cjs +74 -9
- package/dist/tanstack.css +127 -9
- package/dist/tanstack.js +75 -10
- package/package.json +1 -1
package/dist/tanstack.css
CHANGED
|
@@ -168,12 +168,16 @@
|
|
|
168
168
|
.Button_button2:disabled,
|
|
169
169
|
.Button_button2[aria-disabled=true] {
|
|
170
170
|
cursor: not-allowed;
|
|
171
|
-
pointer-events: none;
|
|
172
171
|
background-color: var(--color-disabled-bg);
|
|
173
172
|
border-color: transparent;
|
|
174
173
|
color: var(--color-disabled-fg);
|
|
175
174
|
opacity: 0.5;
|
|
176
175
|
}
|
|
176
|
+
.Button_button2:is(:disabled, [aria-disabled=true]):hover {
|
|
177
|
+
background-color: var(--color-disabled-bg);
|
|
178
|
+
border-color: transparent;
|
|
179
|
+
color: var(--color-disabled-fg);
|
|
180
|
+
}
|
|
177
181
|
.Button_link2 {
|
|
178
182
|
text-decoration: none;
|
|
179
183
|
font-size: var(--font-size-sm);
|
|
@@ -194,12 +198,6 @@
|
|
|
194
198
|
.Button_icon2 {
|
|
195
199
|
display: inline-flex;
|
|
196
200
|
}
|
|
197
|
-
.Button_button2.Button_xs2 {
|
|
198
|
-
height: var(--component-size-xs);
|
|
199
|
-
min-block-size: var(--component-size-xs);
|
|
200
|
-
padding-inline: var(--spacing-xs);
|
|
201
|
-
font-size: var(--font-size-xs);
|
|
202
|
-
}
|
|
203
201
|
.Button_button2.Button_sm2 {
|
|
204
202
|
height: var(--component-size-sm);
|
|
205
203
|
min-block-size: var(--component-size-sm);
|
|
@@ -314,6 +312,17 @@
|
|
|
314
312
|
.Button_inline2.Button_active2:hover {
|
|
315
313
|
color: var(--button-bg-primary-hover);
|
|
316
314
|
}
|
|
315
|
+
.Button_button2.Button_xs2 {
|
|
316
|
+
height: auto;
|
|
317
|
+
min-block-size: 0;
|
|
318
|
+
padding-block: 0;
|
|
319
|
+
padding-inline: var(--spacing-xs);
|
|
320
|
+
font-size: var(--font-size-xs);
|
|
321
|
+
}
|
|
322
|
+
.Button_button2.Button_xs2 svg {
|
|
323
|
+
inline-size: var(--icon-size-sm);
|
|
324
|
+
block-size: var(--icon-size-sm);
|
|
325
|
+
}
|
|
317
326
|
|
|
318
327
|
/* src/components/menu/Menu.module.css */
|
|
319
328
|
.Menu_container2 {
|
|
@@ -625,7 +634,116 @@
|
|
|
625
634
|
.InputContainer_inputContainer2[data-modified] label:not(.InputContainer_label2) {
|
|
626
635
|
background-color: color-mix(in srgb, var(--color-status-warning-bg) 35%, transparent);
|
|
627
636
|
border-radius: var(--border-radius-default);
|
|
628
|
-
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* src/components/inline-status/InlineStatus.module.css */
|
|
640
|
+
.InlineStatus_container2 {
|
|
641
|
+
--inline-status-bg: var(--color-bg-toolbar);
|
|
642
|
+
--inline-status-fg: var(--color-fg-default);
|
|
643
|
+
--inline-status-border: var(--color-border-subtle);
|
|
644
|
+
display: inline-flex;
|
|
645
|
+
align-items: flex-start;
|
|
646
|
+
gap: var(--spacing-xs);
|
|
647
|
+
max-inline-size: 100%;
|
|
648
|
+
padding: var(--spacing-2xs) var(--spacing-sm);
|
|
649
|
+
border: 1px solid var(--inline-status-border);
|
|
650
|
+
border-radius: var(--border-radius-default);
|
|
651
|
+
background: var(--inline-status-bg);
|
|
652
|
+
color: var(--inline-status-fg);
|
|
653
|
+
font-family: var(--font-family);
|
|
654
|
+
font-size: var(--font-size-sm);
|
|
655
|
+
font-weight: var(--font-weight-default);
|
|
656
|
+
line-height: var(--line-height-normal);
|
|
657
|
+
box-sizing: border-box;
|
|
658
|
+
}
|
|
659
|
+
.InlineStatus_fullWidth2 {
|
|
660
|
+
display: flex;
|
|
661
|
+
inline-size: 100%;
|
|
662
|
+
}
|
|
663
|
+
.InlineStatus_leading2 {
|
|
664
|
+
display: inline-flex;
|
|
665
|
+
align-items: center;
|
|
666
|
+
justify-content: center;
|
|
667
|
+
flex: 0 0 auto;
|
|
668
|
+
block-size: 1lh;
|
|
669
|
+
}
|
|
670
|
+
.InlineStatus_leading2 svg {
|
|
671
|
+
inline-size: var(--icon-size-sm);
|
|
672
|
+
block-size: var(--icon-size-sm);
|
|
673
|
+
color: currentColor;
|
|
674
|
+
}
|
|
675
|
+
.InlineStatus_body2 {
|
|
676
|
+
min-width: 0;
|
|
677
|
+
overflow-wrap: anywhere;
|
|
678
|
+
word-break: break-word;
|
|
679
|
+
white-space: normal;
|
|
680
|
+
}
|
|
681
|
+
.InlineStatus_sm2 {
|
|
682
|
+
font-size: var(--font-size-xs);
|
|
683
|
+
}
|
|
684
|
+
.InlineStatus_md2 {
|
|
685
|
+
font-size: var(--font-size-sm);
|
|
686
|
+
}
|
|
687
|
+
.InlineStatus_neutral2 {
|
|
688
|
+
--inline-status-bg: var(--color-bg-toolbar);
|
|
689
|
+
--inline-status-fg: var(--color-fg-default);
|
|
690
|
+
--inline-status-border: transparent;
|
|
691
|
+
}
|
|
692
|
+
.InlineStatus_success2 {
|
|
693
|
+
--inline-status-bg: var(--color-status-success-bg);
|
|
694
|
+
--inline-status-fg: var(--color-status-success-fg);
|
|
695
|
+
--inline-status-border: var(--color-status-success-border);
|
|
696
|
+
}
|
|
697
|
+
.InlineStatus_warning2 {
|
|
698
|
+
--inline-status-bg: var(--color-status-warning-bg);
|
|
699
|
+
--inline-status-fg: var(--color-status-warning-fg);
|
|
700
|
+
--inline-status-border: var(--color-status-warning-border);
|
|
701
|
+
}
|
|
702
|
+
.InlineStatus_error2 {
|
|
703
|
+
--inline-status-bg: var(--color-status-error-bg);
|
|
704
|
+
--inline-status-fg: var(--color-status-error-fg);
|
|
705
|
+
--inline-status-border: var(--color-status-error-border);
|
|
706
|
+
}
|
|
707
|
+
.InlineStatus_info2 {
|
|
708
|
+
--inline-status-bg: var(--color-status-info-bg);
|
|
709
|
+
--inline-status-fg: var(--color-status-info-fg);
|
|
710
|
+
--inline-status-border: var(--color-status-info-border);
|
|
711
|
+
}
|
|
712
|
+
.InlineStatus_brand2 {
|
|
713
|
+
--inline-status-bg: color-mix(in srgb, var(--color-brand) 10%, var(--color-bg-surface));
|
|
714
|
+
--inline-status-fg: var(--color-brand);
|
|
715
|
+
--inline-status-border: color-mix(in srgb, var(--color-brand) 35%, transparent);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/* src/components/icon/Icon.module.css */
|
|
719
|
+
.Icon_container2 {
|
|
720
|
+
display: inline-flex;
|
|
721
|
+
align-items: center;
|
|
722
|
+
vertical-align: middle;
|
|
723
|
+
gap: var(--spacing-xxs);
|
|
724
|
+
color: var(--color-fg-subtle);
|
|
725
|
+
font-size: var(--font-size-sm);
|
|
726
|
+
}
|
|
727
|
+
.Icon_icon2 {
|
|
728
|
+
display: flex;
|
|
729
|
+
}
|
|
730
|
+
.Icon_icon2 svg {
|
|
731
|
+
height: var(--icon-size-md);
|
|
732
|
+
}
|
|
733
|
+
.Icon_success2 {
|
|
734
|
+
color: var(--color-status-success);
|
|
735
|
+
}
|
|
736
|
+
.Icon_error2 {
|
|
737
|
+
color: var(--color-status-error);
|
|
738
|
+
}
|
|
739
|
+
.Icon_warning2 {
|
|
740
|
+
color: var(--color-status-warning);
|
|
741
|
+
}
|
|
742
|
+
.Icon_info2 {
|
|
743
|
+
color: var(--color-status-info);
|
|
744
|
+
}
|
|
745
|
+
.Icon_brand2 {
|
|
746
|
+
color: var(--color-fg-on-brand);
|
|
629
747
|
}
|
|
630
748
|
|
|
631
749
|
/* src/components/forms/radio-buttons/RadioButtons.module.css */
|
|
@@ -766,7 +884,7 @@
|
|
|
766
884
|
padding: var(--spacing-xxs);
|
|
767
885
|
z-index: var(--z-popover);
|
|
768
886
|
overflow: auto;
|
|
769
|
-
box-shadow:
|
|
887
|
+
box-shadow: var(--shadow-md);
|
|
770
888
|
}
|
|
771
889
|
.Popover_content2[hidden] {
|
|
772
890
|
display: none;
|
package/dist/tanstack.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useReactTable, getSortedRowModel, getCoreRowModel } from '@tanstack/rea
|
|
|
2
2
|
import * as React8 from 'react';
|
|
3
3
|
import { createContext, forwardRef, useId, useState, useRef, useEffect, useCallback, useImperativeHandle, useLayoutEffect, useContext, useMemo } from 'react';
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
-
import { LoaderCircle, ChevronUp, ChevronDown, Check, ListChevronsDownUp, Settings, ChevronsLeft, ArrowLeft, ArrowRight, ChevronsRight, ArrowUp, ArrowDown } from 'lucide-react';
|
|
5
|
+
import { LoaderCircle, ChevronUp, ChevronDown, Check, Building2, CircleAlert, Info, CircleX, CircleCheck, ListChevronsDownUp, Settings, ChevronsLeft, ArrowLeft, ArrowRight, ChevronsRight, ArrowUp, ArrowDown } from 'lucide-react';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
|
|
8
8
|
// src/components/table/components/column-resizer/ColumnResizer.module.css
|
|
@@ -150,7 +150,6 @@ var Button_default = {
|
|
|
150
150
|
rounded: "Button_rounded2",
|
|
151
151
|
link: "Button_link2",
|
|
152
152
|
icon: "Button_icon2",
|
|
153
|
-
xs: "Button_xs2",
|
|
154
153
|
sm: "Button_sm2",
|
|
155
154
|
lg: "Button_lg2",
|
|
156
155
|
fullWidth: "Button_fullWidth2",
|
|
@@ -161,7 +160,8 @@ var Button_default = {
|
|
|
161
160
|
active: "Button_active2",
|
|
162
161
|
success: "Button_success2",
|
|
163
162
|
danger: "Button_danger2",
|
|
164
|
-
inline: "Button_inline2"
|
|
163
|
+
inline: "Button_inline2",
|
|
164
|
+
xs: "Button_xs2"
|
|
165
165
|
};
|
|
166
166
|
function cx(...parts) {
|
|
167
167
|
return parts.filter(Boolean).join(" ");
|
|
@@ -321,6 +321,73 @@ var InputContainer_default = {
|
|
|
321
321
|
messageRow: "InputContainer_messageRow2",
|
|
322
322
|
inputContainer: "InputContainer_inputContainer2"
|
|
323
323
|
};
|
|
324
|
+
|
|
325
|
+
// src/components/inline-status/InlineStatus.module.css
|
|
326
|
+
var InlineStatus_default = {
|
|
327
|
+
container: "InlineStatus_container2",
|
|
328
|
+
fullWidth: "InlineStatus_fullWidth2",
|
|
329
|
+
leading: "InlineStatus_leading2",
|
|
330
|
+
body: "InlineStatus_body2",
|
|
331
|
+
sm: "InlineStatus_sm2",
|
|
332
|
+
md: "InlineStatus_md2",
|
|
333
|
+
neutral: "InlineStatus_neutral2",
|
|
334
|
+
success: "InlineStatus_success2",
|
|
335
|
+
warning: "InlineStatus_warning2",
|
|
336
|
+
error: "InlineStatus_error2",
|
|
337
|
+
info: "InlineStatus_info2",
|
|
338
|
+
brand: "InlineStatus_brand2"
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// src/components/icon/Icon.module.css
|
|
342
|
+
var Icon_default = {
|
|
343
|
+
container: "Icon_container2",
|
|
344
|
+
icon: "Icon_icon2",
|
|
345
|
+
success: "Icon_success2",
|
|
346
|
+
error: "Icon_error2",
|
|
347
|
+
warning: "Icon_warning2",
|
|
348
|
+
info: "Icon_info2",
|
|
349
|
+
brand: "Icon_brand2"
|
|
350
|
+
};
|
|
351
|
+
var SeverityIcon = {
|
|
352
|
+
neutral: /* @__PURE__ */ jsx(CircleCheck, {}),
|
|
353
|
+
success: /* @__PURE__ */ jsx(CircleCheck, {}),
|
|
354
|
+
error: /* @__PURE__ */ jsx(CircleX, {}),
|
|
355
|
+
info: /* @__PURE__ */ jsx(Info, {}),
|
|
356
|
+
warning: /* @__PURE__ */ jsx(CircleAlert, {}),
|
|
357
|
+
brand: /* @__PURE__ */ jsx(Building2, {})
|
|
358
|
+
};
|
|
359
|
+
function Icon({ severity, label, customIcon }) {
|
|
360
|
+
return /* @__PURE__ */ jsxs("div", { className: `${Icon_default.container}`, children: [
|
|
361
|
+
/* @__PURE__ */ jsx("span", { className: `${Icon_default.icon} ${severity ? Icon_default[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null }),
|
|
362
|
+
label && /* @__PURE__ */ jsx("span", { children: label })
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
function InlineStatus({
|
|
366
|
+
children,
|
|
367
|
+
severity = "neutral",
|
|
368
|
+
customIcon,
|
|
369
|
+
disableIcon = false,
|
|
370
|
+
fullWidth = false,
|
|
371
|
+
size = "sm"
|
|
372
|
+
}) {
|
|
373
|
+
const hasLeading = Boolean(customIcon) || !disableIcon;
|
|
374
|
+
return /* @__PURE__ */ jsxs(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
className: [
|
|
378
|
+
InlineStatus_default.container,
|
|
379
|
+
InlineStatus_default[severity],
|
|
380
|
+
InlineStatus_default[size],
|
|
381
|
+
fullWidth ? InlineStatus_default.fullWidth : "",
|
|
382
|
+
hasLeading ? InlineStatus_default.hasLeading : ""
|
|
383
|
+
].filter(Boolean).join(" "),
|
|
384
|
+
children: [
|
|
385
|
+
hasLeading ? /* @__PURE__ */ jsx("span", { className: InlineStatus_default.leading, children: customIcon != null ? customIcon : /* @__PURE__ */ jsx(Icon, { severity }) }) : null,
|
|
386
|
+
/* @__PURE__ */ jsx("span", { className: InlineStatus_default.body, children })
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
}
|
|
324
391
|
function InputContainer({
|
|
325
392
|
label,
|
|
326
393
|
labelAction,
|
|
@@ -336,8 +403,6 @@ function InputContainer({
|
|
|
336
403
|
labelWidth = "160px",
|
|
337
404
|
modified = false
|
|
338
405
|
}) {
|
|
339
|
-
const message = error != null ? error : helpText;
|
|
340
|
-
const messageClass = error ? InputContainer_default.errorText : InputContainer_default.helpText;
|
|
341
406
|
const renderLabelRow = (label || labelAction) && /* @__PURE__ */ jsxs("div", { className: `${InputContainer_default.labelRow} dbc-flex dbc-items-center dbc-gap-md`, children: [
|
|
342
407
|
label && /* @__PURE__ */ jsxs("label", { className: InputContainer_default.label, htmlFor, children: [
|
|
343
408
|
label,
|
|
@@ -345,10 +410,10 @@ function InputContainer({
|
|
|
345
410
|
] }),
|
|
346
411
|
labelAction && /* @__PURE__ */ jsx("div", { className: InputContainer_default.labelAction, children: labelAction })
|
|
347
412
|
] });
|
|
348
|
-
const renderMessageRow = (
|
|
349
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
413
|
+
const renderMessageRow = (error || helpText || helpTextAddition) && /* @__PURE__ */ jsx("div", { className: `${error ? InputContainer_default.errorText : InputContainer_default.helpText} ${InputContainer_default.messageRow}`, children: error ? /* @__PURE__ */ jsx(InlineStatus, { severity: "error", disableIcon: true, children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
414
|
+
/* @__PURE__ */ jsx("span", { children: helpText }),
|
|
350
415
|
helpTextAddition && /* @__PURE__ */ jsx("span", { className: InputContainer_default.helpTextAddition, children: helpTextAddition })
|
|
351
|
-
] });
|
|
416
|
+
] }) });
|
|
352
417
|
if (orientation === "vertical") {
|
|
353
418
|
return /* @__PURE__ */ jsxs(
|
|
354
419
|
"div",
|
|
@@ -1637,7 +1702,7 @@ function TableRow({
|
|
|
1637
1702
|
columns.map((column) => {
|
|
1638
1703
|
var _a2, _b, _c, _d;
|
|
1639
1704
|
const allowWrap = shouldAllowWrap(column.allowWrap, isSelected, viewMode);
|
|
1640
|
-
|
|
1705
|
+
column.allowOverflow;
|
|
1641
1706
|
const cellValue = getCellDisplayValue(row, column);
|
|
1642
1707
|
return /* @__PURE__ */ jsx(
|
|
1643
1708
|
"td",
|
|
@@ -1657,7 +1722,7 @@ function TableRow({
|
|
|
1657
1722
|
className: Table_default.cellContent,
|
|
1658
1723
|
"data-align": (_c = column.align) != null ? _c : "left",
|
|
1659
1724
|
"data-vertical-align": (_d = column.verticalAlign) != null ? _d : "top",
|
|
1660
|
-
children:
|
|
1725
|
+
children: /* @__PURE__ */ jsx("div", { className: Table_default.cellValueEllipsis, children: cellValue })
|
|
1661
1726
|
}
|
|
1662
1727
|
)
|
|
1663
1728
|
},
|