@jsonui/react 0.3.0 → 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.
Files changed (62) hide show
  1. package/dist/cjs/index.js +787 -1709
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/MessageReceiver.d.ts +2 -0
  4. package/dist/cjs/types/MessageReceiverContext.d.ts +8 -0
  5. package/dist/cjs/types/ReduxProviders.d.ts +1 -9
  6. package/dist/cjs/types/ViewerWeb.d.ts +2 -10
  7. package/dist/cjs/types/Wrapper.d.ts +5 -3
  8. package/dist/cjs/types/index.d.ts +4 -3
  9. package/dist/cjs/types/stock/components/Fragment.d.ts +5 -3
  10. package/dist/cjs/types/stock/components/PrimitiveProp.d.ts +3 -2
  11. package/dist/cjs/types/stock/components/Text.d.ts +1 -1
  12. package/dist/cjs/types/stock/components/View.d.ts +1 -1
  13. package/dist/cjs/types/stories/JsonUI.stories.d.ts +3 -3
  14. package/dist/cjs/types/stories/MultiChild.stories.d.ts +5 -0
  15. package/dist/cjs/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +5 -0
  16. package/dist/cjs/types/stories/ReduxTest.stories.d.ts +6 -0
  17. package/dist/cjs/types/stories/Simple.stories.d.ts +5 -0
  18. package/dist/cjs/types/stories/Table.stories.d.ts +5 -0
  19. package/dist/cjs/types/types.d.ts +23 -0
  20. package/dist/esm/index.js +787 -1711
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/types/MessageReceiver.d.ts +2 -0
  23. package/dist/esm/types/MessageReceiverContext.d.ts +8 -0
  24. package/dist/esm/types/ReduxProviders.d.ts +1 -9
  25. package/dist/esm/types/ViewerWeb.d.ts +2 -10
  26. package/dist/esm/types/Wrapper.d.ts +5 -3
  27. package/dist/esm/types/index.d.ts +4 -3
  28. package/dist/esm/types/stock/components/Fragment.d.ts +5 -3
  29. package/dist/esm/types/stock/components/PrimitiveProp.d.ts +3 -2
  30. package/dist/esm/types/stock/components/Text.d.ts +1 -1
  31. package/dist/esm/types/stock/components/View.d.ts +1 -1
  32. package/dist/esm/types/stories/JsonUI.stories.d.ts +3 -3
  33. package/dist/esm/types/stories/MultiChild.stories.d.ts +5 -0
  34. package/dist/esm/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +5 -0
  35. package/dist/esm/types/stories/ReduxTest.stories.d.ts +6 -0
  36. package/dist/esm/types/stories/Simple.stories.d.ts +5 -0
  37. package/dist/esm/types/stories/Table.stories.d.ts +5 -0
  38. package/dist/esm/types/types.d.ts +23 -0
  39. package/dist/index.d.ts +9 -18
  40. package/package.json +4 -4
  41. package/dist/cjs/types/indexModule.d.ts +0 -6
  42. package/dist/cjs/types/stock/components/FieldEdit.d.ts +0 -3
  43. package/dist/cjs/types/stock/components.d.ts +0 -20
  44. package/dist/cjs/types/stock/stockToRenderer.d.ts +0 -22
  45. package/dist/cjs/types/store/store.d.ts +0 -7
  46. package/dist/cjs/types/stories/Button.d.ts +0 -28
  47. package/dist/cjs/types/stories/Button.stories.d.ts +0 -8
  48. package/dist/cjs/types/stories/Header.d.ts +0 -12
  49. package/dist/cjs/types/stories/Header.stories.d.ts +0 -6
  50. package/dist/cjs/types/stories/Page.d.ts +0 -3
  51. package/dist/cjs/types/stories/Page.stories.d.ts +0 -6
  52. package/dist/esm/types/indexModule.d.ts +0 -6
  53. package/dist/esm/types/stock/components/FieldEdit.d.ts +0 -3
  54. package/dist/esm/types/stock/components.d.ts +0 -20
  55. package/dist/esm/types/stock/stockToRenderer.d.ts +0 -22
  56. package/dist/esm/types/store/store.d.ts +0 -7
  57. package/dist/esm/types/stories/Button.d.ts +0 -28
  58. package/dist/esm/types/stories/Button.stories.d.ts +0 -8
  59. package/dist/esm/types/stories/Header.d.ts +0 -12
  60. package/dist/esm/types/stories/Header.stories.d.ts +0 -6
  61. package/dist/esm/types/stories/Page.d.ts +0 -3
  62. package/dist/esm/types/stories/Page.stories.d.ts +0 -6
@@ -0,0 +1,2 @@
1
+ declare const MessageReceiver: () => null;
2
+ export default MessageReceiver;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ChangeDefaultValueFunc } from 'types';
3
+ export declare class MessageHandler {
4
+ updateDefaultValueHandler?: ChangeDefaultValueFunc;
5
+ set: (newFunc: ChangeDefaultValueFunc) => void;
6
+ get: () => ChangeDefaultValueFunc | undefined;
7
+ }
8
+ export declare const MessageHandlerContext: import("react").Context<MessageHandler | null>;
@@ -2,15 +2,7 @@
2
2
  import React, { ReactNode } from 'react';
3
3
  import { Store, AnyAction } from 'redux';
4
4
  import { Persistor } from 'redux-persist/es/types';
5
- export declare type JSONPrimitive = string | number | boolean | null;
6
- export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
7
- export declare type JSONObject = {
8
- [member: string]: JSONValue;
9
- };
10
- export declare type JSONArray = Array<JSONValue>;
11
- export interface DefaultValues {
12
- [key: string]: JSONValue;
13
- }
5
+ import { DefaultValues } from 'types';
14
6
  declare type MyProps = {
15
7
  children: ReactNode;
16
8
  defaultValues?: DefaultValues;
@@ -1,12 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { DefaultValues } from './ReduxProviders';
3
- export interface ViewerProps {
4
- model: any;
5
- defaultValues?: DefaultValues;
6
- id?: string;
7
- components?: any;
8
- functions?: any;
9
- disabledPersist?: boolean;
10
- }
11
- declare function ViewerWeb(props: ViewerProps): JSX.Element;
2
+ import { ViewerProps } from 'types';
3
+ declare function ViewerWeb({ defaultValues, disabledPersist, ...props }: ViewerProps): JSX.Element;
12
4
  export default ViewerWeb;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { PropsType } from '@jsonui/core';
3
- export declare const getStyleForWeb: (props: PropsType | undefined, component: string) => any;
4
- declare function WrapperOuter(props: any): JSX.Element;
5
- export default WrapperOuter;
3
+ export declare const getStyle: (props: PropsType | undefined, component: string) => any;
4
+ declare function Wrapper({ props: origProps }: {
5
+ props: any;
6
+ }): JSX.Element | null;
7
+ export default Wrapper;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ViewerProps } from './ViewerWeb';
2
+ import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from 'types';
3
+ import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
3
4
  declare type JsonUIProps = ViewerProps;
4
5
  declare const JsonUI: (props: JsonUIProps) => JSX.Element;
5
- export { JsonUI };
6
- export type { JsonUIProps };
6
+ export { JsonUI, MessageHandlerContext, MessageHandler };
7
+ export type { JsonUIProps, JSONValue, ChangeDefaultValueFuncProp };
@@ -1,4 +1,6 @@
1
- declare const Fragment: ({ children }: {
2
- children: any;
3
- }) => any;
1
+ /// <reference types="react" />
2
+ import { constants as c } from '@jsonui/core';
3
+ declare const Fragment: ({ [c.V_CHILDREN_NAME]: props, ...a }: {
4
+ [c.V_CHILDREN_NAME]: any;
5
+ }) => JSX.Element;
4
6
  export default Fragment;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- declare function PrimitiveProp({ children }: {
3
- children: any;
2
+ import { constants as c } from '@jsonui/core';
3
+ declare function PrimitiveProp({ [c.V_CHILDREN_NAME]: children }: {
4
+ [c.V_CHILDREN_NAME]: any;
4
5
  }): JSX.Element;
5
6
  export default PrimitiveProp;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare function Text(props: any): JSX.Element;
2
+ declare function Text({ value, [c.V_CHILDREN_NAME]: children, ...props }: any): JSX.Element;
3
3
  export default Text;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare function View(props: any): JSX.Element;
2
+ declare function View({ [c.V_CHILDREN_NAME]: children, ...props }: any): JSX.Element;
3
3
  export default View;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const JsonUIStory: ComponentMeta<(props: import("../ViewerWeb").ViewerProps) => JSX.Element>;
4
- export declare const TableTest: ComponentStory<(props: import("../ViewerWeb").ViewerProps) => JSX.Element>;
5
- export declare const InputTest: ComponentStory<(props: import("../ViewerWeb").ViewerProps) => JSX.Element>;
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
4
+ export declare const TableTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
5
+ export declare const InputTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
6
6
  export default JsonUIStory;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
4
+ export declare const MultiChild: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
5
+ export default JsonUIStory;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../../types").ViewerProps) => JSX.Element>;
4
+ export declare const PartialValueUpdateTest: ComponentStory<(props: import("../../types").ViewerProps) => JSX.Element>;
5
+ export default JsonUIStory;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
4
+ export declare const TwoEditAnd1Modifier: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
5
+ export declare const PathModifierTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
6
+ export default JsonUIStory;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
4
+ export declare const PrimitivesTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
5
+ export default JsonUIStory;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
4
+ export declare const TableTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
5
+ export default JsonUIStory;
@@ -0,0 +1,23 @@
1
+ export declare type JSONPrimitive = string | number | boolean | null;
2
+ export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
3
+ export declare type JSONObject = {
4
+ [member: string]: JSONValue;
5
+ };
6
+ export declare type JSONArray = Array<JSONValue>;
7
+ export interface ChangeDefaultValueFuncProp {
8
+ store: string;
9
+ path: string;
10
+ value: JSONValue;
11
+ }
12
+ export declare type ChangeDefaultValueFunc = (arg: ChangeDefaultValueFuncProp) => void;
13
+ export interface DefaultValues {
14
+ [key: string]: JSONValue;
15
+ }
16
+ export interface ViewerProps {
17
+ model: any;
18
+ defaultValues?: DefaultValues;
19
+ id?: string;
20
+ components?: any;
21
+ functions?: any;
22
+ disabledPersist?: boolean;
23
+ }
package/dist/index.d.ts CHANGED
@@ -1,25 +1,16 @@
1
- /// <reference types="redux-persist/types/types" />
2
1
  /// <reference types="react" />
3
- declare type JSONPrimitive = string | number | boolean | null;
4
- declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
5
- declare type JSONObject = {
6
- [member: string]: JSONValue;
7
- };
8
- declare type JSONArray = Array<JSONValue>;
9
- interface DefaultValues {
10
- [key: string]: JSONValue;
11
- }
2
+ import { ChangeDefaultValueFunc, ViewerProps } from 'types';
3
+ export { ChangeDefaultValueFuncProp, JSONValue } from 'types';
4
+ import * as react from 'react';
12
5
 
13
- interface ViewerProps {
14
- model: any;
15
- defaultValues?: DefaultValues;
16
- id?: string;
17
- components?: any;
18
- functions?: any;
19
- disabledPersist?: boolean;
6
+ declare class MessageHandler {
7
+ updateDefaultValueHandler?: ChangeDefaultValueFunc;
8
+ set: (newFunc: ChangeDefaultValueFunc) => void;
9
+ get: () => ChangeDefaultValueFunc | undefined;
20
10
  }
11
+ declare const MessageHandlerContext: react.Context<MessageHandler | null>;
21
12
 
22
13
  declare type JsonUIProps = ViewerProps;
23
14
  declare const JsonUI: (props: JsonUIProps) => JSX.Element;
24
15
 
25
- export { JsonUI, JsonUIProps };
16
+ export { JsonUI, JsonUIProps, MessageHandler, MessageHandlerContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonui/react",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "author": "Istvan Fodor <fodori@jsonui.org>",
5
5
  "contributors": [],
6
6
  "bugs": {
@@ -31,13 +31,13 @@
31
31
  "scripts": {
32
32
  "build": "rollup -c",
33
33
  "lint": "eslint src --ext .jsx,.js,.tsx,.ts",
34
- "storybook": "start-storybook -p 6006",
34
+ "storybook": "export SET NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
35
35
  "build-storybook": "build-storybook",
36
36
  "test": "jest"
37
37
  },
38
38
  "dependencies": {
39
39
  "@emotion/react": "^11.7.1",
40
- "@jsonui/core": "^0.3.0",
40
+ "@jsonui/core": "^0.4.0",
41
41
  "batchflow": "^0.4.0",
42
42
  "jsonata": "^1.8.5",
43
43
  "lodash": "^4.17.21",
@@ -113,5 +113,5 @@
113
113
  "last 1 safari version"
114
114
  ]
115
115
  },
116
- "gitHead": "f0735aa16e801f97232fa951c479ab59f4d10758"
116
+ "gitHead": "db3f8b12f78c0ea9d4abbcac2cc9921558fba2d3"
117
117
  }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewerProps } from './ViewerWeb';
3
- declare type JsonUIProps = ViewerProps;
4
- declare const JsonUI: (props: JsonUIProps) => JSX.Element;
5
- export { JsonUI };
6
- export type { JsonUIProps };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CFieldEdit(props: any): JSX.Element;
3
- export default CFieldEdit;
@@ -1,20 +0,0 @@
1
- import Text from './components/Text';
2
- import Button from './components/Button';
3
- import Edit from './components/Edit';
4
- import View from './components/View';
5
- import Image from './components/Image';
6
- import _Undefined from './components/Undefined';
7
- import _PrimitiveProp from './components/PrimitiveProp';
8
- declare const Components: {
9
- View: typeof View;
10
- _PrimitiveProp: typeof _PrimitiveProp;
11
- _Undefined: typeof _Undefined;
12
- Fragment: ({ children }: {
13
- children: any;
14
- }) => any;
15
- Image: typeof Image;
16
- Text: typeof Text;
17
- Button: typeof Button;
18
- Edit: typeof Edit;
19
- };
20
- export default Components;
@@ -1,22 +0,0 @@
1
- import { Stock } from '@jsonui/core';
2
- export declare const getStock: (stockInit: any, model: any, Wrapper: any, reduxStore: any) => Stock;
3
- declare const stock: {
4
- components: {
5
- View: typeof import("./components/View").default;
6
- _PrimitiveProp: typeof import("./components/PrimitiveProp").default;
7
- _Undefined: typeof import("./components/Undefined").default;
8
- Fragment: ({ children }: {
9
- children: any;
10
- }) => any;
11
- Image: typeof import("./components/Image").default;
12
- Text: typeof import("./components/Text").default;
13
- Button: typeof import("./components/Button").default;
14
- Edit: typeof import("./components/Edit").default;
15
- };
16
- functions: {
17
- getStateValue: (attr: any, props: any, callerArgs: any, stock: any) => any;
18
- get: (attr: any, props: any, callerArgs: any, stock: any) => any;
19
- set: (attr: any, props: any, callerArgs: any, stock: any) => any;
20
- };
21
- };
22
- export default stock;
@@ -1,7 +0,0 @@
1
- /// <reference types="redux-persist/types/types" />
2
- /// <reference types="redux-persist" />
3
- declare const storeObj: {
4
- store: import("redux").Store<any, import("redux").AnyAction>;
5
- persistor: import("redux-persist").Persistor;
6
- };
7
- export default storeObj;
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- import './button.css';
3
- export 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;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
4
- export default _default;
5
- export declare const Primary: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
6
- export declare const Secondary: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
7
- export declare const Large: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
8
- export declare const Small: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './header.css';
3
- export declare type User = {
4
- name: string;
5
- };
6
- export 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;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
4
- export default _default;
5
- export declare const LoggedIn: ComponentStory<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
6
- export declare const LoggedOut: ComponentStory<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import './page.css';
3
- export declare const Page: React.VFC;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.VFC<{}>>;
4
- export default _default;
5
- export declare const LoggedOut: ComponentStory<React.VFC<{}>>;
6
- export declare const LoggedIn: ComponentStory<React.VFC<{}>>;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewerProps } from './ViewerWeb';
3
- declare type JsonUIProps = ViewerProps;
4
- declare const JsonUI: (props: JsonUIProps) => JSX.Element;
5
- export { JsonUI };
6
- export type { JsonUIProps };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CFieldEdit(props: any): JSX.Element;
3
- export default CFieldEdit;
@@ -1,20 +0,0 @@
1
- import Text from './components/Text';
2
- import Button from './components/Button';
3
- import Edit from './components/Edit';
4
- import View from './components/View';
5
- import Image from './components/Image';
6
- import _Undefined from './components/Undefined';
7
- import _PrimitiveProp from './components/PrimitiveProp';
8
- declare const Components: {
9
- View: typeof View;
10
- _PrimitiveProp: typeof _PrimitiveProp;
11
- _Undefined: typeof _Undefined;
12
- Fragment: ({ children }: {
13
- children: any;
14
- }) => any;
15
- Image: typeof Image;
16
- Text: typeof Text;
17
- Button: typeof Button;
18
- Edit: typeof Edit;
19
- };
20
- export default Components;
@@ -1,22 +0,0 @@
1
- import { Stock } from '@jsonui/core';
2
- export declare const getStock: (stockInit: any, model: any, Wrapper: any, reduxStore: any) => Stock;
3
- declare const stock: {
4
- components: {
5
- View: typeof import("./components/View").default;
6
- _PrimitiveProp: typeof import("./components/PrimitiveProp").default;
7
- _Undefined: typeof import("./components/Undefined").default;
8
- Fragment: ({ children }: {
9
- children: any;
10
- }) => any;
11
- Image: typeof import("./components/Image").default;
12
- Text: typeof import("./components/Text").default;
13
- Button: typeof import("./components/Button").default;
14
- Edit: typeof import("./components/Edit").default;
15
- };
16
- functions: {
17
- getStateValue: (attr: any, props: any, callerArgs: any, stock: any) => any;
18
- get: (attr: any, props: any, callerArgs: any, stock: any) => any;
19
- set: (attr: any, props: any, callerArgs: any, stock: any) => any;
20
- };
21
- };
22
- export default stock;
@@ -1,7 +0,0 @@
1
- /// <reference types="redux-persist/types/types" />
2
- /// <reference types="redux-persist" />
3
- declare const storeObj: {
4
- store: import("redux").Store<any, import("redux").AnyAction>;
5
- persistor: import("redux-persist").Persistor;
6
- };
7
- export default storeObj;
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- import './button.css';
3
- export 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;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
4
- export default _default;
5
- export declare const Primary: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
6
- export declare const Secondary: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
7
- export declare const Large: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
8
- export declare const Small: ComponentStory<({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => JSX.Element>;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './header.css';
3
- export declare type User = {
4
- name: string;
5
- };
6
- export 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;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
4
- export default _default;
5
- export declare const LoggedIn: ComponentStory<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
6
- export declare const LoggedOut: ComponentStory<({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => JSX.Element>;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import './page.css';
3
- export declare const Page: React.VFC;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.VFC<{}>>;
4
- export default _default;
5
- export declare const LoggedOut: ComponentStory<React.VFC<{}>>;
6
- export declare const LoggedIn: ComponentStory<React.VFC<{}>>;