@carbon/utilities 0.4.0-rc.0 → 0.5.0-rc.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/utilities",
3
3
  "description": "Utilities and helpers to drive consistency across software products using the Carbon Design System",
4
- "version": "0.4.0-rc.0",
4
+ "version": "0.5.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -15,6 +15,7 @@
15
15
  "files": [
16
16
  "es",
17
17
  "lib",
18
+ "types",
18
19
  "telemetry.yml"
19
20
  ],
20
21
  "keywords": [
@@ -37,13 +38,13 @@
37
38
  "postinstall": "ibmtelemetry --config=telemetry.yml"
38
39
  },
39
40
  "devDependencies": {
40
- "esbuild": "^0.24.0",
41
+ "esbuild": "^0.25.0",
41
42
  "rimraf": "^6.0.0",
42
- "typescript": "^4.8.4",
43
- "typescript-config-carbon": "^0.3.0"
43
+ "typescript": "^5.7.3",
44
+ "typescript-config-carbon": "^0.5.0-rc.0"
44
45
  },
45
46
  "dependencies": {
46
47
  "@ibm/telemetry-js": "^1.6.1"
47
48
  },
48
- "gitHead": "9cf96c5f68ef9216d1c73a5dfb7bdb3bd007b0c1"
49
+ "gitHead": "faf649817d3be3e8e258aba866e14e9378b5c68e"
49
50
  }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare function formatTime(date: Date | number, options?: Partial<{
8
+ locale: string;
9
+ style: Intl.DateTimeFormatOptions['timeStyle'];
10
+ }>): string;
11
+ export declare function formatDate(date: Date | number, options?: Partial<{
12
+ locale: string;
13
+ style: Intl.DateTimeFormatOptions['dateStyle'];
14
+ }>): string;
15
+ export declare function format(date: Date | number, options?: Partial<{
16
+ locale: string;
17
+ style: Intl.DateTimeFormatOptions['timeStyle'] | 'tooltip';
18
+ timeStyle: Intl.DateTimeFormatOptions['timeStyle'];
19
+ dateStyle: Intl.DateTimeFormatOptions['dateStyle'];
20
+ }>): string;
21
+ export declare function formatRange(startDate: Date | number, endDate: Date | number, options?: Partial<{
22
+ locale: string;
23
+ style: Intl.DateTimeFormatOptions['timeStyle'];
24
+ timeStyle: Intl.DateTimeFormatOptions['timeStyle'] | null;
25
+ dateStyle: Intl.DateTimeFormatOptions['dateStyle'] | null;
26
+ }>): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import * as relative from './relative';
8
+ import * as absolute from './absolute';
9
+ export declare const dateTimeFormat: {
10
+ relative: typeof relative;
11
+ absolute: typeof absolute;
12
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare function format(date: Date | number, options?: Partial<{
8
+ locale: string;
9
+ style: Intl.RelativeTimeFormatStyle;
10
+ }>): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export * from './dateTimeFormat';