@dbcdk/react-components 0.0.101 → 0.0.102
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/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 +108 -32
- package/dist/index.css +198 -54
- package/dist/index.d.ts +1 -0
- package/dist/index.js +108 -33
- 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 +4 -4
- package/dist/tanstack.css +12 -8
- package/dist/tanstack.js +4 -4
- package/package.json +1 -1
|
@@ -11,10 +11,12 @@ export interface AccordionItem {
|
|
|
11
11
|
}
|
|
12
12
|
type Size = 'sm' | 'md' | 'lg';
|
|
13
13
|
type Mode = 'single' | 'multiple';
|
|
14
|
+
type Variant = 'default' | 'outlined';
|
|
14
15
|
export interface AccordionProps {
|
|
15
16
|
items: AccordionItem[];
|
|
16
17
|
mode?: Mode;
|
|
17
18
|
size?: Size;
|
|
19
|
+
variant?: Variant;
|
|
18
20
|
/** Uncontrolled defaults */
|
|
19
21
|
defaultOpenIndex?: number | null;
|
|
20
22
|
defaultOpenIndexes?: number[] | 'all';
|
|
@@ -25,5 +27,5 @@ export interface AccordionProps {
|
|
|
25
27
|
onOpenIndexChange?: (index: number | null) => void;
|
|
26
28
|
onOpenIndexesChange?: (indexes: number[]) => void;
|
|
27
29
|
}
|
|
28
|
-
export declare function Accordion({ items, mode, size, defaultOpenIndex, defaultOpenIndexes, openIndex, openIndexes, onOpenIndexChange, onOpenIndexesChange, }: AccordionProps): JSX.Element;
|
|
30
|
+
export declare function Accordion({ items, mode, size, variant, defaultOpenIndex, defaultOpenIndexes, openIndex, openIndexes, onOpenIndexChange, onOpenIndexesChange, }: AccordionProps): JSX.Element;
|
|
29
31
|
export {};
|
|
@@ -7,5 +7,7 @@ export type AccordionRowProps = {
|
|
|
7
7
|
isOpen: boolean;
|
|
8
8
|
onToggle: (index: number) => void;
|
|
9
9
|
shouldAnimate?: boolean;
|
|
10
|
+
headlineSize?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
11
|
+
variant?: 'default' | 'outlined';
|
|
10
12
|
};
|
|
11
|
-
export declare function AccordionRow({ uid, index, item, isOpen, onToggle, shouldAnimate, }: AccordionRowProps): JSX.Element;
|
|
13
|
+
export declare function AccordionRow({ uid, index, item, isOpen, onToggle, shouldAnimate, headlineSize, variant, }: AccordionRowProps): JSX.Element;
|
|
@@ -4,12 +4,14 @@ import { CardMeta, CardMetaRow } from './components/CardMeta';
|
|
|
4
4
|
type CardVariant = 'default' | 'subtle';
|
|
5
5
|
type CardSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
type CardImagePlacement = 'left' | 'right' | 'top';
|
|
7
|
+
type CardElevation = 'none' | 'xs' | 'sm' | 'md';
|
|
7
8
|
export interface CardProps {
|
|
8
9
|
title?: string;
|
|
9
10
|
subheader?: ReactNode;
|
|
10
11
|
loading?: boolean;
|
|
11
12
|
variant?: CardVariant;
|
|
12
13
|
size?: CardSize;
|
|
14
|
+
elevation?: CardElevation;
|
|
13
15
|
headerMarker?: boolean;
|
|
14
16
|
headerIcon?: ReactNode;
|
|
15
17
|
headerAddition?: ReactNode;
|
|
@@ -3,6 +3,7 @@ import { Severity } from '../../constants/severity.types';
|
|
|
3
3
|
type HeadlineTone = 'dark' | 'light';
|
|
4
4
|
type HeadlineVariant = 'default' | 'muted';
|
|
5
5
|
export interface HeadlineProps extends React.AriaAttributes {
|
|
6
|
+
id?: string;
|
|
6
7
|
size?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
8
|
marker?: boolean;
|
|
8
9
|
disableMargin?: boolean;
|
|
@@ -15,5 +16,5 @@ export interface HeadlineProps extends React.AriaAttributes {
|
|
|
15
16
|
tone?: HeadlineTone;
|
|
16
17
|
variant?: HeadlineVariant;
|
|
17
18
|
}
|
|
18
|
-
export declare function Headline({ size, marker, disableMargin, children, severity, weight, subheader, addition, icon, tone, variant, allowWrap, }: PropsWithChildren<HeadlineProps>): React.JSX.Element;
|
|
19
|
+
export declare function Headline({ size, marker, disableMargin, children, severity, weight, subheader, addition, icon, tone, variant, allowWrap, id, }: PropsWithChildren<HeadlineProps>): React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from 'react';
|
|
2
|
+
import type { Severity } from '../../constants/severity.types';
|
|
3
|
+
export interface InlineStatusProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
severity?: Severity;
|
|
6
|
+
customIcon?: ReactNode;
|
|
7
|
+
disableIcon?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
}
|
|
11
|
+
export declare function InlineStatus({ children, severity, customIcon, disableIcon, fullWidth, size, }: InlineStatusProps): JSX.Element;
|
|
@@ -8,12 +8,14 @@ interface PageProps {
|
|
|
8
8
|
headerIcon?: ReactNode;
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
headerAddition?: ReactNode;
|
|
11
|
+
/** @deprecated use contentBox instead */
|
|
11
12
|
disableContentBox?: boolean;
|
|
13
|
+
contentBox?: boolean;
|
|
12
14
|
disableTopPadding?: boolean;
|
|
13
15
|
maxWidth?: 'sm' | 'md' | 'lg';
|
|
14
16
|
breadcrumbs?: BreadcrumbItem[];
|
|
15
17
|
containScrolling?: boolean;
|
|
16
18
|
loading?: boolean;
|
|
17
19
|
}
|
|
18
|
-
export declare function Page({ header, subheader, severity, headerIcon, headerAddition, breadcrumbs, disableContentBox, disableTopPadding, maxWidth, containScrolling, children, loading, }: PageProps): ReactNode;
|
|
20
|
+
export declare function Page({ header, subheader, severity, headerIcon, headerAddition, breadcrumbs, disableContentBox, contentBox, disableTopPadding, maxWidth, containScrolling, children, loading, }: PageProps): ReactNode;
|
|
19
21
|
export {};
|
|
@@ -8,13 +8,14 @@ export type Segment = {
|
|
|
8
8
|
color?: string;
|
|
9
9
|
label?: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
+
export type ProgressBarSize = '2xs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
11
12
|
export interface SegmentedProgressBarProps {
|
|
12
13
|
segments: Segment[];
|
|
13
14
|
total?: number;
|
|
14
15
|
showRemainder?: boolean;
|
|
15
16
|
remainderSeverity?: Severity | ProgressSeverity;
|
|
16
17
|
centerLabel?: React.ReactNode | ((filledPct: number) => React.ReactNode);
|
|
17
|
-
|
|
18
|
+
size?: ProgressBarSize;
|
|
18
19
|
rounded?: boolean;
|
|
19
20
|
trackColor?: string;
|
|
20
21
|
tooltipPlacement?: TooltipPlacement;
|
package/dist/index.cjs
CHANGED
|
@@ -426,7 +426,6 @@ var Button_default = {
|
|
|
426
426
|
rounded: "Button_rounded",
|
|
427
427
|
link: "Button_link",
|
|
428
428
|
icon: "Button_icon",
|
|
429
|
-
xs: "Button_xs",
|
|
430
429
|
sm: "Button_sm",
|
|
431
430
|
lg: "Button_lg",
|
|
432
431
|
fullWidth: "Button_fullWidth",
|
|
@@ -437,7 +436,8 @@ var Button_default = {
|
|
|
437
436
|
active: "Button_active",
|
|
438
437
|
success: "Button_success",
|
|
439
438
|
danger: "Button_danger",
|
|
440
|
-
inline: "Button_inline"
|
|
439
|
+
inline: "Button_inline",
|
|
440
|
+
xs: "Button_xs"
|
|
441
441
|
};
|
|
442
442
|
function cx(...parts) {
|
|
443
443
|
return parts.filter(Boolean).join(" ");
|
|
@@ -804,7 +804,8 @@ function Headline({
|
|
|
804
804
|
icon,
|
|
805
805
|
tone,
|
|
806
806
|
variant,
|
|
807
|
-
allowWrap = true
|
|
807
|
+
allowWrap = true,
|
|
808
|
+
id
|
|
808
809
|
}) {
|
|
809
810
|
const Tag = `h${size}`;
|
|
810
811
|
const containerClassName = [Headline_default.headlineContainer, tone ? Headline_default[`tone-${tone}`] : ""].filter(Boolean).join(" ");
|
|
@@ -820,6 +821,7 @@ function Headline({
|
|
|
820
821
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
821
822
|
Tag,
|
|
822
823
|
{
|
|
824
|
+
id,
|
|
823
825
|
style: {
|
|
824
826
|
"--font-weight": weight,
|
|
825
827
|
"--marker-color": severity ? SeverityBgColor[severity] : void 0
|
|
@@ -2531,7 +2533,7 @@ function Tabs({
|
|
|
2531
2533
|
"div",
|
|
2532
2534
|
{
|
|
2533
2535
|
className: [Tabs_default.headerContainer, disableTopPadding ? Tabs_default.disableTopPadding : ""].filter(Boolean).join(" "),
|
|
2534
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Headline, { disableMargin: true, size:
|
|
2536
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Headline, { disableMargin: true, size: 1, subheader, addition, children: header })
|
|
2535
2537
|
}
|
|
2536
2538
|
) : null,
|
|
2537
2539
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${Tabs_default.tabs} ${Tabs_default[variant]} ${panelStyle ? Tabs_default.panelStyle : ""}`, children: [
|
|
@@ -3449,6 +3451,10 @@ function Panel({
|
|
|
3449
3451
|
var Card_default = {
|
|
3450
3452
|
outerContainer: "Card_outerContainer",
|
|
3451
3453
|
container: "Card_container",
|
|
3454
|
+
elevationNone: "Card_elevationNone",
|
|
3455
|
+
elevationXs: "Card_elevationXs",
|
|
3456
|
+
elevationSm: "Card_elevationSm",
|
|
3457
|
+
elevationMd: "Card_elevationMd",
|
|
3452
3458
|
variantDefault: "Card_variantDefault",
|
|
3453
3459
|
variantSubtle: "Card_variantSubtle",
|
|
3454
3460
|
sm: "Card_sm",
|
|
@@ -3576,6 +3582,7 @@ function CardImpl({
|
|
|
3576
3582
|
loading = false,
|
|
3577
3583
|
variant = "default",
|
|
3578
3584
|
size = "md",
|
|
3585
|
+
elevation = "sm",
|
|
3579
3586
|
headerMarker = true,
|
|
3580
3587
|
headerIcon,
|
|
3581
3588
|
headerAddition,
|
|
@@ -3592,6 +3599,7 @@ function CardImpl({
|
|
|
3592
3599
|
width,
|
|
3593
3600
|
headlineSize = 4
|
|
3594
3601
|
}) {
|
|
3602
|
+
var _a;
|
|
3595
3603
|
const outerStyle = width ? {
|
|
3596
3604
|
["--width"]: `${width}%`,
|
|
3597
3605
|
["--gap-share"]: getGapShare(width)
|
|
@@ -3599,6 +3607,7 @@ function CardImpl({
|
|
|
3599
3607
|
const mediaStyle = mediaWidth ? { ["--card-media-width"]: `${mediaWidth}px` } : void 0;
|
|
3600
3608
|
const innerPlacementClass = getInnerPlacementClass(imgPlacement, Card_default);
|
|
3601
3609
|
const variantClass = getVariantClass(variant, Card_default);
|
|
3610
|
+
const elevationClass = (_a = Card_default[`elevation${elevation.charAt(0).toUpperCase()}${elevation.slice(1)}`]) != null ? _a : Card_default.elevationSm;
|
|
3602
3611
|
const hasHeader = !!title || !!headerMeta;
|
|
3603
3612
|
const showSection = !loading && (showSectionDivider || !!sectionTitle);
|
|
3604
3613
|
const showBody = !loading && !!children;
|
|
@@ -3636,7 +3645,7 @@ function CardImpl({
|
|
|
3636
3645
|
] })
|
|
3637
3646
|
] });
|
|
3638
3647
|
const cardContent = link ? /* @__PURE__ */ jsxRuntime.jsx(Hyperlink, { children: link }) : inner;
|
|
3639
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${Card_default.outerContainer} ${Card_default[size]}`, style: outerStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${Card_default.container} ${variantClass}`, children: cardContent }) });
|
|
3648
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${Card_default.outerContainer} ${Card_default[size]}`, style: outerStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${Card_default.container} ${variantClass} ${elevationClass}`, children: cardContent }) });
|
|
3640
3649
|
}
|
|
3641
3650
|
var Card = Object.assign(CardImpl, {
|
|
3642
3651
|
Meta: CardMeta,
|
|
@@ -3683,7 +3692,7 @@ var Page_default = {
|
|
|
3683
3692
|
headerMain: "Page_headerMain",
|
|
3684
3693
|
content: "Page_content",
|
|
3685
3694
|
contentLoading: "Page_contentLoading",
|
|
3686
|
-
|
|
3695
|
+
contentBox: "Page_contentBox"
|
|
3687
3696
|
};
|
|
3688
3697
|
|
|
3689
3698
|
// src/components/breadcrumbs/Breadcrumbs.module.css
|
|
@@ -3710,12 +3719,14 @@ function Page({
|
|
|
3710
3719
|
headerAddition,
|
|
3711
3720
|
breadcrumbs,
|
|
3712
3721
|
disableContentBox,
|
|
3722
|
+
contentBox = false,
|
|
3713
3723
|
disableTopPadding = true,
|
|
3714
3724
|
maxWidth,
|
|
3715
3725
|
containScrolling = false,
|
|
3716
3726
|
children,
|
|
3717
3727
|
loading = false
|
|
3718
3728
|
}) {
|
|
3729
|
+
const showContentBox = contentBox && !disableContentBox;
|
|
3719
3730
|
const maxWidthClass = maxWidth ? Page_default[`maxWidth${maxWidth.charAt(0).toUpperCase()}${maxWidth.slice(1)}`] : "";
|
|
3720
3731
|
const hasHeadline = Boolean(header || subheader || headerAddition);
|
|
3721
3732
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3729,7 +3740,7 @@ function Page({
|
|
|
3729
3740
|
Headline,
|
|
3730
3741
|
{
|
|
3731
3742
|
disableMargin: true,
|
|
3732
|
-
size:
|
|
3743
|
+
size: 1,
|
|
3733
3744
|
severity,
|
|
3734
3745
|
icon: headerIcon,
|
|
3735
3746
|
subheader,
|
|
@@ -3741,7 +3752,7 @@ function Page({
|
|
|
3741
3752
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3742
3753
|
"div",
|
|
3743
3754
|
{
|
|
3744
|
-
className: `${Page_default.content} ${loading ? Page_default.contentLoading : ""} ${
|
|
3755
|
+
className: `${Page_default.content} ${loading ? Page_default.contentLoading : ""} ${showContentBox ? Page_default.contentBox : ""}`,
|
|
3745
3756
|
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(SkeletonLoader, { type: "squares", rows: 1, columns: 1 }) : children
|
|
3746
3757
|
}
|
|
3747
3758
|
)
|
|
@@ -4313,7 +4324,7 @@ function TableRow({
|
|
|
4313
4324
|
columns.map((column) => {
|
|
4314
4325
|
var _a2, _b, _c, _d;
|
|
4315
4326
|
const allowWrap = shouldAllowWrap(column.allowWrap, isSelected, viewMode);
|
|
4316
|
-
|
|
4327
|
+
column.allowOverflow;
|
|
4317
4328
|
const cellValue = getCellDisplayValue(row, column);
|
|
4318
4329
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4319
4330
|
"td",
|
|
@@ -4333,7 +4344,7 @@ function TableRow({
|
|
|
4333
4344
|
className: Table_default.cellContent,
|
|
4334
4345
|
"data-align": (_c = column.align) != null ? _c : "left",
|
|
4335
4346
|
"data-vertical-align": (_d = column.verticalAlign) != null ? _d : "top",
|
|
4336
|
-
children:
|
|
4347
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: Table_default.cellValueEllipsis, children: cellValue })
|
|
4337
4348
|
}
|
|
4338
4349
|
)
|
|
4339
4350
|
},
|
|
@@ -7566,6 +7577,14 @@ var SegmentedProgressBar_default = {
|
|
|
7566
7577
|
progressCenterLabel: "SegmentedProgressBar_progressCenterLabel",
|
|
7567
7578
|
emptySegments: "SegmentedProgressBar_emptySegments"
|
|
7568
7579
|
};
|
|
7580
|
+
var sizeTokenMap = {
|
|
7581
|
+
"2xs": "var(--component-size-2xs)",
|
|
7582
|
+
xxs: "var(--component-size-xxs)",
|
|
7583
|
+
xs: "var(--component-size-xs)",
|
|
7584
|
+
sm: "var(--component-size-sm)",
|
|
7585
|
+
md: "var(--component-size-md)",
|
|
7586
|
+
lg: "var(--component-size-lg)"
|
|
7587
|
+
};
|
|
7569
7588
|
function SegmentWithTooltip({
|
|
7570
7589
|
seg,
|
|
7571
7590
|
index,
|
|
@@ -7605,9 +7624,9 @@ var SegmentedProgressBar = ({
|
|
|
7605
7624
|
segments,
|
|
7606
7625
|
total,
|
|
7607
7626
|
showRemainder = true,
|
|
7608
|
-
remainderSeverity = "
|
|
7627
|
+
remainderSeverity = "missing",
|
|
7609
7628
|
centerLabel,
|
|
7610
|
-
|
|
7629
|
+
size = "sm",
|
|
7611
7630
|
rounded = true,
|
|
7612
7631
|
trackColor,
|
|
7613
7632
|
tooltipPlacement = "top",
|
|
@@ -7645,7 +7664,8 @@ var SegmentedProgressBar = ({
|
|
|
7645
7664
|
className: SegmentedProgressBar_default.progressBar,
|
|
7646
7665
|
"data-rounded": rounded ? "true" : "false",
|
|
7647
7666
|
style: {
|
|
7648
|
-
height:
|
|
7667
|
+
["--progress-height"]: sizeTokenMap[size],
|
|
7668
|
+
height: sizeTokenMap[size],
|
|
7649
7669
|
background: trackColor != null ? trackColor : "var(--color-bg-surface-subtle)"
|
|
7650
7670
|
},
|
|
7651
7671
|
children: [
|
|
@@ -8526,7 +8546,7 @@ function Modal({
|
|
|
8526
8546
|
tabIndex: -1,
|
|
8527
8547
|
children: [
|
|
8528
8548
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: Modal_default.header, children: [
|
|
8529
|
-
header && /* @__PURE__ */ jsxRuntime.jsx(Headline, { severity, size:
|
|
8549
|
+
header && /* @__PURE__ */ jsxRuntime.jsx(Headline, { severity, size: 2, disableMargin: true, subheader, children: header }),
|
|
8530
8550
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8531
8551
|
Button,
|
|
8532
8552
|
{
|
|
@@ -10689,7 +10709,7 @@ function SidePanel({
|
|
|
10689
10709
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10690
10710
|
Headline,
|
|
10691
10711
|
{
|
|
10692
|
-
size:
|
|
10712
|
+
size: 2,
|
|
10693
10713
|
disableMargin: true,
|
|
10694
10714
|
severity,
|
|
10695
10715
|
marker: showHeaderMarker,
|
|
@@ -11049,6 +11069,7 @@ function IntervalSelect({
|
|
|
11049
11069
|
// src/components/accordion/Accordion.module.css
|
|
11050
11070
|
var Accordion_default = {
|
|
11051
11071
|
container: "Accordion_container",
|
|
11072
|
+
outlined: "Accordion_outlined",
|
|
11052
11073
|
sm: "Accordion_sm",
|
|
11053
11074
|
md: "Accordion_md",
|
|
11054
11075
|
lg: "Accordion_lg"
|
|
@@ -11065,7 +11086,8 @@ var AccordionRow_default = {
|
|
|
11065
11086
|
panel: "AccordionRow_panel",
|
|
11066
11087
|
animate: "AccordionRow_animate",
|
|
11067
11088
|
noAnimate: "AccordionRow_noAnimate",
|
|
11068
|
-
content: "AccordionRow_content"
|
|
11089
|
+
content: "AccordionRow_content",
|
|
11090
|
+
item: "AccordionRow_item"
|
|
11069
11091
|
};
|
|
11070
11092
|
function useCollapsibleHeight(isOpen, shouldAnimate) {
|
|
11071
11093
|
const innerRef = React19.useRef(null);
|
|
@@ -11108,7 +11130,9 @@ function AccordionRow({
|
|
|
11108
11130
|
item,
|
|
11109
11131
|
isOpen,
|
|
11110
11132
|
onToggle,
|
|
11111
|
-
shouldAnimate = true
|
|
11133
|
+
shouldAnimate = true,
|
|
11134
|
+
headlineSize = 4,
|
|
11135
|
+
variant = "default"
|
|
11112
11136
|
}) {
|
|
11113
11137
|
const isDisabled = !!item.disabled;
|
|
11114
11138
|
const buttonId = `${uid}-acc-btn-${index}`;
|
|
@@ -11136,8 +11160,8 @@ function AccordionRow({
|
|
|
11136
11160
|
Headline,
|
|
11137
11161
|
{
|
|
11138
11162
|
disableMargin: true,
|
|
11139
|
-
size:
|
|
11140
|
-
weight: 500,
|
|
11163
|
+
size: headlineSize,
|
|
11164
|
+
weight: variant === "outlined" ? 400 : 500,
|
|
11141
11165
|
severity: item.severity,
|
|
11142
11166
|
subheader: item.subheader,
|
|
11143
11167
|
allowWrap: isOpen,
|
|
@@ -11176,6 +11200,7 @@ function Accordion({
|
|
|
11176
11200
|
items,
|
|
11177
11201
|
mode = "single",
|
|
11178
11202
|
size = "md",
|
|
11203
|
+
variant = "default",
|
|
11179
11204
|
defaultOpenIndex = null,
|
|
11180
11205
|
defaultOpenIndexes = [],
|
|
11181
11206
|
openIndex,
|
|
@@ -11185,9 +11210,9 @@ function Accordion({
|
|
|
11185
11210
|
}) {
|
|
11186
11211
|
const uid = React19.useId();
|
|
11187
11212
|
const isControlled = mode === "single" ? openIndex !== void 0 : openIndexes !== void 0;
|
|
11188
|
-
const
|
|
11213
|
+
const [hasMounted, setHasMounted] = React19.useState(false);
|
|
11189
11214
|
React19.useEffect(() => {
|
|
11190
|
-
|
|
11215
|
+
setHasMounted(true);
|
|
11191
11216
|
}, []);
|
|
11192
11217
|
const [internalSingle, setInternalSingle] = React19.useState(
|
|
11193
11218
|
mode === "single" ? defaultOpenIndex : null
|
|
@@ -11233,18 +11258,26 @@ function Accordion({
|
|
|
11233
11258
|
if (isOpen) commit(currentOpenIndexes.filter((i) => i !== index));
|
|
11234
11259
|
else commit([...currentOpenIndexes, index]);
|
|
11235
11260
|
}
|
|
11236
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11237
|
-
|
|
11261
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11262
|
+
"div",
|
|
11238
11263
|
{
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11264
|
+
className: [Accordion_default.container, Accordion_default[size], variant !== "default" ? Accordion_default[variant] : ""].filter(Boolean).join(" "),
|
|
11265
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11266
|
+
AccordionRow,
|
|
11267
|
+
{
|
|
11268
|
+
uid,
|
|
11269
|
+
index: i,
|
|
11270
|
+
item,
|
|
11271
|
+
isOpen: openSet.has(i),
|
|
11272
|
+
onToggle: toggle,
|
|
11273
|
+
shouldAnimate: hasMounted,
|
|
11274
|
+
headlineSize: size === "sm" ? 4 : 3,
|
|
11275
|
+
variant
|
|
11276
|
+
},
|
|
11277
|
+
i
|
|
11278
|
+
))
|
|
11279
|
+
}
|
|
11280
|
+
);
|
|
11248
11281
|
}
|
|
11249
11282
|
var EmptyIllustration = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11250
11283
|
"svg",
|
|
@@ -12745,6 +12778,48 @@ function Alert({
|
|
|
12745
12778
|
);
|
|
12746
12779
|
}
|
|
12747
12780
|
|
|
12781
|
+
// src/components/inline-status/InlineStatus.module.css
|
|
12782
|
+
var InlineStatus_default = {
|
|
12783
|
+
container: "InlineStatus_container",
|
|
12784
|
+
fullWidth: "InlineStatus_fullWidth",
|
|
12785
|
+
leading: "InlineStatus_leading",
|
|
12786
|
+
body: "InlineStatus_body",
|
|
12787
|
+
sm: "InlineStatus_sm",
|
|
12788
|
+
md: "InlineStatus_md",
|
|
12789
|
+
neutral: "InlineStatus_neutral",
|
|
12790
|
+
success: "InlineStatus_success",
|
|
12791
|
+
warning: "InlineStatus_warning",
|
|
12792
|
+
error: "InlineStatus_error",
|
|
12793
|
+
info: "InlineStatus_info",
|
|
12794
|
+
brand: "InlineStatus_brand"
|
|
12795
|
+
};
|
|
12796
|
+
function InlineStatus({
|
|
12797
|
+
children,
|
|
12798
|
+
severity = "neutral",
|
|
12799
|
+
customIcon,
|
|
12800
|
+
disableIcon = false,
|
|
12801
|
+
fullWidth = false,
|
|
12802
|
+
size = "sm"
|
|
12803
|
+
}) {
|
|
12804
|
+
const hasLeading = Boolean(customIcon) || !disableIcon;
|
|
12805
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12806
|
+
"div",
|
|
12807
|
+
{
|
|
12808
|
+
className: [
|
|
12809
|
+
InlineStatus_default.container,
|
|
12810
|
+
InlineStatus_default[severity],
|
|
12811
|
+
InlineStatus_default[size],
|
|
12812
|
+
fullWidth ? InlineStatus_default.fullWidth : "",
|
|
12813
|
+
hasLeading ? InlineStatus_default.hasLeading : ""
|
|
12814
|
+
].filter(Boolean).join(" "),
|
|
12815
|
+
children: [
|
|
12816
|
+
hasLeading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: InlineStatus_default.leading, children: customIcon != null ? customIcon : /* @__PURE__ */ jsxRuntime.jsx(Icon, { severity }) }) : null,
|
|
12817
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: InlineStatus_default.body, children })
|
|
12818
|
+
]
|
|
12819
|
+
}
|
|
12820
|
+
);
|
|
12821
|
+
}
|
|
12822
|
+
|
|
12748
12823
|
exports.Accordion = Accordion;
|
|
12749
12824
|
exports.Alert = Alert;
|
|
12750
12825
|
exports.AppHeader = AppHeader;
|
|
@@ -12774,6 +12849,7 @@ exports.GridItem = GridItem;
|
|
|
12774
12849
|
exports.Headline = Headline;
|
|
12775
12850
|
exports.Hyperlink = Hyperlink;
|
|
12776
12851
|
exports.Icon = Icon;
|
|
12852
|
+
exports.InlineStatus = InlineStatus;
|
|
12777
12853
|
exports.Input = Input;
|
|
12778
12854
|
exports.InputContainer = InputContainer;
|
|
12779
12855
|
exports.IntervalSelect = IntervalSelect;
|