@raketa-builder/ui 1.3.9 → 1.3.11
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/dist/Button.js +44 -0
- package/dist/CategoriesMenu.js +47 -0
- package/dist/Container.js +12 -0
- package/dist/DataGrid.js +16 -0
- package/dist/DefaultAvatar.js +48 -0
- package/dist/Field.js +44 -0
- package/dist/FieldSet.js +15 -0
- package/dist/FormGroup.js +12 -0
- package/dist/Grid.js +52 -0
- package/dist/H.js +17 -0
- package/dist/Handle.js +12 -0
- package/dist/Hint.js +22 -0
- package/dist/ImageAvatar.js +22 -0
- package/dist/Input.js +12 -0
- package/dist/Label.js +17 -0
- package/dist/LanguageSwitcher.js +54 -0
- package/dist/Modal.js +93 -0
- package/dist/Navigation.js +25 -0
- package/dist/P.js +12 -0
- package/dist/PageTitle.js +22 -0
- package/dist/Pagination.js +86 -0
- package/dist/Panel.js +19 -0
- package/dist/Select.js +12 -0
- package/dist/Stack.js +12 -0
- package/dist/Tabs.js +40 -0
- package/dist/Textarea.js +17 -0
- package/dist/Toolbar.js +18 -0
- package/dist/chunk-ORMEWXMH.js +33 -0
- package/dist/cn.js +7 -0
- package/dist/index.js +30 -908
- package/{src → dist}/theme.js +7 -6
- package/package.json +17 -3
- package/CHANGELOG.md +0 -7
- package/biome.json +0 -3
- package/src/Button.jsx +0 -38
- package/src/CategoriesMenu.js +0 -53
- package/src/Container.jsx +0 -8
- package/src/DataGrid.jsx +0 -24
- package/src/DefaultAvatar.jsx +0 -47
- package/src/Field.jsx +0 -37
- package/src/FieldSet.js +0 -15
- package/src/FormGroup.jsx +0 -8
- package/src/Grid.jsx +0 -47
- package/src/H.jsx +0 -11
- package/src/Handle.jsx +0 -8
- package/src/Hint.jsx +0 -16
- package/src/ImageAvatar.jsx +0 -16
- package/src/Input.jsx +0 -8
- package/src/Label.jsx +0 -11
- package/src/LanguageSwitcher.jsx +0 -63
- package/src/Modal.jsx +0 -96
- package/src/Navigation.jsx +0 -20
- package/src/P.jsx +0 -8
- package/src/PageTitle.jsx +0 -21
- package/src/Pagination.jsx +0 -88
- package/src/Panel.jsx +0 -16
- package/src/Select.jsx +0 -8
- package/src/Stack.jsx +0 -8
- package/src/Tabs.jsx +0 -41
- package/src/Textarea.jsx +0 -11
- package/src/Toolbar.jsx +0 -12
- package/src/cn.js +0 -3
- package/src/index.js +0 -31
- package/src/styles.css +0 -841
- package/tsconfig.json +0 -5
package/src/Pagination.jsx
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import cn from "./cn";
|
|
3
|
-
|
|
4
|
-
const Wrapper = ({ className, ...props }) => (
|
|
5
|
-
<div className={cn("r-reset", "r-pagination", className)} {...props} />
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
const Prev = ({ LinkComponent, router, currentPage }) => {
|
|
9
|
-
if (currentPage === 1) {
|
|
10
|
-
return <span>Previous</span>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<LinkComponent
|
|
15
|
-
href={{
|
|
16
|
-
pathname: router.pathname,
|
|
17
|
-
query: { ...router.query, ...{ page: currentPage - 1 } },
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
Previous
|
|
21
|
-
</LinkComponent>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const Next = ({ currentPage, pagesCount, LinkComponent, router }) => {
|
|
26
|
-
if (currentPage === pagesCount) {
|
|
27
|
-
return <span>Next</span>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<LinkComponent
|
|
32
|
-
href={{
|
|
33
|
-
pathname: router.pathname,
|
|
34
|
-
query: { ...router.query, ...{ page: currentPage + 1 } },
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
Next
|
|
38
|
-
</LinkComponent>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const Pagination = ({ pagination, LinkComponent, router }) => {
|
|
43
|
-
const { currentPage, pagesCount } = pagination;
|
|
44
|
-
const pages = Array(pagesCount).fill(1);
|
|
45
|
-
|
|
46
|
-
if (pagesCount <= 1 || router === null) {
|
|
47
|
-
return "";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<Wrapper>
|
|
52
|
-
<Prev
|
|
53
|
-
LinkComponent={LinkComponent}
|
|
54
|
-
router={router}
|
|
55
|
-
currentPage={currentPage}
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
{pages.map((_, idx) => {
|
|
59
|
-
const pageNum = idx + 1;
|
|
60
|
-
|
|
61
|
-
if (pageNum === currentPage) {
|
|
62
|
-
return <span key={pageNum}>{pageNum}</span>;
|
|
63
|
-
} else {
|
|
64
|
-
return (
|
|
65
|
-
<LinkComponent
|
|
66
|
-
key={pageNum}
|
|
67
|
-
href={{
|
|
68
|
-
pathname: router.pathname,
|
|
69
|
-
query: { ...router.query, ...{ page: pageNum } },
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
{pageNum}
|
|
73
|
-
</LinkComponent>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
})}
|
|
77
|
-
|
|
78
|
-
<Next
|
|
79
|
-
LinkComponent={LinkComponent}
|
|
80
|
-
router={router}
|
|
81
|
-
currentPage={currentPage}
|
|
82
|
-
pagesCount={pagesCount}
|
|
83
|
-
/>
|
|
84
|
-
</Wrapper>
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export default Pagination;
|
package/src/Panel.jsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import cn from "./cn";
|
|
3
|
-
|
|
4
|
-
const Panel = ({ className, ...props }) => (
|
|
5
|
-
<div className={cn("r-reset", "r-panel", className)} {...props} />
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
const PanelTitle = ({ className, ...props }) => (
|
|
9
|
-
<div className={cn("r-reset", "r-panel-title", className)} {...props} />
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
const PanelContent = ({ className, ...props }) => (
|
|
13
|
-
<div className={cn("r-panel-content", className)} {...props} />
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export { Panel, PanelTitle, PanelContent };
|
package/src/Select.jsx
DELETED
package/src/Stack.jsx
DELETED
package/src/Tabs.jsx
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import cn from "./cn";
|
|
3
|
-
|
|
4
|
-
const TabsWrapper = ({ className, ...props }) => (
|
|
5
|
-
<div {...props} className={cn("r-reset", "r-tab-wrapper", className)}></div>
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
const Tab = ({ active, className, ...props }) => (
|
|
9
|
-
<button
|
|
10
|
-
className={cn(
|
|
11
|
-
`r-reset-button r-tab-button ${active ? "r-tab-button-active" : ""}`,
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
{...props}
|
|
15
|
-
></button>
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const Tabs = ({ initial = 0, children }) => {
|
|
19
|
-
const [current, setCurrent] = React.useState(initial);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<React.Fragment>
|
|
23
|
-
<TabsWrapper>
|
|
24
|
-
{children.map((child, idx) => (
|
|
25
|
-
<Tab
|
|
26
|
-
key={idx}
|
|
27
|
-
type="button"
|
|
28
|
-
active={idx === current}
|
|
29
|
-
onClick={() => setCurrent(idx)}
|
|
30
|
-
>
|
|
31
|
-
{child.props.title}
|
|
32
|
-
</Tab>
|
|
33
|
-
))}
|
|
34
|
-
</TabsWrapper>
|
|
35
|
-
|
|
36
|
-
{children[current]}
|
|
37
|
-
</React.Fragment>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default Tabs;
|
package/src/Textarea.jsx
DELETED
package/src/Toolbar.jsx
DELETED
package/src/cn.js
DELETED
package/src/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export { default as theme } from "./theme";
|
|
2
|
-
export { default as H } from "./H";
|
|
3
|
-
export { default as P } from "./P";
|
|
4
|
-
export { default as Button } from "./Button";
|
|
5
|
-
export { default as Tabs } from "./Tabs";
|
|
6
|
-
export { default as Input } from "./Input";
|
|
7
|
-
export { default as Textarea } from "./Textarea";
|
|
8
|
-
export { default as Select } from "./Select";
|
|
9
|
-
export { default as FormGroup } from "./FormGroup";
|
|
10
|
-
export { default as Label } from "./Label";
|
|
11
|
-
export { default as Field } from "./Field";
|
|
12
|
-
export { default as Hint } from "./Hint";
|
|
13
|
-
export { default as Toolbar } from "./Toolbar";
|
|
14
|
-
export { default as Stack } from "./Stack";
|
|
15
|
-
export { default as Container } from "./Container";
|
|
16
|
-
export { Panel } from "./Panel";
|
|
17
|
-
export { PanelTitle } from "./Panel";
|
|
18
|
-
export { PanelContent } from "./Panel";
|
|
19
|
-
export { default as Handle } from "./Handle";
|
|
20
|
-
export { default as Modal } from "./Modal";
|
|
21
|
-
export { default as DataGrid } from "./DataGrid";
|
|
22
|
-
export { Shift, Row, Col } from "./Grid";
|
|
23
|
-
export { Navigation, NavItem } from "./Navigation";
|
|
24
|
-
export { default as PageTitle } from "./PageTitle";
|
|
25
|
-
export { default as Pagination } from "./Pagination";
|
|
26
|
-
export { default as LanguageSwitcher } from "./LanguageSwitcher";
|
|
27
|
-
export { default as ImageAvatar } from "./ImageAvatar";
|
|
28
|
-
export { default as DefaultAvatar } from "./DefaultAvatar";
|
|
29
|
-
export { default as cn } from "./cn";
|
|
30
|
-
export { default as CategoriesMenu } from "./CategoriesMenu";
|
|
31
|
-
export { default as FieldSet } from "./FieldSet";
|