Skip to content

Commit

Permalink
Merge pull request #33 from xionhub/feature-ds
Browse files Browse the repository at this point in the history
Feature ds
  • Loading branch information
XionWCFM authored Mar 27, 2024
2 parents 7b63afb + 53e6353 commit 68c45d9
Show file tree
Hide file tree
Showing 15 changed files with 1,341 additions and 1,324 deletions.
Binary file added .DS_Store
Binary file not shown.
46 changes: 40 additions & 6 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Lint Test Build

on: [push]

jobs:
buildci:
test-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -11,14 +13,46 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install Dependencies
run: yarn cache clean && yarn install
run: yarn install

- name: Lint
run: yarn lint

test-unit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Code Quality Check and Testing
run: |
yarn lint
yarn test:all
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install Dependencies
run: yarn install

- name: Test
run: yarn test:all

test-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version-file: '.nvmrc'

- name: Install Dependencies
run: yarn cache clean && yarn install
run: yarn install

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/cache
.yarn/cache

node_modules
# Swap the comments on the following lines if you wish to use zero-installs
Expand All @@ -20,4 +20,4 @@ coverage
.ultra.cache.json
*storybook.log

.env.local
.env.local
1,856 changes: 915 additions & 941 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file added configs/.DS_Store
Binary file not shown.
Binary file added packages/.DS_Store
Binary file not shown.
16 changes: 8 additions & 8 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^1.2.22",
"@storybook/addon-essentials": "^8.0.0",
"@storybook/addon-interactions": "^8.0.0",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-interactions": "^8.0.4",
"@storybook/addon-links": "^8.0.0",
"@storybook/addon-onboarding": "^8.0.0",
"@storybook/blocks": "^8.0.0",
"@storybook/builder-vite": "^8.0.0",
"@storybook/react": "^8.0.0",
"@storybook/react-vite": "^8.0.0",
"@storybook/test": "^8.0.0",
"@storybook/blocks": "^8.0.4",
"@storybook/builder-vite": "^8.0.4",
"@storybook/react": "^8.0.4",
"@storybook/react-vite": "^8.0.4",
"@storybook/test": "^8.0.4",
"@types/react": "^18.2.39",
"@types/react-dom": "^18",
"@xionhub/rollup": "workspace:^",
Expand All @@ -56,7 +56,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^4.13.0",
"storybook": "^8.0.0",
"storybook": "^8.0.4",
"tailwindcss": "^3.4.1",
"tslib": "^2.6.2",
"typescript": "^5.4.2",
Expand Down
49 changes: 45 additions & 4 deletions packages/design-system/src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
import { ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react';

import { VariantProps, cva } from 'class-variance-authority';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ButtonCase {
loading?: boolean;
disabled?: boolean;
slot?: 'start' | 'end';
}
export interface ButtonProps extends ComponentPropsWithoutRef<'button'> {}

const buttonVariants = cva(` px-24 py-8 transition-colors duration-300`, {
variants: {
variant: {
primary: ` bg-primary-500 text-neutral-50 hover:bg-primary-600 active:bg-primary-700 `,
secondary: ``,
outline: ``,
},
rounded: {
default: '',
xs: ' rounded-xs',
sm: ' rounded-sm',
md: ' rounded-md',
xl: 'rounded-xl',
full: 'rounded-full',
},
size: {
full: ' w-full',
half: ' w-[50%]',
},

press: {
default: '',
press: ' active:translate-y-2 active:translate-x-2',
},
},
defaultVariants: {
variant: 'primary',
size: 'full',
rounded: 'default',
press: 'default',
},
});
type ButtonVariants = VariantProps<typeof buttonVariants>;

export interface ButtonProps extends ComponentPropsWithoutRef<'button'>, ButtonVariants {}

type ButtonRef = ElementRef<'button'>;

export const Button = forwardRef<ButtonRef, ButtonProps>(({ ...props }, ref) => {
return <button className={' px-24 text-white bg-primary-300'} {...props} ref={ref}></button>;
export const Button = forwardRef<ButtonRef, ButtonProps>(({ variant, rounded, size, press, ...props }, ref) => {
return (
<button className={buttonVariants({ variant, rounded, size, press })} {...props} ref={ref}>
buttondsa
</button>
);
});

Button.displayName = 'Button';
2 changes: 1 addition & 1 deletion packages/react-hook/.ultra.cache.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"dist":"1711336745711.891","CHANGELOG.md":"1d6a77eebbc3552a421083c41e8513d1920988a6","README.md":"56359b642f901d166b6c0d3cd7fda60beaf88bcd","__tests__/react-hook.test.tsx":"ff431818811d5ba81dc1c7bec3cf40eb7ef54574","esbuild.js":"0662568d46dffb9b1d5f4896e16f1fa16cedef88","package.json":"3a3ca80608f9a94690838afef9f1903ed3548e2a","src/debounce/index.ts":"a900885589fc35d8b02a1114185991daf3a03e5e","src/debounce/use-debounce.test.ts":"4cd46b82608e90adb62b6008eae951a161bf0e76","src/debounce/use-debounce.ts":"4febc1680d46c7e0391d14966f7fdf97bbcb189b","src/delay/index.ts":"2c169b64537d0ba3b12b71422dc5908964178565","src/delay/use-delay.test.ts":"1a11d1bf992168fc25ac43c1ad308ffcfdbce6ed","src/delay/use-delay.ts":"c68eab62eb1a6a6594fca266627b2ada38ea5c9b","src/index.ts":"38bdfa9a7e27570a8ef14d5358a53f6130d11ab4","src/loading/index.ts":"49d52a9599a3fabf2feee1da32a29a934a4e8f9a","src/loading/use-loading.ts":"a28a3af64b9dcc543c2dd23fc9acf991f8555a8c","src/throttle/index.ts":"633285bb5bfce8ea5d142f6714eb2b06ccb77fd1","src/throttle/use-throttle.test.ts":"54741523d71fd8f1a2b246ba547cc0070d761ee6","src/throttle/use-throttle.ts":"28ae2d5a7d717020721d38f856575b3b1284182b","tsconfig.json":"689ca1ded6044f50de8669ef8cd04b47f206de0f"},"deps":{"@xionhub/esbuild":0}}
{"files":{"dist":"1711418341393.9739","CHANGELOG.md":"4905fbdc05eb5c8d0567379e521849700654d129","README.md":"56359b642f901d166b6c0d3cd7fda60beaf88bcd","__tests__/react-hook.test.tsx":"ff431818811d5ba81dc1c7bec3cf40eb7ef54574","esbuild.js":"0662568d46dffb9b1d5f4896e16f1fa16cedef88","package.json":"d30cc6934f359dcb8453887e2a7adca63e566aa4","src/debounce/index.ts":"a900885589fc35d8b02a1114185991daf3a03e5e","src/debounce/use-debounce.test.ts":"4cd46b82608e90adb62b6008eae951a161bf0e76","src/debounce/use-debounce.ts":"4febc1680d46c7e0391d14966f7fdf97bbcb189b","src/delay/index.ts":"2c169b64537d0ba3b12b71422dc5908964178565","src/delay/use-delay.test.ts":"1a11d1bf992168fc25ac43c1ad308ffcfdbce6ed","src/delay/use-delay.ts":"c68eab62eb1a6a6594fca266627b2ada38ea5c9b","src/index.ts":"38bdfa9a7e27570a8ef14d5358a53f6130d11ab4","src/loading/index.ts":"49d52a9599a3fabf2feee1da32a29a934a4e8f9a","src/loading/use-loading.ts":"a28a3af64b9dcc543c2dd23fc9acf991f8555a8c","src/throttle/index.ts":"633285bb5bfce8ea5d142f6714eb2b06ccb77fd1","src/throttle/use-throttle.test.ts":"54741523d71fd8f1a2b246ba547cc0070d761ee6","src/throttle/use-throttle.ts":"28ae2d5a7d717020721d38f856575b3b1284182b","tsconfig.json":"689ca1ded6044f50de8669ef8cd04b47f206de0f"},"deps":{"@xionhub/esbuild":0}}
2 changes: 1 addition & 1 deletion packages/token/.ultra.cache.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"dist":"1711336745231.6272","CHANGELOG.md":"aaa5eeb2270ee5189837e59a4309f28cb3b06ad7","esbuild.js":"0662568d46dffb9b1d5f4896e16f1fa16cedef88","package.json":"83c64ef72602b6f6a3765452b8bd38841f2f9505","src/index.ts":"915d5ebd142d8a1ab3f2914baae567603357c02b","src/token.css":"f7582d6cbcf02decace5e54a8b5c7ec194e68493","tsconfig.json":"689ca1ded6044f50de8669ef8cd04b47f206de0f"},"deps":{"@xionhub/esbuild":0}}
{"files":{"dist":"1711418341040.1472","CHANGELOG.md":"d8c952a028670734344277d6399c66268619160a","esbuild.js":"0662568d46dffb9b1d5f4896e16f1fa16cedef88","package.json":"98cacab308e080c94b06e7372f7bed5a4d17b750","src/index.ts":"915d5ebd142d8a1ab3f2914baae567603357c02b.1711418313594.3206","src/token.css":"f7582d6cbcf02decace5e54a8b5c7ec194e68493.1711418318319.6099","tsconfig.json":"689ca1ded6044f50de8669ef8cd04b47f206de0f"},"deps":{"@xionhub/esbuild":0}}
4 changes: 2 additions & 2 deletions packages/token/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const colors = {
current: 'currentColor',
transparent: 'tranparent',

white: { DEFAULT: 'hsl(var(--white))' },
black: { DEFAULT: 'hsl(var(--black))' },
white: { DEFAULT: '#ffffff;' },
black: { DEFAULT: '#000000' },

neutral: {
'50': 'var(--neutral-50)',
Expand Down
3 changes: 0 additions & 3 deletions packages/token/src/token.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
--font-size: 1rem;
--radius: 2px;

--white: #ffffff;
--balck: #000000;

--neutral-50: #fafafa;
--neutral-100: #f4f4f5;
--neutral-200: #e4e4e7;
Expand Down
2 changes: 1 addition & 1 deletion packages/util/.ultra.cache.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"dist":"1711336748773.5833","CHANGELOG.md":"489097995fb82980859f5c0a061bc102bb52df0a","README.md":"f4e686727307fe38042c104b577c69ee445ac3ee","esbuild.js":"3e8e86085a3267e16e8d5d4a974d4915da8d5527","package.json":"0b5eadc8897da36b278f6389f2c9f72903781721","src/commaize/index.ts":"2069bd11db7a0cffe1d4b51bcb262dc5427152e0","src/convert-list-to-object/index.ts":"d258e9e4a488d452a77adae3afcb458f904939a1","src/decommaize/index.ts":"322268cd2506e16df83adfbc8967253b0683a317","src/defer/index.ts":"888691528334ba2e59783442af80f693c007242d","src/delay/index.ts":"29a28bd11551679a3dcc146e50f6302e500f1fe2","src/index.ts":"8b52b0888e19615c0ebc5fd6148b429a1ec88995","src/object-entries/index.ts":"9624280043f8fb0e42028d31c9ef990587be79a9","src/object-keys-of/index.ts":"ddd47b0b3f512817fcf75937b07744bedcc7482d","src/object-keys-of/object-keys-of.test.ts":"54ed828cdb50eef26a363c0e5a84ca64dcdef6fc","src/object-values/index.ts":"ecbcbbfcd3a9f07b97f467a4fb1ff590fdf28103","src/object-values/object-values.test.ts":"16fac354d7af5e04bd5055529bfc250db2f368b0","src/shallow-equal/index.ts":"16ca60c8e8cc50000e502ebf8c910ce0350e159c","src/shallow-equal/shallow-equal.test.ts":"a726308b82678bc524fc6db64e14c18dab22b964","src/types/deep-partial.ts":"e422dd5175a8df53daf6a5f6e0789b75d4acd146","src/types/non-empty-array.ts":"0c6620ab6d4f4ee5e3654ab430e230f3b3e5f5f2","src/types/number-string.ts":"1f0afc4117011d90128be5fb9576f55ebeac162d","src/types/recursive-partial.ts":"45eed0330df92a95cac2592482527421afe414c8","tsconfig.json":"134e080b9bbcf31d475def3619a5e23c436c6dbc"},"deps":{"@xionhub/esbuild":0}}
{"files":{"dist":"1711418344541.6448","CHANGELOG.md":"f17271500442c017c7f8cc8d5a2d240c6982f22d","README.md":"f4e686727307fe38042c104b577c69ee445ac3ee","esbuild.js":"3e8e86085a3267e16e8d5d4a974d4915da8d5527","package.json":"d07e823576434f5fbadd3bfd6cfa66bb288bd574","src/commaize/index.ts":"2069bd11db7a0cffe1d4b51bcb262dc5427152e0","src/convert-list-to-object/index.ts":"d258e9e4a488d452a77adae3afcb458f904939a1","src/decommaize/index.ts":"322268cd2506e16df83adfbc8967253b0683a317","src/defer/index.ts":"888691528334ba2e59783442af80f693c007242d","src/delay/index.ts":"29a28bd11551679a3dcc146e50f6302e500f1fe2","src/index.ts":"2f0629c321c562d485e3f9629bb8e9fa3b291b16","src/object-entries/index.ts":"9624280043f8fb0e42028d31c9ef990587be79a9","src/object-keys-of/index.ts":"ddd47b0b3f512817fcf75937b07744bedcc7482d","src/object-keys-of/object-keys-of.test.ts":"54ed828cdb50eef26a363c0e5a84ca64dcdef6fc","src/object-values/index.ts":"ecbcbbfcd3a9f07b97f467a4fb1ff590fdf28103","src/object-values/object-values.test.ts":"16fac354d7af5e04bd5055529bfc250db2f368b0","src/shallow-equal/index.ts":"16ca60c8e8cc50000e502ebf8c910ce0350e159c","src/shallow-equal/shallow-equal.test.ts":"a726308b82678bc524fc6db64e14c18dab22b964","src/types/deep-partial.ts":"e422dd5175a8df53daf6a5f6e0789b75d4acd146","src/types/non-empty-array.ts":"0c6620ab6d4f4ee5e3654ab430e230f3b3e5f5f2","src/types/number-string.ts":"1f0afc4117011d90128be5fb9576f55ebeac162d","src/types/recursive-partial.ts":"45eed0330df92a95cac2592482527421afe414c8","tsconfig.json":"134e080b9bbcf31d475def3619a5e23c436c6dbc"},"deps":{"@xionhub/esbuild":0}}
Loading

0 comments on commit 68c45d9

Please sign in to comment.