@universal-tennis/ui-shared 0.1.39 → 0.1.41

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.
@@ -1,5 +1,7 @@
1
1
  export { default as Button } from "./stories/atoms/Button/Button";
2
2
  export { default as Typography } from "./stories/atoms/Typography/Typography";
3
+ export { default as CalendarIcon } from "./stories/atoms/Icons/CalendarIcon";
4
+ export { default as SessionIcon } from "./stories/atoms/Icons/SessionIcon";
3
5
  export { default as ContactCard } from "./stories/molecules/Cards/ContactCard";
4
6
  export { default as DrawCard } from "./stories/molecules/Cards/DrawCard";
5
7
  export { default as TeamCard } from "./stories/molecules/Cards/TeamCard";
@@ -2,6 +2,8 @@ import "./stories/assets/css/variables.css";
2
2
  // ATOMS
3
3
  export { default as Button } from './stories/atoms/Button/Button';
4
4
  export { default as Typography } from './stories/atoms/Typography/Typography';
5
+ export { default as CalendarIcon } from './stories/atoms/Icons/CalendarIcon';
6
+ export { default as SessionIcon } from './stories/atoms/Icons/SessionIcon';
5
7
  // MOLECULES
6
8
  export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
7
9
  export { default as DrawCard } from './stories/molecules/Cards/DrawCard';
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAE5C,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAE9E,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEzE,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAE5C,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAE3E,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEzE,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface MapProps {
3
+ placeId: string;
4
+ height: string;
5
+ }
6
+ export default function Map({ placeId, height }: MapProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export default function Map({ placeId, height }) {
3
+ const placeParam = placeId && `q=place_id:${placeId}`;
4
+ const placeUrl = `https://www.google.com/maps/embed/v1/place?key=AIzaSyCapzh9VsfXAzC9fAaosZJulONx7H1BFaY&${placeParam}`;
5
+ const mapheight = height || `216px`;
6
+ return (React.createElement("iframe", { width: "100%", height: mapheight, src: placeUrl, title: "Google Maps" }));
7
+ }
8
+ //# sourceMappingURL=Map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Map/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,OAAO,EAAE,MAAM,EACN;IACT,MAAM,UAAU,GAAG,OAAO,IAAI,cAAc,OAAO,EAAE,CAAC;IACtD,MAAM,QAAQ,GAAG,0FAA0F,UAAU,EAAE,CAAC;IAExH,MAAM,SAAS,GAAG,MAAM,IAAI,OAAO,CAAC;IACpC,OAAO,CACH,gCACI,KAAK,EAAC,MAAM,EACZ,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAC,aAAa,GACrB,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: any;
6
+ export declare const WithCustomHeight: any;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import Map from './Map';
3
+ // Default
4
+ export default {
5
+ title: 'Atoms/Map',
6
+ };
7
+ // Templates
8
+ function MapTemplate(args) {
9
+ return React.createElement(Map, Object.assign({}, args));
10
+ }
11
+ // Stories
12
+ export const Default = MapTemplate.bind({});
13
+ Default.args = {
14
+ placeId: 'ChIJj6tQBWXIxokRXeXk9xqsgMo',
15
+ };
16
+ export const WithCustomHeight = MapTemplate.bind({});
17
+ WithCustomHeight.args = {
18
+ placeId: 'ChIJj6tQBWXIxokRXeXk9xqsgMo',
19
+ height: '320px'
20
+ };
21
+ //# sourceMappingURL=Map.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Map.stories.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Map/Map.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,GAAiB,MAAM,OAAO,CAAC;AAEtC,UAAU;AACV,eAAe;IACb,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,YAAY;AACZ,SAAS,WAAW,CAAC,IAAc;IACjC,OAAO,oBAAC,GAAG,oBAAK,IAAI,EAAI,CAAC;AAC3B,CAAC;AAED,UAAU;AACV,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,gBAAgB,CAAC,IAAI,GAAG;IACtB,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,OAAO;CAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-tennis/ui-shared",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "main": "dist/items.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://universaltennis.com",
@@ -3,6 +3,8 @@ import "./stories/assets/css/variables.css";
3
3
  // ATOMS
4
4
  export { default as Button } from './stories/atoms/Button/Button';
5
5
  export { default as Typography } from './stories/atoms/Typography/Typography';
6
+ export { default as CalendarIcon } from './stories/atoms/Icons/CalendarIcon';
7
+ export { default as SessionIcon } from './stories/atoms/Icons/SessionIcon';
6
8
 
7
9
  // MOLECULES
8
10
  export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+
3
+ import Map, { MapProps } from './Map';
4
+
5
+ // Default
6
+ export default {
7
+ title: 'Atoms/Map',
8
+ };
9
+
10
+ // Templates
11
+ function MapTemplate(args: MapProps) {
12
+ return <Map {...args} />;
13
+ }
14
+
15
+ // Stories
16
+ export const Default = MapTemplate.bind({});
17
+ Default.args = {
18
+ placeId: 'ChIJj6tQBWXIxokRXeXk9xqsgMo',
19
+ };
20
+
21
+ export const WithCustomHeight = MapTemplate.bind({});
22
+ WithCustomHeight.args = {
23
+ placeId: 'ChIJj6tQBWXIxokRXeXk9xqsgMo',
24
+ height: '320px'
25
+ };
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+
3
+ export interface MapProps {
4
+ placeId: string;
5
+ height: string;
6
+ }
7
+
8
+ export default function Map({
9
+ placeId, height
10
+ }: MapProps) {
11
+ const placeParam = placeId && `q=place_id:${placeId}`;
12
+ const placeUrl = `https://www.google.com/maps/embed/v1/place?key=AIzaSyCapzh9VsfXAzC9fAaosZJulONx7H1BFaY&${placeParam}`;
13
+
14
+ const mapheight = height || `216px`;
15
+ return (
16
+ <iframe
17
+ width="100%"
18
+ height={mapheight}
19
+ src={placeUrl}
20
+ title="Google Maps"
21
+ />
22
+ );
23
+ }