diff --git a/packages/core/package.json b/packages/core/package.json index 379914ced1..b32db09929 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,7 +4,7 @@ "description": "Base components for Ionic", "main": "dist/collection/collection-manifest.json", "scripts": { - "build": "npm run copy.vendor && stencil build --prod", + "build": "stencil build --prod", "dev": "concurrently --raw \"stencil build --watch\" \"stencil-dev-server\"", "copy.vendor": "mkdir -p ./dist/collection/vendor && cp -Rf ./src/vendor ./dist/collection", "link.stencil": "npm link @stencil/core", diff --git a/packages/core/src/components/app/fonts/ionicons.scss b/packages/core/src/components/app/fonts/ionicons.scss new file mode 100644 index 0000000000..436a309139 --- /dev/null +++ b/packages/core/src/components/app/fonts/ionicons.scss @@ -0,0 +1,50 @@ + +// Ionicons Icon Font CSS +// -------------------------- +// Ionicons CSS for Ionic's element +// ionicons-icons.scss has the icons and their unicode characters + +$ionicons-font-path: $font-path !default; + +@import "ionicons-icons"; +@import "ionicons-variables"; + + +@font-face { + font-family: "Ionicons"; + src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"), + url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"), + url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"); + font-weight: normal; + font-style: normal; +} + +ion-icon { + display: inline-block; + + font-family: "Ionicons"; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-style: normal; + font-variant: normal; + font-weight: normal; + line-height: 1; + text-rendering: auto; + text-transform: none; + speak: none; + + @include rtl() { + &[aria-label^="arrow"]::before, + &[flip-rtl]::before { + transform: scaleX(-1); + } + + &[unflip-rtl]::before { + transform: scaleX(1); + } + } + + &::before { + display: inline-block; + } +} diff --git a/packages/core/src/components/app/fonts/noto-sans-bold.ttf b/packages/core/src/components/app/fonts/noto-sans-bold.ttf new file mode 100755 index 0000000000..6e00cdce1d Binary files /dev/null and b/packages/core/src/components/app/fonts/noto-sans-bold.ttf differ diff --git a/packages/core/src/components/app/fonts/noto-sans-bold.woff b/packages/core/src/components/app/fonts/noto-sans-bold.woff new file mode 100644 index 0000000000..6a67f6e2d9 Binary files /dev/null and b/packages/core/src/components/app/fonts/noto-sans-bold.woff differ diff --git a/packages/core/src/components/app/fonts/noto-sans-regular.ttf b/packages/core/src/components/app/fonts/noto-sans-regular.ttf new file mode 100755 index 0000000000..9dd10199bc Binary files /dev/null and b/packages/core/src/components/app/fonts/noto-sans-regular.ttf differ diff --git a/packages/core/src/components/app/fonts/noto-sans-regular.woff b/packages/core/src/components/app/fonts/noto-sans-regular.woff new file mode 100644 index 0000000000..8245f8b319 Binary files /dev/null and b/packages/core/src/components/app/fonts/noto-sans-regular.woff differ diff --git a/packages/core/src/components/app/fonts/noto-sans.scss b/packages/core/src/components/app/fonts/noto-sans.scss new file mode 100644 index 0000000000..cb8602d700 --- /dev/null +++ b/packages/core/src/components/app/fonts/noto-sans.scss @@ -0,0 +1,34 @@ +// Noto Sans Font +// Google +// Apache License, version 2.0 +// http://www.apache.org/licenses/LICENSE-2.0.html + +$noto-sans-font-path: $font-path !default; + +@font-face { + font-family: "Noto Sans"; + font-style: normal; + font-weight: 300; + src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Noto Sans"; + font-style: normal; + font-weight: 400; + src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Noto Sans"; + font-style: normal; + font-weight: 500; + src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype"); +} + +@font-face { + font-family: "Noto Sans"; + font-style: normal; + font-weight: 700; + src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype"); +} diff --git a/packages/core/src/components/app/fonts/roboto-bold.ttf b/packages/core/src/components/app/fonts/roboto-bold.ttf new file mode 100644 index 0000000000..4e35166a1f Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-bold.ttf differ diff --git a/packages/core/src/components/app/fonts/roboto-bold.woff b/packages/core/src/components/app/fonts/roboto-bold.woff new file mode 100644 index 0000000000..3143de2975 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-bold.woff differ diff --git a/packages/core/src/components/app/fonts/roboto-bold.woff2 b/packages/core/src/components/app/fonts/roboto-bold.woff2 new file mode 100644 index 0000000000..e9d591eb60 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-bold.woff2 differ diff --git a/packages/core/src/components/app/fonts/roboto-light.ttf b/packages/core/src/components/app/fonts/roboto-light.ttf new file mode 100644 index 0000000000..5e26ccdb1e Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-light.ttf differ diff --git a/packages/core/src/components/app/fonts/roboto-light.woff b/packages/core/src/components/app/fonts/roboto-light.woff new file mode 100644 index 0000000000..1bff3ec454 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-light.woff differ diff --git a/packages/core/src/components/app/fonts/roboto-light.woff2 b/packages/core/src/components/app/fonts/roboto-light.woff2 new file mode 100644 index 0000000000..94a60b9567 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-light.woff2 differ diff --git a/packages/core/src/components/app/fonts/roboto-medium.ttf b/packages/core/src/components/app/fonts/roboto-medium.ttf new file mode 100644 index 0000000000..034710638e Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-medium.ttf differ diff --git a/packages/core/src/components/app/fonts/roboto-medium.woff b/packages/core/src/components/app/fonts/roboto-medium.woff new file mode 100644 index 0000000000..d3c82e1846 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-medium.woff differ diff --git a/packages/core/src/components/app/fonts/roboto-medium.woff2 b/packages/core/src/components/app/fonts/roboto-medium.woff2 new file mode 100644 index 0000000000..74aaff44b3 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-medium.woff2 differ diff --git a/packages/core/src/components/app/fonts/roboto-regular.ttf b/packages/core/src/components/app/fonts/roboto-regular.ttf new file mode 100644 index 0000000000..05037ed5e5 Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-regular.ttf differ diff --git a/packages/core/src/components/app/fonts/roboto-regular.woff b/packages/core/src/components/app/fonts/roboto-regular.woff new file mode 100644 index 0000000000..5e353cf47a Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-regular.woff differ diff --git a/packages/core/src/components/app/fonts/roboto-regular.woff2 b/packages/core/src/components/app/fonts/roboto-regular.woff2 new file mode 100644 index 0000000000..96a601550e Binary files /dev/null and b/packages/core/src/components/app/fonts/roboto-regular.woff2 differ diff --git a/packages/core/src/components/app/fonts/roboto.scss b/packages/core/src/components/app/fonts/roboto.scss new file mode 100644 index 0000000000..ea297073f6 --- /dev/null +++ b/packages/core/src/components/app/fonts/roboto.scss @@ -0,0 +1,34 @@ +// Roboto Font +// Google +// Apache License, version 2.0 +// http://www.apache.org/licenses/LICENSE-2.0.html + +$roboto-font-path: $font-path !default; + +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 300; + src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype"); +} + +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 400; + src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 500; + src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype"); +} + +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 700; + src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype"); +} diff --git a/packages/core/src/components/icon/icon.tsx b/packages/core/src/components/icon/icon.tsx index 19ee3b6e32..ef7ef790e4 100644 --- a/packages/core/src/components/icon/icon.tsx +++ b/packages/core/src/components/icon/icon.tsx @@ -1,6 +1,6 @@ import { Component, h, Prop, State, VNodeData } from '@stencil/core'; -export declare const publicPath: string; +const publicPath = ''; @Component({ @@ -12,7 +12,8 @@ export declare const publicPath: string; }, host: { theme: 'icon' - } + }, + assetsDir: './svg' }) export class Icon { mode: string; @@ -217,4 +218,4 @@ interface GlobalIonIcon { activeRequests: {[url: string]: boolean}; loadCallbacks: {[url: string]: {(loadedSvgContent: string): void}[]}; svgContents: {[url: string]: string}; -} \ No newline at end of file +} diff --git a/packages/core/src/components/slides/slides.tsx b/packages/core/src/components/slides/slides.tsx index ceacce5613..b1b8fe0fe1 100644 --- a/packages/core/src/components/slides/slides.tsx +++ b/packages/core/src/components/slides/slides.tsx @@ -24,7 +24,8 @@ import { Swiper } from '../../vendor/swiper'; @Component({ tag: 'ion-slides', - styleUrl: 'slides.scss' + styleUrl: 'slides.scss', + assetsDir: '../../vendor' }) export class Slides { swiper: any;