Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typescript return types #102

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
bcab4cf
Merge pull request #1 from adobe/readmeUpdates
NateBaldwinDesign Dec 6, 2019
4d31a11
Create CNAME
NateBaldwinDesign Dec 7, 2019
e3147e3
build: copy CNAME into dist
lazd Dec 7, 2019
baeb130
build: moved CNAME to ui package
NateBaldwinDesign Dec 7, 2019
e5ecfa5
Merging conflicts with local
NateBaldwinDesign Dec 7, 2019
b73dfa8
added www to CNAME
NateBaldwinDesign Dec 7, 2019
608b5c0
build: remove www from CNAME
lazd Dec 7, 2019
f6f92c9
style: fixed issue with tabs indicator color fallback
NateBaldwinDesign Dec 7, 2019
15b5b76
Merge pull request #7 from adobe/css-fixes
NateBaldwinDesign Dec 7, 2019
52d8b1e
feat: adding link to demo app in UI
NateBaldwinDesign Dec 7, 2019
e957d59
Merge pull request #8 from adobe/demo-link
NateBaldwinDesign Dec 7, 2019
d778162
build(deps): bump serialize-to-js from 3.0.0 to 3.0.2
dependabot[bot] Dec 8, 2019
0b894e6
style: Updated demo app to a calendar with more colors to demonstrate
NateBaldwinDesign Dec 9, 2019
c1ad80a
Merge pull request #15 from adobe/demo-app
NateBaldwinDesign Dec 9, 2019
2916b85
style: updated styles of links and reverted buttons with function to …
NateBaldwinDesign Dec 9, 2019
6f7ed04
Merge pull request #16 from adobe/bugfix-demo
NateBaldwinDesign Dec 9, 2019
81d38e9
Merge pull request #14 from adobe/dependabot/npm_and_yarn/serialize-t…
NateBaldwinDesign Dec 9, 2019
e0eb9b4
feat: colorscale as HTML Canvas
NateBaldwinDesign Dec 9, 2019
7d39d6d
style: cleanup code in canvas generation
NateBaldwinDesign Dec 9, 2019
2eabbb0
Merge pull request #17 from adobe/colorscale-canvas
NateBaldwinDesign Dec 9, 2019
b8a2666
build: switch to Jest, fix issues with babel vs node and default
lazd Dec 9, 2019
f786270
chore: remove stray console.log
lazd Dec 9, 2019
c7d430f
build: jest is a dev dependency
lazd Dec 9, 2019
4f9f25e
build: add missing @babel/core dependency
lazd Dec 9, 2019
d85e29b
build: use yarn for all the things
lazd Dec 9, 2019
625b517
style: dropdown width override to correct width
NateBaldwinDesign Dec 9, 2019
fc16863
Merge pull request #18 from adobe/bugfix-dropdown-width
NateBaldwinDesign Dec 9, 2019
01091fe
chore: prepare for release
lazd Dec 9, 2019
9a0913f
chore(release): release
lazd Dec 9, 2019
804f9fe
build: work around svg/svgo/issues/1198
lazd Dec 9, 2019
7b69fdf
docs: adding issue and pr templates for github (#21)
NateBaldwinDesign Dec 10, 2019
34940e0
fix(contrast-colors): Add d3 as dependency (#25)
joestrouth1 Dec 12, 2019
18c60de
chore(release): release
lazd Dec 12, 2019
e7b10ca
build: fix contrast-colors version
lazd Dec 12, 2019
a1294f3
fix(ui): Update URL in README (#28)
joestrouth1 Dec 17, 2019
6705c44
feat(ui): Increment ratio input by whole number when Shift is pressed
joestrouth1 Dec 17, 2019
502d08b
match semicolon style
joestrouth1 Dec 17, 2019
dc9c91c
fix(issue #23) slow color update (#26)
georapbox Dec 18, 2019
d416a13
docs: Fix link in table of conntents (#30)
KevinGimbel Dec 18, 2019
b492d23
Merge branch 'step-input' of https://github.com/joestrouth1/leonardo …
NateBaldwinDesign Dec 18, 2019
5a217d2
Merge branch 'joestrouth1-step-input'
NateBaldwinDesign Dec 18, 2019
1da924d
Update issue templates
NateBaldwinDesign Jan 3, 2020
32c6441
added site analytics to index and demo (#38)
NateBaldwinDesign Jan 11, 2020
340eb3b
removed content that bled over from other branch (#39)
NateBaldwinDesign Jan 11, 2020
213f065
updated issue templates
NateBaldwinDesign Jan 11, 2020
f761c0a
Color converter (#40)
NateBaldwinDesign Jan 12, 2020
729add0
corrected order of colorspaces in converter for consistency
NateBaldwinDesign Jan 12, 2020
e27fc86
feat: added hex to output conversion types (#41)
NateBaldwinDesign Jan 12, 2020
34a7686
fix: changed form to div in converter to prevent refresh on submit (#43)
NateBaldwinDesign Jan 13, 2020
5c780b7
fix: corrected midtone color outputs (#46)
NateBaldwinDesign Jan 21, 2020
d0da2ee
chore(release): release
NateBaldwinDesign Jan 21, 2020
91097fd
fix: corrected charts with proper colors and data (#53)
NateBaldwinDesign Jan 29, 2020
dc11faa
docs: added badges to README files (#55)
NateBaldwinDesign Feb 11, 2020
91660a9
Generate adaptive theme (#35)
NateBaldwinDesign Feb 18, 2020
c18ce6f
docs: added development instructions to project-level readme (#56)
NateBaldwinDesign Feb 26, 2020
d0d487a
Generate theme UI (#54)
NateBaldwinDesign Feb 28, 2020
f7b3b69
chore(release): release
NateBaldwinDesign Feb 28, 2020
e1a1071
Added smooth interpolation
DmitryBaranovskiy Mar 4, 2020
dc3257e
Added special colours black & white colours.
DmitryBaranovskiy Mar 6, 2020
9722d5b
fix: ensured smooth is false by default & verified tests passing and …
NateBaldwinDesign Mar 6, 2020
b88a6f5
Merge branch 'DmitryBaranovskiy-master'
NateBaldwinDesign Mar 6, 2020
9755ea1
build(deps): bump acorn from 5.7.3 to 5.7.4 (#68)
dependabot[bot] Apr 7, 2020
7541dc1
fix: remove Babel, use ESM wrapper approach for Node 13.x ESM support…
lazd May 4, 2020
8c35b31
chore(release): release
NateBaldwinDesign May 4, 2020
6e311c8
docs: add note about CJS/ESM imports (#73)
lazd May 4, 2020
5103d68
docs: remove broken API reference link
lazd May 4, 2020
da4f9f7
feat: add support to numeric-only hex values in bulk import (#83) (#87)
fedeci Aug 12, 2020
9c84255
build(deps): bump lodash from 4.17.15 to 4.17.19 (#84)
dependabot[bot] Aug 12, 2020
e936ca4
build(deps): bump elliptic from 6.5.1 to 6.5.3 (#86)
dependabot[bot] Aug 12, 2020
89f54a4
fix: string separated by commas and space resulted in extra space in …
NateBaldwinDesign Aug 12, 2020
4e518ed
Custom output color names option (#81)
NateBaldwinDesign Aug 12, 2020
72094f8
Output format (#78)
NateBaldwinDesign Aug 12, 2020
34d38f0
chore(release): release
NateBaldwinDesign Aug 12, 2020
15de9ae
Add Typescript support (#90)
fedeci Aug 18, 2020
fd55743
chore(release): release
NateBaldwinDesign Aug 18, 2020
66c9b3a
Contrast checker (#92)
NateBaldwinDesign Sep 3, 2020
273dd74
added missing xlink
NateBaldwinDesign Sep 3, 2020
c32af39
bugfix: icon color in contrast checker
NateBaldwinDesign Sep 3, 2020
b402eae
removed icon from contrast demo
NateBaldwinDesign Sep 3, 2020
a436b67
trivial: style fix
NateBaldwinDesign Sep 3, 2020
7d3dedf
added linear interpolation to resolve alpha transparency for calculat…
NateBaldwinDesign Sep 4, 2020
e616997
Alpha contrast (missing commits) (#94)
NateBaldwinDesign Sep 4, 2020
a70813c
fix: title/description for contrast checker page
NateBaldwinDesign Sep 8, 2020
e8ade27
Improve typescript support (#97)
fedeci Sep 8, 2020
636c6d2
chore(release): release
NateBaldwinDesign Sep 8, 2020
dcf48b7
feat: split types returned from 'generateAdaptiveTheme' and 'fixColor…
fedeci Sep 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug--npm-packages--.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41B Bug [npm packages] "
about: Report a problem with the @leonardo-contrast-colors module
title: ''
labels: bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->


## Steps to reproduce
<!-- Include code examples or error messages if you have them -->


## Expected behavior
<!-- Describe what you expected to happen -->


## Screenshots
<!-- If applicable, add screenshots to help explain the problem -->

## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->


## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context
<!-- Provide any additional information that might help us debug the issue -->
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/--bug-web-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41B Bug [Web Tool] "
about: Report a problem with the Leonardo web interface
title: ''
labels: UI, bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->


## Steps to reproduce

1. Go to http://leonardocolor.io/
2. Click on ...
3. Observe ...


## Expected behavior
<!-- Describe what you expected to happen -->


## Screenshots
<!-- If applicable, add screenshots to help explain the problem -->


## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context
<!-- Provide any additional information that might help us debug the issue -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-request--npm-packages-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "✨ Feature request [npm packages]"
about: Suggest a new feature for the Leonardo npm modules
title: ''
labels: enhancement, npm packages
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->


## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->


## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->


## Additional context
<!-- Add any other context, workarounds, or screenshots about your request -->
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-web-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "✨ Feature request [Web Tool]"
about: Suggest a new feature for the Leonardo web interface
title: ''
labels: UI, enhancement
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->


## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->


## Additional context
<!-- Add any other context, workarounds, or screenshots about your request -->
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Description
<!--
Note: Before sending a pull request, make sure there's an issue for what you're changing
- Search for issues: https://github.com/adobe/contrast/issues
- If there's no issue, file it: https://github.com/adobe/contrast/issues/new/choose
- Search for issues: https://github.com/adobe/leonardo/issues
- If there's no issue, file it: https://github.com/adobe/leonardo/issues/new/choose
-->
<!-- Describe what you changed and link to the relevant issue(s) -->

Expand Down
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
![Leonardo logo](.github/Leonardo_Logo.png)

[![npm version](https://badge.fury.io/js/%40adobe%2Fleonardo-contrast-colors.svg)](https://www.npmjs.com/package/@adobe/leonardo-contrast-colors)
[![license](https://img.shields.io/github/license/adobe/leonardo)](https://github.com/adobe/leonardo/blob/master/LICENSE)
[![Pull requests welcome](https://img.shields.io/badge/PRs-welcome-blueviolet)](https://github.com/adobe/leonardo/blob/master/.github/CONTRIBUTING.md) [![Web UI](https://img.shields.io/badge/web%20tool-leonardocolor.io-blue)](https://leonardocolor.io)

# Leonardo
Authoring [adaptive color palettes](#what-is-adaptive-color) for generating color based on a desired contrast ratio.

Expand All @@ -8,15 +12,14 @@ For a detailed walkthrough of Leonardo, [check out this article](https://medium.
## Project Goals
To make it easier for designers and engineers to leverage color science to create custom interpolations for a value scale, and to make it easier for designers and engineers to conform to [WCAG minimum contrast standards](https://www.w3.org/TR/WCAG21/#contrast-minimum) by using contrast ratio as the starting point, rather than a post-color-selection auditing process.

1. [Leonardo web application](leonardo-web-application)
1. [Leonardo web application](#leonardo-web-application)
2. [Show me a demo](#show-me-a-demo)
3. [What is "adaptive color"?](#what-is-adaptive-color)
4. [Using Leonardo](#using-leonardo)
5. [API Reference](#api-reference)
6. [Why are not all contrast ratios available?](#why-are-not-all-contrast-ratios-available)
7. [D3 Color](#d3-color)
8. [Contributing](#contributing)
9. [Licensing](#licensing)
5. [Why are not all contrast ratios available?](#why-are-not-all-contrast-ratios-available)
6. [D3 Color](#d3-color)
7. [Contributing](#contributing)
8. [Licensing](#licensing)


## Leonardo web application
Expand Down Expand Up @@ -67,5 +70,36 @@ The Leonardo web app leverages d3 for additional features such as generating 2d
## Contributing
Contributions are welcomed! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.

## Development

To get started [developing Leonardo UI](packages/ui#development):

*Note: [Yarn](https://yarnpkg.com/) must be installed on your machine*

```sh
# Install dependencies
yarn install

# Change directory to Leonardo UI
cd packages/ui

# Run local server
yarn dev
```

To get started [developing Leonardo `contrast-colors` package](packages/contrast-colors#development):

```sh
# From root, change directory to contrast-colors
cd packages/contrast-colors

# Run tests and watch for changes
yarn dev
```

Then, visit the live reloading web UIs here:
http://localhost:1234/index.html
http://localhost:1234/demo.html

## Licensing
This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.
14 changes: 14 additions & 0 deletions cssnano.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
preset: [
"default",
{
svgo: {
plugins: [
{
convertStyleToAttrs: false
}
]
}
}
]
};
2 changes: 2 additions & 0 deletions packages/contrast-colors/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
test/
77 changes: 77 additions & 0 deletions packages/contrast-colors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [1.0.0-alpha.8](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.7...@adobe/leonardo-contrast-colors@1.0.0-alpha.8) (2020-09-08)

**Note:** Version bump only for package @adobe/leonardo-contrast-colors





# [1.0.0-alpha.7](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.6...@adobe/leonardo-contrast-colors@1.0.0-alpha.7) (2020-08-18)

**Note:** Version bump only for package @adobe/leonardo-contrast-colors





# [1.0.0-alpha.6](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.5...@adobe/leonardo-contrast-colors@1.0.0-alpha.6) (2020-08-12)

**Note:** Version bump only for package @adobe/leonardo-contrast-colors





# [1.0.0-alpha.5](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.4...@adobe/leonardo-contrast-colors@1.0.0-alpha.5) (2020-05-04)


### Bug Fixes

* ensured smooth is false by default & verified tests passing and UI not impacted by addition ([9722d5b](https://github.com/adobe/leonardo/commit/9722d5b422e60c62243cfae58f21bafbb286854c))
* remove Babel, use ESM wrapper approach for Node 13.x ESM support + CJS support ([#72](https://github.com/adobe/leonardo/issues/72)) ([7541dc1](https://github.com/adobe/leonardo/commit/7541dc1189403039b900ef08ca82023d31063b58))





# [1.0.0-alpha.4](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.3...@adobe/leonardo-contrast-colors@1.0.0-alpha.4) (2020-02-28)

**Note:** Version bump only for package @adobe/leonardo-contrast-colors





# [1.0.0-alpha.3](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.2...@adobe/leonardo-contrast-colors@1.0.0-alpha.3) (2020-01-21)


### Bug Fixes

* corrected midtone color outputs ([#46](https://github.com/adobe/leonardo/issues/46)) ([5c780b7](https://github.com/adobe/leonardo/commit/5c780b7a1f0355f985591076a27f1764e1faee3c))





# [1.0.0-alpha.2](https://github.com/adobe/leonardo/compare/@adobe/leonardo-contrast-colors@1.0.0-alpha.1...@adobe/leonardo-contrast-colors@1.0.0-alpha.2) (2019-12-12)


### Bug Fixes

* **contrast-colors:** Add d3 as dependency ([#25](https://github.com/adobe/leonardo/issues/25)) ([34940e0](https://github.com/adobe/leonardo/commit/34940e00f52fa69b413b7c882a79c4d158b19a3b))





# 1.0.0-alpha.1 (2019-12-09)


### Features

* added throw error for testing missing parameters ([#90](https://github.com/adobe/leonardo/issues/90)) ([2f5dff7](https://github.com/adobe/leonardo/commit/2f5dff7ced7756ef860ba9e5e661cf5fc1e20a2e))
Loading