UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

101 lines (100 loc) 5.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FieldBlockSharedProperties = exports.FieldBlockProperties = void 0; 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; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } const FieldBlockSharedProperties = exports.FieldBlockSharedProperties = { label: { doc: 'Field label to show above / before the input feature.', type: 'string', status: 'optional' }, labelDescription: { doc: 'A more discreet text displayed beside the label (i.e for "(optional)").', type: 'string', status: 'optional' }, labelDescriptionInline: { doc: 'If true, the labelDescription will be displayed on the same line as the label.', type: 'boolean', status: 'optional' }, labelSrOnly: { doc: 'Use `true` to make the label only readable by screen readers.', type: 'boolean', status: 'optional' }, help: { doc: 'Provide help content for the field using `title` and `content` as a string or React.Node. Additionally, you can set `open` to `true` to display the inline help, set the `breakout` property to `false` to disable the breakout of the inline help content, or use `renderAs` set to `dialog` to render the content in a [Dialog](/uilib/components/dialog/) (recommended for larger amounts of content).', type: 'object', status: 'optional' }, layout: { doc: 'Layout for the label and input. Can be `horizontal` or `vertical`.', type: 'string', status: 'optional' }, layoutOptions: { doc: 'Use this to set additional options for the `horizontal` layout. E.g. `{ width: "medium" }`. You can also use a custom width `{number}rem`. Instead of a width, you can use a min/max width. E.g. `{ minWidth: "6rem", maxWidth: "12rem" }`.', type: 'object', status: 'optional' }, width: { doc: 'Will set the width for the whole block. Use `small`, `medium`, `large` for predefined standard widths. You can also set a custom width `{number}rem` or use `stretch` or `false`.', type: ['string', 'false'], status: 'optional' }, contentWidth: { doc: 'Will set the width for its contents. Use `small`, `medium`, `large` for predefined standard widths. You can also set a custom width `{number}rem` or use `stretch` or `false`.', type: ['string', 'false'], status: 'optional' }, '[Space](/uilib/layout/space/properties)': { doc: 'Spacing properties like `top` or `bottom` are supported.', type: ['string', 'object'], status: 'optional' } }; const FieldBlockProperties = exports.FieldBlockProperties = _objectSpread(_objectSpread({}, FieldBlockSharedProperties), {}, { labelSize: { doc: 'Define one of the following [heading sizes](/uilib/elements/heading/): `medium` or `large`.', type: ['string', 'false'], status: 'optional' }, labelHeight: { doc: 'Defines the height of an component (size prop), so the label can be aligned correctly. Can be `default`, `small`, `medium`, `large`.', type: 'string', status: 'optional' }, asFieldset: { doc: 'Use `true` when you have several form elements. This way a `fieldset` with a `legend` is used.', type: 'boolean', status: 'optional' }, align: { doc: '`center` or `bottom` for aligning the contents vertically. Defaults to `bottom`.', type: ['string', 'false'], status: 'optional' }, disableStatusSummary: { doc: 'Use `true` to disable the error summary.', type: 'boolean', status: 'optional' }, composition: { doc: 'Use `true` for when you have more than one field wrapped.', type: 'true', status: 'optional' }, disabled: { doc: 'Set `true` to make the inner [FormLabel](/uilib/components/form-label/) behave as disabled.', type: 'boolean', status: 'optional' } }); //# sourceMappingURL=FieldBlockDocs.js.map