UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

42 lines (41 loc) 1.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeSpecificEvents = exports.TimeProperties = exports.TimeGeneralEvents = void 0; var _InputDocs = require("../../../../components/input/InputDocs.js"); var _FieldDocs = require("../FieldDocs.js"); const TimeProperties = exports.TimeProperties = { size: { ..._InputDocs.InputProperties.size, doc: `${_InputDocs.InputProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).` }, showSeconds: { doc: 'If set to `true`, a seconds input is shown in addition to hours and minutes.', type: 'boolean', status: 'optional' }, onBlurValidator: { doc: 'Custom validator function that is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }. Defaults to validating invalid hours and minutes, using `timeValidator`.', type: 'function', status: 'optional' } }; const TimeSpecificEvents = exports.TimeSpecificEvents = { onChange: { doc: 'Callback on hours, minutes, and seconds change.', type: '(value?: string, additionalArgs?: { hours?: string, minutes?: string, seconds?: string }) => void', status: 'optional' } }; const { onChange: _, ...generalEvents } = (0, _FieldDocs.getFieldEventsWithTypes)({ type: 'string', optional: true }, { type: 'object' }); const TimeGeneralEvents = exports.TimeGeneralEvents = generalEvents; //# sourceMappingURL=TimeDocs.js.map