@trackunit/react-date-and-time-components 1.10.13 → 1.10.18
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/index.cjs.js +12 -24
- package/index.esm.js +12 -24
- package/package.json +10 -10
- package/src/Timeline/TimelineElement.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -631,7 +631,7 @@ const DayRangeSelect = ({ className, dataTestId, disabled, selectedDateRange, on
|
|
|
631
631
|
return (jsxRuntime.jsxs(reactComponents.Popover, { onOpenStateChange: state => !state && setIsCustomDateRangeOpen(false), placement: "bottom-start", children: [jsxRuntime.jsx(reactComponents.PopoverTrigger, { children: !actionButton ? (jsxRuntime.jsx(reactComponents.Button, { className: cvaTriggerButton({ active: !!selectedDateRange, className }), dataTestId: dataTestId, disabled: disabled, fullWidth: fullWidth, prefix: jsxRuntime.jsx(reactComponents.Icon, { ariaLabel: t("input.icon.tooltip.calendar"), color: disabled ? "secondary" : selectedDateRange ? "primary" : undefined, name: "Calendar", size: size === "large" ? "medium" : "small" }), size: size, variant: "secondary", children: popoverTriggerLabel ?? t("trigger.selectDateRange") })) : (jsxRuntime.jsx("div", { children: actionButton })) }), jsxRuntime.jsx(reactComponents.PopoverContent, { dataTestId: dataTestId ? `${dataTestId}-popover-content` : undefined, children: closeMenu => {
|
|
632
632
|
return !isCustomDateRangeOpen ? (jsxRuntime.jsxs(reactComponents.MenuList, { className: "min-w-[280px]", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [showDateRangeSearch ? (jsxRuntime.jsx(reactFormComponents.Search, { className: "w-full", dataTestId: dataTestId ? `${dataTestId}-search-input` : undefined, onChange: event => handleDateRangeSearch(event.target.value), onClear: () => handleDateRangeSearch(""), placeholder: allowedDirection === "last"
|
|
633
633
|
? t("input.placeholder.customRange.last")
|
|
634
|
-
: t("input.placeholder.customRange.next"), value: dateRangeSearchValue })) : null, jsxRuntime.jsx(reactComponents.Button, { className: "ml-auto", dataTestId: dataTestId ? `${dataTestId}-reset-button` : undefined, disabled: !selectedDateRange, onClick: handleReset, size: "small", variant: "ghost", children: t("layout.actions.reset") })] }), jsxRuntime.jsx("hr", { className: "border-
|
|
634
|
+
: t("input.placeholder.customRange.next"), value: dateRangeSearchValue })) : null, jsxRuntime.jsx(reactComponents.Button, { className: "ml-auto", dataTestId: dataTestId ? `${dataTestId}-reset-button` : undefined, disabled: !selectedDateRange, onClick: handleReset, size: "small", variant: "ghost", children: t("layout.actions.reset") })] }), jsxRuntime.jsx("hr", { className: "my-1 border-neutral-200", role: "separator" }), jsxRuntime.jsx(DayRangeSelectOptions, { dataTestId: dataTestId ? `${dataTestId}-options` : undefined, onSelect: value => handleOptionsSelect(value, closeMenu), selectedDateRange: currentSelectedRange, temporalPeriods: temporalPeriods }), showCustomDateRangeOption ? (jsxRuntime.jsxs("section", { children: [jsxRuntime.jsx(reactComponents.MenuDivider, {}), jsxRuntime.jsx(reactComponents.MenuItem, { dataTestId: dataTestId ? `${dataTestId}-custom-range` : undefined, label: t("trigger.customRange"), onClick: () => setIsCustomDateRangeOpen(true), selected: isCustomDateRangeSelected, suffix: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isCustomDateRangeSelected ? jsxRuntime.jsx(reactComponents.Icon, { color: "primary", name: "Check", size: "small" }) : null, jsxRuntime.jsx(reactComponents.Icon, { name: "ChevronRight", size: "small" })] }) })] })) : null] })) : (jsxRuntime.jsx(reactComponents.Card, { children: jsxRuntime.jsx(DayRangePicker, { cancelButtonLabel: t("layout.actions.back"), disabledDays: customDateRangeDisabledDays, language: "en", onClose: () => setIsCustomDateRangeOpen(false), onRangeSelect: dateRange => handleCustomDateRangeSelect(dateRange
|
|
635
635
|
? {
|
|
636
636
|
start: dateRange.start ?? undefined,
|
|
637
637
|
end: dateRange.end ?? undefined,
|
|
@@ -683,17 +683,14 @@ const DayPicker = ({ onDaySelect, disabledDays, selectedDay, language, className
|
|
|
683
683
|
}, value: selectedDay ?? null }) }));
|
|
684
684
|
};
|
|
685
685
|
|
|
686
|
-
const cvaTimelineElement = cssClassVarianceUtilities.cvaMerge([
|
|
687
|
-
"flex",
|
|
688
|
-
"group/timeline",
|
|
689
|
-
], {
|
|
686
|
+
const cvaTimelineElement = cssClassVarianceUtilities.cvaMerge(["flex", "group/timeline"], {
|
|
690
687
|
variants: {
|
|
691
688
|
selected: {
|
|
692
689
|
true: "bg-info-50 rounded-[4px]",
|
|
693
690
|
false: "",
|
|
694
691
|
},
|
|
695
692
|
hoverBehavior: {
|
|
696
|
-
true: "hover:
|
|
693
|
+
true: "hover:rounded-[4px] hover:bg-neutral-50",
|
|
697
694
|
false: "",
|
|
698
695
|
},
|
|
699
696
|
},
|
|
@@ -715,14 +712,14 @@ const cvaLine = cssClassVarianceUtilities.cvaMerge([
|
|
|
715
712
|
"w-px",
|
|
716
713
|
"h-full",
|
|
717
714
|
"border-l",
|
|
718
|
-
"border-
|
|
715
|
+
"border-neutral-300",
|
|
719
716
|
"group-first/timeline:top-3.5",
|
|
720
717
|
"group-last/timeline:h-4",
|
|
721
718
|
], {
|
|
722
719
|
variants: {
|
|
723
720
|
lineStyle: {
|
|
724
721
|
dashed: "border-dashed",
|
|
725
|
-
solid: ""
|
|
722
|
+
solid: "",
|
|
726
723
|
},
|
|
727
724
|
},
|
|
728
725
|
});
|
|
@@ -736,15 +733,9 @@ const cvaCustomDot = cssClassVarianceUtilities.cvaMerge([
|
|
|
736
733
|
"rounded-full",
|
|
737
734
|
"border",
|
|
738
735
|
"border-white",
|
|
739
|
-
"z-[2]"
|
|
736
|
+
"z-[2]",
|
|
740
737
|
]);
|
|
741
|
-
const cvaToggleBtnIcon = cssClassVarianceUtilities.cvaMerge([
|
|
742
|
-
"mr-1",
|
|
743
|
-
"rounded-lg",
|
|
744
|
-
"transition-transform",
|
|
745
|
-
"duration-300",
|
|
746
|
-
"cursor-pointer",
|
|
747
|
-
], {
|
|
738
|
+
const cvaToggleBtnIcon = cssClassVarianceUtilities.cvaMerge(["mr-1", "rounded-lg", "transition-transform", "duration-300", "cursor-pointer"], {
|
|
748
739
|
variants: {
|
|
749
740
|
rotated: {
|
|
750
741
|
true: "rotate-180",
|
|
@@ -752,10 +743,7 @@ const cvaToggleBtnIcon = cssClassVarianceUtilities.cvaMerge([
|
|
|
752
743
|
},
|
|
753
744
|
},
|
|
754
745
|
});
|
|
755
|
-
const cvaTimelineElementTime = cssClassVarianceUtilities.cvaMerge([
|
|
756
|
-
"min-h-6",
|
|
757
|
-
"content-center",
|
|
758
|
-
], {
|
|
746
|
+
const cvaTimelineElementTime = cssClassVarianceUtilities.cvaMerge(["min-h-6", "content-center"], {
|
|
759
747
|
variants: {
|
|
760
748
|
width: {
|
|
761
749
|
large: "min-w-16",
|
|
@@ -821,7 +809,7 @@ const Timeline = ({ className, dataTestId, children, dateHeader, customHeader, t
|
|
|
821
809
|
}, [isOpen]);
|
|
822
810
|
const renderToggleButton = () => (jsxRuntime.jsxs("div", { className: cvaTimelineElement(), children: [childProps.date ? (jsxRuntime.jsx("div", { className: cvaTimelineElementTime({
|
|
823
811
|
width: hourCycle === "h12" || hourCycle === "h11" ? "large" : "small",
|
|
824
|
-
}) })) : null, jsxRuntime.jsx("div", { className: cvaDotWrapper(), children: jsxRuntime.jsx("div", { className: cvaLine({ lineStyle: childProps.lineStyle }) }) }), jsxRuntime.jsxs("div", { className: "
|
|
812
|
+
}) })) : null, jsxRuntime.jsx("div", { className: cvaDotWrapper(), children: jsxRuntime.jsx("div", { className: cvaLine({ lineStyle: childProps.lineStyle }) }) }), jsxRuntime.jsxs("div", { className: "flex min-h-8 cursor-pointer items-center text-sm text-neutral-500 hover:text-neutral-600", "data-testid": "timeline-toggle-btn", onClick: () => {
|
|
825
813
|
toggleButton?.onClick && toggleButton.onClick();
|
|
826
814
|
setIsOpen(!isOpen);
|
|
827
815
|
}, children: [jsxRuntime.jsx(reactComponents.Icon, { className: cvaToggleBtnIcon({ rotated: isOpen }), name: "ChevronDown", size: "small" }), jsxRuntime.jsx("span", { children: isOpen ? toggleButton?.collapsedLabel : toggleButton?.expandedLabel })] })] }));
|
|
@@ -833,12 +821,12 @@ const Timeline = ({ className, dataTestId, children, dateHeader, customHeader, t
|
|
|
833
821
|
return null;
|
|
834
822
|
}
|
|
835
823
|
const { date, dateRange, showTime } = dateHeader;
|
|
836
|
-
return (jsxRuntime.jsx("div", { className: "pb-4", "data-testid": "timeline-date-header", children: date ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(reactComponents.Text, { size: "medium", type: "span", weight: "thick", children: formatDate(date, { selectFormat: !showTime ? "dateOnly" : undefined }) }), jsxRuntime.jsx(reactComponents.Text, { className: "text-
|
|
824
|
+
return (jsxRuntime.jsx("div", { className: "pb-4", "data-testid": "timeline-date-header", children: date ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(reactComponents.Text, { size: "medium", type: "span", weight: "thick", children: formatDate(date, { selectFormat: !showTime ? "dateOnly" : undefined }) }), jsxRuntime.jsx(reactComponents.Text, { className: "text-neutral-500", size: "medium", type: "span", weight: "thick", children: ` (${dateAndTimeUtils.timeSinceAuto(date, new Date(), undefined, locale)})` })] })) : (jsxRuntime.jsx(reactComponents.Text, { className: "pr-1", size: "medium", type: "span", weight: "thick", children: formatRange(dateRange, { dateStyle: !showTime ? "medium" : undefined }) })) }));
|
|
837
825
|
}, [dateHeader, formatDate, formatRange, customHeader, locale]);
|
|
838
826
|
return (jsxRuntime.jsxs("div", { className: className, "data-testid": dataTestId, children: [renderDateHeader(), customHeader ? jsxRuntime.jsx("div", { className: "text-sm font-semibold", children: customHeader }) : null, toggleButton && middleChildren.length > 0 ? (jsxRuntime.jsxs("div", { children: [firstChild, middleChildren.length > 0 ? renderToggleButton() : null, jsxRuntime.jsxs("div", { "aria-hidden": !isOpen, className: "overflow-hidden overflow-y-auto transition-all duration-300", ref: ref, children: [jsxRuntime.jsx("div", {}), visibleMiddleChildren, isOpen && visibleCount < middleChildren.length ? (jsxRuntime.jsx("div", { className: "flex justify-center py-2", onClick: e => {
|
|
839
827
|
e.stopPropagation(); // Prevent parent handlers from firing
|
|
840
828
|
loadMoreItems();
|
|
841
|
-
}, children: jsxRuntime.jsx(reactComponents.Text, { className: "text-
|
|
829
|
+
}, children: jsxRuntime.jsx(reactComponents.Text, { className: "cursor-pointer text-neutral-500 hover:text-neutral-600", "data-testid": "load-more-text", size: "small", type: "span", children: t("timeline.loadMore") }) })) : null, jsxRuntime.jsx("div", {})] }), lastChild] })) : (jsxRuntime.jsx("div", { children: children }))] }));
|
|
842
830
|
};
|
|
843
831
|
|
|
844
832
|
/**
|
|
@@ -886,7 +874,7 @@ const renderChildren = (children) => {
|
|
|
886
874
|
if (!children) {
|
|
887
875
|
return null;
|
|
888
876
|
}
|
|
889
|
-
return jsxRuntime.jsx("div", { className: "
|
|
877
|
+
return jsxRuntime.jsx("div", { className: "mt-0.5 content-center text-sm text-neutral-500", children: children });
|
|
890
878
|
};
|
|
891
879
|
const renderActionButton = (actionButton) => {
|
|
892
880
|
if (!actionButton) {
|
package/index.esm.js
CHANGED
|
@@ -629,7 +629,7 @@ const DayRangeSelect = ({ className, dataTestId, disabled, selectedDateRange, on
|
|
|
629
629
|
return (jsxs(Popover, { onOpenStateChange: state => !state && setIsCustomDateRangeOpen(false), placement: "bottom-start", children: [jsx(PopoverTrigger, { children: !actionButton ? (jsx(Button, { className: cvaTriggerButton({ active: !!selectedDateRange, className }), dataTestId: dataTestId, disabled: disabled, fullWidth: fullWidth, prefix: jsx(Icon, { ariaLabel: t("input.icon.tooltip.calendar"), color: disabled ? "secondary" : selectedDateRange ? "primary" : undefined, name: "Calendar", size: size === "large" ? "medium" : "small" }), size: size, variant: "secondary", children: popoverTriggerLabel ?? t("trigger.selectDateRange") })) : (jsx("div", { children: actionButton })) }), jsx(PopoverContent, { dataTestId: dataTestId ? `${dataTestId}-popover-content` : undefined, children: closeMenu => {
|
|
630
630
|
return !isCustomDateRangeOpen ? (jsxs(MenuList, { className: "min-w-[280px]", children: [jsxs("div", { className: "flex flex-col gap-1", children: [showDateRangeSearch ? (jsx(Search, { className: "w-full", dataTestId: dataTestId ? `${dataTestId}-search-input` : undefined, onChange: event => handleDateRangeSearch(event.target.value), onClear: () => handleDateRangeSearch(""), placeholder: allowedDirection === "last"
|
|
631
631
|
? t("input.placeholder.customRange.last")
|
|
632
|
-
: t("input.placeholder.customRange.next"), value: dateRangeSearchValue })) : null, jsx(Button, { className: "ml-auto", dataTestId: dataTestId ? `${dataTestId}-reset-button` : undefined, disabled: !selectedDateRange, onClick: handleReset, size: "small", variant: "ghost", children: t("layout.actions.reset") })] }), jsx("hr", { className: "border-
|
|
632
|
+
: t("input.placeholder.customRange.next"), value: dateRangeSearchValue })) : null, jsx(Button, { className: "ml-auto", dataTestId: dataTestId ? `${dataTestId}-reset-button` : undefined, disabled: !selectedDateRange, onClick: handleReset, size: "small", variant: "ghost", children: t("layout.actions.reset") })] }), jsx("hr", { className: "my-1 border-neutral-200", role: "separator" }), jsx(DayRangeSelectOptions, { dataTestId: dataTestId ? `${dataTestId}-options` : undefined, onSelect: value => handleOptionsSelect(value, closeMenu), selectedDateRange: currentSelectedRange, temporalPeriods: temporalPeriods }), showCustomDateRangeOption ? (jsxs("section", { children: [jsx(MenuDivider, {}), jsx(MenuItem, { dataTestId: dataTestId ? `${dataTestId}-custom-range` : undefined, label: t("trigger.customRange"), onClick: () => setIsCustomDateRangeOpen(true), selected: isCustomDateRangeSelected, suffix: jsxs(Fragment, { children: [isCustomDateRangeSelected ? jsx(Icon, { color: "primary", name: "Check", size: "small" }) : null, jsx(Icon, { name: "ChevronRight", size: "small" })] }) })] })) : null] })) : (jsx(Card, { children: jsx(DayRangePicker, { cancelButtonLabel: t("layout.actions.back"), disabledDays: customDateRangeDisabledDays, language: "en", onClose: () => setIsCustomDateRangeOpen(false), onRangeSelect: dateRange => handleCustomDateRangeSelect(dateRange
|
|
633
633
|
? {
|
|
634
634
|
start: dateRange.start ?? undefined,
|
|
635
635
|
end: dateRange.end ?? undefined,
|
|
@@ -681,17 +681,14 @@ const DayPicker = ({ onDaySelect, disabledDays, selectedDay, language, className
|
|
|
681
681
|
}, value: selectedDay ?? null }) }));
|
|
682
682
|
};
|
|
683
683
|
|
|
684
|
-
const cvaTimelineElement = cvaMerge([
|
|
685
|
-
"flex",
|
|
686
|
-
"group/timeline",
|
|
687
|
-
], {
|
|
684
|
+
const cvaTimelineElement = cvaMerge(["flex", "group/timeline"], {
|
|
688
685
|
variants: {
|
|
689
686
|
selected: {
|
|
690
687
|
true: "bg-info-50 rounded-[4px]",
|
|
691
688
|
false: "",
|
|
692
689
|
},
|
|
693
690
|
hoverBehavior: {
|
|
694
|
-
true: "hover:
|
|
691
|
+
true: "hover:rounded-[4px] hover:bg-neutral-50",
|
|
695
692
|
false: "",
|
|
696
693
|
},
|
|
697
694
|
},
|
|
@@ -713,14 +710,14 @@ const cvaLine = cvaMerge([
|
|
|
713
710
|
"w-px",
|
|
714
711
|
"h-full",
|
|
715
712
|
"border-l",
|
|
716
|
-
"border-
|
|
713
|
+
"border-neutral-300",
|
|
717
714
|
"group-first/timeline:top-3.5",
|
|
718
715
|
"group-last/timeline:h-4",
|
|
719
716
|
], {
|
|
720
717
|
variants: {
|
|
721
718
|
lineStyle: {
|
|
722
719
|
dashed: "border-dashed",
|
|
723
|
-
solid: ""
|
|
720
|
+
solid: "",
|
|
724
721
|
},
|
|
725
722
|
},
|
|
726
723
|
});
|
|
@@ -734,15 +731,9 @@ const cvaCustomDot = cvaMerge([
|
|
|
734
731
|
"rounded-full",
|
|
735
732
|
"border",
|
|
736
733
|
"border-white",
|
|
737
|
-
"z-[2]"
|
|
734
|
+
"z-[2]",
|
|
738
735
|
]);
|
|
739
|
-
const cvaToggleBtnIcon = cvaMerge([
|
|
740
|
-
"mr-1",
|
|
741
|
-
"rounded-lg",
|
|
742
|
-
"transition-transform",
|
|
743
|
-
"duration-300",
|
|
744
|
-
"cursor-pointer",
|
|
745
|
-
], {
|
|
736
|
+
const cvaToggleBtnIcon = cvaMerge(["mr-1", "rounded-lg", "transition-transform", "duration-300", "cursor-pointer"], {
|
|
746
737
|
variants: {
|
|
747
738
|
rotated: {
|
|
748
739
|
true: "rotate-180",
|
|
@@ -750,10 +741,7 @@ const cvaToggleBtnIcon = cvaMerge([
|
|
|
750
741
|
},
|
|
751
742
|
},
|
|
752
743
|
});
|
|
753
|
-
const cvaTimelineElementTime = cvaMerge([
|
|
754
|
-
"min-h-6",
|
|
755
|
-
"content-center",
|
|
756
|
-
], {
|
|
744
|
+
const cvaTimelineElementTime = cvaMerge(["min-h-6", "content-center"], {
|
|
757
745
|
variants: {
|
|
758
746
|
width: {
|
|
759
747
|
large: "min-w-16",
|
|
@@ -819,7 +807,7 @@ const Timeline = ({ className, dataTestId, children, dateHeader, customHeader, t
|
|
|
819
807
|
}, [isOpen]);
|
|
820
808
|
const renderToggleButton = () => (jsxs("div", { className: cvaTimelineElement(), children: [childProps.date ? (jsx("div", { className: cvaTimelineElementTime({
|
|
821
809
|
width: hourCycle === "h12" || hourCycle === "h11" ? "large" : "small",
|
|
822
|
-
}) })) : null, jsx("div", { className: cvaDotWrapper(), children: jsx("div", { className: cvaLine({ lineStyle: childProps.lineStyle }) }) }), jsxs("div", { className: "
|
|
810
|
+
}) })) : null, jsx("div", { className: cvaDotWrapper(), children: jsx("div", { className: cvaLine({ lineStyle: childProps.lineStyle }) }) }), jsxs("div", { className: "flex min-h-8 cursor-pointer items-center text-sm text-neutral-500 hover:text-neutral-600", "data-testid": "timeline-toggle-btn", onClick: () => {
|
|
823
811
|
toggleButton?.onClick && toggleButton.onClick();
|
|
824
812
|
setIsOpen(!isOpen);
|
|
825
813
|
}, children: [jsx(Icon, { className: cvaToggleBtnIcon({ rotated: isOpen }), name: "ChevronDown", size: "small" }), jsx("span", { children: isOpen ? toggleButton?.collapsedLabel : toggleButton?.expandedLabel })] })] }));
|
|
@@ -831,12 +819,12 @@ const Timeline = ({ className, dataTestId, children, dateHeader, customHeader, t
|
|
|
831
819
|
return null;
|
|
832
820
|
}
|
|
833
821
|
const { date, dateRange, showTime } = dateHeader;
|
|
834
|
-
return (jsx("div", { className: "pb-4", "data-testid": "timeline-date-header", children: date ? (jsxs(Fragment, { children: [jsx(Text, { size: "medium", type: "span", weight: "thick", children: formatDate(date, { selectFormat: !showTime ? "dateOnly" : undefined }) }), jsx(Text, { className: "text-
|
|
822
|
+
return (jsx("div", { className: "pb-4", "data-testid": "timeline-date-header", children: date ? (jsxs(Fragment, { children: [jsx(Text, { size: "medium", type: "span", weight: "thick", children: formatDate(date, { selectFormat: !showTime ? "dateOnly" : undefined }) }), jsx(Text, { className: "text-neutral-500", size: "medium", type: "span", weight: "thick", children: ` (${timeSinceAuto(date, new Date(), undefined, locale)})` })] })) : (jsx(Text, { className: "pr-1", size: "medium", type: "span", weight: "thick", children: formatRange(dateRange, { dateStyle: !showTime ? "medium" : undefined }) })) }));
|
|
835
823
|
}, [dateHeader, formatDate, formatRange, customHeader, locale]);
|
|
836
824
|
return (jsxs("div", { className: className, "data-testid": dataTestId, children: [renderDateHeader(), customHeader ? jsx("div", { className: "text-sm font-semibold", children: customHeader }) : null, toggleButton && middleChildren.length > 0 ? (jsxs("div", { children: [firstChild, middleChildren.length > 0 ? renderToggleButton() : null, jsxs("div", { "aria-hidden": !isOpen, className: "overflow-hidden overflow-y-auto transition-all duration-300", ref: ref, children: [jsx("div", {}), visibleMiddleChildren, isOpen && visibleCount < middleChildren.length ? (jsx("div", { className: "flex justify-center py-2", onClick: e => {
|
|
837
825
|
e.stopPropagation(); // Prevent parent handlers from firing
|
|
838
826
|
loadMoreItems();
|
|
839
|
-
}, children: jsx(Text, { className: "text-
|
|
827
|
+
}, children: jsx(Text, { className: "cursor-pointer text-neutral-500 hover:text-neutral-600", "data-testid": "load-more-text", size: "small", type: "span", children: t("timeline.loadMore") }) })) : null, jsx("div", {})] }), lastChild] })) : (jsx("div", { children: children }))] }));
|
|
840
828
|
};
|
|
841
829
|
|
|
842
830
|
/**
|
|
@@ -884,7 +872,7 @@ const renderChildren = (children) => {
|
|
|
884
872
|
if (!children) {
|
|
885
873
|
return null;
|
|
886
874
|
}
|
|
887
|
-
return jsx("div", { className: "
|
|
875
|
+
return jsx("div", { className: "mt-0.5 content-center text-sm text-neutral-500", children: children });
|
|
888
876
|
};
|
|
889
877
|
const renderActionButton = (actionButton) => {
|
|
890
878
|
if (!actionButton) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-date-and-time-components",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.18",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.9.
|
|
12
|
-
"@trackunit/date-and-time-utils": "1.7.
|
|
13
|
-
"@trackunit/react-date-and-time-hooks": "1.7.
|
|
14
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
15
|
-
"@trackunit/ui-icons": "1.7.
|
|
16
|
-
"@trackunit/shared-utils": "1.9.
|
|
17
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
18
|
-
"@trackunit/react-test-setup": "1.4.
|
|
19
|
-
"@trackunit/react-form-components": "1.8.
|
|
11
|
+
"@trackunit/react-components": "1.9.18",
|
|
12
|
+
"@trackunit/date-and-time-utils": "1.7.10",
|
|
13
|
+
"@trackunit/react-date-and-time-hooks": "1.7.14",
|
|
14
|
+
"@trackunit/css-class-variance-utilities": "1.7.10",
|
|
15
|
+
"@trackunit/ui-icons": "1.7.12",
|
|
16
|
+
"@trackunit/shared-utils": "1.9.10",
|
|
17
|
+
"@trackunit/i18n-library-translation": "1.7.14",
|
|
18
|
+
"@trackunit/react-test-setup": "1.4.10",
|
|
19
|
+
"@trackunit/react-form-components": "1.8.18",
|
|
20
20
|
"string-ts": "^2.0.0",
|
|
21
21
|
"tailwind-merge": "^2.0.0",
|
|
22
22
|
"react-calendar": "^6.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonProps, IconColors } from "@trackunit/react-components";
|
|
2
2
|
import { IconName } from "@trackunit/ui-icons";
|
|
3
|
-
import {
|
|
3
|
+
import { MouseEvent, ReactNode } from "react";
|
|
4
4
|
interface TimeLineElementProps extends CommonProps {
|
|
5
5
|
date?: Date;
|
|
6
6
|
header?: ReactNode;
|