From 6efcbb8c505ab06c83e332c97ebfee75b19acf82 Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Fri, 7 Oct 2022 16:18:49 -0500 Subject: [PATCH 1/6] chore: license headers --- .github/ISSUE_TEMPLATE/BUG-REPORT.yml | 61 ++++++++++------------ .github/ISSUE_TEMPLATE/DESIGN-DOC.yml | 43 +++++++-------- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml | 43 ++++++--------- .github/ISSUE_TEMPLATE/config.yml | 6 +-- .github/config.yml | 2 +- .github/workflows/closed_references.yml | 6 +-- .github/workflows/format.yml | 14 +++++ .github/workflows/release.yml | 5 +- .github/workflows/stale.yml | 10 ++-- .gitignore | 1 + .prettierrc | 5 -- .storybook/main.js | 12 ++--- .storybook/preview-head.html | 5 +- .storybook/preview.js | 4 +- Makefile | 18 +++++++ css/express.d.ts | 2 +- css/express.js | 30 ++++++----- package-lock.json | 59 +++++++++++++-------- package.json | 1 - rollup.config.js | 30 +++++------ src/components/Alert.tsx | 6 +-- src/components/AlertContent.tsx | 8 +-- src/components/Button.tsx | 6 +-- src/components/Card.tsx | 6 +-- src/components/CardTitle.tsx | 8 +-- src/components/Checkbox.tsx | 12 ++--- src/components/CodeBox.tsx | 8 +-- src/components/ForkMe.tsx | 12 ++--- src/components/LinkButton.tsx | 10 ++-- src/components/TextInput.tsx | 12 ++--- src/components/Typography.tsx | 8 +-- src/components/index.tsx | 24 ++++----- src/index.ts | 6 ++- src/stories/Button.stories.tsx | 22 ++++---- src/stories/Card.stories.tsx | 22 ++++---- src/stories/Checkbox.stories.tsx | 16 +++--- src/stories/CodeBox.stories.tsx | 16 +++--- src/stories/ForkMe.stories.tsx | 16 +++--- src/stories/LinkButton.stories.tsx | 22 ++++---- src/stories/TextInput.stories.tsx | 16 +++--- src/stories/Typography.stories.tsx | 16 +++--- src/stories/storyhelper.tsx | 24 ++++----- src/theme/alertStyles.ts | 12 +++-- src/theme/buttonStyles.ts | 10 ++-- src/theme/cardStyles.ts | 6 ++- src/theme/checkboxStyles.ts | 8 +-- src/theme/codeBoxStyles.ts | 6 ++- src/theme/forkMeStyles.ts | 20 +++---- src/theme/globalStyles.ts | 8 +-- src/theme/helpers.ts | 56 ++++++++++---------- src/theme/index.ts | 28 +++++----- src/theme/linkButtonStyles.ts | 10 ++-- src/theme/messageStyles.ts | 8 +-- src/theme/normalizeStyles.ts | 4 +- src/theme/textInputStyles.ts | 38 +++++++------- src/theme/typographyStyles.ts | 28 +++++----- tsconfig.json | 17 ++---- 57 files changed, 479 insertions(+), 433 deletions(-) create mode 100644 .github/workflows/format.yml delete mode 100644 .prettierrc create mode 100644 Makefile diff --git a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml index a491e84..b1270f2 100644 --- a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml @@ -1,39 +1,33 @@ -description: 'Create a bug report' +description: "Create a bug report" labels: - bug -name: 'Bug Report' +name: "Bug Report" body: - attributes: value: "Thank you for taking the time to fill out this bug report!\n" type: markdown - attributes: - label: 'Preflight checklist' + label: "Preflight checklist" options: - - label: - 'I could not find a solution in the existing issues, docs, nor - discussions.' + - label: "I could not find a solution in the existing issues, docs, nor + discussions." required: true - - label: - "I agree to follow this project's [Code of + - label: "I agree to follow this project's [Code of Conduct](https://github.com/ory/themes/blob/master/CODE_OF_CONDUCT.md)." required: true - - label: - "I have read and am following this repository's [Contribution + - label: "I have read and am following this repository's [Contribution Guidelines](https://github.com/ory/themes/blob/master/CONTRIBUTING.md)." required: true - - label: - 'This issue affects my [Ory Cloud](https://www.ory.sh/) project.' - - label: - 'I have joined the [Ory Community Slack](https://slack.ory.sh).' - - label: - 'I am signed up to the [Ory Security Patch - Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).' + - label: "This issue affects my [Ory Cloud](https://www.ory.sh/) project." + - label: "I have joined the [Ory Community Slack](https://slack.ory.sh)." + - label: "I am signed up to the [Ory Security Patch + Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)." id: checklist type: checkboxes - attributes: - description: 'A clear and concise description of what the bug is.' - label: 'Describe the bug' - placeholder: 'Tell us what you see!' + description: "A clear and concise description of what the bug is." + label: "Describe the bug" + placeholder: "Tell us what you see!" id: describe-bug type: textarea validations: @@ -47,17 +41,16 @@ body: 1. Run `docker run ....` 2. Make API Request to with `curl ...` 3. Request fails with response: `{"some": "error"}` - label: 'Reproducing the bug' + label: "Reproducing the bug" id: reproduce-bug type: textarea validations: required: true - attributes: - description: - 'Please copy and paste any relevant log output. This will be + description: "Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. Please - redact any sensitive information' - label: 'Relevant log output' + redact any sensitive information" + label: "Relevant log output" render: shell placeholder: | log=error .... @@ -65,10 +58,10 @@ body: type: textarea - attributes: description: - 'Please copy and paste any relevant configuration. This will be + "Please copy and paste any relevant configuration. This will be automatically formatted into code, so no need for backticks. Please - redact any sensitive information!' - label: 'Relevant configuration' + redact any sensitive information!" + label: "Relevant configuration" render: yml placeholder: | server: @@ -77,14 +70,14 @@ body: id: config type: textarea - attributes: - description: 'What version of our software are you running?' + description: "What version of our software are you running?" label: Version id: version type: input validations: required: true - attributes: - label: 'On which operating system are you observing this issue?' + label: "On which operating system are you observing this issue?" options: - Ory Cloud - macOS @@ -95,19 +88,19 @@ body: id: operating-system type: dropdown - attributes: - label: 'In which environment are you deploying?' + label: "In which environment are you deploying?" options: - Ory Cloud - Docker - - 'Docker Compose' - - 'Kubernetes with Helm' + - "Docker Compose" + - "Kubernetes with Helm" - Kubernetes - Binary - Other id: deployment type: dropdown - attributes: - description: 'Add any other context about the problem here.' + description: "Add any other context about the problem here." label: Additional Context id: additional type: textarea diff --git a/.github/ISSUE_TEMPLATE/DESIGN-DOC.yml b/.github/ISSUE_TEMPLATE/DESIGN-DOC.yml index 3f06976..da8a898 100644 --- a/.github/ISSUE_TEMPLATE/DESIGN-DOC.yml +++ b/.github/ISSUE_TEMPLATE/DESIGN-DOC.yml @@ -1,8 +1,7 @@ -description: - 'A design document is needed for non-trivial changes to the code base.' +description: "A design document is needed for non-trivial changes to the code base." labels: - rfc -name: 'Design Document' +name: "Design Document" body: - attributes: value: | @@ -18,33 +17,27 @@ body: after code reviews, and your pull requests will be merged faster. type: markdown - attributes: - label: 'Preflight checklist' + label: "Preflight checklist" options: - - label: - 'I could not find a solution in the existing issues, docs, nor - discussions.' + - label: "I could not find a solution in the existing issues, docs, nor + discussions." required: true - - label: - "I agree to follow this project's [Code of + - label: "I agree to follow this project's [Code of Conduct](https://github.com/ory/themes/blob/master/CODE_OF_CONDUCT.md)." required: true - - label: - "I have read and am following this repository's [Contribution + - label: "I have read and am following this repository's [Contribution Guidelines](https://github.com/ory/themes/blob/master/CONTRIBUTING.md)." required: true - - label: - 'This issue affects my [Ory Cloud](https://www.ory.sh/) project.' - - label: - 'I have joined the [Ory Community Slack](https://slack.ory.sh).' - - label: - 'I am signed up to the [Ory Security Patch - Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).' + - label: "This issue affects my [Ory Cloud](https://www.ory.sh/) project." + - label: "I have joined the [Ory Community Slack](https://slack.ory.sh)." + - label: "I am signed up to the [Ory Security Patch + Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)." id: checklist type: checkboxes - attributes: description: | This section gives the reader a very rough overview of the landscape in which the new system is being built and what is actually being built. This isn’t a requirements doc. Keep it succinct! The goal is that readers are brought up to speed but some previous knowledge can be assumed and detailed info can be linked to. This section should be entirely focused on objective background facts. - label: 'Context and scope' + label: "Context and scope" id: scope type: textarea validations: @@ -53,7 +46,7 @@ body: - attributes: description: | A short list of bullet points of what the goals of the system are, and, sometimes more importantly, what non-goals are. Note, that non-goals aren’t negated goals like “The system shouldn’t crash”, but rather things that could reasonably be goals, but are explicitly chosen not to be goals. A good example would be “ACID compliance”; when designing a database, you’d certainly want to know whether that is a goal or non-goal. And if it is a non-goal you might still select a solution that provides it, if it doesn’t introduce trade-offs that prevent achieving the goals. - label: 'Goals and non-goals' + label: "Goals and non-goals" id: goals type: textarea validations: @@ -65,7 +58,7 @@ body: The design doc is the place to write down the trade-offs you made in designing your software. Focus on those trade-offs to produce a useful document with long-term value. That is, given the context (facts), goals and non-goals (requirements), the design doc is the place to suggest solutions and show why a particular solution best satisfies those goals. The point of writing a document over a more formal medium is to provide the flexibility to express the problem at hand in an appropriate manner. Because of this, there is no explicit guidance on how to actually describe the design. - label: 'The design' + label: "The design" id: design type: textarea validations: @@ -74,21 +67,21 @@ body: - attributes: description: | If the system under design exposes an API, then sketching out that API is usually a good idea. In most cases, however, one should withstand the temptation to copy-paste formal interface or data definitions into the doc as these are often verbose, contain unnecessary detail and quickly get out of date. Instead, focus on the parts that are relevant to the design and its trade-offs. - label: 'APIs' + label: "APIs" id: apis type: textarea - attributes: description: | Systems that store data should likely discuss how and in what rough form this happens. Similar to the advice on APIs, and for the same reasons, copy-pasting complete schema definitions should be avoided. Instead, focus on the parts that are relevant to the design and its trade-offs. - label: 'Data storage' + label: "Data storage" id: persistence type: textarea - attributes: description: | Design docs should rarely contain code, or pseudo-code except in situations where novel algorithms are described. As appropriate, link to prototypes that show the feasibility of the design. - label: 'Code and pseudo-code' + label: "Code and pseudo-code" id: pseudocode type: textarea @@ -101,7 +94,7 @@ body: On the other end are systems where the possible solutions are very well defined, but it isn't at all obvious how they could even be combined to achieve the goals. This may be a legacy system that is difficult to change and wasn't designed to do what you want it to do or a library design that needs to operate within the constraints of the host programming language. In this situation, you may be able to enumerate all the things you can do relatively easily, but you need to creatively put those things together to achieve the goals. There may be multiple solutions, and none of them are great, and hence such a document should focus on selecting the best way given all identified trade-offs. - label: 'Degree of constraint' + label: "Degree of constraint" id: constrait type: textarea diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml index 6f7d57f..59cd6cf 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml @@ -1,8 +1,7 @@ -description: - 'Suggest an idea for this project without a plan for implementation' +description: "Suggest an idea for this project without a plan for implementation" labels: - feat -name: 'Feature Request' +name: "Feature Request" body: - attributes: value: | @@ -11,33 +10,26 @@ body: If you already have a plan to implement a feature or a change, please create a [design document](https://github.com/aeneasr/gh-template-test/issues/new?assignees=&labels=rfc&template=DESIGN-DOC.yml) instead if the change is non-trivial! type: markdown - attributes: - label: 'Preflight checklist' + label: "Preflight checklist" options: - - label: - 'I could not find a solution in the existing issues, docs, nor - discussions.' + - label: "I could not find a solution in the existing issues, docs, nor + discussions." required: true - - label: - "I agree to follow this project's [Code of + - label: "I agree to follow this project's [Code of Conduct](https://github.com/ory/themes/blob/master/CODE_OF_CONDUCT.md)." required: true - - label: - "I have read and am following this repository's [Contribution + - label: "I have read and am following this repository's [Contribution Guidelines](https://github.com/ory/themes/blob/master/CONTRIBUTING.md)." required: true - - label: - 'This issue affects my [Ory Cloud](https://www.ory.sh/) project.' - - label: - 'I have joined the [Ory Community Slack](https://slack.ory.sh).' - - label: - 'I am signed up to the [Ory Security Patch - Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).' + - label: "This issue affects my [Ory Cloud](https://www.ory.sh/) project." + - label: "I have joined the [Ory Community Slack](https://slack.ory.sh)." + - label: "I am signed up to the [Ory Security Patch + Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)." id: checklist type: checkboxes - attributes: - description: - 'Is your feature request related to a problem? Please describe.' - label: 'Describe your problem' + description: "Is your feature request related to a problem? Please describe." + label: "Describe your problem" placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]" @@ -50,28 +42,27 @@ body: Describe the solution you'd like placeholder: | A clear and concise description of what you want to happen. - label: 'Describe your ideal solution' + label: "Describe your ideal solution" id: solution type: textarea validations: required: true - attributes: description: "Describe alternatives you've considered" - label: 'Workarounds or alternatives' + label: "Workarounds or alternatives" id: alternatives type: textarea validations: required: true - attributes: - description: 'What version of our software are you running?' + description: "What version of our software are you running?" label: Version id: version type: input validations: required: true - attributes: - description: - 'Add any other context or screenshots about the feature request here.' + description: "Add any other context or screenshots about the feature request here." label: Additional Context id: additional type: textarea diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c2c0e5a..db8d324 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,10 +2,8 @@ blank_issues_enabled: false contact_links: - name: Ory Themes Forum url: https://github.com/orgs/ory/discussions - about: - Please ask and answer questions here, show your implementations and + about: Please ask and answer questions here, show your implementations and discuss ideas. - name: Ory Chat url: https://www.ory.sh/chat - about: - Hang out with other Ory community members to ask and answer questions. + about: Hang out with other Ory community members to ask and answer questions. diff --git a/.github/config.yml b/.github/config.yml index 0d121fe..ea33569 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -1,3 +1,3 @@ todo: - keyword: '@todo' + keyword: "@todo" label: todo diff --git a/.github/workflows/closed_references.yml b/.github/workflows/closed_references.yml index ebafc8a..2789ac4 100644 --- a/.github/workflows/closed_references.yml +++ b/.github/workflows/closed_references.yml @@ -2,13 +2,13 @@ name: Closed Reference Notifier on: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" workflow_dispatch: inputs: issueLimit: description: Max. number of issues to create required: true - default: '5' + default: "5" jobs: find_closed_references: @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2-beta with: - node-version: '14' + node-version: "14" - uses: ory/closed-reference-notifier@v1 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..4abd256 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,14 @@ +name: Format + +on: + pull_request: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: make format + - name: Indicate formatting issues + run: git diff HEAD --exit-code --color diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ebcd47..b1f9a80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: "14" - run: npm ci - - run: - npm version --no-git-tag-version ${{ github.event.release.tag_name }} + - run: npm version --no-git-tag-version ${{ github.event.release.tag_name }} - run: npm run build - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_AENEASR diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b168ce9..666299c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,8 +1,8 @@ -name: 'Close Stale Issues' +name: "Close Stale Issues" on: workflow_dispatch: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" jobs: stale: @@ -35,10 +35,10 @@ jobs: Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you! Thank you 🙏✌️ - stale-issue-label: 'stale' - exempt-issue-labels: 'bug,blocking,docs,backlog' + stale-issue-label: "stale" + exempt-issue-labels: "bug,blocking,docs,backlog" days-before-stale: 365 days-before-close: 30 exempt-milestones: true exempt-assignees: true - only-pr-labels: 'stale' + only-pr-labels: "stale" diff --git a/.gitignore b/.gitignore index 7796e86..d25d627 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +.bin lib diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index db0be48..0000000 --- a/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "proseWrap": "always", - "singleQuote": true, - "trailingComma": "none" -} diff --git a/.storybook/main.js b/.storybook/main.js index f6c9184..038499e 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,10 +1,10 @@ +// Copyright © 2022 Ory Corp + module.exports = { - "stories": [ + stories: [ "../src/stories/**/*.stories.@(js|jsx|ts|tsx|mdx)", - "../src/stories/*.stories.@(js|jsx|ts|tsx|mdx)" + "../src/stories/*.stories.@(js|jsx|ts|tsx|mdx)", ], - "addons": [ - "@storybook/addon-links", - "@storybook/addon-essentials"], - postCss: false + addons: ["@storybook/addon-links", "@storybook/addon-essentials"], + postCss: false, }; diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html index b7781f9..78914be 100644 --- a/.storybook/preview-head.html +++ b/.storybook/preview-head.html @@ -1 +1,4 @@ - + diff --git a/.storybook/preview.js b/.storybook/preview.js index d554ce7..946c2ca 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, -} +}; diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..379df58 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +format: .bin/ory node_modules # formats the source code + .bin/ory dev headers license --exclude=rollup.config.js --exclude=css/express.d.ts + npm exec -- prettier --write . + +help: # prints all make targets + cat Makefile | grep '^[^ ]*:' | grep -v '^\.bin/' | grep -v '.SILENT:' | grep -v '^node_modules:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t + +.bin/ory: Makefile + curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.43 + touch .bin/ory + +node_modules: package-lock.json + npm install + touch node_modules + + +.SILENT: +.DEFAULT_GOAL := help diff --git a/css/express.d.ts b/css/express.d.ts index 7b02076..e8887d4 100644 --- a/css/express.d.ts +++ b/css/express.d.ts @@ -1 +1 @@ -declare module '@ory/themes/css/express'; +declare module "@ory/themes/css/express"; diff --git a/css/express.js b/css/express.js index 0489848..2ff44fc 100644 --- a/css/express.js +++ b/css/express.js @@ -1,5 +1,7 @@ -const postcss = require('postcss'); -const postcssPresetEnv = require('postcss-preset-env'); +// Copyright © 2022 Ory Corp + +const postcss = require("postcss"); +const postcssPresetEnv = require("postcss-preset-env"); const { cssButtonStyles, @@ -24,24 +26,24 @@ const { cssTypographyLeadStyles, cssTypographyLinkStyles, cssTypographyParagraphStyles, - theme: t -} = require('../lib'); -const { cssNormalize } = require('../lib'); + theme: t, +} = require("../lib"); +const { cssNormalize } = require("../lib"); function cssVars(tt) { const result = []; for (let [k, v] of Object.entries(tt)) { result.push(` --${k}: ${v};`); } - return result.join('\n'); + return result.join("\n"); } const themeContext = (theme) => { if (theme) { - return { theme: { ...theme, platform: 'react' } }; + return { theme: { ...theme, platform: "react" } }; } - return { theme: { ...t, platform: 'react' } }; + return { theme: { ...t, platform: "react" } }; }; module.exports = { @@ -87,20 +89,20 @@ ${cssTypographyCaptionStyles(ct)} ${cssTypographyLinkStyles(ct)} `; - res.header('Content-Type', 'text/css'); + res.header("Content-Type", "text/css"); postcss([ postcssPresetEnv({ stage: 0, features: { - 'nesting-rules': true - } - }) + "nesting-rules": true, + }, + }), ]) - .process(css, { from: 'src/theme.css', to: 'lib/theme.css' }) + .process(css, { from: "src/theme.css", to: "lib/theme.css" }) .then((result) => { res.send(result.css); }); }; - } + }, }; diff --git a/package-lock.json b/package-lock.json index 67c2b25..5b51cae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12984,7 +12984,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -16685,7 +16684,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -17103,7 +17101,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -17200,6 +17197,12 @@ "react": "^16.8.4 || ^17.0.0" } }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "peer": true + }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -18336,7 +18339,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -23422,7 +23424,8 @@ "version": "1.6.22", "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz", "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==", - "dev": true + "dev": true, + "requires": {} }, "@mdx-js/util": { "version": "1.6.22", @@ -23796,7 +23799,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@storybook/addon-measure/-/addon-measure-2.0.0.tgz", "integrity": "sha512-ZhdT++cX+L9LwjhGYggvYUUVQH/MGn2rwbrAwCMzA/f2QTFvkjxzX8nDgMxIhaLCDC+gHIxfJG2wrWN0jkBr3g==", - "dev": true + "dev": true, + "requires": {} }, "@storybook/addon-toolbars": { "version": "6.3.13", @@ -25125,7 +25129,8 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz", "integrity": "sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==", - "dev": true + "dev": true, + "requires": {} }, "semver": { "version": "6.3.0", @@ -26007,7 +26012,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "7.2.0", @@ -26072,13 +26078,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "ansi-align": { "version": "3.0.1", @@ -26548,7 +26556,8 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz", "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==", - "dev": true + "dev": true, + "requires": {} }, "babel-plugin-polyfill-corejs2": { "version": "0.3.1", @@ -31425,7 +31434,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -31517,7 +31525,8 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.1.7.tgz", "integrity": "sha512-VI3TyyHlGkO8uFle0IOibzpO1c1iJDcXcS/zBrQrXQQvJ2tpdwVzVZ7XdKsyRz1NdRmre4dqQkMZzUHaKIG/1w==", - "dev": true + "dev": true, + "requires": {} }, "md5.js": { "version": "1.3.5", @@ -34220,7 +34229,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -34230,7 +34238,8 @@ "version": "5.5.1", "resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.5.1.tgz", "integrity": "sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg==", - "dev": true + "dev": true, + "requires": {} }, "react-dev-utils": { "version": "11.0.4", @@ -34552,7 +34561,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -34630,6 +34638,12 @@ "prop-types": "^15.0.0" } }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "peer": true + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -35175,7 +35189,8 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz", "integrity": "sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==", - "dev": true + "dev": true, + "requires": {} }, "rollup-plugin-typescript2": { "version": "0.30.0", @@ -35518,7 +35533,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -37174,13 +37188,15 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.3.0.tgz", "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==", - "dev": true + "dev": true, + "requires": {} }, "use-isomorphic-layout-effect": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", - "dev": true + "dev": true, + "requires": {} }, "use-latest": { "version": "1.2.1", @@ -37884,7 +37900,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/webpack-filter-warnings-plugin/-/webpack-filter-warnings-plugin-1.2.1.tgz", "integrity": "sha512-Ez6ytc9IseDMLPo0qCuNNYzgtUl8NovOqjIq4uAU8LTD4uoa1w1KpZyyzFtLTEMZpkkOkLfL9eN+KGYdk1Qtwg==", - "dev": true + "dev": true, + "requires": {} }, "webpack-hot-middleware": { "version": "2.25.1", diff --git a/package.json b/package.json index e437e18..882ca4f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "scripts": { "start": "start-storybook -p 6007", "build-storybook": "build-storybook", - "format": "prettier --write \"src/{**/,}*.{js,ts,tsx}\"", "build": "rm -rf lib && rollup -c", "p": "npm run build && npm version patch --git-tag-version false && npm publish" }, diff --git a/rollup.config.js b/rollup.config.js index 690ab12..1ba6dcb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,23 +1,23 @@ -import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import resolve from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import typescript from 'rollup-plugin-typescript2'; +import peerDepsExternal from "rollup-plugin-peer-deps-external"; +import resolve from "@rollup/plugin-node-resolve"; +import commonjs from "@rollup/plugin-commonjs"; +import typescript from "rollup-plugin-typescript2"; -const packageJson = require('./package.json'); +const packageJson = require("./package.json"); export default { - input: 'src/index.ts', + input: "src/index.ts", output: [ { file: packageJson.main, - format: 'cjs', - sourcemap: true + format: "cjs", + sourcemap: true, }, { file: packageJson.module, - format: 'esm', - sourcemap: true - } + format: "esm", + sourcemap: true, + }, ], plugins: [ peerDepsExternal(), @@ -26,8 +26,8 @@ export default { typescript({ useTsconfigDeclarationDir: true, tsconfigOverride: { - include: ['src'] - } - }) - ] + include: ["src"], + }, + }), + ], }; diff --git a/src/components/Alert.tsx b/src/components/Alert.tsx index dbd3f3d..9471c0b 100644 --- a/src/components/Alert.tsx +++ b/src/components/Alert.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import styled from 'styled-components'; -import { alertStyles, AlertStyles } from '../theme'; +import React from "react"; +import styled from "styled-components"; +import { alertStyles, AlertStyles } from "../theme"; export interface AlertProps extends React.HTMLAttributes, diff --git a/src/components/AlertContent.tsx b/src/components/AlertContent.tsx index 2f169ee..c26252c 100644 --- a/src/components/AlertContent.tsx +++ b/src/components/AlertContent.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import styled from 'styled-components'; -import { alertContentStyles } from '../theme'; -import { H3 } from './Typography'; +import React from "react"; +import styled from "styled-components"; +import { alertContentStyles } from "../theme"; +import { H3 } from "./Typography"; export default styled(H3)(alertContentStyles); diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 4722f62..78c0c4c 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode } from 'react'; -import styled from 'styled-components'; -import { buttonStyles, ButtonStyles } from '../theme'; +import React, { ReactNode } from "react"; +import styled from "styled-components"; +import { buttonStyles, ButtonStyles } from "../theme"; export interface ButtonProps extends React.ButtonHTMLAttributes, diff --git a/src/components/Card.tsx b/src/components/Card.tsx index a26580c..7a70d09 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import styled from 'styled-components'; -import { cardStyles, CardStyles } from '../theme'; +import React from "react"; +import styled from "styled-components"; +import { cardStyles, CardStyles } from "../theme"; export interface CardProps extends React.HTMLAttributes, diff --git a/src/components/CardTitle.tsx b/src/components/CardTitle.tsx index 820bd8b..a42021f 100644 --- a/src/components/CardTitle.tsx +++ b/src/components/CardTitle.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import styled from 'styled-components'; -import { cardTitleStyles } from '../theme'; -import { H2 } from './Typography'; +import React from "react"; +import styled from "styled-components"; +import { cardTitleStyles } from "../theme"; +import { H2 } from "./Typography"; export default styled(H2)(cardTitleStyles); diff --git a/src/components/Checkbox.tsx b/src/components/Checkbox.tsx index abd24ae..99a4c25 100644 --- a/src/components/Checkbox.tsx +++ b/src/components/Checkbox.tsx @@ -1,17 +1,17 @@ -import React, { ComponentType } from 'react'; -import styled, { StyledComponent } from 'styled-components'; +import React, { ComponentType } from "react"; +import styled, { StyledComponent } from "styled-components"; import { checkboxStyles, TextInputProps as StyledTextInputProps, - typographyCaptionStyles -} from '../theme'; + typographyCaptionStyles, +} from "../theme"; export interface CheckboxProps extends React.InputHTMLAttributes { title?: string; subtitle?: string; label?: string; - state?: 'success' | 'error' | 'disabled'; + state?: "success" | "error" | "disabled"; } const Subtitle: StyledComponent< @@ -30,7 +30,7 @@ const Checkbox = ({ const id = Math.random().toString(36).substring(2); return (
- {title &&
{title}
} + {title &&
{title}
}
{label && ( diff --git a/src/components/CodeBox.tsx b/src/components/CodeBox.tsx index 14902b4..d23e9ba 100644 --- a/src/components/CodeBox.tsx +++ b/src/components/CodeBox.tsx @@ -1,7 +1,7 @@ -import React, { ReactNode } from 'react'; -import styled from 'styled-components'; -import { codeBoxStyles } from '../theme'; -import { Code } from './Typography'; +import React, { ReactNode } from "react"; +import styled from "styled-components"; +import { codeBoxStyles } from "../theme"; +import { Code } from "./Typography"; export interface CodeBoxProps extends React.HTMLAttributes { code: string; diff --git a/src/components/ForkMe.tsx b/src/components/ForkMe.tsx index 164bf09..ee7fc3e 100644 --- a/src/components/ForkMe.tsx +++ b/src/components/ForkMe.tsx @@ -1,12 +1,12 @@ -import React from 'react'; -import styled from 'styled-components'; +import React from "react"; +import styled from "styled-components"; import { forkMeStyles, forkMeStylesFork, forkMeStylesImages, forkMeStylesLink, - forkMeStylesText -} from '../theme'; + forkMeStylesText, +} from "../theme"; export interface ForkMeProps extends React.HTMLAttributes {} @@ -19,8 +19,8 @@ const ForkMe = ({ className }: ForkMeProps) => (
{/**/} - Fork this example project on{' '} - + Fork this example project on{" "} + {/**/} GitHub! diff --git a/src/components/LinkButton.tsx b/src/components/LinkButton.tsx index 15a2d09..ad400fe 100644 --- a/src/components/LinkButton.tsx +++ b/src/components/LinkButton.tsx @@ -1,7 +1,7 @@ -import React, { ReactNode } from 'react'; -import styled from 'styled-components'; -import { linkButtonStyles, LinkButtonStyles } from '../theme'; -import cn from 'classnames'; +import React, { ReactNode } from "react"; +import styled from "styled-components"; +import { linkButtonStyles, LinkButtonStyles } from "../theme"; +import cn from "classnames"; export interface LinkButtonProps extends React.AnchorHTMLAttributes, @@ -20,7 +20,7 @@ const LinkButton = ({ helper, className, ...props }: LinkButtonProps) => ( } }} aria-disabled={props.disabled} - className={cn('linkButton', { disabled: props.disabled })} + className={cn("linkButton", { disabled: props.disabled })} {...props} /> {helper && {helper}} diff --git a/src/components/TextInput.tsx b/src/components/TextInput.tsx index 925b299..87b82b5 100644 --- a/src/components/TextInput.tsx +++ b/src/components/TextInput.tsx @@ -1,12 +1,12 @@ -import React, { ComponentType, InputHTMLAttributes, ReactNode } from 'react'; -import styled, { StyledComponent } from 'styled-components'; +import React, { ComponentType, InputHTMLAttributes, ReactNode } from "react"; +import styled, { StyledComponent } from "styled-components"; import { textInputStyles, typographyCaptionStyles, typographyH3Styles, ThemeProps, - TextInputProps as StyledTextInputProps -} from '../theme'; + TextInputProps as StyledTextInputProps, +} from "../theme"; export interface TextInputProps extends React.InputHTMLAttributes, @@ -37,12 +37,12 @@ const TextInput = ({ title, subtitle, disabled, - type = 'text', + type = "text", ...props }: TextInputProps) => { let state = props.state; if (disabled) { - state = 'disabled'; + state = "disabled"; } return ( diff --git a/src/components/Typography.tsx b/src/components/Typography.tsx index b9d5591..8f57597 100644 --- a/src/components/Typography.tsx +++ b/src/components/Typography.tsx @@ -1,5 +1,5 @@ -import React, { HTMLAttributes, ReactNode } from 'react'; -import styled, { ThemeProvider } from 'styled-components'; +import React, { HTMLAttributes, ReactNode } from "react"; +import styled, { ThemeProvider } from "styled-components"; import { theme, typographyH1Styles, @@ -10,8 +10,8 @@ import { typographyButtonStyles, typographyCodeStyles, typographyCaptionStyles, - typographyLinkStyles -} from '../theme'; + typographyLinkStyles, +} from "../theme"; const StyledH1 = styled.h1(typographyH1Styles); const StyledH2 = styled.h2(typographyH2Styles); diff --git a/src/components/index.tsx b/src/components/index.tsx index b5210e2..24944b2 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -1,15 +1,15 @@ -import Button from './Button'; -import LinkButton from './LinkButton'; -import Checkbox from './Checkbox'; -import CodeBox from './CodeBox'; -import ForkMe from './ForkMe'; -import Card from './Card'; -import CardTitle from './CardTitle'; -import TextInput from './TextInput'; -import Alert from './Alert'; -import AlertContent from './AlertContent'; +import Button from "./Button"; +import LinkButton from "./LinkButton"; +import Checkbox from "./Checkbox"; +import CodeBox from "./CodeBox"; +import ForkMe from "./ForkMe"; +import Card from "./Card"; +import CardTitle from "./CardTitle"; +import TextInput from "./TextInput"; +import Alert from "./Alert"; +import AlertContent from "./AlertContent"; -export * from './Typography'; +export * from "./Typography"; export { Button, @@ -21,5 +21,5 @@ export { TextInput, Alert, LinkButton, - AlertContent + AlertContent, }; diff --git a/src/index.ts b/src/index.ts index 3635e6c..d8fb5b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,4 @@ -export * from './theme'; -export * from './components'; +// Copyright © 2022 Ory Corp + +export * from "./theme"; +export * from "./components"; diff --git a/src/stories/Button.stories.tsx b/src/stories/Button.stories.tsx index 5e3c1c1..4376978 100644 --- a/src/stories/Button.stories.tsx +++ b/src/stories/Button.stories.tsx @@ -1,14 +1,14 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; -import Button, { ButtonProps } from '../components/Button'; -import { Container, Spacer } from './storyhelper'; -import { Caption, Link as StyledLink } from '../components/Typography'; +import Button, { ButtonProps } from "../components/Button"; +import { Container, Spacer } from "./storyhelper"; +import { Caption, Link as StyledLink } from "../components/Typography"; const meta: Meta = { - title: 'Button', - component: Button + title: "Button", + component: Button, }; const Template: Story = (args: ButtonProps) => ( @@ -19,7 +19,7 @@ const Template: Story = (args: ButtonProps) => ( export const Playground = Template.bind({}); Playground.args = { - children: 'Default Text' + children: "Default Text", }; export const Size = () => ( @@ -88,7 +88,7 @@ export const Disabled = () => ( export const Helper = () => { const message = ( - By creating an account, you agree to the{' '} + By creating an account, you agree to the{" "} { > Terms of Service - . For more information about privacy practices, see the{' '} + . For more information about privacy practices, see the{" "} = (args: CardProps) => ( diff --git a/src/stories/Checkbox.stories.tsx b/src/stories/Checkbox.stories.tsx index 6587fee..17d0f23 100644 --- a/src/stories/Checkbox.stories.tsx +++ b/src/stories/Checkbox.stories.tsx @@ -1,12 +1,12 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; -import { Container, Spacer } from './storyhelper'; -import Checkbox, { CheckboxProps } from '../components/Checkbox'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; +import { Container, Spacer } from "./storyhelper"; +import Checkbox, { CheckboxProps } from "../components/Checkbox"; const meta: Meta = { - title: 'Checkbox', - component: Checkbox + title: "Checkbox", + component: Checkbox, }; const Template: Story = (args: CheckboxProps) => ( @@ -17,7 +17,7 @@ const Template: Story = (args: CheckboxProps) => ( export const Playground = Template.bind({}); Playground.args = { - label: 'Send me occasional updates and announcements with newsletters' + label: "Send me occasional updates and announcements with newsletters", }; export const CheckboxWithTitleDescription = () => ( diff --git a/src/stories/CodeBox.stories.tsx b/src/stories/CodeBox.stories.tsx index 1c7e2d6..c2eb4bc 100644 --- a/src/stories/CodeBox.stories.tsx +++ b/src/stories/CodeBox.stories.tsx @@ -1,12 +1,12 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; -import { Container, Spacer } from './storyhelper'; -import CodeBox, { CodeBoxProps } from '../components/CodeBox'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; +import { Container, Spacer } from "./storyhelper"; +import CodeBox, { CodeBoxProps } from "../components/CodeBox"; const meta: Meta = { - title: 'CodeBox', - component: CodeBox + title: "CodeBox", + component: CodeBox, }; const Template: Story = (args: CodeBoxProps) => ( @@ -19,7 +19,7 @@ export const Playground = Template.bind({}); Playground.args = { code: `HTTP 1.0 /example Authorization: foo-bar -Cookie: Yummy!` +Cookie: Yummy!`, }; export const CheckboxWithTitleDescription = () => ( diff --git a/src/stories/ForkMe.stories.tsx b/src/stories/ForkMe.stories.tsx index fa10ec7..a621208 100644 --- a/src/stories/ForkMe.stories.tsx +++ b/src/stories/ForkMe.stories.tsx @@ -1,13 +1,13 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; -import { Container, Spacer } from './storyhelper'; -import CodeBox, { CodeBoxProps } from '../components/CodeBox'; -import ForkMe, { ForkMeProps } from '../components/ForkMe'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; +import { Container, Spacer } from "./storyhelper"; +import CodeBox, { CodeBoxProps } from "../components/CodeBox"; +import ForkMe, { ForkMeProps } from "../components/ForkMe"; const meta: Meta = { - title: 'Fork Me', - component: ForkMe + title: "Fork Me", + component: ForkMe, }; const Template: Story = (args) => ( diff --git a/src/stories/LinkButton.stories.tsx b/src/stories/LinkButton.stories.tsx index 0ef2157..6c8bc10 100644 --- a/src/stories/LinkButton.stories.tsx +++ b/src/stories/LinkButton.stories.tsx @@ -1,14 +1,14 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; -import LinkButton, { LinkButtonProps } from '../components/LinkButton'; -import { Container, Spacer } from './storyhelper'; -import { Caption, Link as StyledLink } from '../components/Typography'; +import LinkButton, { LinkButtonProps } from "../components/LinkButton"; +import { Container, Spacer } from "./storyhelper"; +import { Caption, Link as StyledLink } from "../components/Typography"; const meta: Meta = { - title: 'LinkButton', - component: LinkButton + title: "LinkButton", + component: LinkButton, }; const Template: Story = (args: LinkButtonProps) => ( @@ -19,7 +19,7 @@ const Template: Story = (args: LinkButtonProps) => ( export const Playground = Template.bind({}); Playground.args = { - children: 'Default Text' + children: "Default Text", }; export const Size = () => ( @@ -96,7 +96,7 @@ export const Disabled = () => ( export const Helper = () => { const message = ( - By creating an account, you agree to the{' '} + By creating an account, you agree to the{" "} { > Terms of Service - . For more information about privacy practices, see the{' '} + . For more information about privacy practices, see the{" "} = (args) => ( @@ -18,7 +18,7 @@ const Template: Story = (args) => ( export const Playground = Template.bind({}); Playground.args = { - value: 'Default Text' + value: "Default Text", }; export const Default = () => ( diff --git a/src/stories/Typography.stories.tsx b/src/stories/Typography.stories.tsx index a9394fb..2c24c06 100644 --- a/src/stories/Typography.stories.tsx +++ b/src/stories/Typography.stories.tsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Meta } from '@storybook/react'; -import { Story } from '@storybook/react/types-6-0'; +import React from "react"; +import { Meta } from "@storybook/react"; +import { Story } from "@storybook/react/types-6-0"; -import { Container, HR } from './storyhelper'; +import { Container, HR } from "./storyhelper"; import { H1, H2, @@ -12,11 +12,11 @@ import { Link as StyledLink, P, B, - Lead -} from '../components/Typography'; + Lead, +} from "../components/Typography"; const meta: Meta = { - title: 'Typography' + title: "Typography", }; const Template: Story<{}> = () => ( @@ -50,7 +50,7 @@ const Template: Story<{}> = () => ( export const Typography = Template.bind({}); Typography.args = { - children: 'Text' + children: "Text", }; export const Links: Story = () => ( diff --git a/src/stories/storyhelper.tsx b/src/stories/storyhelper.tsx index df61198..6a9ce86 100644 --- a/src/stories/storyhelper.tsx +++ b/src/stories/storyhelper.tsx @@ -1,12 +1,12 @@ -import React, { ReactNode } from 'react'; -import { GlobalStyle } from '../theme/globalStyles'; -import { ThemeProvider } from 'styled-components'; -import { theme } from '../theme'; +import React, { ReactNode } from "react"; +import { GlobalStyle } from "../theme/globalStyles"; +import { ThemeProvider } from "styled-components"; +import { theme } from "../theme"; export const Spacer = ({ children }: { children: ReactNode }) => (
{children} @@ -15,12 +15,12 @@ export const Spacer = ({ children }: { children: ReactNode }) => ( export const Container = ({ children, - width = 260 + width = 260, }: { children: ReactNode; width?: number; }) => ( -
+
{children} @@ -31,11 +31,11 @@ export const Container = ({ export const HR = () => (
); diff --git a/src/theme/alertStyles.ts b/src/theme/alertStyles.ts index 74d26fe..da657c8 100644 --- a/src/theme/alertStyles.ts +++ b/src/theme/alertStyles.ts @@ -1,12 +1,14 @@ -import { ThemeProps } from './helpers'; +// Copyright © 2022 Ory Corp + +import { ThemeProps } from "./helpers"; export interface AlertStyles extends ThemeProps { - severity?: 'error' | 'info'; + severity?: "error" | "info"; } -export const alertStyles = ({ theme, severity = 'info' }: AlertStyles) => ` -border: 1px solid ${severity === 'info' ? theme.green30 : theme.red30}; -color: ${severity === 'info' ? theme.grey100 : theme.red60}; +export const alertStyles = ({ theme, severity = "info" }: AlertStyles) => ` +border: 1px solid ${severity === "info" ? theme.green30 : theme.red30}; +color: ${severity === "info" ? theme.grey100 : theme.red60}; border-radius: 5px; padding: 5px; margin: 10px auto; diff --git a/src/theme/buttonStyles.ts b/src/theme/buttonStyles.ts index 5d01279..8ec427e 100644 --- a/src/theme/buttonStyles.ts +++ b/src/theme/buttonStyles.ts @@ -1,4 +1,6 @@ -import { ThemeProps, typographyButtonStyles, wrapCss } from './index'; +// Copyright © 2022 Ory Corp + +import { ThemeProps, typographyButtonStyles, wrapCss } from "./index"; export interface ButtonStyles extends ThemeProps { big?: boolean; @@ -9,7 +11,7 @@ export const buttonStyles = ({ big, theme }: ButtonStyles) => ` ${typographyButtonStyles({ theme })} & .button { - line-height: ${!big ? '20px' : '30px'}; + line-height: ${!big ? "20px" : "30px"}; color: ${theme.grey0}; border-radius: ${theme.borderRadius}; @@ -51,7 +53,7 @@ ${typographyButtonStyles({ theme })} `; export const cssButtonStyles = (props: ThemeProps) => - wrapCss('input-button', buttonStyles(props)); + wrapCss("input-button", buttonStyles(props)); export const cssButtonStylesBig = (props: ThemeProps) => - wrapCss('input-button-big', buttonStyles({ ...props, big: true })); + wrapCss("input-button-big", buttonStyles({ ...props, big: true })); diff --git a/src/theme/cardStyles.ts b/src/theme/cardStyles.ts index bcd0a45..6267ce5 100644 --- a/src/theme/cardStyles.ts +++ b/src/theme/cardStyles.ts @@ -1,4 +1,6 @@ -import { ThemeProps } from './index'; +// Copyright © 2022 Ory Corp + +import { ThemeProps } from "./index"; export interface CardStyles extends ThemeProps { wide?: boolean; @@ -11,7 +13,7 @@ border: 1px solid ${theme.grey10}; display: flex; flex-direction: column; align-items: stretch; -width: ${wide ? '680' : '336'}px; +width: ${wide ? "680" : "336"}px; margin: 0 auto; padding: 20px; `; diff --git a/src/theme/checkboxStyles.ts b/src/theme/checkboxStyles.ts index 9c28e23..f7b9a7d 100644 --- a/src/theme/checkboxStyles.ts +++ b/src/theme/checkboxStyles.ts @@ -1,9 +1,11 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyH3Styles, typographyParagraphStyles, - wrapCss -} from './index'; + wrapCss, +} from "./index"; export const checkboxStyles = ({ theme }: ThemeProps) => ` margin-bottom: 14px; @@ -68,4 +70,4 @@ margin-bottom: 14px; `; export const cssCheckboxStyles = (props: ThemeProps) => - wrapCss('checkbox', checkboxStyles(props)); + wrapCss("checkbox", checkboxStyles(props)); diff --git a/src/theme/codeBoxStyles.ts b/src/theme/codeBoxStyles.ts index cd6299a..9c933ba 100644 --- a/src/theme/codeBoxStyles.ts +++ b/src/theme/codeBoxStyles.ts @@ -1,4 +1,6 @@ -import { ThemeProps, wrapCss } from './index'; +// Copyright © 2022 Ory Corp + +import { ThemeProps, wrapCss } from "./index"; export const codeBoxStyles = ({ theme }: ThemeProps) => ` background-color: ${theme.grey70}; @@ -9,4 +11,4 @@ overflow-wrap: break-word; `; export const cssCodeBoxStyles = (props: ThemeProps) => - wrapCss('code-box', codeBoxStyles(props)); + wrapCss("code-box", codeBoxStyles(props)); diff --git a/src/theme/forkMeStyles.ts b/src/theme/forkMeStyles.ts index 313913e..9cb87fc 100644 --- a/src/theme/forkMeStyles.ts +++ b/src/theme/forkMeStyles.ts @@ -1,9 +1,11 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyH3Styles, typographyLinkStyles, - wrapCss -} from './index'; + wrapCss, +} from "./index"; export const forkMeStylesText = (props: ThemeProps) => ` ${typographyH3Styles(props)} @@ -12,7 +14,7 @@ export const forkMeStylesText = (props: ThemeProps) => ` `; export const cssForkMeStylesText = (props: ThemeProps) => - wrapCss('fork-me-text', forkMeStylesText(props)); + wrapCss("fork-me-text", forkMeStylesText(props)); export const forkMeStylesImages = () => ` padding: 9px; @@ -21,7 +23,7 @@ export const forkMeStylesImages = () => ` `; export const cssForkMeStylesImages = (props: ThemeProps) => - wrapCss('fork-me-image', forkMeStylesImages()); + wrapCss("fork-me-image", forkMeStylesImages()); export const forkMeStylesFork = () => ` height: 14px; @@ -29,7 +31,7 @@ export const forkMeStylesFork = () => ` `; export const cssForkMeStylesFork = (props: ThemeProps) => - wrapCss('fork-me-fork', forkMeStylesFork()); + wrapCss("fork-me-fork", forkMeStylesFork()); export const forkMeStylesLink = (props: ThemeProps) => { let css = ` @@ -48,7 +50,7 @@ export const forkMeStylesLink = (props: ThemeProps) => { flex-direction: row; `; - if (props.theme.platform !== 'react-native') { + if (props.theme.platform !== "react-native") { css += ` &.fake-visited, &:visited { @@ -70,7 +72,7 @@ export const forkMeStylesLink = (props: ThemeProps) => { }; export const cssForkMeStylesLink = (props: ThemeProps) => - wrapCss('fork-me-link', forkMeStylesLink(props)); + wrapCss("fork-me-link", forkMeStylesLink(props)); export const forkMeStyles = ({ theme }: ThemeProps) => { let css = ` @@ -82,7 +84,7 @@ export const forkMeStyles = ({ theme }: ThemeProps) => { justify-content: space-between; flex-direction: row; `; - if (theme.platform === 'react') { + if (theme.platform === "react") { css += `box-sizing: border-box; `; } @@ -90,4 +92,4 @@ export const forkMeStyles = ({ theme }: ThemeProps) => { }; export const cssForkMeStyles = (props: ThemeProps) => - wrapCss('fork-me', forkMeStyles(props)); + wrapCss("fork-me", forkMeStyles(props)); diff --git a/src/theme/globalStyles.ts b/src/theme/globalStyles.ts index 2a11c56..7ba25e2 100644 --- a/src/theme/globalStyles.ts +++ b/src/theme/globalStyles.ts @@ -1,6 +1,8 @@ -import { createGlobalStyle } from 'styled-components'; -import normalize from './normalizeStyles'; -import { ThemeProps } from './helpers'; +// Copyright © 2022 Ory Corp + +import { createGlobalStyle } from "styled-components"; +import normalize from "./normalizeStyles"; +import { ThemeProps } from "./helpers"; export const globalStyles = ({ theme }: ThemeProps) => ` ${normalize} diff --git a/src/theme/helpers.ts b/src/theme/helpers.ts index 8ff8cdc..c5c6e3f 100644 --- a/src/theme/helpers.ts +++ b/src/theme/helpers.ts @@ -1,51 +1,53 @@ -import { ThemeProps as StyledThemeProps } from 'styled-components'; +// Copyright © 2022 Ory Corp + +import { ThemeProps as StyledThemeProps } from "styled-components"; export const theme = { - grey0: '#F9F9FA', - grey5: '#F0F0F1', - grey10: '#E1E1E3', - grey30: '#B4B4BB', - grey60: '#5A5B6A', - grey70: '#4A4B57', - grey100: '#19191D', + grey0: "#F9F9FA", + grey5: "#F0F0F1", + grey10: "#E1E1E3", + grey30: "#B4B4BB", + grey60: "#5A5B6A", + grey70: "#4A4B57", + grey100: "#19191D", - blue30: '#9DC2FF', - blue60: '#2979FF', - blue70: '#2264D1', + blue30: "#9DC2FF", + blue60: "#2979FF", + blue70: "#2264D1", - green30: '#A9D3AB', - green60: '#43A047', - green70: '#37833B', + green30: "#A9D3AB", + green60: "#43A047", + green70: "#37833B", - red30: '#FAA9A3', - red60: '#F44336', - red70: '#C8372D', + red30: "#FAA9A3", + red60: "#F44336", + red70: "#C8372D", - blueGrey30: '#B4BBE2', - blueGrey60: '#97A0D6', + blueGrey30: "#B4BBE2", + blueGrey60: "#97A0D6", - primaryAccent: '#FF80FF', + primaryAccent: "#FF80FF", - primary30: '#F6A8C2', - primary60: '#EC407A', - primary70: '#C23564', + primary30: "#F6A8C2", + primary60: "#EC407A", + primary70: "#C23564", - borderRadius: '4px', + borderRadius: "4px", regularFont300: "'Rubik', sans-serif", regularFont400: "'Rubik', sans-serif", regularFont500: "'Rubik', sans-serif", - codeFont400: "'Roboto Mono', sans-serif" + codeFont400: "'Roboto Mono', sans-serif", }; export type Theme = typeof theme & { - platform?: 'react-native' | 'react'; + platform?: "react-native" | "react"; }; export type ThemeProps = StyledThemeProps; export function wrapCss(className: string, css: string) { - return `${'.' + className} { + return `${"." + className} { ${css} }`; } diff --git a/src/theme/index.ts b/src/theme/index.ts index 53db955..f960438 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,13 +1,15 @@ -export * from './buttonStyles'; -export * from './linkButtonStyles'; -export * from './typographyStyles'; -export * from './textInputStyles'; -export * from './checkboxStyles'; -export * from './codeBoxStyles'; -export * from './messageStyles'; -export * from './forkMeStyles'; -export * from './helpers'; -export * from './normalizeStyles'; -export * from './globalStyles'; -export * from './alertStyles'; -export * from './cardStyles'; +// Copyright © 2022 Ory Corp + +export * from "./buttonStyles"; +export * from "./linkButtonStyles"; +export * from "./typographyStyles"; +export * from "./textInputStyles"; +export * from "./checkboxStyles"; +export * from "./codeBoxStyles"; +export * from "./messageStyles"; +export * from "./forkMeStyles"; +export * from "./helpers"; +export * from "./normalizeStyles"; +export * from "./globalStyles"; +export * from "./alertStyles"; +export * from "./cardStyles"; diff --git a/src/theme/linkButtonStyles.ts b/src/theme/linkButtonStyles.ts index ba6d2d6..c21a693 100644 --- a/src/theme/linkButtonStyles.ts +++ b/src/theme/linkButtonStyles.ts @@ -1,4 +1,6 @@ -import { ThemeProps, typographyButtonStyles, wrapCss } from './index'; +// Copyright © 2022 Ory Corp + +import { ThemeProps, typographyButtonStyles, wrapCss } from "./index"; export interface LinkButtonStyles extends ThemeProps { big?: boolean; @@ -11,7 +13,7 @@ box-sizing: border-box; & .linkButton { box-sizing: border-box; - line-height: ${!big ? '20px' : '30px'}; + line-height: ${!big ? "20px" : "30px"}; color: ${theme.grey0}; border-radius: ${theme.borderRadius}; @@ -69,7 +71,7 @@ box-sizing: border-box; `; export const cssLinkButtonStyles = (props: ThemeProps) => - wrapCss('input-linkButton', linkButtonStyles(props)); + wrapCss("input-linkButton", linkButtonStyles(props)); export const cssLinkButtonStylesBig = (props: ThemeProps) => - wrapCss('input-linkButton-big', linkButtonStyles({ ...props, big: true })); + wrapCss("input-linkButton-big", linkButtonStyles({ ...props, big: true })); diff --git a/src/theme/messageStyles.ts b/src/theme/messageStyles.ts index eb31adc..076e870 100644 --- a/src/theme/messageStyles.ts +++ b/src/theme/messageStyles.ts @@ -1,9 +1,11 @@ +// Copyright © 2022 Ory Corp + import { codeBoxStyles, ThemeProps, typographyH3Styles, - wrapCss -} from './index'; + wrapCss, +} from "./index"; export const messageStyles = (props: ThemeProps) => ` ${typographyH3Styles(props)} @@ -16,4 +18,4 @@ export const messageStyles = (props: ThemeProps) => ` `; export const cssMessageStyles = (props: ThemeProps) => - wrapCss('message', messageStyles(props)); + wrapCss("message", messageStyles(props)); diff --git a/src/theme/normalizeStyles.ts b/src/theme/normalizeStyles.ts index 881b773..c09be57 100644 --- a/src/theme/normalizeStyles.ts +++ b/src/theme/normalizeStyles.ts @@ -1,4 +1,6 @@ -import { css } from 'styled-components'; +// Copyright © 2022 Ory Corp + +import { css } from "styled-components"; export const cssNormalize = ` /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ diff --git a/src/theme/textInputStyles.ts b/src/theme/textInputStyles.ts index d46eabc..0ab14b3 100644 --- a/src/theme/textInputStyles.ts +++ b/src/theme/textInputStyles.ts @@ -1,35 +1,37 @@ +// Copyright © 2022 Ory Corp + import { messageStyles, ThemeProps, typographyCaptionStyles, typographyH3Styles, - wrapCss -} from './index'; + wrapCss, +} from "./index"; export interface TextInputProps { help?: boolean; - state?: 'success' | 'error' | 'disabled'; + state?: "success" | "error" | "disabled"; } type ColorFunc = (props: ThemeProps & TextInputProps) => string; const textColorForState: ColorFunc = ({ state, theme }) => { switch (state) { - case 'success': + case "success": return `color: ${theme.green60};`; - case 'error': + case "error": return `color: ${theme.red60};`; } - return ''; + return ""; }; const borderColorForState: ColorFunc = ({ state, theme }) => { switch (state) { - case 'disabled': - return 'transparent'; - case 'success': + case "disabled": + return "transparent"; + case "success": return theme.green60; - case 'error': + case "error": return theme.red60; } return theme.grey30; @@ -37,10 +39,10 @@ const borderColorForState: ColorFunc = ({ state, theme }) => { const backgroundColorForState: ColorFunc = ({ state, theme }) => { switch (state) { - case 'disabled': + case "disabled": return theme.grey10; } - return 'transparent'; + return "transparent"; }; export const textInputTitleStyles: ColorFunc = (props) => ` @@ -49,7 +51,7 @@ export const textInputTitleStyles: ColorFunc = (props) => ` `; export const cssTextInputTitleStyles = (props: ThemeProps) => - wrapCss('text-input-title', textInputTitleStyles(props)); + wrapCss("text-input-title", textInputTitleStyles(props)); export const textInputSubtitleStyles: ColorFunc = (props) => ` ${typographyCaptionStyles(props)} @@ -57,7 +59,7 @@ export const textInputSubtitleStyles: ColorFunc = (props) => ` margin-bottom: 15px; `; export const cssTextInputSubtitleStyles = (props: ThemeProps) => - wrapCss('text-input-subtitle', textInputSubtitleStyles(props)); + wrapCss("text-input-subtitle", textInputSubtitleStyles(props)); export const textInputStyles: ColorFunc = (props) => { const { theme, help, state } = props; @@ -71,13 +73,13 @@ export const textInputStyles: ColorFunc = (props) => { font-style: normal; font-size: 14px; - color: ${state === 'disabled' ? theme.grey30 : theme.grey70}; + color: ${state === "disabled" ? theme.grey30 : theme.grey70}; width: 100%; padding: 5px 12px; margin-top: 7px; - margin-bottom: ${!help ? '14px' : '7px'}; + margin-bottom: ${!help ? "14px" : "7px"}; border: 1px solid ${borderColorForState(props)}; border-radius: ${theme.borderRadius}; @@ -86,7 +88,7 @@ export const textInputStyles: ColorFunc = (props) => { overflow: visible; `; - if (theme.platform !== 'react-native') { + if (theme.platform !== "react-native") { css += ` outline: none; @@ -106,4 +108,4 @@ export const textInputStyles: ColorFunc = (props) => { }; export const cssTextInputStyles = (props: ThemeProps) => - wrapCss('text-input', textInputStyles(props)); + wrapCss("text-input", textInputStyles(props)); diff --git a/src/theme/typographyStyles.ts b/src/theme/typographyStyles.ts index 3a3e950..67e0d80 100644 --- a/src/theme/typographyStyles.ts +++ b/src/theme/typographyStyles.ts @@ -1,8 +1,10 @@ -import { ThemeProps, wrapCss } from './index'; +// Copyright © 2022 Ory Corp + +import { ThemeProps, wrapCss } from "./index"; const geometricPrecision = ({ theme }: ThemeProps) => - theme.platform === 'react-native' - ? '' + theme.platform === "react-native" + ? "" : `text-rendering: geometricPrecision; `; @@ -16,7 +18,7 @@ line-height: 40px; `; export const cssTypographyH1Styles = (props: ThemeProps) => - wrapCss('typography-h1', typographyH1Styles(props)); + wrapCss("typography-h1", typographyH1Styles(props)); export const typographyH2Styles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -28,7 +30,7 @@ line-height: 24px; `; export const cssTypographyH2Styles = (props: ThemeProps) => - wrapCss('typography-h2', typographyH2Styles(props)); + wrapCss("typography-h2", typographyH2Styles(props)); export const typographyH3Styles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -40,7 +42,7 @@ line-height: 20px; `; export const cssTypographyH3Styles = (props: ThemeProps) => - wrapCss('typography-h3', typographyH3Styles(props)); + wrapCss("typography-h3", typographyH3Styles(props)); export const typographyLeadStyles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -52,7 +54,7 @@ line-height: 24px; `; export const cssTypographyLeadStyles = (props: ThemeProps) => - wrapCss('typography-lead', typographyLeadStyles(props)); + wrapCss("typography-lead", typographyLeadStyles(props)); export const typographyParagraphStyles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -64,7 +66,7 @@ line-height: 20px; `; export const cssTypographyParagraphStyles = (props: ThemeProps) => - wrapCss('typography-paragraph', typographyParagraphStyles(props)); + wrapCss("typography-paragraph", typographyParagraphStyles(props)); export const typographyButtonStyles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -76,7 +78,7 @@ line-height: 20px; `; export const cssTypographyButtonStyles = (props: ThemeProps) => - wrapCss('typography-button', typographyButtonStyles(props)); + wrapCss("typography-button", typographyButtonStyles(props)); export const typographyCodeStyles = ({ theme }: ThemeProps) => ` ${geometricPrecision({ theme })} @@ -90,7 +92,7 @@ color: ${theme.grey0} `; export const cssTypographyCodeStyles = (props: ThemeProps) => - wrapCss('typography-code', typographyCodeStyles(props)); + wrapCss("typography-code", typographyCodeStyles(props)); export const typographyCaptionStyles = (props: ThemeProps) => ` ${geometricPrecision(props)} @@ -103,7 +105,7 @@ margin-bottom: 14px; `; export const cssTypographyCaptionStyles = (props: ThemeProps) => - wrapCss('typography-caption', typographyCaptionStyles(props)); + wrapCss("typography-caption", typographyCaptionStyles(props)); export const typographyLinkStyles = ({ theme }: ThemeProps) => { let css = `${geometricPrecision({ theme })} @@ -117,7 +119,7 @@ text-decoration: none; color: ${theme.primary60}; `; - if (theme.platform !== 'react-native') { + if (theme.platform !== "react-native") { css += ` &.fake-visited, &:visited { @@ -139,4 +141,4 @@ color: ${theme.primary60}; }; export const cssTypographyLinkStyles = (props: ThemeProps) => - wrapCss('typography-link', typographyLinkStyles(props)); + wrapCss("typography-link", typographyLinkStyles(props)); diff --git a/tsconfig.json b/tsconfig.json index 227f8a6..20fafaf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,11 +2,7 @@ "compilerOptions": { "target": "es5", "outDir": "lib", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "declaration": true, "declarationDir": "lib", "allowJs": true, @@ -22,11 +18,6 @@ "noEmit": true, "jsx": "react" }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "lib" - ] -} \ No newline at end of file + "include": ["src"], + "exclude": ["node_modules", "lib"] +} From 89576b4b1404451e7c5cf07309260c96010b6e2c Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Wed, 12 Oct 2022 19:44:16 -0500 Subject: [PATCH 2/6] update --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 379df58..ad50e5b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: # prints all make targets cat Makefile | grep '^[^ ]*:' | grep -v '^\.bin/' | grep -v '.SILENT:' | grep -v '^node_modules:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t .bin/ory: Makefile - curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.43 + curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.44 touch .bin/ory node_modules: package-lock.json From 7ad907dc5d7d64c6487df6e1d3b10501c78d1f7f Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Wed, 2 Nov 2022 15:52:16 -0500 Subject: [PATCH 3/6] chore: license headers --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9e6c75e..d89e05e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: # prints all make targets cat Makefile | grep '^[^ ]*:' | grep -v '^\.bin/' | grep -v '.SILENT:' | grep -v '^node_modules:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t .bin/ory: Makefile - curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.44 + curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.45 touch .bin/ory node_modules: package-lock.json From c5620d63503ba8c572cfe47731b55d6895202de6 Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Wed, 2 Nov 2022 16:10:47 -0500 Subject: [PATCH 4/6] chore: license headers --- .github/ISSUE_TEMPLATE/config.yml | 6 ++++-- .github/workflows/release.yml | 3 ++- .storybook/main.js | 2 ++ .storybook/preview.js | 2 +- css/express.js | 2 ++ src/index.ts | 2 ++ src/theme/alertStyles.ts | 2 ++ src/theme/buttonStyles.ts | 2 ++ src/theme/cardStyles.ts | 2 ++ src/theme/checkboxStyles.ts | 2 ++ src/theme/codeBoxStyles.ts | 2 ++ src/theme/forkMeStyles.ts | 2 ++ src/theme/globalStyles.ts | 2 ++ src/theme/helpers.ts | 2 ++ src/theme/index.ts | 2 ++ src/theme/linkButtonStyles.ts | 2 ++ src/theme/messageStyles.ts | 2 ++ src/theme/normalizeStyles.ts | 2 ++ src/theme/textInputStyles.ts | 2 ++ src/theme/typographyStyles.ts | 2 ++ 20 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 31a384d..7c49e4d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,8 +5,10 @@ blank_issues_enabled: false contact_links: - name: Ory Themes Forum url: https://github.com/orgs/ory/discussions - about: Please ask and answer questions here, show your implementations and + about: + Please ask and answer questions here, show your implementations and discuss ideas. - name: Ory Chat url: https://www.ory.sh/chat - about: Hang out with other Ory community members to ask and answer questions. + about: + Hang out with other Ory community members to ask and answer questions. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1f9a80..716c26a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ jobs: with: node-version: "14" - run: npm ci - - run: npm version --no-git-tag-version ${{ github.event.release.tag_name }} + - run: + npm version --no-git-tag-version ${{ github.event.release.tag_name }} - run: npm run build - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_AENEASR diff --git a/.storybook/main.js b/.storybook/main.js index 125917c..cd84386 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + module.exports = { stories: [ "../src/stories/**/*.stories.@(js|jsx|ts|tsx|mdx)", diff --git a/.storybook/preview.js b/.storybook/preview.js index 946c2ca..429ffd6 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -2,4 +2,4 @@ export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, -}; +} diff --git a/css/express.js b/css/express.js index 1aa3058..c25f5a4 100644 --- a/css/express.js +++ b/css/express.js @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + const postcss = require("postcss") const postcssPresetEnv = require("postcss-preset-env") diff --git a/src/index.ts b/src/index.ts index dc33ded..85661aa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,4 @@ +// Copyright © 2022 Ory Corp + export * from "./theme" export * from "./components" diff --git a/src/theme/alertStyles.ts b/src/theme/alertStyles.ts index 57e3db1..a02568a 100644 --- a/src/theme/alertStyles.ts +++ b/src/theme/alertStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps } from "./helpers" export interface AlertStyles extends ThemeProps { diff --git a/src/theme/buttonStyles.ts b/src/theme/buttonStyles.ts index d6c96ee..1a9a50f 100644 --- a/src/theme/buttonStyles.ts +++ b/src/theme/buttonStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyButtonStyles, wrapCss } from "./index" export interface ButtonStyles extends ThemeProps { diff --git a/src/theme/cardStyles.ts b/src/theme/cardStyles.ts index bed1584..874865c 100644 --- a/src/theme/cardStyles.ts +++ b/src/theme/cardStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps } from "./index" export interface CardStyles extends ThemeProps { diff --git a/src/theme/checkboxStyles.ts b/src/theme/checkboxStyles.ts index 0df437c..5ee6ae7 100644 --- a/src/theme/checkboxStyles.ts +++ b/src/theme/checkboxStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyH3Styles, diff --git a/src/theme/codeBoxStyles.ts b/src/theme/codeBoxStyles.ts index 15288ac..e236af4 100644 --- a/src/theme/codeBoxStyles.ts +++ b/src/theme/codeBoxStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, wrapCss } from "./index" export const codeBoxStyles = ({ theme }: ThemeProps) => ` diff --git a/src/theme/forkMeStyles.ts b/src/theme/forkMeStyles.ts index ec10b9c..943ff56 100644 --- a/src/theme/forkMeStyles.ts +++ b/src/theme/forkMeStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyH3Styles, diff --git a/src/theme/globalStyles.ts b/src/theme/globalStyles.ts index aea97db..0c93efb 100644 --- a/src/theme/globalStyles.ts +++ b/src/theme/globalStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { createGlobalStyle } from "styled-components" import normalize from "./normalizeStyles" import { ThemeProps } from "./helpers" diff --git a/src/theme/helpers.ts b/src/theme/helpers.ts index 9525404..5917a0a 100644 --- a/src/theme/helpers.ts +++ b/src/theme/helpers.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps as StyledThemeProps } from "styled-components" export const theme = { diff --git a/src/theme/index.ts b/src/theme/index.ts index 6c224f8..a7b6744 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + export * from "./buttonStyles" export * from "./linkButtonStyles" export * from "./typographyStyles" diff --git a/src/theme/linkButtonStyles.ts b/src/theme/linkButtonStyles.ts index 555acbc..9e2d336 100644 --- a/src/theme/linkButtonStyles.ts +++ b/src/theme/linkButtonStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, typographyButtonStyles, wrapCss } from "./index" export interface LinkButtonStyles extends ThemeProps { diff --git a/src/theme/messageStyles.ts b/src/theme/messageStyles.ts index e747fd2..1cdc8d8 100644 --- a/src/theme/messageStyles.ts +++ b/src/theme/messageStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { codeBoxStyles, ThemeProps, typographyH3Styles, wrapCss } from "./index" export const messageStyles = (props: ThemeProps) => ` diff --git a/src/theme/normalizeStyles.ts b/src/theme/normalizeStyles.ts index 1a09f9b..27b1b73 100644 --- a/src/theme/normalizeStyles.ts +++ b/src/theme/normalizeStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { css } from "styled-components" export const cssNormalize = ` diff --git a/src/theme/textInputStyles.ts b/src/theme/textInputStyles.ts index 15b5838..5ceb7eb 100644 --- a/src/theme/textInputStyles.ts +++ b/src/theme/textInputStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { messageStyles, ThemeProps, diff --git a/src/theme/typographyStyles.ts b/src/theme/typographyStyles.ts index b6073c7..cad4727 100644 --- a/src/theme/typographyStyles.ts +++ b/src/theme/typographyStyles.ts @@ -1,3 +1,5 @@ +// Copyright © 2022 Ory Corp + import { ThemeProps, wrapCss } from "./index" const geometricPrecision = ({ theme }: ThemeProps) => From 06ade604d959b62001c0e247de93ac7ff3505f20 Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Thu, 3 Nov 2022 06:12:45 -0500 Subject: [PATCH 5/6] chore: license headers --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d89e05e..28d4e9d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: # prints all make targets cat Makefile | grep '^[^ ]*:' | grep -v '^\.bin/' | grep -v '.SILENT:' | grep -v '^node_modules:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t .bin/ory: Makefile - curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.45 + curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.47 touch .bin/ory node_modules: package-lock.json From 989c40724dfaab6c56ac0c253882999a08921ffb Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Thu, 3 Nov 2022 06:21:04 -0500 Subject: [PATCH 6/6] chore: license headers --- .storybook/main.js | 1 + .storybook/preview.js | 1 + css/express.js | 1 + src/index.ts | 1 + src/theme/alertStyles.ts | 1 + src/theme/buttonStyles.ts | 1 + src/theme/cardStyles.ts | 1 + src/theme/checkboxStyles.ts | 1 + src/theme/codeBoxStyles.ts | 1 + src/theme/forkMeStyles.ts | 1 + src/theme/globalStyles.ts | 1 + src/theme/helpers.ts | 1 + src/theme/index.ts | 1 + src/theme/linkButtonStyles.ts | 1 + src/theme/messageStyles.ts | 1 + src/theme/normalizeStyles.ts | 1 + src/theme/textInputStyles.ts | 1 + src/theme/typographyStyles.ts | 1 + 18 files changed, 18 insertions(+) diff --git a/.storybook/main.js b/.storybook/main.js index cd84386..2585429 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 module.exports = { stories: [ diff --git a/.storybook/preview.js b/.storybook/preview.js index 429ffd6..c949f8a 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, diff --git a/css/express.js b/css/express.js index c25f5a4..9c93bda 100644 --- a/css/express.js +++ b/css/express.js @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 const postcss = require("postcss") const postcssPresetEnv = require("postcss-preset-env") diff --git a/src/index.ts b/src/index.ts index 85661aa..aa37044 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 export * from "./theme" export * from "./components" diff --git a/src/theme/alertStyles.ts b/src/theme/alertStyles.ts index a02568a..d44a38f 100644 --- a/src/theme/alertStyles.ts +++ b/src/theme/alertStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps } from "./helpers" diff --git a/src/theme/buttonStyles.ts b/src/theme/buttonStyles.ts index 1a9a50f..7e2e9d3 100644 --- a/src/theme/buttonStyles.ts +++ b/src/theme/buttonStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, typographyButtonStyles, wrapCss } from "./index" diff --git a/src/theme/cardStyles.ts b/src/theme/cardStyles.ts index 874865c..0ea8634 100644 --- a/src/theme/cardStyles.ts +++ b/src/theme/cardStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps } from "./index" diff --git a/src/theme/checkboxStyles.ts b/src/theme/checkboxStyles.ts index 5ee6ae7..18f81e3 100644 --- a/src/theme/checkboxStyles.ts +++ b/src/theme/checkboxStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, diff --git a/src/theme/codeBoxStyles.ts b/src/theme/codeBoxStyles.ts index e236af4..12896a3 100644 --- a/src/theme/codeBoxStyles.ts +++ b/src/theme/codeBoxStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, wrapCss } from "./index" diff --git a/src/theme/forkMeStyles.ts b/src/theme/forkMeStyles.ts index 943ff56..a0fc4ef 100644 --- a/src/theme/forkMeStyles.ts +++ b/src/theme/forkMeStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, diff --git a/src/theme/globalStyles.ts b/src/theme/globalStyles.ts index 0c93efb..5de94f6 100644 --- a/src/theme/globalStyles.ts +++ b/src/theme/globalStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { createGlobalStyle } from "styled-components" import normalize from "./normalizeStyles" diff --git a/src/theme/helpers.ts b/src/theme/helpers.ts index 5917a0a..7ec41f6 100644 --- a/src/theme/helpers.ts +++ b/src/theme/helpers.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps as StyledThemeProps } from "styled-components" diff --git a/src/theme/index.ts b/src/theme/index.ts index a7b6744..a628d68 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 export * from "./buttonStyles" export * from "./linkButtonStyles" diff --git a/src/theme/linkButtonStyles.ts b/src/theme/linkButtonStyles.ts index 9e2d336..eb52c8b 100644 --- a/src/theme/linkButtonStyles.ts +++ b/src/theme/linkButtonStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, typographyButtonStyles, wrapCss } from "./index" diff --git a/src/theme/messageStyles.ts b/src/theme/messageStyles.ts index 1cdc8d8..ecf2da1 100644 --- a/src/theme/messageStyles.ts +++ b/src/theme/messageStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { codeBoxStyles, ThemeProps, typographyH3Styles, wrapCss } from "./index" diff --git a/src/theme/normalizeStyles.ts b/src/theme/normalizeStyles.ts index 27b1b73..a7d12ac 100644 --- a/src/theme/normalizeStyles.ts +++ b/src/theme/normalizeStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { css } from "styled-components" diff --git a/src/theme/textInputStyles.ts b/src/theme/textInputStyles.ts index 5ceb7eb..7607d5b 100644 --- a/src/theme/textInputStyles.ts +++ b/src/theme/textInputStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { messageStyles, diff --git a/src/theme/typographyStyles.ts b/src/theme/typographyStyles.ts index cad4727..4efe847 100644 --- a/src/theme/typographyStyles.ts +++ b/src/theme/typographyStyles.ts @@ -1,4 +1,5 @@ // Copyright © 2022 Ory Corp +// SPDX-License-Identifier: Apache-2.0 import { ThemeProps, wrapCss } from "./index"