infinity-ui-elements 1.9.5 → 1.9.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/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +11 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2920,7 +2920,7 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
2920
2920
|
? `${window.innerHeight - position.bottom - gap - 10}px`
|
|
2921
2921
|
: `${position.top - gap - 10}px`,
|
|
2922
2922
|
overflowY: "auto",
|
|
2923
|
-
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border border-surface-outline-neutral-subtle", calendarClassName), onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsxs("div", { className: "flex", children: [showPresets && presets.length > 0 && (jsxRuntime.jsx("div", { className: "w-
|
|
2923
|
+
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border-[0.5px] border-surface-outline-neutral-subtle", calendarClassName), onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsxs("div", { className: "flex flex-row p-7 gap-7", children: [showPresets && presets.length > 0 && (jsxRuntime.jsx("div", { className: "w-[160px] flex flex-col gap-2", children: presets.map((preset) => (jsxRuntime.jsx(ListItem, { title: preset.label, type: "single", showChevron: false, isSelected: selectedPreset === preset.value, onClick: () => handlePresetClick(preset), containerClassName: "px-4 py-3" }, preset.value))) })), jsxRuntime.jsxs("div", { className: "flex gap-7", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsx("div", { className: "flex flex-col px-3", children: jsxRuntime.jsx("p", { className: "text-body-small-medium", children: "Start Date" }) }), jsxRuntime.jsxs("div", { className: "flex flex-col p-5 rounded-[8px] bg-surface-fill-neutral-moderate", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3 px-3", children: [jsxRuntime.jsx("h3", { className: "text-body-small-medium font-medium text-surface-ink-neutral-normal", children: formatMonthYear(startMonth) }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("button", { onClick: handlePrevStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Previous month", children: jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) }), jsxRuntime.jsx("button", { onClick: handleNextStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Next month", children: jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) })] })] }), jsxRuntime.jsx("div", { className: "date-range-calendar-wrapper", children: jsxRuntime.jsx(Calendar, { onChange: handleStartDateChange, value: tempValue.startDate, minDate: minDateParsed ?? undefined, maxDate: tempValue.endDate
|
|
2924
2924
|
? tempValue.endDate
|
|
2925
2925
|
: maxDateParsed ?? undefined, activeStartDate: startMonth, onActiveStartDateChange: ({ activeStartDate, }) => {
|
|
2926
2926
|
if (activeStartDate)
|
|
@@ -2952,15 +2952,15 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
2952
2952
|
"SAT",
|
|
2953
2953
|
];
|
|
2954
2954
|
return weekdayNames[date.getDay()];
|
|
2955
|
-
} }) })] })] })] }), jsxRuntime.jsxs("div", { className: "
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2955
|
+
} }) })] })] })] })] }), jsxRuntime.jsxs("div", { className: "border-t-[0.5px] border-surface-outline-neutral-subtle flex px-8 py-5 items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-action-fill-primary-default" }), jsxRuntime.jsx("span", { className: "text-sm text-surface-ink-neutral-normal", children: tempValue.startDate && tempValue.endDate
|
|
2956
|
+
? isSameDay(tempValue.startDate, tempValue.endDate)
|
|
2957
|
+
? "Today"
|
|
2958
|
+
: `${formatDate(tempValue.startDate)} - ${formatDate(tempValue.endDate)}`
|
|
2959
|
+
: tempValue.startDate
|
|
2960
|
+
? `From ${formatDate(tempValue.startDate)}`
|
|
2961
|
+
: tempValue.endDate
|
|
2962
|
+
? `Until ${formatDate(tempValue.endDate)}`
|
|
2963
|
+
: "No selection" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(Button, { variant: "secondary", color: "neutral", size: "small", onClick: handleCancel, children: "Cancel" }), jsxRuntime.jsx(Button, { variant: "primary", color: "primary", size: "small", onClick: handleApply, children: "Apply date range" })] })] })] }) }));
|
|
2964
2964
|
return reactDom.createPortal(calendarPopup, document.body);
|
|
2965
2965
|
})()] }));
|
|
2966
2966
|
});
|
|
@@ -3281,7 +3281,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
3281
3281
|
if (!isOpen)
|
|
3282
3282
|
return null;
|
|
3283
3283
|
const hasHeader = title || description;
|
|
3284
|
-
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4
|
|
3284
|
+
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-10", children: jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal" }) })), jsxRuntime.jsx("div", { className: cn("flex-1 overflow-y-auto", variant === "default" && "px-6", variant === "default" && hasHeader && "py-4", variant === "default" && !hasHeader && "pt-6 pb-4", variant === "default" && !footer && "pb-6", bodyClassName), children: children }), footer && (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [variant === "default" && (jsxRuntime.jsx(Divider, { thickness: "thin", variant: "muted" })), jsxRuntime.jsx("div", { className: cn("flex items-center justify-end gap-3 px-6 pt-5 pb-6", footerClassName), children: footer })] }))] })] }));
|
|
3285
3285
|
});
|
|
3286
3286
|
Modal.displayName = "Modal";
|
|
3287
3287
|
|