Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tsconfig.json
.prettierrc

.eslintrc.js
/index.d.ts
webpack.config.js
global.d.ts
rollup.config.js
yarn-error.log
.rpt2_cache
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: node_js
node_js: node

cache:
directories: node_modules
directories:
- node_modules

script: yarn
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NativeColorCards Changelog

## 1.0.0 alpha 1 (Soon)
## 1.0.0 alpha 1 (2020-xx-xx)
#### New Feature
- added flatList grid
- added card with title, subtitle, icon, gradient, options & checkbox
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![NPM version](http://img.shields.io/npm/v/native-color-cards.svg?style=flat-square)](https://www.npmjs.com/package/native-color-cards)
[![NPM downloads](http://img.shields.io/npm/dm/native-color-cards.svg?style=flat-square)](https://www.npmjs.com/package/native-color-cards)
[![run in expo snack](https://img.shields.io/badge/Run%20in%20Snack-4630EB.svg?style=flat-square&logo=EXPO&labelColor=FFF&logoColor=000)](https://snack.expo.io/@jbiesiada/5727bc)

## About
Color cards (Shortcuts.app style) for React Native
Expand Down
2 changes: 2 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module 'react-native-drag-sort/DragSortableView'
declare module 'react-native-touchable-scale'
1 change: 0 additions & 1 deletion index.d.ts

This file was deleted.

2 changes: 2 additions & 0 deletions lib/bases/Card.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare const Base: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
export declare const Info: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
3 changes: 3 additions & 0 deletions lib/bases/CheckBox.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare const Base: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {
checked: boolean;
}, never>;
2 changes: 2 additions & 0 deletions lib/bases/Gradient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { LinearGradient } from 'expo-linear-gradient';
export declare const Base: import("styled-components").StyledComponent<typeof LinearGradient, any, {}, never>;
2 changes: 2 additions & 0 deletions lib/bases/Icon.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Ionicons from 'react-native-vector-icons/Ionicons';
export declare const Icon: import("styled-components").StyledComponent<typeof Ionicons, any, {}, never>;
1 change: 1 addition & 0 deletions lib/bases/List.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const Base: any;
3 changes: 3 additions & 0 deletions lib/bases/Options.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { TouchableOpacity } from 'react-native';
export declare const Base: import("styled-components").StyledComponent<typeof TouchableOpacity, any, {}, never>;
export declare const BlurLayer: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
4 changes: 4 additions & 0 deletions lib/bases/Title.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare const Base: import("styled-components").StyledComponent<typeof import("react-native").Text, import("styled-components").DefaultTheme, {
color: string;
isPrimary: boolean;
}, never>;
2 changes: 2 additions & 0 deletions lib/components/Card.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Card as Props } from '../interfaces';
export declare const Card: ({ backgroundColor, checkBoxProps, color, flat, gradient, gradientProps, icon, onLongPress, optionsProps, scalable, shadow, subtitle, title, ...props }: Props) => JSX.Element;
3 changes: 3 additions & 0 deletions lib/components/CheckBox.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare const Check: ({ checked, ...props }: {
checked: boolean;
}) => JSX.Element;
2 changes: 2 additions & 0 deletions lib/components/Gradient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Theme } from '../interfaces';
export declare const Gradient: ({ color, faded }: Theme) => JSX.Element;
1 change: 1 addition & 0 deletions lib/components/List.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const List: ({ renderItem, ...props }: any) => JSX.Element;
2 changes: 2 additions & 0 deletions lib/components/Options.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Theme } from '../interfaces';
export declare const Options: ({ color, faded, isDark, ...props }: Theme) => JSX.Element;
2 changes: 2 additions & 0 deletions lib/components/Title.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Title as TitleProps } from '../interfaces';
export declare const Title: ({ color, children, isPrimary, ...props }: TitleProps) => JSX.Element;
2 changes: 2 additions & 0 deletions lib/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { List } from './List';
export { Card } from './Card';
9 changes: 9 additions & 0 deletions lib/context.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React, { ReactChildren } from 'react';
interface Props {
readonly children: ReactChildren;
readonly data?: unknown[] | null;
readonly onDataChange: (state: any[]) => void;
}
export declare const ListContext: React.Context<any>;
export declare const ColorCardsProvider: ({ children, data, onDataChange }: Props) => JSX.Element;
export {};
2 changes: 2 additions & 0 deletions lib/helpers/animations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Animated } from 'react-native';
export declare const animations: (animatedValue: Animated.Value) => void;
3 changes: 3 additions & 0 deletions lib/helpers/colors.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare const checkColor: (item: string) => string;
export declare const darker: (item: string) => [string, string];
export declare const lighter: (item: string) => [string, string];
3 changes: 3 additions & 0 deletions lib/helpers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { animations } from './animations';
export { darker, lighter, checkColor } from './colors';
export { flex, size } from './mixin';
2 changes: 2 additions & 0 deletions lib/helpers/mixin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare const flex = "\n display: flex;\n align-items: center;\n justify-content: center;\n";
export declare const size = "\n width: 26px;\n height: 26px;\n";
2 changes: 2 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { ColorCardsProvider } from './context';
export { List, Card } from './components';
17 changes: 17 additions & 0 deletions lib/interfaces/Card.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { TouchableOpacityProps, ViewProps } from 'react-native';
import { Color } from '../types';
export interface Card {
readonly backgroundColor: string;
readonly checkBoxProps?: ViewProps;
readonly color?: Color;
readonly flat?: boolean;
readonly gradient?: boolean;
readonly gradientProps?: any;
readonly icon?: string;
readonly onLongPress: () => void;
readonly optionsProps?: TouchableOpacityProps;
readonly scalable?: boolean;
readonly shadow?: boolean;
readonly subtitle?: string;
readonly title?: string;
}
5 changes: 5 additions & 0 deletions lib/interfaces/Theme.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface Theme {
readonly color: string;
readonly faded?: boolean;
readonly isDark?: string;
}
7 changes: 7 additions & 0 deletions lib/interfaces/Title.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { ReactNode } from 'react';
import { TextProps } from 'react-native';
export interface Title extends TextProps {
readonly color: string;
readonly children: ReactNode;
readonly isPrimary?: boolean;
}
3 changes: 3 additions & 0 deletions lib/interfaces/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { Card } from './Card';
export { Title } from './Title';
export { Theme } from './Theme';
2 changes: 2 additions & 0 deletions lib/native-color-cards.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading