@trackunit/react-table-base-components 2.1.17-alpha-9d327375fc1.0 → 2.1.20

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
@@ -291,12 +291,13 @@ const cvaDateTimeSince$1 = cssClassVarianceUtilities.cvaMerge(["slashed-zero", "
291
291
  const DateTimeCell = ({ format, date, withTimeSince = true, className, "data-testid": dataTestId, style, timeZone: timeZoneProp, locale: localeProp, }) => {
292
292
  const { preferred: preferredTimezone } = reactDateAndTimeHooks.useTimezone();
293
293
  const resolvedLocale = reactDateAndTimeHooks.useLocale();
294
+ const hourCycle = reactDateAndTimeHooks.useHourCycle();
294
295
  const timeZone = timeZoneProp ?? preferredTimezone.id;
295
296
  const locale = localeProp ?? resolvedLocale;
296
297
  if (!date) {
297
298
  return null;
298
299
  }
299
- const formattedDate = dateAndTimeUtils.formatDateUtil(date, format, timeZone, locale);
300
+ const formattedDate = dateAndTimeUtils.formatDateUtil(date, format, timeZone, locale, hourCycle);
300
301
  return (jsxRuntime.jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, style: style, children: [jsxRuntime.jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsxRuntime.jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
301
302
  };
302
303
  const TimeSince = ({ date, timeZone, locale }) => {
package/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import { twMerge } from 'tailwind-merge';
5
5
  import { Checkbox } from '@trackunit/react-form-components';
6
6
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
7
7
  import { formatDateUtil, timeSinceAuto, timeSinceInDays, Temporal } from '@trackunit/date-and-time-utils';
8
- import { useTimezone, useLocale } from '@trackunit/react-date-and-time-hooks';
8
+ import { useTimezone, useLocale, useHourCycle } from '@trackunit/react-date-and-time-hooks';
9
9
  import { useMemo, useState, useEffect, isValidElement, cloneElement } from 'react';
10
10
  import { DateTimeFormat } from '@trackunit/shared-utils';
11
11
 
@@ -289,12 +289,13 @@ const cvaDateTimeSince$1 = cvaMerge(["slashed-zero", "text-neutral-500", "text-x
289
289
  const DateTimeCell = ({ format, date, withTimeSince = true, className, "data-testid": dataTestId, style, timeZone: timeZoneProp, locale: localeProp, }) => {
290
290
  const { preferred: preferredTimezone } = useTimezone();
291
291
  const resolvedLocale = useLocale();
292
+ const hourCycle = useHourCycle();
292
293
  const timeZone = timeZoneProp ?? preferredTimezone.id;
293
294
  const locale = localeProp ?? resolvedLocale;
294
295
  if (!date) {
295
296
  return null;
296
297
  }
297
- const formattedDate = formatDateUtil(date, format, timeZone, locale);
298
+ const formattedDate = formatDateUtil(date, format, timeZone, locale, hourCycle);
298
299
  return (jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, style: style, children: [jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
299
300
  };
300
301
  const TimeSince = ({ date, timeZone, locale }) => {
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-base-components",
3
- "version": "2.1.17-alpha-9d327375fc1.0",
3
+ "version": "2.1.20",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/react-components": "2.1.15-alpha-9d327375fc1.0",
11
- "@trackunit/ui-icons": "1.13.25-alpha-9d327375fc1.0",
12
- "@trackunit/react-form-components": "2.1.16-alpha-9d327375fc1.0",
13
- "@trackunit/css-class-variance-utilities": "1.13.24-alpha-9d327375fc1.0",
14
- "@trackunit/date-and-time-utils": "1.13.25-alpha-9d327375fc1.0",
15
- "@trackunit/react-date-and-time-hooks": "2.1.16-alpha-9d327375fc1.0",
16
- "@trackunit/shared-utils": "1.15.24-alpha-9d327375fc1.0",
17
- "@trackunit/i18n-library-translation": "2.0.17-alpha-9d327375fc1.0",
10
+ "@trackunit/react-components": "2.1.18",
11
+ "@trackunit/ui-icons": "1.13.27",
12
+ "@trackunit/react-form-components": "2.1.19",
13
+ "@trackunit/css-class-variance-utilities": "1.13.26",
14
+ "@trackunit/date-and-time-utils": "1.13.28",
15
+ "@trackunit/react-date-and-time-hooks": "2.1.19",
16
+ "@trackunit/shared-utils": "1.15.26",
17
+ "@trackunit/i18n-library-translation": "2.0.20",
18
18
  "tailwind-merge": "^2.0.0"
19
19
  },
20
20
  "peerDependencies": {