Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen-k committed May 25, 2024
0 parents commit c950204
Show file tree
Hide file tree
Showing 64 changed files with 23,090 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
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)
11 changes: 11 additions & 0 deletions .changeset/config.json
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": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
groups:
all:
patterns:
- '*'
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.13.1]
pnpm-version: [9.1.1]

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

- name: Install pnpm ${{ matrix.pnpm-version }}
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Test
run: pnpm test
42 changes: 42 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy storybook

on:
push:
branches:
- 'main'

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.13.1]
pnpm-version: [9.1.1]

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

- name: Install pnpm ${{ matrix.pnpm-version }}
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm build
path: ./apps/storybook/storybook-static
checkout: false
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
build
dist
storybook-static

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no changeset status
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"],
"**/*.{json,yml}": ["prettier --check --write"]
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.13.1
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"plugins": ["prettier-plugin-tailwindcss"]
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.experimental.useFlatConfig": true
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Kwan Jun Wen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
![TailwindCSS Neumorphism](/apps/storybook/src/stories/assets/thumbnail.png)

<h1 align="center">TailwindCSS Neumorphism</h1>

<p align="center">
<a href="https://github.com/junwen-k/tailwindcss-neumorphism-ui/actions">
<img
src="https://img.shields.io/github/actions/workflow/status/junwen-k/tailwindcss-neumorphism-ui/ci.yml?branch=main"
alt="Build Status"
/>
</a>
<a href="https://tailwindcss.com/">
<img
alt="Tailwind"
src="https://img.shields.io/badge/tailwindcss-v3.0+-0F172A?logo=tailwindcss&style=flat&labelColor=38bdf8&logoColor=ffffff"
/>
</a>
<a href="https://www.npmjs.com/package/tailwindcss-neumorphism-ui">
<img
src="https://img.shields.io/npm/dm/tailwindcss-neumorphism-ui"
alt="Total Downloads"
/>
</a>
<a
href="https://github.com/junwen-k/tailwindcss-neumorphism-ui/blob/master/LICENSE"
>
<img
src="https://img.shields.io/github/license/junwen-k/tailwindcss-neumorphism-ui"
alt="License"
/>
</a>
</p>

<br />

## Documentation

Visit [**documentation**](https://junwen-k.github.io/tailwindcss-neumorphism-ui) to get started.

## License

[MIT](/LICENSE)
39 changes: 39 additions & 0 deletions apps/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { join, dirname } from 'path'

import type { StorybookConfig } from '@storybook/react-vite'
import remarkGfm from 'remark-gfm'

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string) {
return dirname(require.resolve(join(value, 'package.json')))
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-onboarding'),
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@chromatic-com/storybook'),
getAbsolutePath('@storybook/addon-interactions'),
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm],
},
},
},
},
],
framework: getAbsolutePath('@storybook/react-vite') as StorybookConfig['framework'],
docs: {},
typescript: {
reactDocgen: 'react-docgen-typescript',
},
}
export default config
5 changes: 5 additions & 0 deletions apps/storybook/.storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<meta
name="description"
content="A plugin for Tailwind CSS that generates shadow utilities based on Neumorphism (Soft UI) design."
key="desc"
/>
9 changes: 9 additions & 0 deletions apps/storybook/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<link rel="preload" href="/GeistVariableVF.woff2" />

<style>
@font-face {
font-family: 'Geist';
font-style: normal;
src: url('/GeistVariableVF.woff2');
}
</style>
17 changes: 17 additions & 0 deletions apps/storybook/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import '../index.css'

import type { Preview } from '@storybook/react'

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
tags: ['autodocs'],
}

export default preview
1 change: 1 addition & 0 deletions apps/storybook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: checkout doc for full documentation
9 changes: 9 additions & 0 deletions apps/storybook/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--font-geist-sans: 'Geist';
}
}
Loading

0 comments on commit c950204

Please sign in to comment.