@mezo-org/mezo-clay 0.1.0-dev.3 → 0.1.0-dev.4

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 CHANGED
@@ -29,6 +29,7 @@ Open [http://localhost:6006/](http://localhost:6006/) to view it in the browser.
29
29
  ```shell
30
30
  pnpm run format
31
31
  ```
32
+
32
33
  This will lint both config files and ts/tsx/js/jsx files. See the `package.json` for specific linting commands.
33
34
 
34
35
  #### Pre-commit
@@ -77,13 +78,12 @@ pnpm add styletron-engine-monolithic
77
78
 
78
79
  ### Adding Clay to your React app
79
80
 
80
- Wrap the root of your app with `StyletronProvider` and `BaseProvider` components, like so:
81
+ Wrap the root of your app with `ClayProvider` component, like so:
81
82
 
82
83
  ```js
83
84
  import { StrictMode } from "react"
84
85
  import { createRoot } from "react-dom/client"
85
- import { Client as Styletron } from "styletron-engine-monolithic"
86
- import { BaseProvider, ClayLightTheme, StyletronProvider } from "mezo-clay"
86
+ import { ClayLightTheme } from "mezo-clay"
87
87
 
88
88
  import "mezo-clay/dist/mezo-clay.css" // Font styles
89
89
 
@@ -93,11 +93,9 @@ const engine = new Styletron()
93
93
 
94
94
  createRoot(document.getElementById('root')!).render(
95
95
  <StrictMode>
96
- <StyletronProvider value={engine}>
97
- <BaseProvider theme={ClayLightTheme}>
96
+ <ClayProvider theme={ClayLightTheme}>
98
97
  <App />
99
- </BaseProvider>
100
- </StyletronProvider>
98
+ </ClayProvider>
101
99
  </StrictMode>
102
100
  ,
103
101
  )
@@ -0,0 +1,17 @@
1
+ import { BannerProps, BannerVariantProps } from './types';
2
+ export declare const useBannerContext: () => {
3
+ actionLabel: BannerProps["actionLabel"];
4
+ artworkType: BannerProps["artworkType"];
5
+ hierarchy: BannerProps["hierarchy"];
6
+ kind?: BannerProps["kind"];
7
+ onClick: BannerProps["onClick"];
8
+ };
9
+ export declare function BannerCloseIcon({ size }: {
10
+ size: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function BannerTrailingButtonContainer(): import("react/jsx-runtime").JSX.Element;
13
+ export default function Banner({ actionIcon, actionLabel, artworkIcon, artworkType, children, hierarchy, kind, onClick, overrides, nested, title, }: BannerProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function BannerInfo({ artworkType, children, ...restProps }: BannerVariantProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function BannerNegative({ artworkType, children, ...restProps }: BannerVariantProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function BannerPositive({ artworkType, children, ...restProps }: BannerVariantProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function BannerWarning({ artworkType, children, ...restProps }: BannerVariantProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { default as Banner, BannerInfo, BannerCloseIcon, BannerNegative, BannerPositive, BannerTrailingButtonContainer, BannerWarning, } from './banner';
2
+ export * from './types';
3
+ export { ARTWORK_TYPE as BANNER_ARTWORK_TYPE, StyledTrailingButtonContainer, } from 'baseui/banner';
@@ -0,0 +1,10 @@
1
+ import { BannerProps as BaseBannerProps, ActionContent as BaseActionContent, ArtworkContent as BaseArtworkContent } from 'baseui/banner';
2
+ export interface BannerProps extends Omit<Omit<BaseBannerProps, "action">, "artwork"> {
3
+ actionIcon?: BaseActionContent["icon"];
4
+ actionLabel?: BaseActionContent["label"];
5
+ onClick?: BaseActionContent["onClick"];
6
+ artworkIcon?: BaseArtworkContent["icon"];
7
+ artworkType?: BaseArtworkContent["type"];
8
+ }
9
+ export interface BannerVariantProps extends Omit<Omit<BannerProps, "artworkIcon">, "kind"> {
10
+ }
@@ -0,0 +1,256 @@
1
+ import { ReactElement } from 'react';
2
+ import { BannerCloseIcon, BannerVariantProps } from './index';
3
+ type RenderFn = (args: BannerVariantProps) => ReactElement;
4
+ export declare function getLowHierarchyStory(renderFn: RenderFn): {
5
+ args: {
6
+ actionIcon: any;
7
+ actionLabel: any;
8
+ artworkType: any;
9
+ children: string;
10
+ hierarchy: BannerVariantProps["hierarchy"];
11
+ onClick: any;
12
+ overrides: {};
13
+ nested: boolean;
14
+ title: string;
15
+ };
16
+ render: RenderFn;
17
+ };
18
+ export declare function getLowHierarchyWithActionButtonStory(renderFn: RenderFn): {
19
+ args: {
20
+ actionLabel: string;
21
+ onClick: () => void;
22
+ actionIcon: any;
23
+ artworkType: any;
24
+ children: string;
25
+ hierarchy: BannerVariantProps["hierarchy"];
26
+ overrides: {};
27
+ nested: boolean;
28
+ title: string;
29
+ };
30
+ render: RenderFn;
31
+ };
32
+ export declare function getLowHierarchyWithActionIconStory(renderFn: RenderFn): {
33
+ args: {
34
+ actionLabel: string;
35
+ actionIcon: typeof BannerCloseIcon;
36
+ onClick: () => void;
37
+ artworkType: any;
38
+ children: string;
39
+ hierarchy: BannerVariantProps["hierarchy"];
40
+ overrides: {};
41
+ nested: boolean;
42
+ title: string;
43
+ };
44
+ render: RenderFn;
45
+ };
46
+ export declare function getLowHierarchyWithArtworkWithBadgeStory(renderFn: RenderFn): {
47
+ args: {
48
+ artworkType: "badge";
49
+ actionIcon: any;
50
+ actionLabel: any;
51
+ children: string;
52
+ hierarchy: BannerVariantProps["hierarchy"];
53
+ onClick: any;
54
+ overrides: {};
55
+ nested: boolean;
56
+ title: string;
57
+ };
58
+ render: RenderFn;
59
+ };
60
+ export declare function getLowHierarchyWithArtworkWithBadgeAndButtonStory(renderFn: RenderFn): {
61
+ args: {
62
+ artworkType: "badge";
63
+ actionLabel: string;
64
+ onClick: () => void;
65
+ actionIcon: any;
66
+ children: string;
67
+ hierarchy: BannerVariantProps["hierarchy"];
68
+ overrides: {};
69
+ nested: boolean;
70
+ title: string;
71
+ };
72
+ render: RenderFn;
73
+ };
74
+ export declare function getLowHierarchyWithArtworkWithBadgeAndCloseStory(renderFn: RenderFn): {
75
+ args: {
76
+ artworkType: "badge";
77
+ actionLabel: string;
78
+ actionIcon: typeof BannerCloseIcon;
79
+ onClick: () => void;
80
+ children: string;
81
+ hierarchy: BannerVariantProps["hierarchy"];
82
+ overrides: {};
83
+ nested: boolean;
84
+ title: string;
85
+ };
86
+ render: RenderFn;
87
+ };
88
+ export declare function getLowHierarchyWithArtworkWithIconStory(renderFn: RenderFn): {
89
+ args: {
90
+ artworkType: "icon";
91
+ actionIcon: any;
92
+ actionLabel: any;
93
+ children: string;
94
+ hierarchy: BannerVariantProps["hierarchy"];
95
+ onClick: any;
96
+ overrides: {};
97
+ nested: boolean;
98
+ title: string;
99
+ };
100
+ render: RenderFn;
101
+ };
102
+ export declare function getLowHierarchyWithArtworkWithIconAndButtonStory(renderFn: RenderFn): {
103
+ args: {
104
+ artworkType: "icon";
105
+ actionLabel: string;
106
+ onClick: () => void;
107
+ actionIcon: any;
108
+ children: string;
109
+ hierarchy: BannerVariantProps["hierarchy"];
110
+ overrides: {};
111
+ nested: boolean;
112
+ title: string;
113
+ };
114
+ render: RenderFn;
115
+ };
116
+ export declare function getLowHierarchyWithArtworkWithIconAndCloseStory(renderFn: RenderFn): {
117
+ args: {
118
+ artworkType: "icon";
119
+ actionLabel: string;
120
+ actionIcon: typeof BannerCloseIcon;
121
+ onClick: () => void;
122
+ children: string;
123
+ hierarchy: BannerVariantProps["hierarchy"];
124
+ overrides: {};
125
+ nested: boolean;
126
+ title: string;
127
+ };
128
+ render: RenderFn;
129
+ };
130
+ export declare function getHighHierarchyStory(renderFn: RenderFn): {
131
+ args: {
132
+ hierarchy: import('baseui/banner').Hierarchy;
133
+ actionIcon: any;
134
+ actionLabel: any;
135
+ artworkType: any;
136
+ children: string;
137
+ onClick: any;
138
+ overrides: {};
139
+ nested: boolean;
140
+ title: string;
141
+ };
142
+ render: RenderFn;
143
+ };
144
+ export declare function getHighHierarchyWithActionButtonStory(renderFn: RenderFn): {
145
+ args: {
146
+ hierarchy: import('baseui/banner').Hierarchy;
147
+ actionLabel: string;
148
+ onClick: () => void;
149
+ actionIcon: any;
150
+ artworkType: any;
151
+ children: string;
152
+ overrides: {};
153
+ nested: boolean;
154
+ title: string;
155
+ };
156
+ render: RenderFn;
157
+ };
158
+ export declare function getHighHierarchyWithActionIconStory(renderFn: RenderFn): {
159
+ args: {
160
+ hierarchy: import('baseui/banner').Hierarchy;
161
+ actionLabel: string;
162
+ actionIcon: typeof BannerCloseIcon;
163
+ onClick: () => void;
164
+ artworkType: any;
165
+ children: string;
166
+ overrides: {};
167
+ nested: boolean;
168
+ title: string;
169
+ };
170
+ render: RenderFn;
171
+ };
172
+ export declare function getHighHierarchyWithArtworkWithBadgeStory(renderFn: RenderFn): {
173
+ args: {
174
+ hierarchy: import('baseui/banner').Hierarchy;
175
+ artworkType: "badge";
176
+ actionIcon: any;
177
+ actionLabel: any;
178
+ children: string;
179
+ onClick: any;
180
+ overrides: {};
181
+ nested: boolean;
182
+ title: string;
183
+ };
184
+ render: RenderFn;
185
+ };
186
+ export declare function getHighHierarchyWithArtworkWithBadgeAndButtonStory(renderFn: RenderFn): {
187
+ args: {
188
+ hierarchy: import('baseui/banner').Hierarchy;
189
+ artworkType: "badge";
190
+ actionLabel: string;
191
+ onClick: () => void;
192
+ actionIcon: any;
193
+ children: string;
194
+ overrides: {};
195
+ nested: boolean;
196
+ title: string;
197
+ };
198
+ render: RenderFn;
199
+ };
200
+ export declare function getHighHierarchyWithArtworkWithBadgeAndCloseStory(renderFn: RenderFn): {
201
+ args: {
202
+ hierarchy: import('baseui/banner').Hierarchy;
203
+ artworkType: "badge";
204
+ actionLabel: string;
205
+ actionIcon: typeof BannerCloseIcon;
206
+ onClick: () => void;
207
+ children: string;
208
+ overrides: {};
209
+ nested: boolean;
210
+ title: string;
211
+ };
212
+ render: RenderFn;
213
+ };
214
+ export declare function getHighHierarchyWithArtworkWithIconStory(renderFn: RenderFn): {
215
+ args: {
216
+ hierarchy: import('baseui/banner').Hierarchy;
217
+ artworkType: "icon";
218
+ actionIcon: any;
219
+ actionLabel: any;
220
+ children: string;
221
+ onClick: any;
222
+ overrides: {};
223
+ nested: boolean;
224
+ title: string;
225
+ };
226
+ render: RenderFn;
227
+ };
228
+ export declare function getHighHierarchyWithArtworkWithIconAndButtonStory(renderFn: RenderFn): {
229
+ args: {
230
+ hierarchy: import('baseui/banner').Hierarchy;
231
+ artworkType: "icon";
232
+ actionLabel: string;
233
+ onClick: () => void;
234
+ actionIcon: any;
235
+ children: string;
236
+ overrides: {};
237
+ nested: boolean;
238
+ title: string;
239
+ };
240
+ render: RenderFn;
241
+ };
242
+ export declare function getHighHierarchyWithArtworkWithIconAndCloseStory(renderFn: RenderFn): {
243
+ args: {
244
+ hierarchy: import('baseui/banner').Hierarchy;
245
+ artworkType: "icon";
246
+ actionLabel: string;
247
+ actionIcon: typeof BannerCloseIcon;
248
+ onClick: () => void;
249
+ children: string;
250
+ overrides: {};
251
+ nested: boolean;
252
+ title: string;
253
+ };
254
+ render: RenderFn;
255
+ };
256
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export declare const AlertTriangle: 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 AlertTriangleBadge: 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>>;
@@ -1,9 +1,15 @@
1
1
  import * as React from "react";
2
- declare const CheckCircle: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
2
+ export declare const CheckCircle: 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 CheckCircleBadge: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
3
10
  children?: React.ReactNode;
4
11
  size?: import('baseui/icon').Size;
5
12
  color?: import('baseui/icon').Color;
6
13
  title?: string | null;
7
14
  overrides?: import('baseui/icon').IconOverrides;
8
15
  } & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
9
- export default CheckCircle;
@@ -1,11 +1,12 @@
1
1
  export { Icon } from 'baseui/icon';
2
2
  export type { IconProps } from 'baseui/icon';
3
3
  export { default as AlertCircle } from './alert-circle';
4
+ export { AlertTriangle, AlertTriangleBadge } from './alert-triangle';
4
5
  export { default as Apple } from './apple';
5
6
  export { default as ArrowNarrowLeft } from './arrow-narrow-left';
6
7
  export { default as ArrowNarrowRight } from './arrow-narrow-right';
7
8
  export { Building02 } from './building';
8
- export { default as CheckCircle } from './check-circle';
9
+ export { CheckCircle, CheckCircleBadge } from './check-circle';
9
10
  export { default as ChevronDown } from './chevron-down';
10
11
  export { default as ChevronLeft } from './chevron-left';
11
12
  export { default as ChevronRight } from './chevron-right';
@@ -22,7 +23,7 @@ export { default as EyeOff } from './eye-off';
22
23
  export { default as Google } from './google';
23
24
  export { default as Heart } from './heart';
24
25
  export { HomeSmile } from './home-smile';
25
- export { default as InfoCircle } from './info-circle';
26
+ export { InfoCircle, InfoCircleBadge } from './info-circle';
26
27
  export { Lightning01 } from './lightning';
27
28
  export { LinkExternal02 } from './link-external';
28
29
  export { default as Loading } from './loading';
@@ -1,9 +1,15 @@
1
1
  import * as React from "react";
2
- declare const InfoCircle: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
2
+ export declare const InfoCircle: 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 InfoCircleBadge: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
3
10
  children?: React.ReactNode;
4
11
  size?: import('baseui/icon').Size;
5
12
  color?: import('baseui/icon').Color;
6
13
  title?: string | null;
7
14
  overrides?: import('baseui/icon').IconOverrides;
8
15
  } & import('baseui/icon').StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
9
- export default InfoCircle;
@@ -1,17 +1,21 @@
1
1
  export * from './accordion';
2
+ export * from './badge';
3
+ export * from './banner';
2
4
  export * from './block';
3
5
  export * from './button';
4
6
  export * from './button-group';
5
7
  export * from './button-icon';
8
+ export * from './divider';
6
9
  export * from './flex-grid';
7
10
  export * from './form-control';
8
11
  export * from './icons';
9
12
  export * from './input';
13
+ export * from './link';
14
+ export * from './list';
10
15
  export * from './message-card';
11
16
  export * from './side-navigation';
17
+ export * from './skeleton';
12
18
  export * from './tag';
13
19
  export * from './textarea';
14
20
  export * from './typography';
15
- export * from './skeleton';
16
- export * from './list';
17
- export * from './badge';
21
+ export { Block } from 'baseui/block';
@@ -0,0 +1,6 @@
1
+ import { ComponentProps } from 'react';
2
+ import { StyledLink } from 'baseui/link';
3
+ export type LinkProps = ComponentProps<typeof StyledLink> & {
4
+ size?: "xsmall" | "small" | "medium" | "large";
5
+ };
6
+ export declare function Link({ children, size, ...restProps }: LinkProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export type { TabProps, TabsProps } from 'baseui/tabs-motion';
2
+ export { Tab, Tabs } from 'baseui/tabs-motion';
3
+ export { default as TabTitle } from './tab-title';
@@ -0,0 +1,6 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { TabProps } from 'baseui/tabs-motion';
3
+ export default function TabTitle({ title, badgeContent, }: {
4
+ title: TabProps["title"];
5
+ badgeContent: ReactNode;
6
+ }): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;