@mezo-org/mezo-clay 0.1.0-dev.21 → 0.1.0-dev.23
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 +35 -7
- package/dist/components/icons/bell/index.d.ts +9 -0
- package/dist/components/icons/dots/index.d.ts +8 -0
- package/dist/components/icons/dots-grid/index.d.ts +9 -0
- package/dist/components/icons/help-circle/index.d.ts +15 -0
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/index.d.ts +4 -3
- package/dist/components/top-navigation/index.d.ts +3 -0
- package/dist/components/top-navigation/mobile-menu.d.ts +7 -0
- package/dist/components/top-navigation/styled-components.d.ts +6 -0
- package/dist/components/top-navigation/top-navigation.d.ts +14 -0
- package/dist/components/top-navigation/types.d.ts +16 -0
- package/dist/components/top-navigation/user-menu.d.ts +7 -0
- package/dist/components/top-navigation/user-profile-tile.d.ts +4 -0
- package/dist/mezo-clay.es.js +28447 -25665
- package/dist/mezo-clay.umd.js +40 -40
- package/dist/styles/helpers.d.ts +2 -0
- package/dist/styles/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,36 @@ pnpm run build:lib
|
|
|
62
62
|
|
|
63
63
|
The library is output as the /dist directory.
|
|
64
64
|
|
|
65
|
+
### Publishing to NPM
|
|
66
|
+
|
|
67
|
+
Before you build and publish to NPM, you'll want to increment the version in `package.json`.
|
|
68
|
+
|
|
69
|
+
#### Build the library (same as above)
|
|
70
|
+
|
|
71
|
+
```shell
|
|
72
|
+
pnpm run build:lib
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### Login to NPM
|
|
76
|
+
|
|
77
|
+
```shell
|
|
78
|
+
pnpm login
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Test the Built Package Locally
|
|
82
|
+
|
|
83
|
+
Use `pnpm pack` to build a `.tgz` file that you can link to from your test application.
|
|
84
|
+
|
|
85
|
+
#### Publish
|
|
86
|
+
|
|
87
|
+
```shell
|
|
88
|
+
pnpm publish --access public
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
__Note__: You can use the `--dry-run` flag on `publish` if you want to preview what will be included in the release package without actually publishing.
|
|
92
|
+
|
|
93
|
+
Check out your new release on the [npm page](https://www.npmjs.com/package/@mezo-org/mezo-clay).
|
|
94
|
+
|
|
65
95
|
## Using Clay
|
|
66
96
|
|
|
67
97
|
### Install
|
|
@@ -78,27 +108,25 @@ pnpm add styletron-engine-monolithic
|
|
|
78
108
|
|
|
79
109
|
### Adding Clay to your React app
|
|
80
110
|
|
|
81
|
-
Wrap the root of your app with `ClayProvider` component, like so:
|
|
111
|
+
Wrap the root of your app with the `ClayProvider` component, like so:
|
|
82
112
|
|
|
83
113
|
```js
|
|
84
114
|
import { StrictMode } from "react"
|
|
85
115
|
import { createRoot } from "react-dom/client"
|
|
86
|
-
import { ClayLightTheme } from "mezo-clay"
|
|
116
|
+
import { ClayLightTheme, ClayProvider } from "@mezo-org/mezo-clay"
|
|
87
117
|
|
|
88
|
-
import "mezo-clay/dist/mezo-clay.css" // Font styles
|
|
118
|
+
import "@mezo-org/mezo-clay/dist/mezo-clay.css" // Font styles
|
|
89
119
|
|
|
90
120
|
import App from "./App.tsx"
|
|
91
121
|
|
|
92
|
-
const engine = new Styletron()
|
|
93
|
-
|
|
94
122
|
createRoot(document.getElementById('root')!).render(
|
|
95
123
|
<StrictMode>
|
|
96
124
|
<ClayProvider theme={ClayLightTheme}>
|
|
97
|
-
|
|
125
|
+
<App />
|
|
98
126
|
</ClayProvider>
|
|
99
127
|
</StrictMode>
|
|
100
128
|
,
|
|
101
129
|
)
|
|
102
130
|
```
|
|
103
131
|
|
|
104
|
-
Import the
|
|
132
|
+
Import the `@mezo-org/mezo-clay/dist/mezo-clay.css` to ensure that the proper fonts are included.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const Bell01: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import('baseui/icon').Size;
|
|
5
|
+
color?: import('baseui/icon').Color;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
overrides?: import('baseui/icon').IconOverrides;
|
|
8
|
+
} & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export default Bell01;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const DotsVertical: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import('baseui/icon').Size;
|
|
5
|
+
color?: import('baseui/icon').Color;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
overrides?: import('baseui/icon').IconOverrides;
|
|
8
|
+
} & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const DotsGrid: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import('baseui/icon').Size;
|
|
5
|
+
color?: import('baseui/icon').Color;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
overrides?: import('baseui/icon').IconOverrides;
|
|
8
|
+
} & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export default DotsGrid;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const HelpCircleLine: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import('baseui/icon').Size;
|
|
5
|
+
color?: import('baseui/icon').Color;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
overrides?: import('baseui/icon').IconOverrides;
|
|
8
|
+
} & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export declare const HelpCircle: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
size?: import('baseui/icon').Size;
|
|
12
|
+
color?: import('baseui/icon').Color;
|
|
13
|
+
title?: string | null;
|
|
14
|
+
overrides?: import('baseui/icon').IconOverrides;
|
|
15
|
+
} & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -7,6 +7,7 @@ export { default as ArrowLeft } from './arrow-left';
|
|
|
7
7
|
export { default as ArrowNarrowLeft } from './arrow-narrow-left';
|
|
8
8
|
export { default as ArrowNarrowRight } from './arrow-narrow-right';
|
|
9
9
|
export { default as ArrowRight } from './arrow-right';
|
|
10
|
+
export { default as Bell01 } from './bell';
|
|
10
11
|
export * from './bitcoin-circle';
|
|
11
12
|
export { Building02 } from './building';
|
|
12
13
|
export { CheckCircle } from './check-circle';
|
|
@@ -24,6 +25,8 @@ export { Copy03 } from './copy';
|
|
|
24
25
|
export { Cryptocurrency04 } from './cryptocurrency';
|
|
25
26
|
export { Cube01 } from './cube';
|
|
26
27
|
export { default as Discord } from './discord';
|
|
28
|
+
export * from './dots';
|
|
29
|
+
export { default as DotsGrid } from './dots-grid';
|
|
27
30
|
export { Email01 } from './email';
|
|
28
31
|
export * from './eth-circle';
|
|
29
32
|
export { default as Eye } from './eye';
|
|
@@ -32,6 +35,7 @@ export { default as GasFee } from './gas-fee';
|
|
|
32
35
|
export { default as Google } from './google';
|
|
33
36
|
export { default as Handshake } from './handshake';
|
|
34
37
|
export { default as Heart } from './heart';
|
|
38
|
+
export * from './help-circle';
|
|
35
39
|
export { HomeSmile } from './home-smile';
|
|
36
40
|
export { InfoCircle, InfoCircleBadge } from './info-circle';
|
|
37
41
|
export { Lightning01 } from './lightning';
|
|
@@ -5,6 +5,7 @@ export * from './breadcrumbs';
|
|
|
5
5
|
export * from './button';
|
|
6
6
|
export * from './button-group';
|
|
7
7
|
export * from './button-icon';
|
|
8
|
+
export * from './card';
|
|
8
9
|
export * from './checkbox';
|
|
9
10
|
export * from './divider';
|
|
10
11
|
export * from './flex-grid';
|
|
@@ -18,6 +19,7 @@ export * from './message-card';
|
|
|
18
19
|
export * from './mobile-header';
|
|
19
20
|
export * from './modal';
|
|
20
21
|
export * from './progress-bar';
|
|
22
|
+
export * from './progress-steps';
|
|
21
23
|
export * from './radio';
|
|
22
24
|
export * from './section-heading';
|
|
23
25
|
export * from './segmented-control';
|
|
@@ -26,14 +28,13 @@ export * from './skeleton';
|
|
|
26
28
|
export * from './snackbar';
|
|
27
29
|
export * from './spinner';
|
|
28
30
|
export * from './stepper';
|
|
31
|
+
export * from './table';
|
|
29
32
|
export * from './tabs';
|
|
30
33
|
export * from './tag';
|
|
31
34
|
export * from './textarea';
|
|
32
35
|
export * from './tooltip';
|
|
36
|
+
export * from './top-navigation';
|
|
33
37
|
export * from './typography';
|
|
34
|
-
export * from './card';
|
|
35
|
-
export * from './table';
|
|
36
|
-
export * from './progress-steps';
|
|
37
38
|
export { Block } from 'baseui/block';
|
|
38
39
|
export type { BlockProps } from 'baseui/block';
|
|
39
40
|
export { Icon } from 'baseui/icon';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TopNavigationOverrides } from './types';
|
|
3
|
+
export type MobileMenuProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
overrides?: TopNavigationOverrides;
|
|
6
|
+
};
|
|
7
|
+
export default function MobileMenu({ children, overrides, }: MobileMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const StyledRoot: import('styletron-react').StyletronComponent<"div", {}>;
|
|
2
|
+
export declare const StyledNavContainer: import('styletron-react').StyletronComponent<"div", {}>;
|
|
3
|
+
export declare const StyledPrimaryMenuContainer: import('styletron-react').StyletronComponent<"div", {}>;
|
|
4
|
+
export declare const StyledPrimaryMenuItem: import('styletron-react').StyletronComponent<"div", {}>;
|
|
5
|
+
export declare const StyledPageTitle: import('styletron-react').StyletronComponent<"h1", {}>;
|
|
6
|
+
export declare const StyledMobileMenuContentContainer: import('styletron-react').StyletronComponent<"div", {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { UserMenuProps, NavItem } from 'baseui/app-nav-bar';
|
|
3
|
+
import { TopNavigationOverrides } from './types';
|
|
4
|
+
export type TopNavigationProps = {
|
|
5
|
+
appName: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
id?: string;
|
|
8
|
+
mapUserItemToNode?: (a: NavItem) => React.ReactNode;
|
|
9
|
+
mobileBreakpoint?: number;
|
|
10
|
+
mobileMenuChildren: ReactNode;
|
|
11
|
+
overrides?: TopNavigationOverrides;
|
|
12
|
+
pageTitle?: ReactNode;
|
|
13
|
+
} & UserMenuProps;
|
|
14
|
+
export declare function TopNavigation({ appName, children, id, mapUserItemToNode, mobileBreakpoint, mobileMenuChildren, overrides, pageTitle, userItems, username, usernameSubtitle, userImgUrl, onUserItemSelect, }: TopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Override } from 'baseui/helpers/overrides';
|
|
2
|
+
export type TopNavigationOverrides = {
|
|
3
|
+
Root?: Override;
|
|
4
|
+
NavContainer?: Override;
|
|
5
|
+
AppName?: Override;
|
|
6
|
+
PageTitle?: Override;
|
|
7
|
+
PrimaryMenuContainer?: Override;
|
|
8
|
+
PrimaryMenuItem?: Override;
|
|
9
|
+
MobileMenuContentContainer?: Override;
|
|
10
|
+
UserMenuProfileListItem?: Override;
|
|
11
|
+
UserProfileInfoContainer?: Override;
|
|
12
|
+
UserProfilePictureContainer?: Override;
|
|
13
|
+
UserProfileTileContainer?: Override;
|
|
14
|
+
UserMenuButton?: Override;
|
|
15
|
+
UserMenu?: Override;
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UserMenuProps, NavItem, AppNavBarOverrides } from 'baseui/app-nav-bar';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export default function UserMenuComponent(props: {
|
|
4
|
+
mapItemToNode: (a: NavItem) => React.ReactNode;
|
|
5
|
+
onItemSelect: (a: NavItem) => unknown;
|
|
6
|
+
overrides: AppNavBarOverrides;
|
|
7
|
+
} & UserMenuProps): import("react/jsx-runtime").JSX.Element;
|