@elliemae/ds-form 2.0.0-alpha.5 → 2.0.0-alpha.9
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/Checkbox/DSCheckbox.js +9 -11
- package/cjs/Checkbox/elements/CheckMark.js +1 -1
- package/cjs/Checkbox/index.js +2 -4
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +7 -7
- package/cjs/CheckboxGroup/index.js +1 -1
- package/cjs/ComboBox/DSComboBox.js +3 -7
- package/cjs/ComboBox/index.js +3 -7
- package/cjs/ComboBox/v1/DSComboBox.js +23 -27
- package/cjs/ComboBox/v1/components/AllOption.js +3 -3
- package/cjs/ComboBox/v1/components/ClearIndicator.js +2 -2
- package/cjs/ComboBox/v1/components/Control.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOption.js +4 -4
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +5 -5
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +4 -4
- package/cjs/ComboBox/v1/components/MenuList.js +3 -3
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js +1 -1
- package/cjs/ComboBox/v1/components/MultiValueLabel.js +1 -1
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +1 -1
- package/cjs/ComboBox/v1/components/SelectMenu.js +5 -5
- package/cjs/ComboBox/v1/components/SingleValueLabel.js +1 -1
- package/cjs/ComboBox/v1/components/ValueContainer.js +4 -4
- package/cjs/ComboBox/v1/index.js +3 -7
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +3 -3
- package/cjs/ComboBox/v2/Combobox.js +9 -9
- package/cjs/ComboBox/v2/components/AllOption.js +3 -3
- package/cjs/ComboBox/v2/components/ClearIndicator.js +4 -4
- package/cjs/ComboBox/v2/components/Content.js +3 -3
- package/cjs/ComboBox/v2/components/Control.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOption.js +6 -6
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +9 -9
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +4 -4
- package/cjs/ComboBox/v2/components/GroupHeading.js +4 -4
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/cjs/ComboBox/v2/components/LoadingIndicator.js +3 -3
- package/cjs/ComboBox/v2/components/MenuList.js +4 -4
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js +11 -11
- package/cjs/ComboBox/v2/components/MultiValueLabel.js +1 -1
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v2/components/SelectMenu.js +4 -4
- package/cjs/ComboBox/v2/components/SingleValueLabel.js +1 -1
- package/cjs/ComboBox/v2/components/ValueContainer.js +3 -3
- package/cjs/ComboBox/v2/context.js +1 -1
- package/cjs/ComboBox/v2/index.js +1 -1
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js +5 -5
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +3 -3
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +3 -3
- package/cjs/DateInput/DSDateInput.js +4 -4
- package/cjs/DateInput/components/DateInputImpl.js +2 -2
- package/cjs/DateInput/components/DateInputs.js +7 -7
- package/cjs/DateInput/components/utils.js +1 -1
- package/cjs/DateInput/index.js +1 -1
- package/cjs/DateInputV2/components/DSDateInput.js +2 -2
- package/cjs/DateInputV2/components/DateInputs.js +13 -13
- package/cjs/DateInputV2/components/propsTypes.js +17 -17
- package/cjs/DateInputV2/components/styled.js +4 -4
- package/cjs/DateInputV2/components/utils.js +1 -1
- package/cjs/DateInputV2/index.js +1 -1
- package/cjs/ExpandableInput/DSExpandableInput.js +1 -1
- package/cjs/ExpandableInput/ExpandableInputImpl.js +3 -3
- package/cjs/FloatingLabelInput/DSFloatingLabelInput.js +2 -2
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +15 -15
- package/cjs/FormItem/DSFormItemLayout.js +13 -13
- package/cjs/FormItem/Error/DSError.js +2 -2
- package/cjs/FormItem/Feedback.js +1 -1
- package/cjs/FormItem/Label/DSLabel.js +3 -3
- package/cjs/FormItem/Suffix/Suffix.js +4 -4
- package/cjs/FormItem/ValidationFieldWrapper.js +2 -2
- package/cjs/FormItem/defaultProps.js +1 -1
- package/cjs/FormItem/index.js +2 -2
- package/cjs/Input/DSInput.js +3 -3
- package/cjs/Input/InputAddonWrapper.js +4 -4
- package/cjs/Input/InputImpl.js +55 -55
- package/cjs/Input/index.js +1 -1
- package/cjs/InputGroup/AddonWrapper.js +4 -4
- package/cjs/InputGroup/DSInputGroup.js +1 -1
- package/cjs/InputGroup/index.js +1 -1
- package/cjs/InputMask/DSInputMask.js +3 -3
- package/cjs/InputMask/DSInputMaskDeprecated.js +10 -10
- package/cjs/InputMask/InputMaskContext.js +1 -1
- package/cjs/InputMask/MaskTypes.js +1 -1
- package/cjs/InputMask/index.js +1 -1
- package/cjs/InputMask/mask_types/DateInputMask.js +3 -3
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +3 -3
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +3 -3
- package/cjs/InputMask/mask_types/NumberInputMask.js +3 -3
- package/cjs/InputMask/mask_types/PhoneInputMask.js +3 -3
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +3 -3
- package/cjs/InputMask/mask_types/SsnInputMask.js +3 -3
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +3 -3
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +3 -3
- package/cjs/InputMask/mask_types/index.js +4 -4
- package/cjs/InputProtected/DSInputProtected.js +10 -10
- package/cjs/InputProtected/index.js +1 -1
- package/cjs/LargeInputText/DSLargeInputText.js +4 -4
- package/cjs/LargeInputText/index.js +1 -1
- package/cjs/Radio/Circle.js +2 -2
- package/cjs/Radio/DSRadio.js +8 -8
- package/cjs/Radio/index.js +1 -1
- package/cjs/RadioGroup/DSRadioGroup.js +8 -8
- package/cjs/RadioGroup/index.js +1 -1
- package/cjs/RequiredMark/RequiredMark.js +2 -2
- package/cjs/SearchBox/DSSearchBox.js +7 -7
- package/cjs/SearchBox/NavSearchBox.js +19 -19
- package/cjs/SearchBox/SButton.js +2 -2
- package/cjs/SearchBox/SearchBoxToggle.js +7 -7
- package/cjs/SearchBox/index.js +1 -1
- package/cjs/SearchBox/styled.js +1 -1
- package/cjs/SearchBox/withSearchable.js +4 -4
- package/cjs/TextBox/DSTextBox.js +4 -4
- package/cjs/TextBox/index.js +1 -1
- package/cjs/TimeInput/DSTimeInput.js +4 -4
- package/cjs/TimeInput/TimeInputImpl.js +3 -3
- package/cjs/TimeInput/TimeInputs.js +8 -8
- package/cjs/TimeInput/index.js +1 -1
- package/cjs/Toggle/DSToggle.js +3 -3
- package/cjs/Toggle/DSToggleImpl.js +17 -17
- package/cjs/Toggle/DSToggleRender.js +7 -7
- package/cjs/Toggle/index.js +1 -1
- package/cjs/Toggle/props.js +11 -11
- package/cjs/index.js +14 -18
- package/esm/Input/InputImpl.js +2 -2
- package/esm/Radio/DSRadio.js +1 -1
- package/package.json +17 -17
|
@@ -25,12 +25,12 @@ var Group__default = /*#__PURE__*/_interopDefaultLegacy(Group);
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
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[
|
|
28
|
+
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; }
|
|
29
29
|
const emClassPrefix = 'em-ds';
|
|
30
30
|
const baseClass = `${emClassPrefix}-radio-group`;
|
|
31
31
|
|
|
32
|
-
const RadioItem = props => /*#__PURE__*/_jsx__default[
|
|
33
|
-
render: context => /*#__PURE__*/jsxRuntime.jsx(DSRadio[
|
|
32
|
+
const RadioItem = props => /*#__PURE__*/_jsx__default["default"](GroupItem__default["default"], {
|
|
33
|
+
render: context => /*#__PURE__*/jsxRuntime.jsx(DSRadio["default"], _objectSpread(_objectSpread({}, props), {}, {
|
|
34
34
|
checked: context.activeValue === props.value,
|
|
35
35
|
disabled: context.disabled || props.disabled,
|
|
36
36
|
onChange: context.onChange
|
|
@@ -48,7 +48,7 @@ const DSRadioGroup = ({
|
|
|
48
48
|
labelProps
|
|
49
49
|
}) => {
|
|
50
50
|
const checkRefs = [];
|
|
51
|
-
const count = React__default[
|
|
51
|
+
const count = React__default["default"].Children.count(children);
|
|
52
52
|
|
|
53
53
|
const onKeyDown = (e, index) => {
|
|
54
54
|
if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {
|
|
@@ -60,7 +60,7 @@ const DSRadioGroup = ({
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
const group = /*#__PURE__*/_jsx__default[
|
|
63
|
+
const group = /*#__PURE__*/_jsx__default["default"](Group__default["default"], {
|
|
64
64
|
activeValue: activeValue,
|
|
65
65
|
disabled: disabled,
|
|
66
66
|
onChange: onChange
|
|
@@ -69,7 +69,7 @@ const DSRadioGroup = ({
|
|
|
69
69
|
}, labelProps && labelProps.labelText ? {} : containerProps), {}, {
|
|
70
70
|
className: `${baseClass} ${baseClass}--${orientation}`,
|
|
71
71
|
role: "group",
|
|
72
|
-
children: React__default[
|
|
72
|
+
children: React__default["default"].Children.map(children, (child, index) => /*#__PURE__*/jsxRuntime.jsx(RadioItem, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
73
73
|
innerRef: t => {
|
|
74
74
|
checkRefs.push(t);
|
|
75
75
|
},
|
|
@@ -82,7 +82,7 @@ const DSRadioGroup = ({
|
|
|
82
82
|
className: `${baseClass}-form-item-layout-wrapper`
|
|
83
83
|
}, containerProps), {}, {
|
|
84
84
|
role: "group",
|
|
85
|
-
children: /*#__PURE__*/jsxRuntime.jsx(DSFormItemLayout[
|
|
85
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DSFormItemLayout["default"], _objectSpread(_objectSpread({}, labelProps), {}, {
|
|
86
86
|
inputComponent: group,
|
|
87
87
|
onChange: onChange,
|
|
88
88
|
truncateText: truncateText
|
|
@@ -98,4 +98,4 @@ const DSRadioGroupWithSchema = reactDesc.describe(DSRadioGroup);
|
|
|
98
98
|
DSRadioGroupWithSchema.propTypes = props.props;
|
|
99
99
|
|
|
100
100
|
exports.DSRadioGroupWithSchema = DSRadioGroupWithSchema;
|
|
101
|
-
exports[
|
|
101
|
+
exports["default"] = DSRadioGroup;
|
package/cjs/RadioGroup/index.js
CHANGED
|
@@ -19,12 +19,12 @@ const RequiredMark = ({
|
|
|
19
19
|
if (!required && !optional) return null;
|
|
20
20
|
|
|
21
21
|
if (required) {
|
|
22
|
-
return /*#__PURE__*/_jsx__default[
|
|
22
|
+
return /*#__PURE__*/_jsx__default["default"]("span", {
|
|
23
23
|
className: `${cssClassName}`
|
|
24
24
|
}, void 0, "\u25CF");
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return /*#__PURE__*/_jsx__default[
|
|
27
|
+
return /*#__PURE__*/_jsx__default["default"]("span", {
|
|
28
28
|
className: `${cssClassName} optional-mark`
|
|
29
29
|
}, void 0, "\u26AC");
|
|
30
30
|
};
|
|
@@ -63,8 +63,8 @@ const DSSearchBox = ({
|
|
|
63
63
|
const shouldShowClearIcon = clearable && (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length) > 0;
|
|
64
64
|
const shouldShowSearchIcon = !shouldShowClearIcon && showIcon;
|
|
65
65
|
const shouldShowAnyIcon = shouldShowClearIcon || shouldShowSearchIcon;
|
|
66
|
-
const PureSearchboxIcon = React__default[
|
|
67
|
-
let Icon = _Search || (_Search = /*#__PURE__*/_jsx__default[
|
|
66
|
+
const PureSearchboxIcon = React__default["default"].useMemo(() => {
|
|
67
|
+
let Icon = _Search || (_Search = /*#__PURE__*/_jsx__default["default"](SearchIcon__default["default"], {
|
|
68
68
|
"aria-label": "Search"
|
|
69
69
|
}));
|
|
70
70
|
|
|
@@ -73,26 +73,26 @@ const DSSearchBox = ({
|
|
|
73
73
|
if (!shouldShowAnyIcon) return null;
|
|
74
74
|
|
|
75
75
|
if (shouldShowClearIcon) {
|
|
76
|
-
Icon = /*#__PURE__*/_jsx__default[
|
|
76
|
+
Icon = /*#__PURE__*/_jsx__default["default"](CloseXsmall__default["default"], {
|
|
77
77
|
color: dsIcon.DSIconColors.PRIMARY,
|
|
78
78
|
"aria-label": "Clear input"
|
|
79
79
|
});
|
|
80
80
|
handleOnClick = handleClear;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
return /*#__PURE__*/_jsx__default[
|
|
83
|
+
return /*#__PURE__*/_jsx__default["default"](SButton.SButton, {
|
|
84
84
|
disabled: disabled || disableButton,
|
|
85
85
|
icon: Icon,
|
|
86
86
|
onClick: handleOnClick,
|
|
87
87
|
dataTestid: shouldShowClearIcon ? 'ds-searchbox-button-clear' : 'ds-searchbox-button'
|
|
88
88
|
});
|
|
89
89
|
}, [shouldShowClearIcon, shouldShowSearchIcon, shouldShowAnyIcon, disabled, disableButton, handleSearch, handleClear]);
|
|
90
|
-
return /*#__PURE__*/_jsx__default[
|
|
90
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
91
91
|
style: {
|
|
92
92
|
position: 'relative',
|
|
93
93
|
zIndex: 0
|
|
94
94
|
}
|
|
95
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
95
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.SearchBoxTextBox, {
|
|
96
96
|
className: className,
|
|
97
97
|
containerProps: containerProps,
|
|
98
98
|
disabled: disabled,
|
|
@@ -112,4 +112,4 @@ const SearchBoxWithSchema = reactDesc.describe(DSSearchBox);
|
|
|
112
112
|
SearchBoxWithSchema.propTypes = props.searchBoxProps;
|
|
113
113
|
|
|
114
114
|
exports.SearchBoxWithSchema = SearchBoxWithSchema;
|
|
115
|
-
exports[
|
|
115
|
+
exports["default"] = DSSearchBox;
|
|
@@ -27,16 +27,16 @@ var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
|
27
27
|
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
28
28
|
|
|
29
29
|
var _StyledVerticalSepara, _VerticalSeparator;
|
|
30
|
-
const StyledResultTracker = /*#__PURE__*/styled__default[
|
|
30
|
+
const StyledResultTracker = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
31
|
componentId: "sc-sbwvud-0"
|
|
32
32
|
})(["padding:0 8px;color:#a2a9b6;white-space:nowrap;word-spacing:2px;"]);
|
|
33
|
-
const StyledVerticalSeparator = /*#__PURE__*/styled__default[
|
|
33
|
+
const StyledVerticalSeparator = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
34
|
componentId: "sc-sbwvud-1"
|
|
35
35
|
})(["height:60%;border-right:1px solid #a2a9b6;"]);
|
|
36
|
-
const StyledToolbarRightAddonsWrapper = /*#__PURE__*/styled__default[
|
|
36
|
+
const StyledToolbarRightAddonsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
37
|
componentId: "sc-sbwvud-2"
|
|
38
38
|
})(["display:flex;align-items:center;justify-content:flex-end;"]);
|
|
39
|
-
const NavBtn = /*#__PURE__*/styled__default[
|
|
39
|
+
const NavBtn = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
40
40
|
componentId: "sc-sbwvud-3"
|
|
41
41
|
})(["height:calc(100% - 2px);border:none;border-radius:", ";"], ({
|
|
42
42
|
last
|
|
@@ -52,41 +52,41 @@ const RightButtonsGroup = props => {
|
|
|
52
52
|
} = props;
|
|
53
53
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
54
54
|
children: [!hideNavs && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
55
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
55
|
+
children: [/*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
56
56
|
buttonType: "text",
|
|
57
57
|
containerProps: {
|
|
58
58
|
'data-testid': 'ds-navsearchbox-next'
|
|
59
59
|
},
|
|
60
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
60
|
+
icon: /*#__PURE__*/_jsx__default["default"](ChevronDown__default["default"], {
|
|
61
61
|
color: ['brand-primary', '800']
|
|
62
62
|
}),
|
|
63
63
|
onClick: onNext
|
|
64
|
-
}), /*#__PURE__*/_jsx__default[
|
|
64
|
+
}), /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
65
65
|
buttonType: "text",
|
|
66
66
|
containerProps: {
|
|
67
67
|
'data-testid': 'ds-navsearchbox-prev'
|
|
68
68
|
},
|
|
69
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
69
|
+
icon: /*#__PURE__*/_jsx__default["default"](ChevronUp__default["default"], {
|
|
70
70
|
color: ['brand-primary', '800']
|
|
71
71
|
}),
|
|
72
72
|
onClick: onPrevious
|
|
73
73
|
})]
|
|
74
|
-
}), showClear ? /*#__PURE__*/_jsx__default[
|
|
74
|
+
}), showClear ? /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
75
75
|
containerProps: {
|
|
76
76
|
'data-testid': 'ds-navsearchbox-clear'
|
|
77
77
|
},
|
|
78
78
|
buttonType: "text",
|
|
79
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
79
|
+
icon: /*#__PURE__*/_jsx__default["default"](CloseXsmall__default["default"], {
|
|
80
80
|
color: ['brand-primary', '800']
|
|
81
81
|
}),
|
|
82
82
|
onClick: onClear,
|
|
83
83
|
last: true
|
|
84
|
-
}) : /*#__PURE__*/_jsx__default[
|
|
84
|
+
}) : /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
85
85
|
containerProps: {
|
|
86
86
|
'data-testid': 'ds-navsearchbox-clear'
|
|
87
87
|
},
|
|
88
88
|
buttonType: "text",
|
|
89
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
89
|
+
icon: /*#__PURE__*/_jsx__default["default"](SearchIcon__default["default"], {
|
|
90
90
|
color: ['brand-primary', '800']
|
|
91
91
|
}),
|
|
92
92
|
last: true
|
|
@@ -100,11 +100,11 @@ const ResultTracker = props => {
|
|
|
100
100
|
totalResults
|
|
101
101
|
} = props;
|
|
102
102
|
if (currentResultIndex === -1 && !totalResults) return null;
|
|
103
|
-
if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx__default[
|
|
104
|
-
return /*#__PURE__*/_jsx__default[
|
|
103
|
+
if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, totalResults);
|
|
104
|
+
return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, `${currentResultIndex + 1} / ${totalResults}`);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx__default[
|
|
107
|
+
const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx__default["default"](StyledVerticalSeparator, {}));
|
|
108
108
|
|
|
109
109
|
const ToolbarRightAddons = props => {
|
|
110
110
|
const {
|
|
@@ -115,10 +115,10 @@ const ToolbarRightAddons = props => {
|
|
|
115
115
|
totalResults,
|
|
116
116
|
showClear
|
|
117
117
|
} = props;
|
|
118
|
-
return /*#__PURE__*/_jsx__default[
|
|
118
|
+
return /*#__PURE__*/_jsx__default["default"](StyledToolbarRightAddonsWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](ResultTracker, {
|
|
119
119
|
currentResultIndex: currentResultIndex,
|
|
120
120
|
totalResults: totalResults
|
|
121
|
-
}), currentResultIndex !== -1 || totalResults ? _VerticalSeparator || (_VerticalSeparator = /*#__PURE__*/_jsx__default[
|
|
121
|
+
}), currentResultIndex !== -1 || totalResults ? _VerticalSeparator || (_VerticalSeparator = /*#__PURE__*/_jsx__default["default"](VerticalSeparator, {})) : null, /*#__PURE__*/_jsx__default["default"](RightButtonsGroup, {
|
|
122
122
|
onNext: onNext,
|
|
123
123
|
hideNavs: currentResultIndex === -1 && !totalResults,
|
|
124
124
|
onPrevious: onPrevious,
|
|
@@ -159,7 +159,7 @@ const NavSearchBox = props => {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
-
return /*#__PURE__*/_jsx__default[
|
|
162
|
+
return /*#__PURE__*/_jsx__default["default"](DSTextBox["default"], {
|
|
163
163
|
onChange: handleChange,
|
|
164
164
|
containerProps: {
|
|
165
165
|
'data-testid': 'ds-nav-searchbox-input'
|
|
@@ -168,7 +168,7 @@ const NavSearchBox = props => {
|
|
|
168
168
|
onKeyDown: handleKeyDown,
|
|
169
169
|
placeholder: placeholder,
|
|
170
170
|
value: value,
|
|
171
|
-
rightComponent: /*#__PURE__*/_jsx__default[
|
|
171
|
+
rightComponent: /*#__PURE__*/_jsx__default["default"](ToolbarRightAddons, {
|
|
172
172
|
showClear: !!value,
|
|
173
173
|
onNext: onNext,
|
|
174
174
|
onPrevious: onPrevious,
|
package/cjs/SearchBox/SButton.js
CHANGED
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
14
|
|
|
15
|
-
const Button = /*#__PURE__*/styled__default[
|
|
15
|
+
const Button = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
16
16
|
componentId: "sc-15udc15-0"
|
|
17
17
|
})(["all:unset;position:absolute;height:calc(100% - 2px);width:28px;top:1px;right:1px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;cursor:pointer;z-index:1;svg{fill:", ";}&:disabled{color:#5d6775;cursor:not-allowed;svg{fill:#5d6775;}}&:focus{", "}"], props => props.theme.colors.brand['600'], dsSystem.focus());
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@ const SButton = ({
|
|
|
21
21
|
disabled,
|
|
22
22
|
onClick,
|
|
23
23
|
dataTestid = "ds-searchbox-button"
|
|
24
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
24
|
+
}) => /*#__PURE__*/_jsx__default["default"](Button, {
|
|
25
25
|
"data-testid": dataTestid,
|
|
26
26
|
onClick: onClick,
|
|
27
27
|
disabled: disabled,
|
|
@@ -25,9 +25,9 @@ const _excluded = ["onSearchButtonClick", "width"];
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
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[
|
|
28
|
+
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; }
|
|
29
29
|
const SEARCH_BUTTON_WIDTH = 26;
|
|
30
|
-
const SearchWrap = /*#__PURE__*/styled__default[
|
|
30
|
+
const SearchWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
31
|
componentId: "sc-xt33wm-0"
|
|
32
32
|
})(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ? `
|
|
33
33
|
opacity:0;
|
|
@@ -44,28 +44,28 @@ const SearchBoxToggle = _ref => {
|
|
|
44
44
|
onSearchButtonClick,
|
|
45
45
|
width
|
|
46
46
|
} = _ref,
|
|
47
|
-
rest = _objectWithoutProperties__default[
|
|
47
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
48
48
|
|
|
49
49
|
const [isOpen, setOpen] = React.useState(false);
|
|
50
50
|
const [show, setShow] = React.useState(true);
|
|
51
51
|
const computedWidth = typeof width === 'number' ? `${width}px` : width;
|
|
52
52
|
|
|
53
|
-
const button = /*#__PURE__*/_jsx__default[
|
|
53
|
+
const button = /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
54
54
|
onClick: () => {
|
|
55
55
|
setOpen(true);
|
|
56
56
|
},
|
|
57
57
|
buttonType: "text",
|
|
58
|
-
icon: _SearchIcon || (_SearchIcon = /*#__PURE__*/_jsx__default[
|
|
58
|
+
icon: _SearchIcon || (_SearchIcon = /*#__PURE__*/_jsx__default["default"](SearchIcon__default["default"], {}))
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
return /*#__PURE__*/_jsx__default[
|
|
61
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, show && !isOpen && button, /*#__PURE__*/_jsx__default["default"](SearchWrap, {
|
|
62
62
|
show: !show || isOpen,
|
|
63
63
|
isOpen: isOpen,
|
|
64
64
|
width: computedWidth,
|
|
65
65
|
onTransitionEnd: () => {
|
|
66
66
|
setShow(!isOpen);
|
|
67
67
|
}
|
|
68
|
-
}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSSearchBox[
|
|
68
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSSearchBox["default"], _objectSpread(_objectSpread({}, rest), {}, {
|
|
69
69
|
onSearchButtonClick: () => {
|
|
70
70
|
onSearchButtonClick();
|
|
71
71
|
setOpen(false);
|
package/cjs/SearchBox/index.js
CHANGED
|
@@ -10,6 +10,6 @@ var NavSearchBox = require('./NavSearchBox.js');
|
|
|
10
10
|
|
|
11
11
|
exports.SearchBoxToggle = SearchBoxToggle;
|
|
12
12
|
exports.SearchBoxWithSchema = DSSearchBox.SearchBoxWithSchema;
|
|
13
|
-
exports
|
|
13
|
+
exports["default"] = DSSearchBox["default"];
|
|
14
14
|
exports.DSNavSearchBox = NavSearchBox.NavSearchBox;
|
|
15
15
|
exports.DSNavSearchBoxWithSchema = NavSearchBox.DSNavSearchBoxWithSchema;
|
package/cjs/SearchBox/styled.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
const SearchBoxTextBox = /*#__PURE__*/styled__default[
|
|
12
|
+
const SearchBoxTextBox = /*#__PURE__*/styled__default["default"](DSTextBox["default"]).withConfig({
|
|
13
13
|
componentId: "sc-44ofm-0"
|
|
14
14
|
})(["padding-right:33px;"]);
|
|
15
15
|
|
|
@@ -16,14 +16,14 @@ const _excluded = ["containerProps"];
|
|
|
16
16
|
|
|
17
17
|
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; }
|
|
18
18
|
|
|
19
|
-
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[
|
|
19
|
+
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; }
|
|
20
20
|
|
|
21
21
|
const withSearchable = WrappedComponent => {
|
|
22
22
|
class Searchable extends React.Component {
|
|
23
23
|
constructor(props) {
|
|
24
24
|
super(props);
|
|
25
25
|
|
|
26
|
-
_defineProperty__default[
|
|
26
|
+
_defineProperty__default["default"](this, "debouncedSearch", utils.debounce(this.handleSearch, 200));
|
|
27
27
|
|
|
28
28
|
this.state = {
|
|
29
29
|
value: props.value
|
|
@@ -31,7 +31,7 @@ const withSearchable = WrappedComponent => {
|
|
|
31
31
|
this.handleSearch = this.handleSearch.bind(this);
|
|
32
32
|
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
33
33
|
this.handleChange = this.handleChange.bind(this);
|
|
34
|
-
this.buttonRef = /*#__PURE__*/React__default[
|
|
34
|
+
this.buttonRef = /*#__PURE__*/React__default["default"].createRef();
|
|
35
35
|
this.handleChange = this.handleChange.bind(this);
|
|
36
36
|
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
37
37
|
this.handleSearch = this.handleSearch.bind(this);
|
|
@@ -116,7 +116,7 @@ const withSearchable = WrappedComponent => {
|
|
|
116
116
|
{
|
|
117
117
|
containerProps
|
|
118
118
|
} = _this$props,
|
|
119
|
-
rest = _objectWithoutProperties__default[
|
|
119
|
+
rest = _objectWithoutProperties__default["default"](_this$props, _excluded);
|
|
120
120
|
|
|
121
121
|
return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, _objectSpread(_objectSpread({}, rest), {}, {
|
|
122
122
|
buttonRef: this.buttonRef,
|
package/cjs/TextBox/DSTextBox.js
CHANGED
|
@@ -18,7 +18,7 @@ const _excluded = ["containerProps", "autoFocus", "disabled", "maxLength", "minL
|
|
|
18
18
|
|
|
19
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
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__default[
|
|
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__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
22
|
|
|
23
23
|
const DSTextBox = _ref => {
|
|
24
24
|
let {
|
|
@@ -44,9 +44,9 @@ const DSTextBox = _ref => {
|
|
|
44
44
|
disableTooltip,
|
|
45
45
|
id
|
|
46
46
|
} = _ref,
|
|
47
|
-
otherProps = _objectWithoutProperties__default[
|
|
47
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
48
48
|
|
|
49
|
-
return /*#__PURE__*/jsxRuntime.jsx(DSInput[
|
|
49
|
+
return /*#__PURE__*/jsxRuntime.jsx(DSInput["default"], _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
50
50
|
"aria-label": !id ? otherProps['aria-label'] || 'Text Box' : undefined,
|
|
51
51
|
"aria-describedby": otherProps['aria-describedby'] || `${id}_feedback_message`,
|
|
52
52
|
autoFocus: autoFocus,
|
|
@@ -172,4 +172,4 @@ const DSTextBoxWithSchema = reactDesc.describe(DSTextBox);
|
|
|
172
172
|
DSTextBoxWithSchema.propTypes = props;
|
|
173
173
|
|
|
174
174
|
exports.DSTextBoxWithSchema = DSTextBoxWithSchema;
|
|
175
|
-
exports[
|
|
175
|
+
exports["default"] = DSTextBox;
|
package/cjs/TextBox/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const _excluded = ["onChange"];
|
|
|
21
21
|
|
|
22
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
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[
|
|
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; }
|
|
25
25
|
|
|
26
26
|
const DSTimeInput = ({
|
|
27
27
|
containerProps = {},
|
|
@@ -34,7 +34,7 @@ const DSTimeInput = ({
|
|
|
34
34
|
clearable = false,
|
|
35
35
|
disabled = false,
|
|
36
36
|
ariaLabel = 'Time input'
|
|
37
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
37
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSInput["default"], {
|
|
38
38
|
className: className,
|
|
39
39
|
clearable: clearable,
|
|
40
40
|
containerProps: containerProps,
|
|
@@ -42,7 +42,7 @@ const DSTimeInput = ({
|
|
|
42
42
|
let {
|
|
43
43
|
onChange: inputOnChange
|
|
44
44
|
} = _ref,
|
|
45
|
-
restInputProps = _objectWithoutProperties__default[
|
|
45
|
+
restInputProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
46
46
|
|
|
47
47
|
return /*#__PURE__*/jsxRuntime.jsx(TimeInputImpl, _objectSpread(_objectSpread({
|
|
48
48
|
"aria-label": ariaLabel,
|
|
@@ -119,4 +119,4 @@ DSTimeInputWithSchema.propTypes = props;
|
|
|
119
119
|
|
|
120
120
|
exports.TimeInputImpl = TimeInputImpl;
|
|
121
121
|
exports.DSTimeInputWithSchema = DSTimeInputWithSchema;
|
|
122
|
-
exports[
|
|
122
|
+
exports["default"] = DSTimeInput;
|
|
@@ -17,7 +17,7 @@ var memoize__default = /*#__PURE__*/_interopDefaultLegacy(memoize);
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
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[
|
|
20
|
+
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
21
|
const blockName = 'input-time';
|
|
22
22
|
const InputTimeContainer = dsClassnames.aggregatedClasses('div')(blockName);
|
|
23
23
|
|
|
@@ -31,7 +31,7 @@ const TimeInputImpl = ({
|
|
|
31
31
|
clearable,
|
|
32
32
|
'arial-label': ariaLabel
|
|
33
33
|
}) => {
|
|
34
|
-
const getVisibleTimeInputs = memoize__default[
|
|
34
|
+
const getVisibleTimeInputs = memoize__default["default"](formatValue => timeUtils.getVisibleTimeByFormat(formatValue));
|
|
35
35
|
let inputsContainer = React.useRef();
|
|
36
36
|
|
|
37
37
|
const handleFocus = e => {
|
|
@@ -41,7 +41,7 @@ const TimeInputImpl = ({
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const visibleInputs = React.useMemo(() => getVisibleTimeInputs(format));
|
|
44
|
-
return /*#__PURE__*/_jsx__default[
|
|
44
|
+
return /*#__PURE__*/_jsx__default["default"](InputTimeContainer, {
|
|
45
45
|
className: className,
|
|
46
46
|
disabled: disabled,
|
|
47
47
|
innerRef: innerRef,
|
|
@@ -17,7 +17,7 @@ var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
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[
|
|
20
|
+
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
21
|
const blockName = 'input-times-group';
|
|
22
22
|
const InputTimesGroup = dsClassnames.aggregatedClasses('div')(blockName);
|
|
23
23
|
const TimeInput = dsClassnames.aggregatedClasses('input')(blockName, 'input');
|
|
@@ -30,7 +30,7 @@ const Divider = dsClassnames.aggregatedClasses('span')(blockName, 'divider', ({
|
|
|
30
30
|
const TimeDivider = ({
|
|
31
31
|
content = ':',
|
|
32
32
|
value = ''
|
|
33
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
33
|
+
}) => /*#__PURE__*/_jsx__default["default"](Divider, {
|
|
34
34
|
value: !!value
|
|
35
35
|
}, void 0, content);
|
|
36
36
|
|
|
@@ -58,7 +58,7 @@ const TimeInputs = ({
|
|
|
58
58
|
const [hasInputBeenTriggered, setHasInputBeenTriggered] = React.useState(false);
|
|
59
59
|
const [lastTypedNumber, setLastTypedNumber] = React.useState(null);
|
|
60
60
|
React.useEffect(() => {
|
|
61
|
-
if (time && moment__default[
|
|
61
|
+
if (time && moment__default["default"](time).isValid()) {
|
|
62
62
|
const timeValues = utils.getTimeValuesFromTime(time, format, use12Hours);
|
|
63
63
|
setMeridiem(timeValues.meridiem);
|
|
64
64
|
setHours(timeValues.hours);
|
|
@@ -72,7 +72,7 @@ const TimeInputs = ({
|
|
|
72
72
|
}
|
|
73
73
|
}, [time, format, use12Hours]);
|
|
74
74
|
React.useEffect(() => {
|
|
75
|
-
const selectedTime = time || moment__default[
|
|
75
|
+
const selectedTime = time || moment__default["default"]();
|
|
76
76
|
|
|
77
77
|
if (isTimeCompletelySet() && selectedTime.hours && hasInputBeenTriggered) {
|
|
78
78
|
if (showHours && hours) selectedTime.hours(hours);
|
|
@@ -252,7 +252,7 @@ const TimeInputs = ({
|
|
|
252
252
|
};
|
|
253
253
|
|
|
254
254
|
const handleOnBlur = event => {
|
|
255
|
-
const selectedTime = moment__default[
|
|
255
|
+
const selectedTime = moment__default["default"]();
|
|
256
256
|
|
|
257
257
|
if (clearable && !event.currentTarget.contains(event.relatedTarget)) {
|
|
258
258
|
if (showHours && hours) selectedTime.hours(hours);
|
|
@@ -332,20 +332,20 @@ const TimeInputs = ({
|
|
|
332
332
|
const inputs = [renderHoursInput(), renderMinutesInput(), renderSecondsInput()];
|
|
333
333
|
/* eslint-disable indent */
|
|
334
334
|
|
|
335
|
-
const inputsWithDividers = inputs.reduce((acc, input, index) => input ? acc.concat([index ? /*#__PURE__*/_jsx__default[
|
|
335
|
+
const inputsWithDividers = inputs.reduce((acc, input, index) => input ? acc.concat([index ? /*#__PURE__*/_jsx__default["default"](TimeDivider // eslint-disable-next-line react/no-array-index-key
|
|
336
336
|
, {
|
|
337
337
|
content: ":",
|
|
338
338
|
value: input.props.value
|
|
339
339
|
}, index) : null, input]) : acc, []);
|
|
340
340
|
/* eslint-enable indent */
|
|
341
341
|
|
|
342
|
-
return [inputsWithDividers, /*#__PURE__*/React__default[
|
|
342
|
+
return [inputsWithDividers, /*#__PURE__*/React__default["default"].createElement('span', {
|
|
343
343
|
key: 'span'
|
|
344
344
|
}), // hack for next/prev focus
|
|
345
345
|
renderMeridiemInput()];
|
|
346
346
|
};
|
|
347
347
|
|
|
348
|
-
return /*#__PURE__*/_jsx__default[
|
|
348
|
+
return /*#__PURE__*/_jsx__default["default"](InputTimesGroup, {
|
|
349
349
|
onBlur: handleOnBlur,
|
|
350
350
|
innerRef: innerRef
|
|
351
351
|
}, void 0, renderTimeInputs());
|
package/cjs/TimeInput/index.js
CHANGED
package/cjs/Toggle/DSToggle.js
CHANGED
|
@@ -19,7 +19,7 @@ const _excluded = ["containerProps", "hasError", "readOnly", "disabled", "checke
|
|
|
19
19
|
|
|
20
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
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__default[
|
|
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__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; }
|
|
23
23
|
|
|
24
24
|
const DSToggle = _ref => {
|
|
25
25
|
let {
|
|
@@ -34,7 +34,7 @@ const DSToggle = _ref => {
|
|
|
34
34
|
value,
|
|
35
35
|
size
|
|
36
36
|
} = _ref,
|
|
37
|
-
otherProps = _objectWithoutProperties__default[
|
|
37
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
38
38
|
|
|
39
39
|
return /*#__PURE__*/jsxRuntime.jsx(DSToggleImpl, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
40
40
|
checked: checked,
|
|
@@ -119,4 +119,4 @@ const DSToggleWithSchema = reactDesc.describe(DSToggle);
|
|
|
119
119
|
DSToggleWithSchema.propTypes = props;
|
|
120
120
|
|
|
121
121
|
exports.DSToggleWithSchema = DSToggleWithSchema;
|
|
122
|
-
exports[
|
|
122
|
+
exports["default"] = DSToggle;
|