Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5 #914

Merged
merged 59 commits into from
Apr 8, 2020
Merged

v5 #914

Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ee100a5
BREAKING: combine eva props into one
Feb 28, 2020
8e8c8a9
BREAKING: refactor Button to new api
Feb 28, 2020
8ab5608
BREAKING: refactor BottomNavigation to new api
Feb 28, 2020
5dffd65
feat(components): avatar - improve with meaningful tests and ts prop …
Feb 28, 2020
9a6415a
BREAKING: refactor Card to new api
Feb 28, 2020
3ef75e0
BREAKING: refactor CheckBox to new api
Feb 28, 2020
db540c2
feat(components): divider - improve ts definitions for props
Feb 28, 2020
4cae584
BREAKING: refactor Input to new api
Feb 28, 2020
2f53dc4
feat(components): layout - improve ts definitions for props and add m…
Feb 28, 2020
533fa81
BREAKING: refactor List to new api
Feb 28, 2020
205eb6d
BREAKING: refactoe Menu to new api
Feb 28, 2020
e9fc5a7
feat(components): modal - improve with meaningful tests
Feb 28, 2020
577241d
BREAKING: refactor Radio to new api
Feb 28, 2020
3bb529e
feat(components): spinner - ts definitions for props
Feb 28, 2020
2d64770
BREAKING: refactor Tab to new api
Feb 28, 2020
da7d51f
feat(components): text - improve ts definitions for props
Feb 28, 2020
c0b5f1e
BREAKING: refactor Toggle to new api
Feb 28, 2020
170e5bb
BREAKING: refactor TopNavigation to new api
Feb 28, 2020
3e38df8
feat(components): view-pager - add meaningful tests
Feb 28, 2020
0526c80
BREAKING: refactor popover-based components to new api
Feb 28, 2020
3e423cd
feat(components): calendar - improve ts definitions and add meaningfu…
Feb 28, 2020
ebc3ef2
fix(components): icon - disable useNativeDriver when running on web
Feb 28, 2020
c21cc1d
fix(components): popover - .spec file extension
Feb 28, 2020
cc4ea57
refactor(components): remove unused files
Feb 28, 2020
9188551
BREAKING: refactor Drawer to new api
Feb 28, 2020
2f4d3a3
refactor(components): icon - improve tests and ts definitions
Feb 28, 2020
0f6ee76
chore: bump workspace dependencies and fix build / test scripts
Feb 28, 2020
675a1b9
test(metro-config): temporary disable clearing generated files
Feb 28, 2020
dee4ad0
test(metro-config): clean-up after running tests
Feb 28, 2020
351632a
test(components): unify spec declarations
Mar 1, 2020
cd00f4f
refactor(components): move touchable with web handler into separate c…
Mar 2, 2020
df95586
BREAKING: refactor Menu, Select and Drawer components to new api
Mar 4, 2020
0535eb3
docs(components): drawer - update component documentation
Mar 4, 2020
48c94c2
refactor(components): move status and size definitions to single type
Mar 5, 2020
d1f9168
docs: update live examples and api documentation
Mar 9, 2020
b6ff01d
test(components): add more tests
Mar 10, 2020
3905b91
refactor(components): fix formatting
Mar 10, 2020
12c2654
feat(docs): add ability to render description above examples
Mar 10, 2020
38d073e
feat(docs): add developer-friendly documentation for each example
Mar 11, 2020
99f4804
docs(components): move theming examples to overview page
Mar 11, 2020
e17ce27
docs(components): describe types and improve preview container
Mar 12, 2020
b4adac9
docs(showcases): tweak background colors for material themes
Mar 12, 2020
8f98cce
docs(guides): update branding guide
Mar 12, 2020
d73d0dd
fix(components): typography fixes
Mar 13, 2020
2250f03
docs(guides): add more details on branding guide
Mar 13, 2020
3ddddaa
docs(showcases): fix showcase preview borders
Mar 13, 2020
712b399
chore(components): shorten documentation links
Mar 13, 2020
42f9b5b
docs(guides): add v5 migration guide
Mar 15, 2020
80ac729
docs(guides): bring consistency to other guides
Mar 16, 2020
f330062
docs(guides): replace style property with props in examples
Mar 16, 2020
edd0121
feat: react-native 0.62 support
Apr 8, 2020
d4b0c3d
feat(template): bump to latest dependencies
Apr 8, 2020
4913f8e
chore: update to latest doc-prsr
Apr 8, 2020
c8740d7
chore: bump eva dependencies to latest version
Apr 8, 2020
c3dfea6
chore: bump react-native-eva-icons version
Apr 8, 2020
722c2af
docs(components): add divider to documentation
Apr 8, 2020
c8ed8ef
docs: add v4 documentation to supported versions
Apr 8, 2020
0fd938e
fix(components): spinner animation build issue
Apr 8, 2020
d449a98
release: v5.0.0-alpha.1
Apr 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 4 additions & 36 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
const path = require('path');

/**
* UI Kitten modules aliases (needed for Jest resolver)
*/
const moduleAliases = {
'@ui-kitten/components': path.resolve(__dirname, './src/components'),
'@ui-kitten/eva-icons': path.resolve(__dirname, './src/eva-icons'),
'@ui-kitten/moment': path.resolve(__dirname, './src/moment'),
'@ui-kitten/date-fns': path.resolve(__dirname, './src/date-fns'),
};

const moduleInternalAliases = {
'@kitten/theme': path.resolve(__dirname, './src/components/theme'),
'@kitten/ui': path.resolve(__dirname, './src/components/ui'),
};

const moduleResolverConfig = {
root: path.resolve('./'),
alias: {
...moduleAliases,
...moduleInternalAliases,
},
};

const presets = [
'module:metro-react-native-babel-preset',
];

const plugins = [
['module-resolver', moduleResolverConfig],
];

module.exports = function(api) {
api.cache(true);
return { presets, plugins };
module.exports = {
presets: [
'module:metro-react-native-babel-preset',
],
};

2 changes: 1 addition & 1 deletion docs/src/app/@theme/services/highlight.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import * as hljs from 'highlight.js';
export class NgdHighlightService {

public highlight(code: string): string {
return hljs.highlightAuto(code, ['ts', 'html', 'scss', 'nginx']).value;
return hljs.highlightAuto(code, ['js', 'jsx', 'ts', 'tsx', 'json']).value;
}
}
2 changes: 2 additions & 0 deletions docs/src/app/@theme/services/structure.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ export class NgdStructureService {
return {
id: example.description,
name: example.description.split(/(?=[A-Z])/).join(' '),
description: example.description,
shortDescription: example.shortDescription,
files: [{
path: helper.path,
code: helper.code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
display: flex;
padding: 0;
font-size: 1rem;
border-radius: 0.5rem;
border-radius: 0.25rem;
background: $code-block-bg;
overflow-x: auto;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
</button>
</div>
</section>
<span
class="caption-2 title-caption"
nbTooltipPlacement="top"
nbTooltip="Rendering of React Native components in a web browser is an experimental feature and may contain issues.">
<nb-icon icon="alert-triangle"></nb-icon> Experimental Preview
</span>
<div class="iframe-container">
<iframe #iframe *ngIf="content.id" [style.height.px]="iframeHeight" [class.loading]="loading"></iframe>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// colors
$action-bg: white;
$action-fg: nb-theme(color-fg-heading-light);
$block-bg-default: #edf0f4;
$block-bg-default: nb-theme(background-basic-color-3);
$block-bg-cosmic: #1b1b38;
$block-fg-cosmic: #e8e9fa;
$block-bg-corporate: #edf0f4;
Expand All @@ -16,15 +16,15 @@
display: flex;
flex-direction: column;
padding: 0.5rem 1rem 2.5rem 1.5rem;
border-radius: 0.5rem;
border-radius: 0.25rem;
position: relative;

.header {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 1.875rem;
margin-bottom: 1rem;
}

.title-caption {
Expand Down Expand Up @@ -62,7 +62,7 @@

.action-item {
background-color: $action-bg;
border-radius: 0.375rem;
border-radius: 0.25rem;
height: 100%;
line-height: 1;
border: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {
@Component({
selector: 'ngd-overview-example',
template: `
<h5 style="margin-top: 2rem">{{title}}:</h5>
<td>
<div *ngIf="title" ngdDescription>{{title}}</div>
</td>
<ngd-code-block [code]="code"></ngd-code-block>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -25,7 +27,8 @@ export class NgdOverviewExampleBlock {

@Input('example')
set example(value) {
this.code = value.code.replace(/```/g, '');
this.title = value.description;
this.code = value.code.replace(/```/g, '')
.replace(/^\s+|\s+$/g, '');
this.title = value.shortDescription;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export const pulse = animation(
selector: 'ngd-stacked-example-block',
template: `
<div *ngIf="isLiveExample">
<td>
<div *ngIf="content.shortDescription" ngdDescription>{{ content.shortDescription }}</div>
</td>
<ngd-live-example-block [hidden]="!isLive"
[@exampleState]="isLive ? 'live': 'code'"
[content]="content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</button>

<nb-tabset class="tabs-container">
<nb-tab *ngFor="let example of examples" tabTitle="{{ example.extension }}" [active]="example.active">
<nb-tab *ngFor="let example of examples" tabTitle="Code" [active]="example.active">
<ngd-code-block [code]="example.code"></ngd-code-block>
</nb-tab>
</nb-tabset>
5 changes: 3 additions & 2 deletions docs/src/app/documentation/page/page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
$settings-margin: nb-theme(settings-col-margin);
$heading-light: nb-theme(color-fg-heading-light);
$code-bg: #f1f2f3;
$code-fg: nb-theme(color-info-500);
$code-bg: nb-theme(background-basic-color-3);
$code-fg: nb-theme(color-primary-500);
$code-block-bg: nb-theme(code-block-bg);
$table-head-fg: #8994a3;
$table-border: 1px solid #f1f2f3;
Expand Down Expand Up @@ -98,7 +99,7 @@
::ng-deep {
.widget-block {
display: block;
margin-bottom: 2rem;
margin: 2rem 0 2rem;
}

ngd-styles-table-block table {
Expand Down
24 changes: 10 additions & 14 deletions docs/src/articles/design-system/custom-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,21 @@ And pass it to an `ApplicationProvider` component:

```js
import React from 'react';
import * as eva from '@eva-design/eva';
import { ApplicationProvider, Layout } from '@ui-kitten/components';
import { mapping, light as lightTheme } from '@eva-design/eva';
import { default as customMapping } from './path-to/custom-mapping.json'; // <-- Import custom mapping
import CircleButton from './path-to/CircleButton'; // <-- Import custom component

const App = () => (
<ApplicationProvider
mapping={mapping}
export default () => (
<ApplicationProvider
{...eva}
customMapping={customMapping}
theme={lightTheme}>
theme={eva.light}>
<Layout style={{padding: 64, alignItems: 'center'}}>
<CircleButton />
</Layout>
</ApplicationProvider>
);

export default App;
```

<hr>
Expand Down Expand Up @@ -175,23 +173,21 @@ What we did is that we added a rounded [variant](design-system/design-system-glo

```js
import React from 'react';
import * as eva from '@eva-design/eva';
import { ApplicationProvider, Layout } from '@ui-kitten/components';
import { mapping, light as lightTheme } from '@eva-design/eva';
import { default as customMapping } from './path-to/custom-mapping.json';
import CircleButton from './path-to/CircleButton';

const App = () => (
<ApplicationProvider
mapping={mapping}
export default () => (
<ApplicationProvider
{...eva}
customMapping={customMapping}
theme={lightTheme}>
theme={eva.light}>
<Layout style={{padding: 64, alignItems: 'center'}}>
<CircleButton shape='rounded'/> // <-- Apply `rounded` shape variant
</Layout>
</ApplicationProvider>
);

export default App;
```

And this is how it looks:
Expand Down
9 changes: 4 additions & 5 deletions docs/src/articles/design-system/customize-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,18 @@ The only thing we have to do is to pass our custom mapping to an `ApplicationPro

```js
import React from 'react';
import * as eva from '@eva-design/eva';
import { ApplicationProvider } from '@ui-kitten/components';
import { mapping, light as lightTheme } from '@eva-design/eva';
import { default as customMapping } from './path-to/custom-mapping.json'; // <-- import custom mapping

const App = () => (
export default () => (
<ApplicationProvider
mapping={mapping}
{...eva}
customMapping={customMapping} // <-- apply custom mapping
theme={lightTheme}>
theme={eva.light}>
</ApplicationProvider>
);

export default App;
```

Here we are. Now the default `backgroundColor` of a Button should be `pink`. Here is a result
Expand Down
6 changes: 3 additions & 3 deletions docs/src/articles/getting-started/what-is-ui-kitten.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What is UI Kitten?

UI Kitten is a customizable React Native UI Library based on <a href="https://hubs.ly/H0n6C-l0">Eva Design System</a> specifications, with 20+ UI components, 2 visual themes, and other supporting modules.
UI Kitten is a customizable React Native UI Library based on <a href="https://hubs.ly/H0n6C-l0">Eva Design System</a> specifications, with 30+ UI components, 2 visual themes, and other supporting modules.
<hr>

## What's included
Expand All @@ -10,10 +10,10 @@ UI Kitten is a customizable React Native UI Library based on <a href="https://hu
- UI Components `@ui-kitten/components`
- Theme - Light and Dark visual themes, based on Design System.
- UI Components - high-quality React Native components with no 3rd party dependencies.
- Browser support with <a href="https://github.com/necolas/react-native-web" target="_blank">React Native Web</a>.
- Right-to-left writing system support for all components.
- <a href="https://github.com/necolas/react-native-web" target="_blank">React Native Web</a> support.
- UI Kitten Eva Icons `@ui-kitten/eva-icons`
- <a href="https://hubs.ly/H0n6Df20">Eva Icons</a> is a pack of more than 480 beautifully crafted icons. This module runs it in React Native
- <a href="https://hubs.ly/H0n6Df20">Eva Icons</a> is a pack of more than 480 beautifully crafted icons. This module runs it in React Native, adopting for better usage with UI Kitten components.
- UI Kitten Moment `@ui-kitten/moment`
- UI Kitten date-fns `@ui-kitten/date-fns`
- Modules allowing UI Kitten components to work with dates with help most popular date libraries.
Expand Down
9 changes: 3 additions & 6 deletions docs/src/articles/getting-started/where-to-start.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Where to start?

UI Kitten is a framework of UI components powered by Eva Design System for your next <a href="https://facebook.github.io/react-native/" target="_blank">React Native</a> application. Despite it is not required to know React Native framework to set up your first React Native UI Kitten project, it is highly recommended to go through the React Native tutorial beforehand and be familiar with basic React Native concepts.
UI Kitten is a framework of UI components powered by Eva Design System for your next <a href="https://facebook.github.io/react-native/" target="_blank">React Native</a> application. Despite it is not required to know React Native framework to set up your first UI Kitten project, it is highly recommended to go through the React Native tutorial beforehand and be familiar with basic React Native concepts.
<hr>

## Quick start tutorials

- **[Start a new App](guides/getting-started#new-apps)**

This tutorial explains how to setup React Native app with UI Kitten from a scratch.

- **[Install into existing App](guides/getting-started#manual-installation)**
- [Start a new App](guides/getting-started#new-apps) with a single command from a terminal.
- [Install into existing App](guides/getting-started#manual-installation). Already run some code? No problem.

Please consider creating an issue on GitHub if your use case is not described above. But we kindly ask to always look through the documentation and the list of existing issues first.

Expand Down
Loading