/*
Copyright © 2016-2019 Lidor Systems. All rights reserved.
This file is part of the "IntegralUI Web" Library.
The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License.
A copy of the License should have been installed in the product's root installation directory or it can be found at
http://www.lidorsystems.com/products/web/studio/license-agreement.aspx.
This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws.
*/
import { Component, ViewContainerRef, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';
import { IntegralUICheckState } from '../../integralui/components/integralui.core';
@Component({
selector: '',
template: `
CheckBox 1
CheckBox 2
CheckBox 3
CheckBox 4
CheckBox 5
IntegralUI CheckBox is a native Angular component that represents a check box. It is fully customizable via CSS, supports ngModel directive and can be used within Angular Forms.
The following properties and events are supported:
- allowAnimation - Determines whether component appearance is animated or not
- checked - Specifies whether CheckBox is checked or not: true or false
- checkState - Specifies one of the three state values: unchecked, indeterminate or checked
- controlStyle - Specifies an object that contains all style settings for the component
- data - Specifies an object that holds data related to the component
- enabled - Determines whether the component is enabled or disabled
- name - Uniquely identifies the component
- state - Specifies the component state: disabled, hovered, etc.
- threeState - Determines whether the CheckBox uses three or two state values
- value - Holds the current checkbox value
- checkedChanged - Occurs when checked property changes
- checkStateChanged - Occurs when checkState property changes
- valueChanged - Occurs when value property changes
In this example, the CheckBox component with stars uses Free increment mode, which allows smooth changes to the checkbox value (in decimals). As comparision, the CheckBox component with bricks uses Full increment mode, and the checkbox changes in integer values.
For more information check out the source code of this sample (checkbox/checkbox-overview.ts) file.
`,
encapsulation: ViewEncapsulation.None
})
export class CheckBoxOverviewSample {
public ctrlStyle2: any = {
button: {
checked: 'chb2-ovw-btn-checked',
indeterminate: 'chb2-ovw-btn-indeterminate',
unchecked: 'chb2-ovw-btn-unchecked'
}
}
public ctrlStyle3: any = {
button: {
general: 'chb3-ovw-btn',
checked: 'chb3-ovw-btn-checked',
unchecked: 'chb3-ovw-btn-unchecked'
}
}
public ctrlStyle4: any = {
button: {
checked: 'chb4-ovw-btn-checked',
unchecked: 'chb4-ovw-btn-unchecked'
}
}
public ctrlStyle5: any = {
button: {
general: 'chb5-ovw-btn',
checked: 'chb5-ovw-btn-checked',
unchecked: 'chb5-ovw-btn-unchecked'
}
}
public checkValue: IntegralUICheckState = IntegralUICheckState.Checked;
public checkValue2: IntegralUICheckState = IntegralUICheckState.Indeterminate;
public checkValue3: boolean = true;
public checkValue4: boolean = true;
public checkValue5: boolean = true;
}