@trackunit/react-components 1.10.1 → 1.10.3
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/index.cjs.js
CHANGED
|
@@ -2177,39 +2177,108 @@ const CardHeader = ({ heading, headingVariant = "secondary", subHeading, onClose
|
|
|
2177
2177
|
}), "data-testid": dataTestId, children: jsxRuntime.jsxs("div", { className: cvaCardHeader(), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: cvaCardHeaderHeadingContainer(), children: [jsxRuntime.jsx(Heading, { className: "self-center", variant: headingVariant, children: heading }), accessories] }), subHeading !== null && subHeading !== undefined ? (jsxRuntime.jsx(Heading, { subtle: true, variant: "subtitle", children: subHeading })) : null, children] }), jsxRuntime.jsxs("div", { className: "flex place-items-center gap-x-2 gap-y-1", children: [actions, onClose ? (jsxRuntime.jsx(IconButton, { className: "!h-min", dataTestId: "card-header-close-button", icon: jsxRuntime.jsx(Icon, { name: "XMark", size: "small" }), onClick: onClose, variant: "ghost-neutral" })) : null] })] }) }));
|
|
2178
2178
|
};
|
|
2179
2179
|
|
|
2180
|
-
const cvaCollapse = cssClassVarianceUtilities.cvaMerge([
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
]
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2180
|
+
const cvaCollapse = cssClassVarianceUtilities.cvaMerge(["flex", "flex-col", "overflow-hidden"], {
|
|
2181
|
+
variants: {
|
|
2182
|
+
variant: {
|
|
2183
|
+
primary: ["border", "border-solid", "border-neutral-300", "rounded-md", "bg-white"],
|
|
2184
|
+
secondary: "gap-3",
|
|
2185
|
+
},
|
|
2186
|
+
},
|
|
2187
|
+
});
|
|
2188
|
+
const cvaCollapseHeader = cssClassVarianceUtilities.cvaMerge(["flex", "items-center", "cursor-pointer", "transition-all", "group"], {
|
|
2189
|
+
variants: {
|
|
2190
|
+
expanded: { true: [], false: [] },
|
|
2191
|
+
variant: {
|
|
2192
|
+
primary: ["gap-4", "justify-between", "bg-white", "hover:bg-neutral-100"],
|
|
2193
|
+
secondary: ["w-fit"],
|
|
2194
|
+
},
|
|
2195
|
+
extraPadding: {
|
|
2196
|
+
true: [],
|
|
2197
|
+
false: [],
|
|
2198
|
+
},
|
|
2199
|
+
},
|
|
2200
|
+
compoundVariants: [
|
|
2201
|
+
{
|
|
2202
|
+
variant: "primary",
|
|
2203
|
+
expanded: true,
|
|
2204
|
+
class: ["border-neutral-200", "border-b", "border-solid"],
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
variant: "primary",
|
|
2208
|
+
expanded: false,
|
|
2209
|
+
class: [],
|
|
2210
|
+
},
|
|
2211
|
+
{
|
|
2212
|
+
variant: "primary",
|
|
2213
|
+
extraPadding: true,
|
|
2214
|
+
class: ["px-4", "py-1.5"],
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
variant: "primary",
|
|
2218
|
+
extraPadding: false,
|
|
2219
|
+
class: ["px-3", "py-1.5"],
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
variant: "secondary",
|
|
2223
|
+
extraPadding: true,
|
|
2224
|
+
class: ["px-4", "py-1.5"],
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
variant: "secondary",
|
|
2228
|
+
extraPadding: false,
|
|
2229
|
+
class: [],
|
|
2230
|
+
},
|
|
2231
|
+
],
|
|
2232
|
+
});
|
|
2233
|
+
const cvaCollapseLabelContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-center"], {
|
|
2201
2234
|
variants: {
|
|
2202
|
-
|
|
2235
|
+
variant: {
|
|
2236
|
+
primary: ["w-full", "justify-between"],
|
|
2237
|
+
secondary: ["gap-1", "text-primary-600"],
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
});
|
|
2241
|
+
const cvaCollapseLabel = cssClassVarianceUtilities.cvaMerge([""], {
|
|
2242
|
+
variants: {
|
|
2243
|
+
variant: {
|
|
2244
|
+
primary: [""],
|
|
2245
|
+
secondary: ["group-hover:underline", "text-primary-600"],
|
|
2246
|
+
},
|
|
2203
2247
|
},
|
|
2204
2248
|
});
|
|
2205
|
-
const cvaCollapseLabelContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-center", "w-full", "justify-between"]);
|
|
2206
2249
|
const cvaCollapsible = cssClassVarianceUtilities.cvaMerge(["block", "relative"], {
|
|
2207
2250
|
variants: {
|
|
2251
|
+
variant: {
|
|
2252
|
+
primary: [],
|
|
2253
|
+
secondary: [],
|
|
2254
|
+
},
|
|
2208
2255
|
extraPadding: {
|
|
2209
|
-
true:
|
|
2210
|
-
false:
|
|
2256
|
+
true: [],
|
|
2257
|
+
false: [],
|
|
2211
2258
|
},
|
|
2212
2259
|
},
|
|
2260
|
+
compoundVariants: [
|
|
2261
|
+
{
|
|
2262
|
+
variant: "primary",
|
|
2263
|
+
extraPadding: true,
|
|
2264
|
+
class: ["p-4"],
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
variant: "primary",
|
|
2268
|
+
extraPadding: false,
|
|
2269
|
+
class: ["px-3", "py-1.5"],
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
variant: "secondary",
|
|
2273
|
+
extraPadding: true,
|
|
2274
|
+
class: ["px-4", "py-1.5"],
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
variant: "secondary",
|
|
2278
|
+
extraPadding: false,
|
|
2279
|
+
class: [],
|
|
2280
|
+
},
|
|
2281
|
+
],
|
|
2213
2282
|
});
|
|
2214
2283
|
const cvaCollapseAnimated = cssClassVarianceUtilities.cvaMerge(["overflow-y-hidden", "transition-all"], {
|
|
2215
2284
|
variants: {
|
|
@@ -2251,7 +2320,7 @@ const cvaChevronIcon = cssClassVarianceUtilities.cvaMerge(["transition-transform
|
|
|
2251
2320
|
* @param {CollapseProps} props - The props for the Collapse component
|
|
2252
2321
|
* @returns {ReactElement} Collapse component
|
|
2253
2322
|
*/
|
|
2254
|
-
const Collapse = ({ id, initialExpanded = false, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate = true, extraPadding = true, }) => {
|
|
2323
|
+
const Collapse = ({ id, variant = "primary", initialExpanded = false, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate = true, extraPadding = true, }) => {
|
|
2255
2324
|
const LABEL_ID = sharedUtils.uuidv4();
|
|
2256
2325
|
const [expanded, setExpanded] = react.useState(initialExpanded);
|
|
2257
2326
|
const handleClick = react.useCallback((e) => {
|
|
@@ -2260,12 +2329,12 @@ const Collapse = ({ id, initialExpanded = false, onToggle, label, children, clas
|
|
|
2260
2329
|
}
|
|
2261
2330
|
setExpanded(!expanded);
|
|
2262
2331
|
}, [expanded, onToggle]);
|
|
2263
|
-
return (jsxRuntime.jsxs("div", { className: cvaCollapse({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("div", { "aria-controls": id, "aria-expanded": expanded, className: cvaCollapseHeader({ expanded, className: headerClassName }), onClick: handleClick, role: "button", children: jsxRuntime.jsxs("div", { className: cvaCollapseLabelContainer(), children: [jsxRuntime.jsx(Text, { id: LABEL_ID, type: "span", weight: "bold", children: label }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [headerAddon !== null && headerAddon !== undefined ? headerAddon : null, jsxRuntime.jsx(Icon, { ariaLabelledBy: LABEL_ID, className: cvaChevronIcon({ expanded }), name: "ChevronUp", size: "medium" })] })] }) }), jsxRuntime.jsx(Collapsible, { expanded: expanded, extraPadding: extraPadding, id: id, children: expanded || animate ? children : null })] }));
|
|
2332
|
+
return (jsxRuntime.jsxs("div", { className: cvaCollapse({ variant: variant, className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("div", { "aria-controls": id, "aria-expanded": expanded, className: cvaCollapseHeader({ expanded, variant, extraPadding, className: headerClassName }), onClick: handleClick, role: "button", children: jsxRuntime.jsxs("div", { className: cvaCollapseLabelContainer({ variant }), children: [jsxRuntime.jsx(Text, { className: cvaCollapseLabel({ variant }), id: LABEL_ID, size: variant === "secondary" ? "small" : "medium", type: "span", weight: "bold", children: label }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [headerAddon !== null && headerAddon !== undefined && variant !== "secondary" ? headerAddon : null, jsxRuntime.jsx(Icon, { ariaLabelledBy: LABEL_ID, className: cvaChevronIcon({ expanded }), name: "ChevronUp", size: variant === "secondary" ? "small" : "medium" })] })] }) }), jsxRuntime.jsx(Collapsible, { expanded: expanded, extraPadding: extraPadding, id: id, variant: variant, children: expanded || animate ? children : null })] }));
|
|
2264
2333
|
};
|
|
2265
|
-
const Collapsible = ({ children, expanded, id, extraPadding
|
|
2334
|
+
const Collapsible = ({ children, expanded, id, variant, extraPadding }) => {
|
|
2266
2335
|
const ref = react.useRef(null);
|
|
2267
2336
|
const { height } = useGeometry(ref);
|
|
2268
|
-
return (jsxRuntime.jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height : "0" }, children: jsxRuntime.jsx("div", { ref: ref, children: jsxRuntime.jsx("div", { className: cvaCollapsible({ extraPadding }), children: children }) }) }));
|
|
2337
|
+
return (jsxRuntime.jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height || "auto" : "0" }, children: jsxRuntime.jsx("div", { ref: ref, children: jsxRuntime.jsx("div", { className: cvaCollapsible({ variant, extraPadding }), children: children }) }) }));
|
|
2269
2338
|
};
|
|
2270
2339
|
|
|
2271
2340
|
/**
|
package/index.esm.js
CHANGED
|
@@ -2175,39 +2175,108 @@ const CardHeader = ({ heading, headingVariant = "secondary", subHeading, onClose
|
|
|
2175
2175
|
}), "data-testid": dataTestId, children: jsxs("div", { className: cvaCardHeader(), children: [jsxs("div", { children: [jsxs("div", { className: cvaCardHeaderHeadingContainer(), children: [jsx(Heading, { className: "self-center", variant: headingVariant, children: heading }), accessories] }), subHeading !== null && subHeading !== undefined ? (jsx(Heading, { subtle: true, variant: "subtitle", children: subHeading })) : null, children] }), jsxs("div", { className: "flex place-items-center gap-x-2 gap-y-1", children: [actions, onClose ? (jsx(IconButton, { className: "!h-min", dataTestId: "card-header-close-button", icon: jsx(Icon, { name: "XMark", size: "small" }), onClick: onClose, variant: "ghost-neutral" })) : null] })] }) }));
|
|
2176
2176
|
};
|
|
2177
2177
|
|
|
2178
|
-
const cvaCollapse = cvaMerge([
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
]
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2178
|
+
const cvaCollapse = cvaMerge(["flex", "flex-col", "overflow-hidden"], {
|
|
2179
|
+
variants: {
|
|
2180
|
+
variant: {
|
|
2181
|
+
primary: ["border", "border-solid", "border-neutral-300", "rounded-md", "bg-white"],
|
|
2182
|
+
secondary: "gap-3",
|
|
2183
|
+
},
|
|
2184
|
+
},
|
|
2185
|
+
});
|
|
2186
|
+
const cvaCollapseHeader = cvaMerge(["flex", "items-center", "cursor-pointer", "transition-all", "group"], {
|
|
2187
|
+
variants: {
|
|
2188
|
+
expanded: { true: [], false: [] },
|
|
2189
|
+
variant: {
|
|
2190
|
+
primary: ["gap-4", "justify-between", "bg-white", "hover:bg-neutral-100"],
|
|
2191
|
+
secondary: ["w-fit"],
|
|
2192
|
+
},
|
|
2193
|
+
extraPadding: {
|
|
2194
|
+
true: [],
|
|
2195
|
+
false: [],
|
|
2196
|
+
},
|
|
2197
|
+
},
|
|
2198
|
+
compoundVariants: [
|
|
2199
|
+
{
|
|
2200
|
+
variant: "primary",
|
|
2201
|
+
expanded: true,
|
|
2202
|
+
class: ["border-neutral-200", "border-b", "border-solid"],
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
variant: "primary",
|
|
2206
|
+
expanded: false,
|
|
2207
|
+
class: [],
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
variant: "primary",
|
|
2211
|
+
extraPadding: true,
|
|
2212
|
+
class: ["px-4", "py-1.5"],
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
variant: "primary",
|
|
2216
|
+
extraPadding: false,
|
|
2217
|
+
class: ["px-3", "py-1.5"],
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
variant: "secondary",
|
|
2221
|
+
extraPadding: true,
|
|
2222
|
+
class: ["px-4", "py-1.5"],
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
variant: "secondary",
|
|
2226
|
+
extraPadding: false,
|
|
2227
|
+
class: [],
|
|
2228
|
+
},
|
|
2229
|
+
],
|
|
2230
|
+
});
|
|
2231
|
+
const cvaCollapseLabelContainer = cvaMerge(["flex", "items-center"], {
|
|
2199
2232
|
variants: {
|
|
2200
|
-
|
|
2233
|
+
variant: {
|
|
2234
|
+
primary: ["w-full", "justify-between"],
|
|
2235
|
+
secondary: ["gap-1", "text-primary-600"],
|
|
2236
|
+
},
|
|
2237
|
+
},
|
|
2238
|
+
});
|
|
2239
|
+
const cvaCollapseLabel = cvaMerge([""], {
|
|
2240
|
+
variants: {
|
|
2241
|
+
variant: {
|
|
2242
|
+
primary: [""],
|
|
2243
|
+
secondary: ["group-hover:underline", "text-primary-600"],
|
|
2244
|
+
},
|
|
2201
2245
|
},
|
|
2202
2246
|
});
|
|
2203
|
-
const cvaCollapseLabelContainer = cvaMerge(["flex", "items-center", "w-full", "justify-between"]);
|
|
2204
2247
|
const cvaCollapsible = cvaMerge(["block", "relative"], {
|
|
2205
2248
|
variants: {
|
|
2249
|
+
variant: {
|
|
2250
|
+
primary: [],
|
|
2251
|
+
secondary: [],
|
|
2252
|
+
},
|
|
2206
2253
|
extraPadding: {
|
|
2207
|
-
true:
|
|
2208
|
-
false:
|
|
2254
|
+
true: [],
|
|
2255
|
+
false: [],
|
|
2209
2256
|
},
|
|
2210
2257
|
},
|
|
2258
|
+
compoundVariants: [
|
|
2259
|
+
{
|
|
2260
|
+
variant: "primary",
|
|
2261
|
+
extraPadding: true,
|
|
2262
|
+
class: ["p-4"],
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
variant: "primary",
|
|
2266
|
+
extraPadding: false,
|
|
2267
|
+
class: ["px-3", "py-1.5"],
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
variant: "secondary",
|
|
2271
|
+
extraPadding: true,
|
|
2272
|
+
class: ["px-4", "py-1.5"],
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
variant: "secondary",
|
|
2276
|
+
extraPadding: false,
|
|
2277
|
+
class: [],
|
|
2278
|
+
},
|
|
2279
|
+
],
|
|
2211
2280
|
});
|
|
2212
2281
|
const cvaCollapseAnimated = cvaMerge(["overflow-y-hidden", "transition-all"], {
|
|
2213
2282
|
variants: {
|
|
@@ -2249,7 +2318,7 @@ const cvaChevronIcon = cvaMerge(["transition-transform"], {
|
|
|
2249
2318
|
* @param {CollapseProps} props - The props for the Collapse component
|
|
2250
2319
|
* @returns {ReactElement} Collapse component
|
|
2251
2320
|
*/
|
|
2252
|
-
const Collapse = ({ id, initialExpanded = false, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate = true, extraPadding = true, }) => {
|
|
2321
|
+
const Collapse = ({ id, variant = "primary", initialExpanded = false, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate = true, extraPadding = true, }) => {
|
|
2253
2322
|
const LABEL_ID = uuidv4();
|
|
2254
2323
|
const [expanded, setExpanded] = useState(initialExpanded);
|
|
2255
2324
|
const handleClick = useCallback((e) => {
|
|
@@ -2258,12 +2327,12 @@ const Collapse = ({ id, initialExpanded = false, onToggle, label, children, clas
|
|
|
2258
2327
|
}
|
|
2259
2328
|
setExpanded(!expanded);
|
|
2260
2329
|
}, [expanded, onToggle]);
|
|
2261
|
-
return (jsxs("div", { className: cvaCollapse({ className }), "data-testid": dataTestId, children: [jsx("div", { "aria-controls": id, "aria-expanded": expanded, className: cvaCollapseHeader({ expanded, className: headerClassName }), onClick: handleClick, role: "button", children: jsxs("div", { className: cvaCollapseLabelContainer(), children: [jsx(Text, { id: LABEL_ID, type: "span", weight: "bold", children: label }), jsxs("div", { className: "flex items-center gap-2", children: [headerAddon !== null && headerAddon !== undefined ? headerAddon : null, jsx(Icon, { ariaLabelledBy: LABEL_ID, className: cvaChevronIcon({ expanded }), name: "ChevronUp", size: "medium" })] })] }) }), jsx(Collapsible, { expanded: expanded, extraPadding: extraPadding, id: id, children: expanded || animate ? children : null })] }));
|
|
2330
|
+
return (jsxs("div", { className: cvaCollapse({ variant: variant, className }), "data-testid": dataTestId, children: [jsx("div", { "aria-controls": id, "aria-expanded": expanded, className: cvaCollapseHeader({ expanded, variant, extraPadding, className: headerClassName }), onClick: handleClick, role: "button", children: jsxs("div", { className: cvaCollapseLabelContainer({ variant }), children: [jsx(Text, { className: cvaCollapseLabel({ variant }), id: LABEL_ID, size: variant === "secondary" ? "small" : "medium", type: "span", weight: "bold", children: label }), jsxs("div", { className: "flex items-center gap-2", children: [headerAddon !== null && headerAddon !== undefined && variant !== "secondary" ? headerAddon : null, jsx(Icon, { ariaLabelledBy: LABEL_ID, className: cvaChevronIcon({ expanded }), name: "ChevronUp", size: variant === "secondary" ? "small" : "medium" })] })] }) }), jsx(Collapsible, { expanded: expanded, extraPadding: extraPadding, id: id, variant: variant, children: expanded || animate ? children : null })] }));
|
|
2262
2331
|
};
|
|
2263
|
-
const Collapsible = ({ children, expanded, id, extraPadding
|
|
2332
|
+
const Collapsible = ({ children, expanded, id, variant, extraPadding }) => {
|
|
2264
2333
|
const ref = useRef(null);
|
|
2265
2334
|
const { height } = useGeometry(ref);
|
|
2266
|
-
return (jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height : "0" }, children: jsx("div", { ref: ref, children: jsx("div", { className: cvaCollapsible({ extraPadding }), children: children }) }) }));
|
|
2335
|
+
return (jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height || "auto" : "0" }, children: jsx("div", { ref: ref, children: jsx("div", { className: cvaCollapsible({ variant, extraPadding }), children: children }) }) }));
|
|
2267
2336
|
};
|
|
2268
2337
|
|
|
2269
2338
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@floating-ui/react": "^0.26.25",
|
|
17
17
|
"string-ts": "^2.0.0",
|
|
18
18
|
"tailwind-merge": "^2.0.0",
|
|
19
|
-
"@trackunit/ui-design-tokens": "1.7.
|
|
20
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
21
|
-
"@trackunit/shared-utils": "1.9.
|
|
22
|
-
"@trackunit/ui-icons": "1.7.
|
|
23
|
-
"@trackunit/react-test-setup": "1.4.
|
|
19
|
+
"@trackunit/ui-design-tokens": "1.7.43",
|
|
20
|
+
"@trackunit/css-class-variance-utilities": "1.7.43",
|
|
21
|
+
"@trackunit/shared-utils": "1.9.43",
|
|
22
|
+
"@trackunit/ui-icons": "1.7.44",
|
|
23
|
+
"@trackunit/react-test-setup": "1.4.43",
|
|
24
24
|
"@tanstack/react-router": "1.114.29",
|
|
25
25
|
"es-toolkit": "^1.39.10",
|
|
26
26
|
"@tanstack/react-virtual": "3.13.12"
|
|
@@ -2,6 +2,10 @@ import { MouseEvent, ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
export interface CollapseProps extends CommonProps {
|
|
4
4
|
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* Visual variant of the collapse component.
|
|
7
|
+
*/
|
|
8
|
+
variant?: "primary" | "secondary";
|
|
5
9
|
/**
|
|
6
10
|
* Expands the collapse component during initialization.
|
|
7
11
|
*/
|
|
@@ -50,4 +54,4 @@ export interface CollapseProps extends CommonProps {
|
|
|
50
54
|
* @param {CollapseProps} props - The props for the Collapse component
|
|
51
55
|
* @returns {ReactElement} Collapse component
|
|
52
56
|
*/
|
|
53
|
-
export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate, extraPadding, }: CollapseProps) => ReactElement;
|
|
57
|
+
export declare const Collapse: ({ id, variant, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate, extraPadding, }: CollapseProps) => ReactElement;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
export declare const cvaCollapse: (props?:
|
|
1
|
+
export declare const cvaCollapse: (props?: ({
|
|
2
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
2
4
|
export declare const cvaCollapseHeader: (props?: ({
|
|
3
5
|
expanded?: boolean | null | undefined;
|
|
6
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
7
|
+
extraPadding?: boolean | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const cvaCollapseLabelContainer: (props?: ({
|
|
10
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const cvaCollapseLabel: (props?: ({
|
|
13
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
4
14
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
export declare const cvaCollapseLabelContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
6
15
|
export declare const cvaCollapsible: (props?: ({
|
|
16
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
7
17
|
extraPadding?: boolean | null | undefined;
|
|
8
18
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
19
|
export declare const cvaCollapseAnimated: (props?: ({
|