@luscii-healthtech/web-ui 38.4.1 → 38.4.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { type HTMLProps } from "react";
|
|
2
2
|
import "./Title.scss";
|
|
3
3
|
import { type TextColor } from "../Text/Text";
|
|
4
4
|
export type TitleStyle = "xs" | "sm" | "base" | "lg" | "xl" | "2xl";
|
|
@@ -35,6 +35,6 @@ type WithTextProp = SharedProps & {
|
|
|
35
35
|
text: string;
|
|
36
36
|
children?: never;
|
|
37
37
|
};
|
|
38
|
-
export type TitleProps = WithChildrenProp | WithTextProp
|
|
38
|
+
export type TitleProps = (WithChildrenProp | WithTextProp) & HTMLProps<HTMLHeadingElement>;
|
|
39
39
|
export declare const Title: (props: TitleProps) => React.JSX.Element;
|
|
40
40
|
export {};
|
|
@@ -1559,7 +1559,7 @@ var css_248z$g = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FI
|
|
|
1559
1559
|
styleInject(css_248z$g);
|
|
1560
1560
|
|
|
1561
1561
|
const Title = (props) => {
|
|
1562
|
-
const { variant: variantFromProps = "base", type, className, text, children, color, level, ref } = props;
|
|
1562
|
+
const { variant: variantFromProps = "base", type, className, text, children, color, level, ref } = props, rest = __rest(props, ["variant", "type", "className", "text", "children", "color", "level", "ref"]);
|
|
1563
1563
|
const variant = type ? type : variantFromProps;
|
|
1564
1564
|
const isSmallTitle = variant === "xs" || variant === "sm";
|
|
1565
1565
|
const containerClassName = classNames__default.default("ui-font-bold ui-leading-inherit ui-antialiased", allowedColors[color !== null && color !== void 0 ? color : "base"], {
|
|
@@ -1598,7 +1598,7 @@ const Title = (props) => {
|
|
|
1598
1598
|
if (level) {
|
|
1599
1599
|
ContainerElement = `h${level}`;
|
|
1600
1600
|
}
|
|
1601
|
-
return React__namespace.default.createElement(ContainerElement, { className: containerClassName, ref }, text !== null && text !== void 0 ? text : children);
|
|
1601
|
+
return React__namespace.default.createElement(ContainerElement, Object.assign({ className: containerClassName, ref }, rest), text !== null && text !== void 0 ? text : children);
|
|
1602
1602
|
};
|
|
1603
1603
|
|
|
1604
1604
|
const AccordionItem = ({ id, title, content, isCollapsedByDefault = false, onClosed, onOpened }) => {
|