infinity-ui-elements 1.8.4 → 1.8.5
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/FormFooter/FormFooter.d.ts.map +1 -1
- package/dist/components/FormHeader/FormHeader.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +28 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1393,17 +1393,17 @@ const FormFooter = React__namespace.forwardRef(({ helperText, trailingText, vali
|
|
|
1393
1393
|
// Size-based configurations
|
|
1394
1394
|
const sizeConfig = {
|
|
1395
1395
|
small: {
|
|
1396
|
-
|
|
1396
|
+
textClassName: "text-caption-small-regular",
|
|
1397
1397
|
iconSize: 12,
|
|
1398
1398
|
gap: "gap-1",
|
|
1399
1399
|
},
|
|
1400
1400
|
medium: {
|
|
1401
|
-
|
|
1401
|
+
textClassName: "text-caption-medium-regular",
|
|
1402
1402
|
iconSize: 14,
|
|
1403
1403
|
gap: "gap-1",
|
|
1404
1404
|
},
|
|
1405
1405
|
large: {
|
|
1406
|
-
|
|
1406
|
+
textClassName: "text-caption-large-regular",
|
|
1407
1407
|
iconSize: 16,
|
|
1408
1408
|
gap: "gap-1.5",
|
|
1409
1409
|
},
|
|
@@ -1412,20 +1412,22 @@ const FormFooter = React__namespace.forwardRef(({ helperText, trailingText, vali
|
|
|
1412
1412
|
// Determine text color based on validation state and disabled state
|
|
1413
1413
|
const getTextColor = () => {
|
|
1414
1414
|
if (isDisabled)
|
|
1415
|
-
return "disabled";
|
|
1415
|
+
return "text-surface-ink-neutral-disabled";
|
|
1416
1416
|
if (validationState === "positive")
|
|
1417
|
-
return "positive";
|
|
1417
|
+
return "text-feedback-ink-positive-intense";
|
|
1418
1418
|
if (validationState === "negative")
|
|
1419
|
-
return "negative";
|
|
1419
|
+
return "text-feedback-ink-negative-subtle";
|
|
1420
1420
|
if (validationState === "default")
|
|
1421
|
-
return "
|
|
1422
|
-
return "
|
|
1421
|
+
return "text-surface-ink-neutral-subtle";
|
|
1422
|
+
return "text-surface-ink-neutral-subtle";
|
|
1423
1423
|
};
|
|
1424
|
+
const helperTextColorClass = getTextColor();
|
|
1425
|
+
const trailingTextColorClass = getTextColor();
|
|
1424
1426
|
// Don't render anything if there's no content
|
|
1425
1427
|
if (!helperText && !trailingText) {
|
|
1426
1428
|
return null;
|
|
1427
1429
|
}
|
|
1428
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("flex items-center justify-between px-1", config.gap, className), children: [helperText && (jsxRuntime.jsxs("div", { className: cn("flex items-center", config.gap), children: [validationState === "positive" && (jsxRuntime.jsx("svg", { width: config.iconSize, height: config.iconSize, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-feedback-ink-positive-intense shrink-0", children: jsxRuntime.jsx("path", { d: "M3 7L6 10L11 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })), validationState === "negative" && (jsxRuntime.jsxs("svg", { width: config.iconSize, height: config.iconSize, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-feedback-ink-negative-subtle shrink-0", children: [jsxRuntime.jsx("circle", { cx: "7", cy: "7", r: "6", stroke: "currentColor", strokeWidth: "1" }), jsxRuntime.jsx("path", { d: "M7 4V7.5M7 10V9.5", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round" })] })), jsxRuntime.jsx(
|
|
1430
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("flex items-center justify-between px-1", config.gap, className), children: [helperText && (jsxRuntime.jsxs("div", { className: cn("flex items-center", config.gap), children: [validationState === "positive" && (jsxRuntime.jsx("svg", { width: config.iconSize, height: config.iconSize, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-feedback-ink-positive-intense shrink-0", children: jsxRuntime.jsx("path", { d: "M3 7L6 10L11 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })), validationState === "negative" && (jsxRuntime.jsxs("svg", { width: config.iconSize, height: config.iconSize, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-feedback-ink-negative-subtle shrink-0", children: [jsxRuntime.jsx("circle", { cx: "7", cy: "7", r: "6", stroke: "currentColor", strokeWidth: "1" }), jsxRuntime.jsx("path", { d: "M7 4V7.5M7 10V9.5", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round" })] })), jsxRuntime.jsx("span", { className: cn(config.textClassName, helperTextColorClass, "italic font-size-100 leading-100", helperTextClassName), children: helperText })] })), trailingText && (jsxRuntime.jsx("span", { className: cn(config.textClassName, trailingTextColorClass, "font-size-100 leading-100 shrink-0", trailingTextClassName), children: trailingText }))] }));
|
|
1429
1431
|
});
|
|
1430
1432
|
FormFooter.displayName = "FormFooter";
|
|
1431
1433
|
|
|
@@ -1563,7 +1565,7 @@ const Checkbox = React__namespace.forwardRef(({ label, errorText, size = "medium
|
|
|
1563
1565
|
},
|
|
1564
1566
|
medium: {
|
|
1565
1567
|
gap: "gap-2.5",
|
|
1566
|
-
labelSize: "text-body-
|
|
1568
|
+
labelSize: "text-body-small-regular",
|
|
1567
1569
|
iconSize: 12,
|
|
1568
1570
|
},
|
|
1569
1571
|
large: {
|
|
@@ -2202,23 +2204,26 @@ const FormHeader = React__namespace.forwardRef(({ label, size = "medium", isOpti
|
|
|
2202
2204
|
// Size-based configurations
|
|
2203
2205
|
const sizeConfig = {
|
|
2204
2206
|
small: {
|
|
2205
|
-
|
|
2207
|
+
textClassName: "text-body-xsmall-semibold",
|
|
2208
|
+
textClassNameRegular: "text-caption-small-regular",
|
|
2206
2209
|
iconSize: 12,
|
|
2207
2210
|
gap: "gap-1.5",
|
|
2208
2211
|
},
|
|
2209
2212
|
medium: {
|
|
2210
|
-
|
|
2213
|
+
textClassName: "text-body-small-semibold",
|
|
2214
|
+
textClassNameRegular: "text-caption-medium-regular",
|
|
2211
2215
|
iconSize: 14,
|
|
2212
2216
|
gap: "gap-2",
|
|
2213
2217
|
},
|
|
2214
2218
|
large: {
|
|
2215
|
-
|
|
2219
|
+
textClassName: "text-body-medium-semibold",
|
|
2220
|
+
textClassNameRegular: "text-caption-large-regular",
|
|
2216
2221
|
iconSize: 16,
|
|
2217
2222
|
gap: "gap-2.5",
|
|
2218
2223
|
},
|
|
2219
2224
|
};
|
|
2220
2225
|
const config = sizeConfig[size];
|
|
2221
|
-
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(
|
|
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 }))] }));
|
|
2222
2227
|
});
|
|
2223
2228
|
FormHeader.displayName = "FormHeader";
|
|
2224
2229
|
|
|
@@ -2270,7 +2275,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
2270
2275
|
});
|
|
2271
2276
|
Modal.displayName = "Modal";
|
|
2272
2277
|
|
|
2273
|
-
const selectVariants = classVarianceAuthority.cva("relative flex items-center gap-2 border rounded-
|
|
2278
|
+
const selectVariants = classVarianceAuthority.cva("relative flex items-center gap-2 border rounded-large transition-all font-display font-size-100 leading-100", {
|
|
2274
2279
|
variants: {
|
|
2275
2280
|
size: {
|
|
2276
2281
|
small: "h-[28px] px-3 text-xs gap-2",
|
|
@@ -2463,7 +2468,13 @@ const Select = React__namespace.forwardRef(({ className, options = [], value: co
|
|
|
2463
2468
|
}, [isOpen, value, options, isDisabled, isLoading]);
|
|
2464
2469
|
// Transform options to dropdown menu items
|
|
2465
2470
|
const menuItems = options.map((option) => ({
|
|
2466
|
-
|
|
2471
|
+
value: option.value,
|
|
2472
|
+
label: option.label ?? String(option.value),
|
|
2473
|
+
description: option.description,
|
|
2474
|
+
leadingIcon: option.leadingIcon,
|
|
2475
|
+
trailingIcon: option.trailingIcon,
|
|
2476
|
+
isDisabled: option.isDisabled,
|
|
2477
|
+
variant: option.variant,
|
|
2467
2478
|
onClick: () => handleSelect(option),
|
|
2468
2479
|
}));
|
|
2469
2480
|
const widthStyle = menuWidth === "full" ? "100%" : menuWidth === "auto" ? "auto" : menuWidth;
|
|
@@ -2488,9 +2499,7 @@ const Select = React__namespace.forwardRef(({ className, options = [], value: co
|
|
|
2488
2499
|
? "text-feedback-ink-positive-intense"
|
|
2489
2500
|
: currentValidationState === "negative"
|
|
2490
2501
|
? "text-feedback-ink-negative-subtle"
|
|
2491
|
-
: "text-surface-ink-neutral-muted"), children: prefix })), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !selectedOption && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: isLoading
|
|
2492
|
-
? "Loading..."
|
|
2493
|
-
: selectedOption?.label || selectedOption?.title || placeholder }), showClearButton && hasValue && !isDisabled && !isLoading && (jsxRuntime.jsx("button", { type: "button", onClick: handleClear, className: "shrink-0 flex items-center justify-center text-surface-ink-neutral-muted hover:text-surface-ink-neutral-normal transition-colors", tabIndex: -1, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M12 4L4 12M4 4L12 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) })), suffix && !showClearButton && (jsxRuntime.jsx("span", { className: cn("shrink-0 flex items-center", isDisabled
|
|
2502
|
+
: "text-surface-ink-neutral-muted"), children: prefix })), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !selectedOption && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: isLoading ? "Loading..." : selectedOption?.label || placeholder }), showClearButton && hasValue && !isDisabled && !isLoading && (jsxRuntime.jsx("button", { type: "button", onClick: handleClear, className: "shrink-0 flex items-center justify-center text-surface-ink-neutral-muted hover:text-surface-ink-neutral-normal transition-colors", tabIndex: -1, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M12 4L4 12M4 4L12 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) })), suffix && !showClearButton && (jsxRuntime.jsx("span", { className: cn("shrink-0 flex items-center", isDisabled
|
|
2494
2503
|
? "text-surface-ink-neutral-disabled"
|
|
2495
2504
|
: currentValidationState === "positive"
|
|
2496
2505
|
? "text-feedback-ink-positive-intense"
|