genesys-spark 4.184.0 → 4.184.2

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/dist/index.d.ts CHANGED
@@ -1,4 +1,46 @@
1
- export { sparkIntl as Intl } from 'genesys-spark-utils';
1
+ /**
2
+ * Provides an [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
3
+ * object for formatting dates and times. Unlike the native version, `locale` is
4
+ * an optional argument. If not provided, the function will try to determine the
5
+ * locale from the DOM, where it should be set for a11y reasons.
6
+ * @param locale optional locale to use for formatting
7
+ * @param options options to pass to the Intl.DateTimeFormat constructor
8
+ * @returns a new DateTimeFormat
9
+ */
10
+ declare function dateTimeFormat(localeOrOptions: string | Intl.DateTimeFormatOptions, options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
11
+ /**
12
+ * Provides an [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)
13
+ * object for formatting dates and times. Unlike the native version, `locale` is
14
+ * an optional argument. If not provided, the function will try to determine the
15
+ * locale from the DOM, where it should be set for a11y reasons.
16
+ * @param locale optional locale to use for formatting
17
+ * @param options options to pass to the Intl.RelativeTimeFormat constructor
18
+ * @returns a new RelativeTimeFormat
19
+ */
20
+ declare function relativeTimeFormat(localeOrOptions: string | Intl.RelativeTimeFormatOptions, options?: Intl.RelativeTimeFormatOptions): Intl.RelativeTimeFormat;
21
+ /**
22
+ * Makes a best effort to return the locale that should be used for a given element
23
+ * by checking language tags on ancestors. If no element is provided, it will
24
+ * start with the document's <body> tag. If no locale can be found, it will use
25
+ * the browser's locale preference. It will also try to add a region to regionless
26
+ * locales when there is a partial match with the browser's locale.
27
+ * @returns a locale string (e.g. 'en-US', 'en', 'de-DE', etc)
28
+ */
29
+ declare function determineDisplayLocale(element?: HTMLElement): string;
30
+ declare function getFormat(locale: string): string;
31
+
32
+ declare const sparkIntl_d_dateTimeFormat: typeof dateTimeFormat;
33
+ declare const sparkIntl_d_determineDisplayLocale: typeof determineDisplayLocale;
34
+ declare const sparkIntl_d_getFormat: typeof getFormat;
35
+ declare const sparkIntl_d_relativeTimeFormat: typeof relativeTimeFormat;
36
+ declare namespace sparkIntl_d {
37
+ export {
38
+ sparkIntl_d_dateTimeFormat as dateTimeFormat,
39
+ sparkIntl_d_determineDisplayLocale as determineDisplayLocale,
40
+ sparkIntl_d_getFormat as getFormat,
41
+ sparkIntl_d_relativeTimeFormat as relativeTimeFormat,
42
+ };
43
+ }
2
44
 
3
45
  interface registerOptions {
4
46
  /**
@@ -27,4 +69,4 @@ declare function registerSparkComponents(opts?: registerOptions): Promise<void>;
27
69
  */
28
70
  declare function registerSparkChartComponents(opts?: registerOptions): Promise<void>;
29
71
 
30
- export { loadSparkFonts, registerSparkChartComponents, registerSparkComponents };
72
+ export { sparkIntl_d as Intl, loadSparkFonts, registerSparkChartComponents, registerSparkComponents };
package/dist/index.js CHANGED
@@ -134,6 +134,7 @@ function dateTimeFormat(localeOrOptions, options) {
134
134
  } else {
135
135
  options = localeOrOptions;
136
136
  }
137
+ options = Object.assign({ calendar: "gregory" }, options);
137
138
  if (locale != void 0) {
138
139
  return new Intl.DateTimeFormat(locale, options);
139
140
  } else {
@@ -219,8 +220,8 @@ var sparkIntl = /*#__PURE__*/Object.freeze({
219
220
  relativeTimeFormat: relativeTimeFormat
220
221
  });
221
222
 
222
- const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.184.0-849/genesys-webcomponents/";
223
- const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.184.0-849/chart/genesys-chart-webcomponents/";
223
+ const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.184.2-853/genesys-webcomponents/";
224
+ const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.184.2-853/chart/genesys-chart-webcomponents/";
224
225
  function loadSparkFonts(opts) {
225
226
  const fontOrigin = getFontOrigin();
226
227
  const flareFonts = {
@@ -1,4 +1,4 @@
1
- @use '~genesys-spark/dist/beta/tokens/flare/ui.scss';
1
+ @use '~genesys-spark/dist/tokens/flare/ui.scss';
2
2
 
3
3
  @mixin gux-hide-offscreen {
4
4
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesys-spark",
3
- "version": "4.184.0",
3
+ "version": "4.184.2",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -34,19 +34,17 @@
34
34
  "version-sync": "npm version --no-git-tag-version --allow-same-version"
35
35
  },
36
36
  "types": "dist/index.d.ts",
37
- "dependencies": {
38
- "genesys-spark-utils": "file:../genesys-spark-utils"
39
- },
40
37
  "optionalDependencies": {
41
38
  "@rollup/rollup-linux-x64-gnu": "^4.24.3"
42
39
  },
43
40
  "devDependencies": {
44
- "@rollup/plugin-node-resolve": "^16.0.2",
45
- "@rollup/plugin-replace": "^6.0.2",
46
- "@tsconfig/strictest": "^2.0.6",
41
+ "@rollup/plugin-node-resolve": "^16.0.3",
42
+ "@rollup/plugin-replace": "^6.0.3",
43
+ "@tsconfig/strictest": "^2.0.7",
47
44
  "dir-compare": "^5.0.0",
48
45
  "eslint": "^9.38.0",
49
46
  "eslint-config-genesys-spark-components": "file:../../shared-configs/eslint-config-genesys-spark-components",
47
+ "genesys-spark-utils": "file:../genesys-spark-utils",
50
48
  "glob": "^11.0.3",
51
49
  "globals": "^16.4.0",
52
50
  "jest": "^30.2.0",