@elliemae/ds-controlled-form 2.0.0-rc.1 → 2.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/controlled-checkbox/ControlledCheckbox.js +1 -1
- package/cjs/controlled-checkbox/config/useValidateProps.js +2 -2
- package/cjs/controlled-checkbox/styles.js +1 -1
- package/cjs/controlled-date-range-picker/config/useControlledDateRangePicker.js +19 -3
- package/cjs/controlled-date-range-picker/parts/ControlledDateRangeContent.js +20 -4
- package/cjs/controlled-date-time-picker/config/useControlledDateTimePicker.js +6 -2
- package/cjs/controlled-date-time-picker/parts/ControlledDateTimePickerContent.js +18 -4
- package/esm/controlled-checkbox/ControlledCheckbox.js +1 -1
- package/esm/controlled-checkbox/config/useValidateProps.js +2 -2
- package/esm/controlled-checkbox/styles.js +1 -1
- package/esm/controlled-date-range-picker/config/useControlledDateRangePicker.js +15 -3
- package/esm/controlled-date-range-picker/parts/ControlledDateRangeContent.js +19 -4
- package/esm/controlled-date-time-picker/config/useControlledDateTimePicker.js +6 -2
- package/esm/controlled-date-time-picker/parts/ControlledDateTimePickerContent.js +18 -5
- package/package.json +16 -9
- package/types/controlled-checkbox/ControlledCheckbox.d.ts +60 -10
- package/types/controlled-checkbox/config/useValidateProps.d.ts +1 -1
- package/types/controlled-checkbox/propTypes.d.ts +55 -9
- package/types/controlled-checkbox/styles.d.ts +4 -4
- package/types/controlled-date-range-picker/ControlledDateRangePicker.d.ts +12 -2
- package/types/controlled-date-range-picker/propTypes.d.ts +7 -1
- package/types/controlled-date-time-picker/ControlledDateTimePicker.d.ts +81 -22
- package/types/controlled-date-time-picker/parts/Pickers/Calendar/Styleds.d.ts +10 -70
- package/types/controlled-date-time-picker/parts/Pickers/CalendarWithTimeWheel/Styleds.d.ts +4 -24
- package/types/controlled-date-time-picker/parts/Pickers/TimeWheel/Styleds.d.ts +10 -70
- package/types/controlled-date-time-picker/parts/Styleds.d.ts +10 -30
- package/types/controlled-date-time-picker/propTypes.d.ts +76 -21
- package/types/controlled-toggle/ControlledToggle.d.ts +78 -13
- package/types/controlled-toggle/propTypes.d.ts +73 -12
- package/types/controlled-toggle/styles.d.ts +7 -7
|
@@ -17,7 +17,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
18
|
|
|
19
19
|
const DSControlledCheckbox = props => {
|
|
20
|
-
useValidateProps.useValidateProps(props,
|
|
20
|
+
useValidateProps.useValidateProps(props, propTypes.propTypes);
|
|
21
21
|
const checkboxRef = React.useRef();
|
|
22
22
|
const {
|
|
23
23
|
autoFocus,
|
|
@@ -8,8 +8,8 @@ const throwError = message => {
|
|
|
8
8
|
throw new Error("DSControlledCheckbox:: ".concat(message, "\n "));
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
const useValidateProps = (props,
|
|
12
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(props,
|
|
11
|
+
const useValidateProps = (props, propTypes) => {
|
|
12
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(props, propTypes);
|
|
13
13
|
|
|
14
14
|
if (typeof props.label === 'undefined' && typeof props.ariaLabel === 'undefined') {
|
|
15
15
|
throwError("Please provide a label or ariaLabel property to use this component.");
|
|
@@ -84,7 +84,7 @@ const StyledCheckBox = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
|
84
84
|
});
|
|
85
85
|
const StyledInput = /*#__PURE__*/styled__default["default"].input.withConfig({
|
|
86
86
|
componentId: "sc-349ih4-2"
|
|
87
|
-
})(["&:hover{cursor:pointer;}height:100%;position:absolute;top:0;left:0;opacity:0;"]);
|
|
87
|
+
})(["&:hover{cursor:pointer;}&:disabled{cursor:not-allowed;}height:100%;position:absolute;top:0;left:0;opacity:0;"]);
|
|
88
88
|
const StyledLabel = /*#__PURE__*/styled__default["default"].label.withConfig({
|
|
89
89
|
componentId: "sc-349ih4-3"
|
|
90
90
|
})(["&:hover{cursor:pointer;}padding-left:", ";color:", ";font-size:13px;line-height:13px;display:inherit;"], _ref11 => {
|
|
@@ -2,16 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var React = require('react');
|
|
6
12
|
var uid = require('uid');
|
|
13
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
7
14
|
var useGetPropsWithDefault = require('./useGetPropsWithDefault.js');
|
|
8
15
|
var useRangePickerLogic = require('./useRangePickerLogic.js');
|
|
9
16
|
var ControlledDateRangePickerTypes = require('../ControlledDateRangePickerTypes.js');
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
12
25
|
const useControlledDateRangePicker = props => {
|
|
13
26
|
const instanceUID = React.useMemo(() => uid.uid(6), []);
|
|
14
27
|
const propsWithDefaults = useGetPropsWithDefault.useGetDateRangePickerWithDefaultsProps(props);
|
|
28
|
+
const dataAttrs = dsPropsHelpers.getDataProps(props);
|
|
15
29
|
const {
|
|
16
30
|
type
|
|
17
31
|
} = propsWithDefaults;
|
|
@@ -20,13 +34,15 @@ const useControlledDateRangePicker = props => {
|
|
|
20
34
|
const isControllerOnly = type === ControlledDateRangePickerTypes.CONTROLLED_DATE_RANGE_PICKER_TYPES.CONTROLLER_ONLY;
|
|
21
35
|
const rangePickerLogic = useRangePickerLogic.useRangePickerLogic(propsWithDefaults);
|
|
22
36
|
const ctx = React.useMemo(() => ({
|
|
23
|
-
props: propsWithDefaults,
|
|
37
|
+
props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
|
|
38
|
+
dataAttrs
|
|
39
|
+
}),
|
|
24
40
|
instanceUID,
|
|
25
41
|
rangePickerLogic,
|
|
26
42
|
withInputs,
|
|
27
43
|
withIcon,
|
|
28
44
|
isControllerOnly
|
|
29
|
-
}), [instanceUID, isControllerOnly, propsWithDefaults, rangePickerLogic, withIcon, withInputs]);
|
|
45
|
+
}), [instanceUID, isControllerOnly, dataAttrs, propsWithDefaults, rangePickerLogic, withIcon, withInputs]);
|
|
30
46
|
return ctx;
|
|
31
47
|
};
|
|
32
48
|
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
12
|
var React = require('react');
|
|
7
13
|
var styled = require('styled-components');
|
|
@@ -14,10 +20,15 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
14
20
|
|
|
15
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
22
|
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
24
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
25
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
19
26
|
|
|
20
27
|
var _ControlledDateRangeF, _ControlledDateRangeT, _ControlledDateRangeC;
|
|
28
|
+
|
|
29
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
30
|
+
|
|
31
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
32
|
const StyledWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
22
33
|
componentId: "sc-e4pfvj-0"
|
|
23
34
|
})(["display:grid;grid-template-columns:auto auto auto;grid-template-rows:auto;", " grid-auto-flow:row;grid-template-areas:'. .';justify-content:center;align-items:center;"], _ref => {
|
|
@@ -28,16 +39,21 @@ const StyledWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
28
39
|
});
|
|
29
40
|
const ControlledDateRangeContent = () => {
|
|
30
41
|
const {
|
|
42
|
+
props: {
|
|
43
|
+
dataAttrs
|
|
44
|
+
},
|
|
31
45
|
withIcon,
|
|
32
46
|
withInputs,
|
|
33
47
|
isControllerOnly
|
|
34
48
|
} = React.useContext(ControlledDateRangePickerCTX.ControlledDateRangePickerContext);
|
|
35
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledWrapper, _objectSpread(_objectSpread({
|
|
36
50
|
isControllerOnly: isControllerOnly,
|
|
37
51
|
"data-testid": ControlledDateRangePickerDatatestid.ControlledDateRangePickerDatatestid.WRAPPER
|
|
38
|
-
},
|
|
39
|
-
children: [
|
|
40
|
-
|
|
52
|
+
}, dataAttrs), {}, {
|
|
53
|
+
children: [withInputs ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
54
|
+
children: [_ControlledDateRangeF || (_ControlledDateRangeF = /*#__PURE__*/_jsx__default["default"](ControlledDateRangeFromDate.ControlledDateRangeFromDate, {})), _ControlledDateRangeT || (_ControlledDateRangeT = /*#__PURE__*/_jsx__default["default"](ControlledDateRangeToDate.ControlledDateRangeToDate, {}))]
|
|
55
|
+
}) : null, withIcon || isControllerOnly ? _ControlledDateRangeC || (_ControlledDateRangeC = /*#__PURE__*/_jsx__default["default"](ControlledDateRangeCalendar.ControlledDateRangeCalendar, {})) : null]
|
|
56
|
+
}));
|
|
41
57
|
};
|
|
42
58
|
|
|
43
59
|
exports.ControlledDateRangeContent = ControlledDateRangeContent;
|
|
@@ -10,6 +10,7 @@ require('core-js/modules/esnext.iterator.filter.js');
|
|
|
10
10
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
11
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
12
12
|
var React = require('react');
|
|
13
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
13
14
|
var useGetPropsWithDefault = require('./useGetPropsWithDefault.js');
|
|
14
15
|
var useGetDestructuredValues = require('./useGetDestructuredValues.js');
|
|
15
16
|
var ControlledDateTimePickerTypes = require('../ControlledDateTimePickerTypes.js');
|
|
@@ -54,6 +55,7 @@ const useControlledDateTimePicker = props => {
|
|
|
54
55
|
const currMeridiemBtnRef = React.useRef();
|
|
55
56
|
const nextMeridiemBtnRef = React.useRef();
|
|
56
57
|
const propsWithDefaults = useGetPropsWithDefault.useGetDatePickerWithDefaultsProps(props);
|
|
58
|
+
const dataAttrs = dsPropsHelpers.getDataProps(props);
|
|
57
59
|
const {
|
|
58
60
|
type,
|
|
59
61
|
getIsDisabledDay,
|
|
@@ -361,7 +363,9 @@ const useControlledDateTimePicker = props => {
|
|
|
361
363
|
if ((ctrlKey || metaKey) && (key === 'Delete' || key === 'Backspace')) handleClearAll(e);
|
|
362
364
|
}, [handleClearAll, onFillWithCurrentDateKeys]);
|
|
363
365
|
const ctx = React__default["default"].useMemo(() => ({
|
|
364
|
-
props: propsWithDefaults,
|
|
366
|
+
props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
|
|
367
|
+
dataAttrs
|
|
368
|
+
}),
|
|
365
369
|
monthInputRef,
|
|
366
370
|
dayInputRef,
|
|
367
371
|
yearInputRef,
|
|
@@ -448,7 +452,7 @@ const useControlledDateTimePicker = props => {
|
|
|
448
452
|
announcedTimeValues,
|
|
449
453
|
ariaCurrentValueForInputs,
|
|
450
454
|
onGlobalKeyDown
|
|
451
|
-
}), [propsWithDefaults, dateStringFromProps, tempDateString, tempTimeString, handleChangeComposedDateTimeString, handleChangeComposedDateString, handleChangeComposedTimeString, handleChangeMonth, handleChangeDay, handleChangeYear, handleChangeHours, handleChangeMinutes, handleChangeMeridiem, handleClearAll, hideDate, hideTime, hideDateTimePicker, hideDatePicker, hideTimePicker, isDateSelector, isTimeSelector, isDateTimeSelector, isControllerOnly, isWithTimeWheelToo, isWithCalendarToo, isWithDateInputs, isWithDateInputsOnly, isWithTimeInputs, isWithTimeInputsOnly, autoFocusMonthInput, autoFocusHourInput, autoFocusPrevMonthArrow, autoFocusHourTimeWheel, latestInteractionRegion, withAnyInputs, withAnyPicker, withClearBtn, withAnyRightController, shouldPreserveClearableSpace, month, day, year, monthNum, dayNum, yearNum, announcedMonth, announcedDay, announcedYear, announcedDateValues, hours, minutes, meridiem, hoursNum, minutesNum, announcedHours, announcedMinutes, announcedMeridiem, announcedTimeValues, ariaCurrentValueForInputs, onGlobalKeyDown] // refs are mutable so we don't need to listen to them
|
|
455
|
+
}), [dataAttrs, propsWithDefaults, dateStringFromProps, tempDateString, tempTimeString, handleChangeComposedDateTimeString, handleChangeComposedDateString, handleChangeComposedTimeString, handleChangeMonth, handleChangeDay, handleChangeYear, handleChangeHours, handleChangeMinutes, handleChangeMeridiem, handleClearAll, hideDate, hideTime, hideDateTimePicker, hideDatePicker, hideTimePicker, isDateSelector, isTimeSelector, isDateTimeSelector, isControllerOnly, isWithTimeWheelToo, isWithCalendarToo, isWithDateInputs, isWithDateInputsOnly, isWithTimeInputs, isWithTimeInputsOnly, autoFocusMonthInput, autoFocusHourInput, autoFocusPrevMonthArrow, autoFocusHourTimeWheel, latestInteractionRegion, withAnyInputs, withAnyPicker, withClearBtn, withAnyRightController, shouldPreserveClearableSpace, month, day, year, monthNum, dayNum, yearNum, announcedMonth, announcedDay, announcedYear, announcedDateValues, hours, minutes, meridiem, hoursNum, minutesNum, announcedHours, announcedMinutes, announcedMeridiem, announcedTimeValues, ariaCurrentValueForInputs, onGlobalKeyDown] // refs are mutable so we don't need to listen to them
|
|
452
456
|
);
|
|
453
457
|
return ctx;
|
|
454
458
|
};
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
12
|
var React = require('react');
|
|
7
13
|
var dsGrid = require('@elliemae/ds-grid');
|
|
@@ -15,10 +21,15 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
15
21
|
|
|
16
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
23
|
|
|
24
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
18
25
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
26
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
27
|
|
|
21
28
|
var _DateInputs, _TimeInputs, _ClearButton, _PickersIcons;
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
22
33
|
const ControlledDateTimePickerContent = () => {
|
|
23
34
|
const {
|
|
24
35
|
hideDate,
|
|
@@ -33,6 +44,7 @@ const ControlledDateTimePickerContent = () => {
|
|
|
33
44
|
isControllerOnly,
|
|
34
45
|
props: {
|
|
35
46
|
hasError,
|
|
47
|
+
dataAttrs,
|
|
36
48
|
disabled
|
|
37
49
|
},
|
|
38
50
|
onGlobalKeyDown
|
|
@@ -48,7 +60,7 @@ const ControlledDateTimePickerContent = () => {
|
|
|
48
60
|
if (shouldPreserveClearableSpace) rightControlCols.push('28px');
|
|
49
61
|
if (withAnyPicker) rightControlCols.push('auto');
|
|
50
62
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
51
|
-
children: /*#__PURE__*/
|
|
63
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Styleds.StyledInputsWrapperGrid, _objectSpread(_objectSpread({
|
|
52
64
|
cols: mainCols,
|
|
53
65
|
gutter: "xxs",
|
|
54
66
|
pr: hideDatePicker && hideTimePicker && hideDateTimePicker ? '2px' : null,
|
|
@@ -59,9 +71,11 @@ const ControlledDateTimePickerContent = () => {
|
|
|
59
71
|
hasError: hasError,
|
|
60
72
|
isControllerOnly: isControllerOnly,
|
|
61
73
|
disabled: disabled
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
}, dataAttrs), {}, {
|
|
75
|
+
children: [hideDate ? null : _DateInputs || (_DateInputs = /*#__PURE__*/_jsx__default["default"](DateInputs.DateInputs, {})), hideTime ? null : _TimeInputs || (_TimeInputs = /*#__PURE__*/_jsx__default["default"](TimeInputs.TimeInputs, {})), withAnyRightController ? /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
76
|
+
cols: rightControlCols
|
|
77
|
+
}, void 0, shouldPreserveClearableSpace ? _ClearButton || (_ClearButton = /*#__PURE__*/_jsx__default["default"](ClearButton.ClearButton, {})) : null, withAnyPicker ? _PickersIcons || (_PickersIcons = /*#__PURE__*/_jsx__default["default"](PickersIcons.PickersIcons, {})) : null) : null]
|
|
78
|
+
}))
|
|
65
79
|
});
|
|
66
80
|
};
|
|
67
81
|
|
|
@@ -9,7 +9,7 @@ import { setMultipleRefs } from './utils/setMultipleRefs.js';
|
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
const DSControlledCheckbox = props => {
|
|
12
|
-
useValidateProps(props,
|
|
12
|
+
useValidateProps(props, propTypes);
|
|
13
13
|
const checkboxRef = useRef();
|
|
14
14
|
const {
|
|
15
15
|
autoFocus,
|
|
@@ -4,8 +4,8 @@ const throwError = message => {
|
|
|
4
4
|
throw new Error("DSControlledCheckbox:: ".concat(message, "\n "));
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
const useValidateProps = (props,
|
|
8
|
-
useValidateTypescriptPropTypes(props,
|
|
7
|
+
const useValidateProps = (props, propTypes) => {
|
|
8
|
+
useValidateTypescriptPropTypes(props, propTypes);
|
|
9
9
|
|
|
10
10
|
if (typeof props.label === 'undefined' && typeof props.ariaLabel === 'undefined') {
|
|
11
11
|
throwError("Please provide a label or ariaLabel property to use this component.");
|
|
@@ -76,7 +76,7 @@ const StyledCheckBox = /*#__PURE__*/styled.span.withConfig({
|
|
|
76
76
|
});
|
|
77
77
|
const StyledInput = /*#__PURE__*/styled.input.withConfig({
|
|
78
78
|
componentId: "sc-349ih4-2"
|
|
79
|
-
})(["&:hover{cursor:pointer;}height:100%;position:absolute;top:0;left:0;opacity:0;"]);
|
|
79
|
+
})(["&:hover{cursor:pointer;}&:disabled{cursor:not-allowed;}height:100%;position:absolute;top:0;left:0;opacity:0;"]);
|
|
80
80
|
const StyledLabel = /*#__PURE__*/styled.label.withConfig({
|
|
81
81
|
componentId: "sc-349ih4-3"
|
|
82
82
|
})(["&:hover{cursor:pointer;}padding-left:", ";color:", ";font-size:13px;line-height:13px;display:inherit;"], _ref11 => {
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
7
|
import { useMemo } from 'react';
|
|
2
8
|
import { uid } from 'uid';
|
|
9
|
+
import { getDataProps } from '@elliemae/ds-props-helpers';
|
|
3
10
|
import { useGetDateRangePickerWithDefaultsProps } from './useGetPropsWithDefault.js';
|
|
4
11
|
import { useRangePickerLogic } from './useRangePickerLogic.js';
|
|
5
12
|
import { CONTROLLED_DATE_RANGE_PICKER_TYPES } from '../ControlledDateRangePickerTypes.js';
|
|
6
13
|
|
|
7
|
-
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
17
|
const useControlledDateRangePicker = props => {
|
|
9
18
|
const instanceUID = useMemo(() => uid(6), []);
|
|
10
19
|
const propsWithDefaults = useGetDateRangePickerWithDefaultsProps(props);
|
|
20
|
+
const dataAttrs = getDataProps(props);
|
|
11
21
|
const {
|
|
12
22
|
type
|
|
13
23
|
} = propsWithDefaults;
|
|
@@ -16,13 +26,15 @@ const useControlledDateRangePicker = props => {
|
|
|
16
26
|
const isControllerOnly = type === CONTROLLED_DATE_RANGE_PICKER_TYPES.CONTROLLER_ONLY;
|
|
17
27
|
const rangePickerLogic = useRangePickerLogic(propsWithDefaults);
|
|
18
28
|
const ctx = useMemo(() => ({
|
|
19
|
-
props: propsWithDefaults,
|
|
29
|
+
props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
|
|
30
|
+
dataAttrs
|
|
31
|
+
}),
|
|
20
32
|
instanceUID,
|
|
21
33
|
rangePickerLogic,
|
|
22
34
|
withInputs,
|
|
23
35
|
withIcon,
|
|
24
36
|
isControllerOnly
|
|
25
|
-
}), [instanceUID, isControllerOnly, propsWithDefaults, rangePickerLogic, withIcon, withInputs]);
|
|
37
|
+
}), [instanceUID, isControllerOnly, dataAttrs, propsWithDefaults, rangePickerLogic, withIcon, withInputs]);
|
|
26
38
|
return ctx;
|
|
27
39
|
};
|
|
28
40
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
8
|
import { useContext } from 'react';
|
|
3
9
|
import styled from 'styled-components';
|
|
@@ -9,6 +15,10 @@ import { ControlledDateRangePickerDatatestid } from '../ControlledDateRangePicke
|
|
|
9
15
|
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
16
|
|
|
11
17
|
var _ControlledDateRangeF, _ControlledDateRangeT, _ControlledDateRangeC;
|
|
18
|
+
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
+
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
12
22
|
const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
13
23
|
componentId: "sc-e4pfvj-0"
|
|
14
24
|
})(["display:grid;grid-template-columns:auto auto auto;grid-template-rows:auto;", " grid-auto-flow:row;grid-template-areas:'. .';justify-content:center;align-items:center;"], _ref => {
|
|
@@ -19,16 +29,21 @@ const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
19
29
|
});
|
|
20
30
|
const ControlledDateRangeContent = () => {
|
|
21
31
|
const {
|
|
32
|
+
props: {
|
|
33
|
+
dataAttrs
|
|
34
|
+
},
|
|
22
35
|
withIcon,
|
|
23
36
|
withInputs,
|
|
24
37
|
isControllerOnly
|
|
25
38
|
} = useContext(ControlledDateRangePickerContext);
|
|
26
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/jsxs(StyledWrapper, _objectSpread(_objectSpread({
|
|
27
40
|
isControllerOnly: isControllerOnly,
|
|
28
41
|
"data-testid": ControlledDateRangePickerDatatestid.WRAPPER
|
|
29
|
-
},
|
|
30
|
-
children: [
|
|
31
|
-
|
|
42
|
+
}, dataAttrs), {}, {
|
|
43
|
+
children: [withInputs ? /*#__PURE__*/jsxs(Fragment, {
|
|
44
|
+
children: [_ControlledDateRangeF || (_ControlledDateRangeF = /*#__PURE__*/_jsx(ControlledDateRangeFromDate, {})), _ControlledDateRangeT || (_ControlledDateRangeT = /*#__PURE__*/_jsx(ControlledDateRangeToDate, {}))]
|
|
45
|
+
}) : null, withIcon || isControllerOnly ? _ControlledDateRangeC || (_ControlledDateRangeC = /*#__PURE__*/_jsx(ControlledDateRangeCalendar, {})) : null]
|
|
46
|
+
}));
|
|
32
47
|
};
|
|
33
48
|
|
|
34
49
|
export { ControlledDateRangeContent };
|
|
@@ -6,6 +6,7 @@ import 'core-js/modules/esnext.iterator.for-each.js';
|
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
8
|
import React, { useRef, useMemo, useState, useCallback } from 'react';
|
|
9
|
+
import { getDataProps } from '@elliemae/ds-props-helpers';
|
|
9
10
|
import { useGetDatePickerWithDefaultsProps } from './useGetPropsWithDefault.js';
|
|
10
11
|
import { useGetDestructuredValues } from './useGetDestructuredValues.js';
|
|
11
12
|
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../ControlledDateTimePickerTypes.js';
|
|
@@ -45,6 +46,7 @@ const useControlledDateTimePicker = props => {
|
|
|
45
46
|
const currMeridiemBtnRef = useRef();
|
|
46
47
|
const nextMeridiemBtnRef = useRef();
|
|
47
48
|
const propsWithDefaults = useGetDatePickerWithDefaultsProps(props);
|
|
49
|
+
const dataAttrs = getDataProps(props);
|
|
48
50
|
const {
|
|
49
51
|
type,
|
|
50
52
|
getIsDisabledDay,
|
|
@@ -352,7 +354,9 @@ const useControlledDateTimePicker = props => {
|
|
|
352
354
|
if ((ctrlKey || metaKey) && (key === 'Delete' || key === 'Backspace')) handleClearAll(e);
|
|
353
355
|
}, [handleClearAll, onFillWithCurrentDateKeys]);
|
|
354
356
|
const ctx = React.useMemo(() => ({
|
|
355
|
-
props: propsWithDefaults,
|
|
357
|
+
props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
|
|
358
|
+
dataAttrs
|
|
359
|
+
}),
|
|
356
360
|
monthInputRef,
|
|
357
361
|
dayInputRef,
|
|
358
362
|
yearInputRef,
|
|
@@ -439,7 +443,7 @@ const useControlledDateTimePicker = props => {
|
|
|
439
443
|
announcedTimeValues,
|
|
440
444
|
ariaCurrentValueForInputs,
|
|
441
445
|
onGlobalKeyDown
|
|
442
|
-
}), [propsWithDefaults, dateStringFromProps, tempDateString, tempTimeString, handleChangeComposedDateTimeString, handleChangeComposedDateString, handleChangeComposedTimeString, handleChangeMonth, handleChangeDay, handleChangeYear, handleChangeHours, handleChangeMinutes, handleChangeMeridiem, handleClearAll, hideDate, hideTime, hideDateTimePicker, hideDatePicker, hideTimePicker, isDateSelector, isTimeSelector, isDateTimeSelector, isControllerOnly, isWithTimeWheelToo, isWithCalendarToo, isWithDateInputs, isWithDateInputsOnly, isWithTimeInputs, isWithTimeInputsOnly, autoFocusMonthInput, autoFocusHourInput, autoFocusPrevMonthArrow, autoFocusHourTimeWheel, latestInteractionRegion, withAnyInputs, withAnyPicker, withClearBtn, withAnyRightController, shouldPreserveClearableSpace, month, day, year, monthNum, dayNum, yearNum, announcedMonth, announcedDay, announcedYear, announcedDateValues, hours, minutes, meridiem, hoursNum, minutesNum, announcedHours, announcedMinutes, announcedMeridiem, announcedTimeValues, ariaCurrentValueForInputs, onGlobalKeyDown] // refs are mutable so we don't need to listen to them
|
|
446
|
+
}), [dataAttrs, propsWithDefaults, dateStringFromProps, tempDateString, tempTimeString, handleChangeComposedDateTimeString, handleChangeComposedDateString, handleChangeComposedTimeString, handleChangeMonth, handleChangeDay, handleChangeYear, handleChangeHours, handleChangeMinutes, handleChangeMeridiem, handleClearAll, hideDate, hideTime, hideDateTimePicker, hideDatePicker, hideTimePicker, isDateSelector, isTimeSelector, isDateTimeSelector, isControllerOnly, isWithTimeWheelToo, isWithCalendarToo, isWithDateInputs, isWithDateInputsOnly, isWithTimeInputs, isWithTimeInputsOnly, autoFocusMonthInput, autoFocusHourInput, autoFocusPrevMonthArrow, autoFocusHourTimeWheel, latestInteractionRegion, withAnyInputs, withAnyPicker, withClearBtn, withAnyRightController, shouldPreserveClearableSpace, month, day, year, monthNum, dayNum, yearNum, announcedMonth, announcedDay, announcedYear, announcedDateValues, hours, minutes, meridiem, hoursNum, minutesNum, announcedHours, announcedMinutes, announcedMeridiem, announcedTimeValues, ariaCurrentValueForInputs, onGlobalKeyDown] // refs are mutable so we don't need to listen to them
|
|
443
447
|
);
|
|
444
448
|
return ctx;
|
|
445
449
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
8
|
import React from 'react';
|
|
3
9
|
import { Grid } from '@elliemae/ds-grid';
|
|
@@ -7,9 +13,13 @@ import { DateInputs } from './DateInputs/DateInputs.js';
|
|
|
7
13
|
import { TimeInputs } from './TimeInputs/TimeInputs.js';
|
|
8
14
|
import { PickersIcons } from './Pickers/PickersIcons.js';
|
|
9
15
|
import { ClearButton } from './ClearButton/ClearButton.js';
|
|
10
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
11
17
|
|
|
12
18
|
var _DateInputs, _TimeInputs, _ClearButton, _PickersIcons;
|
|
19
|
+
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
23
|
const ControlledDateTimePickerContent = () => {
|
|
14
24
|
const {
|
|
15
25
|
hideDate,
|
|
@@ -24,6 +34,7 @@ const ControlledDateTimePickerContent = () => {
|
|
|
24
34
|
isControllerOnly,
|
|
25
35
|
props: {
|
|
26
36
|
hasError,
|
|
37
|
+
dataAttrs,
|
|
27
38
|
disabled
|
|
28
39
|
},
|
|
29
40
|
onGlobalKeyDown
|
|
@@ -39,7 +50,7 @@ const ControlledDateTimePickerContent = () => {
|
|
|
39
50
|
if (shouldPreserveClearableSpace) rightControlCols.push('28px');
|
|
40
51
|
if (withAnyPicker) rightControlCols.push('auto');
|
|
41
52
|
return /*#__PURE__*/jsx(Fragment, {
|
|
42
|
-
children: /*#__PURE__*/
|
|
53
|
+
children: /*#__PURE__*/jsxs(StyledInputsWrapperGrid, _objectSpread(_objectSpread({
|
|
43
54
|
cols: mainCols,
|
|
44
55
|
gutter: "xxs",
|
|
45
56
|
pr: hideDatePicker && hideTimePicker && hideDateTimePicker ? '2px' : null,
|
|
@@ -50,9 +61,11 @@ const ControlledDateTimePickerContent = () => {
|
|
|
50
61
|
hasError: hasError,
|
|
51
62
|
isControllerOnly: isControllerOnly,
|
|
52
63
|
disabled: disabled
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
}, dataAttrs), {}, {
|
|
65
|
+
children: [hideDate ? null : _DateInputs || (_DateInputs = /*#__PURE__*/_jsx(DateInputs, {})), hideTime ? null : _TimeInputs || (_TimeInputs = /*#__PURE__*/_jsx(TimeInputs, {})), withAnyRightController ? /*#__PURE__*/_jsx(Grid, {
|
|
66
|
+
cols: rightControlCols
|
|
67
|
+
}, void 0, shouldPreserveClearableSpace ? _ClearButton || (_ClearButton = /*#__PURE__*/_jsx(ClearButton, {})) : null, withAnyPicker ? _PickersIcons || (_PickersIcons = /*#__PURE__*/_jsx(PickersIcons, {})) : null) : null]
|
|
68
|
+
}))
|
|
56
69
|
});
|
|
57
70
|
};
|
|
58
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-controlled-form",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Controllers",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -452,24 +452,31 @@
|
|
|
452
452
|
"build": "node ../../scripts/build/build.js"
|
|
453
453
|
},
|
|
454
454
|
"dependencies": {
|
|
455
|
-
"@elliemae/ds-
|
|
456
|
-
"@elliemae/ds-
|
|
457
|
-
"@elliemae/ds-
|
|
458
|
-
"@elliemae/ds-
|
|
459
|
-
"@elliemae/ds-icons": "2.0.0-rc.
|
|
460
|
-
"@elliemae/ds-props-helpers": "2.0.0-rc.
|
|
461
|
-
"@elliemae/ds-system": "2.0.0-rc.
|
|
462
|
-
"@elliemae/
|
|
455
|
+
"@elliemae/ds-button": "2.0.0-rc.10",
|
|
456
|
+
"@elliemae/ds-form-layout-blocks": "2.0.0-rc.10",
|
|
457
|
+
"@elliemae/ds-grid": "2.0.0-rc.10",
|
|
458
|
+
"@elliemae/ds-icon": "2.0.0-rc.10",
|
|
459
|
+
"@elliemae/ds-icons": "2.0.0-rc.10",
|
|
460
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.10",
|
|
461
|
+
"@elliemae/ds-system": "2.0.0-rc.10",
|
|
462
|
+
"@elliemae/ds-tooltip": "2.0.0-rc.10",
|
|
463
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-rc.10",
|
|
463
464
|
"prop-types": "~15.7.2",
|
|
464
465
|
"react-desc": "~4.1.3",
|
|
465
466
|
"react-popper": "~2.2.5",
|
|
466
467
|
"uid": "~2.0.0"
|
|
467
468
|
},
|
|
468
469
|
"devDependencies": {
|
|
470
|
+
"@elliemae/pui-theme": "~2.2.5",
|
|
471
|
+
"@testing-library/dom": "~8.11.1",
|
|
472
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
473
|
+
"@testing-library/react": "~12.1.2",
|
|
474
|
+
"@testing-library/user-event": "~13.5.0",
|
|
469
475
|
"styled-components": "~5.3.3",
|
|
470
476
|
"styled-system": "~5.1.5"
|
|
471
477
|
},
|
|
472
478
|
"peerDependencies": {
|
|
479
|
+
"@elliemae/pui-theme": "^2.2.5",
|
|
473
480
|
"react": "^17.0.2",
|
|
474
481
|
"react-dom": "^17.0.2",
|
|
475
482
|
"styled-components": "^5.3.3",
|
|
@@ -1,21 +1,71 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
import type { DSControlledCheckboxPropsT } from './index.d';
|
|
3
4
|
declare const DSControlledCheckbox: {
|
|
4
5
|
(props: DSControlledCheckboxPropsT): JSX.Element;
|
|
5
6
|
propTypes: {
|
|
6
7
|
checked: any;
|
|
7
|
-
value:
|
|
8
|
+
value: {
|
|
9
|
+
defaultValue<T = unknown>(arg: T): {
|
|
10
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
13
|
+
};
|
|
8
14
|
name: any;
|
|
9
|
-
label:
|
|
15
|
+
label: {
|
|
16
|
+
defaultValue<T = unknown>(arg: T): {
|
|
17
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
18
|
+
};
|
|
19
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
20
|
+
};
|
|
10
21
|
id: any;
|
|
11
|
-
readOnly:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
readOnly: {
|
|
23
|
+
defaultValue<T = unknown>(arg: T): {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
hasError: {
|
|
29
|
+
defaultValue<T = unknown>(arg: T): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
34
|
+
disabled: {
|
|
35
|
+
defaultValue<T = unknown>(arg: T): {
|
|
36
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
38
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
39
|
+
};
|
|
40
|
+
ariaControls: {
|
|
41
|
+
defaultValue<T = unknown>(arg: T): {
|
|
42
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
43
|
+
};
|
|
44
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
ariaLabel: {
|
|
47
|
+
defaultValue<T = unknown>(arg: T): {
|
|
48
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
50
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
51
|
+
};
|
|
52
|
+
innerRef: {
|
|
53
|
+
defaultValue<T = unknown>(arg: T): {
|
|
54
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
56
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
57
|
+
};
|
|
58
|
+
autoFocus: {
|
|
59
|
+
defaultValue<T = unknown>(arg: T): {
|
|
60
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
62
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
63
|
+
};
|
|
18
64
|
};
|
|
19
65
|
};
|
|
20
|
-
declare const DSControlledCheckboxWithSchema:
|
|
66
|
+
declare const DSControlledCheckboxWithSchema: {
|
|
67
|
+
(props?: DSControlledCheckboxPropsT | undefined): JSX.Element;
|
|
68
|
+
propTypes: unknown;
|
|
69
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
70
|
+
};
|
|
21
71
|
export { DSControlledCheckbox, DSControlledCheckboxWithSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DSControlledCheckboxPropsT } from '../index.d';
|
|
2
|
-
export declare const useValidateProps: (props: DSControlledCheckboxPropsT,
|
|
2
|
+
export declare const useValidateProps: (props: DSControlledCheckboxPropsT, propTypes: unknown) => void;
|