utopia-ui 1.0.2 → 1.0.3
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/dist/components/Map.d.ts +12 -0
- package/dist/components/include/MarkerPopup.d.ts +28 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/stories/Button.d.ts +29 -0
- package/dist/stories/Header.d.ts +13 -0
- package/dist/stories/Page.d.ts +3 -0
- package/dist/stories/Page.stories.d.ts +5 -0
- package/dist/utils/MarkerIconFactory.d.ts +3 -0
- package/package.json +3 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "leaflet/dist/leaflet.css";
|
|
3
|
+
import { IMapItem } from "./include/MarkerPopup";
|
|
4
|
+
import "./styles.scss";
|
|
5
|
+
export interface IMapProps {
|
|
6
|
+
height: string;
|
|
7
|
+
width: string;
|
|
8
|
+
places?: IMapItem[];
|
|
9
|
+
events?: IMapItem[];
|
|
10
|
+
}
|
|
11
|
+
declare const Map: (props: IMapProps) => JSX.Element;
|
|
12
|
+
export default Map;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IMarkerPopupProps {
|
|
3
|
+
item: IMapItem;
|
|
4
|
+
}
|
|
5
|
+
export interface IMapItem {
|
|
6
|
+
id?: string;
|
|
7
|
+
date_created?: string;
|
|
8
|
+
date_updated?: string | null;
|
|
9
|
+
name: string;
|
|
10
|
+
text: string;
|
|
11
|
+
position: IGeometry;
|
|
12
|
+
start?: string;
|
|
13
|
+
end?: string;
|
|
14
|
+
tags: ITag[];
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export interface IGeometry {
|
|
18
|
+
type: string;
|
|
19
|
+
coordinates: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface ITag {
|
|
22
|
+
Tags_id: {
|
|
23
|
+
color: string;
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
declare const MarkerPopup: (props: IMarkerPopupProps) => JSX.Element;
|
|
28
|
+
export default MarkerPopup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Map } from "./Map";
|
|
@@ -0,0 +1,29 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utopia-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Reuseable React Components to build mapping apps for all kinds of communities ",
|
|
5
|
+
"repository": "https://github.com/utopia-os/utopia-ui",
|
|
6
|
+
"homepage:": "https://utopia.os/",
|
|
5
7
|
"main": "dist/index.js",
|
|
6
8
|
"scripts": {
|
|
7
9
|
"build": "rollup -c",
|