@nativescript/template-tab-navigation-vue 9.0.1 → 9.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>APPL</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
18
+ <string>1.0.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>1.0</string>
22
+ <string>1.0.0</string>
23
23
  <key>LSRequiresIPhoneOS</key>
24
24
  <true/>
25
25
  <key>UILaunchStoryboardName</key>
package/app/app.css ADDED
@@ -0,0 +1,21 @@
1
+ @import "tailwindcss";
2
+
3
+ ActionBar {
4
+ background-color: #65adf1;
5
+ color: white;
6
+ }
7
+
8
+ .fas {
9
+ font-family: 'Font Awesome 5 Free', 'fa-solid-900';
10
+ font-weight: 900;
11
+ }
12
+
13
+ .far {
14
+ font-family: 'Font Awesome 5 Free', 'fa-regular-400';
15
+ font-weight: 400;
16
+ }
17
+
18
+ .fab {
19
+ font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
20
+ font-weight: 400;
21
+ }
package/app/app.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { createApp } from 'nativescript-vue'
2
+
3
+ import App from './components/App.vue'
4
+
5
+ createApp(App).start()
@@ -1,44 +1,36 @@
1
- <template lang="html">
1
+ <template>
2
2
  <TabView androidTabsPosition="bottom">
3
3
  <TabViewItem title="Home">
4
4
  <Frame id="items">
5
- <Items/>
5
+ <Items />
6
6
  </Frame>
7
7
  </TabViewItem>
8
8
 
9
9
  <TabViewItem title="Browse">
10
10
  <Frame id="browse">
11
- <Browse/>
11
+ <Browse />
12
12
  </Frame>
13
13
  </TabViewItem>
14
14
 
15
15
  <TabViewItem title="Search">
16
16
  <Frame id="search">
17
- <Search/>
17
+ <Search />
18
18
  </Frame>
19
19
  </TabViewItem>
20
20
  </TabView>
21
21
  </template>
22
22
 
23
- <script>
24
- import Items from "./Items.vue";
25
- import Browse from "./Browse.vue";
26
- import Search from "./Search.vue";
23
+ <script lang="ts">
24
+ import { defineComponent } from 'nativescript-vue'
25
+ import Items from './Items.vue'
26
+ import Browse from './Browse.vue'
27
+ import Search from './Search.vue'
27
28
 
28
- export default {
29
+ export default defineComponent({
29
30
  components: {
30
31
  Items,
31
32
  Browse,
32
33
  Search
33
34
  }
34
- };
35
+ })
35
36
  </script>
36
-
37
- <style lang="scss">
38
- // Start custom common variables
39
- @import "@nativescript/theme/scss/variables/blue";
40
- // End custom common variables
41
-
42
- // Custom styles
43
-
44
- </style>
@@ -1,31 +1,18 @@
1
- <template lang="html">
1
+ <template>
2
2
  <Page>
3
3
  <ActionBar>
4
- <Label text="Browse"></Label>
4
+ <Label text="Browse"/>
5
5
  </ActionBar>
6
6
 
7
- <GridLayout class="page__content">
8
- <Label class="page__content-icon far" text.decode="&#xf1ea;"></Label>
9
- <Label class="page__content-placeholder" :text="message"></Label>
7
+ <GridLayout>
8
+ <Label class="far text-7xl text-gray-400 text-center" style="vertical-align: top; margin-top: 20%" text.decode="&#xf1ea;"/>
9
+ <Label class="text-xl text-gray-400 text-center align-middle" text="Browse page content goes here"/>
10
10
  </GridLayout>
11
11
  </Page>
12
12
  </template>
13
13
 
14
- <script>
15
- export default {
16
- data() {
17
- return {
18
- message: "<!-- Browse page content goes here -->"
19
- };
20
- }
21
- }
22
- </script>
23
-
24
- <style lang="scss" scoped>
25
- // Start custom common variables
26
- @import "@nativescript/theme/scss/variables/blue";
27
- // End custom common variables
14
+ <script lang="ts">
15
+ import { defineComponent } from 'nativescript-vue'
28
16
 
29
- // Custom styles
30
-
31
- </style>
17
+ export default defineComponent({})
18
+ </script>
@@ -2,26 +2,19 @@
2
2
  <Page>
3
3
  <ActionBar>
4
4
  <NavigationButton @tap="$navigateBack()" android.systemIcon="ic_menu_back"/>
5
- <Label :text="item.name"></Label>
5
+ <Label :text="item.name"/>
6
6
  </ActionBar>
7
7
 
8
8
  <GridLayout>
9
- <Label class="m-10 h3" :text="item.description" verticalAlignment="top"></Label>
9
+ <Label class="m-2 text-lg" :text="item.description" verticalAlignment="top"/>
10
10
  </GridLayout>
11
11
  </Page>
12
12
  </template>
13
13
 
14
- <script>
15
- export default {
16
- props: ["item"],
17
- };
18
- </script>
19
-
20
- <style scoped lang="scss">
21
- // Start custom common variables
22
- @import "@nativescript/theme/scss/variables/blue";
23
- // End custom common variables
14
+ <script lang="ts">
15
+ import { defineComponent } from 'nativescript-vue'
24
16
 
25
- // Custom styles
26
-
27
- </style>
17
+ export default defineComponent({
18
+ props: ['item']
19
+ })
20
+ </script>
@@ -1,115 +1,59 @@
1
1
  <template>
2
2
  <Page>
3
3
  <ActionBar>
4
- <Label text="Home"></Label>
4
+ <Label text="Home"/>
5
5
  </ActionBar>
6
6
 
7
- <ListView for="item in items" @itemTap="onItemTap">
8
- <v-template>
7
+ <ListView :items="items" @itemTap="onItemTap">
8
+ <template #default="{ item }">
9
9
  <StackLayout orientation="horizontal">
10
- <Label :text="item.name" textWrap="true"></Label>
10
+ <Label :text="item.name" textWrap="true"/>
11
11
  </StackLayout>
12
- </v-template>
12
+ </template>
13
13
  </ListView>
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
18
- import ItemDetails from "./ItemDetails";
17
+ <script lang="ts">
18
+ import { defineComponent, $navigateTo } from 'nativescript-vue'
19
+ import ItemDetails from './ItemDetails.vue'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  data() {
22
23
  return {
23
24
  items: [
24
- {
25
- name: "Item 1",
26
- description: "Description for Item 1"
27
- },
28
- {
29
- name: "Item 2",
30
- description: "Description for Item 2"
31
- },
32
- {
33
- name: "Item 3",
34
- description: "Description for Item 3"
35
- },
36
- {
37
- name: "Item 4",
38
- description: "Description for Item 4"
39
- },
40
- {
41
- name: "Item 5",
42
- description: "Description for Item 5"
43
- },
44
- {
45
- name: "Item 6",
46
- description: "Description for Item 6"
47
- },
48
- {
49
- name: "Item 7",
50
- description: "Description for Item 7"
51
- },
52
- {
53
- name: "Item 8",
54
- description: "Description for Item 8"
55
- },
56
- {
57
- name: "Item 9",
58
- description: "Description for Item 9"
59
- },
60
- {
61
- name: "Item 10",
62
- description: "Description for Item 10"
63
- },
64
- {
65
- name: "Item 11",
66
- description: "Description for Item 11"
67
- },
68
- {
69
- name: "Item 12",
70
- description: "Description for Item 12"
71
- },
72
- {
73
- name: "Item 13",
74
- description: "Description for Item 13"
75
- },
76
- {
77
- name: "Item 14",
78
- description: "Description for Item 14"
79
- },
80
- {
81
- name: "Item 15",
82
- description: "Description for Item 15"
83
- },
84
- {
85
- name: "Item 16",
86
- description: "Description for Item 16"
87
- }
25
+ { name: "Item 1", description: "Description for Item 1" },
26
+ { name: "Item 2", description: "Description for Item 2" },
27
+ { name: "Item 3", description: "Description for Item 3" },
28
+ { name: "Item 4", description: "Description for Item 4" },
29
+ { name: "Item 5", description: "Description for Item 5" },
30
+ { name: "Item 6", description: "Description for Item 6" },
31
+ { name: "Item 7", description: "Description for Item 7" },
32
+ { name: "Item 8", description: "Description for Item 8" },
33
+ { name: "Item 9", description: "Description for Item 9" },
34
+ { name: "Item 10", description: "Description for Item 10" },
35
+ { name: "Item 11", description: "Description for Item 11" },
36
+ { name: "Item 12", description: "Description for Item 12" },
37
+ { name: "Item 13", description: "Description for Item 13" },
38
+ { name: "Item 14", description: "Description for Item 14" },
39
+ { name: "Item 15", description: "Description for Item 15" },
40
+ { name: "Item 16", description: "Description for Item 16" }
88
41
  ]
89
- };
42
+ }
90
43
  },
91
44
  methods: {
92
- onItemTap(args) {
93
- this.$navigateTo(ItemDetails, {
45
+ onItemTap(args: any) {
46
+ $navigateTo(ItemDetails, {
94
47
  frame: 'items',
95
- props: {item: args.item},
48
+ props: { item: args.item },
96
49
  animated: true,
97
50
  transition: {
98
51
  name: "slide",
99
52
  duration: 200,
100
53
  curve: "ease"
101
54
  }
102
- });
55
+ })
103
56
  }
104
57
  }
105
- };
58
+ })
106
59
  </script>
107
-
108
- <style scoped lang="scss">
109
- // Start custom common variables
110
- @import "@nativescript/theme/scss/variables/blue";
111
- // End custom common variables
112
-
113
- // Custom styles
114
-
115
- </style>
@@ -1,31 +1,18 @@
1
- <template lang="html">
1
+ <template>
2
2
  <Page>
3
3
  <ActionBar>
4
- <Label text="Search"></Label>
4
+ <Label text="Search"/>
5
5
  </ActionBar>
6
6
 
7
- <GridLayout class="page__content">
8
- <Label class="page__content-icon fas" text.decode="&#xf002;"></Label>
9
- <Label class="page__content-placeholder" :text="message"></Label>
7
+ <GridLayout>
8
+ <Label class="fas text-7xl text-gray-400 text-center" style="vertical-align: top; margin-top: 20%" text.decode="&#xf002;"/>
9
+ <Label class="text-xl text-gray-400 text-center align-middle" text="Search page content goes here"/>
10
10
  </GridLayout>
11
11
  </Page>
12
12
  </template>
13
13
 
14
- <script>
15
- export default {
16
- data() {
17
- return {
18
- message: "<!-- Search page content goes here -->"
19
- };
20
- }
21
- }
22
- </script>
23
-
24
- <style lang="scss" scoped>
25
- // Start custom common variables
26
- @import "@nativescript/theme/scss/variables/blue";
27
- // End custom common variables
14
+ <script lang="ts">
15
+ import { defineComponent } from 'nativescript-vue'
28
16
 
29
- // Custom styles
30
-
31
- </style>
17
+ export default defineComponent({})
18
+ </script>
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@nativescript/template-tab-navigation-vue",
3
- "main": "app/app.js",
3
+ "main": "app/app.ts",
4
4
  "displayName": "Tabs",
5
- "version": "9.0.1",
5
+ "version": "9.0.3",
6
6
  "description": "Tabbed interface template using Vue",
7
7
  "author": "NativeScript Team <oss@nativescript.org>",
8
8
  "license": "Apache-2.0",
@@ -24,7 +24,8 @@
24
24
  "tools",
25
25
  "!tools/assets",
26
26
  ".editorconfig",
27
- "jsconfig.json"
27
+ "types",
28
+ "tsconfig.json"
28
29
  ],
29
30
  "keywords": [
30
31
  "nstudio",
@@ -41,11 +42,14 @@
41
42
  ],
42
43
  "dependencies": {
43
44
  "@nativescript/core": "~9.0.0",
44
- "@nativescript/theme": "^3.1.0",
45
- "nativescript-vue": "~2.9.3"
45
+ "nativescript-vue": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@nativescript/webpack": "5.0.24",
49
- "nativescript-vue-template-compiler": "~2.9.3"
48
+ "@nativescript/tailwind": "^4.0.0",
49
+ "@nativescript/types": "~9.0.0",
50
+ "@nativescript/webpack": "~5.0.31",
51
+ "@types/node": "^20.0.0",
52
+ "tailwindcss": "^4.0.0",
53
+ "typescript": "~5.8.0"
50
54
  }
51
55
  }
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "ES2020",
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "lib": ["dom", "ESNext"],
8
+ "sourceMap": true,
9
+ "noEmitHelpers": true,
10
+ "importHelpers": true,
11
+ "baseUrl": ".",
12
+ "paths": {
13
+ "~/*": ["app/*"],
14
+ "@/*": ["app/*"]
15
+ },
16
+ "typeRoots": ["types"],
17
+ "types": ["node"],
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "experimentalDecorators": true,
21
+ "emitDecoratorMetadata": true,
22
+ "skipLibCheck": true
23
+ },
24
+ "include": ["app", "types"],
25
+ "exclude": ["node_modules", "platforms"]
26
+ }
@@ -0,0 +1 @@
1
+ /// <reference path="../node_modules/@nativescript/types/index.d.ts" />
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import { DefineComponent } from 'nativescript-vue'
3
+ const component: DefineComponent<{}, {}, any>
4
+ export default component
5
+ }
@@ -1,46 +0,0 @@
1
- @import '@nativescript/theme/core';
2
- @import '@nativescript/theme/default';
3
-
4
- // Place any CSS rules you want to apply on both iOS and Android here.
5
- // This is where the vast majority of your CSS code goes.
6
-
7
- // Font icon class
8
- .fab {
9
- font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
10
- font-weight: 400;
11
- }
12
-
13
- .fas {
14
- font-family: 'Font Awesome 5 Free', 'fa-solid-900';
15
- font-weight: 900;
16
- }
17
-
18
- .far {
19
- font-family: 'Font Awesome 5 Free', 'fa-regular-400';
20
- font-weight: 400;
21
- }
22
-
23
- // Custom tabstrip item class
24
- .navigation__item {
25
- &:active,
26
- &:active Label {
27
- @include colorize($color: complementary);
28
- }
29
- }
30
-
31
- // Common page class
32
- .page__content {
33
- &-icon,
34
- &-placeholder {
35
- color: const(grey);
36
- font-size: 20;
37
- vertical-align: center;
38
- horizontal-align: center;
39
- }
40
-
41
- &-icon {
42
- font-size: 72;
43
- vertical-align: top;
44
- margin-top: 20%;
45
- }
46
- }
@@ -1,4 +0,0 @@
1
- // Import common styles
2
- @import 'app-common';
3
-
4
- // Place any CSS rules you want to apply only on Android here
package/app/app.ios.scss DELETED
@@ -1,4 +0,0 @@
1
- // Import common styles
2
- @import 'app-common';
3
-
4
- // Place any CSS rules you want to apply only on iOS here
package/app/app.js DELETED
@@ -1,7 +0,0 @@
1
- import Vue from 'nativescript-vue'
2
-
3
- import App from './components/App'
4
-
5
- new Vue({
6
- render: (h) => h(App),
7
- }).$start()
package/jsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": "./",
4
- "paths": {
5
- "~/*": ["app/*"],
6
- "@/*": ["app/*"]
7
- }
8
- },
9
- "include": ["app/**/*"]
10
- }