@openedx/paragon 23.19.0 → 23.19.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/README.md CHANGED
@@ -514,10 +514,34 @@ Paragon components can have different behavior in the MFE environment. `example`
514
514
 
515
515
  Steps to install the `example` app.
516
516
 
517
+ To set up the example app with a local Tutor installation, you'll need to configure a Tutor plugin to handle CORS settings
518
+
519
+ Prerequisites.
520
+
521
+ Before running the example app, ensure you have a local Tutor installation configured.
522
+ 1. Create a new file (i.e. `paragon-example-app.py`) in your tutor plugins folder (`tutor plugins printroot` to get the path).
523
+ 2. Add the following content to the paragon-example-app.py file:
524
+ ```
525
+ from tutor import hooks
526
+
527
+ hooks.Filters.ENV_PATCHES.add_item(
528
+ (
529
+ "openedx-lms-development-settings",
530
+ """
531
+ CORS_ORIGIN_WHITELIST.append("http://localhost:8080")
532
+ LOGIN_REDIRECT_WHITELIST.append("http://localhost:8080")
533
+ CSRF_TRUSTED_ORIGINS.append("http://localhost:8080")
534
+ """
535
+ )
536
+ )
537
+ ```
538
+ 3. Enable the plugin: `tutor plugins enable paragon-example-app`
539
+ 4. Apply configuration changes: `tutor config save` && `tutor dev restart`
540
+
541
+ Running the Example App:
517
542
  1. `npm install` to install dependencies.
518
- 2. Launch any devstack. It is required for MFE to login into the system and set up configs.
519
- 3. `npm run start-example-mfe` to start the app.
520
- 4. Go to the `example/src/MyComponent.jsx` and use Paragon components inside the MFE environment.
543
+ 2. `npm run example:start` to start the app.
544
+ 3. Go to the `example/src/MyComponent.jsx` and use Paragon components inside the MFE environment.
521
545
 
522
546
  ## Semantic Release
523
547
 
@@ -0,0 +1,3 @@
1
+ exports.format = (messages) => Object.fromEntries(
2
+ Object.entries(messages).map(([id, { defaultMessage }]) => [id, defaultMessage])
3
+ );
@@ -1,5 +1,11 @@
1
1
  {
2
2
  "themeUrls": {
3
+ "core": {
4
+ "paths": {
5
+ "default": "./core.css",
6
+ "minified": "./core.min.css"
7
+ }
8
+ },
3
9
  "defaults": {
4
10
  "light": "light"
5
11
  },
@@ -10,12 +16,6 @@
10
16
  "minified": "./light.min.css"
11
17
  }
12
18
  }
13
- },
14
- "core": {
15
- "paths": {
16
- "default": "./core.css",
17
- "minified": "./core.min.css"
18
- }
19
19
  }
20
20
  }
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openedx/paragon",
3
- "version": "23.19.0",
3
+ "version": "23.19.2",
4
4
  "description": "Accessible, responsive UI component library based on Bootstrap.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -45,8 +45,7 @@
45
45
  "example:start": "npm start --workspace=example",
46
46
  "example:start:with-theme": "npm run start:with-theme --workspace=example",
47
47
  "generate-changelog": "node generate-changelog.js",
48
- "i18n_compile": "formatjs compile-folder --format transifex ./src/i18n/messages ./src/i18n/messages",
49
- "i18n_extract": "formatjs extract 'src/**/*.{jsx,js,tsx,ts}' --out-file ./src/i18n/transifex_input.json --ignore='**/*.d.ts' --format transifex",
48
+ "i18n_extract": "formatjs extract 'src/**/*.{jsx,js,tsx,ts}' --out-file ./src/i18n/transifex_input.json --ignore='**/*.d.ts' --format ./src/i18n/transifex-formatter.js",
50
49
  "type-check": "tsc --noEmit && tsc --project www --noEmit",
51
50
  "type-check:watch": "npm run type-check -- --watch",
52
51
  "build-types": "tsc --emitDeclarationOnly",
@@ -18,28 +18,28 @@ The base container to contain, pad, and center content in the viewport. This com
18
18
 
19
19
  ```jsx live
20
20
  <div style={{ overflowX: 'auto' }}>
21
- <div style={{ width: '1500px', border: 'solid 3px red' }}>
22
- <Container className="bg-danger-300 my-4">
21
+ <div style={{ width: '1500px', border: 'solid 3px var(--pgn-color-danger-700)' }}>
22
+ <Container className="bg-danger-700 text-white my-4">
23
23
  The content in this container doesn't have a max width
24
24
  </Container>
25
25
 
26
- <Container size="xl" className="bg-danger-300 my-4">
26
+ <Container size="xl" className="bg-danger-700 text-white my-4">
27
27
  The content in this container won't exceed the extra large width.
28
28
  </Container>
29
29
 
30
- <Container size="lg" className="bg-danger-300 mb-4">
30
+ <Container size="lg" className="bg-danger-700 text-white mb-4">
31
31
  The content in this container won't exceed the large width.
32
32
  </Container>
33
33
 
34
- <Container size="md" className="bg-danger-300 mb-4">
34
+ <Container size="md" className="bg-danger-700 text-white mb-4">
35
35
  The content in this container won't exceed the medium width.
36
36
  </Container>
37
37
 
38
- <Container size="sm" className="bg-danger-300 mb-4">
38
+ <Container size="sm" className="bg-danger-700 text-white mb-4">
39
39
  The content in this container won't exceed the small width.
40
40
  </Container>
41
41
 
42
- <Container size="xs" className="bg-danger-300 mb-4">
42
+ <Container size="xs" className="bg-danger-700 text-white mb-4">
43
43
  The content in this container won't exceed the extra small width.
44
44
  </Container>
45
45
  </div>
@@ -0,0 +1,3 @@
1
+ exports.format = (messages) => Object.fromEntries(
2
+ Object.entries(messages).map(([id, { defaultMessage }]) => [id, defaultMessage])
3
+ );