Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) feat: core components improvements + theme rework #195

Draft
wants to merge 38 commits into
base: v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d88a3bd
Improvements (#196)
yyyyaaa Jul 22, 2024
6adc68d
chore(release): publish
yyyyaaa Jul 22, 2024
d72a6cf
fix(overlays): guard against SSR env
yyyyaaa Jul 23, 2024
5ad0a69
chore(release): publish
yyyyaaa Jul 23, 2024
b9bbf97
fix(reveal): null check before set styles
yyyyaaa Jul 23, 2024
85718af
chore(release): publish
yyyyaaa Jul 23, 2024
a82ad9c
fix: overview transfer and other combobox/select bugs (#197)
yyyyaaa Jul 29, 2024
4d13711
chore(release): publish
yyyyaaa Jul 29, 2024
ba27521
fix(popover): loosen up props type (#198)
yyyyaaa Aug 15, 2024
2423d11
chore(release): publish
yyyyaaa Aug 15, 2024
544d25b
feat(governance-proposal): improve label formatting (#199)
yyyyaaa Aug 21, 2024
51f31d5
chore(release): publish
yyyyaaa Aug 21, 2024
3e19dcc
fix: add sb for combobox
yyyyaaa Sep 12, 2024
29cd673
fix: vuejs build (#200)
yyyyaaa Sep 15, 2024
6d318c6
feat: stories for vue (#201)
yyyyaaa Sep 17, 2024
05adf69
chore(release): publish
yyyyaaa Sep 18, 2024
345a92b
fix: package json
yyyyaaa Sep 18, 2024
c31ce48
feat(theme): palette generator
yyyyaaa Jul 14, 2024
20b73b5
fix: vite
yyyyaaa Jul 16, 2024
4255a12
fix: improve helpers and types
yyyyaaa Jul 16, 2024
d2ad8bb
feat(button): implement new design
yyyyaaa Jul 16, 2024
36df42d
fix: clean up tabs and theme
yyyyaaa Jul 17, 2024
35e5ed7
fix: clean up theme builder
yyyyaaa Jul 18, 2024
316e7a6
fix: s
yyyyaaa Jul 18, 2024
1a8f6e9
fix: cleanup
yyyyaaa Jul 19, 2024
b0aca66
fix: text field and addon
yyyyaaa Jul 19, 2024
d181e7c
fix: text field addon
yyyyaaa Jul 19, 2024
e941f4c
fix: stuff
yyyyaaa Jul 19, 2024
221a1e3
fix: number field
yyyyaaa Jul 19, 2024
49389c1
fix: number field showcase
yyyyaaa Jul 19, 2024
e54a008
wip
yyyyaaa Jul 22, 2024
ea9834d
feat: select button and select
yyyyaaa Jul 22, 2024
afae7c8
fix: list item
yyyyaaa Jul 22, 2024
7fbecd7
feat: config pane
yyyyaaa Jul 22, 2024
1f98425
rm
yyyyaaa Jul 22, 2024
cdf801d
cleanup
yyyyaaa Aug 12, 2024
f25a58f
cleanup
yyyyaaa Aug 12, 2024
51aaa1b
wip
yyyyaaa Aug 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: pnpm install

- name: Build and lint
run: pnpm mitosis:react && pnpm b:react
run: pnpm c:react && pnpm c:vue
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ packages/vue/src
.parcel-cache
parcel-bundle-reports
/src/**/dist

*storybook.log
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The Design System for the Interchain
- [Compiler](#compiler)
- [Icons](#icons)
- [Customizing theme](#customizing-theme)
- [Package dev scripts in root package.json](#package-dev-scripts-in-root-packagejson)
- [Convention](#convention)
- [Related](#related)
- [Credits](#credits)

Expand Down Expand Up @@ -79,6 +81,42 @@ Check [Icon guide](./docs/icons.md) to know how to add more icons

Check [Customizing guide](./docs/custom-theme.md) to know how to customize the default theme.

## Package dev scripts in root package.json
- `t:<target>` to compile target framework (t is short for transpile)
- `b:<target>` to bundle target framework
- `c:<target>` to compile and bundle target framework, it's equivalent to sequentially running `pnpm run t:<target> && pnpm run b:<target>`

## Convention

- Component file names must end with `*.lite.tsx`
- Style sheets must be in `*.css.ts` files, this is because we use a styling solution called `vanilla-extract` to have a CSS-in-JS API across all frameworks.
- For a component, you must use default export, not named export. This is a limitation of Mitosis
- There are more rules and limitations, please read more about Mitosis [here](https://github.com/BuilderIO/mitosis/tree/main/docs)
- To quickly test to see the compilation result from one Mitosis to any framework source code, please use
[mitosis sandbox](https://mitosis.builder.io/). It's similar to TS playground but for Mitosis testing purpose.
- [Vue specifics] Event handlers
- Event handlers in `<template>` must be prefixed with `on`
- Event handlers must be defined in `useStore` hook with a getter function `get eventHandlers()` with exact name. A template for this is as below:

```ts
get eventHandlers() {
const handlers: Record<string, (event: any) => void> = {};
const eventProps = [
"onClick",
"onDoubleClick",
// Add other event names here
]
eventProps.forEach((eventName) => {
if (props[eventName]) {
handlers[eventName] = (event: any) => props[eventName](event);
}
});

return handlers;
}
```
- You can then attach the event handlers to the JSX tag with spread attribute `{...state.eventHandlers}`, this will be transformed to be a `v-on` directive in Vue

## Related

Checkout these related projects:
Expand Down
2 changes: 1 addition & 1 deletion apps/vue-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"rainbow-sprinkles": "^0.17.1",
"tailwindcss": "^3.3.5",
"typescript": "^5.4.2",
"vite": "^5.3.1",
"vite": "^5.4.2",
"vite-plugin-checker": "^0.6.4",
"vue-tsc": "^1.8.22",
"zustand": "^4.5.2"
Expand Down
Loading
Loading