@saleor/macaw-ui 0.3.3 → 0.4.0
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 +20 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/types/ActionBar/context.d.ts +6 -1
- package/dist/types/Chip/Chip.d.ts +8 -0
- package/dist/types/Chip/ChipAdornment.d.ts +6 -0
- package/dist/types/Chip/ChipMovable.d.ts +5 -0
- package/dist/types/Chip/ChipRemovable.d.ts +6 -0
- package/dist/types/Chip/ChipSwatch.d.ts +7 -0
- package/dist/types/Chip/ColorSwatch.d.ts +6 -0
- package/dist/types/Chip/common/ChipMovable.d.ts +5 -0
- package/dist/types/Chip/common/ChipRemovable.d.ts +6 -0
- package/dist/types/Chip/common/ChipSwatch.d.ts +7 -0
- package/dist/types/Chip/common/index.d.ts +3 -0
- package/dist/types/Chip/index.d.ts +5 -0
- package/dist/types/Chip/private/ColorSwatch.d.ts +6 -0
- package/dist/{ActionBar → types/Chip}/styles.d.ts +1 -1
- package/dist/types/CircleIndicator/index.d.ts +1 -1
- package/dist/types/IconButton/styles.d.ts +1 -1
- package/dist/types/Sidebar/MenuItem.d.ts +9 -3
- package/dist/types/Sidebar/types.d.ts +8 -0
- package/dist/types/Sidebar/utils.d.ts +12 -0
- package/dist/types/SidebarDrawer/MenuItemBtn.d.ts +2 -1
- package/dist/types/utils/guideStyles.d.ts +1 -1
- package/package.json +2 -8
- package/src/ActionBar/context.tsx +14 -2
- package/src/Chip/.DS_Store +0 -0
- package/src/Chip/Chip.tsx +52 -0
- package/src/Chip/ChipAdornment.tsx +53 -0
- package/src/Chip/ChipMovable.tsx +40 -0
- package/src/Chip/ChipRemovable.tsx +29 -0
- package/src/Chip/ChipSwatch.tsx +42 -0
- package/src/Chip/index.ts +5 -0
- package/src/Chip/private/ColorSwatch.tsx +21 -0
- package/src/Chip/styles.ts +45 -0
- package/src/CircleIndicator/CircleIndicator.stories.tsx +6 -6
- package/src/CircleIndicator/index.ts +1 -1
- package/src/Filter/FilterField/MultipleSelectFilterField.tsx +4 -2
- package/src/IconButton/IconButton.tsx +7 -5
- package/src/IconButton/styles.ts +34 -14
- package/src/Sidebar/MenuItem.tsx +35 -14
- package/src/Sidebar/Sidebar.tsx +27 -11
- package/src/Sidebar/types.ts +9 -0
- package/src/Sidebar/utils.ts +23 -0
- package/src/SidebarDrawer/MenuItemBtn.tsx +12 -6
- package/src/SidebarDrawer/SidebarDrawer.tsx +8 -2
- package/src/index.tsx +1 -1
- package/src/theme/createSaleorTheme/overrides/inputs.ts +1 -1
- package/src/theme/themes.ts +1 -1
- package/src/utils/guideStyles.ts +5 -0
- package/dist/ActionBar/ActionBar.d.ts +0 -8
- package/dist/ActionBar/ActionBar.stories.d.ts +0 -4
- package/dist/ActionBar/context.d.ts +0 -9
- package/dist/ActionBar/index.d.ts +0 -2
- package/dist/Alert/Alert.d.ts +0 -8
- package/dist/Alert/Alert.stories.d.ts +0 -12
- package/dist/Alert/AlertBase.d.ts +0 -8
- package/dist/Alert/index.d.ts +0 -2
- package/dist/Alert/styles.d.ts +0 -2
- package/dist/Backlink/Backlink.d.ts +0 -8
- package/dist/Backlink/Backlink.stories.d.ts +0 -5
- package/dist/Backlink/context.d.ts +0 -5
- package/dist/Backlink/index.d.ts +0 -2
- package/dist/Backlink/styles.d.ts +0 -2
- package/dist/BaseList/BaseList.d.ts +0 -26
- package/dist/BaseList/context.d.ts +0 -7
- package/dist/BaseList/index.d.ts +0 -1
- package/dist/BaseList/styles.d.ts +0 -5
- package/dist/Button/Button.d.ts +0 -16
- package/dist/Button/index.d.ts +0 -1
- package/dist/Button/styles.d.ts +0 -2
- package/dist/ConfirmButton/ConfirmButton.d.ts +0 -11
- package/dist/ConfirmButton/ConfirmButton.stories.d.ts +0 -8
- package/dist/ConfirmButton/index.d.ts +0 -1
- package/dist/ConfirmButton/styles.d.ts +0 -2
- package/dist/DialogHeader/DialogHeader.d.ts +0 -6
- package/dist/DialogHeader/index.d.ts +0 -1
- package/dist/DialogHeader/styles.d.ts +0 -1
- package/dist/DialogTable/DialogTable.d.ts +0 -6
- package/dist/DialogTable/index.d.ts +0 -1
- package/dist/DialogTable/styles.d.ts +0 -1
- package/dist/Filter/Filter.d.ts +0 -10
- package/dist/Filter/Filter.stories.d.ts +0 -5
- package/dist/Filter/FilterBar.d.ts +0 -11
- package/dist/Filter/FilterContent.d.ts +0 -7
- package/dist/Filter/FilterField/MultipleSelectFilterField.d.ts +0 -6
- package/dist/Filter/FilterField/RangeFilterField.d.ts +0 -7
- package/dist/Filter/FilterField/SelectFilterField.d.ts +0 -6
- package/dist/Filter/FilterField/TextFilterField.d.ts +0 -6
- package/dist/Filter/FilterMenu.d.ts +0 -9
- package/dist/Filter/context.d.ts +0 -4
- package/dist/Filter/index.d.ts +0 -4
- package/dist/Filter/styles.d.ts +0 -2
- package/dist/Filter/types.d.ts +0 -49
- package/dist/Filter/utils.d.ts +0 -8
- package/dist/IconButton/IconButton.d.ts +0 -8
- package/dist/IconButton/index.d.ts +0 -1
- package/dist/IconButton/partials.d.ts +0 -14
- package/dist/IconButton/styles.d.ts +0 -2
- package/dist/LayoutButton/LayoutButton.d.ts +0 -7
- package/dist/LayoutButton/index.d.ts +0 -1
- package/dist/LayoutButton/styles.d.ts +0 -2
- package/dist/List/List.d.ts +0 -13
- package/dist/List/List.stories.d.ts +0 -5
- package/dist/List/context.d.ts +0 -8
- package/dist/List/index.d.ts +0 -1
- package/dist/List/styles.d.ts +0 -1
- package/dist/Notification/Notification.d.ts +0 -3
- package/dist/Notification/Notification.stories.d.ts +0 -10
- package/dist/Notification/index.d.ts +0 -2
- package/dist/Notification/styles.d.ts +0 -2
- package/dist/Notification/types.d.ts +0 -16
- package/dist/OffsettedList/OffsettedList.d.ts +0 -12
- package/dist/OffsettedList/OffsettedList.stories.d.ts +0 -5
- package/dist/OffsettedList/index.d.ts +0 -1
- package/dist/OffsettedList/styles.d.ts +0 -2
- package/dist/PageTabs/PageTab.d.ts +0 -3
- package/dist/PageTabs/PageTab.stories.d.ts +0 -4
- package/dist/PageTabs/PageTabPanel.d.ts +0 -4
- package/dist/PageTabs/PageTabs.d.ts +0 -5
- package/dist/PageTabs/index.d.ts +0 -3
- package/dist/PageTabs/styles.d.ts +0 -2
- package/dist/Pagination/Pagination.d.ts +0 -10
- package/dist/Pagination/PaginationActions.d.ts +0 -11
- package/dist/Pagination/PaginationRowNumberSelect.d.ts +0 -11
- package/dist/Pagination/TablePagination.d.ts +0 -6
- package/dist/Pagination/index.d.ts +0 -4
- package/dist/Pagination/styles.d.ts +0 -2
- package/dist/PillLink/PillLink.d.ts +0 -15
- package/dist/PillLink/index.d.ts +0 -1
- package/dist/PillLink/styles.d.ts +0 -2
- package/dist/ResponsiveTable/ResponsiveTable.d.ts +0 -8
- package/dist/ResponsiveTable/index.d.ts +0 -1
- package/dist/ResponsiveTable/styles.d.ts +0 -2
- package/dist/Savebar/ButtonTooltipDecorator.d.ts +0 -6
- package/dist/Savebar/Savebar.d.ts +0 -14
- package/dist/Savebar/Savebar.stories.d.ts +0 -6
- package/dist/Savebar/index.d.ts +0 -1
- package/dist/Savebar/styles.d.ts +0 -2
- package/dist/ScrollShadow/ScrollShadow.d.ts +0 -6
- package/dist/ScrollShadow/index.d.ts +0 -1
- package/dist/ScrollShadow/styles.d.ts +0 -1
- package/dist/Sidebar/ExpandButton.d.ts +0 -6
- package/dist/Sidebar/MenuItem.d.ts +0 -11
- package/dist/Sidebar/Sidebar.d.ts +0 -6
- package/dist/Sidebar/Sidebar.stories.d.ts +0 -6
- package/dist/Sidebar/fixtures.d.ts +0 -2
- package/dist/Sidebar/index.d.ts +0 -4
- package/dist/Sidebar/types.d.ts +0 -16
- package/dist/SidebarDrawer/MenuItemBtn.d.ts +0 -7
- package/dist/SidebarDrawer/SidebarDrawer.d.ts +0 -4
- package/dist/SidebarDrawer/SidebarDrawer.stories.d.ts +0 -4
- package/dist/SidebarDrawer/index.d.ts +0 -2
- package/dist/SidebarDrawer/styles.d.ts +0 -2
- package/dist/SquareButton/SquareButton.d.ts +0 -3
- package/dist/SquareButton/SquareButton.stories.d.ts +0 -5
- package/dist/SquareButton/index.d.ts +0 -1
- package/dist/StatusChip/StatusChip.d.ts +0 -3
- package/dist/StatusChip/StatusChip.stories.d.ts +0 -8
- package/dist/StatusChip/index.d.ts +0 -2
- package/dist/StatusChip/styles.d.ts +0 -3
- package/dist/StatusChip/types.d.ts +0 -8
- package/dist/Tooltip/Tooltip.d.ts +0 -6
- package/dist/Tooltip/Tooltip.stories.d.ts +0 -7
- package/dist/Tooltip/index.d.ts +0 -1
- package/dist/Tooltip/styles.d.ts +0 -3
- package/dist/UserChipMenu/UserChipMenu.d.ts +0 -9
- package/dist/UserChipMenu/UserChipMenu.stories.d.ts +0 -6
- package/dist/UserChipMenu/UserChipMenuItem.d.ts +0 -6
- package/dist/UserChipMenu/context.d.ts +0 -4
- package/dist/UserChipMenu/index.d.ts +0 -2
- package/dist/UserChipMenu/styles.d.ts +0 -2
- package/dist/extensions/index.d.ts +0 -3
- package/dist/extensions/sendMessage.d.ts +0 -3
- package/dist/extensions/types.d.ts +0 -22
- package/dist/extensions/useExtensionMessage.d.ts +0 -2
- package/dist/icons/ArrowDropdownIcon.d.ts +0 -2
- package/dist/icons/ArrowRightIcon.d.ts +0 -1
- package/dist/icons/CheckboxCheckedIcon.d.ts +0 -1
- package/dist/icons/CheckboxIcon.d.ts +0 -1
- package/dist/icons/CheckboxIndeterminateIcon.d.ts +0 -1
- package/dist/icons/CloseIcon.d.ts +0 -1
- package/dist/icons/CompleteIcon.d.ts +0 -2
- package/dist/icons/DeleteIcon.d.ts +0 -1
- package/dist/icons/EditIcon.d.ts +0 -1
- package/dist/icons/FilteringIcon.d.ts +0 -1
- package/dist/icons/ImageIcon.d.ts +0 -1
- package/dist/icons/InfoIcon.d.ts +0 -2
- package/dist/icons/Logo.d.ts +0 -2
- package/dist/icons/LogoLight.d.ts +0 -2
- package/dist/icons/MoreIcon.d.ts +0 -1
- package/dist/icons/NavigatorIcon.d.ts +0 -1
- package/dist/icons/NotAllowedIcon.d.ts +0 -2
- package/dist/icons/NotAllowedInvertedIcon.d.ts +0 -2
- package/dist/icons/PlusIcon.d.ts +0 -1
- package/dist/icons/RadioCheckedIcon.d.ts +0 -1
- package/dist/icons/RadioIcon.d.ts +0 -1
- package/dist/icons/SearchIcon.d.ts +0 -1
- package/dist/icons/WarningIcon.d.ts +0 -2
- package/dist/icons/index.d.ts +0 -18
- package/dist/index.d.ts +0 -29
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -7
- package/dist/localStorageKeys.d.ts +0 -4
- package/dist/mjs/index.js +0 -5
- package/dist/mjs/index.js.map +0 -7
- package/dist/theme/Baseline.d.ts +0 -2
- package/dist/theme/ThemeProvider.d.ts +0 -17
- package/dist/theme/context.d.ts +0 -3
- package/dist/theme/createSaleorTheme/createSaleorTheme.d.ts +0 -3
- package/dist/theme/createSaleorTheme/index.d.ts +0 -2
- package/dist/theme/createSaleorTheme/overrides/buttons.d.ts +0 -3
- package/dist/theme/createSaleorTheme/overrides/controls.d.ts +0 -3
- package/dist/theme/createSaleorTheme/overrides/index.d.ts +0 -3
- package/dist/theme/createSaleorTheme/overrides/inputs.d.ts +0 -3
- package/dist/theme/createSaleorTheme/overrides/tables.d.ts +0 -3
- package/dist/theme/createSaleorTheme/palette.d.ts +0 -2
- package/dist/theme/createSaleorTheme/shadows.d.ts +0 -2
- package/dist/theme/createSaleorTheme/types.d.ts +0 -51
- package/dist/theme/index.d.ts +0 -4
- package/dist/theme/styles.d.ts +0 -5
- package/dist/theme/themes.d.ts +0 -3
- package/dist/theme/types.d.ts +0 -6
- package/dist/theme/utils.d.ts +0 -1
- package/dist/theme/utils.test.d.ts +0 -1
- package/dist/tools/index.d.ts +0 -2
- package/dist/tools/useElementScroll.d.ts +0 -12
- package/dist/tools/useLocalStorage.d.ts +0 -5
- package/dist/tools/useWindowScroll.d.ts +0 -4
- package/dist/types/StatusChip/styles.d.ts +0 -3
- package/dist/utils/Decorator.d.ts +0 -4
- package/dist/utils/useListStory.d.ts +0 -21
package/dist/theme/Baseline.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Theme } from "@material-ui/core/styles";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Themes, ThemeType } from "./createSaleorTheme";
|
|
4
|
-
export interface ThemeProviderProps {
|
|
5
|
-
defaultTheme?: ThemeType;
|
|
6
|
-
/**
|
|
7
|
-
* Passing an object here will result in losing visual consistency with
|
|
8
|
-
* Saleor's Dashboard. Use with caution.
|
|
9
|
-
*/
|
|
10
|
-
palettes?: Partial<Themes>;
|
|
11
|
-
/**
|
|
12
|
-
* Passing an object here will result in losing visual consistency with
|
|
13
|
-
* Saleor's Dashboard. Use with caution.
|
|
14
|
-
*/
|
|
15
|
-
overrides?: Partial<Theme>;
|
|
16
|
-
}
|
|
17
|
-
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
package/dist/theme/context.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { Theme, ThemeOptions } from "@material-ui/core/styles";
|
|
2
|
-
export declare type ThemeType = "light" | "dark";
|
|
3
|
-
export declare type SaleorThemeColors = Record<"primary" | "secondary" | "error" | "paperBorder" | "autofill" | "success" | "disabled", string> & {
|
|
4
|
-
highlightInactive: Record<"default", string>;
|
|
5
|
-
} & {
|
|
6
|
-
background: Record<"default" | "paper", string>;
|
|
7
|
-
} & {
|
|
8
|
-
checkbox: Record<"default", string>;
|
|
9
|
-
} & {
|
|
10
|
-
divider: string;
|
|
11
|
-
} & {
|
|
12
|
-
font: Record<"default" | "gray" | "button" | "textButton" | "textDisabled", string>;
|
|
13
|
-
} & {
|
|
14
|
-
gray: Record<"default" | "disabled", string>;
|
|
15
|
-
} & {
|
|
16
|
-
alert: AlertColors;
|
|
17
|
-
theme: ThemeType;
|
|
18
|
-
fail: Record<"dark" | "mid" | "light", string>;
|
|
19
|
-
main: Record<1 | 2 | 3 | 4, string>;
|
|
20
|
-
active: Record<1 | 2 | 3 | 4 | 5, string>;
|
|
21
|
-
errorAction: Record<1 | 2 | 3 | 4 | 5, string>;
|
|
22
|
-
};
|
|
23
|
-
export declare type AlertPalette = Record<"success" | "error" | "warning" | "info", string>;
|
|
24
|
-
export declare type AlertColors = Record<"paper" | "icon", AlertPalette>;
|
|
25
|
-
interface ExtraPalette {
|
|
26
|
-
alert: AlertColors;
|
|
27
|
-
saleor: SaleorThemeColors;
|
|
28
|
-
textHighlighted: {
|
|
29
|
-
active: string;
|
|
30
|
-
inactive: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
declare type ExtraPaletteOptions = Partial<ExtraPalette>;
|
|
34
|
-
export declare type SaleorPalette = Theme["palette"] & ExtraPalette;
|
|
35
|
-
export declare type SaleorPaletteOptions = ThemeOptions["palette"] & ExtraPaletteOptions;
|
|
36
|
-
export interface SaleorSpacing {
|
|
37
|
-
(): string;
|
|
38
|
-
(value: number): string;
|
|
39
|
-
(topBottom: number, rightLeft: number): string;
|
|
40
|
-
(top: number, rightLeft: number, bottom: number): string;
|
|
41
|
-
(top: number, right: number, bottom: number, left: number): string;
|
|
42
|
-
}
|
|
43
|
-
export interface SaleorTheme extends Omit<Theme, "spacing"> {
|
|
44
|
-
palette: SaleorPalette;
|
|
45
|
-
spacing: SaleorSpacing;
|
|
46
|
-
}
|
|
47
|
-
export interface SaleorThemeOptions extends ThemeOptions {
|
|
48
|
-
palette: SaleorPaletteOptions;
|
|
49
|
-
}
|
|
50
|
-
export declare type Themes = Record<ThemeType, SaleorThemeColors>;
|
|
51
|
-
export {};
|
package/dist/theme/index.d.ts
DELETED
package/dist/theme/styles.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ClassNameMap, Styles, WithStylesOptions } from "@material-ui/styles/withStyles";
|
|
2
|
-
import { SaleorTheme } from "./createSaleorTheme/types";
|
|
3
|
-
import type { SaleorThemeContext } from "./types";
|
|
4
|
-
export declare function makeStyles<Props extends Record<string, any> = {}, ClassKey extends string = string>(styles: Styles<SaleorTheme, Props, ClassKey>, options?: Omit<WithStylesOptions<SaleorTheme>, "withTheme">): keyof Props extends never ? (props?: any) => ClassNameMap<ClassKey> : (props: Props) => ClassNameMap<ClassKey>;
|
|
5
|
-
export declare function useTheme(): SaleorTheme & SaleorThemeContext;
|
package/dist/theme/themes.d.ts
DELETED
package/dist/theme/types.d.ts
DELETED
package/dist/theme/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function changeColorMeta(color: string): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/tools/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type Position = Record<"x" | "y", number>;
|
|
3
|
-
export declare function isScrolledToBottom(anchor: HTMLElement, position: Position, offset?: number): boolean | undefined;
|
|
4
|
-
export declare function isScrolledToTop(anchor: HTMLElement, position: Position, offset?: number): boolean | undefined;
|
|
5
|
-
export interface UseElementScrollOpts<T extends HTMLElement> {
|
|
6
|
-
anchor: T | null;
|
|
7
|
-
position: Position | undefined;
|
|
8
|
-
}
|
|
9
|
-
export interface UseElementScroll<T extends HTMLElement> extends UseElementScrollOpts<T> {
|
|
10
|
-
setAnchor: React.Dispatch<T | null>;
|
|
11
|
-
}
|
|
12
|
-
export declare function useElementScroll<T extends HTMLElement>(): UseElementScroll<T>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface TableDataRow {
|
|
3
|
-
name: string;
|
|
4
|
-
calories: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function useListStory(initialRowsPerPage?: number): {
|
|
7
|
-
data: TableDataRow[];
|
|
8
|
-
pageData: TableDataRow[];
|
|
9
|
-
page: number;
|
|
10
|
-
nextPage: () => void;
|
|
11
|
-
previousPage: () => void;
|
|
12
|
-
hasNextPage: boolean;
|
|
13
|
-
hasPreviousPage: boolean;
|
|
14
|
-
rowsPerPage: number;
|
|
15
|
-
setRowsPerPage: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
16
|
-
selected: string[];
|
|
17
|
-
isRowSelected: (name: string) => boolean;
|
|
18
|
-
toggleRow: (name: string) => void;
|
|
19
|
-
toggleAll: () => void;
|
|
20
|
-
};
|
|
21
|
-
export {};
|