@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
104 lines • 4.17 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import { inputProperties } from '../../../../components/input/InputDocs';
export const stringProperties = {
multiline: {
doc: 'True to be able to write in multiple lines (switching from input-element to textarea-element).',
type: 'boolean',
status: 'optional'
},
leftIcon: {
doc: 'For icon at the left side of the text input.',
type: 'string',
status: 'optional'
},
rightIcon: {
doc: 'For icon at the right side of the text input.',
type: 'string',
status: 'optional'
},
capitalize: {
doc: 'When set to true, it will capitalize the first letter of every word, transforming the rest to lowercase.',
type: 'boolean',
status: 'optional'
},
trim: {
doc: 'When true, it will trim leading and trailing whitespaces on blur, triggering onChange if the value changes.',
type: 'boolean',
status: 'optional'
},
inputMode: {
doc: 'Define an [inputmode](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode).',
type: 'string',
status: 'optional'
},
autoComplete: {
doc: 'For HTML [autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) attributes.',
type: ['on', 'string'],
status: 'optional'
},
minLength: {
doc: 'Validation for minimum length of the text (number of characters).',
type: 'number',
status: 'optional'
},
maxLength: {
doc: 'Validation for maximum length of the text (number of characters).',
type: 'number',
status: 'optional'
},
pattern: {
doc: 'Validation based on regex pattern.',
type: 'string',
status: 'optional'
},
width: {
doc: '`false` for no width (use browser default), small, medium or large for predefined standard widths, stretch to fill available width.',
type: ['string', 'false'],
status: 'optional'
},
size: _objectSpread(_objectSpread({}, inputProperties.size), {}, {
doc: `${inputProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`
}),
align: inputProperties.align,
selectall: inputProperties.selectall,
clear: inputProperties.clear,
keepPlaceholder: inputProperties.keep_placeholder,
rows: {
doc: 'For multiline, set how many rows of text can be shown by default. Defaults to 2.',
type: 'number',
status: 'optional'
},
autoresizeMaxRows: {
doc: 'For multiline, set how many rows of text can be shown at max. Defaults to 6',
type: 'number',
status: 'optional'
},
characterCounter: {
doc: "For multiline, use a number to define the displayed max length e.g. `40` or `{ max: 40, variant: 'down' }`.",
type: ['number', 'object'],
status: 'optional'
},
autoresize: {
doc: 'For multiline, set true to expand when writing longer texts. Defaults to true.',
type: 'boolean',
status: 'optional'
},
inputClassName: {
doc: 'Class name set on the <input> DOM element.',
type: 'string',
status: 'optional'
},
innerRef: {
doc: 'By providing a React.Ref we can get the internally used input element (DOM).',
type: 'React.RefObject',
status: 'optional'
},
submitElement: {
doc: 'Accepts a React element which will show up like the "submit button" would do on type="search".',
type: 'React.Element',
status: 'optional'
}
};
//# sourceMappingURL=StringDocs.js.map