Accepts all `<input type="checkbox" />` props
346933
function Checkbox({ children, ...props }) {
  const { getLabelProps, ...fieldCtx } = useFieldContext();
  const { getFocusProps, keyboardFocused } = useKeyboardFocus();

  /**
   * Due to us applying keyboard-only focus events to 2 separate elements (the input and label)
   * we must apply the original `onMouseDown` event to the `onMouseUp` event of the label.
   *
   * By passing the original props within `getFocusProps` we are able to allow
   * `event.preventDefault()` to still prevent chained events as expected.
   */
  const { onMouseDown: onFocusMouseDown, ...keyboardFocusedProps } = getFocusProps(props);

  const modifiedFieldCtx = {
    getLabelProps: ({ onMouseUp, ...other }) =>
      getLabelProps({ onMouseUp: composeEventHandlers(onMouseUp, onFocusMouseDown), ...other }),
    ...fieldCtx
  };

  return (
    <FieldContext.Provider value={modifiedFieldCtx}>
      <CheckboxContext.Provider value={{ isFocused: keyboardFocused }}>
        <StyledCheck>
          <StyledCheckInput
            {...modifiedFieldCtx.getInputProps({
              'data-garden-id': 'forms.checkbox',
              'data-garden-version': PACKAGE_VERSION,
              ...keyboardFocusedProps
            })}
          />
          {children}
        </StyledCheck>
      </CheckboxContext.Provider>
    </FieldContext.Provider>
  );
}
402406
function () {
            var cfg = this._cfg;
            return ariaCoreBrowser.isIE11 && cfg.waiAria && cfg.disabled && this._isChecked() && cfg._inputType === "checkbox";
        }
721394
function (props) {
            var tags = [];
            can.each(props, function (val, name) {
                tags.push((name === 'className' ? 'class' : name) + '="' + (name === "href" ? val : can.esc(val)) + '"');
            });
            return tags.join(" ");
        }
822980
function validateProps(element, props) {
  // TODO (yungsters): Remove support for `selected` in <option>.
  {
    if (props.selected != null && !didWarnSelectedSetOnOption) {
      warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
      didWarnSelectedSetOnOption = true;
    }
  }
}
1185923
function ( obj, value ) {
		var event = "input",
		    output;

		if ( value === undefined ) {
			if ( regex.radio_checkbox.test( obj.type ) ) {
				if ( string.isEmpty( obj.name ) ) {
					throw new Error( label.error.expectedProperty );
				}

				array.each( utility.$( "input[name='" + obj.name + "']" ), function ( i ) {
					if ( i.checked ) {
						output = i.value;
						return false;
					}
				});
			}
			else if ( regex.select.test( obj.type ) ) {
				output = obj.options[obj.selectedIndex].value;
			}
			else if ( "value" in obj ) {
				output = obj.value;
			}
			else {
				output = element.text( obj );
			}

			if ( output !== undefined ) {
				output = utility.coerce( output );
			}

			if ( typeof output === "string" ) {
				output = string.trim( output );
			}
		}
		else {
			value = value.toString();

			if ( regex.radio_checkbox.test( obj.type ) ) {
				event = "click";

				array.each( utility.$( "input[name='" + obj.name + "']" ), function ( i ) {
					if ( i.value === value ) {
						i.checked = true;
						output = i;
						return false;
					}
				});
			}
			else if ( regex.select.test( obj.type ) ) {
				event = "change";

				array.each( element.find( obj, "> *" ), function ( i ) {
					if ( i.value === value ) {
						i.selected = true;
						output = i;
						return false;
					}
				});
			}
			else {
				obj.value !== undefined ? obj.value = value : element.text( obj, value );
			}

			element.dispatch( obj, event );

			output = obj;
		}

		return output;
	}
723294
function(element) {
            var $element = $(element);
            if ($element.is(':selected')) {
                $element.prop('selected', true);
            }

            // Support the label attribute on options.
            var label = this.options.optionLabel(element);
            var value = $element.val();
            var inputType = this.options.multiple ? "checkbox" : "radio";

            var $li = $(this.options.templates.li);
            var $label = $('label', $li);
            $label.addClass(inputType);

            if (this.options.enableHTML) {
                $label.html(" " + label);
            }
            else {
                $label.text(" " + label);
            }

            var $checkbox = $('<input/>').attr('type', inputType);

            if (this.options.checkboxName) {
                $checkbox.attr('name', this.options.checkboxName);
            }
            $label.prepend($checkbox);

            var selected = $element.prop('selected') || false;
            $checkbox.val(value);

            if (value === this.options.selectAllValue) {
                $li.addClass("multiselect-item multiselect-all");
                $checkbox.parent().parent()
                    .addClass('multiselect-all');
            }

            $label.attr('title', $element.attr('title'));

            this.$ul.append($li);

            if ($element.is(':disabled')) {
                $checkbox.attr('disabled', 'disabled')
                    .prop('disabled', true)
                    .closest('a')
                    .attr("tabindex", "-1")
                    .closest('li')
                    .addClass('disabled');
            }

            $checkbox.prop('checked', selected);

            if (selected && this.options.selectedClass) {
                $checkbox.closest('li')
                    .addClass(this.options.selectedClass);
            }
        }
415240
function (selector, value, physical) {
            try {
                var jqElem = $(selector);
            } catch (e) {
                return;
            }
            if (jqElem.length === 0) {
                return;
            } else if (jqElem.is('input[type="checkbox"]')) {
                if (value) {
                    jqElem.attr('checked', true);
                } else {
                    jqElem.removeAttr('checked');
                }
            } else if (jqElem.prop('value') !== undefined) {
                if (physical) {
                    jqElem.attr('value', value);
                } else {
                    jqElem.val(value);
                }
            } else {
                jqElem.html(value);
            }
        }
354962
function (input) {

            var value;

            // Get the value or state of the input based on its type
            switch ($(input).attr('type')) {
                case 'checkbox':
                    value = ($(input).is(':checked')) ? 1 : '';
                    break;
                case 'radio':
                    value = node.find('input[name="' + $(input).attr('name') + '"]:checked').val() || '';
                    break;
                default:
                    value = $(input).val();
                    break;
            }

            return value;

        }
693536
function Button(props) {
  let {
    label,
    href,
    type,
    size,
    children,
    className,
    primary,
    secondary,
    outline,
    flat,
    ...rest
  } = props
  /* Add className */
  const classes = cx(
    buttonClassName,
    {
      [`${buttonClassName}-primary`]: primary,
      [`${buttonClassName}-secondary`]: secondary,
      [`${buttonClassName}-outline`]: outline,
      [`${buttonClassName}-flat`]: flat,
      [`${buttonClassName}-${type}`]: type,
    },
    `${buttonClassName}-${size}`,
    className
  )

  const tagName = href ? 'a' : 'button'

  return React.createElement(
    tagName,
    {
      className: classes,
      href,
      ...rest,
    },
    children || label
  )
}
88606
function() {
        var checkedState = this.dataModel.getCheckedState();
        var $input, props;

        $input = this._getHeaderMainCheckbox();
        if (!$input.length) {
            return;
        }

        if (!checkedState.available) {
            props = {
                checked: false,
                disabled: true
            };
        } else {
            props = {
                checked: checkedState.available === checkedState.checked,
                disabled: false
            };
        }
        $input.prop(props);
    }
465037
function selectValueType(props, propName, componentName) {
  if (props[propName] == null) {
    return null;
  }
  if (props.multiple) {
    if (!Array.isArray(props[propName])) {
      return new Error(
        ("The `" + propName + "` prop supplied to <select> must be an array if ") +
        ("`multiple` is true.")
      );
    }
  } else {
    if (Array.isArray(props[propName])) {
      return new Error(
        ("The `" + propName + "` prop supplied to <select> must be a scalar ") +
        ("value if `multiple` is false.")
      );
    }
  }
}
850408
function Input(props) {
  const { getInputProps } = useFieldContext();

  return (
    <StyledTextInput
      {...getInputProps(
        {
          'data-garden-id': 'forms.input',
          'data-garden-version': PACKAGE_VERSION,
          ...props
        },
        { isDescribed: true }
      )}
    />
  );
}
1109406
function doRenderValueInput(value, onChange) {
        return _react2.default.createElement(_TextField.TextField, { value: value, onChanged: function onChanged(val) {
                return onChange(val);
            } });
    }
1331797
function isCheckable(elem) {
  var type = elem.type;
  var nodeName = elem.nodeName;
  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
}
713759
function(components, input) {
    // Prebuild a list of existing components.
    var existingComponents = {};
    FormioUtils.eachComponent(components, function(component) {
      // If theres no key, we cant compare components.
      if (!component.key) return;

      // A component is pre-existing if the key is unique, or the key is a duplicate and its not flagged as the new component.
      if (
        (component.key !== input.key) ||
        ((component.key === input.key) && (!!component.isNew !== !!input.isNew))
      ) {
        existingComponents[component.key] = component;
      }
    }, true);

    return existingComponents;
  }
443820
function RegisterPage(props: Props): React.Node {
  const {
    action,
    method,
    onSubmit,
    onChange,
    onBlur,
    values,
    strings = {},
    errors,
  } = props;

  return (
    <StandaloneFormPage imageURL={"./demo/logo.svg"}>
      <FormCard
        buttonText={strings.buttonText || defaultStrings.buttonText}
        title={strings.title || defaultStrings.title}
        onSubmit={onSubmit}
        action={action}
        method={method}
      >
        <FormTextInput
          name="name"
          label={strings.nameLabel || defaultStrings.nameLabel}
          placeholder={
            strings.namePlaceholder || defaultStrings.namePlaceholder
          }
          onChange={onChange}
          onBlur={onBlur}
          value={values && values.name}
          error={errors && errors.name}
        />
        <FormTextInput
          name="email"
          label={strings.emailLabel || defaultStrings.emailLabel}
          placeholder={
            strings.emailPlaceholder || defaultStrings.emailPlaceholder
          }
          onChange={onChange}
          onBlur={onBlur}
          value={values && values.email}
          error={errors && errors.email}
        />
        <FormTextInput
          name="password"
          type="password"
          label={strings.passwordLabel || defaultStrings.passwordLabel}
          placeholder={
            strings.passwordPlaceholder || defaultStrings.passwordPlaceholder
          }
          onChange={onChange}
          onBlur={onBlur}
          value={values && values.password}
          error={errors && errors.password}
        />
        <FormCheckboxInput
          onChange={onChange}
          onBlur={onBlur}
          value={values && values.terms}
          name="terms"
          label={strings.termsLabel || defaultStrings.termsLabel}
        />
      </FormCard>
    </StandaloneFormPage>
  );
}
1317958
function createInput(props, pref) {
	const inputProps = {
		className: 'input-field',
		dataset: { type: props.type, },
		placeholder: props.placeholder || '',
	};
	let input; switch (props.type) {
		case 'select': case 'menulist': {
			input = createElement('select', inputProps);
			if (typeof props.getOptions === 'function') {
				input.classList.add('dynamic-select');
				setSelectOptions(input, typeof props.getCurrent === 'function' ? [ props.getCurrent(pref), ] : props.getOptions(pref));
			} else if (props.options) {
				setSelectOptions(input, props.options);
			}
		} break;
		case 'text': case 'code': {
			input = createElement('textarea', inputProps);
		} break;
		case 'random': case 'control': {
			Object.assign(inputProps, {
				value: props.label,
				dataset: { id: props.id, type: props.type, },
			});
		} /* falls through */
		default: {
			input = createElement('input', inputProps);
			input.type = ({
				control: 'button',
				random: 'button',
				boolean: 'checkbox',
				boolInt: 'checkbox',
				integer: 'number',
				string: 'text',
				keybordKey: 'text',
				command: 'text',
				color: 'color',
				label: 'hidden',
			})[props.type] || props.type;
		}
	}
	if (props.type === 'number') { input.step = 'any'; }
	if (input.type === 'checkbox') {
		input.className = '';
		input.id = 'l'+ Math.random().toString(32).slice(2);
		input = createElement('div', { className: 'checkbox-wrapper input-field', }, [
			input,
			createElement('label', { htmlFor: input.id, }),
		]);
	}
	input.id = 'i'+ Math.random().toString(32).slice(2);
	propsMap.set(input.id, props);
	return input;
}