UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

26 lines (25 loc) 1.4 kB
/*! * KoliBri - The accessible HTML-Standard */ import { __rest } from "tslib"; import { h } from "@stencil/core"; import KolTextAreaFc from "../../functional-components/inputs/TextArea"; import { getRenderStates } from "../_helpers/getRenderStates"; function getTextAreaProps(state, other) { var _a; const renderStates = getRenderStates(state); const ariaDescribedBy = [...renderStates.ariaDescribedBy, ...((_a = other.ariaDescribedBy) !== null && _a !== void 0 ? _a : [])]; const props = Object.assign(Object.assign({ id: state._id, hideLabel: state._hideLabel, label: state._label, value: state._value, accessKey: state._accessKey, disabled: state._disabled, name: state._name, rows: state._rows, readonly: state._readOnly, required: state._required, placeholder: state._placeholder, touched: state._touched, msg: state._msg }, other), { ariaDescribedBy }); if ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') { props.maxLength = state._maxLength; } if ('_shortKey' in state) props['aria-keyshortcuts'] = state._shortKey; return props; } const TextAreaStateWrapper = (_a) => { var { state } = _a, other = __rest(_a, ["state"]); return h(KolTextAreaFc, Object.assign({}, getTextAreaProps(state, other))); }; export default TextAreaStateWrapper; //# sourceMappingURL=TextAreaStateWrapper.js.map