-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-elements,ui-img): add ui-img package for Img Component
refs: INSTUI-2005 TEST PLAN: - ensure ui-elements notates that Img will be removed in 7.0.0 - ensure ui-img shows under Packages in the nav - ensure Img README examples render correctly - ensure new display prop works as expected on the new ui-img component - ensure DeprecatedImg is referencing the ui-elements version and shows under the Components/Deprecated area in the nav - ensure Storybook examples render correctly - ensure Tests pass - NOTE: should now mention the new Img is experimental in the console Change-Id: I1b85d71341c447ee57d84907ea45aade8c55eb39 Reviewed-on: https://gerrit.instructure.com/204823 Tested-by: Jenkins Reviewed-by: Steve Jensen <sejensen@instructure.com> Product-Review: Steve Jensen <sejensen@instructure.com> QA-Review: Daniel Sasaki <dsasaki@instructure.com> Visual-Regression-Test: Pam Hiett <phiett@instructure.com>
- Loading branch information
Showing
28 changed files
with
848 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules/** | ||
/lib/** | ||
/es/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
lib/ | ||
.babel-cache/ | ||
es/ | ||
types/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/.* | ||
**/__tests__ | ||
**/__testfixtures__ | ||
*.config.js | ||
*.conf.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See the instructure-ui mono-repo [change log](#CHANGELOG) for past changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
category: packages | ||
experimental: true | ||
--- | ||
|
||
## ui-img | ||
|
||
[![npm][npm]][npm-url] | ||
[![build-status][build-status]][build-status-url] | ||
[![MIT License][license-badge]][LICENSE] | ||
[![Code of Conduct][coc-badge]][coc] | ||
|
||
An accessible image component. | ||
|
||
### Installation | ||
|
||
```sh | ||
yarn add @instructure/ui-img | ||
``` | ||
|
||
### Components | ||
The `ui-img` package contains the following: | ||
- [Img](#Img) | ||
|
||
### Usage | ||
```jsx | ||
--- | ||
example: false | ||
--- | ||
<Img src={placeholderImage(250, 350)} alt="A Placeholder Image" /> | ||
``` | ||
### Contribute | ||
See the [contributing guidelines](#contributing) for details. | ||
|
||
### License | ||
|
||
[MIT](LICENSE) | ||
|
||
[npm]: https://img.shields.io/npm/v/@instructure/ui-img.svg | ||
[npm-url]: https://npmjs.com/package/@instructure/ui-img | ||
|
||
[build-status]: https://travis-ci.org/instructure/instructure-ui.svg?branch=master | ||
[build-status-url]: https://travis-ci.org/instructure/instructure-ui "Travis CI" | ||
|
||
[license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square | ||
[license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE | ||
|
||
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square | ||
[coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2015 - present Instructure, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
module.exports = { | ||
presets: [[ | ||
require('@instructure/ui-babel-preset'), | ||
{ | ||
coverage: Boolean(process.env.COVERAGE), | ||
esModules: Boolean(process.env.ES_MODULES), | ||
removeConsole: process.env.NODE_ENV === 'production', | ||
transformImports: Boolean(process.env.TRANSFORM_IMPORTS) | ||
} | ||
]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "@instructure/ui-img", | ||
"version": "6.10.0", | ||
"description": "An accessible image component.", | ||
"author": "Instructure, Inc. Engineering and Product Design", | ||
"main": "./lib/index.js", | ||
"module": "./es/index.js", | ||
"types": "./types/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/instructure/instructure-ui.git" | ||
}, | ||
"homepage": "https://instructure.github.io/instructure-ui/", | ||
"bugs": "https://github.com/instructure/instructure-ui/issues", | ||
"scripts": { | ||
"lint": "ui-test --lint", | ||
"lint:fix": "ui-test --lint --fix", | ||
"clean": "ui-build --clean", | ||
"build": "ui-build", | ||
"build:watch": "ui-build --watch", | ||
"build:types": "ui-scripts --types" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"@babel/runtime": "^7", | ||
"@instructure/console": "^6.10.0", | ||
"@instructure/ui-dom-utils": "^6.10.0", | ||
"@instructure/ui-react-utils": "^6.10.0", | ||
"@instructure/ui-themeable": "^6.10.0", | ||
"@instructure/ui-testable": "^6.10.0", | ||
"@instructure/ui-view": "^6.10.0", | ||
"classnames": "^2", | ||
"prop-types": "^15" | ||
|
||
}, | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "^6.10.0", | ||
"@instructure/ui-test-utils": "^6.10.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^15 || ^16" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"sideEffects": false | ||
} |
Oops, something went wrong.