This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from comfortdelgro/feature/refactor
- Loading branch information
Showing
193 changed files
with
18,123 additions
and
16,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
extends: ['@comfortdelgro'], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Bot | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CDG Zig Bot" | ||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup NodeJS 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Create Release Pull Request or Publish | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm run version | ||
publish: pnpm exec changeset publish | ||
commit: 'chore: release' | ||
title: 'A New Release' | ||
setupGitUser: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CDG_BOT_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.CDG_PUBLISHER_NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,26 @@ on: | |
|
||
jobs: | ||
build-and-deploy: | ||
name: Build and Deploy Storybook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup NodeJS 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Build 🔧 | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build-sb | ||
run: pnpm build | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import Theme from "../src/Theme"; | ||
import { defaultTheme } from "../src/utils"; | ||
import {Client as Styletron} from 'styletron-engine-atomic'; | ||
import {Client as Styletron} from 'styletron-engine-atomic' | ||
import {Theme} from '../src' | ||
import {defaultTheme} from '../src/utils' | ||
|
||
export const contexts = [ | ||
{ | ||
icon: "box", // a icon displayed in the Storybook toolbar to control contextual props | ||
title: "Themes", // an unique name of a contextual environment | ||
icon: 'box', // a icon displayed in the Storybook toolbar to control contextual props | ||
title: 'Themes', // an unique name of a contextual environment | ||
components: [Theme], | ||
params: [ | ||
// an array of params contains a set of predefined `props` for `components` | ||
{ name: "Default Theme", props: { theme: defaultTheme, engine: new Styletron() } }, | ||
{ | ||
name: 'Default Theme', | ||
props: {theme: defaultTheme, engine: new Styletron()}, | ||
}, | ||
// { name: "Dark Theme", props: { theme: darkTheme } } | ||
], | ||
options: { | ||
deep: true, // pass the `props` deeply into all wrapping components | ||
disable: false, // disable this contextual environment completely | ||
cancelable: false // allow this contextual environment to be opt-out optionally in toolbar | ||
} | ||
} | ||
]; | ||
cancelable: false, // allow this contextual environment to be opt-out optionally in toolbar | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
module.exports = { | ||
"stories": ["../src/**/*.stories.(js|mdx)"], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-contexts", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
stories: ['../src/**/*.stories.(js|mdx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-contexts', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
], | ||
"framework": "@storybook/react", | ||
"core": { | ||
"builder": "@storybook/builder-webpack5" | ||
} | ||
} | ||
framework: '@storybook/react', | ||
core: { | ||
builder: '@storybook/builder-webpack5', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { addDecorator } from "@storybook/react"; | ||
import { withContexts } from "@storybook/addon-contexts/react"; | ||
import { INITIAL_VIEWPORTS, MINIMAL_VIEWPORTS } from '@storybook/addon-viewport'; | ||
import { contexts } from "./contexts"; | ||
import {withContexts} from '@storybook/addon-contexts/react' | ||
import {MINIMAL_VIEWPORTS} from '@storybook/addon-viewport' | ||
import {addDecorator} from '@storybook/react' | ||
import {contexts} from './contexts' | ||
export const parameters = { | ||
viewport: { | ||
viewports: { ...MINIMAL_VIEWPORTS }, | ||
viewports: {...MINIMAL_VIEWPORTS}, | ||
}, | ||
}; | ||
|
||
addDecorator(withContexts(contexts)); | ||
} | ||
|
||
// @ts-ignore | ||
addDecorator(withContexts(contexts)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {defineBuildConfig} from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
entries: ['./src/index'], | ||
declaration: true, | ||
rollup: { | ||
emitCJS: true, | ||
inlineDependencies: true, | ||
}, | ||
}) |
Oops, something went wrong.