@instructure/ui-i18n 11.7.3 → 11.7.4-pr-snapshot-1781695314229

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.7.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-i18n
9
+
10
+
11
+
12
+
13
+
6
14
  ## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
7
15
 
8
16
 
package/LICENSE.md CHANGED
@@ -2,6 +2,7 @@
2
2
  title: The MIT License (MIT)
3
3
  category: Getting Started
4
4
  order: 9
5
+ isWIP: true
5
6
  ---
6
7
 
7
8
  # The MIT License (MIT)
@@ -1,10 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.ApplyLocaleContext = void 0;
7
- var _react = require("react");
8
1
  /*
9
2
  * The MIT License (MIT)
10
3
  *
@@ -29,8 +22,15 @@ var _react = require("react");
29
22
  * SOFTWARE.
30
23
  */
31
24
 
32
- const ApplyLocaleContext = exports.ApplyLocaleContext = /*#__PURE__*/(0, _react.createContext)({
33
- locale: undefined,
34
- timezone: undefined
35
- });
36
- var _default = exports.default = ApplyLocaleContext;
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ esModules: Boolean(process.env.ES_MODULES),
31
+ removeConsole: process.env.NODE_ENV === 'production',
32
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
33
+ }
34
+ ]
35
+ ]
36
+ }
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { ensureSingleChild } from '@instructure/ui-react-utils';
26
- import { ApplyLocaleContext } from "./ApplyLocaleContext.js";
26
+ import { ApplyLocaleContext } from './ApplyLocaleContext.js';
27
27
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
28
28
  /**
29
29
  ---
@@ -23,7 +23,8 @@
23
23
  */
24
24
 
25
25
  import { createContext } from 'react';
26
- import { getTextDirection } from "./getTextDirection.js";
26
+ import { getTextDirection } from './getTextDirection.js';
27
+
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/i18n
package/es/getLocale.js CHANGED
@@ -22,7 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { useContext } from 'react';
25
- import { ApplyLocaleContext } from "./index.js"; // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
25
+ import { ApplyLocaleContext } from './index.js';
26
+
27
+ // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
26
28
  export function getLocale(defaultLocale = 'en-US') {
27
29
  const localeContext = useContext(ApplyLocaleContext);
28
30
  if (localeContext.locale) {
package/es/getTimezone.js CHANGED
@@ -22,7 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { useContext } from 'react';
25
- import { ApplyLocaleContext } from "./index.js"; // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
25
+ import { ApplyLocaleContext } from './index.js';
26
+
27
+ // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
26
28
  export function getTimezone() {
27
29
  const localeContext = useContext(ApplyLocaleContext);
28
30
  if (localeContext.timezone) {
package/es/index.js CHANGED
@@ -21,12 +21,13 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- export { ApplyLocale } from "./ApplyLocale/index.js";
25
- export { ApplyLocaleContext } from "./ApplyLocale/ApplyLocaleContext.js";
26
- export { textDirectionContextConsumer } from "./textDirectionContextConsumer.js";
27
- export { DateTime } from "./DateTime.js";
28
- export { getTextDirection } from "./getTextDirection.js";
29
- export { Locale } from "./Locale.js"; // TODO delete this and only keep the ones below
30
- export { getLocale } from "./getLocale.js";
31
- export { getTimezone } from "./getTimezone.js";
32
- export { DIRECTION, TextDirectionContext } from "./TextDirectionContext.js";
24
+
25
+ export { ApplyLocale } from './ApplyLocale/index.js';
26
+ export { ApplyLocaleContext } from './ApplyLocale/ApplyLocaleContext.js';
27
+ export { textDirectionContextConsumer } from './textDirectionContextConsumer.js';
28
+ export { DateTime } from './DateTime.js';
29
+ export { getTextDirection } from './getTextDirection.js';
30
+ export { Locale } from './Locale.js'; // TODO delete this and only keep the ones below
31
+ export { getLocale } from './getLocale.js';
32
+ export { getTimezone } from './getTimezone.js';
33
+ export { DIRECTION, TextDirectionContext } from './TextDirectionContext.js';
@@ -23,7 +23,7 @@
23
23
  */
24
24
  import { Component, forwardRef } from 'react';
25
25
  import { decorator } from '@instructure/ui-decorator';
26
- import { DIRECTION, TextDirectionContext } from "./TextDirectionContext.js";
26
+ import { DIRECTION, TextDirectionContext } from './TextDirectionContext.js';
27
27
  import hoistNonReactStatics from 'hoist-non-react-statics';
28
28
 
29
29
  // This is a workaround because TS cannot take type information from
@@ -64,7 +64,7 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
64
64
  */
65
65
  const textDirectionContextConsumer = decorator(ComposedComponent => {
66
66
  class TextDirectionContextConsumerComponent extends Component {
67
- static displayName = "TextDirectionContextConsumerComponent";
67
+ static displayName = 'TextDirectionContextConsumerComponent';
68
68
  render() {
69
69
  const {
70
70
  forwardedRef,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-i18n",
3
- "version": "11.7.3",
3
+ "version": "11.7.4-pr-snapshot-1781695314229",
4
+ "type": "module",
4
5
  "description": "Helper components and utilities for internationalization.",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -17,11 +17,11 @@
17
17
  "@babel/runtime": "^7.29.2",
18
18
  "hoist-non-react-statics": "^3.3.2",
19
19
  "moment-timezone": "^0.6.2",
20
- "@instructure/shared-types": "11.7.3",
21
- "@instructure/ui-react-utils": "11.7.3",
22
- "@instructure/ui-dom-utils": "11.7.3",
23
- "@instructure/ui-decorator": "11.7.3",
24
- "@instructure/ui-utils": "11.7.3"
20
+ "@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229",
21
+ "@instructure/ui-decorator": "11.7.4-pr-snapshot-1781695314229",
22
+ "@instructure/ui-dom-utils": "11.7.4-pr-snapshot-1781695314229",
23
+ "@instructure/ui-react-utils": "11.7.4-pr-snapshot-1781695314229",
24
+ "@instructure/ui-utils": "11.7.4-pr-snapshot-1781695314229"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@testing-library/jest-dom": "^6.6.3",
@@ -29,7 +29,7 @@
29
29
  "@types/hoist-non-react-statics": "^3.3.6",
30
30
  "react-dom": "18.3.1",
31
31
  "vitest": "^3.2.2",
32
- "@instructure/ui-babel-preset": "11.7.3"
32
+ "@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=18 <=19"
@@ -43,10 +43,8 @@
43
43
  "src": "./src/index.ts",
44
44
  "types": "./types/index.d.ts",
45
45
  "import": "./es/index.js",
46
- "require": "./lib/index.js",
47
46
  "default": "./es/index.js"
48
47
  },
49
- "./lib/*": "./lib/*",
50
48
  "./es/*": "./es/*",
51
49
  "./types/*": "./types/*",
52
50
  "./package.json": "./package.json",
@@ -56,7 +54,7 @@
56
54
  "lint": "ui-scripts lint",
57
55
  "lint:fix": "ui-scripts lint --fix",
58
56
  "clean": "ui-scripts clean",
59
- "build": "ui-scripts build --modules es,cjs",
57
+ "build": "ui-scripts build",
60
58
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
61
59
  "build:types": "tsc -p tsconfig.build.json",
62
60
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -23,8 +23,8 @@
23
23
  */
24
24
 
25
25
  import { ensureSingleChild } from '@instructure/ui-react-utils'
26
- import { ApplyLocaleContext } from './ApplyLocaleContext'
27
- import { ApplyLocaleProps } from './props'
26
+ import { ApplyLocaleContext } from './ApplyLocaleContext.js'
27
+ import { ApplyLocaleProps } from './props.js'
28
28
 
29
29
  /**
30
30
  ---
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { createContext } from 'react'
26
- import { getTextDirection } from './getTextDirection'
26
+ import { getTextDirection } from './getTextDirection.js'
27
27
 
28
28
  /**
29
29
  * ---
package/src/getLocale.ts CHANGED
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { useContext } from 'react'
25
- import { ApplyLocaleContext } from '.'
25
+ import { ApplyLocaleContext } from './index.js'
26
26
 
27
27
  // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
28
28
  export function getLocale(defaultLocale = 'en-US') {
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { useContext } from 'react'
25
- import { ApplyLocaleContext } from '.'
25
+ import { ApplyLocaleContext } from './index.js'
26
26
 
27
27
  // TODO: this is a better replacement for `ui-i18n/src/Locale.ts` which should be deleted in the future
28
28
  export function getTimezone() {
package/src/index.ts CHANGED
@@ -22,18 +22,18 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- export { ApplyLocale } from './ApplyLocale'
26
- export { ApplyLocaleContext } from './ApplyLocale/ApplyLocaleContext'
25
+ export { ApplyLocale } from './ApplyLocale/index.js'
26
+ export { ApplyLocaleContext } from './ApplyLocale/ApplyLocaleContext.js'
27
27
 
28
- export { textDirectionContextConsumer } from './textDirectionContextConsumer'
29
- export { DateTime } from './DateTime'
30
- export { getTextDirection } from './getTextDirection'
28
+ export { textDirectionContextConsumer } from './textDirectionContextConsumer.js'
29
+ export { DateTime } from './DateTime.js'
30
+ export { getTextDirection } from './getTextDirection.js'
31
31
 
32
- export { Locale } from './Locale' // TODO delete this and only keep the ones below
33
- export { getLocale } from './getLocale'
34
- export { getTimezone } from './getTimezone'
32
+ export { Locale } from './Locale.js' // TODO delete this and only keep the ones below
33
+ export { getLocale } from './getLocale.js'
34
+ export { getTimezone } from './getTimezone.js'
35
35
 
36
- export { DIRECTION, TextDirectionContext } from './TextDirectionContext'
36
+ export { DIRECTION, TextDirectionContext } from './TextDirectionContext.js'
37
37
 
38
38
  export type { Moment } from './DateTime'
39
39
  export type { TextDirectionContextConsumerProps } from './textDirectionContextConsumer'
@@ -34,7 +34,7 @@ import type {
34
34
  RefAttributes
35
35
  } from 'react'
36
36
  import { decorator } from '@instructure/ui-decorator'
37
- import { DIRECTION, TextDirectionContext } from './TextDirectionContext'
37
+ import { DIRECTION, TextDirectionContext } from './TextDirectionContext.js'
38
38
  import hoistNonReactStatics from 'hoist-non-react-statics'
39
39
 
40
40
  // This is a workaround because TS cannot take type information from
@@ -110,6 +110,7 @@ const textDirectionContextConsumer: TextDirectionContextConsumerType =
110
110
  }
111
111
  ) => {
112
112
  class TextDirectionContextConsumerComponent extends Component<TextDirectionContextConsumerInternalProps> {
113
+ static displayName = 'TextDirectionContextConsumerComponent'
113
114
  render() {
114
115
  const { forwardedRef, ...rest } = this.props
115
116
  // Quite complex code, this is the priority order of applying the `dir` prop: