@veritone-ce/design-system 2.8.9 → 2.8.10
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.
|
@@ -31,6 +31,8 @@ const Accordion = React.forwardRef(
|
|
|
31
31
|
children,
|
|
32
32
|
"data-testid": dataTestId,
|
|
33
33
|
className,
|
|
34
|
+
headerClassName,
|
|
35
|
+
contentClassName,
|
|
34
36
|
style,
|
|
35
37
|
...props
|
|
36
38
|
}, ref) => {
|
|
@@ -81,7 +83,7 @@ const Accordion = React.forwardRef(
|
|
|
81
83
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
82
84
|
"div",
|
|
83
85
|
{
|
|
84
|
-
className: styles_module.default["accordion-header"],
|
|
86
|
+
className: cx.cx(styles_module.default["accordion-header"], headerClassName),
|
|
85
87
|
onClick: toggleAccordion,
|
|
86
88
|
style: {
|
|
87
89
|
backgroundColor: palette,
|
|
@@ -101,7 +103,14 @@ const Accordion = React.forwardRef(
|
|
|
101
103
|
]
|
|
102
104
|
}
|
|
103
105
|
),
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactSpring_web_modern.a.div, { style: contentAnimation, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactSpring_web_modern.a.div, { style: contentAnimation, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
"div",
|
|
108
|
+
{
|
|
109
|
+
ref: contentRef,
|
|
110
|
+
className: cx.cx(styles_module.default["accordion-content"], contentClassName),
|
|
111
|
+
children
|
|
112
|
+
}
|
|
113
|
+
) })
|
|
105
114
|
]
|
|
106
115
|
}
|
|
107
116
|
);
|
|
@@ -27,6 +27,8 @@ const Accordion = forwardRef(
|
|
|
27
27
|
children,
|
|
28
28
|
"data-testid": dataTestId,
|
|
29
29
|
className,
|
|
30
|
+
headerClassName,
|
|
31
|
+
contentClassName,
|
|
30
32
|
style,
|
|
31
33
|
...props
|
|
32
34
|
}, ref) => {
|
|
@@ -77,7 +79,7 @@ const Accordion = forwardRef(
|
|
|
77
79
|
/* @__PURE__ */ jsxs(
|
|
78
80
|
"div",
|
|
79
81
|
{
|
|
80
|
-
className: styles["accordion-header"],
|
|
82
|
+
className: cx(styles["accordion-header"], headerClassName),
|
|
81
83
|
onClick: toggleAccordion,
|
|
82
84
|
style: {
|
|
83
85
|
backgroundColor: palette,
|
|
@@ -97,7 +99,14 @@ const Accordion = forwardRef(
|
|
|
97
99
|
]
|
|
98
100
|
}
|
|
99
101
|
),
|
|
100
|
-
/* @__PURE__ */ jsx(animated.div, { style: contentAnimation, children: /* @__PURE__ */ jsx(
|
|
102
|
+
/* @__PURE__ */ jsx(animated.div, { style: contentAnimation, children: /* @__PURE__ */ jsx(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
ref: contentRef,
|
|
106
|
+
className: cx(styles["accordion-content"], contentClassName),
|
|
107
|
+
children
|
|
108
|
+
}
|
|
109
|
+
) })
|
|
101
110
|
]
|
|
102
111
|
}
|
|
103
112
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ResolvablePaletteValue, type PaletteColor } from '../styles/index.js';
|
|
3
|
-
export type AccordionProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
3
|
+
export type AccordionProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Title displayed in the accordion header
|
|
6
6
|
*/
|
|
7
|
-
title:
|
|
7
|
+
title: React.ReactNode;
|
|
8
8
|
/**
|
|
9
9
|
* Background color for the accordion header
|
|
10
10
|
*/
|
|
@@ -27,12 +27,20 @@ export type AccordionProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
27
27
|
* Optional test id for testing
|
|
28
28
|
*/
|
|
29
29
|
'data-testid'?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional class name for the accordion header
|
|
32
|
+
*/
|
|
33
|
+
headerClassName?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Additional class name for the accordion content
|
|
36
|
+
*/
|
|
37
|
+
contentClassName?: string;
|
|
30
38
|
};
|
|
31
|
-
declare const Accordion: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
39
|
+
declare const Accordion: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "title"> & {
|
|
32
40
|
/**
|
|
33
41
|
* Title displayed in the accordion header
|
|
34
42
|
*/
|
|
35
|
-
title:
|
|
43
|
+
title: React.ReactNode;
|
|
36
44
|
/**
|
|
37
45
|
* Background color for the accordion header
|
|
38
46
|
*/
|
|
@@ -55,5 +63,13 @@ declare const Accordion: React.ForwardRefExoticComponent<Omit<React.DetailedHTML
|
|
|
55
63
|
* Optional test id for testing
|
|
56
64
|
*/
|
|
57
65
|
'data-testid'?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Additional class name for the accordion header
|
|
68
|
+
*/
|
|
69
|
+
headerClassName?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Additional class name for the accordion content
|
|
72
|
+
*/
|
|
73
|
+
contentClassName?: string | undefined;
|
|
58
74
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
59
75
|
export default Accordion;
|