@openedx/paragon 21.12.2 → 21.13.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/README.md +15 -14
- package/bin/paragon-scripts.js +12 -0
- package/dist/Button/index.js +2 -2
- package/dist/Button/index.js.map +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.js.map +1 -1
- package/dist/DataTable/_variables.scss +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/Pagination/index.scss +1 -0
- package/dist/SearchField/index.js +2 -2
- package/dist/SearchField/index.js.map +1 -1
- package/dist/paragon.css +1 -1
- package/lib/migrate-to-openedx-scope.js +62 -0
- package/package.json +12 -7
- package/src/Button/index.jsx +2 -2
- package/src/Chip/index.tsx +2 -2
- package/src/DataTable/_variables.scss +1 -1
- package/src/Icon/README.md +3 -3
- package/src/Icon/index.jsx +1 -1
- package/src/IconButton/index.jsx +1 -1
- package/src/Pagination/index.scss +1 -0
- package/src/SearchField/index.jsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/paragon",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.13.0",
|
|
4
4
|
"description": "Accessible, responsive UI component library based on Bootstrap.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"type-check:watch": "npm run type-check -- --watch",
|
|
47
47
|
"build-types": "tsc --emitDeclarationOnly",
|
|
48
48
|
"playroom:start": "npm run playroom:start --workspace=www",
|
|
49
|
-
"playroom:build": "npm run playroom:build --workspace=www"
|
|
49
|
+
"playroom:build": "npm run playroom:build --workspace=www",
|
|
50
|
+
"prepare": "husky install"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
|
@@ -127,6 +128,7 @@
|
|
|
127
128
|
"jest": "^28.1.3",
|
|
128
129
|
"jest-cli": "^28.1.2",
|
|
129
130
|
"jest-environment-jsdom": "^28.1.2",
|
|
131
|
+
"lint-staged": "^15.2.0",
|
|
130
132
|
"markdown-loader-jest": "^0.1.1",
|
|
131
133
|
"react": "^17.0.0",
|
|
132
134
|
"react-dom": "^17.0.0",
|
|
@@ -173,13 +175,16 @@
|
|
|
173
175
|
"/component-generator/"
|
|
174
176
|
],
|
|
175
177
|
"transformIgnorePatterns": [
|
|
176
|
-
"/node_modules/(?!(@
|
|
178
|
+
"/node_modules/(?!(@openedx/paragon)/).*/"
|
|
177
179
|
]
|
|
178
180
|
},
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
|
|
181
|
+
"lint-staged": {
|
|
182
|
+
"*.{js,jsx,ts,tsx}": [
|
|
183
|
+
"npx eslint"
|
|
184
|
+
],
|
|
185
|
+
"*.scss": [
|
|
186
|
+
"npx stylelint"
|
|
187
|
+
]
|
|
183
188
|
},
|
|
184
189
|
"workspaces": [
|
|
185
190
|
"example",
|
package/src/Button/index.jsx
CHANGED
|
@@ -51,10 +51,10 @@ Button.propTypes = {
|
|
|
51
51
|
* */
|
|
52
52
|
variant: PropTypes.string,
|
|
53
53
|
/** An icon component to render.
|
|
54
|
-
* Example import of a Paragon icon component: `import { Check } from '@
|
|
54
|
+
* Example import of a Paragon icon component: `import { Check } from '@openedx/paragon/icons';` */
|
|
55
55
|
iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
56
56
|
/** An icon component to render.
|
|
57
|
-
* Example import of a Paragon icon component: `import { Check } from '@
|
|
57
|
+
* Example import of a Paragon icon component: `import { Check } from '@openedx/paragon/icons';` */
|
|
58
58
|
iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
59
59
|
};
|
|
60
60
|
|
package/src/Chip/index.tsx
CHANGED
|
@@ -86,7 +86,7 @@ Chip.propTypes = {
|
|
|
86
86
|
* An icon component to render before the content.
|
|
87
87
|
* Example import of a Paragon icon component:
|
|
88
88
|
*
|
|
89
|
-
* `import { Check } from '@
|
|
89
|
+
* `import { Check } from '@openedx/paragon/icons';`
|
|
90
90
|
*/
|
|
91
91
|
iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
92
92
|
/** A click handler for the `Chip` icon before. */
|
|
@@ -95,7 +95,7 @@ Chip.propTypes = {
|
|
|
95
95
|
* An icon component to render before after the content.
|
|
96
96
|
* Example import of a Paragon icon component:
|
|
97
97
|
*
|
|
98
|
-
* `import { Check } from '@
|
|
98
|
+
* `import { Check } from '@openedx/paragon/icons';`
|
|
99
99
|
*/
|
|
100
100
|
iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
101
101
|
/** A click handler for the `Chip` icon after. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$data-table-background-color: $white !default;
|
|
2
|
-
$data-table-border:
|
|
2
|
+
$data-table-border: 2px solid $light-300 !default;
|
|
3
3
|
$data-table-box-shadow: $box-shadow-sm !default;
|
|
4
4
|
$data-table-padding-x: .75rem !default;
|
|
5
5
|
$data-table-padding-y: .75rem !default;
|
package/src/Icon/README.md
CHANGED
|
@@ -11,13 +11,13 @@ devStatus: 'Done'
|
|
|
11
11
|
notes: |
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
Displays an svg icon from `@
|
|
14
|
+
Displays an svg icon from `@openedx/paragon/icons`. See [Icons Foundation Documentation](/foundations/icons) for a list of all available icons.
|
|
15
15
|
|
|
16
16
|
## Basic Usage
|
|
17
17
|
|
|
18
18
|
```jsx live
|
|
19
19
|
// Included in this live jsx scope:
|
|
20
|
-
// import { Add, AddCircle } from '@
|
|
20
|
+
// import { Add, AddCircle } from '@openedx/paragon/icons';
|
|
21
21
|
<Icon src={Add} />
|
|
22
22
|
```
|
|
23
23
|
### With HTML attributes
|
|
@@ -26,7 +26,7 @@ HTML attributes can be passed to this component allowing for customization of th
|
|
|
26
26
|
|
|
27
27
|
```jsx live
|
|
28
28
|
// Included in this live jsx scope:
|
|
29
|
-
// import { Add, AddCircle } from '@
|
|
29
|
+
// import { Add, AddCircle } from '@openedx/paragon/icons';
|
|
30
30
|
<div className="d-flex align-items-center bg-dark">
|
|
31
31
|
<Icon src={Add} className="mx-3 text-white" />
|
|
32
32
|
<Icon src={Add} className="mx-3 text-white" size="xs" />
|
package/src/Icon/index.jsx
CHANGED
|
@@ -72,7 +72,7 @@ function Icon({
|
|
|
72
72
|
Icon.propTypes = {
|
|
73
73
|
/**
|
|
74
74
|
* An icon component to render.
|
|
75
|
-
* Example import of a Paragon icon component: `import { Check } from '@
|
|
75
|
+
* Example import of a Paragon icon component: `import { Check } from '@openedx/paragon/icons';`
|
|
76
76
|
*/
|
|
77
77
|
src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
78
78
|
/** HTML element attributes to pass through to the underlying svg element */
|
package/src/IconButton/index.jsx
CHANGED
|
@@ -78,7 +78,7 @@ IconButton.propTypes = {
|
|
|
78
78
|
* but is going to be deprecated soon, please use Paragon's icons instead. */
|
|
79
79
|
iconAs: PropTypes.elementType,
|
|
80
80
|
/** An icon component to render. Example import of a Paragon icon component:
|
|
81
|
-
* `import { Check } from '@
|
|
81
|
+
* `import { Check } from '@openedx/paragon/dist/icon';`
|
|
82
82
|
* */
|
|
83
83
|
src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
84
84
|
/** Alt text for your icon. For best practice, avoid using alt text to describe
|
|
@@ -128,8 +128,8 @@ SearchField.propTypes = {
|
|
|
128
128
|
*
|
|
129
129
|
* ```jsx
|
|
130
130
|
* {
|
|
131
|
-
* submit: import {Search} from '@
|
|
132
|
-
* clear: import {Close} from '@
|
|
131
|
+
* submit: import {Search} from '@openedx/paragon/icons';,
|
|
132
|
+
* clear: import {Close} from '@openedx/paragon/icons'.
|
|
133
133
|
* }
|
|
134
134
|
* ```
|
|
135
135
|
*/
|