Skip to content

Commit

Permalink
feat(ui): eva 1.2 mappings and documentation adopt
Browse files Browse the repository at this point in the history
  • Loading branch information
32penkin committed Sep 27, 2019
1 parent 5e84acd commit d35c244
Show file tree
Hide file tree
Showing 15 changed files with 1,116 additions and 458 deletions.
3 changes: 2 additions & 1 deletion src/framework/ui/button/button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export type ButtonElement = React.ReactElement<ButtonProps>;
* Default is `false`.
*
* @property {string} status - Determines the status of the component.
* Can be `primary`, `success`, `info`, `warning`, `danger` or `white`.
* Can be `basic`, `primary`, `success`, `info`, `warning`, `danger` or `control`.
* Default is `primary`.
*
* @property {string} size - Determines the size of the component.
* Can be `giant`, `large`, `medium`, `small`, or `tiny`.
Expand Down
3 changes: 2 additions & 1 deletion src/framework/ui/checkbox/checkbox.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export type CheckBoxElement = React.ReactElement<CheckBoxProps>;
* Default is `false.
*
* @property {string} status - Determines the status of the component.
* Can be `primary`, `success`, `info`, `warning` or `danger`.
* Can be `primary`, `success`, `info`, `warning`, `danger`, `basic` or `control`.
* Default is `basic`.
*
* @property {string} text - Determines text of the component.
*
Expand Down
7 changes: 5 additions & 2 deletions src/framework/ui/icon/icon.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ interface ComponentProps {
animationConfig?: AnimationConfig;
}

export type IconProps<T = {}> = ComponentProps & T;
export type IconElement<T> = React.ReactElement<T>;
// This is basically needed to avoid generics in required props
// In general, could be SVGProps if using @ui-kitten/eva-icons or ImageProps if using Image.
type WrappedElementProps = any;
export type IconProps<T = WrappedElementProps> = ComponentProps & T;
export type IconElement<T = WrappedElementProps> = React.ReactElement<IconProps<T>>;

/**
* `Icon` component with animation support. Allows to render any ReactElement registered for a specific name.
Expand Down
3 changes: 2 additions & 1 deletion src/framework/ui/radio/radio.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export type RadioElement = React.ReactElement<RadioProps>;
* Default is `false`.
*
* @property {string} status - Determines the status of the component.
* Can be `primary`, `success`, `info`, `warning` or `danger`.
* Can be `primary`, `success`, `info`, `warning`, `danger`, basic` or `control`.
* Default is `basic`.
*
* @property {string} text - Determines text of the component.
*
Expand Down
67 changes: 65 additions & 2 deletions src/framework/ui/radio/radio.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ exports[`@radio: matches snapshot default 1`] = `
onPress={[Function]}
onPressIn={[Function]}
onPressOut={[Function]}
status="basic"
style={
Array [
Object {
"backgroundColor": "#EDF1F7",
"borderColor": "#E4E9F2",
"backgroundColor": "#E4E9F2",
"borderColor": "#C5CEE0",
"borderRadius": 12,
"borderWidth": 1,
"height": 24,
Expand Down Expand Up @@ -139,11 +140,31 @@ exports[`@radio: matches snapshot default 1`] = `
"border-basic-color-3": "$color-basic-300",
"border-basic-color-4": "$color-basic-400",
"border-basic-color-5": "$color-basic-500",
"border-danger-color-1": "$color-danger-500",
"border-danger-color-2": "$color-danger-600",
"border-danger-color-3": "$color-danger-700",
"border-danger-color-4": "$color-danger-800",
"border-danger-color-5": "$color-danger-900",
"border-info-color-1": "$color-info-500",
"border-info-color-2": "$color-info-600",
"border-info-color-3": "$color-info-700",
"border-info-color-4": "$color-info-800",
"border-info-color-5": "$color-info-900",
"border-primary-color-1": "$color-primary-500",
"border-primary-color-2": "$color-primary-600",
"border-primary-color-3": "$color-primary-700",
"border-primary-color-4": "$color-primary-800",
"border-primary-color-5": "$color-primary-900",
"border-success-color-1": "$color-success-500",
"border-success-color-2": "$color-success-600",
"border-success-color-3": "$color-success-700",
"border-success-color-4": "$color-success-800",
"border-success-color-5": "$color-success-900",
"border-warning-color-1": "$color-warning-500",
"border-warning-color-2": "$color-warning-600",
"border-warning-color-3": "$color-warning-700",
"border-warning-color-4": "$color-warning-800",
"border-warning-color-5": "$color-warning-900",
"color-basic-100": "#FFFFFF",
"color-basic-1000": "#151A30",
"color-basic-1100": "#101426",
Expand All @@ -156,9 +177,21 @@ exports[`@radio: matches snapshot default 1`] = `
"color-basic-800": "#222B45",
"color-basic-900": "#1A2138",
"color-basic-active": "$color-basic-400",
"color-basic-control-transparent-100": "rgba(255, 255, 255, 0.08)",
"color-basic-control-transparent-200": "rgba(255, 255, 255, 0.16)",
"color-basic-control-transparent-300": "rgba(255, 255, 255, 0.24)",
"color-basic-control-transparent-400": "rgba(255, 255, 255, 0.32)",
"color-basic-control-transparent-500": "rgba(255, 255, 255, 0.40)",
"color-basic-control-transparent-600": "rgba(255, 255, 255, 0.48)",
"color-basic-default": "$color-basic-200",
"color-basic-disabled": "$color-basic-300",
"color-basic-focus": "$color-basic-500",
"color-basic-transparent-100": "rgba(143, 155, 179, 0.08)",
"color-basic-transparent-200": "rgba(143, 155, 179, 0.16)",
"color-basic-transparent-300": "rgba(143, 155, 179, 0.24)",
"color-basic-transparent-400": "rgba(143, 155, 179, 0.32)",
"color-basic-transparent-500": "rgba(143, 155, 179, 0.40)",
"color-basic-transparent-600": "rgba(143, 155, 179, 0.48)",
"color-danger-100": "#FFF2F2",
"color-danger-200": "#FFD6D9",
"color-danger-300": "#FFA8B4",
Expand All @@ -172,6 +205,12 @@ exports[`@radio: matches snapshot default 1`] = `
"color-danger-default": "$color-danger-500",
"color-danger-disabled": "$color-danger-300",
"color-danger-focus": "$color-danger-700",
"color-danger-transparent-100": "rgba(255, 61, 113, 0.08)",
"color-danger-transparent-200": "rgba(255, 61, 113, 0.16)",
"color-danger-transparent-300": "rgba(255, 61, 113, 0.24)",
"color-danger-transparent-400": "rgba(255, 61, 113, 0.32)",
"color-danger-transparent-500": "rgba(255, 61, 113, 0.40)",
"color-danger-transparent-600": "rgba(255, 61, 113, 0.48)",
"color-info-100": "#F2F8FF",
"color-info-200": "#C7E2FF",
"color-info-300": "#94CBFF",
Expand All @@ -185,6 +224,12 @@ exports[`@radio: matches snapshot default 1`] = `
"color-info-default": "$color-info-500",
"color-info-disabled": "$color-info-300",
"color-info-focus": "$color-info-700",
"color-info-transparent-100": "rgba(0, 149, 255, 0.08)",
"color-info-transparent-200": "rgba(0, 149, 255, 0.16)",
"color-info-transparent-300": "rgba(0, 149, 255, 0.24)",
"color-info-transparent-400": "rgba(0, 149, 255, 0.32)",
"color-info-transparent-500": "rgba(0, 149, 255, 0.40)",
"color-info-transparent-600": "rgba(0, 149, 255, 0.48)",
"color-primary-100": "#F2F6FF",
"color-primary-200": "#D9E4FF",
"color-primary-300": "#A6C1FF",
Expand All @@ -198,6 +243,12 @@ exports[`@radio: matches snapshot default 1`] = `
"color-primary-default": "$color-primary-500",
"color-primary-disabled": "$color-primary-200",
"color-primary-focus": "$color-primary-700",
"color-primary-transparent-100": "rgba(51, 102, 255, 0.08)",
"color-primary-transparent-200": "rgba(51, 102, 255, 0.16)",
"color-primary-transparent-300": "rgba(51, 102, 255, 0.24)",
"color-primary-transparent-400": "rgba(51, 102, 255, 0.32)",
"color-primary-transparent-500": "rgba(51, 102, 255, 0.40)",
"color-primary-transparent-600": "rgba(51, 102, 255, 0.48)",
"color-secondary-100": "#F7F2FF",
"color-secondary-200": "#E0D1FF",
"color-secondary-300": "#C5A8FF",
Expand All @@ -220,6 +271,12 @@ exports[`@radio: matches snapshot default 1`] = `
"color-success-default": "$color-success-500",
"color-success-disabled": "$color-success-200",
"color-success-focus": "$color-success-700",
"color-success-transparent-100": "rgba(0, 224, 150, 0.08)",
"color-success-transparent-200": "rgba(0, 224, 150, 0.16)",
"color-success-transparent-300": "rgba(0, 224, 150, 0.24)",
"color-success-transparent-400": "rgba(0, 224, 150, 0.32)",
"color-success-transparent-500": "rgba(0, 224, 150, 0.40)",
"color-success-transparent-600": "rgba(0, 224, 150, 0.48)",
"color-tertiary-100": "#FFDED6",
"color-tertiary-200": "#FFDED6",
"color-tertiary-300": "#FFDED6",
Expand All @@ -242,6 +299,12 @@ exports[`@radio: matches snapshot default 1`] = `
"color-warning-default": "$color-warning-500",
"color-warning-disabled": "$color-warning-300",
"color-warning-focus": "$color-warning-700",
"color-warning-transparent-100": "rgba(255, 170, 0, 0.08)",
"color-warning-transparent-200": "rgba(255, 170, 0, 0.16)",
"color-warning-transparent-300": "rgba(255, 170, 0, 0.24)",
"color-warning-transparent-400": "rgba(255, 170, 0, 0.32)",
"color-warning-transparent-500": "rgba(255, 170, 0, 0.40)",
"color-warning-transparent-600": "rgba(255, 170, 0, 0.48)",
"icon-active-color": "$color-primary-500",
"icon-basic-color": "$color-basic-700",
"icon-control-color": "$color-basic-100",
Expand Down

0 comments on commit d35c244

Please sign in to comment.