@tigerconnect/web-component-library
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -6,1 +6,10 @@ import { Meta, Story } from '@storybook/react'; | ||
export declare const Base: Story<AvatarProps>; | ||
export declare const Team1: Story<AvatarProps>; | ||
export declare const Team2: Story<AvatarProps>; | ||
export declare const Role: Story<AvatarProps>; | ||
export declare const Group: Story<AvatarProps>; | ||
export declare const Broadcast: Story<AvatarProps>; | ||
export declare const Forum: Story<AvatarProps>; | ||
export declare const Patient: Story<AvatarProps>; | ||
export declare const User1: Story<AvatarProps>; | ||
export declare const User2: Story<AvatarProps>; |
@@ -1,2 +0,2 @@ | ||
import { Colors } from '../../types'; | ||
import { Colors, BaseProps } from '../../types'; | ||
import '../../globals.css'; | ||
@@ -13,3 +13,3 @@ export interface ButtonProps { | ||
} | ||
declare function Button({ color, outline, label, disabled, dataTestId, onClick, alignment, formToLabel, ...props }: ButtonProps): JSX.Element; | ||
declare function Button({ color, outline, label, disabled, dataTestId, onClick, alignment, formToLabel, mode, ...props }: BaseProps & ButtonProps): JSX.Element; | ||
export default Button; |
import React from 'react'; | ||
import '../../globals.css'; | ||
import { CardTheme, CardType } from '../../types'; | ||
export interface CardProps { | ||
@@ -7,4 +8,6 @@ children?: React.ReactNode; | ||
headerRight?: React.ReactNode; | ||
theme?: CardTheme; | ||
type?: CardType; | ||
} | ||
declare function Card({ header, headerRight, children }: CardProps): JSX.Element; | ||
declare function Card({ header, headerRight, children, theme, type }: CardProps): JSX.Element; | ||
export default Card; |
@@ -6,1 +6,3 @@ import { Meta, Story } from '@storybook/react'; | ||
export declare const Base: Story<CardProps>; | ||
export declare const Provider: Story<CardProps>; | ||
export declare const Patient: Story<CardProps>; |
@@ -1,2 +0,2 @@ | ||
import { Colors } from '../../types'; | ||
import { BaseProps, Colors } from '../../types'; | ||
import '../../globals.css'; | ||
@@ -16,3 +16,3 @@ export interface SwitchButtonProps { | ||
} | ||
declare function SwitchButton({ checked, dataTestId, disabled, height, width, offColorTheme, offText, onColorTheme, onText, onSwitch, theme, }: SwitchButtonProps): JSX.Element; | ||
declare function SwitchButton({ checked, dataTestId, disabled, height, width, offColorTheme, offText, onColorTheme, onText, onSwitch, theme, mode, }: BaseProps & SwitchButtonProps): JSX.Element; | ||
export default SwitchButton; |
@@ -6,2 +6,4 @@ export * from './types'; | ||
import Checkbox from './components/Checkbox'; | ||
import Dropdown from './components/Dropdown'; | ||
import EntityDetail from './components/EntityDetail'; | ||
import Modal from './components/Modal'; | ||
@@ -11,2 +13,2 @@ import Setting from './components/Setting'; | ||
import Tabs from './components/Tabs'; | ||
export { Avatar, Button, Card, Checkbox, Modal, Setting, Switch, Tabs }; | ||
export { Avatar, Button, Card, Checkbox, Dropdown, EntityDetail, Modal, Setting, Switch, Tabs }; |
@@ -0,1 +1,4 @@ | ||
export interface BaseProps { | ||
mode?: 'dark' | 'light'; | ||
} | ||
export declare type Colors = 'primary' | 'secondary' | 'success' | 'danger' | 'patient'; | ||
@@ -12,5 +15,7 @@ export declare enum ColorHexes { | ||
export declare type AvatarSizes = 'small' | 'medium' | 'large' | 'xlarge'; | ||
export declare type AvatarTypes = 'team' | 'tag' | 'role' | 'myroles' | 'initials' | 'image' | 'broadcast' | 'forum'; | ||
export declare type AvatarTypes = 'team' | 'tag' | 'role' | 'myroles' | 'initials' | 'image' | 'broadcast' | 'forum' | 'group' | 'patient'; | ||
export declare type AvatarShapes = 'squircle' | 'circle'; | ||
export declare type AvatarThemes = 'default' | 'empty'; | ||
export declare type AvatarThemes = 'default' | 'empty' | 'team'; | ||
export declare type AvatarInitialsThemes = 'team' | 'user'; | ||
export declare type CardTheme = 'default' | 'provider' | 'patient'; | ||
export declare type CardType = 'default' | 'category'; |
{ | ||
"name": "@tigerconnect/web-component-library", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "a shared component library for tc projects", | ||
@@ -14,4 +14,6 @@ "main": "lib/index.esm.js", | ||
"deploy:storybook": "npm run build-storybook && gh-pages -d storybook-static", | ||
"gen": "plop", | ||
"storybook": "start-storybook -p 6006", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"url": "echo https://login.tigerconnect.xyz/$(git rev-parse --abbrev-ref HEAD)/app/components" | ||
}, | ||
@@ -29,11 +31,11 @@ "author": "", | ||
"@rollup/plugin-typescript": "^8.3.1", | ||
"@storybook/addon-actions": "^6.5.5", | ||
"@storybook/addon-essentials": "^6.5.5", | ||
"@storybook/addon-interactions": "^6.5.5", | ||
"@storybook/addon-links": "^6.5.5", | ||
"@storybook/addon-actions": "6.4.19", | ||
"@storybook/addon-essentials": "6.4.19", | ||
"@storybook/addon-interactions": "6.4.19", | ||
"@storybook/addon-links": "6.4.19", | ||
"@storybook/addon-postcss": "^2.0.0", | ||
"@storybook/builder-webpack5": "^6.5.5", | ||
"@storybook/manager-webpack5": "^6.5.5", | ||
"@storybook/react": "^6.5.5", | ||
"@storybook/testing-library": "^0.0.11", | ||
"@storybook/builder-webpack5": "6.4.19", | ||
"@storybook/manager-webpack5": "6.4.19", | ||
"@storybook/react": "6.4.19", | ||
"@storybook/testing-library": "0.0.9", | ||
"@svgr/rollup": "^6.2.1", | ||
@@ -57,2 +59,3 @@ "@svgr/webpack": "^6.2.1", | ||
"npm-run-all": "^4.1.5", | ||
"plop": "^3.1.1", | ||
"postcss-custom-properties": "^12.1.5", | ||
@@ -59,0 +62,0 @@ "postcss-preset-env": "^7.4.2", |
@@ -16,20 +16,15 @@ # Web Component Library | ||
Pages. See [Publishing](#publishing) for more details. | ||
5. `npm run gen` to create a new component. | ||
## Using the library in a project locally | ||
The current solution for this is not pretty, but it'll suffice: | ||
Inside the `web-component-library` repository, run `npm run build` to build the latest changes, then run `npm link`. Then inside the repository using the library. e.g. inside `web-react-ui-toolkit`, run `npm link @tigerconnect/web-component-library`. | ||
1. In the project folder, run `npm i <location of web-component-library>` | ||
2. Rename the react folder within web-component-library's node_modules to avoid it being used | ||
## Editor Setup | ||
### Important! | ||
This project uses PostCSS, which will require some setting changes so that your CSS files will be understood | ||
and formatted auto-correctly: | ||
Remember to keep these changes out of your commits, as this will break deployments to other | ||
environments. | ||
### VS Code | ||
## VSCode Setup | ||
This project uses PostCSS, which will require a few things so that your CSS files will be understood | ||
and formatted auto-correctly: | ||
Include in your VSCode editor settings (JSON): | ||
@@ -46,2 +41,6 @@ | ||
### Vim | ||
As a quick workaround you can use `:set ft=scss`. | ||
## Publishing | ||
@@ -48,0 +47,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
185817
37
956
53
66
29