@trackunit/react-date-and-time-components 1.16.30 → 1.16.32

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 CHANGED
@@ -124,7 +124,7 @@ const MS_PER_HOUR = 60 * 60 * 1000;
124
124
  * ```
125
125
  * @param {DateTimeProps} props - The props for the DateTime component
126
126
  */
127
- const DateTime = ({ value, format, className, fromNow = false, withTitle = false, titleFormat, timezone, "data-testid": dataTestId, subtle = false, ref, }) => {
127
+ const DateTime = ({ value, format, className, fromNow = false, withTitle = false, titleFormat, timezone, "data-testid": dataTestId, subtle = false, ref, ...rest }) => {
128
128
  const { t } = useTranslation();
129
129
  const locale = reactDateAndTimeHooks.useLocale();
130
130
  const nowDate = react.useMemo(() => new Date(), []);
@@ -141,7 +141,7 @@ const DateTime = ({ value, format, className, fromNow = false, withTitle = false
141
141
  const dateValue = react.useMemo(() => {
142
142
  return fromNow ? getTimeSince(date, nowDate) : newDateTime;
143
143
  }, [date, fromNow, getTimeSince, newDateTime, nowDate]);
144
- return (jsxRuntime.jsx("time", { className: className || subtle ? tailwindMerge.twMerge(subtle ? "text-neutral-600" : undefined, className) : undefined, "data-testid": dataTestId, dateTime: newDateTime, ref: ref, title: titleDateTime, children: dateValue }));
144
+ return (jsxRuntime.jsx("time", { ...rest, className: className || subtle ? tailwindMerge.twMerge(subtle ? "text-neutral-600" : undefined, className) : undefined, "data-testid": dataTestId, dateTime: newDateTime, ref: ref, title: titleDateTime, children: dateValue }));
145
145
  };
146
146
 
147
147
  /**
package/index.esm.js CHANGED
@@ -122,7 +122,7 @@ const MS_PER_HOUR = 60 * 60 * 1000;
122
122
  * ```
123
123
  * @param {DateTimeProps} props - The props for the DateTime component
124
124
  */
125
- const DateTime = ({ value, format, className, fromNow = false, withTitle = false, titleFormat, timezone, "data-testid": dataTestId, subtle = false, ref, }) => {
125
+ const DateTime = ({ value, format, className, fromNow = false, withTitle = false, titleFormat, timezone, "data-testid": dataTestId, subtle = false, ref, ...rest }) => {
126
126
  const { t } = useTranslation();
127
127
  const locale = useLocale();
128
128
  const nowDate = useMemo(() => new Date(), []);
@@ -139,7 +139,7 @@ const DateTime = ({ value, format, className, fromNow = false, withTitle = false
139
139
  const dateValue = useMemo(() => {
140
140
  return fromNow ? getTimeSince(date, nowDate) : newDateTime;
141
141
  }, [date, fromNow, getTimeSince, newDateTime, nowDate]);
142
- return (jsx("time", { className: className || subtle ? twMerge(subtle ? "text-neutral-600" : undefined, className) : undefined, "data-testid": dataTestId, dateTime: newDateTime, ref: ref, title: titleDateTime, children: dateValue }));
142
+ return (jsx("time", { ...rest, className: className || subtle ? twMerge(subtle ? "text-neutral-600" : undefined, className) : undefined, "data-testid": dataTestId, dateTime: newDateTime, ref: ref, title: titleDateTime, children: dateValue }));
143
143
  };
144
144
 
145
145
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-date-and-time-components",
3
- "version": "1.16.30",
3
+ "version": "1.16.32",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,14 +8,14 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "react": "19.0.0",
11
- "@trackunit/react-components": "1.17.24",
12
- "@trackunit/date-and-time-utils": "1.11.44",
13
- "@trackunit/react-date-and-time-hooks": "1.13.30",
14
- "@trackunit/css-class-variance-utilities": "1.11.43",
15
- "@trackunit/ui-icons": "1.11.42",
16
- "@trackunit/shared-utils": "1.13.43",
17
- "@trackunit/i18n-library-translation": "1.12.28",
18
- "@trackunit/react-form-components": "1.14.27",
11
+ "@trackunit/react-components": "1.17.26",
12
+ "@trackunit/date-and-time-utils": "1.11.45",
13
+ "@trackunit/react-date-and-time-hooks": "1.13.32",
14
+ "@trackunit/css-class-variance-utilities": "1.11.44",
15
+ "@trackunit/ui-icons": "1.11.43",
16
+ "@trackunit/shared-utils": "1.13.44",
17
+ "@trackunit/i18n-library-translation": "1.12.29",
18
+ "@trackunit/react-form-components": "1.14.29",
19
19
  "string-ts": "^2.0.0",
20
20
  "tailwind-merge": "^2.0.0",
21
21
  "react-calendar": "^6.0.0"
@@ -71,4 +71,4 @@ export declare const MS_PER_HOUR: number;
71
71
  * ```
72
72
  * @param {DateTimeProps} props - The props for the DateTime component
73
73
  */
74
- export declare const DateTime: ({ value, format, className, fromNow, withTitle, titleFormat, timezone, "data-testid": dataTestId, subtle, ref, }: DateTimeProps) => import("react/jsx-runtime").JSX.Element;
74
+ export declare const DateTime: ({ value, format, className, fromNow, withTitle, titleFormat, timezone, "data-testid": dataTestId, subtle, ref, ...rest }: DateTimeProps) => import("react/jsx-runtime").JSX.Element;