rr-react-ui-library 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -30
- package/dist/components/ui/ThemeSwitcher/index.d.ts +7 -0
- package/dist/components/ui/ThemeSwitcher/index.d.ts.map +1 -0
- package/dist/components/ui/cards/Card/index.d.ts +1 -2
- package/dist/components/ui/cards/Card/index.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +270 -266
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/ui/ThemeToggle.d.ts +0 -7
- package/dist/components/ui/ThemeToggle.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This library requires the following peer dependencies:
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
First, import the global styles:
|
|
24
|
+
First, import the global styles in App.tsx / main.tsx:
|
|
25
25
|
|
|
26
26
|
```javascript
|
|
27
27
|
import 'rr-react-ui-library/style.css';
|
|
@@ -30,64 +30,87 @@ import 'rr-react-ui-library/style.css';
|
|
|
30
30
|
Then, import and use components:
|
|
31
31
|
|
|
32
32
|
```javascript
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
Row,
|
|
35
|
+
Card,
|
|
36
|
+
Input,
|
|
37
|
+
Select,
|
|
38
|
+
Button,
|
|
39
|
+
CardBody,
|
|
40
|
+
CardFooter,
|
|
41
|
+
CardHeader,
|
|
42
|
+
} from 'rr-react-ui-library';
|
|
34
43
|
|
|
35
44
|
import 'rr-react-ui-library/style.css';
|
|
36
45
|
|
|
37
46
|
function App() {
|
|
38
47
|
return (
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
<Card>
|
|
49
|
+
<CardHeader>
|
|
50
|
+
<div className="text-2xl font-bold my-2">Card header</div>
|
|
51
|
+
</CardHeader>
|
|
52
|
+
<CardBody className="my-4">
|
|
53
|
+
<Row cols={2}>
|
|
54
|
+
<Input
|
|
55
|
+
value=""
|
|
56
|
+
label="Input text"
|
|
57
|
+
onChange={() => {}}
|
|
58
|
+
placeholder="Enter text"
|
|
59
|
+
/>
|
|
60
|
+
<Select
|
|
61
|
+
value=""
|
|
62
|
+
label="Select"
|
|
63
|
+
onChange={() => {}}
|
|
64
|
+
placeholder="Please Select"
|
|
65
|
+
options={[{ value: 'option1', label: 'Option 1' }]}
|
|
66
|
+
/>
|
|
67
|
+
</Row>
|
|
68
|
+
</CardBody>
|
|
69
|
+
<CardFooter>
|
|
70
|
+
<div className="flex justify-end my-3">
|
|
71
|
+
<Button>Click me</Button>
|
|
72
|
+
</div>
|
|
73
|
+
</CardFooter>
|
|
74
|
+
</Card>
|
|
44
75
|
);
|
|
45
76
|
}
|
|
46
77
|
```
|
|
47
78
|
|
|
48
|
-
### Environment Variables
|
|
49
|
-
|
|
50
|
-
Create a `.env` file in the root directory and add your environment variables:
|
|
51
|
-
|
|
52
|
-
``` bash
|
|
53
|
-
VITE_API_BASE_URL=http://localhost:3000/api
|
|
54
|
-
```
|
|
55
|
-
|
|
56
79
|
## Components
|
|
57
80
|
|
|
58
81
|
### Forms
|
|
59
|
-
- Checkbox
|
|
60
82
|
- Input
|
|
61
|
-
-
|
|
62
|
-
- RadioGroup
|
|
83
|
+
- Switch
|
|
63
84
|
- Select
|
|
85
|
+
- Checkbox
|
|
64
86
|
- Textarea
|
|
65
|
-
-
|
|
87
|
+
- RadioGroup
|
|
88
|
+
- MultiSelect
|
|
66
89
|
|
|
67
90
|
### Layouts
|
|
68
|
-
- AdminLayout
|
|
69
91
|
- Container
|
|
92
|
+
- AdminLayout
|
|
70
93
|
|
|
71
94
|
### Navigation
|
|
72
|
-
- SideNavbar
|
|
73
95
|
- TopNavbar
|
|
96
|
+
- SideNavbar
|
|
74
97
|
|
|
75
98
|
### UI Elements
|
|
76
|
-
- ActivityFeed
|
|
77
|
-
- ActivityItem
|
|
78
|
-
- Badge
|
|
79
|
-
- Button
|
|
80
99
|
- Card
|
|
81
|
-
- GlobalLoader
|
|
82
|
-
- InlineLoader
|
|
83
100
|
- Modal
|
|
84
|
-
-
|
|
101
|
+
- Badge
|
|
85
102
|
- Table
|
|
86
|
-
-
|
|
103
|
+
- Button
|
|
87
104
|
- Tooltip
|
|
105
|
+
- Pagination
|
|
106
|
+
- ActivityFeed
|
|
107
|
+
- ActivityItem
|
|
108
|
+
- GlobalLoader
|
|
109
|
+
- InlineLoader
|
|
110
|
+
- ThemeSwitcher
|
|
88
111
|
|
|
89
112
|
### Pages
|
|
90
|
-
-
|
|
113
|
+
- LoginPage
|
|
91
114
|
|
|
92
115
|
## Development
|
|
93
116
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/ThemeSwitcher/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmB/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -15,9 +15,8 @@ export type CardFooterProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
};
|
|
18
|
-
declare const Card: FC<CardProps>;
|
|
18
|
+
export declare const Card: FC<CardProps>;
|
|
19
19
|
export declare const CardHeader: FC<CardHeaderProps>;
|
|
20
20
|
export declare const CardFooter: FC<CardFooterProps>;
|
|
21
21
|
export declare const CardBody: FC<CardHeaderProps>;
|
|
22
|
-
export default Card;
|
|
23
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/cards/Card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AA6CF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/cards/Card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AA6CF,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA2B9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwB1C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAW1C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,eAAe,CAWxC,CAAC"}
|