@febkosq8/arc 0.8.4 → 0.8.6
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/components/index.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { FormattedTimeTemplate } from '../utilities/date-handler';
|
|
2
3
|
export interface InputTimestampProps extends Omit<ComponentPropsWithoutRef<"input">, "value"> {
|
|
3
4
|
value?: unknown;
|
|
4
|
-
format?:
|
|
5
|
+
format?: FormattedTimeTemplate;
|
|
5
6
|
}
|
|
6
7
|
declare const InputTimestamp: ({ value, format, ...rest }: InputTimestampProps) => import('react').JSX.Element;
|
|
7
8
|
export default InputTimestamp;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { DurationLike, ToRelativeOptions } from 'luxon';
|
|
2
|
+
/** Any Luxon format string; common values are listed for editor suggestions. */
|
|
3
|
+
export type DateTimeFormat = (string & {}) | "dd/MMM/yyyy hh:mm:ss a" | "dd/MM/yyyy" | "MMM d, yyyy" | "yyyy-MM-dd" | "yyyy-MM-dd'T'HH:mm:ss" | "HH:mm:ss" | "hh:mm a" | "cccc, dd LLLL yyyy 'at' hh:mm a" | "D" | "DD" | "DDD" | "t" | "T" | "f" | "F";
|
|
4
|
+
/** Any template string; the listed placeholders are replaced with formatted date values. */
|
|
5
|
+
export type FormattedTimeTemplate = (string & {}) | "$ISO$ ($RELATIVE$)" | "$ISO$" | "$RELATIVE$" | "$ISO$ - $RELATIVE$" | "$RELATIVE$ - $ISO$";
|
|
2
6
|
export declare class DateHandler {
|
|
3
7
|
private static toDateTime;
|
|
4
|
-
static getDateTime(date: unknown, format?:
|
|
8
|
+
static getDateTime(date: unknown, format?: DateTimeFormat): string;
|
|
5
9
|
static getRelativeTime(date: unknown, options?: ToRelativeOptions): string;
|
|
6
10
|
static getTimeDiff(date: unknown): string | null;
|
|
7
11
|
static generateOffsetDateTime({ offset, future, format, }: {
|
|
8
12
|
offset: DurationLike;
|
|
9
13
|
future?: boolean;
|
|
10
|
-
format?:
|
|
14
|
+
format?: DateTimeFormat | null;
|
|
11
15
|
}): string;
|
|
12
|
-
static getFormattedTime(date: unknown, format?:
|
|
16
|
+
static getFormattedTime(date: unknown, format?: FormattedTimeTemplate): string;
|
|
13
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { DateHandler } from './date-handler';
|
|
2
|
+
export type { DateTimeFormat, FormattedTimeTemplate } from './date-handler';
|
|
2
3
|
export { navigateToHashOnLoad, updateHashOnScroll, useHashNavigationOnLoad } from './hash-navigation';
|
|
3
4
|
export type { HashNavigationOptions, UpdateHashOnScrollOptions } from './hash-navigation';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@febkosq8/arc",
|
|
3
3
|
"description": "A React components library for febkosq8",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.6",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/arc.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "CC-BY-NC-4.0",
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">=26.13.0"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://www.npmjs.com/package/@febkosq8/arc",
|
|
30
30
|
"repository": {
|