Skip to content

Commit 2630e77

Browse files
committed
v2.2.0
0 parents  commit 2630e77

File tree

192 files changed

+16741
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+16741
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-demos
13+
dist-ssr
14+
*.local
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
npx lint-staged

.prettierrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
singleQuote: true,
3+
semi: true,
4+
useTabs: false,
5+
tabWidth: 2,
6+
trailingComma: 'all',
7+
};

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<div align="center">
2+
3+
# SVAR React Core | UI Component Library
4+
5+
</div>
6+
7+
<div align="center">
8+
9+
[Website](https://svar.dev/react/core/)[Getting Started](https://docs.svar.dev/react/core/getting_started/)[Demos](https://docs.svar.dev/react/core/samples/#/calendar/willow)
10+
11+
</div>
12+
13+
<div align="center">
14+
15+
[![npm](https://img.shields.io/npm/v/@svar-ui/react-core.svg)](https://www.npmjs.com/package/@svar-ui/react-core)
16+
[![License](https://img.shields.io/github/license/svar-widgets/core)](https://github.com/svar-widgets/core/blob/main/license.txt)
17+
[![npm downloads](https://img.shields.io/npm/dm/@svar-ui/react-core.svg)](https://www.npmjs.com/package/@svar-ui/react-core)
18+
19+
</div>
20+
21+
**SVAR React Core** is a lightweight, fast, and mobile-friendly React component library that offers 20+ reusable, pre-styled UI components. It includes form controls, popups, date & time pickers, toast notifications, and more. The components are easily customizable and come with built-in light and dark themes.
22+
23+
<div align="center">
24+
25+
<img src="https://svar.dev/images/github/github-core.png" alt="SVAR Core - React UI Library" style="width: 752px;">
26+
27+
</div>
28+
29+
</br>
30+
31+
Along with the **Core** library, you can use the following SVAR React components to build a unified app interface:
32+
33+
- [Menu](https://github.com/svar-widgets/react-menu) - create basic menu bar, actions or context menu;
34+
- [Toolbar](https://github.com/svar-widgets/react-toolbar) - create button and icon panels with configurable, responsive layouts;
35+
- [Tasklist](https://github.com/svar-widgets/react-tasklist) - basic to-do list component to add, edit, check or delete tasks;
36+
- [Comments](https://github.com/svar-widgets/react-comments) - nice-looking comments section with bubbles or flow views;
37+
- [File uploader](https://github.com/svar-widgets/react-uploader) - simple file uploader component.
38+
39+
### :hammer_and_wrench: How to Use
40+
41+
To start using the components from the **Core** package, simply import the package and include the desired component in your React file:
42+
43+
```jsx
44+
import { Button } from "@svar-ui/react-core";
45+
46+
const myComponent => (<Button>Click me</Button>);
47+
```
48+
49+
See the [getting started guide](https://docs.svar.dev/react/core/getting_started/) to quickly set up and begin using SVAR Core components in your React projects.
50+
51+
### :speech_balloon: Need Help?
52+
53+
[Post an Issue](https://github.com/svar-widgets/react-core/issues/) or use our [community forum](https://forum.svar.dev).

demos/assets/icons/GitHubLogo.svg

Lines changed: 3 additions & 0 deletions
Loading

demos/assets/icons/Logo.svg

Lines changed: 9 additions & 0 deletions
Loading

demos/assets/icons/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as GitHubLogoIcon } from './GitHubLogo.svg';
2+
export { default as LogoIcon } from './Logo.svg';

demos/cases/Basic.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.demo-box.wx-1n1s96 {
2+
padding: 2rem;
3+
margin: 2rem 0;
4+
border: 1px solid #e5e7eb;
5+
border-radius: 0.5rem;
6+
background: #ffffff;
7+
}
8+
9+
.demo-box.wx-1n1s96 h3 {
10+
margin-top: 0;
11+
margin-bottom: 1rem;
12+
color: #374151;
13+
}
14+
15+
.demo-box.wx-1n1s96 button {
16+
margin-right: 1rem;
17+
}

demos/cases/Basic.jsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { useContext } from 'react';
2+
import { Button, Segmented, Calendar, context } from '../../src/index';
3+
4+
const Basic = () => {
5+
const { showNotice } = useContext(context.helpers);
6+
7+
const onClick = () => {
8+
showNotice({
9+
text: 'Button clicked',
10+
});
11+
};
12+
13+
return (
14+
<>
15+
<div className="wx-1n1s96 demo-box">
16+
<h3>Buttons</h3>
17+
<Button onClick={onClick} type="primary">
18+
Primary
19+
</Button>{' '}
20+
<Button onClick={onClick} type="secondary">
21+
Secondary
22+
</Button>{' '}
23+
<Button onClick={onClick} type="danger">
24+
Danger
25+
</Button>
26+
</div>
27+
28+
<div className="wx-1n1s96 demo-box">
29+
<h3>Segmented</h3>
30+
<Segmented
31+
value="2"
32+
options={[
33+
{ id: '1', label: 'One' },
34+
{ id: '2', label: 'Two' },
35+
{ id: '3', label: 'Three' },
36+
]}
37+
></Segmented>
38+
</div>
39+
40+
<div className="wx-1n1s96 demo-box">
41+
<h3>Calendar</h3>
42+
<div style={{ width: '280px' }}>
43+
<Calendar value={new Date(2025, 4, 1)} />
44+
</div>
45+
</div>
46+
</>
47+
);
48+
};
49+
50+
export default Basic;

demos/cases/Buttons.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.demo-box.wx-kfse34 {
2+
margin-bottom: 1rem;
3+
}
4+
5+
.demo-box.wx-kfse34:last-child {
6+
margin-bottom: 0;
7+
}

0 commit comments

Comments
 (0)