├── .babelrc
├── .gitignore
├── LICENSE
├── README.md
├── components
├── accordion.js
├── checkbox.js
├── column.js
├── divider.js
├── dropdown.js
├── icon.js
├── label.js
├── loader.js
├── message.js
├── modal.js
├── popup.js
├── radiobutton.js
├── rail.js
├── reveal.js
├── search.js
├── statistic.js
└── transitions.js
├── docs
├── build
│ ├── 0.b9846ff4.js
│ └── bundle.d5b66d2a.js
├── index.html
└── static
│ └── media
│ ├── flags.9c74e172.png
│ ├── icons.674f50d2.eot
│ ├── icons.912ec66d.svg
│ ├── icons.af7ae505.woff2
│ ├── icons.b06871f2.ttf
│ └── icons.fee66e71.woff
├── karma.conf.js
├── package.json
├── src
├── Accordion.vue
├── Checkbox.vue
├── Column.vue
├── Divider.vue
├── Dropdown.vue
├── FormDropdown.vue
├── Label.vue
├── Loading.vue
├── Message.vue
├── Modal.vue
├── Popup.vue
├── Radiobutton.vue
├── Readme.md
├── Reveal.vue
├── Search.vue
├── SemanticAccordion.md
├── SemanticCheckbox.md
├── SemanticFormDropdown.md
├── SemanticLoading.md
├── SemanticModal.md
├── SemanticRadioButton.md
├── Statistic.vue
├── elements
│ ├── Icon.vue
│ └── Rail.vue
└── utils
│ ├── CommonPropsMixin.js
│ └── Styleguidist.js
├── styleguide.config.js
├── test
└── unit
│ └── Accordion.spec.js
├── vue-semantic.js
└── yarn.lock
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-2"],
3 | "plugins": ["transform-runtime"]
4 | }
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18 | .grunt
19 |
20 | # node-waf configuration
21 | .lock-wscript
22 |
23 | # Compiled binary addons (http://nodejs.org/api/addons.html)
24 | build/Release
25 |
26 | # Dependency directory
27 | node_modules
28 |
29 | # Optional npm cache directory
30 | .npm
31 |
32 | # Optional REPL history
33 | .node_repl_history
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2016 Brock Reece
2 |
3 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4 |
5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-semantic
2 | [](https://badge.fury.io/js/croud-vue-semantic)
3 |
4 | http://croudsupport.github.io/vue-semantic/
5 |
6 | A collection of vue components for integrating the semantic ui library
7 | ## Contributing
8 | Work In Progress. Any PRs welcome.
9 |
10 | ## Vue 1?
11 | If you still need the Vue 1 version of this lib you can use the vue1 branch or 0.0.7 tag
12 |
13 | ## Installation
14 | You can use NPM to install this package
15 | ```bash
16 | npm install --save croud-vue-semantic
17 | ```
18 | or Yarn
19 | ```bash
20 | yarn add croud-vue-semantic
21 | ```
22 |
23 | Install the plugin
24 | ```js
25 | import VueSemantic from 'croud-vue-semantic'
26 | Vue.use(VueSemantic)
27 | ```
28 |
29 | You will also need to include the semantic js and css files to your project. The easiest way would be to include them in your html
30 |
31 | ```html
32 |
33 |
34 | ```
35 | For more advanced builds see http://semantic-ui.com/introduction/getting-started.html
36 |
37 | ## Usage
38 | View our [docs](http://croudsupport.github.io/vue-semantic/) for usage examples
39 |
40 | ### Webpack Tips
41 | If you are using webpack, you can add jQuery to your webpack.base.conf.js
42 | ```js
43 | plugins: [
44 | new webpack.ProvidePlugin({
45 | $: "jquery",
46 | jQuery: "jquery",
47 | "window.jQuery": "jquery"
48 | })
49 | ],
50 | ```
51 |
52 | And include the semantic js + css at the top of your main.js file
53 | ```
54 | import 'path/to/semantic.css'
55 | import 'path/to/semantic.js'
56 | ```
57 |
--------------------------------------------------------------------------------
/components/accordion.js:
--------------------------------------------------------------------------------
1 | var Accordion = require('../src/Accordion.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-accordion', Accordion);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/checkbox.js:
--------------------------------------------------------------------------------
1 | var Checkbox = require('../src/Checkbox.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-checkbox', Checkbox);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/column.js:
--------------------------------------------------------------------------------
1 | var Column = require('../src/Column.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-column', Column);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/divider.js:
--------------------------------------------------------------------------------
1 | var Divider = require('../src/Divider.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-divider', Divider);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/dropdown.js:
--------------------------------------------------------------------------------
1 | var FormDropdown = require('../src/FormDropdown.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-form-dropdown', FormDropdown);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/components/icon.js:
--------------------------------------------------------------------------------
1 | var Icon = require('../src/Icon.vue')
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-icon', Icon);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/label.js:
--------------------------------------------------------------------------------
1 | var Label = require('../src/Label.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-label', Label);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/loader.js:
--------------------------------------------------------------------------------
1 | var Loader = require('../src/Loader.vue')
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-loader', Loader);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/message.js:
--------------------------------------------------------------------------------
1 | var Message = require('../src/Message.vue')
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-message', Message);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/modal.js:
--------------------------------------------------------------------------------
1 | var Modal = require('../src/Modal.vue')
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-modal', Modal);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/popup.js:
--------------------------------------------------------------------------------
1 | var Popup = require('../src/Popup.vue'),
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-popup', Popup);
6 |
7 | },
8 | }
9 |
--------------------------------------------------------------------------------
/components/radiobutton.js:
--------------------------------------------------------------------------------
1 | var Radiobutton = require('../src/Radiobutton.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-radio', Radiobutton);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/rail.js:
--------------------------------------------------------------------------------
1 | var Rail = require('../src/Rail.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-rail', Rail);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/reveal.js:
--------------------------------------------------------------------------------
1 | var Reveal = require('../src/Reveal.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-reveal', Reveal);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/search.js:
--------------------------------------------------------------------------------
1 | var Search = require('../src/Search.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-search', Search);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/statistic.js:
--------------------------------------------------------------------------------
1 | var Statistic = require('../src/Statistic.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 | Vue.component('semantic-statistic', Statistic);
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/components/transitions.js:
--------------------------------------------------------------------------------
1 | var Statistic = require('../src/Statistic.vue');
2 |
3 | module.exports = {
4 | install: function (Vue, options) {
5 |
6 | if (!$.fn.transition) return;
7 |
8 | var emphasis = [
9 | 'flash',
10 | 'shake',
11 | 'pulse',
12 | 'tada',
13 | 'bounce',
14 | 'jiggle',
15 | ]
16 |
17 | var appearance = [
18 | 'slide up',
19 | 'slide down',
20 | 'vertical flip',
21 | 'horizontal flip',
22 | 'fade',
23 | 'fade up',
24 | 'fade down',
25 | 'scale',
26 | 'drop',
27 | 'browse',
28 | ]
29 |
30 | emphasis.forEach(function (animation) {
31 | var definition = {
32 | enter: function (el, done) {
33 | $(el)
34 | .transition('reset')
35 | .transition(animation + ' in', 700, done)
36 |
37 | return function() {
38 | $(el).transition('stop')
39 | }
40 | },
41 |
42 | leave: function (el, done) {
43 | $(el)
44 | .transition('reset')
45 | .transition(animation + ' out', 700, done)
46 |
47 | return function() {
48 | $(el).transition('stop')
49 | }
50 | }
51 | }
52 |
53 | Vue.transition(animation, definition)
54 | })
55 |
56 | appearance.forEach(function (animation) {
57 | var definition = {
58 | enter: function (el, done) {
59 | $(el)
60 | .transition('reset')
61 | .transition(animation + ' in', 700, done)
62 |
63 | return function() {
64 | $(el).transition('stop')
65 | }
66 | },
67 |
68 | leave: function (el, done) {
69 | $(el)
70 | .transition('reset')
71 | .transition(animation + ' out', 700, done)
72 |
73 | return function() {
74 | $(el).transition('stop')
75 | }
76 | }
77 | }
78 | var id = animation.split(' ').join('-')
79 |
80 | Vue.transition(id, definition)
81 | })
82 | },
83 | }
84 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Vue Semantic
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/static/media/flags.9c74e172.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CroudTech/vue-semantic/28eaa027036044281b0cd547c6ba57b06b8a6443/docs/static/media/flags.9c74e172.png
--------------------------------------------------------------------------------
/docs/static/media/icons.674f50d2.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CroudTech/vue-semantic/28eaa027036044281b0cd547c6ba57b06b8a6443/docs/static/media/icons.674f50d2.eot
--------------------------------------------------------------------------------
/docs/static/media/icons.af7ae505.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CroudTech/vue-semantic/28eaa027036044281b0cd547c6ba57b06b8a6443/docs/static/media/icons.af7ae505.woff2
--------------------------------------------------------------------------------
/docs/static/media/icons.b06871f2.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CroudTech/vue-semantic/28eaa027036044281b0cd547c6ba57b06b8a6443/docs/static/media/icons.b06871f2.ttf
--------------------------------------------------------------------------------
/docs/static/media/icons.fee66e71.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CroudTech/vue-semantic/28eaa027036044281b0cd547c6ba57b06b8a6443/docs/static/media/icons.fee66e71.woff
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // https://github.com/Nikku/karma-browserify
2 | module.exports = function (config) {
3 | config.set({
4 | browsers: ['PhantomJS'],
5 | frameworks: ['browserify', 'jasmine'],
6 | files: ['test/unit/**/*.js'],
7 | reporters: ['spec'],
8 | preprocessors: {
9 | 'test/unit/**/*.js': ['browserify']
10 | },
11 | browserify: {
12 | debug: true,
13 | // needed to enable mocks
14 | plugin: [require('proxyquireify').plugin]
15 | },
16 | // if you want to continuously re-run tests on file-save,
17 | // replace the following line with `autoWatch: true`
18 | singleRun: true
19 | })
20 | }
21 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "croud-vue-semantic",
3 | "version": "1.2.2",
4 | "description": "Vue Components for the semantic ui library",
5 | "main": "vue-semantic.js",
6 | "browserify": {
7 | "transform": [
8 | "vueify",
9 | "babelify"
10 | ]
11 | },
12 | "scripts": {
13 | "test": "echo \"Error: no test specified\" && exit 1",
14 | "styleguide": "node_modules/vue-styleguidist/bin/styleguidist.js server server",
15 | "styleguide:build": "node_modules/vue-styleguidist/bin/styleguidist.js build"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "git+https://github.com/CroudSupport/vue-semantic.git"
20 | },
21 | "keywords": [
22 | "Vue",
23 | "plugin",
24 | "semantic",
25 | "ui"
26 | ],
27 | "author": "Brock Reece",
28 | "license": "ISC",
29 | "bugs": {
30 | "url": "https://github.com/CroudSupport/vue-semantic/issues"
31 | },
32 | "homepage": "https://github.com/CroudSupport/vue-semantic#readme",
33 | "dependencies": {
34 | "underscore": "^1.8.3"
35 | },
36 | "devDependencies": {
37 | "babel-core": "^6.0.0",
38 | "babel-plugin-transform-runtime": "^6.0.0",
39 | "babel-preset-es2015": "^6.0.0",
40 | "babel-preset-stage-2": "^6.0.0",
41 | "babel-runtime": "^6.0.0",
42 | "babelify": "^7.2.0",
43 | "browserify": "^12.0.1",
44 | "jasmine-core": "^2.4.1",
45 | "karma": "^0.13.15",
46 | "karma-browserify": "^4.4.2",
47 | "karma-jasmine": "^0.3.6",
48 | "karma-phantomjs-launcher": "^1.0.0",
49 | "karma-spec-reporter": "0.0.23",
50 | "phantomjs-prebuilt": "^2.1.3",
51 | "proxyquireify": "^3.0.1",
52 | "semantic-ui": "^2.2.10",
53 | "vue": "^2.4.0",
54 | "vue-hot-reload-api": "^2.0.5",
55 | "vue-styleguidist": "^1.1.5",
56 | "vueify": "^8.5.2",
57 | "webpack": "^2.0.0"
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/Accordion.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ item.title }}
7 |
8 | {{ item.content }}
9 |
10 |
11 |
12 |
13 |
89 |
--------------------------------------------------------------------------------
/src/Checkbox.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ ( model && labelChecked ? labelChecked : label) }}
5 |
6 |
7 |
8 |
83 |
--------------------------------------------------------------------------------
/src/Column.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
27 |
--------------------------------------------------------------------------------
/src/Divider.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
35 |
--------------------------------------------------------------------------------
/src/Dropdown.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
{{default_text}}
6 |
9 |
10 |
11 |
12 |
43 |
44 |
50 |
--------------------------------------------------------------------------------
/src/FormDropdown.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
{{ placeholder }}
5 |
6 |
10 |
11 |
12 |
13 |
214 |
--------------------------------------------------------------------------------
/src/Label.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
68 |
--------------------------------------------------------------------------------
/src/Loading.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ text }}
3 |
4 |
5 |
86 |
--------------------------------------------------------------------------------
/src/Message.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
35 |
--------------------------------------------------------------------------------
/src/Modal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Cancel
19 |
20 |
21 | Continue
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
176 |
--------------------------------------------------------------------------------
/src/Popup.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Cancel
21 |
22 |
23 | Continue
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
123 |
--------------------------------------------------------------------------------
/src/Radiobutton.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
121 |
--------------------------------------------------------------------------------
/src/Readme.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/Reveal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
--------------------------------------------------------------------------------
/src/Search.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
121 |
--------------------------------------------------------------------------------
/src/SemanticAccordion.md:
--------------------------------------------------------------------------------
1 | ### Basic usage
2 |
3 |
7 |
8 | ### Styling
9 | You can use the **styled**, **fluid** and **open-last** prop to change the appearance of the accordion
10 |
11 |
15 |
--------------------------------------------------------------------------------
/src/SemanticCheckbox.md:
--------------------------------------------------------------------------------
1 | ### Basic usage
2 |
3 |
4 |
5 | ### Styling
6 | Pass through the **type** prop to change the style of checkbo
7 |
8 |
19 |
20 | ### Disabled
21 |
22 |
23 |
24 | ### Events
25 | This component emits the **checkbox-clicked** event evert time the event is clicked
26 |
27 | { console.log(val) }"/>
--------------------------------------------------------------------------------
/src/SemanticFormDropdown.md:
--------------------------------------------------------------------------------
1 | ### Basic usage
2 |
3 |
4 |
5 | ### Styling
6 | You can use the props to change the styling of the dropdown
7 |
8 |
34 |
35 | ### Using slots
36 | The **default** slot allows you to add options to the top of the dropdown
37 |
38 |
39 | Baz
40 |
41 |
42 |
43 | ### Handle Events
44 | This component emits the **dropdown-selected** event when an item is selected.
45 |
46 | { dropdownVal = val }">
--------------------------------------------------------------------------------
/src/SemanticLoading.md:
--------------------------------------------------------------------------------
1 | ### Basic usage
2 |
3 |
4 |
5 |
6 |
7 | ### Change text
8 | You can change the text of the spinner with the **text** prop
9 |
10 |
11 |
12 |
13 |
14 | ### Styling
15 | You can change the appearance of the spinner with the **size**, **inline**, **inverted** and **centered** props
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/SemanticModal.md:
--------------------------------------------------------------------------------
1 | ### Basic usage
2 |
3 |
4 |
Show
5 |
6 |
7 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem id aliquam officiis voluptatibus, incidunt tempore quisquam, quae quasi fugit illo fuga mollitia dicta quaerat corporis expedita, suscipit iste eligendi. Maxime.
8 |
9 |
10 |
11 |
12 | ### Using slots
13 | You can pass in slots for overriding the **actions** and the **header** elements.
14 |
15 |
16 |
Show
17 |
18 |
21 |
22 |
23 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem id aliquam officiis voluptatibus, incidunt tempore quisquam, quae quasi fugit illo fuga mollitia dicta quaerat corporis expedita, suscipit iste eligendi. Maxime.
24 |
25 |
26 |
27 | Cancel
28 | {showModal = false; $toasted.show('Action called')}">Call To Action
29 |
30 |
31 |
32 |
33 |
34 | ### Handle Events
35 | This component emits the **close-modal** event before closing
36 |
37 |
38 |
Show
39 |
40 |
41 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem id aliquam officiis voluptatibus, incidunt tempore quisquam, quae quasi fugit illo fuga mollitia dicta quaerat corporis expedita, suscipit iste eligendi. Maxime.
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/SemanticRadioButton.md:
--------------------------------------------------------------------------------
1 | ### Basic Usage
2 | You can pass a form label in as the **default** slot
3 |
4 |
5 | What is your favourite number?
6 |
7 |
8 |
9 | ### Styling
10 | You can change the styling by passing in the **type** and **form-type** props
11 |
12 |
32 |
33 | ### Disabled
34 | You can use the disabled prop to lock the radio buttons
35 |
36 |
37 |
38 | What is your favourite number?
39 |
40 |
41 |
42 | ### Events
43 | This component emits the **selection-changed** event every time the value changes
44 |
45 | {}"/>
--------------------------------------------------------------------------------
/src/Statistic.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ label }}
10 |
11 |
12 |
13 |
14 |
15 |
90 |
--------------------------------------------------------------------------------
/src/elements/Icon.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
52 |
--------------------------------------------------------------------------------
/src/elements/Rail.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
39 |
--------------------------------------------------------------------------------
/src/utils/CommonPropsMixin.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | props: {
3 | colour: {},
4 | size: {},
5 | inverted: {},
6 | disabled: {},
7 | circular: {},
8 | loading: {},
9 | },
10 |
11 | methods: {
12 | commonClasses: function(classes) {
13 | classes.inverted = typeof this.inverted !== 'undefined'
14 | classes.disabled = typeof this.disabled !== 'undefined'
15 | classes.circular = typeof this.circular !== 'undefined'
16 | classes.loading = typeof this.loading !== 'undefined'
17 |
18 | if (typeof this.colour !== 'undefined') {
19 | classes[this.colour] = true
20 | }
21 |
22 | if (typeof this.size !== 'undefined') {
23 | classes[this.size] = true
24 | }
25 | return classes
26 | },
27 | },
28 | }
29 |
--------------------------------------------------------------------------------
/src/utils/Styleguidist.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | showModal: false,
5 | dropdownVal: null,
6 | checkbox: false,
7 | radio: 1,
8 | }
9 | },
10 | }
--------------------------------------------------------------------------------
/styleguide.config.js:
--------------------------------------------------------------------------------
1 | const loaders = require('vue-webpack-loaders');
2 | const webpack = require('webpack');
3 |
4 | module.exports = {
5 | components: 'src/**/*.vue',
6 | require: [
7 | 'jquery',
8 | 'semantic-ui/dist/semantic.min',
9 | 'semantic-ui/dist/semantic.min.css',
10 | ],
11 | webpackConfig: {
12 | module: {
13 | loaders,
14 | },
15 | plugins: [
16 | new webpack.ProvidePlugin({
17 | $: "jquery",
18 | jQuery: "jquery",
19 | "window.jQuery": "jquery"
20 | })
21 | ],
22 | },
23 | styleguideDir: 'docs',
24 | mixins: [
25 | 'src/utils/Styleguidist.js',
26 | ],
27 | title: 'Vue Semantic',
28 | };
29 |
--------------------------------------------------------------------------------
/test/unit/Accordion.spec.js:
--------------------------------------------------------------------------------
1 | /* global describe, it, expect */
2 |
3 | import Vue from 'vue'
4 | import Accordion from '../../src/Accordion.vue'
5 |
6 | describe('Accordion.vue', () => {
7 | it('should render correct contents', () => {
8 | const vm = new Vue({
9 | template: '
',
10 | components: { 'semantic-accordion': Accordion }
11 | }).$mount()
12 | expect(vm.$el).not.toBe(null)
13 | })
14 | })
15 |
16 | // also see example testing a component with mocks at
17 | // https://github.com/vuejs/vueify-example/blob/master/test/unit/a.spec.js#L22-L43
18 |
--------------------------------------------------------------------------------
/vue-semantic.js:
--------------------------------------------------------------------------------
1 | import accordion from './src/Accordion.vue'
2 | import checkbox from './src/Checkbox.vue'
3 | import column from './src/Column.vue'
4 | import divider from './src/Divider.vue'
5 | import dropdown from './src/Dropdown.vue'
6 | import formDropdown from './src/FormDropdown.vue'
7 | import label from './src/Label.vue'
8 | import loading from './src/Loading.vue'
9 | import message from './src/Message.vue'
10 | import modal from './src/Modal.vue'
11 | import popup from './src/Popup.vue'
12 | import radiobutton from './src/Radiobutton.vue'
13 | import reveal from './src/Reveal.vue'
14 | import search from './src/Search.vue'
15 | import statistic from './src/Statistic.vue'
16 |
17 | export default {
18 | install: function (Vue, options) {
19 | Vue.component('semantic-accordion', accordion);
20 | Vue.component('semantic-checkbox', checkbox)
21 | Vue.component('semantic-column', column)
22 | Vue.component('semantic-divider', divider)
23 | Vue.component('semantic-dropdown', dropdown)
24 | Vue.component('semantic-form-dropdown', formDropdown)
25 | Vue.component('semantic-label', label)
26 | Vue.component('semantic-loading', loading)
27 | Vue.component('semantic-message', message)
28 | Vue.component('semantic-modal', modal)
29 | Vue.component('semantic-popup', popup)
30 | Vue.component('semantic-radiobutton', radiobutton)
31 | Vue.component('semantic-reveal', reveal)
32 | Vue.component('semantic-search', search)
33 | Vue.component('semantic-statistic', statistic)
34 | },
35 | }
36 |
--------------------------------------------------------------------------------