Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
fix

fix

fix

fix lint

fix lint
  • Loading branch information
NgocNhi123 committed Jun 25, 2024
1 parent 8c10d24 commit 1e5b54c
Show file tree
Hide file tree
Showing 69 changed files with 4,796 additions and 9,717 deletions.
12 changes: 6 additions & 6 deletions .github/DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ To understand the principles that drive the design and development of Moai, see

Moai is a [monorepo](https://classic.yarnpkg.com/en/docs/workspaces/) powered by Yarn. There are several projects:

| Path | Project | Framework |
| ------- | ----------------- | ----------- |
| core | [@moai/core] | [Rollup] |
| gallery | [@moai/gallery] | [Rollup] |
| docs | [moai.thien.do] | [Storybook] |
| test | Test suits | [Jest] |
| Path | Project | Framework |
| ------- | --------------- | ----------- |
| core | [@moai/core] | [Rollup] |
| gallery | [@moai/gallery] | [Rollup] |
| docs | [moai.thien.do] | [Storybook] |
| test | Test suits | [Jest] |

The "test" and "docs" projects depend on "core" and "gallery" via symlinks. This means to run tests or start the docs site locally, you will need to build "core" and "gallery" first. Also, the "gallery" depends on the "core" project:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 15.x
node-version: 18.x
cache: "yarn"
- run: yarn install
- run: yarn lint
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
**Heads up!** This project is no longer in active development. It will be [archived](https://docs.github.com/en/repositories/archiving-a-github-repository/archiving-repositories) soon. Some suggestions:

- Build your own UI kit with a good foundation like [Radix](https://www.radix-ui.com/) or [Headless UI](https://headlessui.com/). This is what I'm actually doing these days myself.
- Fork this project. You have my sword, and bow, and axe, and only 22 unresolved bugs.
- Refactor Moai to utilise Radix (which is what I wanted to do, if I don't need to pay the bills)

- Build your own UI kit with a good foundation like [Radix](https://www.radix-ui.com/) or [Headless UI](https://headlessui.com/). This is what I'm actually doing these days myself.
- Fork this project. You have my sword, and bow, and axe, and only 22 unresolved bugs.
- Refactor Moai to utilise Radix (which is what I wanted to do, if I don't need to pay the bills)

<hr />

Expand Down
40 changes: 20 additions & 20 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@
"react-dom": ">=16"
},
"dependencies": {
"@popperjs/core": "^2.9.2",
"@tippyjs/react": "^4.2.5",
"react-day-picker": "^7.4.10",
"react-hot-toast": "^1.0.2",
"react-icons": "^4.2.0",
"react-popper": "^2.2.5"
"@popperjs/core": "^2.11.8",
"@tippyjs/react": "^4.2.6",
"react-day-picker": "^8.10.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^5.2.1",
"react-popper": "^2.3.0"
},
"devDependencies": {
"@types/react": "^17.0.15",
"@types/react-dom": "^17.0.9",
"autoprefixer": "^10.3.1",
"modern-normalize": "^1.1.0",
"postcss": "^8.3.6",
"postcss-import": "^14.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rollup": "^2.55.1",
"rollup-plugin-copy": "^3.4.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"modern-normalize": "^2.0.0",
"postcss": "^8.4.38",
"postcss-import": "^16.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rollup": "^4.18.0",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-typescript2": "^0.30.0",
"tslib": "^2.3.0",
"typescript": "^4.3.4"
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"tslib": "^2.6.3",
"typescript": "^5.5.2"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion core/src/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const validateButton = (props: ButtonProps): void => {
// since it's missing the ref. See Button for the exported component.
const buttonRender = (
props: ButtonProps,
ref: React.ForwardedRef<ButtonElement>
ref: React.ForwardedRef<ButtonElement>,
): JSX.Element => {
validateButton(props);
const common = {
Expand Down
4 changes: 3 additions & 1 deletion core/src/button/color/failure.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
:global(.dark) .outset {
color: var(--white);
background-color: var(--failure-5);
box-shadow: var(--shadow), var(--inset-shadow) var(--failure-4);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--failure-4);
font-weight: 500;
}

Expand Down
4 changes: 3 additions & 1 deletion core/src/button/color/highlight.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
:global(.dark) .outset {
color: var(--white);
background-color: var(--highlight-5);
box-shadow: var(--shadow), var(--inset-shadow) var(--highlight-4);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--highlight-4);
font-weight: 500;
}

Expand Down
8 changes: 6 additions & 2 deletions core/src/button/color/none.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
:global(.light) .outset {
--shadow: var(--shadow-size) rgba(0, 0, 0, 0.1);
background-color: var(--gray-0);
box-shadow: var(--shadow), var(--inset-shadow) var(--white);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--white);
border-color: var(--gray-2);
}
:global(.light) .outset:hover {
Expand All @@ -39,7 +41,9 @@
:global(.dark) .outset {
--shadow: var(--shadow-size) rgba(0, 0, 0, 0.5);
background-color: var(--gray-6);
box-shadow: var(--shadow), var(--inset-shadow) var(--gray-5);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--gray-5);
border-color: var(--black);
}
:global(.dark) .outset:hover {
Expand Down
4 changes: 3 additions & 1 deletion core/src/button/style/flat.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.main {
transition: background-color 0.1s, outline 0.2s ease-out;
transition:
background-color 0.1s,
outline 0.2s ease-out;
border-radius: 0;
/* To have same layout with outset buttons */
border: solid 1px transparent;
Expand Down
5 changes: 4 additions & 1 deletion core/src/button/style/outset.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.main {
transition: background-color 0.1s, box-shadow 0.1s, outline 0.2s ease-out;
transition:
background-color 0.1s,
box-shadow 0.1s,
outline 0.2s ease-out;
border: solid 1px transparent;
--shadow-size: 0px 0.5px 2px;
--inset-shadow: inset 0px 1px 0px;
Expand Down
2 changes: 1 addition & 1 deletion core/src/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const Checkbox = (props: CheckboxProps): JSX.Element => {
/>
<span
className={[shared.icon, style.icon, self.indeterminate].join(
" "
" ",
)}
children={<Icon display="block" component={coreIcons.dash} />}
/>
Expand Down
17 changes: 13 additions & 4 deletions core/src/checkbox/outset.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.input {
transition: background-color 0.1s, box-shadow 0.1s, outline 0.2s ease-out;
transition:
background-color 0.1s,
box-shadow 0.1s,
outline 0.2s ease-out;
border: solid 1px transparent;
--shadow-size: 0px 0.5px 2px;
--inset-shadow: inset 0px 1px 0px;
Expand All @@ -10,7 +13,9 @@
:global(.light) .input {
--shadow: var(--shadow-size) rgba(0, 0, 0, 0.1);
background-color: var(--gray-0);
box-shadow: var(--shadow), var(--inset-shadow) var(--white);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--white);
border-color: var(--gray-2);
}
:global(.light) .input:hover {
Expand All @@ -24,7 +29,9 @@
:global(.dark) .input {
--shadow: var(--shadow-size) rgba(0, 0, 0, 0.3);
background-color: var(--gray-6);
box-shadow: var(--shadow), var(--inset-shadow) var(--gray-5);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--gray-5);
border-color: var(--black);
}
:global(.dark) .input:hover {
Expand All @@ -42,7 +49,9 @@
:global(.dark) .input:checked,
:global(.dark) .input[type="checkbox"]:indeterminate {
background-color: var(--highlight-5);
box-shadow: var(--shadow), var(--inset-shadow) var(--highlight-4);
box-shadow:
var(--shadow),
var(--inset-shadow) var(--highlight-4);
}

:global(.light) .input:checked,
Expand Down
Loading

0 comments on commit 1e5b54c

Please sign in to comment.