Skip to content

Commit

Permalink
Merge pull request #53 from brainstormforce/staging
Browse files Browse the repository at this point in the history
v0.0.2
  • Loading branch information
vrundakansara authored Sep 17, 2024
2 parents ebf55be + 32c744d commit b05e206
Show file tree
Hide file tree
Showing 87 changed files with 14,667 additions and 4,483 deletions.
25 changes: 20 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
// .eslintrc.mjs
module.exports = {
root: true,
extends: ["plugin:@wordpress/eslint-plugin/recommended-with-formatting"],
extends: [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting', "plugin:storybook/recommended" ],
settings: {
'import/resolver': {
node: {
extensions: [ '.js', '.jsx', '.ts', '.tsx' ],
},
alias: {
map: [
[ '@', './src' ],
[ '@/components', './src/components' ],
[ '@/utilities', './src/utilities' ],
],
extensions: [ '.js', '.jsx' ],
},
},
},
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ["@wordpress/babel-preset-default"],
presets: [ '@wordpress/babel-preset-default' ],
},
},
rules: {
"jsx-a11y/click-events-have-key-events": "off",
"react-hooks/exhaustive-deps": "off",
"jsx-a11y/label-has-associated-control": "off",
'jsx-a11y/click-events-have-key-events': 'off',
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/label-has-associated-control': 'off',
},
};
36 changes: 18 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "dev"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
target-branch: 'dev'
schedule:
interval: 'daily'

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
target-branch: "dev"
schedule:
interval: "daily"
# Maintain dependencies for npm
- package-ecosystem: 'npm'
directory: '/'
target-branch: 'dev'
schedule:
interval: 'daily'

# Maintain dependencies for Composer
- package-ecosystem: "composer"
target-branch: "dev"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for Composer
- package-ecosystem: 'composer'
target-branch: 'dev'
directory: '/'
schedule:
interval: 'daily'
29 changes: 29 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Chromatic"

on:
push:
branches:
- staging

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment.
run: npm install
- name: Run Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
zip: true
onlyChanged: true # 👈 Required option to enable TurboSnap
74 changes: 37 additions & 37 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@ on: pull_request

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
analysis:
runs-on: ubuntu-latest

strategy:
matrix:
node: ["18.15"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use desired version of NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Lint JS
if: always()
run: npm run lint:js

- name: Lint CSS
if: always()
run: npm run lint:css
analysis:
runs-on: ubuntu-latest

strategy:
matrix:
node: ['18.15']

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use desired version of NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Lint JS
if: always()
run: npm run lint:js

- name: Lint CSS
if: always()
run: npm run lint:css
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
dist/*.map
.DS_Store
.DS_Store
*storybook.log
storybook-static/*
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Import the default config file and expose it in the project root.
// Useful for editor integrations.

const config = require("@wordpress/prettier-config");
const config = require('@wordpress/prettier-config');

config.overrides = [
{
files: ["*.scss", "*.css"],
files: ['*.scss', '*.css'],
options: {
printWidth: 500,
singleQuote: false,
Expand Down
31 changes: 31 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import path from 'path';

/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: ["@storybook/addon-webpack5-compiler-swc", "@storybook/addon-onboarding", "@storybook/addon-links", "@storybook/addon-essentials", "@chromatic-com/storybook", "@storybook/addon-interactions"],
swc: () => ({
jsc: {
transform: {
react: {
runtime: 'automatic'
}
}
}
}),
framework: {
name: "@storybook/react-webpack5",
options: {},
},
core: {
builder: "webpack5",
},
webpackFinal: async (config) => {
config.resolve.alias = {
'@': path.resolve(__dirname, '..', 'src'),
};

return config;
},
};
export default config;
14 changes: 14 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type { import('@storybook/react').Preview } */
import '../dist/force-ui.css';
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
5 changes: 1 addition & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = {
presets: [
"@babel/preset-env",
"@babel/preset-react"
]
presets: [ '@babel/preset-env', '@babel/preset-react' ],
};
1 change: 1 addition & 0 deletions dist/force-ui-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/force-ui.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom'), 'version' => 'bb18901488b5453d1e86');
<?php return array('dependencies' => array('react', 'react-dom'), 'version' => '27e54a60318d13aa0c6c');
1 change: 1 addition & 0 deletions dist/force-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/force-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/utils/withTW.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '4114bc5c3397a0071e02');
<?php return array('dependencies' => array(), 'version' => 'f5765dea688f24fb260e');
2 changes: 1 addition & 1 deletion dist/utils/withTW.js

Large diffs are not rendered by default.

Loading

0 comments on commit b05e206

Please sign in to comment.