@luscii-healthtech/web-ui 38.4.1 → 38.4.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.
|
@@ -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 }) => {
|
|
@@ -6756,43 +6756,42 @@ const FilterMenu = (props) => {
|
|
|
6756
6756
|
React__namespace.default.createElement(
|
|
6757
6757
|
react.Transition,
|
|
6758
6758
|
{ enter: "ui-transition ui-ease-out ui-duration-100", enterFrom: "ui-transform ui-opacity-0 ui-scale-95", enterTo: "ui-transform ui-opacity-100 ui-scale-100", leave: "ui-transition ui-ease-in ui-duration-75", leaveFrom: "ui-transform ui-opacity-100 ui-scale-100", leaveTo: "ui-transform ui-opacity-0 ui-scale-95" },
|
|
6759
|
-
React__namespace.default.createElement(
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
}) },
|
|
6767
|
-
React__namespace.default.createElement("
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
)
|
|
6759
|
+
React__namespace.default.createElement(react.PopoverPanel, { className: classNames__default.default("ui-min-w-58", "ui-absolute ui-z-10 ui-mt-2", "ui-rounded-2xl ui-bg-white ui-shadow-2xl ui-ring-1 ui-ring-black ui-ring-opacity-5", "focus:ui-outline-none", "ui-border ui-border-neutral-border-high-contrast", {
|
|
6760
|
+
// Align popover to the left side of the button label
|
|
6761
|
+
"ui-left-4 ui-origin-top-left": alignPopover === "left",
|
|
6762
|
+
// Align popover to the right side of the chevron icon
|
|
6763
|
+
"ui-right-3 ui-origin-top-right": alignPopover === "right"
|
|
6764
|
+
}) }, ({ close }) => React__namespace.default.createElement("form", { className: "ui-max-h-120 ui-overflow-y-auto" }, categorizedFilter.options.map((option) => React__namespace.default.createElement(
|
|
6765
|
+
"label",
|
|
6766
|
+
{ key: `${option.id}`, className: classNames__default.default("first-of-type:ui-rounded-t-2xl", "last-of-type:ui-rounded-b-2xl", "ui-flex ui-items-center ui-p-3", "ui-cursor-pointer", "ui-transition-colors ui-duration-300 ui-ease-in-out hover:ui-bg-primary-background"), htmlFor: `filter-${option.id}`, role: multiSelection ? "menuitemcheckbox" : "menuitem" },
|
|
6767
|
+
React__namespace.default.createElement("input", { id: `filter-${option.id}`, name: `${option.value}`, defaultValue: option.value, type: "checkbox", defaultChecked: option.isChecked, onChange: () => {
|
|
6768
|
+
props.onFilterOptionChange({
|
|
6769
|
+
changedFilterOption: Object.assign(Object.assign({}, option), { isChecked: !option.isChecked })
|
|
6770
|
+
});
|
|
6771
|
+
if (singleSelection) {
|
|
6772
|
+
close();
|
|
6773
|
+
}
|
|
6774
|
+
}, className: classNames__default.default("ui-form-checkbox ui-h-4 ui-w-4 ui-rounded ui-border-slate-300 ui-text-primary focus:ui-ring-primary", {
|
|
6775
|
+
"ui-hidden": singleSelection
|
|
6776
|
+
}) }),
|
|
6777
|
+
React__namespace.default.createElement(
|
|
6778
|
+
"span",
|
|
6779
|
+
{ className: classNames__default.default({
|
|
6780
|
+
"ui-pr-l": multiSelection,
|
|
6781
|
+
"ui-ml-s": multiSelection
|
|
6782
|
+
}) },
|
|
6783
|
+
React__namespace.default.createElement(Text, { className: "ui-whitespace-nowrap ui-capitalize", variant: option.isChecked ? "strong" : "base" }, option.label)
|
|
6784
|
+
),
|
|
6785
|
+
React__namespace.default.createElement(
|
|
6786
|
+
"span",
|
|
6787
|
+
{ className: classNames__default.default("ui-ml-auto ui-pr-s", {
|
|
6788
|
+
"ui-hidden": multiSelection,
|
|
6789
|
+
"ui-text-primary": option.isChecked,
|
|
6790
|
+
"ui-text-transparent": !option.isChecked
|
|
6791
|
+
}) },
|
|
6792
|
+
React__namespace.default.createElement(solid.CheckIcon, { className: "ui-ml-s ui-h-5 ui-w-5 ui-flex-shrink-0" })
|
|
6793
|
+
)
|
|
6794
|
+
))))
|
|
6796
6795
|
)
|
|
6797
6796
|
);
|
|
6798
6797
|
};
|