chore(): begin adding ionic components to mono-repo.

This commit is contained in:
Josh Thomas
2017-06-21 09:33:06 -05:00
parent 1181fe98fc
commit bd5b67304d
2159 changed files with 15687 additions and 147 deletions

View File

@ -0,0 +1,25 @@
// we don't want to run copy for the demos, so just override the config for now
var path = require('path');
module.exports = {
copyAssets: {
src: [path.join(path.dirname(process.env.IONIC_APP_ENTRY_POINT), '..', 'assets', '**', '*')],
dest: path.join('{{WWW}}', 'assets')
},
copyIndexContent: {
src: [path.join(process.cwd(), 'scripts', 'demos', 'index.html')],
dest: '{{WWW}}'
},
copyFonts: {
src: [`${process.cwd()}/node_modules/ionicons/dist/fonts/**/*`, `${process.cwd()}/src/fonts/**/*`],
dest: path.join('{{WWW}}', 'assets', 'fonts')
},
copyPolyfills: {
src: [path.join(process.cwd(), 'dist', 'demos', 'polyfills', 'polyfills.js')],
dest: '{{BUILD}}'
},
sharedCss: {
src: [path.join(process.cwd(), 'scripts', 'demos', 'demos.shared.css')],
dest: `{{BUILD}}`
}
}

View File

@ -0,0 +1,241 @@
/*
Scrollbar
*/
body.has-scrollbar .scroll-content {
margin-right: -15px;
}
body.has-scrollbar ion-menu .scroll-content {
margin-right: 0;
}
/*
Popover
*/
page-api-radio-popover ion-row,
page-api-radio-popover ion-col {
padding: 0;
}
.popover-text-button {
padding-left: 0;
text-align: center;
min-height: 20px;
line-height: 18px;
}
.popover-text-button .item-inner {
padding-right: 0;
}
.popover-text-smaller {
font-size: 12px;
}
.popover-text-larger {
font-size: 16px;
}
.popover-row-dots {
text-align: center;
}
.popover-dot {
height: 30px;
width: 30px;
border-radius: 50%;
margin: 10px auto;
position: relative;
}
.popover-dot-white {
background-color: rgb(255,255,255);
}
.popover-dot-tan {
background-color: rgb(249,241,228);
}
.popover-dot-grey {
background-color: rgb(76,75,80);
}
.popover-dot-black {
background-color: rgb(0,0,0);
}
.ios .popover-dot.selected,
.md .popover-dot.selected,
.wp .popover-dot.selected {
border-width: 2px;
border-color: #327eff;
}
.popover-text-athelas {
font-family: "Athelas";
}
.popover-text-charter {
font-family: "Charter";
}
.popover-text-iowan {
font-family: "Iowan";
}
.popover-text-palatino {
font-family: "Palatino";
}
.popover-text-san-francisco {
font-family: "San Francisco";
}
.popover-text-seravek {
font-family: "Seravek";
}
.popover-text-times-new-roman {
font-family: "Times New Roman";
}
/*
iOS Popover
*/
.ios .popover-text-smaller {
border-right: 1px solid #c8c7cc;
}
.ios .popover-row-dots {
border-bottom: 1px solid #c8c7cc;
}
.ios .popover-dot {
border: 1px solid #c8c7cc;
}
.hairlines .popover-text-smaller,
.hairlines .popover-row-dots,
.hairlines .popover-dot {
border-width: 0.55px;
}
/*
Material Design Popover
*/
.md .popover-text-smaller {
border-right: 1px solid #dedede;
}
.md .popover-row-dots {
border-bottom: 1px solid #dedede;
}
.md .popover-dot {
border: 1px solid #dedede;
}
/*
Windows Popover
*/
.wp .popover-dot {
border: 2px solid #ccc;
}
/*
Loading Custom Component
*/
.loading-custom-spinner-container {
position: relative;
display: inline-block;
box-sizing: border-box;
width: 100%;
margin-bottom: 20px;
}
.loading-custom-spinner-box {
margin: 0 auto;
position: relative;
box-sizing: border-box;
border: 4px solid #000;
width: 60px;
height: 60px;
animation: spin 3s infinite linear;
}
.loading-custom-spinner-box:before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-sizing: border-box;
border: 4px solid #000;
width: 40px;
height: 40px;
animation: pulse 1.5s infinite ease;
}
/*
Windows Loading Custom Component
*/
.wp .loading-custom-spinner-box,
.wp .loading-custom-spinner-box:before {
border-color: #fff;
}
/*
Loading Custom Component Keyframes
*/
@-webkit-keyframes pulse {
50% {
border-width: 20px;
}
}
@keyframes pulse {
50% {
border-width: 20px;
}
}
@-webkit-keyframes spin {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/*
Tabs Only
*/
ion-tabs[tabs-only]:first-child {
margin-top: 20px;
}
ion-tabs[tabs-only] {
margin-bottom: 20px;
contain: none;
}
ion-tabs[tabs-only],
ion-tabs[tabs-only] .tabbar {
position: relative;
top: auto;
height: auto;
visibility: visible;
opacity: 1;
}

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Ionic E2E</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link id="ionicLink" href="./build/main.css" rel="stylesheet">
<link href="./build/demos.shared.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="./build/polyfills.js"></script>
<script src="./build/main.js"></script>
</body>
</html>

View File

@ -0,0 +1,103 @@
// https://www.npmjs.com/package/node-sass
module.exports = {
/**
* outputFilename: The filename of the saved CSS file
* from the sass build. The directory which it is saved in
* is set within the "buildDir" config options.
*/
outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
/**
* sourceMap: If source map should be built or not.
*/
sourceMap: false,
/**
* outputStyle: How node-sass should output the css file.
*/
outputStyle: 'expanded',
/**
* autoprefixer: The config options for autoprefixer.
* Excluding this config will skip applying autoprefixer.
* https://www.npmjs.com/package/autoprefixer
*/
autoprefixer: {
browsers: [
'last 2 versions',
'iOS >= 8',
'Android >= 4.4',
'Explorer >= 11',
'ExplorerMobile >= 11'
],
cascade: false
},
/**
* includePaths: Used by node-sass for additional
* paths to search for sass imports by just name.
*/
includePaths: [
'src/themes',
'node_modules/ionicons/dist/scss',
'src/fonts'
],
/**
* includeFiles: An array of regex patterns to search for
* sass files in the same directory as the component module.
* If a file matches both include and exclude patterns, then
* the file will be excluded.
*/
includeFiles: [
/\.(s(c|a)ss)$/i
],
/**
* excludeFiles: An array of regex patterns for files which
* should be excluded. If a file matches both include and exclude
* patterns, then the file will be excluded.
*/
excludeFiles: [
/* /\.(wp).(scss)$/i */
],
/**
* variableSassFiles: Lists out the files which include
* only sass variables. These variables are the first sass files
* to be imported so their values override default variables.
*/
variableSassFiles: [
'./scripts/demos/variables.scss'
],
/**
* directoryMaps: Compiled JS modules may be within a different
* directory than its source file and sibling component sass files.
* For example, NGC places it's files within the .tmp directory
* but doesn't copy over its sass files. This is useful so sass
* also checks the JavaScript's source directory for sass files.
*/
directoryMaps: {
'{{TMP}}': '{{SRC}}'
},
/**
* excludeModules: Used just as a way to skip over
* modules which we know wouldn't have any sass to be
* bundled. "excludeModules" isn't necessary, but is a
* good way to speed up build times by skipping modules.
*/
excludeModules: [
'@angular',
'commonjs-proxy',
'core-js',
'ionic-native',
'rxjs',
'zone.js'
]
};

View File

@ -0,0 +1,79 @@
// Ionic Variables and Theming. For more info, please see:
// http://ionicframework.com/docs/theming/
// Font path is used to include ionicons,
// roboto, and noto sans fonts
$font-path: "../assets/fonts";
@import "ionic.globals";
// Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files.
// To view all the possible Ionic variables, see:
// http://ionicframework.com/docs/theming/overriding-ionic-variables/
// Named Color Variables
// --------------------------------------------------
// Named colors makes it easy to reuse colors on various components.
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
vibrant: rebeccapurple,
bright: #ffc125
);
// App iOS Variables
// --------------------------------------------------
// iOS only Sass variables can go here
// App Material Design Variables
// --------------------------------------------------
// Material Design only Sass variables can go here
// App Windows Variables
// --------------------------------------------------
// Windows only Sass variables can go here
// App Theme
// --------------------------------------------------
// Ionic apps can have different themes applied, which can
// then be future customized. This import comes last
// so that the above variables are used and Ionic's
// default are overridden.
@import "ionic.theme.default";
// Ionicons
// --------------------------------------------------
// The premium icon font for Ionic. For more info, please see:
// http://ionicframework.com/docs/ionicons/
@import "ionic.ionicons";
// Fonts
// --------------------------------------------------
// Roboto font is used by default for Material Design. Noto sans
// is used by default for Windows.
@import "roboto";
@import "noto-sans";

View File

@ -0,0 +1,15 @@
var path = require('path');
var watch = require(path.join('..', '..', 'node_modules', '@ionic', 'app-scripts', 'dist', 'watch'));
var entryPointDirectory = path.dirname(process.env.IONIC_APP_ENTRY_POINT)
module.exports = {
demoSrc: {
paths: [path.join(entryPointDirectory, '..', '**', '*.(ts|html|s(c|a)ss)')],
options: { ignored: [path.join(entryPointDirectory, '..', '**', '*.spec.ts'),
path.join(entryPointDirectory, '..', '**', '*.e2e.ts'),
path.join('**', '*.DS_Store')] },
callback: watch.buildUpdate
}
}