@masaraxui/react 1.0.0 → 1.1.1
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 +2 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/components/page-hero/index.d.ts +17 -0
- package/dist/components/page-hero/index.js +14 -0
- package/dist/components/page-hero/page-hero.d.ts +16 -0
- package/dist/components/page-hero/page-hero.js +99 -0
- package/dist/index.js +2 -0
- package/dist/version.js +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img
|
|
4
4
|
alt="MasaraxUI v1 logo"
|
|
5
5
|
width="100%"
|
|
6
|
-
src="
|
|
6
|
+
src=""
|
|
7
7
|
/>
|
|
8
8
|
</a>
|
|
9
9
|
</p>
|
|
@@ -20,16 +20,12 @@ MasaraxUI is the modern UI library built to help you move fast, stay consistent,
|
|
|
20
20
|
|
|
21
21
|
## Getting Started
|
|
22
22
|
|
|
23
|
-
Visit <a aria-label="masaraxui learn" href="https://
|
|
23
|
+
Visit <a aria-label="masaraxui learn" href="https://github.com/masarax/masaraxui/blob/main/apps/docs/content/docs/react/getting-started/index.mdx">https://github.com/masarax/masaraxui/blob/main/apps/docs/content/docs/react/getting-started/index.mdx</a> to get started with MasaraxUI.
|
|
24
24
|
|
|
25
25
|
## Documentation
|
|
26
26
|
|
|
27
27
|
Visit [https://masarax.com](https://masarax.com) for the full MasaraxUI documentation.
|
|
28
28
|
|
|
29
|
-
## Storybook
|
|
30
|
-
|
|
31
|
-
Visit [https://storybook.masarax.com](https://storybook.masarax.com/) to view the storybook for all components.
|
|
32
|
-
|
|
33
29
|
## Community
|
|
34
30
|
|
|
35
31
|
We're excited to see the community adopt MasaraxUI, raise issues, and provide feedback.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { PageHeroBreadcrumbs, PageHeroDescription, PageHeroRoot, PageHeroTitle } from "./page-hero";
|
|
3
|
+
export declare const PageHero: (({ align, children, className, size, ...props }: import("./page-hero").PageHeroRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ align, children, className, size, ...props }: import("./page-hero").PageHeroRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Breadcrumbs: ({ children, className, ...props }: import("./page-hero").PageHeroBreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Title: ({ children, className, ...props }: import("./page-hero").PageHeroTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Description: ({ children, className, ...props }: import("./page-hero").PageHeroDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export type PageHero = {
|
|
10
|
+
Props: ComponentProps<typeof PageHeroRoot>;
|
|
11
|
+
RootProps: ComponentProps<typeof PageHeroRoot>;
|
|
12
|
+
BreadcrumbsProps: ComponentProps<typeof PageHeroBreadcrumbs>;
|
|
13
|
+
TitleProps: ComponentProps<typeof PageHeroTitle>;
|
|
14
|
+
DescriptionProps: ComponentProps<typeof PageHeroDescription>;
|
|
15
|
+
};
|
|
16
|
+
export { PageHeroRoot, PageHeroBreadcrumbs, PageHeroTitle, PageHeroDescription };
|
|
17
|
+
export type { PageHeroRootProps, PageHeroRootProps as PageHeroProps, PageHeroBreadcrumbsProps, PageHeroTitleProps, PageHeroDescriptionProps, } from "./page-hero";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { PageHeroRoot, PageHeroDescription, PageHeroTitle, PageHeroBreadcrumbs } from './page-hero.js';
|
|
3
|
+
|
|
4
|
+
/* -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Compound Component
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
const PageHero = Object.assign(PageHeroRoot, {
|
|
8
|
+
Root: PageHeroRoot,
|
|
9
|
+
Breadcrumbs: PageHeroBreadcrumbs,
|
|
10
|
+
Title: PageHeroTitle,
|
|
11
|
+
Description: PageHeroDescription
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { PageHero, PageHeroBreadcrumbs, PageHeroDescription, PageHeroRoot, PageHeroTitle };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PageHeroVariants } from "@masaraxui/styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
interface PageHeroRootProps extends ComponentPropsWithRef<"div">, PageHeroVariants {
|
|
4
|
+
}
|
|
5
|
+
declare const PageHeroRoot: ({ align, children, className, size, ...props }: PageHeroRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
interface PageHeroBreadcrumbsProps extends ComponentPropsWithRef<"div"> {
|
|
7
|
+
}
|
|
8
|
+
declare const PageHeroBreadcrumbs: ({ children, className, ...props }: PageHeroBreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface PageHeroTitleProps extends ComponentPropsWithRef<"h1"> {
|
|
10
|
+
}
|
|
11
|
+
declare const PageHeroTitle: ({ children, className, ...props }: PageHeroTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface PageHeroDescriptionProps extends ComponentPropsWithRef<"p"> {
|
|
13
|
+
}
|
|
14
|
+
declare const PageHeroDescription: ({ children, className, ...props }: PageHeroDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { PageHeroRoot, PageHeroBreadcrumbs, PageHeroTitle, PageHeroDescription };
|
|
16
|
+
export type { PageHeroRootProps, PageHeroBreadcrumbsProps, PageHeroTitleProps, PageHeroDescriptionProps, };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { pageHeroVariants } from '@masaraxui/styles';
|
|
3
|
+
import React__default, { createContext, useContext } from 'react';
|
|
4
|
+
import { composeSlotClassName } from '../../utils/compose.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const PageHeroContext = /*#__PURE__*/createContext({});
|
|
8
|
+
|
|
9
|
+
/* -------------------------------------------------------------------------------------------------
|
|
10
|
+
* PageHero Root
|
|
11
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
12
|
+
|
|
13
|
+
const PageHeroRoot = ({
|
|
14
|
+
align = "left",
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
size = "md",
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const slots = React__default.useMemo(() => pageHeroVariants({
|
|
21
|
+
align,
|
|
22
|
+
size
|
|
23
|
+
}), [align, size]);
|
|
24
|
+
return /*#__PURE__*/jsx(PageHeroContext.Provider, {
|
|
25
|
+
value: {
|
|
26
|
+
slots
|
|
27
|
+
},
|
|
28
|
+
children: /*#__PURE__*/jsx("div", {
|
|
29
|
+
className: slots.base({
|
|
30
|
+
className
|
|
31
|
+
}),
|
|
32
|
+
"data-slot": "page-hero",
|
|
33
|
+
...props,
|
|
34
|
+
children: children
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/* -------------------------------------------------------------------------------------------------
|
|
40
|
+
* PageHero Breadcrumbs
|
|
41
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
42
|
+
|
|
43
|
+
const PageHeroBreadcrumbs = ({
|
|
44
|
+
children,
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}) => {
|
|
48
|
+
const {
|
|
49
|
+
slots
|
|
50
|
+
} = useContext(PageHeroContext);
|
|
51
|
+
return /*#__PURE__*/jsx("div", {
|
|
52
|
+
className: composeSlotClassName(slots?.breadcrumbs, className),
|
|
53
|
+
"data-slot": "page-hero-breadcrumbs",
|
|
54
|
+
...props,
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/* -------------------------------------------------------------------------------------------------
|
|
60
|
+
* PageHero Title
|
|
61
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
62
|
+
|
|
63
|
+
const PageHeroTitle = ({
|
|
64
|
+
children,
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}) => {
|
|
68
|
+
const {
|
|
69
|
+
slots
|
|
70
|
+
} = useContext(PageHeroContext);
|
|
71
|
+
return /*#__PURE__*/jsx("h1", {
|
|
72
|
+
className: composeSlotClassName(slots?.title, className),
|
|
73
|
+
"data-slot": "page-hero-title",
|
|
74
|
+
...props,
|
|
75
|
+
children: children
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/* -------------------------------------------------------------------------------------------------
|
|
80
|
+
* PageHero Description
|
|
81
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
82
|
+
|
|
83
|
+
const PageHeroDescription = ({
|
|
84
|
+
children,
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}) => {
|
|
88
|
+
const {
|
|
89
|
+
slots
|
|
90
|
+
} = useContext(PageHeroContext);
|
|
91
|
+
return /*#__PURE__*/jsx("p", {
|
|
92
|
+
className: composeSlotClassName(slots?.description, className),
|
|
93
|
+
"data-slot": "page-hero-description",
|
|
94
|
+
...props,
|
|
95
|
+
children: children
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { PageHeroBreadcrumbs, PageHeroDescription, PageHeroRoot, PageHeroTitle };
|
package/dist/index.js
CHANGED
|
@@ -153,6 +153,8 @@ export { Modal } from './components/modal/index.js';
|
|
|
153
153
|
export { ModalBackdrop, ModalBody, ModalCloseTrigger, ModalContainer, ModalDialog, ModalFooter, ModalHeader, ModalHeading, ModalIcon, ModalRoot, ModalTrigger } from './components/modal/modal.js';
|
|
154
154
|
export { NumberField } from './components/number-field/index.js';
|
|
155
155
|
export { NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldRoot } from './components/number-field/number-field.js';
|
|
156
|
+
export { PageHero } from './components/page-hero/index.js';
|
|
157
|
+
export { PageHeroBreadcrumbs, PageHeroDescription, PageHeroRoot, PageHeroTitle } from './components/page-hero/page-hero.js';
|
|
156
158
|
export { Pagination } from './components/pagination/index.js';
|
|
157
159
|
export { PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextIcon, PaginationPrevious, PaginationPreviousIcon, PaginationRoot, PaginationSummary } from './components/pagination/pagination.js';
|
|
158
160
|
export { Select } from './components/select/index.js';
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masaraxui/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "🚀 Beautiful and modern React UI library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -251,6 +251,10 @@
|
|
|
251
251
|
"import": "./dist/components/number-field/index.js",
|
|
252
252
|
"types": "./dist/components/number-field/index.d.ts"
|
|
253
253
|
},
|
|
254
|
+
"./page-hero": {
|
|
255
|
+
"import": "./dist/components/page-hero/index.js",
|
|
256
|
+
"types": "./dist/components/page-hero/index.d.ts"
|
|
257
|
+
},
|
|
254
258
|
"./pagination": {
|
|
255
259
|
"import": "./dist/components/pagination/index.js",
|
|
256
260
|
"types": "./dist/components/pagination/index.d.ts"
|
|
@@ -396,7 +400,7 @@
|
|
|
396
400
|
"react-aria-components": "1.16.0",
|
|
397
401
|
"tailwind-merge": "3.4.0",
|
|
398
402
|
"tailwind-variants": "3.2.2",
|
|
399
|
-
"@masaraxui/styles": "1.
|
|
403
|
+
"@masaraxui/styles": "1.1.1"
|
|
400
404
|
},
|
|
401
405
|
"peerDependencies": {
|
|
402
406
|
"react": ">=19.0.0",
|