@saleor/macaw-ui 0.2.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.
Files changed (186) hide show
  1. package/README.md +40 -0
  2. package/dist/ActionBar/ActionBar.d.ts +8 -0
  3. package/dist/ActionBar/context.d.ts +9 -0
  4. package/dist/ActionBar/index.d.ts +2 -0
  5. package/dist/ActionBar/styles.d.ts +2 -0
  6. package/dist/Alert/Alert.d.ts +9 -0
  7. package/dist/Alert/index.d.ts +1 -0
  8. package/dist/Alert/styles.d.ts +2 -0
  9. package/dist/Backlink/Backlink.d.ts +6 -0
  10. package/dist/Backlink/context.d.ts +5 -0
  11. package/dist/Backlink/index.d.ts +2 -0
  12. package/dist/Backlink/styles.d.ts +2 -0
  13. package/dist/ConfirmButton/ConfirmButton.d.ts +11 -0
  14. package/dist/ConfirmButton/index.d.ts +1 -0
  15. package/dist/ConfirmButton/styles.d.ts +2 -0
  16. package/dist/Notification/Notification.d.ts +3 -0
  17. package/dist/Notification/index.d.ts +2 -0
  18. package/dist/Notification/styles.d.ts +2 -0
  19. package/dist/Notification/types.d.ts +16 -0
  20. package/dist/ResponsiveTable/ResponsiveTable.d.ts +8 -0
  21. package/dist/ResponsiveTable/index.d.ts +1 -0
  22. package/dist/ResponsiveTable/styles.d.ts +2 -0
  23. package/dist/Savebar/ButtonTooltipDecorator.d.ts +6 -0
  24. package/dist/Savebar/Savebar.d.ts +14 -0
  25. package/dist/Savebar/index.d.ts +1 -0
  26. package/dist/Savebar/styles.d.ts +2 -0
  27. package/dist/Sidebar/ExpandButton.d.ts +6 -0
  28. package/dist/Sidebar/MenuItem.d.ts +11 -0
  29. package/dist/Sidebar/Sidebar.d.ts +6 -0
  30. package/dist/Sidebar/fixtures.d.ts +2 -0
  31. package/dist/Sidebar/index.d.ts +4 -0
  32. package/dist/Sidebar/types.d.ts +16 -0
  33. package/dist/SidebarDrawer/MenuItemBtn.d.ts +7 -0
  34. package/dist/SidebarDrawer/SidebarDrawer.d.ts +4 -0
  35. package/dist/SidebarDrawer/index.d.ts +2 -0
  36. package/dist/SidebarDrawer/styles.d.ts +2 -0
  37. package/dist/SquareButton/SquareButton.d.ts +3 -0
  38. package/dist/SquareButton/index.d.ts +1 -0
  39. package/dist/Tooltip/Tooltip.d.ts +6 -0
  40. package/dist/Tooltip/index.d.ts +1 -0
  41. package/dist/Tooltip/styles.d.ts +3 -0
  42. package/dist/UserChipMenu/UserChipMenu.d.ts +8 -0
  43. package/dist/UserChipMenu/UserChipMenuItem.d.ts +6 -0
  44. package/dist/UserChipMenu/context.d.ts +4 -0
  45. package/dist/UserChipMenu/index.d.ts +2 -0
  46. package/dist/UserChipMenu/styles.d.ts +2 -0
  47. package/dist/extensions/index.d.ts +3 -0
  48. package/dist/extensions/sendMessage.d.ts +3 -0
  49. package/dist/extensions/types.d.ts +22 -0
  50. package/dist/extensions/useExtensionMessage.d.ts +2 -0
  51. package/dist/icons/ArrowDropdownIcon.d.ts +2 -0
  52. package/dist/icons/CheckboxCheckedIcon.d.ts +1 -0
  53. package/dist/icons/CheckboxIcon.d.ts +1 -0
  54. package/dist/icons/CheckboxIndeterminateIcon.d.ts +1 -0
  55. package/dist/icons/CompleteIcon.d.ts +2 -0
  56. package/dist/icons/InfoIcon.d.ts +2 -0
  57. package/dist/icons/Logo.d.ts +2 -0
  58. package/dist/icons/NotAllowedIcon.d.ts +2 -0
  59. package/dist/icons/NotAllowedInvertedIcon.d.ts +2 -0
  60. package/dist/icons/WarningIcon.d.ts +2 -0
  61. package/dist/icons/index.d.ts +9 -0
  62. package/dist/index.d.ts +15 -0
  63. package/dist/index.js +8 -0
  64. package/dist/localStorageKeys.d.ts +4 -0
  65. package/dist/macaw-ui.cjs.development.js +2582 -0
  66. package/dist/macaw-ui.cjs.development.js.map +1 -0
  67. package/dist/macaw-ui.cjs.production.min.js +2 -0
  68. package/dist/macaw-ui.cjs.production.min.js.map +1 -0
  69. package/dist/macaw-ui.esm.js +2536 -0
  70. package/dist/macaw-ui.esm.js.map +1 -0
  71. package/dist/theme/Baseline.d.ts +2 -0
  72. package/dist/theme/ThemeProvider.d.ts +17 -0
  73. package/dist/theme/context.d.ts +3 -0
  74. package/dist/theme/createSaleorTheme/createSaleorTheme.d.ts +3 -0
  75. package/dist/theme/createSaleorTheme/index.d.ts +2 -0
  76. package/dist/theme/createSaleorTheme/overrides/buttons.d.ts +3 -0
  77. package/dist/theme/createSaleorTheme/overrides/index.d.ts +3 -0
  78. package/dist/theme/createSaleorTheme/overrides/inputs.d.ts +3 -0
  79. package/dist/theme/createSaleorTheme/overrides/tables.d.ts +3 -0
  80. package/dist/theme/createSaleorTheme/palette.d.ts +2 -0
  81. package/dist/theme/createSaleorTheme/shadows.d.ts +2 -0
  82. package/dist/theme/createSaleorTheme/types.d.ts +53 -0
  83. package/dist/theme/index.d.ts +4 -0
  84. package/dist/theme/styles.d.ts +5 -0
  85. package/dist/theme/themes.d.ts +3 -0
  86. package/dist/theme/types.d.ts +6 -0
  87. package/dist/theme/utils.d.ts +1 -0
  88. package/dist/tools/useLocalStorage.d.ts +5 -0
  89. package/dist/tools/useWindowScroll.d.ts +5 -0
  90. package/dist/utils/Decorator.d.ts +4 -0
  91. package/package.json +117 -0
  92. package/src/ActionBar/ActionBar.stories.tsx +34 -0
  93. package/src/ActionBar/ActionBar.tsx +58 -0
  94. package/src/ActionBar/context.tsx +32 -0
  95. package/src/ActionBar/index.ts +2 -0
  96. package/src/ActionBar/styles.ts +27 -0
  97. package/src/Alert/Alert.stories.tsx +30 -0
  98. package/src/Alert/Alert.tsx +86 -0
  99. package/src/Alert/index.ts +1 -0
  100. package/src/Alert/styles.ts +46 -0
  101. package/src/Backlink/Backlink.stories.tsx +51 -0
  102. package/src/Backlink/Backlink.tsx +40 -0
  103. package/src/Backlink/context.tsx +27 -0
  104. package/src/Backlink/index.ts +2 -0
  105. package/src/Backlink/styles.ts +41 -0
  106. package/src/ConfirmButton/ConfirmButton.stories.tsx +72 -0
  107. package/src/ConfirmButton/ConfirmButton.tsx +119 -0
  108. package/src/ConfirmButton/index.ts +1 -0
  109. package/src/ConfirmButton/styles.ts +44 -0
  110. package/src/Notification/Notification.stories.tsx +42 -0
  111. package/src/Notification/Notification.tsx +98 -0
  112. package/src/Notification/index.ts +2 -0
  113. package/src/Notification/styles.ts +74 -0
  114. package/src/Notification/types.ts +18 -0
  115. package/src/ResponsiveTable/ResponsiveTable.tsx +24 -0
  116. package/src/ResponsiveTable/index.ts +1 -0
  117. package/src/ResponsiveTable/styles.ts +23 -0
  118. package/src/Savebar/ButtonTooltipDecorator.tsx +22 -0
  119. package/src/Savebar/Savebar.stories.tsx +57 -0
  120. package/src/Savebar/Savebar.tsx +79 -0
  121. package/src/Savebar/index.ts +1 -0
  122. package/src/Savebar/styles.ts +25 -0
  123. package/src/Sidebar/ExpandButton.tsx +44 -0
  124. package/src/Sidebar/MenuItem.tsx +217 -0
  125. package/src/Sidebar/Sidebar.stories.tsx +21 -0
  126. package/src/Sidebar/Sidebar.tsx +88 -0
  127. package/src/Sidebar/fixtures.ts +39 -0
  128. package/src/Sidebar/index.ts +4 -0
  129. package/src/Sidebar/types.ts +18 -0
  130. package/src/SidebarDrawer/MenuItemBtn.tsx +40 -0
  131. package/src/SidebarDrawer/SidebarDrawer.stories.tsx +13 -0
  132. package/src/SidebarDrawer/SidebarDrawer.tsx +113 -0
  133. package/src/SidebarDrawer/index.ts +2 -0
  134. package/src/SidebarDrawer/styles.ts +69 -0
  135. package/src/SquareButton/SquareButton.stories.tsx +15 -0
  136. package/src/SquareButton/SquareButton.tsx +35 -0
  137. package/src/SquareButton/index.ts +1 -0
  138. package/src/Tooltip/Tooltip.stories.tsx +19 -0
  139. package/src/Tooltip/Tooltip.tsx +25 -0
  140. package/src/Tooltip/index.ts +1 -0
  141. package/src/Tooltip/styles.ts +28 -0
  142. package/src/UserChipMenu/UserChipMenu.stories.tsx +40 -0
  143. package/src/UserChipMenu/UserChipMenu.tsx +113 -0
  144. package/src/UserChipMenu/UserChipMenuItem.tsx +33 -0
  145. package/src/UserChipMenu/context.ts +19 -0
  146. package/src/UserChipMenu/index.ts +2 -0
  147. package/src/UserChipMenu/styles.ts +65 -0
  148. package/src/assets/placeholder_64x64.png +0 -0
  149. package/src/extensions/index.ts +3 -0
  150. package/src/extensions/sendMessage.ts +23 -0
  151. package/src/extensions/types.ts +26 -0
  152. package/src/extensions/useExtensionMessage.ts +13 -0
  153. package/src/icons/ArrowDropdownIcon.tsx +11 -0
  154. package/src/icons/CheckboxCheckedIcon.tsx +15 -0
  155. package/src/icons/CheckboxIcon.tsx +7 -0
  156. package/src/icons/CheckboxIndeterminateIcon.tsx +17 -0
  157. package/src/icons/CompleteIcon.tsx +25 -0
  158. package/src/icons/InfoIcon.tsx +23 -0
  159. package/src/icons/Logo.tsx +32 -0
  160. package/src/icons/NotAllowedIcon.tsx +25 -0
  161. package/src/icons/NotAllowedInvertedIcon.tsx +25 -0
  162. package/src/icons/WarningIcon.tsx +23 -0
  163. package/src/icons/index.ts +9 -0
  164. package/src/index.tsx +15 -0
  165. package/src/localStorageKeys.ts +4 -0
  166. package/src/theme/Baseline.tsx +30 -0
  167. package/src/theme/ThemeProvider.tsx +84 -0
  168. package/src/theme/context.ts +8 -0
  169. package/src/theme/createSaleorTheme/createSaleorTheme.ts +267 -0
  170. package/src/theme/createSaleorTheme/index.ts +2 -0
  171. package/src/theme/createSaleorTheme/overrides/buttons.ts +94 -0
  172. package/src/theme/createSaleorTheme/overrides/index.ts +15 -0
  173. package/src/theme/createSaleorTheme/overrides/inputs.ts +149 -0
  174. package/src/theme/createSaleorTheme/overrides/tables.ts +74 -0
  175. package/src/theme/createSaleorTheme/palette.ts +38 -0
  176. package/src/theme/createSaleorTheme/shadows.ts +46 -0
  177. package/src/theme/createSaleorTheme/types.ts +84 -0
  178. package/src/theme/index.ts +4 -0
  179. package/src/theme/styles.ts +40 -0
  180. package/src/theme/themes.ts +113 -0
  181. package/src/theme/types.ts +7 -0
  182. package/src/theme/utils.test.ts +43 -0
  183. package/src/theme/utils.ts +13 -0
  184. package/src/tools/useLocalStorage.ts +56 -0
  185. package/src/tools/useWindowScroll.ts +26 -0
  186. package/src/utils/Decorator.tsx +23 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ <div align="center">
2
+ <a href="https://macaw-ui.vercel.app/" rel="noopener" target="_blank"><img src="/stories/assets/macaw-ui-logo.svg" alt="Material-ui-pickers logo"></a></p>
3
+
4
+ [![npm package](https://img.shields.io/npm/v/@saleor/macaw-ui.svg)](https://www.npmjs.com/package/@saleor/macaw-ui)
5
+ [![npm download](https://img.shields.io/npm/dm/@saleor/macaw-ui.svg)](https://www.npmjs.com/package/@saleor/macaw-ui)
6
+ [![Bundle Size](https://badgen.net/bundlephobia/minzip/@saleor/macaw-ui)](https://bundlephobia.com/package/@saleor/macaw-ui@latest)
7
+ </div>
8
+
9
+ # MacawUI
10
+ Official React UI components kit for [Saleor](https://saleor.io/) — an open-source GraphQL-first and Next.js ready e-commerce platform. You can find most of the elements used in the creation of Saleor's dashboard interface and use it to create Saleor Apps. Have a great time working on your projects and empowering your users. If you have any questions, feel free to let us know on [GitHub Discussions](https://github.com/mirumee/saleor/discussions).
11
+
12
+ ## Installation
13
+ ```sh
14
+ npm i @saleor/macaw-ui
15
+ ```
16
+
17
+ Note that this package depends on the following Material-UI **v4** packages: `@material-ui/core`, `@material-ui/icons` and `@material-ui/lab`. If your project doesn't have them installed and you're not using npm v7 with [automatically installed peer dependencies](https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/) then you'll need to install them manually:
18
+
19
+ ```sh
20
+ npm i @material-ui/core @material-ui/icons @material-ui/lab
21
+ ```
22
+
23
+ ## Documentation
24
+ Take a look at our [storybook docs](https://macaw-ui.vercel.app). You can find guides, component overview, and project ideas there.
25
+
26
+ ### Working with Material-UI
27
+ MacawUI was created to integrate with [Material-UI](https://material-ui.com/) seamlessly. It exports a `ThemeProvider` that will override Material-UI component styles:
28
+ ```jsx
29
+ import { ThemeProvider } from "@saleor/macaw-ui";
30
+
31
+ // ...
32
+
33
+ <ThemeProvider>
34
+ <App />
35
+ </ThemeProvider>
36
+ ```
37
+
38
+ ## License
39
+ Distributed under the Creative Common Attribution 4.0 International License
40
+ [https://creativecommons.org/licenses/by/4.0/](https://creativecommons.org/licenses/by/4.0/)
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ConfirmButtonTransitionState } from "../ConfirmButton";
3
+ export interface ActionBarProps {
4
+ disabled: boolean;
5
+ state: ConfirmButtonTransitionState;
6
+ children: React.ReactNode[] | React.ReactNode;
7
+ }
8
+ export declare const ActionBar: React.FC<ActionBarProps>;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface ActionBarContextType {
3
+ anchor: React.RefObject<HTMLDivElement>;
4
+ docked: boolean;
5
+ setDocked: (docked: boolean) => void;
6
+ }
7
+ export declare const ActionBarContext: React.Context<ActionBarContextType | undefined>;
8
+ export declare const useActionBar: () => ActionBarContextType;
9
+ export declare const ActionBarProvider: React.FC;
@@ -0,0 +1,2 @@
1
+ export * from "./ActionBar";
2
+ export * from "./context";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"content" | "paper" | "root", string>;
2
+ export default useStyles;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export declare type AlertVariant = "error" | "warning" | "success" | "info";
3
+ export interface AlertProps {
4
+ className?: string;
5
+ close?: boolean;
6
+ variant: AlertVariant;
7
+ title: string;
8
+ }
9
+ export declare const Alert: React.FC<AlertProps>;
@@ -0,0 +1 @@
1
+ export * from "./Alert";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"close" | "content" | "closeNoContent" | "container" | "root" | "titleBar" | "error" | "success" | "warning", string>;
2
+ export default useStyles;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export interface AppHeaderProps {
3
+ children: React.ReactNode;
4
+ onClick: () => void;
5
+ }
6
+ export declare const Backlink: React.FC<AppHeaderProps>;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export declare type BacklinkContextType = React.RefObject<HTMLDivElement>;
3
+ export declare const BacklinkContext: React.Context<BacklinkContextType | undefined>;
4
+ export declare const useBacklink: () => BacklinkContextType;
5
+ export declare const BacklinkProvider: React.FC;
@@ -0,0 +1,2 @@
1
+ export * from "./Backlink";
2
+ export * from "./context";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"backArrow" | "menuButton" | "root" | "skeleton" | "title", string>;
2
+ export default useStyles;
@@ -0,0 +1,11 @@
1
+ import { ButtonProps } from "@material-ui/core/Button";
2
+ import React from "react";
3
+ export declare type ConfirmButtonTransitionState = "loading" | "success" | "error" | "default";
4
+ export declare type ConfirmButtonLabels = Record<"confirm" | "error", string>;
5
+ export interface ConfirmButtonProps extends Omit<ButtonProps, "classes"> {
6
+ labels: ConfirmButtonLabels;
7
+ noTransition?: boolean;
8
+ transitionState: ConfirmButtonTransitionState;
9
+ onTransitionToDefault?: () => void;
10
+ }
11
+ export declare const ConfirmButton: React.FC<ConfirmButtonProps>;
@@ -0,0 +1 @@
1
+ export * from "./ConfirmButton";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"error" | "progress" | "icon" | "invisible" | "label" | "success", string>;
2
+ export default useStyles;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { NotificationProps } from "./types";
3
+ export declare const Notification: React.FC<NotificationProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./Notification";
2
+ export * from "./types";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"actionBtn" | "text" | "closeBtn" | "closeBtnInfo" | "error" | "success" | "warning" | "info" | "hiddenText" | "snackbar" | "snackbarContainer" | "snackbarAction" | "messageContainer" | "container" | "title", string>;
2
+ export default useStyles;
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from "react";
2
+ export declare type NotificationType = "info" | "success" | "error" | "warning";
3
+ export interface NotificationAction {
4
+ label: string;
5
+ onClick: () => void;
6
+ }
7
+ export interface NotificationData {
8
+ content?: ReactNode;
9
+ title: string;
10
+ action?: NotificationAction;
11
+ type: NotificationType;
12
+ }
13
+ export interface NotificationProps extends NotificationData {
14
+ className?: string;
15
+ onClose: () => void;
16
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface ResponsiveTableProps {
3
+ children: React.ReactNode | React.ReactNodeArray;
4
+ className?: string;
5
+ key?: string;
6
+ }
7
+ export declare const ResponsiveTable: React.FC<ResponsiveTableProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./ResponsiveTable";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"root", string>;
2
+ export default useStyles;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ButtonTooltipDecoratorProps {
3
+ tooltip?: string;
4
+ }
5
+ export declare const ButtonTooltipDecorator: React.FC<ButtonTooltipDecoratorProps>;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { ConfirmButtonLabels, ConfirmButtonTransitionState } from "../ConfirmButton";
3
+ export declare type SavebarLabels = ConfirmButtonLabels & Record<"delete" | "cancel", string>;
4
+ export declare type SavebarTooltips = Partial<Record<"confirm" | "delete" | "cancel", string>>;
5
+ export interface SavebarProps {
6
+ disabled: boolean;
7
+ state: ConfirmButtonTransitionState;
8
+ labels: SavebarLabels;
9
+ tooltips?: SavebarTooltips;
10
+ onCancel: () => void;
11
+ onDelete?: () => void;
12
+ onSubmit: () => void;
13
+ }
14
+ export declare const Savebar: React.FC<SavebarProps>;
@@ -0,0 +1 @@
1
+ export * from "./Savebar";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"button" | "cancelButton" | "deleteButton" | "spacer", string>;
2
+ export default useStyles;
@@ -0,0 +1,6 @@
1
+ import { ButtonProps } from "@material-ui/core/Button";
2
+ import React from "react";
3
+ export interface ExpandButtonProps extends ButtonProps {
4
+ isShrunk: boolean;
5
+ }
6
+ export declare const ExpandButton: React.FC<ExpandButtonProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { SidebarMenuItem } from "./types";
3
+ export interface MenuItemProps {
4
+ active: boolean;
5
+ isMenuShrunk: boolean;
6
+ menuItem: SidebarMenuItem;
7
+ onClick: (url: string) => void;
8
+ }
9
+ export declare const menuWidth = 210;
10
+ export declare const shrunkMenuWidth = 72;
11
+ export declare const MenuItem: React.FC<MenuItemProps>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { BaseSidebarProps } from "./types";
3
+ export interface SidebarProps extends BaseSidebarProps {
4
+ active: string;
5
+ }
6
+ export declare const Sidebar: React.FC<SidebarProps>;
@@ -0,0 +1,2 @@
1
+ import { SidebarMenuItem } from "./types";
2
+ export declare const menu: SidebarMenuItem[];
@@ -0,0 +1,4 @@
1
+ export * from "./Sidebar";
2
+ export * from "./MenuItem";
3
+ export * from "./types";
4
+ export * from "./ExpandButton";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export interface SidebarMenuItem {
3
+ ariaLabel: string;
4
+ children?: SidebarMenuItem[];
5
+ iconSrc?: string;
6
+ label: string;
7
+ id: string;
8
+ url?: string;
9
+ external?: boolean;
10
+ }
11
+ export interface BaseSidebarProps {
12
+ className?: string;
13
+ menuItems: SidebarMenuItem[];
14
+ toolbar?: React.ReactNode;
15
+ onMenuItemClick: (url: string) => void;
16
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { SidebarMenuItem } from "../Sidebar/types";
3
+ export interface MenuItemBtnProps {
4
+ menuItem: SidebarMenuItem;
5
+ onClick: (url: string) => void;
6
+ }
7
+ export declare const MenuItemBtn: React.FC<MenuItemBtnProps>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { BaseSidebarProps } from "../Sidebar/types";
3
+ export declare type SideBarDrawerProps = BaseSidebarProps;
4
+ export declare const SidebarDrawer: React.FC<SideBarDrawerProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./MenuItemBtn";
2
+ export * from "./SidebarDrawer";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"activeMenuLabel" | "content" | "icon" | "container" | "containerSubMenu" | "innerContainer" | "label" | "logo" | "menuItemBtn" | "root" | "secondaryContentActive" | "subMenuTopBar", string>;
2
+ export default useStyles;
@@ -0,0 +1,3 @@
1
+ import { ButtonBaseProps } from "@material-ui/core/ButtonBase";
2
+ import React from "react";
3
+ export declare const SquareButton: React.FC<ButtonBaseProps>;
@@ -0,0 +1 @@
1
+ export * from "./SquareButton";
@@ -0,0 +1,6 @@
1
+ import { TooltipProps as MUITooltipProps } from "@material-ui/core/Tooltip";
2
+ import React from "react";
3
+ export interface TooltipProps extends MUITooltipProps {
4
+ variant?: "info" | "success" | "warning" | "error";
5
+ }
6
+ export declare const Tooltip: React.FC<TooltipProps>;
@@ -0,0 +1 @@
1
+ export * from "./Tooltip";
@@ -0,0 +1,3 @@
1
+ import { TooltipProps } from "./Tooltip";
2
+ declare const useStyles: (props: TooltipProps) => Record<"tooltip", string>;
3
+ export default useStyles;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export interface UserChipProps {
3
+ avatar: string | null;
4
+ initials: string;
5
+ name: string;
6
+ subtext?: string;
7
+ }
8
+ export declare const UserChipMenu: React.FC<UserChipProps>;
@@ -0,0 +1,6 @@
1
+ import { MenuItemProps } from "@material-ui/core/MenuItem";
2
+ import React from "react";
3
+ export interface UserChipMenuItemProps extends Omit<MenuItemProps, "button"> {
4
+ leaveOpen?: boolean;
5
+ }
6
+ export declare const UserChipMenuItem: React.FC<UserChipMenuItemProps>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare type UserChipMenuContextType = () => void;
3
+ export declare const UserChipMenuContext: import("react").Context<UserChipMenuContextType | undefined>;
4
+ export declare const useUserChipMenu: () => UserChipMenuContextType;
@@ -0,0 +1,2 @@
1
+ export * from "./UserChipMenu";
2
+ export * from "./UserChipMenuItem";
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => Record<"arrow" | "rotate" | "avatar" | "avatarInitials" | "avatarPlaceholder" | "label" | "labelContainer" | "popover" | "userChip" | "userMenuContainer", string>;
2
+ export default useStyles;
@@ -0,0 +1,3 @@
1
+ export * from "./sendMessage";
2
+ export * from "./types";
3
+ export * from "./useExtensionMessage";
@@ -0,0 +1,3 @@
1
+ import { BaseExtensionMessageData } from "./types";
2
+ export declare function sendMessageToDashboard<T extends BaseExtensionMessageData>(message: T, targetOrigin: string): void;
3
+ export declare function sendMessageToExtension<T extends BaseExtensionMessageData>(message: T, targetOrigin: string): void;
@@ -0,0 +1,22 @@
1
+ import { ThemeType } from "../theme";
2
+ export declare enum ExtensionMessageType {
3
+ BREADCRUMB_CLICK = 0,
4
+ BREADCRUMB_SET = 1,
5
+ THEME = 2
6
+ }
7
+ export interface BaseExtensionMessageData {
8
+ type: ExtensionMessageType;
9
+ }
10
+ export declare type Breadcrumb = Record<"label" | "value", string>;
11
+ export interface BreadcrumbClickMessage extends BaseExtensionMessageData {
12
+ breadcrumb: string;
13
+ }
14
+ export interface BreadcrumbChangeMessage extends BaseExtensionMessageData {
15
+ breadcrumbs: Breadcrumb[];
16
+ }
17
+ export interface ThemeChangeMessage extends BaseExtensionMessageData {
18
+ theme: ThemeType;
19
+ }
20
+ export interface ExtensionMessageEvent<T extends BaseExtensionMessageData> {
21
+ data: T;
22
+ }
@@ -0,0 +1,2 @@
1
+ import { BaseExtensionMessageData, ExtensionMessageEvent } from "./types";
2
+ export declare function useExtensionMessage<T extends BaseExtensionMessageData>(handle: (message: ExtensionMessageEvent<T>) => void): void;
@@ -0,0 +1,2 @@
1
+ declare const ArrowDropdownIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
2
+ export default ArrowDropdownIcon;
@@ -0,0 +1 @@
1
+ export declare const CheckboxCheckedIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
@@ -0,0 +1 @@
1
+ export declare const CheckboxIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
@@ -0,0 +1 @@
1
+ export declare const CheckboxIndeterminateIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const CompleteIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Logo: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const NotAllowedIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const NotAllowedInvertedIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const WarningIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,9 @@
1
+ export * from "./CompleteIcon";
2
+ export * from "./InfoIcon";
3
+ export * from "./NotAllowedIcon";
4
+ export * from "./NotAllowedInvertedIcon";
5
+ export * from "./WarningIcon";
6
+ export * from "./ArrowDropdownIcon";
7
+ export * from "./CheckboxIcon";
8
+ export * from "./CheckboxCheckedIcon";
9
+ export * from "./CheckboxIndeterminateIcon";
@@ -0,0 +1,15 @@
1
+ export * from "./theme";
2
+ export * from "./extensions";
3
+ export * from "./icons";
4
+ export * from "./Savebar";
5
+ export * from "./Backlink";
6
+ export * from "./ConfirmButton";
7
+ export * from "./Sidebar";
8
+ export * from "./SidebarDrawer";
9
+ export * from "./SquareButton";
10
+ export * from "./Alert";
11
+ export * from "./Notification";
12
+ export * from "./UserChipMenu";
13
+ export * from "./ResponsiveTable";
14
+ export * from "./Tooltip";
15
+ export * from "./ActionBar";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./macaw-ui.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./macaw-ui.cjs.development.js')
8
+ }
@@ -0,0 +1,4 @@
1
+ export declare const localStorageKeys: {
2
+ theme: string;
3
+ menuShrink: string;
4
+ };