utopia-ui 1.0.8 → 2.0.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 +31 -73
- package/dist/Components/AppShell/AppShell.d.ts +6 -0
- package/dist/Components/AppShell/Content.d.ts +6 -0
- package/dist/Components/AppShell/NavBar.d.ts +5 -0
- package/dist/Components/AppShell/SideBar.d.ts +11 -0
- package/dist/Components/AppShell/SidebarSubmenu.d.ts +8 -0
- package/dist/Components/AppShell/index.d.ts +3 -0
- package/dist/Components/Auth/auth.d.ts +24 -0
- package/dist/Components/Auth/authDirectus.d.ts +30 -0
- package/dist/Components/Auth/index.d.ts +1 -0
- package/dist/Components/Gaming/Modal.d.ts +9 -0
- package/dist/Components/Gaming/Quests.d.ts +2 -0
- package/dist/Components/Gaming/index.d.ts +2 -0
- package/dist/Components/Input/InputText.d.ts +12 -0
- package/dist/Components/Input/TextAreaInput.d.ts +11 -0
- package/dist/Components/Map/UtopiaMap.d.ts +5 -4
- package/dist/Components/Map/UtopiaMap.stories.d.ts +0 -1
- package/dist/Components/Map/hooks/useItems.d.ts +3 -1
- package/dist/Components/Map/index.d.ts +1 -1
- package/dist/Components/Profile/Settings.d.ts +5 -0
- package/dist/Components/Profile/index.d.ts +1 -0
- package/dist/Components/TitleCard.d.ts +9 -0
- package/dist/Components/Typography/Subtitle.d.ts +6 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +658 -167
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +8 -8
- package/package.json +23 -29
- package/dist/Components/Map/AddButton.d.ts +0 -4
- package/dist/Components/Map/NewItemPopup.d.ts +0 -9
- package/dist/Components/Map/Popup.d.ts +0 -8
- package/dist/Components/Map/Subcomponents/EditItemPopup.d.ts +0 -10
- package/dist/Components/Map/data.new.d.ts +0 -4
- package/dist/Components/Map/hooks/useContext.d.ts +0 -7
- package/dist/Components/Map/hooks/useForceUpdate.d.ts +0 -1
- package/dist/Components/Map/hooks/useMapContext.d.ts +0 -11
- package/dist/Components/Map/hooks/useNewItemPopup.d.ts +0 -12
- package/dist/Components/Map/useItems.d.ts +0 -16
- package/dist/Components/Map/useLayers.d.ts +0 -18
- package/dist/Components/Map/useTags.d.ts +0 -16
- package/dist/stories/Button.d.ts +0 -29
- package/dist/stories/Header.d.ts +0 -13
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.stories.d.ts +0 -5
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NewItemPopupProps } from "../Subcomponents/NewItemPopup";
|
|
3
|
-
declare function useNewItem(): {
|
|
4
|
-
newItemPopup: NewItemPopupProps | null;
|
|
5
|
-
setNewItemPopup: import("react").Dispatch<import("react").SetStateAction<NewItemPopupProps | null>>;
|
|
6
|
-
};
|
|
7
|
-
export default useNewItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useForceUpdate(): () => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Layer } from "../../../types";
|
|
3
|
-
import { NewItemPopupProps } from "../Subcomponents/NewItemPopup";
|
|
4
|
-
export declare const MapContextProvider: React.FunctionComponent<{
|
|
5
|
-
initialValues: {
|
|
6
|
-
selectMode: null;
|
|
7
|
-
newItemPopup: null;
|
|
8
|
-
};
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
export declare const useMapContext: () => (Layer | React.Dispatch<React.SetStateAction<Layer | null>> | NewItemPopupProps | React.Dispatch<React.SetStateAction<NewItemPopupProps | null>> | null)[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NewItemPopupProps } from "../Subcomponents/NewItemPopup";
|
|
3
|
-
declare type ContextType = {
|
|
4
|
-
newItemPopup: NewItemPopupProps | null;
|
|
5
|
-
setNewItemPopup: (value: NewItemPopupProps | null) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const NewItemPopupProvider: (prop: {
|
|
8
|
-
value?: string;
|
|
9
|
-
children: JSX.Element | JSX.Element[];
|
|
10
|
-
}) => JSX.Element;
|
|
11
|
-
declare const useNewItemPopup: () => ContextType;
|
|
12
|
-
export default useNewItemPopup;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Item } from "../../types";
|
|
3
|
-
declare type UseItemManagerResult = ReturnType<typeof useItemsManager>;
|
|
4
|
-
declare function useItemsManager(initialItems: Item[]): {
|
|
5
|
-
items: Item[];
|
|
6
|
-
addItem: (item: Item) => void;
|
|
7
|
-
removeItem: (id: number) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const ItemsProvider: React.FunctionComponent<{
|
|
10
|
-
initialItems: Item[];
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const useItems: () => Item[];
|
|
14
|
-
export declare const useAddItem: () => UseItemManagerResult["addItem"];
|
|
15
|
-
export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
|
|
16
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Item, Layer } from "../../types";
|
|
3
|
-
declare type UseItemManagerResult = ReturnType<typeof useLayerManager>;
|
|
4
|
-
declare function useLayerManager(initialLayers: Map<string, Layer>): {
|
|
5
|
-
layers: Map<string, Layer>;
|
|
6
|
-
addLayer: (layer: Layer) => void;
|
|
7
|
-
addItem: (item: Item, layer: Layer) => void;
|
|
8
|
-
removeItem: (id: number, layer: Layer) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const LayersProvider: React.FunctionComponent<{
|
|
11
|
-
initialLayers: Map<string, Layer>;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const useLayers: () => Map<string, Layer>;
|
|
15
|
-
export declare const useAddLayer: () => UseItemManagerResult["addLayer"];
|
|
16
|
-
export declare const useAddItem: () => UseItemManagerResult["addItem"];
|
|
17
|
-
export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
|
|
18
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Tag } from "../../types";
|
|
3
|
-
declare type UseTagManagerResult = ReturnType<typeof useTagsManager>;
|
|
4
|
-
declare function useTagsManager(initialTags: Tag[]): {
|
|
5
|
-
tags: Tag[];
|
|
6
|
-
addTag: (tag: Tag) => void;
|
|
7
|
-
removeTag: (id: number) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const TagsProvider: React.FunctionComponent<{
|
|
10
|
-
initialTags: Tag[];
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const useTags: () => Tag[];
|
|
14
|
-
export declare const useAddTag: () => UseTagManagerResult["addTag"];
|
|
15
|
-
export declare const useRemoveTag: () => UseTagManagerResult["removeTag"];
|
|
16
|
-
export {};
|
package/dist/stories/Button.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './button.css';
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Is this the principal call to action on the page?
|
|
6
|
-
*/
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* What background color to use
|
|
10
|
-
*/
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
/**
|
|
13
|
-
* How large should the button be?
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/**
|
|
17
|
-
* Button contents
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional click handler
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Primary UI component for user interaction
|
|
27
|
-
*/
|
|
28
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|
|
29
|
-
export {};
|
package/dist/stories/Header.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './header.css';
|
|
3
|
-
declare type User = {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
interface HeaderProps {
|
|
7
|
-
user?: User;
|
|
8
|
-
onLogin: () => void;
|
|
9
|
-
onLogout: () => void;
|
|
10
|
-
onCreateAccount: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
|
|
13
|
-
export {};
|
package/dist/stories/Page.d.ts
DELETED