Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion module #67

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>

<script src="/semantic-ui-angular.js"></script>
</head>

<body ng-app="semantic.ui">

<sm-accordion>
<sm-accordion-title>
Level 1
</sm-accordion-title>
<sm-accordion-content>
<p>Welcome to level 1</p>

<sm-accordion>
<sm-accordion-title>
Level 1A
</sm-accordion-title>

<sm-accordion-content>
Level 1A Contents


<sm-accordion>
<sm-accordion-title>
Level 1A-A
</sm-accordion-title>
<sm-accordion-content>
Level 1A-A Contents
</sm-accordion-content>

<sm-accordion-title>
Level 1A-B
</sm-accordion-title>
<sm-accordion-content>
Level 1A-B Contents
</sm-accordion-content>
</sm-accordion>
</sm-accordion-content>


<sm-accordion-title>
Level 1B
</sm-accordion-title>
<sm-accordion-content>
Level 1B Contents
</sm-accordion-content>

<sm-accordion-title>
Level 1C
</sm-accordion-title>
<sm-accordion-content>
Level 1C Contents
</sm-accordion-content>
</sm-accordion>

</sm-accordion-content>

<sm-accordion-title>
Level 2
</sm-accordion-title>
<sm-accordion-content>
<p>Welcome to level 2</p>
</sm-accordion-content>

<sm-accordion-title>
Level 3
</sm-accordion-title>
<sm-accordion-content>
<p>Welcome to level 3</p>
</sm-accordion-content>
</sm-accordion>

</body>

</html>
133 changes: 66 additions & 67 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,91 +1,90 @@
module.exports = function(config) {
config.set({
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/angular/angular.js',
'./node_modules/angular-mocks/angular-mocks.js',
{ pattern: 'spec.bundle.js', watched: false }
],
// list of files / patterns to load in the browser
files: [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/angular/angular.js',
'./node_modules/angular-mocks/angular-mocks.js',
{ pattern: 'spec.bundle.js', watched: false }
],


// list of files to exclude
exclude: [
],
// list of files to exclude
exclude: [],

plugins: [
require("karma-phantomjs-launcher"),
require("karma-sourcemap-loader"),
require('karma-jasmine'),
require('karma-webpack')
],
plugins: [
require("karma-phantomjs-launcher"),
require("karma-sourcemap-loader"),
require('karma-jasmine'),
require('karma-webpack')
],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'spec.bundle.js': ['webpack', 'sourcemap']
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'spec.bundle.js': ['webpack', 'sourcemap']
},

webpack: {
devtools: 'inline-source-map',
module: {
preLoaders: [
{ test: /\.ts$/, exclude: /node_modules/, loader: 'tslint-loader' }
],
loaders: [
{ test: /\.ts?$/, exclude: /node_modules/, loader: 'ts-loader' },
{ test: /\.json?$/, exclude: /node_modules/, loader: 'json-loader' }
]
},
tslint: {
configuration: require('./tslint.json')
},
resolve: {
extensions: ['', '.ts', '.js']
}
},
webpack: {
devtools: 'inline-source-map',
module: {
preLoaders: [
{ test: /\.ts$/, exclude: /node_modules/, loader: 'tslint-loader' }
],
loaders: [
{ test: /\.ts?$/, exclude: /node_modules/, loader: 'ts-loader' },
{ test: /\.json?$/, exclude: /node_modules/, loader: 'json-loader' }
]
},
tslint: {
configuration: require('./tslint.json')
},
resolve: {
extensions: ['', '.ts', '.js']
}
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,
// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,
// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
111 changes: 57 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,60 @@
{
"name": "semantic-ui-angular",
"version": "0.0.0",
"description": "Pure AngularJS directives to support Semantic-UI components",
"main": "index.js",
"scripts": {
"postinstall": "node_modules/.bin/tsd install",
"test": "node_modules/karma/bin/karma start",
"test-dev": "./node_modules/karma/bin/karma start --auto-watch --no-single-run",
"build": "rm -rf dist && node_modules/.bin/webpack"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Semantic-Org/Semantic-UI-Angular"
},
"keywords": [
"angularjs",
"semantic-ui",
"directives",
"components",
"typescript"
],
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/Semantic-Org/Semantic-UI-Angular/issues"
},
"homepage": "https://github.com/Semantic-Org/Semantic-UI-Angular#readme",
"devDependencies": {
"angular": "1.4.8",
"angular-mocks": "1.4.8",
"cz-conventional-changelog": "^1.1.5",
"jasmine-core": "2.4.1",
"jquery": "2.2.0",
"jscs": "2.8.0",
"jscs-loader": "0.2.0",
"json-loader": "0.5.4",
"karma": "0.13.19",
"karma-jasmine": "0.3.6",
"karma-phantomjs-launcher": "0.2.3",
"karma-sourcemap-loader": "0.3.6",
"karma-webpack": "1.7.0",
"phantomjs": "1.9.19",
"phantomjs-polyfill": "0.0.1",
"ts-loader": "0.7.2",
"tsd": "0.6.5",
"tslint": "3.2.1",
"tslint-loader": "2.1.0",
"typescript": "1.7.5",
"webpack": "1.12.10"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
"name": "semantic-ui-angular",
"version": "0.0.0",
"description": "Pure AngularJS directives to support Semantic-UI components",
"main": "index.js",
"scripts": {
"postinstall": "node_modules/.bin/tsd install",
"test": "karma start",
"test-dev": "karma start --auto-watch --no-single-run",
"build": "rimraf dist && webpack",
"start": "webpack-dev-server --inline --progress --port 8080"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Semantic-Org/Semantic-UI-Angular"
},
"keywords": [
"angularjs",
"semantic-ui",
"directives",
"components",
"typescript"
],
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/Semantic-Org/Semantic-UI-Angular/issues"
},
"homepage": "https://github.com/Semantic-Org/Semantic-UI-Angular#readme",
"devDependencies": {
"angular": "1.6.1",
"angular-mocks": "1.6.1",
"cz-conventional-changelog": "^1.1.5",
"jasmine-core": "2.5.2",
"jquery": "3.1.1",
"jscs": "3.0.7",
"jscs-loader": "0.3.0",
"json-loader": "0.5.4",
"karma": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-phantomjs-launcher": "1.0.2",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "1.8.1",
"phantomjs": "2.1.7",
"phantomjs-polyfill": "0.0.2",
"rimraf": "^2.5.4",
"ts-loader": "1.3.3",
"tsd": "0.6.5",
"tslint": "4.2.0",
"tslint-loader": "3.3.0",
"typescript": "2.1.4",
"webpack": "1.14.0",
"webpack-dev-server": "^1.16.2"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
///<reference path="../typings/angularjs/angular.d.ts"/>


import { smAccordionModule } from './modules/accordion/accordion.module';
import { smButtonModule } from './elements/button/button';
import { smRatingModule } from './modules/rating/rating';
import { smDividerModule } from './elements/divider/divider';
Expand All @@ -11,7 +13,9 @@ import { smDividerModule } from './elements/divider/divider';
.module('semantic.ui', [
smButtonModule.name,
smRatingModule.name,
smDividerModule.name
smDividerModule.name,

smAccordionModule.name
]);

})();
Loading