Skip to content

Commit 30ec42d

Browse files
committed
Merge branch 'master' of github.com:nativescript-community/ui-material-components
2 parents c16ce20 + 62074fc commit 30ec42d

File tree

23 files changed

+2068
-2254
lines changed

23 files changed

+2068
-2254
lines changed

.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
</natures>
2323
<filteredResources>
2424
<filter>
25-
<id>1604680591551</id>
25+
<id>1682616481632</id>
2626
<name></name>
2727
<type>30</type>
2828
<matcher>
2929
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
30+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
3131
</matcher>
3232
</filter>
3333
</filteredResources>

demo-ng

demo-react

demo-snippets/vue/TextView.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,19 @@
2727
</FormattedString>
2828
</MDTextView>
2929
<MDTextView id="textView2" editable="false" counterMaxLength="10" maxLength="10" hint="hint me" @textChange="onTextChange" @returnPress="onReturnPress" />
30-
<MDTextView id="textView3" placeholderColor="green" floatingColor="yellow" color="red" variant="outline" hint="text should be red" @textChange="onTextChange" v-model="value" @returnPress="onReturnPress" height="200" backgroundColor="blue"/>
30+
<MDTextView
31+
id="textView3"
32+
placeholderColor="green"
33+
floatingColor="yellow"
34+
color="red"
35+
variant="outline"
36+
hint="text should be red"
37+
helper="test"
38+
@textChange="onTextChange"
39+
v-model="value"
40+
@returnPress="onReturnPress"
41+
backgroundColor="blue"
42+
/>
3143
<MDTextView variant="filled" required="true" email="true" hint="fill this out..." @textChange="onTextChange" @returnPress="onReturnPress" />
3244
<MDTextView hint="fill this out..." />
3345
</StackLayout>
@@ -46,7 +58,7 @@ export default Vue.extend({
4658
4759
data() {
4860
return {
49-
title: title,
61+
title,
5062
value: 'test'
5163
};
5264
},

demo-vue

demo-vue3

packages/bottomsheet/tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@
99
}
1010
},
1111
"include": ["../../src/bottomsheet/**/*.ts", "../../references.d.ts", "../../tools/references.d.ts", "../../src/references.d.ts"],
12-
"exclude": ["../../src/bottomsheet/angular/**"]
13-
}
12+
"exclude": ["../../src/bottomsheet/angular/**"],
13+
"references": [
14+
{
15+
//Need for tsc
16+
"path": "../../tsconfig.vue3.json"
17+
}
18+
]
19+
}

src/bottom-navigation/index.ios.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TabStrip } from '@nativescript-community/ui-material-core-tabs/tab-stri
66
import { TabStripItem } from '@nativescript-community/ui-material-core-tabs/tab-strip-item';
77
// Types
88
// Requires
9-
import { CSSType, Color, CoreTypes, Device, Font, Frame, IOSHelper, ImageSource, Property, Utils, View, booleanConverter } from '@nativescript/core';
9+
import { CSSType, Color, CoreTypes, Device, Font, Frame, IOSHelper, ImageSource, ImageAsset, Property, Utils, View, booleanConverter } from '@nativescript/core';
1010
import { getTransformedText } from '@nativescript/core/ui/text-base';
1111
import { iOSNativeHelper } from '@nativescript/core/utils';
1212
export { TabContentItem, TabStrip, TabStripItem };
@@ -690,19 +690,28 @@ export class BottomNavigation extends TabNavigationBase {
690690
}
691691
const iconTag = [iconSource, font.fontStyle, font.fontWeight, font.fontSize, font.fontFamily, color].join(';');
692692

693-
let isFontIcon = false;
693+
const isFontIcon = false;
694694
let image: UIImage = this.mIconsCache[iconTag];
695695
if (!image) {
696-
let is;
697-
if (Utils.isFontIconURI(iconSource)) {
698-
isFontIcon = true;
699-
const fontIconCode = iconSource.split('//')[1];
700-
is = ImageSource.fromFontIconCodeSync(fontIconCode, font, color);
696+
let is: ImageSource | ImageAsset;
697+
if (typeof iconSource === 'string') {
698+
if (Utils.isFontIconURI(iconSource)) {
699+
const fontIconCode = iconSource.split('//')[1];
700+
const target = tabStripItem.image ? tabStripItem.image : tabStripItem;
701+
const font = target.style.fontInternal;
702+
if (!color) {
703+
color = target.style.color;
704+
}
705+
is = ImageSource.fromFontIconCodeSync(fontIconCode, font, color);
706+
} else {
707+
is = ImageSource.fromFileOrResourceSync(iconSource);
708+
}
701709
} else {
702-
is = ImageSource.fromFileOrResourceSync(iconSource);
710+
is = iconSource;
703711
}
704712

705-
if (is && is.ios) {
713+
image = is?.ios;
714+
if (image) {
706715
image = is.ios;
707716

708717
if (this.tabStrip && this.tabStrip.isIconSizeFixed) {

src/bottomsheet/vue3/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { App, createApp } from 'nativescript-vue3';
1+
import { App, createApp } from 'nativescript-vue';
22
import { Frame, View, ViewBase } from '@nativescript/core';
33
import { BottomSheetOptions } from '../bottomsheet';
44
import { ComponentCustomProperties } from '@vue/runtime-core';
55

66
declare module '@vue/runtime-core' {
77
interface ComponentCustomProperties {
8-
$showBottomSheet: (component: any, options: VueBottomSheetOptions) => Promise<any>;
8+
$showBottomSheet(component: any, options: VueBottomSheetOptions): Promise<any>;
99
$closeBottomSheet(...args);
1010
}
1111
}

0 commit comments

Comments
 (0)