Skip to content

Commit 935ab2f

Browse files
committed
Merge branch 'master' of github.com:nativescript-community/ui-material-components into pr/alexander-mai/277
2 parents c66a4ce + 41c9ea7 commit 935ab2f

File tree

125 files changed

+1539
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1539
-740
lines changed

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,64 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.25](https://github.com/nativescript-community/ui-material-components/compare/v5.2.24...v5.2.25) (2021-04-22)
7+
8+
9+
### Bug Fixes
10+
11+
* **speeddial:** horizontalAlignment support ([48cd144](https://github.com/nativescript-community/ui-material-components/commit/48cd144eef0c08b5de4018e8c7cb9ae9838bbada))
12+
13+
14+
15+
16+
17+
## [5.2.24](https://github.com/nativescript-community/ui-material-components/compare/v5.2.23...v5.2.24) (2021-04-20)
18+
19+
20+
### Bug Fixes
21+
22+
* **bottom-navigation:** android fix for issue while navigating ([6e5da28](https://github.com/nativescript-community/ui-material-components/commit/6e5da2808ab3977606b0f8da2688e5026df9ea14))
23+
* **tabs:** android fix for issue while navigating ([f6d28e5](https://github.com/nativescript-community/ui-material-components/commit/f6d28e58c0621762221417a305c5209d3bdcfafb))
24+
25+
26+
27+
28+
29+
## [5.2.23](https://github.com/nativescript-community/ui-material-components/compare/v5.2.22...v5.2.23) (2021-04-20)
30+
31+
32+
### Bug Fixes
33+
34+
* **android:** prevent crash on app going to background ([89d1611](https://github.com/nativescript-community/ui-material-components/commit/89d16111ad2c91ad95a7d3e28db0629860f5633b))
35+
36+
37+
38+
39+
40+
## [5.2.22](https://github.com/nativescript-community/ui-material-components/compare/v5.2.21...v5.2.22) (2021-04-16)
41+
42+
43+
### Bug Fixes
44+
45+
* **bottomsheet:** android prevent crash on back button ([1245713](https://github.com/nativescript-community/ui-material-components/commit/12457132196c02c52b1792d7696a243cfacd329f))
46+
47+
48+
49+
50+
51+
## [5.2.21](https://github.com/nativescript-community/ui-material-components/compare/v5.2.20...v5.2.21) (2021-04-16)
52+
53+
54+
### Bug Fixes
55+
56+
* highlightColor as css property too ([d8dc4fd](https://github.com/nativescript-community/ui-material-components/commit/d8dc4fd3b69c5dbbb38ee498ebf3cae4af0d8785))
57+
* make all tab strip props css ([a273379](https://github.com/nativescript-community/ui-material-components/commit/a273379cf7379288f85e4590844e3d85ea8e41c9))
58+
* **bottomnavigationbar:** ios dont depend on tag as the native side changes it ([2bf6601](https://github.com/nativescript-community/ui-material-components/commit/2bf66016e10298f3f63e505e8046b4b664d6619e))
59+
60+
61+
62+
63+
664
## [5.2.20](https://github.com/nativescript-community/ui-material-components/compare/v5.2.19...v5.2.20) (2021-04-12)
765

866

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@
44

55
Build beautiful, usable products using Material Components for NativeScript.
66

7+
## Installation
8+
9+
### Android
10+
Ensure your Android Theme is inheriting from `MaterialComponents`.
11+
Inside ```App_resources/android/res/values/styles.xml``` replace all occurences of ```Theme.AppCompat``` with ```Theme.MaterialComponents```
12+
You can see an example in the demo-vue app.
13+
14+
## Theming
15+
Defining the theme and the default colors must be done a bit differently on iOS and Android
16+
17+
* **Android**: You must set the colors through [android Style](https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md#appcompat-themes)
18+
* **iOS**: You must set the colors programmatically at your app startup
19+
```typescript
20+
import { themer } from '@nativescript-community/ui-material-core';
21+
if (global.isIOS) {
22+
themer.setPrimaryColor('#bff937');
23+
themer.setAccentColor('#ff8a39');
24+
themer.setSecondaryColor('#a830d7');
25+
}
26+
```
27+
28+
## Mixins
29+
Through this component you can apply `elevation` or `rippleColor` to any `View`. To enable that feature your must "install" the mixins. Make sure you do it before creating any view.
30+
```typescript
31+
import { installMixins } from '@nativescript-community/ui-material-core';
32+
installMixins();
33+
```
34+
735
## Components
836

937
| Name | README | npm | Material design |

builddoc.js

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,36 @@ const typedocJson = require('./typedoc');
1313
* @param {string} options.outDir
1414
* @param {Partial<import('typedoc').TypeDocOptions>} [typeDocOptions]
1515
*/
16-
const createTypeScriptApiDocs = exports.createTypeScriptApiDocs = async ({ entryPoint, outDir }, typeDocOptions) => {
17-
const app = new td.Application();
18-
app.options.addReader(new td.TSConfigReader());
16+
const createTypeScriptApiDocs = (exports.createTypeScriptApiDocs = async ({ entryPoint, outDir }, typeDocOptions) => {
17+
const app = new td.Application();
18+
app.options.addReader(new td.TSConfigReader());
1919
console.log('createTypeScriptApiDocs', typeDocOptions);
20-
let files = await globby(['src/**/*.d.ts', 'src/**/index.ts', '!**/references.d.ts', '!**/appbar', '!**/page', '!**/typings', '!**/angular', '!**/vue', '!**/react'], {
20+
const files = await globby(['src/**/*.d.ts', 'src/**/index.ts', '!**/references.d.ts', '!**/appbar', '!**/page', '!**/typings', '!**/angular', '!**/vue', '!**/react'], {
2121
absolute: true,
2222
cwd: path.join(process.cwd())
23-
})
24-
console.log('files', files);
25-
app.bootstrap({
26-
tsconfig: 'tsconfig.json',
27-
...typedocJson,
28-
...typeDocOptions,
29-
entryPoints: files
30-
});
31-
//@ts-ignore
32-
app.options.setCompilerOptions(files, {
33-
esModuleInterop: true
34-
})
35-
const program = ts.createProgram(
36-
app.options.getFileNames(),
37-
app.options.getCompilerOptions()
38-
);
23+
});
24+
console.log('files', files);
25+
app.bootstrap({
26+
tsconfig: 'tsconfig.json',
27+
...typedocJson,
28+
...typeDocOptions,
29+
entryPoints: files
30+
});
31+
//@ts-ignore
32+
app.options.setCompilerOptions(files, {
33+
esModuleInterop: true
34+
});
35+
const program = ts.createProgram(app.options.getFileNames(), app.options.getCompilerOptions());
3936

40-
const project = app.converter.convert(
41-
app.expandInputFiles(app.options.getValue('entryPoints')),
42-
program
43-
);
37+
const project = app.converter.convert(app.expandInputFiles(app.options.getValue('entryPoints')), program);
4438

45-
if (project) {
46-
await app.generateDocs(project, outDir);
47-
} else {
48-
throw new Error(`Error creating the TypeScript API docs for ${entryPoint}.`);
49-
}
50-
};
39+
if (project) {
40+
await app.generateDocs(project, outDir);
41+
} else {
42+
throw new Error(`Error creating the TypeScript API docs for ${entryPoint}.`);
43+
}
44+
});
5145
// app.generateDocs(project, "./docs");
5246
// app.generateJson(project, "./docs.json");
5347

54-
createTypeScriptApiDocs({outDir:"./docs"});
48+
createTypeScriptApiDocs({ outDir: './docs' });

demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
<activity
3030
android:name="com.tns.NativeScriptActivity"
3131
android:label="@string/title_activity_kimera"
32-
android:theme="@style/LaunchScreenTheme">
32+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
33+
android:theme="@style/LaunchScreenTheme"
34+
android:windowSoftInputMode="stateHidden|adjustPan"
35+
android:launchMode="singleTask">
3336

3437
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
3538

demo-vue/app/examples/BottomNavigation.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ MDTabContentItem.special {
8484
8585
MDTabStrip {
8686
color: skyblue;
87+
selected-item-color: white;
88+
un-selected-item-color: blue;
89+
highlight-color: yellow;
90+
background-color: green;
8791
}
8892
8993
MDTabStripItem.special {

demo-vue/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dependencies": {
77
"@mdi/font": "4.9.95",
88
"@nativescript/core": "8.0.0",
9-
"@nativescript-community/text": "1.4.9",
9+
"@nativescript-community/text": "1.4.11",
1010
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
1111
"@nativescript-community/ui-material-bottom-navigation": "file:../packages/bottom-navigation",
1212
"@nativescript-community/ui-material-bottomnavigationbar": "file:../packages/bottomnavigationbar",
@@ -33,20 +33,18 @@
3333
"@babel/core": "^7.13.14",
3434
"@nativescript/android": "8.0.0",
3535
"@nativescript/types": "8.0.0",
36-
"@nativescript/webpack": "5.0.0-beta.3",
36+
"@nativescript/webpack": "5.0.0-beta.9",
3737
"babel-loader": "^8.2.2",
3838
"nativescript-vue-template-compiler": "~2.9.0",
3939
"sass-loader": "^11.0.1",
4040
"scss-symbols-parser": "^2.0.1",
4141
"string-replace-loader": "^3.0.1",
4242
"tns-ios":"6.5.4",
43-
"typescript": "^4.2.3",
43+
"typescript": "^4.2.4",
4444
"vue": "^2.6.12",
4545
"vue-i18n": "^8.24.1",
4646
"vue-loader": "^15.9.6",
47-
"vue-property-decorator": "^8.5.1",
48-
"webpack": "^5.30.0",
49-
"webpack-cli": "^4.6.0"
47+
"vue-property-decorator": "^8.5.1"
5048
},
5149
"scripts": {
5250
"tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**'"

docs/assets/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
--color-panel-divider: #eee;
1111
--color-comment-tag: #707070;
1212
--color-comment-tag-text: #fff;
13-
--color-code-background: rgba(#000, 0.04);
13+
--color-code-background: rgba(0, 0, 0, 0.04);
1414
--color-ts: #9600ff;
1515
--color-ts-interface: #647f1b;
1616
--color-ts-enum: #937210;

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/_nativescript_community_ui_material_bottom_navigation.bottomnavigation.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h3>android</h3>
143143
<div class="tsd-signature tsd-kind-icon">android<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
144144
<aside class="tsd-sources">
145145
<ul>
146-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L50">src/bottom-navigation/index.d.ts:50</a></li>
146+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L50">src/bottom-navigation/index.d.ts:50</a></li>
147147
</ul>
148148
</aside>
149149
<div class="tsd-comment tsd-typography">
@@ -158,7 +158,7 @@ <h3>ios</h3>
158158
<div class="tsd-signature tsd-kind-icon">ios<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
159159
<aside class="tsd-sources">
160160
<ul>
161-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L55">src/bottom-navigation/index.d.ts:55</a></li>
161+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L55">src/bottom-navigation/index.d.ts:55</a></li>
162162
</ul>
163163
</aside>
164164
<div class="tsd-comment tsd-typography">
@@ -173,7 +173,7 @@ <h3>ios<wbr>Custom<wbr>Positioning</h3>
173173
<div class="tsd-signature tsd-kind-icon">ios<wbr>Custom<wbr>Positioning<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
174174
<aside class="tsd-sources">
175175
<ul>
176-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L79">src/bottom-navigation/index.d.ts:79</a></li>
176+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L79">src/bottom-navigation/index.d.ts:79</a></li>
177177
</ul>
178178
</aside>
179179
</section>
@@ -183,7 +183,7 @@ <h3>items</h3>
183183
<div class="tsd-signature tsd-kind-icon">items<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></div>
184184
<aside class="tsd-sources">
185185
<ul>
186-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L35">src/bottom-navigation/index.d.ts:35</a></li>
186+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L35">src/bottom-navigation/index.d.ts:35</a></li>
187187
</ul>
188188
</aside>
189189
<div class="tsd-comment tsd-typography">
@@ -198,7 +198,7 @@ <h3>selected<wbr>Index</h3>
198198
<div class="tsd-signature tsd-kind-icon">selected<wbr>Index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
199199
<aside class="tsd-sources">
200200
<ul>
201-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L45">src/bottom-navigation/index.d.ts:45</a></li>
201+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L45">src/bottom-navigation/index.d.ts:45</a></li>
202202
</ul>
203203
</aside>
204204
<div class="tsd-comment tsd-typography">
@@ -213,7 +213,7 @@ <h3>tab<wbr>Strip</h3>
213213
<div class="tsd-signature tsd-kind-icon">tab<wbr>Strip<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
214214
<aside class="tsd-sources">
215215
<ul>
216-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L40">src/bottom-navigation/index.d.ts:40</a></li>
216+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L40">src/bottom-navigation/index.d.ts:40</a></li>
217217
</ul>
218218
</aside>
219219
<div class="tsd-comment tsd-typography">
@@ -228,7 +228,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> selected<wbr>Index<wbr>Ch
228228
<div class="tsd-signature tsd-kind-icon">selected<wbr>Index<wbr>Changed<wbr>Event<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
229229
<aside class="tsd-sources">
230230
<ul>
231-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L60">src/bottom-navigation/index.d.ts:60</a></li>
231+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L60">src/bottom-navigation/index.d.ts:60</a></li>
232232
</ul>
233233
</aside>
234234
<div class="tsd-comment tsd-typography">
@@ -250,7 +250,7 @@ <h3>on</h3>
250250
<li class="tsd-description">
251251
<aside class="tsd-sources">
252252
<ul>
253-
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/65e77f00/src/bottom-navigation/index.d.ts#L74">src/bottom-navigation/index.d.ts:74</a></li>
253+
<li>Defined in <a href="https://github.com/nativescript-community/ui-material-components/blob/29ee31ae/src/bottom-navigation/index.d.ts#L74">src/bottom-navigation/index.d.ts:74</a></li>
254254
</ul>
255255
</aside>
256256
<div class="tsd-comment tsd-typography">

0 commit comments

Comments
 (0)