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.
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './page.css';
3
+ export declare const Page: React.VFC;
@@ -0,0 +1,5 @@
1
+ import { ComponentMeta } from '@storybook/react';
2
+ declare const _default: ComponentMeta<React.VFC>;
3
+ export default _default;
4
+ export declare const LoggedOut: any;
5
+ export declare const LoggedIn: any;
@@ -0,0 +1,3 @@
1
+ import * as L from 'leaflet';
2
+ declare const MarkerIconFactory: (shape: string, color1: string, color2: string, icon: string) => L.DivIcon;
3
+ export default MarkerIconFactory;
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "utopia-ui",
3
- "version": "1.0.2",
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",