@elliemae/ds-form 3.15.0 → 3.16.0-next.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/dist/cjs/CheckboxGroup/DSCheckboxGroup.js +6 -6
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
- package/dist/cjs/CheckboxGroup/index.js +1 -1
- package/dist/cjs/CheckboxGroup/index.js.map +2 -2
- package/dist/cjs/CheckboxGroup/props.js +13 -13
- package/dist/cjs/CheckboxGroup/props.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +5 -5
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/index.js +1 -1
- package/dist/cjs/ComboBoxFreeSolo/index.js.map +2 -2
- package/dist/cjs/DateInput/DSDateInput.js +6 -5
- package/dist/cjs/DateInput/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInput/components/DateInputImpl.js +1 -1
- package/dist/cjs/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/cjs/DateInput/components/DateInputs.js +1 -1
- package/dist/cjs/DateInput/components/DateInputs.js.map +1 -1
- package/dist/cjs/DateInput/index.js +1 -1
- package/dist/cjs/DateInput/index.js.map +2 -2
- package/dist/cjs/DateInput/props.js +17 -17
- package/dist/cjs/DateInput/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DSDateInput.js +5 -5
- package/dist/cjs/DateInputV2/components/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DateInputs.js +6 -4
- package/dist/cjs/DateInputV2/components/DateInputs.js.map +2 -2
- package/dist/cjs/DateInputV2/components/helpers.js +1 -1
- package/dist/cjs/DateInputV2/components/helpers.js.map +1 -1
- package/dist/cjs/DateInputV2/components/props.js +11 -11
- package/dist/cjs/DateInputV2/components/props.js.map +2 -2
- package/dist/cjs/DateInputV2/index.js +2 -2
- package/dist/cjs/DateInputV2/index.js.map +2 -2
- package/dist/cjs/ExpandableInput/DSExpandableInput.js +1 -1
- package/dist/cjs/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js +1 -1
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/cjs/ExpandableInput/index.js +1 -1
- package/dist/cjs/ExpandableInput/index.js.map +2 -2
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js +3 -3
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/index.js +1 -1
- package/dist/cjs/FloatingLabelInput/index.js.map +2 -2
- package/dist/cjs/FormItem/DSFormItemLayout.js +10 -8
- package/dist/cjs/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/cjs/FormItem/Error/DSError.js +4 -4
- package/dist/cjs/FormItem/Error/DSError.js.map +2 -2
- package/dist/cjs/FormItem/Label/DSLabel.js +1 -1
- package/dist/cjs/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/cjs/FormItem/defaultProps.js +4 -4
- package/dist/cjs/FormItem/defaultProps.js.map +1 -1
- package/dist/cjs/FormItem/index.js +2 -2
- package/dist/cjs/FormItem/index.js.map +1 -1
- package/dist/cjs/FormItem/props.js +45 -45
- package/dist/cjs/FormItem/props.js.map +2 -2
- package/dist/cjs/InputGroup/DSInputGroup.js +20 -16
- package/dist/cjs/InputGroup/DSInputGroup.js.map +2 -2
- package/dist/cjs/InputGroup/index.js +1 -1
- package/dist/cjs/InputGroup/index.js.map +1 -1
- package/dist/cjs/InputGroup/props.js +8 -8
- package/dist/cjs/InputGroup/props.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMask.js +9 -7
- package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js +2 -2
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/cjs/InputMask/InputMaskContext.js.map +1 -1
- package/dist/cjs/InputMask/MaskPipes.js +1 -1
- package/dist/cjs/InputMask/MaskPipes.js.map +1 -1
- package/dist/cjs/InputMask/defaultProps.js +1 -1
- package/dist/cjs/InputMask/defaultProps.js.map +1 -1
- package/dist/cjs/InputMask/index.js +1 -1
- package/dist/cjs/InputMask/index.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/index.js +9 -9
- package/dist/cjs/InputMask/mask_types/index.js.map +1 -1
- package/dist/cjs/InputMask/props.js +31 -31
- package/dist/cjs/InputMask/props.js.map +2 -2
- package/dist/cjs/InputProtected/DSInputProtected.js +8 -6
- package/dist/cjs/InputProtected/DSInputProtected.js.map +2 -2
- package/dist/cjs/InputProtected/defaultProps.js +1 -1
- package/dist/cjs/InputProtected/defaultProps.js.map +1 -1
- package/dist/cjs/InputProtected/index.js +2 -2
- package/dist/cjs/InputProtected/index.js.map +2 -2
- package/dist/cjs/InputProtected/props.js +10 -10
- package/dist/cjs/InputProtected/props.js.map +2 -2
- package/dist/cjs/LargeInputText/DSLargeInputText.js +5 -3
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/cjs/LargeInputText/index.js +1 -1
- package/dist/cjs/LargeInputText/index.js.map +1 -1
- package/dist/cjs/LargeInputText/props.js +28 -28
- package/dist/cjs/LargeInputText/props.js.map +2 -2
- package/dist/cjs/Radio/DSRadio.js +18 -16
- package/dist/cjs/Radio/DSRadio.js.map +2 -2
- package/dist/cjs/Radio/index.js +1 -1
- package/dist/cjs/Radio/index.js.map +2 -2
- package/dist/cjs/RadioGroup/DSRadioGroup.js +6 -6
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
- package/dist/cjs/RadioGroup/index.js +1 -1
- package/dist/cjs/RadioGroup/index.js.map +2 -2
- package/dist/cjs/RadioGroup/props.js +11 -11
- package/dist/cjs/RadioGroup/props.js.map +2 -2
- package/dist/cjs/RequiredMark/index.js +1 -1
- package/dist/cjs/RequiredMark/index.js.map +2 -2
- package/dist/cjs/TimeInput/DSTimeInput.js +15 -15
- package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/cjs/TimeInput/TimeInputImpl.js +1 -1
- package/dist/cjs/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/cjs/TimeInput/TimeInputs.js +1 -1
- package/dist/cjs/TimeInput/TimeInputs.js.map +1 -1
- package/dist/cjs/TimeInput/index.js +1 -1
- package/dist/cjs/TimeInput/index.js.map +2 -2
- package/dist/cjs/Toggle/DSToggle.js +33 -29
- package/dist/cjs/Toggle/DSToggle.js.map +2 -2
- package/dist/cjs/Toggle/DSToggleImpl.js +3 -3
- package/dist/cjs/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/cjs/Toggle/index.js +1 -1
- package/dist/cjs/Toggle/index.js.map +1 -1
- package/dist/cjs/index.js +21 -21
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js +5 -5
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/esm/CheckboxGroup/index.js +1 -1
- package/dist/esm/CheckboxGroup/index.js.map +1 -1
- package/dist/esm/CheckboxGroup/props.js +2 -2
- package/dist/esm/CheckboxGroup/props.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +5 -5
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/index.js +1 -1
- package/dist/esm/ComboBoxFreeSolo/index.js.map +1 -1
- package/dist/esm/DateInput/DSDateInput.js +6 -5
- package/dist/esm/DateInput/DSDateInput.js.map +2 -2
- package/dist/esm/DateInput/components/DateInputImpl.js +1 -1
- package/dist/esm/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/esm/DateInput/components/DateInputs.js +1 -1
- package/dist/esm/DateInput/components/DateInputs.js.map +1 -1
- package/dist/esm/DateInput/index.js +1 -1
- package/dist/esm/DateInput/index.js.map +1 -1
- package/dist/esm/DateInput/props.js +1 -1
- package/dist/esm/DateInput/props.js.map +1 -1
- package/dist/esm/DateInputV2/components/DSDateInput.js +4 -4
- package/dist/esm/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/esm/DateInputV2/components/DateInputs.js +6 -4
- package/dist/esm/DateInputV2/components/DateInputs.js.map +2 -2
- package/dist/esm/DateInputV2/components/helpers.js +1 -1
- package/dist/esm/DateInputV2/components/helpers.js.map +1 -1
- package/dist/esm/DateInputV2/components/props.js +1 -1
- package/dist/esm/DateInputV2/components/props.js.map +1 -1
- package/dist/esm/DateInputV2/index.js +2 -2
- package/dist/esm/DateInputV2/index.js.map +1 -1
- package/dist/esm/ExpandableInput/DSExpandableInput.js +1 -1
- package/dist/esm/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/esm/ExpandableInput/ExpandableInputImpl.js +1 -1
- package/dist/esm/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/esm/ExpandableInput/index.js +1 -1
- package/dist/esm/ExpandableInput/index.js.map +1 -1
- package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js +3 -3
- package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/esm/FloatingLabelInput/index.js +1 -1
- package/dist/esm/FloatingLabelInput/index.js.map +1 -1
- package/dist/esm/FormItem/DSFormItemLayout.js +10 -8
- package/dist/esm/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/esm/FormItem/Error/DSError.js +1 -1
- package/dist/esm/FormItem/Error/DSError.js.map +1 -1
- package/dist/esm/FormItem/Label/DSLabel.js +1 -1
- package/dist/esm/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/esm/FormItem/defaultProps.js +4 -4
- package/dist/esm/FormItem/defaultProps.js.map +1 -1
- package/dist/esm/FormItem/index.js +2 -2
- package/dist/esm/FormItem/index.js.map +1 -1
- package/dist/esm/FormItem/props.js +2 -2
- package/dist/esm/FormItem/props.js.map +1 -1
- package/dist/esm/InputGroup/DSInputGroup.js +20 -16
- package/dist/esm/InputGroup/DSInputGroup.js.map +2 -2
- package/dist/esm/InputGroup/index.js +1 -1
- package/dist/esm/InputGroup/index.js.map +1 -1
- package/dist/esm/InputGroup/props.js +1 -1
- package/dist/esm/InputGroup/props.js.map +1 -1
- package/dist/esm/InputMask/DSInputMask.js +9 -7
- package/dist/esm/InputMask/DSInputMask.js.map +2 -2
- package/dist/esm/InputMask/DSInputMaskDeprecated.js +2 -2
- package/dist/esm/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/esm/InputMask/InputMaskContext.js.map +1 -1
- package/dist/esm/InputMask/MaskPipes.js +1 -1
- package/dist/esm/InputMask/MaskPipes.js.map +1 -1
- package/dist/esm/InputMask/defaultProps.js +1 -1
- package/dist/esm/InputMask/defaultProps.js.map +1 -1
- package/dist/esm/InputMask/index.js +1 -1
- package/dist/esm/InputMask/index.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/index.js +9 -9
- package/dist/esm/InputMask/mask_types/index.js.map +1 -1
- package/dist/esm/InputMask/props.js +1 -1
- package/dist/esm/InputMask/props.js.map +1 -1
- package/dist/esm/InputProtected/DSInputProtected.js +8 -6
- package/dist/esm/InputProtected/DSInputProtected.js.map +2 -2
- package/dist/esm/InputProtected/defaultProps.js +1 -1
- package/dist/esm/InputProtected/defaultProps.js.map +1 -1
- package/dist/esm/InputProtected/index.js +2 -2
- package/dist/esm/InputProtected/index.js.map +1 -1
- package/dist/esm/InputProtected/props.js +2 -2
- package/dist/esm/InputProtected/props.js.map +1 -1
- package/dist/esm/LargeInputText/DSLargeInputText.js +5 -3
- package/dist/esm/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/esm/LargeInputText/index.js +1 -1
- package/dist/esm/LargeInputText/index.js.map +1 -1
- package/dist/esm/LargeInputText/props.js +1 -1
- package/dist/esm/LargeInputText/props.js.map +1 -1
- package/dist/esm/Radio/DSRadio.js +4 -2
- package/dist/esm/Radio/DSRadio.js.map +2 -2
- package/dist/esm/Radio/index.js +1 -1
- package/dist/esm/Radio/index.js.map +1 -1
- package/dist/esm/RadioGroup/DSRadioGroup.js +5 -5
- package/dist/esm/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/esm/RadioGroup/index.js +1 -1
- package/dist/esm/RadioGroup/index.js.map +1 -1
- package/dist/esm/RadioGroup/props.js +1 -1
- package/dist/esm/RadioGroup/props.js.map +1 -1
- package/dist/esm/RequiredMark/index.js +1 -1
- package/dist/esm/RequiredMark/index.js.map +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js +3 -3
- package/dist/esm/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputImpl.js +1 -1
- package/dist/esm/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputs.js +1 -1
- package/dist/esm/TimeInput/TimeInputs.js.map +1 -1
- package/dist/esm/TimeInput/index.js +1 -1
- package/dist/esm/TimeInput/index.js.map +1 -1
- package/dist/esm/Toggle/DSToggle.js +22 -18
- package/dist/esm/Toggle/DSToggle.js.map +2 -2
- package/dist/esm/Toggle/DSToggleImpl.js +3 -3
- package/dist/esm/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/esm/Toggle/index.js +1 -1
- package/dist/esm/Toggle/index.js.map +1 -1
- package/dist/esm/index.js +21 -21
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/package.json +16 -15
- package/dist/types/Checkbox/index.d.ts +0 -1
- package/dist/types/CheckboxGroup/DSCheckboxGroup.d.ts +0 -46
- package/dist/types/CheckboxGroup/defaultProps.d.ts +0 -14
- package/dist/types/CheckboxGroup/index.d.ts +0 -1
- package/dist/types/CheckboxGroup/props.d.ts +0 -26
- package/dist/types/CheckboxGroup/tests/DSCheckboxGroup.events.test.d.ts +0 -1
- package/dist/types/ComboBox/index.d.ts +0 -1
- package/dist/types/ComboBoxFreeSolo/ComboBoxFreeSolo.d.ts +0 -78
- package/dist/types/ComboBoxFreeSolo/components/MultiValueLabel.d.ts +0 -5
- package/dist/types/ComboBoxFreeSolo/components/MultiValueRemove.d.ts +0 -5
- package/dist/types/ComboBoxFreeSolo/components/SingleValue.d.ts +0 -2
- package/dist/types/ComboBoxFreeSolo/components/SingleValueRemove.d.ts +0 -5
- package/dist/types/ComboBoxFreeSolo/index.d.ts +0 -1
- package/dist/types/DateInput/DSDateInput.d.ts +0 -62
- package/dist/types/DateInput/components/DateInputImpl.d.ts +0 -40
- package/dist/types/DateInput/components/DateInputs.d.ts +0 -40
- package/dist/types/DateInput/components/utils.d.ts +0 -40
- package/dist/types/DateInput/defaultProps.d.ts +0 -18
- package/dist/types/DateInput/index.d.ts +0 -1
- package/dist/types/DateInput/props.d.ts +0 -60
- package/dist/types/DateInput/tests/DSDateInput.events.test.d.ts +0 -1
- package/dist/types/DateInputV2/components/DSDateInput.d.ts +0 -54
- package/dist/types/DateInputV2/components/DateInputs.d.ts +0 -32
- package/dist/types/DateInputV2/components/helpers.d.ts +0 -1
- package/dist/types/DateInputV2/components/props.d.ts +0 -53
- package/dist/types/DateInputV2/components/propsTypes.d.ts +0 -21
- package/dist/types/DateInputV2/components/styled.d.ts +0 -5
- package/dist/types/DateInputV2/components/utils.d.ts +0 -42
- package/dist/types/DateInputV2/index.d.ts +0 -2
- package/dist/types/DateInputV2/tests/DateInput.test.d.ts +0 -1
- package/dist/types/ExpandableInput/DSExpandableInput.d.ts +0 -15
- package/dist/types/ExpandableInput/ExpandableInputImpl.d.ts +0 -7
- package/dist/types/ExpandableInput/index.d.ts +0 -1
- package/dist/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +0 -47
- package/dist/types/FloatingLabelInput/FloatingLabelInputImpl.d.ts +0 -27
- package/dist/types/FloatingLabelInput/getSvgPath.d.ts +0 -10
- package/dist/types/FloatingLabelInput/index.d.ts +0 -1
- package/dist/types/FormItem/DSFormItemLayout.d.ts +0 -180
- package/dist/types/FormItem/Error/DSError.d.ts +0 -19
- package/dist/types/FormItem/Feedback.d.ts +0 -6
- package/dist/types/FormItem/Label/DSLabel.d.ts +0 -23
- package/dist/types/FormItem/Suffix/Suffix.d.ts +0 -4
- package/dist/types/FormItem/ValidationFieldWrapper.d.ts +0 -19
- package/dist/types/FormItem/defaultProps.d.ts +0 -51
- package/dist/types/FormItem/index.d.ts +0 -2
- package/dist/types/FormItem/props.d.ts +0 -80
- package/dist/types/FormItem/tests/DSFormItem.events.test.d.ts +0 -1
- package/dist/types/FormItem/variants.d.ts +0 -8
- package/dist/types/Input/DSInput.d.ts +0 -0
- package/dist/types/Input/InputAddonWrapper.d.ts +0 -0
- package/dist/types/Input/InputImpl.d.ts +0 -0
- package/dist/types/Input/index.d.ts +0 -1
- package/dist/types/Input/tests/Input.test.d.ts +0 -0
- package/dist/types/InputGroup/AddonWrapper.d.ts +0 -8
- package/dist/types/InputGroup/DSInputGroup.d.ts +0 -40
- package/dist/types/InputGroup/defaultProps.d.ts +0 -8
- package/dist/types/InputGroup/index.d.ts +0 -1
- package/dist/types/InputGroup/props.d.ts +0 -24
- package/dist/types/InputGroup/tests/DSInputGroup.events.test.d.ts +0 -1
- package/dist/types/InputMask/DSInputMask.d.ts +0 -85
- package/dist/types/InputMask/DSInputMaskDeprecated.d.ts +0 -18
- package/dist/types/InputMask/InputMaskContext.d.ts +0 -18
- package/dist/types/InputMask/MaskPipes.d.ts +0 -18
- package/dist/types/InputMask/MaskTypes.d.ts +0 -15
- package/dist/types/InputMask/addons/AutoCorrectedDatePipe.d.ts +0 -8
- package/dist/types/InputMask/defaultProps.d.ts +0 -28
- package/dist/types/InputMask/index.d.ts +0 -1
- package/dist/types/InputMask/mask_types/DateInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/DateTimeInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/DictionaryInputMask.d.ts +0 -39
- package/dist/types/InputMask/mask_types/NumberInputMask.d.ts +0 -48
- package/dist/types/InputMask/mask_types/PhoneInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/PhoneInternationalInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/SsnInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/UsZipCodeInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/ZipCodeSearchInputMask.d.ts +0 -36
- package/dist/types/InputMask/mask_types/index.d.ts +0 -41
- package/dist/types/InputMask/props.d.ts +0 -112
- package/dist/types/InputMask/tests/DSInputMask.test.d.ts +0 -1
- package/dist/types/InputMask/tests/NumberInputMask.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/DateInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/DateTimeInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/NumberInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/PercentInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/PhoneInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/PhoneInternationalInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/SsnInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/UsZipCodeInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/tests/events/ZipCodeSearchInputMask.events.test.d.ts +0 -1
- package/dist/types/InputMask/types/index.d.ts +0 -5
- package/dist/types/InputMask/utils/setCaretPosition.d.ts +0 -3
- package/dist/types/InputProtected/DSInputProtected.d.ts +0 -41
- package/dist/types/InputProtected/defaultProps.d.ts +0 -4
- package/dist/types/InputProtected/index.d.ts +0 -2
- package/dist/types/InputProtected/options.d.ts +0 -8
- package/dist/types/InputProtected/props.d.ts +0 -14
- package/dist/types/InputProtected/tests/DSInputProtected.events.test.d.ts +0 -1
- package/dist/types/InputProtected/tests/DSInputProtected.test.d.ts +0 -1
- package/dist/types/LargeInputText/DSLargeInputText.d.ts +0 -127
- package/dist/types/LargeInputText/defaultProps.d.ts +0 -31
- package/dist/types/LargeInputText/index.d.ts +0 -1
- package/dist/types/LargeInputText/props.d.ts +0 -95
- package/dist/types/LargeInputText/tests/DSLargeInputText.events.test.d.ts +0 -1
- package/dist/types/LargeInputText/tests/DSLargeInputText.test.d.ts +0 -1
- package/dist/types/MenuItem/components/MenuItem/index.d.ts +0 -0
- package/dist/types/MenuItem/components/MenuItem/styled.d.ts +0 -0
- package/dist/types/MenuItem/components/MultiMenuItem/MultiMenuItem.d.ts +0 -0
- package/dist/types/MenuItem/components/MultiMenuItem/styled.d.ts +0 -0
- package/dist/types/MenuItem/components/Section/index.d.ts +0 -0
- package/dist/types/MenuItem/components/Section/props.d.ts +0 -0
- package/dist/types/MenuItem/components/Section/styled.d.ts +0 -0
- package/dist/types/MenuItem/components/Separator/index.d.ts +0 -0
- package/dist/types/MenuItem/components/Separator/styled.d.ts +0 -0
- package/dist/types/MenuItem/components/SingleMenuItem/SingleMenuItem.d.ts +0 -0
- package/dist/types/MenuItem/components/SubmenuItem/index.d.ts +0 -0
- package/dist/types/MenuItem/components/SubmenuItem/styled.d.ts +0 -0
- package/dist/types/MenuItem/components/index.d.ts +0 -0
- package/dist/types/MenuItem/components/styled.d.ts +0 -0
- package/dist/types/MenuItem/index.d.ts +0 -0
- package/dist/types/MenuItem/props.d.ts +0 -0
- package/dist/types/Radio/Circle.d.ts +0 -8
- package/dist/types/Radio/DSRadio.d.ts +0 -87
- package/dist/types/Radio/index.d.ts +0 -1
- package/dist/types/RadioGroup/DSRadioGroup.d.ts +0 -46
- package/dist/types/RadioGroup/defaultProps.d.ts +0 -12
- package/dist/types/RadioGroup/index.d.ts +0 -1
- package/dist/types/RadioGroup/props.d.ts +0 -25
- package/dist/types/RadioGroup/tests/DSRadioGroup.events.test.d.ts +0 -1
- package/dist/types/RequiredMark/RequiredMark.d.ts +0 -6
- package/dist/types/RequiredMark/index.d.ts +0 -1
- package/dist/types/SearchBox/index.d.ts +0 -1
- package/dist/types/TextBox/index.d.ts +0 -1
- package/dist/types/TimeInput/DSTimeInput.d.ts +0 -71
- package/dist/types/TimeInput/TimeInputImpl.d.ts +0 -55
- package/dist/types/TimeInput/TimeInputs.d.ts +0 -17
- package/dist/types/TimeInput/index.d.ts +0 -1
- package/dist/types/TimeInput/utils.d.ts +0 -39
- package/dist/types/Toggle/DSToggle.d.ts +0 -86
- package/dist/types/Toggle/DSToggleImpl.d.ts +0 -61
- package/dist/types/Toggle/DSToggleRender.d.ts +0 -32
- package/dist/types/Toggle/index.d.ts +0 -1
- package/dist/types/Toggle/props.d.ts +0 -47
- package/dist/types/Toggle/toggleHelper.d.ts +0 -24
- package/dist/types/index.d.ts +0 -21
|
@@ -32,12 +32,12 @@ var React = __toESM(require("react"));
|
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_react = __toESM(require("react"));
|
|
34
34
|
var import_prop_types = __toESM(require("prop-types"));
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
37
|
-
var import_FormItem = require("../FormItem");
|
|
38
|
-
var import_Checkbox = require("../Checkbox");
|
|
39
|
-
var import_props = require("./props");
|
|
40
|
-
var import_defaultProps = require("./defaultProps");
|
|
37
|
+
var import_FormItem = require("../FormItem/index.js");
|
|
38
|
+
var import_Checkbox = require("../Checkbox/index.js");
|
|
39
|
+
var import_props = require("./props.js");
|
|
40
|
+
var import_defaultProps = require("./defaultProps.js");
|
|
41
41
|
const emClassPrefix = "em-ds";
|
|
42
42
|
const baseClass = `${emClassPrefix}-checkbox-group`;
|
|
43
43
|
const CheckboxItem = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -111,7 +111,7 @@ const noop = () => null;
|
|
|
111
111
|
DSCheckboxGroup.propTypes = import_props.props;
|
|
112
112
|
DSCheckboxGroup.defaultProps = import_defaultProps.defaultProps;
|
|
113
113
|
DSCheckboxGroup.displayName = "DSCheckboxGroup";
|
|
114
|
-
const DSCheckboxGroupWithSchema = (0,
|
|
114
|
+
const DSCheckboxGroupWithSchema = (0, import_ds_props_helpers.describe)(DSCheckboxGroup);
|
|
115
115
|
DSCheckboxGroupWithSchema.propTypes = import_props.props;
|
|
116
116
|
CheckboxItem.propTypes = {
|
|
117
117
|
checked: import_prop_types.default.bool,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/CheckboxGroup/DSCheckboxGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAhBN,mBAAkB;AAClB,wBAAsB;AACtB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem/index.js';\nimport { DSCheckbox } from '../Checkbox/index.js';\nimport { props as cprops } from './props.js';\nimport { defaultProps } from './defaultProps.js';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={context.activeValue && context.activeValue.indexOf(props.value) !== -1}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSCheckboxGroup = ({\n onChange,\n activeValue,\n children,\n disabled,\n orientation,\n truncateText,\n labelProps,\n containerProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} multiple onChange={onChange}>\n <div\n className={`${baseClass} ${baseClass}--${orientation}`}\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <CheckboxItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nconst noop = () => null;\n\nDSCheckboxGroup.propTypes = cprops;\nDSCheckboxGroup.defaultProps = defaultProps;\nDSCheckboxGroup.displayName = 'DSCheckboxGroup';\nconst DSCheckboxGroupWithSchema = describe(DSCheckboxGroup);\nDSCheckboxGroupWithSchema.propTypes = cprops;\n\nCheckboxItem.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n};\n\nCheckboxItem.defaultProps = {\n checked: false,\n disabled: false,\n onChange: noop,\n};\n\nexport { DSCheckboxGroup, DSCheckboxGroupWithSchema };\n// export default DSCheckboxGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAhBN,mBAAkB;AAClB,wBAAsB;AACtB,8BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,sBAA2B;AAC3B,mBAAgC;AAChC,0BAA6B;AAG7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,eAAe,CAAC,UACpB;AAAA,EAAC;AAAA;AAAA,IACC,QAAQ,CAAC,YACP;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,QAAQ,eAAe,QAAQ,YAAY,QAAQ,MAAM,KAAK,MAAM;AAAA,QAC7E,UAAU,QAAQ,YAAY,MAAM;AAAA,QACpC,UAAU,QAAQ;AAAA;AAAA,IACpB;AAAA;AAEJ;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,YAAY,CAAC;AACnB,QAAM,QAAQ,a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AAAA,EACvB,SAAS,kBAAAC,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,UAAU,kBAAAA,QAAU;AACtB;AAEA,aAAa,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AACZ;",
|
|
6
6
|
"names": ["React", "cprops", "PropTypes"]
|
|
7
7
|
}
|
|
@@ -22,5 +22,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var CheckboxGroup_exports = {};
|
|
23
23
|
module.exports = __toCommonJS(CheckboxGroup_exports);
|
|
24
24
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(CheckboxGroup_exports, require("./DSCheckboxGroup"), module.exports);
|
|
25
|
+
__reExport(CheckboxGroup_exports, require("./DSCheckboxGroup.js"), module.exports);
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/CheckboxGroup/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './DSCheckboxGroup';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAc,
|
|
4
|
+
"sourcesContent": ["export * from './DSCheckboxGroup.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAc,iCAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,25 +28,25 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
32
|
-
var import_Checkbox = require("../Checkbox");
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
|
+
var import_Checkbox = require("../Checkbox/index.js");
|
|
33
33
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
34
34
|
const props = {
|
|
35
|
-
onChange:
|
|
36
|
-
activeValue:
|
|
35
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the checkbox group changes"),
|
|
36
|
+
activeValue: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.array]).description(
|
|
37
37
|
"Default active value"
|
|
38
38
|
),
|
|
39
|
-
children:
|
|
40
|
-
|
|
41
|
-
type:
|
|
39
|
+
children: import_ds_props_helpers.PropTypes.arrayOf(
|
|
40
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
41
|
+
type: import_ds_props_helpers.PropTypes.oneOf([import_Checkbox.DSCheckbox])
|
|
42
42
|
})
|
|
43
43
|
).description("Checkbox group items to show of type DSCheckbox"),
|
|
44
|
-
disabled:
|
|
45
|
-
orientation:
|
|
46
|
-
labelProps:
|
|
47
|
-
feedbackMessage:
|
|
48
|
-
labelText:
|
|
49
|
-
required:
|
|
44
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the checkbox group is disabled or not"),
|
|
45
|
+
orientation: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
|
|
46
|
+
labelProps: import_ds_props_helpers.PropTypes.shape({
|
|
47
|
+
feedbackMessage: import_ds_props_helpers.PropTypes.string,
|
|
48
|
+
labelText: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]),
|
|
49
|
+
required: import_ds_props_helpers.PropTypes.bool
|
|
50
50
|
}).description("label props")
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/CheckboxGroup/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSCheckbox } from '../Checkbox/index.js';\nimport { orientation as checkboxGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /**\n * Allows a function that is triggered once the checkbox group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the checkbox group changes'),\n /**\n * Default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]).description(\n 'Default active value',\n ),\n /**\n * Checkbox group items to show of type DSCheckbox\n */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([DSCheckbox]),\n }),\n ).description('Checkbox group items to show of type DSCheckbox'),\n /**\n * Whether the checkbox group is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the checkbox group is disabled or not'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(checkboxGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * label props\n */\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('label props'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,sBAA2B;AAC3B,uBAAwD;AAEjD,MAAM,QAAQ;AAAA,EAInB,UAAU,kCAAU,KAAK,YAAY,qEAAqE;AAAA,EAI1G,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,QAAQ,kCAAU,KAAK,CAAC,EAAE;AAAA,IACtF;AAAA,EACF;AAAA,EAIA,UAAU,kCAAU;AAAA,IAClB,kCAAU,MAAM;AAAA,MACd,MAAM,kCAAU,MAAM,CAAC,0BAAU,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,EAAE,YAAY,iDAAiD;AAAA,EAI/D,UAAU,kCAAU,KAAK,YAAY,+CAA+C;AAAA,EAIpF,aAAa,kCAAU,MAAM,iBAAAA,WAAwB,EAAE,YAAY,4BAA4B;AAAA,EAI/F,YAAY,kCAAU,MAAM;AAAA,IAC1B,iBAAiB,kCAAU;AAAA,IAC3B,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC;AAAA,IACpE,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,aAAa;AAC9B;",
|
|
6
6
|
"names": ["checkboxGroupOrientation"]
|
|
7
7
|
}
|
|
@@ -32,11 +32,11 @@ var React = __toESM(require("react"));
|
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_prop_types = __toESM(require("prop-types"));
|
|
34
34
|
var import_lodash = require("lodash");
|
|
35
|
-
var import_ComboBox = require("../ComboBox");
|
|
36
|
-
var import_MultiValueLabel = require("./components/MultiValueLabel");
|
|
37
|
-
var import_MultiValueRemove = require("./components/MultiValueRemove");
|
|
38
|
-
var import_SingleValue = require("./components/SingleValue");
|
|
39
|
-
var import_SingleValueRemove = require("./components/SingleValueRemove");
|
|
35
|
+
var import_ComboBox = require("../ComboBox/index.js");
|
|
36
|
+
var import_MultiValueLabel = require("./components/MultiValueLabel.js");
|
|
37
|
+
var import_MultiValueRemove = require("./components/MultiValueRemove.js");
|
|
38
|
+
var import_SingleValue = require("./components/SingleValue.js");
|
|
39
|
+
var import_SingleValueRemove = require("./components/SingleValueRemove.js");
|
|
40
40
|
const customStyles = {
|
|
41
41
|
multiValueRemove: import_MultiValueRemove.MultiValueRemove.style,
|
|
42
42
|
clearIndicator: import_SingleValueRemove.SingleValueRemove.style,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ComboBoxFreeSolo/ComboBoxFreeSolo.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox';\nimport { MultiValueLabel } from './components/MultiValueLabel';\nimport { MultiValueRemove } from './components/MultiValueRemove';\nimport { SingleValue } from './components/SingleValue';\nimport { SingleValueRemove } from './components/SingleValueRemove';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\nconst ComboBoxFreeSolo = ({\n isMulti = false,\n options = {},\n value = [],\n onChange = noop,\n onChangeV2 = noop,\n onInputChange = noop,\n onFocus = noop,\n onBlur = noop,\n containerProps = {},\n disabled = false,\n menuIsOpen = false,\n placeholder = 'Select values',\n formatCreateLabel = (val) => `Create ${val}`,\n maxOptions = undefined,\n ...rest\n}) => (\n <DSComboBox2\n {...rest}\n isFreeSolo\n clearable\n isMulti={isMulti}\n value={value}\n options={options}\n keepTypedValue={false}\n placeholder={placeholder}\n disabled={disabled}\n menuIsOpen={menuIsOpen}\n formatCreateLabel={formatCreateLabel}\n createOptionPosition=\"first\"\n onChange={onChange}\n onChangeV2={onChangeV2}\n onInputChange={onInputChange}\n onFocus={onFocus}\n onBlur={onBlur}\n containerProps={containerProps}\n maxOptions={maxOptions}\n components={{\n MultiValueLabel,\n MultiValueRemove,\n SingleValue,\n }}\n componentsStyle={customStyles}\n />\n);\n\nComboBoxFreeSolo.propTypes = {\n containerProps: PropTypes.object,\n /**\n * Allows a function that is triggered once the combo box is focused\n */\n onFocus: PropTypes.func,\n /**\n * Allows a function that is triggered once the combo box loses focus\n */\n onBlur: PropTypes.func,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n */\n onChange: PropTypes.func.isRequired,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n * It will return the current options selected\n */\n onChangeV2: PropTypes.func,\n /**\n * Allows a function that is triggered once the input value changes (on every keystroke)\n */\n onInputChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * Value that the combo box has as default\n */\n options: PropTypes.arrayOf(PropTypes.object),\n /**\n * Whether the combo box is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Whether the combo box free solo is multi selectable or not\n */\n isMulti: PropTypes.bool,\n /**\n * Placeholder for the combo box\n */\n placeholder: PropTypes.string,\n /**\n * Whether the combo box menu is open or not\n */\n menuIsOpen: PropTypes.bool,\n /**\n * Whether to show the combo box menu inline or not\n */\n /**\n * function that reciveves the new value and returns the formatted value\n */\n formatCreateLabel: PropTypes.func,\n /**\n * Max options to be displayed on the menu list\n */\n maxOptions: PropTypes.number,\n};\n\nexport { ComboBoxFreeSolo };\nexport default ComboBoxFreeSolo;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox/index.js';\nimport { MultiValueLabel } from './components/MultiValueLabel.js';\nimport { MultiValueRemove } from './components/MultiValueRemove.js';\nimport { SingleValue } from './components/SingleValue.js';\nimport { SingleValueRemove } from './components/SingleValueRemove.js';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\nconst ComboBoxFreeSolo = ({\n isMulti = false,\n options = {},\n value = [],\n onChange = noop,\n onChangeV2 = noop,\n onInputChange = noop,\n onFocus = noop,\n onBlur = noop,\n containerProps = {},\n disabled = false,\n menuIsOpen = false,\n placeholder = 'Select values',\n formatCreateLabel = (val) => `Create ${val}`,\n maxOptions = undefined,\n ...rest\n}) => (\n <DSComboBox2\n {...rest}\n isFreeSolo\n clearable\n isMulti={isMulti}\n value={value}\n options={options}\n keepTypedValue={false}\n placeholder={placeholder}\n disabled={disabled}\n menuIsOpen={menuIsOpen}\n formatCreateLabel={formatCreateLabel}\n createOptionPosition=\"first\"\n onChange={onChange}\n onChangeV2={onChangeV2}\n onInputChange={onInputChange}\n onFocus={onFocus}\n onBlur={onBlur}\n containerProps={containerProps}\n maxOptions={maxOptions}\n components={{\n MultiValueLabel,\n MultiValueRemove,\n SingleValue,\n }}\n componentsStyle={customStyles}\n />\n);\n\nComboBoxFreeSolo.propTypes = {\n containerProps: PropTypes.object,\n /**\n * Allows a function that is triggered once the combo box is focused\n */\n onFocus: PropTypes.func,\n /**\n * Allows a function that is triggered once the combo box loses focus\n */\n onBlur: PropTypes.func,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n */\n onChange: PropTypes.func.isRequired,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n * It will return the current options selected\n */\n onChangeV2: PropTypes.func,\n /**\n * Allows a function that is triggered once the input value changes (on every keystroke)\n */\n onInputChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * Value that the combo box has as default\n */\n options: PropTypes.arrayOf(PropTypes.object),\n /**\n * Whether the combo box is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Whether the combo box free solo is multi selectable or not\n */\n isMulti: PropTypes.bool,\n /**\n * Placeholder for the combo box\n */\n placeholder: PropTypes.string,\n /**\n * Whether the combo box menu is open or not\n */\n menuIsOpen: PropTypes.bool,\n /**\n * Whether to show the combo box menu inline or not\n */\n /**\n * function that reciveves the new value and returns the formatted value\n */\n formatCreateLabel: PropTypes.func,\n /**\n * Max options to be displayed on the menu list\n */\n maxOptions: PropTypes.number,\n};\n\nexport { ComboBoxFreeSolo };\nexport default ComboBoxFreeSolo;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8CrB;AA7CF,wBAAsB;AACtB,oBAAqB;AACrB,sBAA4B;AAC5B,6BAAgC;AAChC,8BAAiC;AACjC,yBAA4B;AAC5B,+BAAkC;AAElC,MAAM,eAAe;AAAA,EACnB,kBAAkB,yCAAiB;AAAA,EACnC,gBAAgB,2CAAkB;AAAA,EAClC,YAAY,CAAC,UAAU;AAAA,IACrB,GAAG;AAAA,IACH,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA,gBAAgB,CAAC,UAAU;AAAA,IACzB,GAAG;AAAA,IACH,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,IACX,WAAW;AAAA,IACX,sBAAsB;AAAA,IACtB,mBAAmB;AAAA,IACnB,uBAAuB,EAAE,SAAS,OAAO;AAAA,EAC3C;AACF;AAEA,MAAM,mBAAmB,CAAC;AAAA,EACxB,UAAU;AAAA,EACV,UAAU,CAAC;AAAA,EACX,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,iBAAiB,CAAC;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|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var import_SingleValueRemove = require("./SingleValueRemove");
|
|
33
|
-
var import_MultiValueLabel = require("./MultiValueLabel");
|
|
32
|
+
var import_SingleValueRemove = require("./SingleValueRemove.js");
|
|
33
|
+
var import_MultiValueLabel = require("./MultiValueLabel.js");
|
|
34
34
|
const SingleValue = (props) => {
|
|
35
35
|
const { children } = props;
|
|
36
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_MultiValueLabel.MultiValueLabel, { clear: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SingleValueRemove.SingleValueRemove, { ...props }), children });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/ComboBoxFreeSolo/components/SingleValue.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove';\nimport { MultiValueLabel } from './MultiValueLabel';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return <MultiValueLabel clear={<SingleValueRemove {...props} />}>{children}</MultiValueLabel>;\n};\n\nexport { SingleValue };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove.js';\nimport { MultiValueLabel } from './MultiValueLabel.js';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return <MultiValueLabel clear={<SingleValueRemove {...props} />}>{children}</MultiValueLabel>;\n};\n\nexport { SingleValue };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOU;AANjC,+BAAkC;AAClC,6BAAgC;AAEhC,MAAM,cAAc,CAAC,UAAU;AAE7B,QAAM,EAAE,SAAS,IAAI;AACrB,SAAO,4CAAC,0CAAgB,OAAO,4CAAC,8CAAmB,GAAG,OAAO,GAAK,UAAS;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,5 +22,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var ComboBoxFreeSolo_exports = {};
|
|
23
23
|
module.exports = __toCommonJS(ComboBoxFreeSolo_exports);
|
|
24
24
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(ComboBoxFreeSolo_exports, require("./ComboBoxFreeSolo"), module.exports);
|
|
25
|
+
__reExport(ComboBoxFreeSolo_exports, require("./ComboBoxFreeSolo.js"), module.exports);
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ComboBoxFreeSolo/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './ComboBoxFreeSolo';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc
|
|
4
|
+
"sourcesContent": ["export * from './ComboBoxFreeSolo.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,kCAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,10 +34,11 @@ var React = __toESM(require("react"));
|
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_react = require("react");
|
|
36
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_Input = require("../Input/index.js");
|
|
39
|
+
var import_DateInputImpl = require("./components/DateInputImpl.js");
|
|
40
|
+
var import_props = require("./props.js");
|
|
41
|
+
var import_defaultProps = require("./defaultProps.js");
|
|
41
42
|
const DSDateInput = ({
|
|
42
43
|
innerRef,
|
|
43
44
|
className,
|
|
@@ -110,7 +111,7 @@ const DSDateInput = ({
|
|
|
110
111
|
DSDateInput.propTypes = import_props.props;
|
|
111
112
|
DSDateInput.defaultProps = import_defaultProps.defaultProps;
|
|
112
113
|
DSDateInput.displayName = "DSDateInput";
|
|
113
|
-
const DSDateInputWithSchema = (0,
|
|
114
|
+
const DSDateInputWithSchema = (0, import_ds_props_helpers.describe)(DSDateInput).deprecated("use DateInputV2 instead");
|
|
114
115
|
DSDateInputWithSchema.propTypes = import_props.props;
|
|
115
116
|
var DSDateInput_default = DSDateInput;
|
|
116
117
|
//# sourceMappingURL=DSDateInput.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/DateInput/DSDateInput.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { runAll } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../Input/index.js';\nimport { DateInputImpl } from './components/DateInputImpl.js';\nimport { props } from './props.js';\nimport { defaultProps } from './defaultProps.js';\n\nconst DSDateInput = ({\n innerRef,\n className,\n style,\n onFocus,\n onBlur,\n onClear,\n onChange,\n onKeyDown,\n onError,\n format,\n value,\n clearable,\n disabled,\n yearMaxRange,\n yearMinRange,\n containerProps,\n // TODO remove and keep `true` behavior ( PUI-4141 )\n INTERNAL_V2_NO_MUTATION,\n}) => {\n const [valueDate, setValueDate] = useState(value);\n\n useEffect(() => {\n if (value) {\n setValueDate(value);\n }\n }, [value]);\n\n const handleOnClear = useCallback(() => {\n runAll(onClear, setValueDate(''));\n }, [onClear]);\n\n const handleKeyDown = useCallback((e, date, inputOnKeyDown) => {\n inputOnKeyDown(e, date);\n }, []);\n\n const handleOnChange = useCallback((date, inputOnChange) => {\n setValueDate(date);\n inputOnChange(date);\n }, []);\n\n return (\n <DSInput\n className={`${className} input-date-input `}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, onKeyDown: inputOnKeyDown, ...restInputProps }) => (\n <DateInputImpl\n INTERNAL_V2_NO_MUTATION={INTERNAL_V2_NO_MUTATION}\n disabled={disabled}\n format={format}\n onChange={(date) => handleOnChange(date, inputOnChange)}\n onError={onError}\n onKeyDown={(e, date) => handleKeyDown(e, date, inputOnKeyDown)}\n value={valueDate}\n {...restInputProps}\n style={style}\n yearMaxRange={yearMaxRange}\n yearMinRange={yearMinRange}\n onFocus={onFocus}\n />\n )}\n disableTooltip={false}\n disabled={disabled}\n innerRef={innerRef}\n onBlur={onBlur}\n onChange={onChange}\n onKeyDown={onKeyDown}\n onClear={handleOnClear}\n value={valueDate}\n />\n );\n};\n\nDSDateInput.propTypes = props;\nDSDateInput.defaultProps = defaultProps;\nDSDateInput.displayName = 'DSDateInput';\nconst DSDateInputWithSchema = describe(DSDateInput).deprecated('use DateInputV2 instead');\nDSDateInputWithSchema.propTypes = props;\n\nexport { DateInputImpl, DSDateInputWithSchema, DSDateInput };\n\nexport default DSDateInput;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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A;AAAA;AAAA,MACF;AAAA,MAEF,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,MACT,OAAO;AAAA;AAAA,EACT;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,eAAe;AAC3B,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW,EAAE,WAAW,yBAAyB;AACxF,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,7 +34,7 @@ var import_react = require("react");
|
|
|
34
34
|
var import_prop_types = __toESM(require("prop-types"));
|
|
35
35
|
var import_moment = __toESM(require("moment"));
|
|
36
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
37
|
-
var import_DateInputs = require("./DateInputs");
|
|
37
|
+
var import_DateInputs = require("./DateInputs.js");
|
|
38
38
|
const blockName = "input-time";
|
|
39
39
|
const DateInputContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
|
40
40
|
const getVisibleTimeByFormat = (format) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInput/components/DateInputImpl.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Moment from 'moment';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DateInputs } from './DateInputs';\n\nconst blockName = 'input-time';\n\nconst DateInputContainer = aggregatedClasses('div')(blockName);\n\nconst getVisibleTimeByFormat = (format) => ({\n showMonth: format.indexOf('MM') > -1 || format.indexOf('M') > -1,\n showDay: format.indexOf('DD') > -1 || format.indexOf('D') > -1,\n showYear: format.indexOf('YYYY') > -1,\n});\n\nconst DateInputImpl = ({\n format,\n innerRef,\n onBlur,\n onChange,\n onKeyDown,\n onError,\n className,\n value,\n disabled,\n yearMaxRange,\n yearMinRange,\n onFocus,\n // eslint-disable-next-line react/prop-types\n INTERNAL_V2_NO_MUTATION,\n}) => {\n const inputContainerRef = useRef();\n\n const handleFocus = (e) => {\n onFocus();\n if (!e.target.type) {\n inputContainerRef.current.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeByFormat(format), [format]);\n\n return (\n <DateInputContainer className={className} disabled={disabled} innerRef={innerRef} onClick={handleFocus}>\n <DateInputs\n disabled={disabled}\n format={format}\n INTERNAL_V2_NO_MUTATION={INTERNAL_V2_NO_MUTATION}\n innerRef={inputContainerRef}\n onBlur={onBlur}\n onChange={onChange}\n onCustomKeyDown={onKeyDown}\n onError={onError}\n time={value}\n yearMaxRange={yearMaxRange}\n yearMinRange={yearMinRange}\n {...visibleInputs}\n />\n </DateInputContainer>\n );\n};\n\nDateInputImpl.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n onBlur: PropTypes.bool,\n onChange: PropTypes.func,\n onKeyDown: PropTypes.func,\n onError: PropTypes.func,\n format: PropTypes.string,\n showMonth: PropTypes.bool,\n className: PropTypes.string,\n showDay: PropTypes.bool,\n showYear: PropTypes.bool,\n step: PropTypes.number,\n onFocus: PropTypes.func,\n yearMaxRange: PropTypes.number,\n disabled: PropTypes.bool,\n yearMinRange: PropTypes.number,\n value: PropTypes.instanceOf(Moment),\n};\n\nexport { DateInputImpl };\nexport default DateInputImpl;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Moment from 'moment';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DateInputs } from './DateInputs.js';\n\nconst blockName = 'input-time';\n\nconst DateInputContainer = aggregatedClasses('div')(blockName);\n\nconst getVisibleTimeByFormat = (format) => ({\n showMonth: format.indexOf('MM') > -1 || format.indexOf('M') > -1,\n showDay: format.indexOf('DD') > -1 || format.indexOf('D') > -1,\n showYear: format.indexOf('YYYY') > -1,\n});\n\nconst DateInputImpl = ({\n format,\n innerRef,\n onBlur,\n onChange,\n onKeyDown,\n onError,\n className,\n value,\n disabled,\n yearMaxRange,\n yearMinRange,\n onFocus,\n // eslint-disable-next-line react/prop-types\n INTERNAL_V2_NO_MUTATION,\n}) => {\n const inputContainerRef = useRef();\n\n const handleFocus = (e) => {\n onFocus();\n if (!e.target.type) {\n inputContainerRef.current.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeByFormat(format), [format]);\n\n return (\n <DateInputContainer className={className} disabled={disabled} innerRef={innerRef} onClick={handleFocus}>\n <DateInputs\n disabled={disabled}\n format={format}\n INTERNAL_V2_NO_MUTATION={INTERNAL_V2_NO_MUTATION}\n innerRef={inputContainerRef}\n onBlur={onBlur}\n onChange={onChange}\n onCustomKeyDown={onKeyDown}\n onError={onError}\n time={value}\n yearMaxRange={yearMaxRange}\n yearMinRange={yearMinRange}\n {...visibleInputs}\n />\n </DateInputContainer>\n );\n};\n\nDateInputImpl.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n onBlur: PropTypes.bool,\n onChange: PropTypes.func,\n onKeyDown: PropTypes.func,\n onError: PropTypes.func,\n format: PropTypes.string,\n showMonth: PropTypes.bool,\n className: PropTypes.string,\n showDay: PropTypes.bool,\n showYear: PropTypes.bool,\n step: PropTypes.number,\n onFocus: PropTypes.func,\n yearMaxRange: PropTypes.number,\n disabled: PropTypes.bool,\n yearMinRange: PropTypes.number,\n value: PropTypes.instanceOf(Moment),\n};\n\nexport { DateInputImpl };\nexport default DateInputImpl;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6CjB;AA7CN,mBAAuC;AACvC,wBAA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;AAAA,EAClB,UAAU,kBAAAA,QAAU;AAAA,EACpB,WAAW,kBAAAA,QAAU;AAAA,EACrB,SAAS,kBAAAA,QAAU;AAAA,EACnB,QAAQ,kBAAAA,QAAU;AAAA,EAClB,WAAW,kBAAAA,QAAU;AAAA,EACrB,WAAW,kBAAAA,QAAU;AAAA,EACrB,SAAS,kBAAAA,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,MAAM,kBAAAA,QAAU;AAAA,EAChB,SAAS,kBAAAA,QAAU;AAAA,EACnB,cAAc,kBAAAA,QAAU;AAAA,EACxB,UAAU,kBAAAA,QAAU;AAAA,EACpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,OAAO,kBAAAA,QAAU,WAAW,cAAAC,OAAM;AACpC;AAGA,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["PropTypes", "Moment"]
|
|
7
7
|
}
|
|
@@ -36,7 +36,7 @@ var import_prop_types = __toESM(require("prop-types"));
|
|
|
36
36
|
var import_moment = __toESM(require("moment"));
|
|
37
37
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
38
38
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
39
|
-
var import_utils = require("./utils");
|
|
39
|
+
var import_utils = require("./utils.js");
|
|
40
40
|
const blockName = "input-date-group";
|
|
41
41
|
const InputTimesGroup = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
|
42
42
|
const MonthInput = (0, import_ds_classnames.aggregatedClasses)("input")(blockName, "input input-month");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInput/components/DateInputs.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Moment from 'moment';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { usePrevious } from '@elliemae/ds-utilities';\nimport {\n formatMonth,\n formatDay,\n formatYear,\n getValidTimeNumber,\n setNativeValue,\n parseTimeNumberFromText,\n focusNextInput,\n focusPreviousInput,\n getDateValuesFromTime,\n getNextTimeValue,\n focusNextInputIfNeeded,\n commonInputProps,\n handleCompletedDate,\n triggerOnBlur,\n isTimeCompletelySet,\n} from './utils';\n\nconst blockName = 'input-date-group';\n\nconst InputTimesGroup = aggregatedClasses('div')(blockName);\nconst MonthInput = aggregatedClasses('input')(blockName, 'input input-month');\nconst DayInput = aggregatedClasses('input')(blockName, 'input input-day');\nconst YearInput = aggregatedClasses('input')(blockName, 'input input-year');\nconst Divider = aggregatedClasses('span')(blockName, 'divider', ({ value }) => ({\n value,\n}));\n\n// eslint-disable-next-line react/prop-types\nconst DateDivider = ({ content = ':', value = '' }) => <Divider value={!!value}>{content}</Divider>;\n\nconst DateInputs = ({\n innerRef,\n onBlur,\n onChange,\n onCustomKeyDown,\n onError,\n format = '',\n showMonth = true,\n showDay = true,\n showYear = true,\n step = 1,\n yearMaxRange,\n disabled,\n yearMinRange,\n time,\n // TODO remove and keep `true` behavior ( PUI-4141 )\n INTERNAL_V2_NO_MUTATION, // eslint-disable-line react/prop-types\n}) => {\n const [currentKey, setCurrentKey] = useState('ArrowUp');\n const [month, setMonth] = useState('');\n const [day, setDay] = useState('');\n const [year, setYear] = useState('');\n const prevTime = usePrevious(time);\n const prevFormat = usePrevious(format);\n\n let digits = 2;\n let placeholder = '';\n\n useEffect(() => {\n if (time) {\n const dateValues = getDateValuesFromTime(time, format);\n setMonth(dateValues.month);\n setDay(dateValues.day);\n setYear(dateValues.year);\n }\n }, [format, time]);\n\n useEffect(() => {\n if (!time && prevTime) {\n setMonth('');\n setDay('');\n setYear('');\n onChange('');\n }\n if (time && prevTime && time.format && time.format(format) !== prevTime.format(prevFormat)) {\n const dateValues = getDateValuesFromTime(time, format);\n\n setMonth(dateValues.month);\n setDay(dateValues.day);\n setYear(dateValues.year);\n }\n }, [time, prevTime, format, prevFormat, onChange]);\n\n const isCompletedDate = useCallback(\n () => isTimeCompletelySet({ year, month, day }, { showYear, showMonth, showDay }, { yearMinRange, yearMaxRange }),\n [day, month, showDay, showMonth, showYear, year, yearMaxRange, yearMinRange],\n );\n\n useEffect(() => {\n if (INTERNAL_V2_NO_MUTATION) {\n const dateValues = getDateValuesFromTime(time, format);\n\n if (dateValues.day !== day && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n } else if (dateValues.month !== month && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n } else if (dateValues.year !== year && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n }\n }\n }, [\n INTERNAL_V2_NO_MUTATION,\n day,\n format,\n isCompletedDate,\n month,\n onChange,\n showDay,\n showMonth,\n showYear,\n time,\n year,\n ]);\n\n const triggerChange = () =>\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION);\n\n const handleYearChange = (e) => {\n const { value } = e.target;\n const yearValue = parseTimeNumberFromText(value);\n const yearRange = { min: 1, max: 9999 };\n const nextYear = getValidTimeNumber(yearRange, yearValue, value, onError);\n\n setYear(formatYear(format, nextYear));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n focusNextInputIfNeeded(e.target, yearRange.max, nextYear, value, currentKey);\n };\n\n const handleMonthChange = (e) => {\n const { value } = e.target;\n const monthValue = parseTimeNumberFromText(value);\n const monthRange = { min: 1, max: 12 };\n const nextMonth = getValidTimeNumber(monthRange, monthValue, value, onError);\n setMonth(formatMonth(format, nextMonth));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n focusNextInputIfNeeded(e.target, monthRange.max, nextMonth, value, currentKey);\n };\n\n const handleDayChange = (e) => {\n const { value } = e.target;\n const dayValue = parseTimeNumberFromText(value);\n const dayRange = { min: 1, max: 31 };\n const nextDay = getValidTimeNumber(dayRange, dayValue, value, onError);\n setDay(formatDay(format, nextDay));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n if (value !== day) focusNextInputIfNeeded(e.target, dayRange.max, nextDay, value, currentKey);\n };\n\n // eslint-disable-next-line complexity\n const onKeyDown = (event, shouldIncrementDecrement = true) => {\n const { value, name } = event.target;\n const change = {\n day: (v) => handleDayChange({ target: { value: v } }),\n month: (v) => handleMonthChange({ target: { value: v } }),\n year: (v) => handleYearChange({ target: { value: v } }),\n };\n switch (event.key) {\n case 'ArrowLeft': {\n event.preventDefault();\n focusPreviousInput(event.target);\n break;\n }\n case 'ArrowUp': {\n if (shouldIncrementDecrement) {\n event.preventDefault();\n setCurrentKey(event.key);\n const incrementedValue = getNextTimeValue(value, name, yearMinRange, yearMaxRange, step, true);\n if (INTERNAL_V2_NO_MUTATION) {\n change[name](incrementedValue);\n } else {\n setNativeValue(event.target, incrementedValue);\n }\n }\n break;\n }\n case 'ArrowDown': {\n if (shouldIncrementDecrement) {\n event.preventDefault();\n setCurrentKey(event.key);\n const decrementedValue = getNextTimeValue(value, name, yearMinRange, yearMaxRange, step, false);\n if (INTERNAL_V2_NO_MUTATION) {\n change[name](decrementedValue);\n } else {\n setNativeValue(event.target, decrementedValue);\n }\n }\n break;\n }\n case 'ArrowRight': {\n event.preventDefault();\n focusNextInput(event.target);\n break;\n }\n case 'Backspace': {\n event.preventDefault();\n if (!value) {\n focusPreviousInput(event.target);\n } else {\n // eslint-disable-next-line no-lonely-if\n if (INTERNAL_V2_NO_MUTATION) {\n change[name]('');\n } else {\n setNativeValue(event.target, '');\n }\n }\n break;\n }\n case 'Enter': {\n if (onCustomKeyDown && isCompletedDate()) onCustomKeyDown(event, triggerChange());\n setCurrentKey(null);\n break;\n }\n default:\n if (onCustomKeyDown) onCustomKeyDown(event);\n setCurrentKey(null);\n }\n };\n\n const renderMonthInput = () => {\n if (!showMonth) return null;\n placeholder = 'MM';\n const onMonthInputBlur = (e) => {\n handleMonthChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <MonthInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"month-input\"\n data-testid=\"month\"\n disabled={disabled}\n name=\"month\"\n onBlur={onMonthInputBlur}\n onChange={handleMonthChange}\n value={month}\n />\n );\n };\n const renderDayInput = () => {\n if (!showDay) return null;\n placeholder = 'DD';\n const onDayInputBlur = (e) => {\n handleDayChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <DayInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"day-input\"\n data-testid=\"day\"\n disabled={disabled}\n name=\"day\"\n onBlur={onDayInputBlur}\n onChange={handleDayChange}\n value={day}\n />\n );\n };\n const renderYearInput = () => {\n if (!showYear) return null;\n placeholder = 'YY';\n digits = 4;\n const onYearInputBlur = (e) => {\n handleYearChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <YearInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"seconds-input\"\n data-testid=\"year\"\n disabled={disabled}\n name=\"year\"\n onBlur={onYearInputBlur}\n onChange={handleYearChange}\n value={year}\n />\n );\n };\n\n const renderDateInputs = () => {\n const inputs = [renderMonthInput(), renderDayInput(), renderYearInput()];\n const inputsWithDividers = inputs.reduce(\n (acc, input, index) =>\n input\n ? acc.concat([index ? <DateDivider key={index} content=\" / \" value={input.props.value} /> : null, input])\n : acc,\n [],\n );\n\n return [\n inputsWithDividers,\n React.createElement('span', { key: 'span' }), // hack for next/prev focus\n ];\n };\n\n return <InputTimesGroup innerRef={innerRef}>{renderDateInputs()}</InputTimesGroup>;\n};\n\nDateInputs.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n onBlur: PropTypes.bool,\n onChange: PropTypes.func,\n onCustomKeyDown: PropTypes.func,\n onError: PropTypes.func,\n format: PropTypes.string,\n showMonth: PropTypes.bool,\n showDay: PropTypes.bool,\n showYear: PropTypes.bool,\n step: PropTypes.number,\n yearMaxRange: PropTypes.number,\n disabled: PropTypes.bool,\n yearMinRange: PropTypes.number,\n time: PropTypes.instanceOf(Moment),\n};\n\nexport { DateInputs };\nexport default DateInputs;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Moment from 'moment';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { usePrevious } from '@elliemae/ds-utilities';\nimport {\n formatMonth,\n formatDay,\n formatYear,\n getValidTimeNumber,\n setNativeValue,\n parseTimeNumberFromText,\n focusNextInput,\n focusPreviousInput,\n getDateValuesFromTime,\n getNextTimeValue,\n focusNextInputIfNeeded,\n commonInputProps,\n handleCompletedDate,\n triggerOnBlur,\n isTimeCompletelySet,\n} from './utils.js';\n\nconst blockName = 'input-date-group';\n\nconst InputTimesGroup = aggregatedClasses('div')(blockName);\nconst MonthInput = aggregatedClasses('input')(blockName, 'input input-month');\nconst DayInput = aggregatedClasses('input')(blockName, 'input input-day');\nconst YearInput = aggregatedClasses('input')(blockName, 'input input-year');\nconst Divider = aggregatedClasses('span')(blockName, 'divider', ({ value }) => ({\n value,\n}));\n\n// eslint-disable-next-line react/prop-types\nconst DateDivider = ({ content = ':', value = '' }) => <Divider value={!!value}>{content}</Divider>;\n\nconst DateInputs = ({\n innerRef,\n onBlur,\n onChange,\n onCustomKeyDown,\n onError,\n format = '',\n showMonth = true,\n showDay = true,\n showYear = true,\n step = 1,\n yearMaxRange,\n disabled,\n yearMinRange,\n time,\n // TODO remove and keep `true` behavior ( PUI-4141 )\n INTERNAL_V2_NO_MUTATION, // eslint-disable-line react/prop-types\n}) => {\n const [currentKey, setCurrentKey] = useState('ArrowUp');\n const [month, setMonth] = useState('');\n const [day, setDay] = useState('');\n const [year, setYear] = useState('');\n const prevTime = usePrevious(time);\n const prevFormat = usePrevious(format);\n\n let digits = 2;\n let placeholder = '';\n\n useEffect(() => {\n if (time) {\n const dateValues = getDateValuesFromTime(time, format);\n setMonth(dateValues.month);\n setDay(dateValues.day);\n setYear(dateValues.year);\n }\n }, [format, time]);\n\n useEffect(() => {\n if (!time && prevTime) {\n setMonth('');\n setDay('');\n setYear('');\n onChange('');\n }\n if (time && prevTime && time.format && time.format(format) !== prevTime.format(prevFormat)) {\n const dateValues = getDateValuesFromTime(time, format);\n\n setMonth(dateValues.month);\n setDay(dateValues.day);\n setYear(dateValues.year);\n }\n }, [time, prevTime, format, prevFormat, onChange]);\n\n const isCompletedDate = useCallback(\n () => isTimeCompletelySet({ year, month, day }, { showYear, showMonth, showDay }, { yearMinRange, yearMaxRange }),\n [day, month, showDay, showMonth, showYear, year, yearMaxRange, yearMinRange],\n );\n\n useEffect(() => {\n if (INTERNAL_V2_NO_MUTATION) {\n const dateValues = getDateValuesFromTime(time, format);\n\n if (dateValues.day !== day && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n } else if (dateValues.month !== month && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n } else if (dateValues.year !== year && isCompletedDate()) {\n onChange(\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION),\n );\n }\n }\n }, [\n INTERNAL_V2_NO_MUTATION,\n day,\n format,\n isCompletedDate,\n month,\n onChange,\n showDay,\n showMonth,\n showYear,\n time,\n year,\n ]);\n\n const triggerChange = () =>\n handleCompletedDate(time, { year, month, day }, { showYear, showMonth, showDay }, INTERNAL_V2_NO_MUTATION);\n\n const handleYearChange = (e) => {\n const { value } = e.target;\n const yearValue = parseTimeNumberFromText(value);\n const yearRange = { min: 1, max: 9999 };\n const nextYear = getValidTimeNumber(yearRange, yearValue, value, onError);\n\n setYear(formatYear(format, nextYear));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n focusNextInputIfNeeded(e.target, yearRange.max, nextYear, value, currentKey);\n };\n\n const handleMonthChange = (e) => {\n const { value } = e.target;\n const monthValue = parseTimeNumberFromText(value);\n const monthRange = { min: 1, max: 12 };\n const nextMonth = getValidTimeNumber(monthRange, monthValue, value, onError);\n setMonth(formatMonth(format, nextMonth));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n focusNextInputIfNeeded(e.target, monthRange.max, nextMonth, value, currentKey);\n };\n\n const handleDayChange = (e) => {\n const { value } = e.target;\n const dayValue = parseTimeNumberFromText(value);\n const dayRange = { min: 1, max: 31 };\n const nextDay = getValidTimeNumber(dayRange, dayValue, value, onError);\n setDay(formatDay(format, nextDay));\n if (isCompletedDate() && !INTERNAL_V2_NO_MUTATION) {\n onChange(triggerChange());\n }\n if (value !== day) focusNextInputIfNeeded(e.target, dayRange.max, nextDay, value, currentKey);\n };\n\n // eslint-disable-next-line complexity\n const onKeyDown = (event, shouldIncrementDecrement = true) => {\n const { value, name } = event.target;\n const change = {\n day: (v) => handleDayChange({ target: { value: v } }),\n month: (v) => handleMonthChange({ target: { value: v } }),\n year: (v) => handleYearChange({ target: { value: v } }),\n };\n switch (event.key) {\n case 'ArrowLeft': {\n event.preventDefault();\n focusPreviousInput(event.target);\n break;\n }\n case 'ArrowUp': {\n if (shouldIncrementDecrement) {\n event.preventDefault();\n setCurrentKey(event.key);\n const incrementedValue = getNextTimeValue(value, name, yearMinRange, yearMaxRange, step, true);\n if (INTERNAL_V2_NO_MUTATION) {\n change[name](incrementedValue);\n } else {\n setNativeValue(event.target, incrementedValue);\n }\n }\n break;\n }\n case 'ArrowDown': {\n if (shouldIncrementDecrement) {\n event.preventDefault();\n setCurrentKey(event.key);\n const decrementedValue = getNextTimeValue(value, name, yearMinRange, yearMaxRange, step, false);\n if (INTERNAL_V2_NO_MUTATION) {\n change[name](decrementedValue);\n } else {\n setNativeValue(event.target, decrementedValue);\n }\n }\n break;\n }\n case 'ArrowRight': {\n event.preventDefault();\n focusNextInput(event.target);\n break;\n }\n case 'Backspace': {\n event.preventDefault();\n if (!value) {\n focusPreviousInput(event.target);\n } else {\n // eslint-disable-next-line no-lonely-if\n if (INTERNAL_V2_NO_MUTATION) {\n change[name]('');\n } else {\n setNativeValue(event.target, '');\n }\n }\n break;\n }\n case 'Enter': {\n if (onCustomKeyDown && isCompletedDate()) onCustomKeyDown(event, triggerChange());\n setCurrentKey(null);\n break;\n }\n default:\n if (onCustomKeyDown) onCustomKeyDown(event);\n setCurrentKey(null);\n }\n };\n\n const renderMonthInput = () => {\n if (!showMonth) return null;\n placeholder = 'MM';\n const onMonthInputBlur = (e) => {\n handleMonthChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <MonthInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"month-input\"\n data-testid=\"month\"\n disabled={disabled}\n name=\"month\"\n onBlur={onMonthInputBlur}\n onChange={handleMonthChange}\n value={month}\n />\n );\n };\n const renderDayInput = () => {\n if (!showDay) return null;\n placeholder = 'DD';\n const onDayInputBlur = (e) => {\n handleDayChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <DayInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"day-input\"\n data-testid=\"day\"\n disabled={disabled}\n name=\"day\"\n onBlur={onDayInputBlur}\n onChange={handleDayChange}\n value={day}\n />\n );\n };\n const renderYearInput = () => {\n if (!showYear) return null;\n placeholder = 'YY';\n digits = 4;\n const onYearInputBlur = (e) => {\n handleYearChange(e);\n triggerOnBlur(e, onBlur);\n };\n return (\n <YearInput\n {...commonInputProps(digits, onKeyDown, placeholder)}\n autocomplete=\"off\"\n key=\"seconds-input\"\n data-testid=\"year\"\n disabled={disabled}\n name=\"year\"\n onBlur={onYearInputBlur}\n onChange={handleYearChange}\n value={year}\n />\n );\n };\n\n const renderDateInputs = () => {\n const inputs = [renderMonthInput(), renderDayInput(), renderYearInput()];\n const inputsWithDividers = inputs.reduce(\n (acc, input, index) =>\n input\n ? acc.concat([index ? <DateDivider key={index} content=\" / \" value={input.props.value} /> : null, input])\n : acc,\n [],\n );\n\n return [\n inputsWithDividers,\n React.createElement('span', { key: 'span' }), // hack for next/prev focus\n ];\n };\n\n return <InputTimesGroup innerRef={innerRef}>{renderDateInputs()}</InputTimesGroup>;\n};\n\nDateInputs.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n onBlur: PropTypes.bool,\n onChange: PropTypes.func,\n onCustomKeyDown: PropTypes.func,\n onError: PropTypes.func,\n format: PropTypes.string,\n showMonth: PropTypes.bool,\n showDay: PropTypes.bool,\n showYear: PropTypes.bool,\n step: PropTypes.number,\n yearMaxRange: PropTypes.number,\n disabled: PropTypes.bool,\n yearMinRange: PropTypes.number,\n time: PropTypes.instanceOf(Moment),\n};\n\nexport { DateInputs };\nexport default DateInputs;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCgC;AAkNjD;AApPN,IAAAA,gBAAwD;AACxD,wBAAsB;AACtB,oBAAmB;AACnB,2BAAkC;AAClC,0BAA4B;AAC5B,mBAgBO;AAEP,MAA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B,QAAQ,kBAAAA,QAAU;AAAA,EAClB,WAAW,kBAAAA,QAAU;AAAA,EACrB,SAAS,kBAAAA,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,MAAM,kBAAAA,QAAU;AAAA,EAChB,cAAc,kBAAAA,QAAU;AAAA,EACxB,UAAU,kBAAAA,QAAU;AAAA,EACpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,MAAM,kBAAAA,QAAU,WAAW,cAAAC,OAAM;AACnC;AAGA,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["import_react", "React", "PropTypes", "Moment"]
|
|
7
7
|
}
|
|
@@ -22,5 +22,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var DateInput_exports = {};
|
|
23
23
|
module.exports = __toCommonJS(DateInput_exports);
|
|
24
24
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(DateInput_exports, require("./DSDateInput"), module.exports);
|
|
25
|
+
__reExport(DateInput_exports, require("./DSDateInput.js"), module.exports);
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/DateInput/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './DSDateInput';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAc,
|
|
4
|
+
"sourcesContent": ["export * from './DSDateInput.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAc,6BAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,25 +28,25 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
const props = {
|
|
33
|
-
containerProps:
|
|
34
|
-
innerRef:
|
|
33
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("props injected to date input wrapper node"),
|
|
34
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]).description(
|
|
35
35
|
"inner ref for input wrapper"
|
|
36
36
|
),
|
|
37
|
-
className:
|
|
38
|
-
style:
|
|
39
|
-
onBlur:
|
|
40
|
-
onFocus:
|
|
41
|
-
onClear:
|
|
42
|
-
onKeyDown:
|
|
43
|
-
onChange:
|
|
44
|
-
onError:
|
|
45
|
-
format:
|
|
46
|
-
value:
|
|
47
|
-
clearable:
|
|
48
|
-
disabled:
|
|
49
|
-
yearMaxRange:
|
|
50
|
-
yearMinRange:
|
|
37
|
+
className: import_ds_props_helpers.PropTypes.string.description("class for input"),
|
|
38
|
+
style: import_ds_props_helpers.PropTypes.object.description("Set style for the date input"),
|
|
39
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("Triggers the onBlur when focus moves out of date input"),
|
|
40
|
+
onFocus: import_ds_props_helpers.PropTypes.func.description("Triggers the onFocus when the component gets the focus"),
|
|
41
|
+
onClear: import_ds_props_helpers.PropTypes.func.description("Triggers the onClear"),
|
|
42
|
+
onKeyDown: import_ds_props_helpers.PropTypes.func.description("Triggers the onKeyDown"),
|
|
43
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the date input changes"),
|
|
44
|
+
onError: import_ds_props_helpers.PropTypes.func.description("Triggers the onError once one input date is wrong"),
|
|
45
|
+
format: import_ds_props_helpers.PropTypes.string.description("Format type for date input"),
|
|
46
|
+
value: import_ds_props_helpers.PropTypes.string.description("Default value once the component is initialized"),
|
|
47
|
+
clearable: import_ds_props_helpers.PropTypes.bool.description("Whether the date input is clearable or not"),
|
|
48
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the date input is disabled or not"),
|
|
49
|
+
yearMaxRange: import_ds_props_helpers.PropTypes.number.description("Max year that can be accepted by the date input"),
|
|
50
|
+
yearMinRange: import_ds_props_helpers.PropTypes.number.description("Min year that can be accepted by the date input")
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/DateInput/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const props = {\n /** props injected to date input wrapper node */\n containerProps: PropTypes.object.description('props injected to date input wrapper node'),\n /** inner ref for input wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for input wrapper',\n ),\n /** class for input */\n className: PropTypes.string.description('class for input'),\n /**\n * Set style for the date input\n */\n style: PropTypes.object.description('Set style for the date input'),\n /**\n * Triggers the onBlur when focus moves out of date input\n */\n onBlur: PropTypes.func.description('Triggers the onBlur when focus moves out of date input'),\n /**\n * Triggers the onFocus when the component gets the focus\n */\n onFocus: PropTypes.func.description('Triggers the onFocus when the component gets the focus'),\n /**\n * Triggers the onClear\n */\n onClear: PropTypes.func.description('Triggers the onClear'),\n /**\n * Triggers the onKeyDown\n */\n onKeyDown: PropTypes.func.description('Triggers the onKeyDown'),\n /**\n * Allows a function that is triggered once the date input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the date input changes'),\n /**\n * Triggers the onError once one input date is wrong\n */\n onError: PropTypes.func.description('Triggers the onError once one input date is wrong'),\n /**\n * Format type for date input\n */\n format: PropTypes.string.description('Format type for date input'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the date input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the date input is clearable or not'),\n /**\n * Whether the date input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the date input is disabled or not'),\n /**\n * Max year that can be accepted by the date input\n */\n yearMaxRange: PropTypes.number.description('Max year that can be accepted by the date input'),\n /**\n * Min year that can be accepted by the date input\n */\n yearMinRange: PropTypes.number.description('Min year that can be accepted by the date input'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,kCAAU,OAAO,YAAY,2CAA2C;AAAA,EAExF,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAEA,WAAW,kCAAU,OAAO,YAAY,iBAAiB;AAAA,EAIzD,OAAO,kCAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,QAAQ,kCAAU,KAAK,YAAY,wDAAwD;AAAA,EAI3F,SAAS,kCAAU,KAAK,YAAY,wDAAwD;AAAA,EAI5F,SAAS,kCAAU,KAAK,YAAY,sBAAsB;AAAA,EAI1D,WAAW,kCAAU,KAAK,YAAY,wBAAwB;AAAA,EAI9D,UAAU,kCAAU,KAAK,YAAY,iEAAiE;AAAA,EAItG,SAAS,kCAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,QAAQ,kCAAU,OAAO,YAAY,4BAA4B;AAAA,EAIjE,OAAO,kCAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,WAAW,kCAAU,KAAK,YAAY,4CAA4C;AAAA,EAIlF,UAAU,kCAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,cAAc,kCAAU,OAAO,YAAY,iDAAiD;AAAA,EAI5F,cAAc,kCAAU,OAAO,YAAY,iDAAiD;AAC9F;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -31,10 +31,10 @@ __export(DSDateInput_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(DSDateInput_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
35
|
-
var import_Input = require("../../Input");
|
|
36
|
-
var import_DateInputs = require("./DateInputs");
|
|
37
|
-
var import_props = require("./props");
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
|
+
var import_Input = require("../../Input/index.js");
|
|
36
|
+
var import_DateInputs = require("./DateInputs.js");
|
|
37
|
+
var import_props = require("./props.js");
|
|
38
38
|
const DSDateInputV2 = ({
|
|
39
39
|
onFocus,
|
|
40
40
|
onBlur,
|
|
@@ -78,7 +78,7 @@ const DSDateInputV2 = ({
|
|
|
78
78
|
DSDateInputV2.defaultProps = import_props.defaultProps;
|
|
79
79
|
DSDateInputV2.propTypes = import_props.props;
|
|
80
80
|
DSDateInputV2.displayName = "DSDateInputV2";
|
|
81
|
-
const DSDateInputV2WithSchema = (0,
|
|
81
|
+
const DSDateInputV2WithSchema = (0, import_ds_props_helpers.describe)(DSDateInputV2);
|
|
82
82
|
DSDateInputV2WithSchema.propTypes = import_props.props;
|
|
83
83
|
var DSDateInput_default = DSDateInputV2;
|
|
84
84
|
//# sourceMappingURL=DSDateInput.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/DSDateInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBjB;AAtBN,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../../Input/index.js';\nimport { DateInputs } from './DateInputs.js';\nimport { props, defaultProps } from './props.js';\n\nconst DSDateInputV2 = ({\n onFocus,\n onBlur,\n onChange,\n onDateChange,\n onKeyDown,\n onError,\n value,\n disabled,\n containerProps,\n tabIndex,\n innerRef,\n}) => (\n <DSInput\n innerRef={innerRef}\n containerProps={containerProps}\n customInputType={({ innerRef: ir }) => (\n <DateInputs\n disabled={disabled}\n innerRef={ir}\n onBlur={onBlur}\n onChange={onChange}\n onDateChange={onDateChange}\n onCustomKeyDown={onKeyDown}\n onError={onError}\n time={value}\n tabIndex={tabIndex}\n />\n )}\n disableTooltip={false}\n disabled={disabled}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n tabIndex={tabIndex}\n />\n);\n\nDSDateInputV2.defaultProps = defaultProps;\n\nDSDateInputV2.propTypes = props;\nDSDateInputV2.displayName = 'DSDateInputV2';\nconst DSDateInputV2WithSchema = describe(DSDateInputV2);\nDSDateInputV2WithSchema.propTypes = props;\n\nexport { DSDateInputV2, DSDateInputV2WithSchema };\nexport default DSDateInputV2;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBjB;AAtBN,8BAAyB;AACzB,mBAAwB;AACxB,wBAA2B;AAC3B,mBAAoC;AAEpC,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC,EAAE,UAAU,GAAG,MAC/B;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA,iBAAiB;AAAA,QACjB;AAAA,QACA,MAAM;AAAA,QACN;AAAA;AAAA,IACF;AAAA,IAEF,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAGF,cAAc,eAAe;AAE7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;AAGpC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,12 +32,14 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
32
32
|
var import_react = require("react");
|
|
33
33
|
var import_react2 = __toESM(require("react"));
|
|
34
34
|
var import_moment = __toESM(require("moment"));
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
35
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
36
|
+
var import_utils = require("./utils.js");
|
|
37
|
+
var import_helpers = require("./helpers.js");
|
|
38
|
+
var import_styled = require("./styled.js");
|
|
39
|
+
var import_propsTypes = require("./propsTypes.js");
|
|
39
40
|
const FORMAT = "MMDDYYYY";
|
|
40
41
|
const DateInputs = ({ onBlur, onChange, onDateChange, disabled, onCustomKeyDown, time, tabIndex, innerRef }) => {
|
|
42
|
+
(0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-form/DateInputV2", version: "3.x Date: 2023 Q1" });
|
|
41
43
|
const [month, setMonth] = (0, import_react2.useState)("");
|
|
42
44
|
const [day, setDay] = (0, import_react2.useState)("");
|
|
43
45
|
const [year, setYear] = (0, import_react2.useState)("");
|