infinity-ui-elements 1.8.6 → 1.8.7
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/FormHeader/FormHeader.d.ts +8 -0
- package/dist/components/FormHeader/FormHeader.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +7 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1431,12 +1431,12 @@ const FormFooter = React__namespace.forwardRef(({ helperText, trailingText, vali
|
|
|
1431
1431
|
});
|
|
1432
1432
|
FormFooter.displayName = "FormFooter";
|
|
1433
1433
|
|
|
1434
|
-
const checkboxVariants = classVarianceAuthority.cva("relative inline-flex items-center justify-center shrink-0 transition-all cursor-pointer", {
|
|
1434
|
+
const checkboxVariants = classVarianceAuthority.cva("relative inline-flex items-center justify-center shrink-0 transition-all cursor-pointer box-border", {
|
|
1435
1435
|
variants: {
|
|
1436
1436
|
size: {
|
|
1437
|
-
small: "w-[
|
|
1438
|
-
medium: "w-[
|
|
1439
|
-
large: "w-[
|
|
1437
|
+
small: "w-[10px] h-[10px] rounded-small border-[1.5px]",
|
|
1438
|
+
medium: "w-[12px] h-[12px] rounded-small border-[1.5px]",
|
|
1439
|
+
large: "w-[16px] h-[16px] rounded-medium border-[2px]",
|
|
1440
1440
|
},
|
|
1441
1441
|
validationState: {
|
|
1442
1442
|
none: "",
|
|
@@ -1577,7 +1577,7 @@ const Checkbox = React__namespace.forwardRef(({ label, errorText, size = "medium
|
|
|
1577
1577
|
const config = sizeConfig[size];
|
|
1578
1578
|
// Determine if we should show the error text
|
|
1579
1579
|
const shouldShowError = errorText && showErrorText;
|
|
1580
|
-
return (jsxRuntime.jsxs("div", { className: cn("inline-flex flex-col", containerClassName), children: [jsxRuntime.jsxs("div", { className: cn("inline-flex items-center", config.gap, isDisabled ? "cursor-not-allowed" : "cursor-pointer"), onClick: handleContainerClick, onKeyDown: handleKeyDown, role: "checkbox", "aria-checked": isIndeterminate ? "mixed" : isChecked, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : 0, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", className: "sr-only", checked: isChecked, onChange: handleChange, disabled: isDisabled, ...props }), jsxRuntime.jsxs("div", { className: "relative inline-flex shrink-0", children: [showRipple && (jsxRuntime.jsx("div", { className: cn("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full pointer-events-none w-full h-full", validationState === "error"
|
|
1580
|
+
return (jsxRuntime.jsxs("div", { className: cn("inline-flex flex-col px-2", containerClassName), children: [jsxRuntime.jsxs("div", { className: cn("inline-flex items-center", config.gap, isDisabled ? "cursor-not-allowed" : "cursor-pointer"), onClick: handleContainerClick, onKeyDown: handleKeyDown, role: "checkbox", "aria-checked": isIndeterminate ? "mixed" : isChecked, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : 0, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", className: "sr-only", checked: isChecked, onChange: handleChange, disabled: isDisabled, ...props }), jsxRuntime.jsxs("div", { className: "relative inline-flex shrink-0", children: [showRipple && (jsxRuntime.jsx("div", { className: cn("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full pointer-events-none w-full h-full", validationState === "error"
|
|
1581
1581
|
? "bg-action-outline-negative-faded"
|
|
1582
1582
|
: "bg-action-outline-primary-faded"), style: {
|
|
1583
1583
|
animation: "var(--animate-checkbox-ripple)",
|
|
@@ -2200,7 +2200,7 @@ const Tooltip = React__namespace.forwardRef(({ children, heading, description, p
|
|
|
2200
2200
|
});
|
|
2201
2201
|
Tooltip.displayName = "Tooltip";
|
|
2202
2202
|
|
|
2203
|
-
const FormHeader = React__namespace.forwardRef(({ label, size = "medium", isOptional = false, isRequired = false, infoHeading, infoDescription, linkText, linkHref, onLinkClick, htmlFor, className, labelClassName, linkClassName, }, ref) => {
|
|
2203
|
+
const FormHeader = React__namespace.forwardRef(({ label, size = "medium", isOptional = false, isRequired = false, infoHeading, infoDescription, linkText, linkHref, onLinkClick, linkLeadingIcon, linkTrailingIcon, htmlFor, className, labelClassName, linkClassName, }, ref) => {
|
|
2204
2204
|
// Size-based configurations
|
|
2205
2205
|
const sizeConfig = {
|
|
2206
2206
|
small: {
|
|
@@ -2223,7 +2223,7 @@ const FormHeader = React__namespace.forwardRef(({ label, size = "medium", isOpti
|
|
|
2223
2223
|
},
|
|
2224
2224
|
};
|
|
2225
2225
|
const config = sizeConfig[size];
|
|
2226
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("flex items-center justify-between px-1", config.gap, className), children: [jsxRuntime.jsxs("div", { className: cn("flex items-center", config.gap), children: [jsxRuntime.jsxs("label", { htmlFor: htmlFor, className: cn("flex items-center", labelClassName), children: [jsxRuntime.jsx("span", { className: cn(config.textClassName, "text-surface-neutral-subtle"), children: label }), isRequired && (jsxRuntime.jsx("span", { className: cn(config.textClassName, "text-color-negative ml-0.5"), children: "*" })), isOptional && (jsxRuntime.jsx("span", { className: cn(config.textClassNameRegular, "text-surface-neutral-muted italic ml-1"), children: "(optional)" }))] }), infoDescription && (jsxRuntime.jsx(Tooltip, { description: infoDescription, heading: infoHeading, children: jsxRuntime.jsx(Icon, { name: "info", size: config.iconSize }) }))] }), linkText && (jsxRuntime.jsx(Link, { href: linkHref, onClick: onLinkClick, type: "action", color: "primary", size: size === "large" ? "small" : "xsmall", children: linkText }))] }));
|
|
2226
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("flex items-center justify-between px-1", config.gap, className), children: [jsxRuntime.jsxs("div", { className: cn("flex items-center", config.gap), children: [jsxRuntime.jsxs("label", { htmlFor: htmlFor, className: cn("flex items-center", labelClassName), children: [jsxRuntime.jsx("span", { className: cn(config.textClassName, "text-surface-neutral-subtle"), children: label }), isRequired && (jsxRuntime.jsx("span", { className: cn(config.textClassName, "text-color-negative ml-0.5"), children: "*" })), isOptional && (jsxRuntime.jsx("span", { className: cn(config.textClassNameRegular, "text-surface-neutral-muted italic ml-1"), children: "(optional)" }))] }), infoDescription && (jsxRuntime.jsx(Tooltip, { description: infoDescription, heading: infoHeading, children: jsxRuntime.jsx(Icon, { name: "info", size: config.iconSize }) }))] }), linkText && (jsxRuntime.jsx(Link, { href: linkHref, onClick: onLinkClick, type: "action", color: "primary", size: size === "large" ? "small" : "xsmall", leadingIcon: linkLeadingIcon, trailingIcon: linkTrailingIcon, children: linkText }))] }));
|
|
2227
2227
|
});
|
|
2228
2228
|
FormHeader.displayName = "FormHeader";
|
|
2229
2229
|
|