+
● Checkbox
● InputText
● Listbox
● RadioButton
diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css
index 77254bcc1..d408856b6 100644
--- a/src/assets/styles/primevue.css
+++ b/src/assets/styles/primevue.css
@@ -1,10 +1,12 @@
@import '../../components/common/Common.css';
@import '../../components/accordion/Accordion.css';
+@import '../../components/button/Button.css';
+@import '../../components/checkbox/Checkbox.css';
+@import '../../components/fieldset/Fieldset.css';
@import '../../components/inputtext/InputText.css';
@import '../../components/listbox/Listbox.css';
-@import '../../components/button/Button.css';
@import '../../components/panel/Panel.css';
-@import '../../components/fieldset/Fieldset.css';
+@import '../../components/radiobutton/RadioButton.css';
@import '../../components/tabview/TabView.css';
@import '../../components/textarea/Textarea.css';
@import '../../components/toolbar/Toolbar.css';
\ No newline at end of file
diff --git a/src/components/checkbox/Checkbox.css b/src/components/checkbox/Checkbox.css
new file mode 100644
index 000000000..e3546a920
--- /dev/null
+++ b/src/components/checkbox/Checkbox.css
@@ -0,0 +1,31 @@
+.p-checkbox {
+ display: inline-block;
+ cursor: pointer;
+ vertical-align: middle;
+ margin-right: .25em;
+ user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+}
+
+.p-checkbox .p-checkbox-box {
+ width: 1.125em;
+ height: 1.125em;
+ line-height: 1.125em;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+ text-align: center;
+}
+
+.p-checkbox .p-checkbox-icon {
+ display: block;
+}
+
+.p-checkbox-label {
+ vertical-align: middle;
+}
+
+.p-checkbox + label {
+ vertical-align: middle;
+}
\ No newline at end of file
diff --git a/src/components/checkbox/Checkbox.vue b/src/components/checkbox/Checkbox.vue
new file mode 100644
index 000000000..b32fa4f93
--- /dev/null
+++ b/src/components/checkbox/Checkbox.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/utils/ObjectUtils.js b/src/components/utils/ObjectUtils.js
index 0a5e4bb11..c0e249102 100644
--- a/src/components/utils/ObjectUtils.js
+++ b/src/components/utils/ObjectUtils.js
@@ -120,6 +120,17 @@ export default class ObjectUtils {
return index;
}
+ static contains(value, list) {
+ if (value != null && list && list.length) {
+ for (let val of list) {
+ if (this.equals(value, val))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
static filterConstraints = {
startsWith(value, filter) {
diff --git a/src/main.js b/src/main.js
index 566405e27..9426eacf7 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,6 +4,7 @@ import router from './router';
import Accordion from './components/accordion/Accordion';
import AccordionTab from './components/accordion/AccordionTab';
import Button from './components/button/Button';
+import Checkbox from './components/checkbox/Checkbox';
import InputText from './components/inputtext/InputText';
import Fieldset from './components/fieldset/Fieldset';
import Listbox from './components/listbox/Listbox';
@@ -23,6 +24,7 @@ Vue.config.productionTip = false;
Vue.component('p-accordion', Accordion);
Vue.component('p-accordionTab', AccordionTab);
Vue.component('p-button', Button);
+Vue.component('p-checkbox', Checkbox);
Vue.component('p-inputtext', InputText);
Vue.component('p-listbox', Listbox);
Vue.component('p-fieldset', Fieldset);
diff --git a/src/router.js b/src/router.js
index ee29915da..31d6c3417 100644
--- a/src/router.js
+++ b/src/router.js
@@ -21,6 +21,11 @@ export default new Router({
name: 'button',
component: () => import('./views/button/ButtonDemo.vue')
},
+ {
+ path: '/checkbox',
+ name: 'checkbox',
+ component: () => import('./views/checkbox/CheckboxDemo.vue')
+ },
{
path: '/fieldset',
name: 'fieldset',
diff --git a/src/views/checkbox/CheckboxDemo.vue b/src/views/checkbox/CheckboxDemo.vue
new file mode 100644
index 000000000..526e2e2aa
--- /dev/null
+++ b/src/views/checkbox/CheckboxDemo.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
Checkbox
+
Checkbox is an extension to standard checkbox element with theming.
+
+
+
+
+
Basic
+
+ Selected Cities : {{cities}}
+
+
Advanced with Preselection, Value Binding and Disabled Option
+
+ Selected Themes : {{this.themes}}
+
+
+
+
+
+
+