@veeqo/ui 0.0.14 → 0.0.16

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 CHANGED
@@ -6,11 +6,13 @@ The frontend component library for reusable components in Veeqo which aim to ref
6
6
 
7
7
  This library has been re-written and refactored with the aims of enable tree-shaking which will allow us to reduce our bundle size and decrease page load times while also simplifying the library making it easier to work with and develop.
8
8
 
9
- Icons and Integrations have been moved:
9
+ Icons and Integrations **WILL** been moved:
10
10
 
11
11
  - Icons now live in [@veeqo/icons](https://www.npmjs.com/package/@veeqo/icons).
12
12
  - Our Integrations now live in [@veeqo/integrations](https://www.npmjs.com/package/@veeqo/integrations).
13
13
 
14
+ _For now please use individual icons to preserve tree shaking, while downstream uses can use the old component library Glyph component if needed (not tree shakable, huge size)._
15
+
14
16
  ## Getting Started
15
17
 
16
18
  Setup should be simple, clone the repo and use npm to install all dependencies.
@@ -71,7 +73,16 @@ npm login
71
73
 
72
74
  Versioning will happen on the `package.json` version number, and is for the library as a whole instead of per component for simplicity.
73
75
 
74
- When you make a change, which should be published to NPM please use: `npm version (patch | minor | major)`
76
+ When have made a change you want published, use `npm run patch` or `npm run minor` or `npm run major` depending on your changes:
75
77
 
76
- - This create a commit where you update the version number
78
+ - This create update the version number by the amount specified in the command you entered above.
77
79
  - **Create a git tag** for that version, making the version history straightward to look back on.
80
+ - Update the changelog based on your commits.
81
+ - Push this readme change upstream
82
+
83
+ **After this is done, merge your PR.**
84
+
85
+ Once your PR is reviewed and merged, you can then run `npm publish` from master.
86
+
87
+ - This will run all unit tests and check linting.
88
+ - Then publish to NPM.
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const useClickAway: (ref: React.RefObject<HTMLElement>, onClickAway: (event: Event) => void) => void;
@@ -1,6 +1,16 @@
1
- import React from 'react';
2
- import { BannerProps } from './types';
1
+ import React, { ReactEventHandler, ReactNode } from 'react';
2
+ import { BannerTypes } from './types';
3
+ type BannerProps = {
4
+ type?: BannerTypes;
5
+ text?: string;
6
+ icon?: Omit<ReactNode, string>;
7
+ onClose?: ReactEventHandler;
8
+ className?: string;
9
+ header?: ReactNode;
10
+ children?: ReactNode;
11
+ };
3
12
  /**
4
13
  * The `Banner` component was previously called `Alert` (and similarly `Pill`).
5
14
  */
6
- export declare const Banner: ({ type, text, icon, onClose, className, header, }: BannerProps) => React.JSX.Element;
15
+ export declare const Banner: ({ type, text, icon, onClose, className, header, children, }: BannerProps) => React.JSX.Element;
16
+ export {};
@@ -1,18 +1,5 @@
1
- import { ReactNode, ReactEventHandler } from 'react';
2
- export declare enum BannerTypes {
3
- help = "help",
4
- info = "info",
5
- error = "error",
6
- success = "success"
7
- }
8
- export type BannerProps = {
9
- type?: keyof typeof BannerTypes | string;
10
- text?: string;
11
- icon?: Omit<ReactNode, string>;
12
- onClose?: ReactEventHandler;
13
- className?: string;
14
- header?: ReactNode;
15
- };
1
+ import { ReactNode } from 'react';
2
+ export type BannerTypes = 'help' | 'info' | 'error' | 'success';
16
3
  export type PillProps = {
17
4
  children?: ReactNode;
18
5
  className?: string;