@elliemae/ds-form 3.16.0-next.2 → 3.16.0-next.21
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/Checkbox/index.js +4 -0
- package/dist/cjs/Checkbox/index.js.map +1 -1
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js +10 -6
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
- package/dist/cjs/CheckboxGroup/defaultProps.js +4 -0
- package/dist/cjs/CheckboxGroup/defaultProps.js.map +1 -1
- package/dist/cjs/CheckboxGroup/index.js +5 -1
- package/dist/cjs/CheckboxGroup/index.js.map +2 -2
- package/dist/cjs/CheckboxGroup/props.js +35 -13
- package/dist/cjs/CheckboxGroup/props.js.map +2 -2
- package/dist/cjs/ComboBox/index.js +4 -0
- package/dist/cjs/ComboBox/index.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +52 -5
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js +4 -0
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +4 -0
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js +6 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +4 -0
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/index.js +5 -1
- package/dist/cjs/ComboBoxFreeSolo/index.js.map +2 -2
- package/dist/cjs/DateInput/DSDateInput.js +11 -5
- package/dist/cjs/DateInput/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInput/components/DateInputImpl.js +6 -1
- package/dist/cjs/DateInput/components/DateInputImpl.js.map +2 -2
- package/dist/cjs/DateInput/components/DateInputs.js +8 -1
- package/dist/cjs/DateInput/components/DateInputs.js.map +2 -2
- package/dist/cjs/DateInput/components/utils.js +5 -1
- package/dist/cjs/DateInput/components/utils.js.map +1 -1
- package/dist/cjs/DateInput/defaultProps.js +5 -1
- package/dist/cjs/DateInput/defaultProps.js.map +1 -1
- package/dist/cjs/DateInput/index.js +5 -1
- package/dist/cjs/DateInput/index.js.map +2 -2
- package/dist/cjs/DateInput/props.js +63 -17
- package/dist/cjs/DateInput/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DSDateInput.js +9 -5
- package/dist/cjs/DateInputV2/components/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DateInputs.js +11 -4
- package/dist/cjs/DateInputV2/components/DateInputs.js.map +2 -2
- package/dist/cjs/DateInputV2/components/helpers.js +5 -1
- package/dist/cjs/DateInputV2/components/helpers.js.map +2 -2
- package/dist/cjs/DateInputV2/components/props.js +45 -11
- package/dist/cjs/DateInputV2/components/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/propsTypes.js +4 -0
- package/dist/cjs/DateInputV2/components/propsTypes.js.map +1 -1
- package/dist/cjs/DateInputV2/components/styled.js +4 -0
- package/dist/cjs/DateInputV2/components/styled.js.map +1 -1
- package/dist/cjs/DateInputV2/components/utils.js +5 -1
- package/dist/cjs/DateInputV2/components/utils.js.map +1 -1
- package/dist/cjs/DateInputV2/index.js +6 -2
- package/dist/cjs/DateInputV2/index.js.map +2 -2
- package/dist/cjs/ExpandableInput/DSExpandableInput.js +5 -1
- package/dist/cjs/ExpandableInput/DSExpandableInput.js.map +2 -2
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js +5 -1
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js.map +2 -2
- package/dist/cjs/ExpandableInput/index.js +5 -1
- package/dist/cjs/ExpandableInput/index.js.map +2 -2
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js +70 -3
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +2 -2
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +6 -2
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +2 -2
- package/dist/cjs/FloatingLabelInput/getSvgPath.js +7 -1
- package/dist/cjs/FloatingLabelInput/getSvgPath.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/index.js +5 -1
- package/dist/cjs/FloatingLabelInput/index.js.map +2 -2
- package/dist/cjs/FormItem/DSFormItemLayout.js +16 -8
- package/dist/cjs/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/cjs/FormItem/Error/DSError.js +10 -4
- package/dist/cjs/FormItem/Error/DSError.js.map +2 -2
- package/dist/cjs/FormItem/Feedback.js +4 -0
- package/dist/cjs/FormItem/Feedback.js.map +1 -1
- package/dist/cjs/FormItem/Label/DSLabel.js +5 -1
- package/dist/cjs/FormItem/Label/DSLabel.js.map +2 -2
- package/dist/cjs/FormItem/Suffix/Suffix.js +4 -0
- package/dist/cjs/FormItem/Suffix/Suffix.js.map +1 -1
- package/dist/cjs/FormItem/ValidationFieldWrapper.js +5 -0
- package/dist/cjs/FormItem/ValidationFieldWrapper.js.map +1 -1
- package/dist/cjs/FormItem/defaultProps.js +8 -4
- package/dist/cjs/FormItem/defaultProps.js.map +2 -2
- package/dist/cjs/FormItem/index.js +6 -2
- package/dist/cjs/FormItem/index.js.map +2 -2
- package/dist/cjs/FormItem/props.js +89 -45
- package/dist/cjs/FormItem/props.js.map +2 -2
- package/dist/cjs/FormItem/variants.js +4 -0
- package/dist/cjs/FormItem/variants.js.map +1 -1
- package/dist/cjs/Input/DSInput.js +4 -0
- package/dist/cjs/Input/DSInput.js.map +1 -1
- package/dist/cjs/Input/InputAddonWrapper.js +4 -0
- package/dist/cjs/Input/InputAddonWrapper.js.map +1 -1
- package/dist/cjs/Input/InputImpl.js +4 -0
- package/dist/cjs/Input/InputImpl.js.map +1 -1
- package/dist/cjs/Input/index.js +4 -0
- package/dist/cjs/Input/index.js.map +1 -1
- package/dist/cjs/InputGroup/AddonWrapper.js +4 -0
- package/dist/cjs/InputGroup/AddonWrapper.js.map +1 -1
- package/dist/cjs/InputGroup/DSInputGroup.js +25 -16
- package/dist/cjs/InputGroup/DSInputGroup.js.map +2 -2
- package/dist/cjs/InputGroup/defaultProps.js +4 -0
- package/dist/cjs/InputGroup/defaultProps.js.map +1 -1
- package/dist/cjs/InputGroup/index.js +5 -1
- package/dist/cjs/InputGroup/index.js.map +2 -2
- package/dist/cjs/InputGroup/props.js +27 -8
- package/dist/cjs/InputGroup/props.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMask.js +13 -7
- package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js +13 -2
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js.map +2 -2
- package/dist/cjs/InputMask/InputMaskContext.js +4 -0
- package/dist/cjs/InputMask/InputMaskContext.js.map +2 -2
- package/dist/cjs/InputMask/MaskPipes.js +5 -1
- package/dist/cjs/InputMask/MaskPipes.js.map +2 -2
- package/dist/cjs/InputMask/MaskTypes.js +4 -0
- package/dist/cjs/InputMask/MaskTypes.js.map +1 -1
- package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js +4 -0
- package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js.map +1 -1
- package/dist/cjs/InputMask/defaultProps.js +5 -1
- package/dist/cjs/InputMask/defaultProps.js.map +2 -2
- package/dist/cjs/InputMask/index.js +5 -1
- package/dist/cjs/InputMask/index.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +6 -2
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/index.js +13 -9
- package/dist/cjs/InputMask/mask_types/index.js.map +2 -2
- package/dist/cjs/InputMask/props.js +115 -31
- package/dist/cjs/InputMask/props.js.map +2 -2
- package/dist/cjs/InputMask/types/index.js +4 -0
- package/dist/cjs/InputMask/types/index.js.map +1 -1
- package/dist/cjs/InputMask/utils/setCaretPosition.js +4 -0
- package/dist/cjs/InputMask/utils/setCaretPosition.js.map +1 -1
- package/dist/cjs/InputProtected/DSInputProtected.js +12 -6
- package/dist/cjs/InputProtected/DSInputProtected.js.map +2 -2
- package/dist/cjs/InputProtected/defaultProps.js +5 -1
- package/dist/cjs/InputProtected/defaultProps.js.map +2 -2
- package/dist/cjs/InputProtected/index.js +6 -2
- package/dist/cjs/InputProtected/index.js.map +2 -2
- package/dist/cjs/InputProtected/options.js +4 -0
- package/dist/cjs/InputProtected/options.js.map +1 -1
- package/dist/cjs/InputProtected/props.js +18 -10
- package/dist/cjs/InputProtected/props.js.map +2 -2
- package/dist/cjs/LargeInputText/DSLargeInputText.js +9 -3
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/cjs/LargeInputText/defaultProps.js +4 -0
- package/dist/cjs/LargeInputText/defaultProps.js.map +1 -1
- package/dist/cjs/LargeInputText/index.js +5 -1
- package/dist/cjs/LargeInputText/index.js.map +2 -2
- package/dist/cjs/LargeInputText/props.js +98 -28
- package/dist/cjs/LargeInputText/props.js.map +2 -2
- package/dist/cjs/MenuItem/components/MenuItem/index.js +4 -0
- package/dist/cjs/MenuItem/components/MenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/MenuItem/styled.js +4 -0
- package/dist/cjs/MenuItem/components/MenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +4 -0
- package/dist/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js.map +1 -1
- package/dist/cjs/MenuItem/components/MultiMenuItem/styled.js +4 -0
- package/dist/cjs/MenuItem/components/MultiMenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/index.js +4 -0
- package/dist/cjs/MenuItem/components/Section/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/props.js +4 -0
- package/dist/cjs/MenuItem/components/Section/props.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/styled.js +4 -0
- package/dist/cjs/MenuItem/components/Section/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/Separator/index.js +4 -0
- package/dist/cjs/MenuItem/components/Separator/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/Separator/styled.js +4 -0
- package/dist/cjs/MenuItem/components/Separator/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js +4 -0
- package/dist/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js.map +1 -1
- package/dist/cjs/MenuItem/components/SubmenuItem/index.js +4 -0
- package/dist/cjs/MenuItem/components/SubmenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/SubmenuItem/styled.js +4 -0
- package/dist/cjs/MenuItem/components/SubmenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/index.js +4 -0
- package/dist/cjs/MenuItem/components/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/styled.js +4 -0
- package/dist/cjs/MenuItem/components/styled.js.map +1 -1
- package/dist/cjs/MenuItem/index.js +4 -0
- package/dist/cjs/MenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/props.js +4 -0
- package/dist/cjs/MenuItem/props.js.map +1 -1
- package/dist/cjs/Radio/Circle.js +4 -0
- package/dist/cjs/Radio/Circle.js.map +1 -1
- package/dist/cjs/Radio/DSRadio.js +52 -16
- package/dist/cjs/Radio/DSRadio.js.map +2 -2
- package/dist/cjs/Radio/index.js +5 -1
- package/dist/cjs/Radio/index.js.map +2 -2
- package/dist/cjs/RadioGroup/DSRadioGroup.js +10 -6
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
- package/dist/cjs/RadioGroup/defaultProps.js +4 -0
- package/dist/cjs/RadioGroup/defaultProps.js.map +1 -1
- package/dist/cjs/RadioGroup/index.js +5 -1
- package/dist/cjs/RadioGroup/index.js.map +2 -2
- package/dist/cjs/RadioGroup/props.js +31 -11
- package/dist/cjs/RadioGroup/props.js.map +2 -2
- package/dist/cjs/RequiredMark/RequiredMark.js +4 -0
- package/dist/cjs/RequiredMark/RequiredMark.js.map +1 -1
- package/dist/cjs/RequiredMark/index.js +5 -1
- package/dist/cjs/RequiredMark/index.js.map +2 -2
- package/dist/cjs/SearchBox/index.js +4 -0
- package/dist/cjs/SearchBox/index.js.map +1 -1
- package/dist/cjs/TextBox/index.js +4 -0
- package/dist/cjs/TextBox/index.js.map +1 -1
- package/dist/cjs/TimeInput/DSTimeInput.js +42 -15
- package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/cjs/TimeInput/TimeInputImpl.js +32 -1
- package/dist/cjs/TimeInput/TimeInputImpl.js.map +2 -2
- package/dist/cjs/TimeInput/TimeInputs.js +6 -1
- package/dist/cjs/TimeInput/TimeInputs.js.map +2 -2
- package/dist/cjs/TimeInput/index.js +5 -1
- package/dist/cjs/TimeInput/index.js.map +2 -2
- package/dist/cjs/TimeInput/utils.js +4 -0
- package/dist/cjs/TimeInput/utils.js.map +1 -1
- package/dist/cjs/Toggle/DSToggle.js +70 -29
- package/dist/cjs/Toggle/DSToggle.js.map +2 -2
- package/dist/cjs/Toggle/DSToggleImpl.js +40 -3
- package/dist/cjs/Toggle/DSToggleImpl.js.map +2 -2
- package/dist/cjs/Toggle/DSToggleRender.js +4 -0
- package/dist/cjs/Toggle/DSToggleRender.js.map +1 -1
- package/dist/cjs/Toggle/index.js +5 -1
- package/dist/cjs/Toggle/index.js.map +2 -2
- package/dist/cjs/Toggle/props.js +37 -0
- package/dist/cjs/Toggle/props.js.map +1 -1
- package/dist/cjs/Toggle/toggleHelper.js +4 -0
- package/dist/cjs/Toggle/toggleHelper.js.map +1 -1
- package/dist/cjs/index.js +25 -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 +2 -2
- package/dist/esm/CheckboxGroup/index.js +1 -1
- package/dist/esm/CheckboxGroup/index.js.map +1 -1
- package/dist/esm/CheckboxGroup/props.js +20 -2
- package/dist/esm/CheckboxGroup/props.js.map +2 -2
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +48 -5
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.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 +7 -5
- package/dist/esm/DateInput/DSDateInput.js.map +2 -2
- package/dist/esm/DateInput/components/DateInputImpl.js +2 -1
- package/dist/esm/DateInput/components/DateInputImpl.js.map +2 -2
- package/dist/esm/DateInput/components/DateInputs.js +4 -1
- package/dist/esm/DateInput/components/DateInputs.js.map +2 -2
- package/dist/esm/DateInput/components/utils.js +1 -1
- package/dist/esm/DateInput/components/utils.js.map +1 -1
- package/dist/esm/DateInput/defaultProps.js +1 -1
- package/dist/esm/DateInput/defaultProps.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 +43 -1
- package/dist/esm/DateInput/props.js.map +2 -2
- 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 +7 -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 +31 -1
- package/dist/esm/DateInputV2/components/props.js.map +2 -2
- package/dist/esm/DateInputV2/components/styled.js.map +1 -1
- package/dist/esm/DateInputV2/components/utils.js +1 -1
- package/dist/esm/DateInputV2/components/utils.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 +66 -3
- package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +2 -2
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/esm/FloatingLabelInput/getSvgPath.js +3 -1
- package/dist/esm/FloatingLabelInput/getSvgPath.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 +12 -8
- package/dist/esm/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/esm/FormItem/Error/DSError.js +3 -1
- package/dist/esm/FormItem/Error/DSError.js.map +2 -2
- package/dist/esm/FormItem/Label/DSLabel.js +1 -1
- package/dist/esm/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/esm/FormItem/ValidationFieldWrapper.js +1 -0
- package/dist/esm/FormItem/ValidationFieldWrapper.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 +42 -2
- package/dist/esm/FormItem/props.js.map +2 -2
- package/dist/esm/InputGroup/DSInputGroup.js +21 -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 +16 -1
- package/dist/esm/InputGroup/props.js.map +2 -2
- package/dist/esm/InputMask/DSInputMask.js +9 -7
- package/dist/esm/InputMask/DSInputMask.js.map +2 -2
- package/dist/esm/InputMask/DSInputMaskDeprecated.js +9 -2
- package/dist/esm/InputMask/DSInputMaskDeprecated.js.map +2 -2
- 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/addons/AutoCorrectedDatePipe.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 +2 -2
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/NumberInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +2 -2
- 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 +2 -2
- package/dist/esm/InputMask/mask_types/SsnInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/index.js +9 -9
- package/dist/esm/InputMask/mask_types/index.js.map +2 -2
- package/dist/esm/InputMask/props.js +81 -1
- package/dist/esm/InputMask/props.js.map +2 -2
- 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 +6 -2
- package/dist/esm/InputProtected/props.js.map +2 -2
- 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 +67 -1
- package/dist/esm/LargeInputText/props.js.map +2 -2
- package/dist/esm/Radio/Circle.js.map +1 -1
- package/dist/esm/Radio/DSRadio.js +34 -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 +2 -2
- package/dist/esm/RadioGroup/index.js +1 -1
- package/dist/esm/RadioGroup/index.js.map +1 -1
- package/dist/esm/RadioGroup/props.js +17 -1
- package/dist/esm/RadioGroup/props.js.map +2 -2
- package/dist/esm/RequiredMark/index.js +1 -1
- package/dist/esm/RequiredMark/index.js.map +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js +26 -3
- package/dist/esm/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/esm/TimeInput/TimeInputImpl.js +28 -1
- package/dist/esm/TimeInput/TimeInputImpl.js.map +2 -2
- package/dist/esm/TimeInput/TimeInputs.js +2 -1
- package/dist/esm/TimeInput/TimeInputs.js.map +2 -2
- package/dist/esm/TimeInput/index.js +1 -1
- package/dist/esm/TimeInput/index.js.map +1 -1
- package/dist/esm/Toggle/DSToggle.js +55 -18
- package/dist/esm/Toggle/DSToggle.js.map +2 -2
- package/dist/esm/Toggle/DSToggleImpl.js +36 -3
- package/dist/esm/Toggle/DSToggleImpl.js.map +2 -2
- package/dist/esm/Toggle/index.js +1 -1
- package/dist/esm/Toggle/index.js.map +1 -1
- package/dist/esm/Toggle/props.js +33 -0
- package/dist/esm/Toggle/props.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 +19 -18
- 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
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { addLeadingZeros } from "@elliemae/ds-utilities";
|
|
3
3
|
import { parseInt, isNaN } from "@elliemae/ds-utilities";
|
|
4
4
|
import moment from "moment";
|
|
5
|
-
const currentYear = new Date().getFullYear();
|
|
5
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6
6
|
const getNextSibling = (elem, selector) => {
|
|
7
7
|
let sibling = elem.nextElementSibling;
|
|
8
8
|
if (!selector)
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/DateInputV2/components/utils.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { addLeadingZeros } from '@elliemae/ds-utilities';\nimport { parseInt, isNaN } from '@elliemae/ds-utilities';\nimport moment from 'moment';\n\nconst currentYear = new Date().getFullYear();\n\nconst getNextSibling = (elem, selector) => {\n // Get the next sibling element\n let sibling = elem.nextElementSibling;\n // If there's no selector, return the first sibling\n if (!selector) return sibling;\n\n // If the sibling matches our selector, use it\n // If not, jump to the next sibling and continue the loop\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.nextElementSibling;\n }\n return sibling;\n};\n\nconst getPreviousSibling = (elem, selector) => {\n let sibling = elem.previousElementSibling;\n if (!selector) return sibling;\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.previousElementSibling;\n }\n return sibling;\n};\n\nexport const isArrowIncrementDecrement = (key) => key === 'ArrowDown' || key === 'ArrowUp';\n\n// TODO remove and keep `true` behavior ( PUI-4141 )\nexport const setNativeValue = (element, value) => {\n if (!Object.getOwnPropertyDescriptor(element, 'value')) return;\n const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set;\n const prototype = Object.getPrototypeOf(element);\n const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set;\n\n if (valueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n valueSetter.call(element, value);\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nconst formatTimeNumber = (value, shouldAddLeadingZeros, leadingZeros) => {\n if (value === null || value === undefined) return '';\n return shouldAddLeadingZeros ? addLeadingZeros(leadingZeros)(value) : String(value);\n};\n\nexport const getFormattedDay = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n\n if (parsedValue > 31) return '31';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 2);\n};\n\nexport const getShouldShortcircuitDay = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 31) return true;\n // if the first input is in range 4-9 then there is no other option\n // so we auto advance\n if (parsedValue > 3 && parsedValue < 10) return true;\n return false;\n};\n\nexport const getFormattedYear = (value) => {\n const v = value.length > 4 ? value.slice(-4) : value;\n if (parseInt(v) > 9999) return '9999';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 4);\n};\n\nexport const getFormattedMonth = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 12) return '12';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 2);\n};\n\nexport const getShouldShortcircuitMonth = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 12) return true;\n // if the first input is in range 2-9 then there is no other option\n // so we auto advance\n if (parsedValue > 1 && parsedValue < 10) return true;\n return false;\n};\n\nexport const parseTimeNumberFromText = (stringValue) => {\n const parsedInt = parseInt(stringValue);\n\n if (isNaN(parsedInt)) return null;\n\n return parsedInt;\n};\n\n// trigger onBlur for entire DateInput control if focus is not in day, month, year\nexport const triggerOnBlur = (blurEvent, onBlur = () => {}) => {\n const { target: currentEl = {}, relatedTarget } = blurEvent || {};\n const nextElement = currentEl.nextElementSibling;\n const { nextElementSibling } = nextElement || {};\n // relatedTarget points to the element that is currently having focus\n if (!nextElementSibling || nextElementSibling !== relatedTarget) {\n onBlur(blurEvent);\n }\n};\n\nexport const focusNextInput = (currentEl) => {\n getNextSibling(currentEl, 'input')?.focus();\n};\n\nexport const focusPreviousInput = (currentEl) => {\n getPreviousSibling(currentEl, 'input')?.focus();\n};\n\nexport const getValidTimeNumber = ({ min, max }, number, valueString = '', onError = () => null) => {\n if (valueString === '0' || number === 0) return null;\n if (number === undefined || number === null) return null;\n if (number > max) {\n onError();\n return max;\n }\n if (number < min) {\n onError();\n return min;\n }\n return number;\n};\n\nexport const shouldFocusNextInput = (max, number = 0, stringValue) => {\n if (stringValue.length > 1) return true;\n return number * 10 > max;\n};\n\nexport const getDateValuesFromTime = (time, format) => {\n if (!time || !time.format) return {};\n const month = time.format('MM');\n const day = time.format('DD');\n const year = time.format('YYYY');\n return {\n month: getFormattedMonth(format, month),\n day: getFormattedDay(format, day),\n year: getFormattedYear(format, year),\n };\n};\n\nexport const resetTimeValues = () => ({\n month: '',\n day: '',\n year: '',\n});\n\nexport const onInputFocus = (e) => {\n e.preventDefault();\n e.stopPropagation();\n // we select the whole value to be able to override the value on first key\n // we don't use selection color to be consistent with the highlight of the input\n e.target.select();\n};\n\nexport const getNextTimeValue = (value, target, yearMinRange, yearMaxRange, step = 1, incrementing = true) => {\n const parsedValue = parseTimeNumberFromText(value);\n let result = incrementing ? parsedValue + step : parsedValue - step;\n if (target === 'year') {\n if (result < yearMinRange) result = currentYear;\n if (result > yearMaxRange) result = currentYear;\n }\n return result;\n};\n\nexport const focusNextInputIfNeeded = (currentEl, max, number, stringValue, currentKey) => {\n if (shouldFocusNextInput(max, number, stringValue) && !isArrowIncrementDecrement(currentKey)) {\n focusNextInput(currentEl);\n }\n};\n\nexport const commonInputProps = (digits = 2, onKeyDown, placeholder) => {\n const props = {\n pattern: '[0-9]*',\n placeholder,\n type: 'text',\n onKeyDown,\n onFocus: onInputFocus,\n };\n if (digits === 4) props.placeholder = 'YYYY';\n return props;\n};\n\nexport const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {\n // clone time to avoid mutation when INTERNAL_V2_NO_MUTATION is true\n const newDate = INTERNAL_V2_NO_MUTATION ? (time && moment(time)) || moment() : time || moment();\n\n const { year, month, day } = date;\n const { showYear, showMonth, showDay } = show;\n\n if (time && !year && !month && !day) return '';\n\n newDate.value = `${year}-${month}-${day}`;\n\n if (showMonth && month) newDate.month(parseInt(month - 1, 10));\n if (showDay && day) newDate.date(parseInt(day, 10));\n if (showYear && year) newDate.year(parseInt(year, 10));\n\n return newDate;\n};\n\nexport const isTimeCompletelySet = (date, show, range) => {\n let neededValues = [];\n const { year, month, day } = date;\n const { showYear, showMonth, showDay } = show;\n const { yearMinRange, yearMaxRange } = range;\n\n if (showMonth) neededValues = [...neededValues, month || null];\n if (showDay) neededValues = [...neededValues, day || null];\n if (showYear) neededValues = [...neededValues, year || null];\n\n const isValidYear = year < yearMaxRange && year > yearMinRange;\n\n return !neededValues.some((value) => !value) && isValidYear;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,uBAAuB;AAChC,SAAS,UAAU,aAAa;AAChC,OAAO,YAAY;AAEnB,MAAM,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,uBAAuB;AAChC,SAAS,UAAU,aAAa;AAChC,OAAO,YAAY;AAEnB,MAAM,eAAc,oBAAI,KAAK,GAAE,YAAY;AAE3C,MAAM,iBAAiB,CAAC,MAAM,aAAa;AAEzC,MAAI,UAAU,KAAK;AAEnB,MAAI,CAAC;AAAU,WAAO;AAItB,SAAO,SAAS;AACd,QAAI,QAAQ,QAAQ,QAAQ;AAAG,aAAO;AACtC,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO;AACT;AAEA,MAAM,qBAAqB,CAAC,MAAM,aAAa;AAC7C,MAAI,UAAU,KAAK;AACnB,MAAI,CAAC;AAAU,WAAO;AACtB,SAAO,SAAS;AACd,QAAI,QAAQ,QAAQ,QAAQ;AAAG,aAAO;AACtC,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO;AACT;AAEO,MAAM,4BAA4B,CAAC,QAAQ,QAAQ,eAAe,QAAQ;AAG1E,MAAM,iBAAiB,CAAC,SAAS,UAAU;AAChD,MAAI,CAAC,OAAO,yBAAyB,SAAS,OAAO;AAAG;AACxD,QAAM,cAAc,OAAO,yBAAyB,SAAS,OAAO,EAAE;AACtE,QAAM,YAA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sB,CAAC,MAAM,MAAM,MAAM,4BAA4B;AAEhF,QAAM,UAAU,0BAA2B,QAAQ,OAAO,IAAI,KAAM,OAAO,IAAI,QAAQ,OAAO;AAE9F,QAAM,EAAE,MAAM,OAAO,IAAI,IAAI;AAC7B,QAAM,EAAE,UAAU,WAAW,QAAQ,IAAI;AAEzC,MAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;AAAK,WAAO;AAE5C,UAAQ,QAAQ,GAAG,QAAQ,SAAS;AAEpC,MAAI,aAAa;AAAO,YAAQ,MAAM,SAAS,QAAQ,GAAG,EAAE,CAAC;AAC7D,MAAI,WAAW;AAAK,YAAQ,KAAK,SAAS,KAAK,EAAE,CAAC;AAClD,MAAI,YAAY;AAAM,YAAQ,KAAK,SAAS,MAAM,EAAE,CAAC;AAErD,SAAO;AACT;AAEO,MAAM,sBAAsB,CAAC,MAAM,MAAM,UAAU;AACxD,MAAI,eAAe,CAAC;AACpB,QAAM,EAAE,MAAM,OAAO,IAAI,IAAI;AAC7B,QAAM,EAAE,UAAU,WAAW,QAAQ,IAAI;AACzC,QAAM,EAAE,cAAc,aAAa,IAAI;AAEvC,MAAI;AAAW,mBAAe,CAAC,GAAG,cAAc,SAAS,IAAI;AAC7D,MAAI;AAAS,mBAAe,CAAC,GAAG,cAAc,OAAO,IAAI;AACzD,MAAI;AAAU,mBAAe,CAAC,GAAG,cAAc,QAAQ,IAAI;AAE3D,QAAM,cAAc,OAAO,gBAAgB,OAAO;AAElD,SAAO,CAAC,aAAa,KAAK,CAAC,UAAU,CAAC,KAAK,KAAK;AAClD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { DateInputs } from "./components/DateInputs";
|
|
3
|
-
export * from "./components/DSDateInput";
|
|
2
|
+
import { DateInputs } from "./components/DateInputs.js";
|
|
3
|
+
export * from "./components/DSDateInput.js";
|
|
4
4
|
export {
|
|
5
5
|
DateInputs as DateInputsV2Impl
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/DateInputV2/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DateInputs as DateInputsV2Impl } from './components/DateInputs';\nexport * from './components/DSDateInput';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DateInputs as DateInputsV2Impl } from './components/DateInputs.js';\nexport * from './components/DSDateInput.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAuB,kBAAwB;AAC/C,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ExpandableInputImpl } from "./ExpandableInputImpl";
|
|
3
|
+
import { ExpandableInputImpl } from "./ExpandableInputImpl.js";
|
|
4
4
|
const DSExpandableInput = ({
|
|
5
5
|
containerProps = {},
|
|
6
6
|
innerRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/ExpandableInput/DSExpandableInput.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ExpandableInputImpl } from './ExpandableInputImpl';\n\nconst DSExpandableInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n triggerComponent = undefined,\n children,\n isOpen = false,\n onOpen = () => null,\n onClose = () => null,\n onBlur = () => null,\n width = undefined,\n}) => (\n <ExpandableInputImpl\n className={className}\n containerProps={containerProps}\n innerRef={innerRef}\n isOpen={isOpen}\n onBlur={onBlur}\n onClose={onClose}\n onOpen={onOpen}\n style={style}\n triggerComponent={triggerComponent}\n width={width}\n >\n {children}\n </ExpandableInputImpl>\n);\n\nexport { DSExpandableInput };\nexport default DSExpandableInput;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ExpandableInputImpl } from './ExpandableInputImpl.js';\n\nconst DSExpandableInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n triggerComponent = undefined,\n children,\n isOpen = false,\n onOpen = () => null,\n onClose = () => null,\n onBlur = () => null,\n width = undefined,\n}) => (\n <ExpandableInputImpl\n className={className}\n containerProps={containerProps}\n innerRef={innerRef}\n isOpen={isOpen}\n onBlur={onBlur}\n onClose={onClose}\n onOpen={onOpen}\n style={style}\n triggerComponent={triggerComponent}\n width={width}\n >\n {children}\n </ExpandableInputImpl>\n);\n\nexport { DSExpandableInput };\nexport default DSExpandableInput;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBrB;AAfF,SAAS,2BAA2B;AAEpC,MAAM,oBAAoB,CAAC;AAAA,EACzB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,mBAAmB;AAAA,EACnB;AAAA,EACA,SAAS;AAAA,EACT,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAAA,EACf,QAAQ;AACV,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAIF,IAAO,4BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import React2, { Component, cloneElement } from "react";
|
|
4
4
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
5
5
|
import { isFunction } from "@elliemae/ds-shared";
|
|
6
|
-
import { InputAddonWrapper } from "../Input";
|
|
6
|
+
import { InputAddonWrapper } from "../Input/index.js";
|
|
7
7
|
const blockName = "expandable-input";
|
|
8
8
|
const ExpandableInput = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({ opened: isOpen }));
|
|
9
9
|
const InputWrapper = aggregatedClasses(InputAddonWrapper)(blockName, "wrapper", ({ isOpen }) => ({ opened: isOpen }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/ExpandableInput/ExpandableInputImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component, cloneElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { isFunction } from '@elliemae/ds-shared';\nimport { InputAddonWrapper } from '../Input';\n\nconst blockName = 'expandable-input';\n\nconst ExpandableInput = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\nconst InputWrapper = aggregatedClasses(InputAddonWrapper)(blockName, 'wrapper', ({ isOpen }) => ({ opened: isOpen }));\n\nclass ExpandableInputImpl extends Component {\n componentDidUpdate(prevProps) {\n const { isOpen } = this.props;\n if (isOpen && isOpen !== prevProps.isOpen) this.input.focus();\n }\n\n render() {\n const { innerRef, triggerComponent, children, width, isOpen, onOpen, onClose, onBlur, containerProps } = this.props;\n const InputComponent = React.Children.only(children);\n const handleTriggerClick = (e) => {\n if (isFunction(triggerComponent.onClick)) triggerComponent.onClick(e);\n if (isOpen) {\n onClose();\n } else {\n onOpen();\n }\n };\n\n return (\n <ExpandableInput\n {...containerProps}\n classProps={{ isOpen }}\n innerRef={innerRef}\n style={{ width: isOpen && width }}\n >\n <InputWrapper\n rightComponents={[\n cloneElement(triggerComponent, {\n key: 'handler',\n onClick: handleTriggerClick,\n }),\n ]}\n >\n {cloneElement(InputComponent, {\n className: 'expandable-input__input',\n innerRef: (node) => (this.input = node),\n onBlur,\n })}\n </InputWrapper>\n </ExpandableInput>\n );\n }\n}\n\nexport { ExpandableInputImpl };\nexport default ExpandableInputImpl;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component, cloneElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { isFunction } from '@elliemae/ds-shared';\nimport { InputAddonWrapper } from '../Input/index.js';\n\nconst blockName = 'expandable-input';\n\nconst ExpandableInput = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({ opened: isOpen }));\nconst InputWrapper = aggregatedClasses(InputAddonWrapper)(blockName, 'wrapper', ({ isOpen }) => ({ opened: isOpen }));\n\nclass ExpandableInputImpl extends Component {\n componentDidUpdate(prevProps) {\n const { isOpen } = this.props;\n if (isOpen && isOpen !== prevProps.isOpen) this.input.focus();\n }\n\n render() {\n const { innerRef, triggerComponent, children, width, isOpen, onOpen, onClose, onBlur, containerProps } = this.props;\n const InputComponent = React.Children.only(children);\n const handleTriggerClick = (e) => {\n if (isFunction(triggerComponent.onClick)) triggerComponent.onClick(e);\n if (isOpen) {\n onClose();\n } else {\n onOpen();\n }\n };\n\n return (\n <ExpandableInput\n {...containerProps}\n classProps={{ isOpen }}\n innerRef={innerRef}\n style={{ width: isOpen && width }}\n >\n <InputWrapper\n rightComponents={[\n cloneElement(triggerComponent, {\n key: 'handler',\n onClick: handleTriggerClick,\n }),\n ]}\n >\n {cloneElement(InputComponent, {\n className: 'expandable-input__input',\n innerRef: (node) => (this.input = node),\n onBlur,\n })}\n </InputWrapper>\n </ExpandableInput>\n );\n }\n}\n\nexport { ExpandableInputImpl };\nexport default ExpandableInputImpl;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACmCf;AAnCR,OAAOA,UAAS,WAAW,oBAAoB;AAC/C,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAElB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|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/ExpandableInput/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSExpandableInput';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSExpandableInput.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,90 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { FloatingLabelInputImpl } from "./FloatingLabelInputImpl";
|
|
4
|
-
import { DSLabel } from "../FormItem/Label/DSLabel";
|
|
5
|
-
import { DSTextBox } from "../TextBox";
|
|
3
|
+
import { FloatingLabelInputImpl } from "./FloatingLabelInputImpl.js";
|
|
4
|
+
import { DSLabel } from "../FormItem/Label/DSLabel.js";
|
|
5
|
+
import { DSTextBox } from "../TextBox/index.js";
|
|
6
6
|
const noop = () => {
|
|
7
7
|
};
|
|
8
8
|
const DSFloatingLabelInput = ({
|
|
9
9
|
containerProps = {},
|
|
10
10
|
arialLabel = "",
|
|
11
|
+
/**
|
|
12
|
+
* Gets the reference for the input controller
|
|
13
|
+
*
|
|
14
|
+
* @param {HTMLElement} node
|
|
15
|
+
*/
|
|
11
16
|
innerRef = noop,
|
|
17
|
+
/**
|
|
18
|
+
* Custom className for floatingLabelInput
|
|
19
|
+
*/
|
|
12
20
|
className = "",
|
|
21
|
+
/**
|
|
22
|
+
* Props injected to the input component
|
|
23
|
+
*
|
|
24
|
+
* @type Object
|
|
25
|
+
*/
|
|
13
26
|
extraInputProps = {},
|
|
27
|
+
/**
|
|
28
|
+
* Input controller
|
|
29
|
+
*
|
|
30
|
+
* @type {element}
|
|
31
|
+
*/
|
|
14
32
|
inputComponent = DSTextBox,
|
|
33
|
+
/**
|
|
34
|
+
* Input value
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
15
38
|
value = "",
|
|
39
|
+
/**
|
|
40
|
+
* Label component
|
|
41
|
+
*
|
|
42
|
+
* @type {element}
|
|
43
|
+
*/
|
|
16
44
|
labelComponent = DSLabel,
|
|
45
|
+
/**
|
|
46
|
+
* Label text
|
|
47
|
+
*
|
|
48
|
+
* @type {string | element}
|
|
49
|
+
*/
|
|
17
50
|
labelText = null,
|
|
51
|
+
/**
|
|
52
|
+
* Callback when input controller has changed
|
|
53
|
+
*
|
|
54
|
+
* @param event
|
|
55
|
+
*/
|
|
18
56
|
onChange = noop,
|
|
19
57
|
onBlur = noop,
|
|
20
58
|
onFocus = noop,
|
|
59
|
+
/**
|
|
60
|
+
* Whether the label is floating or not
|
|
61
|
+
*
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
*/
|
|
21
64
|
isOpen = false,
|
|
65
|
+
/**
|
|
66
|
+
* Whether ...
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
*/
|
|
22
70
|
hasError = false,
|
|
71
|
+
/**
|
|
72
|
+
* Whether ...
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
*/
|
|
23
76
|
readOnly = false,
|
|
77
|
+
/**
|
|
78
|
+
* Whether ...
|
|
79
|
+
*
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
*/
|
|
24
82
|
disabled = false,
|
|
83
|
+
/**
|
|
84
|
+
* Whether ...
|
|
85
|
+
*
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
*/
|
|
25
88
|
required = false,
|
|
26
89
|
optional = false,
|
|
27
90
|
mask = null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FloatingLabelInput/DSFloatingLabelInput.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { FloatingLabelInputImpl } from './FloatingLabelInputImpl';\nimport { DSLabel } from '../FormItem/Label/DSLabel';\nimport { DSTextBox } from '../TextBox';\n\nconst noop = () => {};\nconst DSFloatingLabelInput = ({\n containerProps = {},\n arialLabel = '',\n /**\n * Gets the reference for the input controller\n *\n * @param {HTMLElement} node\n */\n innerRef = noop,\n /**\n * Custom className for floatingLabelInput\n */\n className = '',\n /**\n * Props injected to the input component\n *\n * @type Object\n */\n extraInputProps = {},\n /**\n * Input controller\n *\n * @type {element}\n */\n inputComponent = DSTextBox,\n /**\n * Input value\n *\n * @type {string}\n */\n value = '',\n /**\n * Label component\n *\n * @type {element}\n */\n labelComponent = DSLabel,\n /**\n * Label text\n *\n * @type {string | element}\n */\n labelText = null,\n /**\n * Callback when input controller has changed\n *\n * @param event\n */\n onChange = noop,\n onBlur = noop,\n onFocus = noop,\n /**\n * Whether the label is floating or not\n *\n * @type {boolean}\n */\n isOpen = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n hasError = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n readOnly = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n disabled = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n required = false,\n optional = false,\n mask = null,\n useSubfix = '',\n}) => (\n <FloatingLabelInputImpl\n arialLabel={arialLabel}\n className={className}\n disabled={disabled}\n extraInputProps={extraInputProps}\n hasError={hasError}\n innerRef={innerRef}\n inputComponent={inputComponent}\n isOpen={isOpen}\n labelComponent={labelComponent}\n labelText={labelText}\n mask={mask}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n optional={optional}\n readOnly={readOnly}\n required={required}\n useSubfix={useSubfix}\n value={value}\n />\n);\n\nexport { DSFloatingLabelInput };\nexport default DSFloatingLabelInput;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC2FrB;AA1FF,SAAS,8BAA8B;AACvC,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAE1B,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,uBAAuB,CAAC;AAAA,EAC5B,iBAAiB,CAAC;AAAA,EAClB,aAAa;AAAA,EAMb,WAAW;AAAA,EAIX,YAAY;AAAA,EAMZ,kBAAkB,CAAC;AAAA,EAMnB,iBAAiB;AAAA,EAMjB,QAAQ;AAAA,EAMR,iBAAiB;AAAA,EAMjB,YAAY;AAAA,EAMZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EAMV,SAAS;AAAA,EAMT,WAAW;AAAA,EAMX,WAAW;AAAA,EAMX,WAAW;AAAA,EAMX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AACd,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAIF,IAAO,+BAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { FloatingLabelInputImpl } from './FloatingLabelInputImpl.js';\nimport { DSLabel } from '../FormItem/Label/DSLabel.js';\nimport { DSTextBox } from '../TextBox/index.js';\n\nconst noop = () => {};\nconst DSFloatingLabelInput = ({\n containerProps = {},\n arialLabel = '',\n /**\n * Gets the reference for the input controller\n *\n * @param {HTMLElement} node\n */\n innerRef = noop,\n /**\n * Custom className for floatingLabelInput\n */\n className = '',\n /**\n * Props injected to the input component\n *\n * @type Object\n */\n extraInputProps = {},\n /**\n * Input controller\n *\n * @type {element}\n */\n inputComponent = DSTextBox,\n /**\n * Input value\n *\n * @type {string}\n */\n value = '',\n /**\n * Label component\n *\n * @type {element}\n */\n labelComponent = DSLabel,\n /**\n * Label text\n *\n * @type {string | element}\n */\n labelText = null,\n /**\n * Callback when input controller has changed\n *\n * @param event\n */\n onChange = noop,\n onBlur = noop,\n onFocus = noop,\n /**\n * Whether the label is floating or not\n *\n * @type {boolean}\n */\n isOpen = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n hasError = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n readOnly = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n disabled = false,\n /**\n * Whether ...\n *\n * @type {boolean}\n */\n required = false,\n optional = false,\n mask = null,\n useSubfix = '',\n}) => (\n <FloatingLabelInputImpl\n arialLabel={arialLabel}\n className={className}\n disabled={disabled}\n extraInputProps={extraInputProps}\n hasError={hasError}\n innerRef={innerRef}\n inputComponent={inputComponent}\n isOpen={isOpen}\n labelComponent={labelComponent}\n labelText={labelText}\n mask={mask}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n optional={optional}\n readOnly={readOnly}\n required={required}\n useSubfix={useSubfix}\n value={value}\n />\n);\n\nexport { DSFloatingLabelInput };\nexport default DSFloatingLabelInput;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2FrB;AA1FF,SAAS,8BAA8B;AACvC,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAE1B,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,uBAAuB,CAAC;AAAA,EAC5B,iBAAiB,CAAC;AAAA,EAClB,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMb,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMZ,kBAAkB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMR,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMV,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AACd,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAIF,IAAO,+BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,8 +5,8 @@ import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
|
5
5
|
import { getComponentFromProps } from "@elliemae/ds-utilities";
|
|
6
6
|
import { DSTextWrapper } from "@elliemae/ds-text-wrapper";
|
|
7
7
|
import { ResizeObserver } from "resize-observer";
|
|
8
|
-
import { getSvgPath } from "./getSvgPath";
|
|
9
|
-
import { RequiredMark } from "../RequiredMark/RequiredMark";
|
|
8
|
+
import { getSvgPath } from "./getSvgPath.js";
|
|
9
|
+
import { RequiredMark } from "../RequiredMark/RequiredMark.js";
|
|
10
10
|
const blockName = "labeled-outline";
|
|
11
11
|
const Wrapper = aggregatedClasses("div")(blockName, null, ({ isOpen }) => ({
|
|
12
12
|
"has-value": isOpen
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FloatingLabelInput/FloatingLabelInputImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { getComponentFromProps } from '@elliemae/ds-utilities';\nimport { DSTextWrapper } from '@elliemae/ds-text-wrapper';\nimport { ResizeObserver } from 'resize-observer';\nimport { getSvgPath } from './getSvgPath';\nimport { RequiredMark } from '../RequiredMark/RequiredMark';\n\nconst blockName = 'labeled-outline';\n\nconst Wrapper = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({\n 'has-value': isOpen,\n}));\nconst FloatingLabel = aggregatedClasses('label')(blockName, 'label');\nconst OutlineIdle = aggregatedClasses('div')(blockName, 'idle');\nconst Outline = aggregatedClasses('div')(blockName, 'outline');\nconst OutlinePath = aggregatedClasses('path')(blockName, 'outline__path');\n\nconst shouldUpdateSvgPath = ({ width, height, labelWidth }, prevSizes) => {\n if (width !== prevSizes.width) return true;\n if (height !== prevSizes.height) return true;\n return labelWidth !== prevSizes.labelWidth;\n};\n\nclass FloatingLabelInputImpl extends Component {\n resizeObserver = new ResizeObserver(() => this.updatePath());\n\n prevSizes = {};\n\n static defaultProps = { onChange: () => null };\n\n constructor(props) {\n super(props);\n this.wrapperRef = React.createRef();\n this.outlinePathRef = React.createRef();\n this.outlineIdleRef = React.createRef();\n this.labelRef = React.createRef();\n\n this.sizes = this.sizes.bind(this);\n this.isOpened = this.isOpened.bind(this);\n this.getValue = this.getValue.bind(this);\n this.updatePath = this.updatePath.bind(this);\n }\n\n componentDidMount() {\n this.resizeObserver.observe(this.wrapperRef.current);\n }\n\n componentDidUpdate() {\n if (!shouldUpdateSvgPath(this.sizes, this.prevSizes)) return;\n this.updatePath();\n }\n\n componentWillUnmount() {\n this.resizeObserver.unobserve(this.wrapperRef.current);\n }\n\n get sizes() {\n const { current: labelEl } = this.labelRef;\n const { current: wrapperEl } = this.wrapperRef;\n const { current: outlineIdleEl } = this.outlineIdleRef;\n const elStyles = window.getComputedStyle(outlineIdleEl);\n const leftRadius = elStyles.getPropertyValue('border-top-left-radius');\n const rightRadius = elStyles.getPropertyValue('border-top-right-radius');\n const hasLeftRadius = parseFloat(leftRadius) !== 0;\n const hasRightRadius = parseFloat(rightRadius) !== 0;\n return {\n labelWidth: labelEl.offsetWidth * 0.9,\n width: wrapperEl.offsetWidth,\n height: wrapperEl.offsetHeight,\n radiusStyle: leftRadius,\n hasLeftRadius,\n hasRightRadius,\n };\n }\n\n get isOpened() {\n const { focused, isOpen, value } = this.props;\n return focused || (Array.isArray(value) ? !!value.length : !!value) || isOpen;\n }\n\n getValue(value) {\n const { valueAccessor } = this.props;\n if (valueAccessor) return valueAccessor(value);\n // is an event\n if (value && value.target) return value.target.value;\n\n return value;\n }\n\n updatePath() {\n const path = getSvgPath(this.sizes);\n this.prevSizes = this.sizes;\n this.outlinePathRef.current.setAttribute('d', path);\n }\n\n render() {\n const {\n ariaLabel,\n hasError,\n readOnly,\n disabled,\n inputComponent,\n labelText,\n onBlur,\n onFocus,\n innerRef,\n extraInputProps,\n required,\n value,\n onChange,\n mask,\n useSubfix,\n optional,\n } = this.props;\n\n const inputProps = {\n ariaLabel,\n className: 'floating-label-input-controller',\n disabled,\n hasError,\n onBlur,\n onChange,\n onFocus,\n readOnly,\n value,\n innerRef,\n mask,\n useSubfix,\n ...extraInputProps,\n };\n const InputComponent = getComponentFromProps(inputComponent, inputProps);\n const isOpen = this.isOpened;\n\n return (\n <Wrapper\n classProps={{\n hasError,\n isOpen,\n readOnly,\n disabled,\n }}\n innerRef={this.wrapperRef}\n onBlur={() => null}\n onFocus={() => null}\n onMouseOut={this.handleMouseOut}\n onMouseOver={this.handleMouseOver}\n >\n {InputComponent}\n <FloatingLabel classProps={{ isOpen }} innerRef={this.labelRef}>\n <DSTextWrapper maxWidth=\"100%\" text={labelText} />\n <RequiredMark optional={optional} required={required} />\n </FloatingLabel>\n <Outline>\n <svg>\n <OutlinePath innerRef={this.outlinePathRef} />\n </svg>\n </Outline>\n <OutlineIdle innerRef={this.outlineIdleRef} />\n </Wrapper>\n );\n }\n}\n\nexport { FloatingLabelInputImpl };\nexport default FloatingLabelInputImpl;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { getComponentFromProps } from '@elliemae/ds-utilities';\nimport { DSTextWrapper } from '@elliemae/ds-text-wrapper';\nimport { ResizeObserver } from 'resize-observer';\nimport { getSvgPath } from './getSvgPath.js';\nimport { RequiredMark } from '../RequiredMark/RequiredMark.js';\n\nconst blockName = 'labeled-outline';\n\nconst Wrapper = aggregatedClasses('div')(blockName, null, ({ isOpen }) => ({\n 'has-value': isOpen,\n}));\nconst FloatingLabel = aggregatedClasses('label')(blockName, 'label');\nconst OutlineIdle = aggregatedClasses('div')(blockName, 'idle');\nconst Outline = aggregatedClasses('div')(blockName, 'outline');\nconst OutlinePath = aggregatedClasses('path')(blockName, 'outline__path');\n\nconst shouldUpdateSvgPath = ({ width, height, labelWidth }, prevSizes) => {\n if (width !== prevSizes.width) return true;\n if (height !== prevSizes.height) return true;\n return labelWidth !== prevSizes.labelWidth;\n};\n\nclass FloatingLabelInputImpl extends Component {\n resizeObserver = new ResizeObserver(() => this.updatePath());\n\n prevSizes = {};\n\n static defaultProps = { onChange: () => null };\n\n constructor(props) {\n super(props);\n this.wrapperRef = React.createRef();\n this.outlinePathRef = React.createRef();\n this.outlineIdleRef = React.createRef();\n this.labelRef = React.createRef();\n\n this.sizes = this.sizes.bind(this);\n this.isOpened = this.isOpened.bind(this);\n this.getValue = this.getValue.bind(this);\n this.updatePath = this.updatePath.bind(this);\n }\n\n componentDidMount() {\n this.resizeObserver.observe(this.wrapperRef.current);\n }\n\n componentDidUpdate() {\n if (!shouldUpdateSvgPath(this.sizes, this.prevSizes)) return;\n this.updatePath();\n }\n\n componentWillUnmount() {\n this.resizeObserver.unobserve(this.wrapperRef.current);\n }\n\n get sizes() {\n const { current: labelEl } = this.labelRef;\n const { current: wrapperEl } = this.wrapperRef;\n const { current: outlineIdleEl } = this.outlineIdleRef;\n const elStyles = window.getComputedStyle(outlineIdleEl);\n const leftRadius = elStyles.getPropertyValue('border-top-left-radius');\n const rightRadius = elStyles.getPropertyValue('border-top-right-radius');\n const hasLeftRadius = parseFloat(leftRadius) !== 0;\n const hasRightRadius = parseFloat(rightRadius) !== 0;\n return {\n labelWidth: labelEl.offsetWidth * 0.9,\n width: wrapperEl.offsetWidth,\n height: wrapperEl.offsetHeight,\n radiusStyle: leftRadius,\n hasLeftRadius,\n hasRightRadius,\n };\n }\n\n get isOpened() {\n const { focused, isOpen, value } = this.props;\n return focused || (Array.isArray(value) ? !!value.length : !!value) || isOpen;\n }\n\n getValue(value) {\n const { valueAccessor } = this.props;\n if (valueAccessor) return valueAccessor(value);\n // is an event\n if (value && value.target) return value.target.value;\n\n return value;\n }\n\n updatePath() {\n const path = getSvgPath(this.sizes);\n this.prevSizes = this.sizes;\n this.outlinePathRef.current.setAttribute('d', path);\n }\n\n render() {\n const {\n ariaLabel,\n hasError,\n readOnly,\n disabled,\n inputComponent,\n labelText,\n onBlur,\n onFocus,\n innerRef,\n extraInputProps,\n required,\n value,\n onChange,\n mask,\n useSubfix,\n optional,\n } = this.props;\n\n const inputProps = {\n ariaLabel,\n className: 'floating-label-input-controller',\n disabled,\n hasError,\n onBlur,\n onChange,\n onFocus,\n readOnly,\n value,\n innerRef,\n mask,\n useSubfix,\n ...extraInputProps,\n };\n const InputComponent = getComponentFromProps(inputComponent, inputProps);\n const isOpen = this.isOpened;\n\n return (\n <Wrapper\n classProps={{\n hasError,\n isOpen,\n readOnly,\n disabled,\n }}\n innerRef={this.wrapperRef}\n onBlur={() => null}\n onFocus={() => null}\n onMouseOut={this.handleMouseOut}\n onMouseOver={this.handleMouseOver}\n >\n {InputComponent}\n <FloatingLabel classProps={{ isOpen }} innerRef={this.labelRef}>\n <DSTextWrapper maxWidth=\"100%\" text={labelText} />\n <RequiredMark optional={optional} required={required} />\n </FloatingLabel>\n <Outline>\n <svg>\n <OutlinePath innerRef={this.outlinePathRef} />\n </svg>\n </Outline>\n <OutlineIdle innerRef={this.outlineIdleRef} />\n </Wrapper>\n );\n }\n}\n\nexport { FloatingLabelInputImpl };\nexport default FloatingLabelInputImpl;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACsJf,SACE,KADF;AArJR,OAAOA,UAAS,iBAAiB;AACjC,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAE7B,MAAM,YAAY;AAElB,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,OAAO,OAAO;AAAA,EACzE,aAAa;AACf,EAAE;AACF,MAAM,gBAAgB,kBAAkB,OAAO,EAAE,WAAW,OAAO;AACnE,MAAM,cAAc,kBAAkB,KAAK,EAAE,WAAW,MAAM;AAC9D,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,SAAS;AAC7D,MAAM,cAAc,kBAAkB,MAAM,EAAE,WAAW,eAAe;AAExE,MAAM,sBAAsB,CAAC,EAAE,OAAO,QAAQ,WAAW,GAAG,cAAc;AACxE,MAAI,UAAU,UAAU;AAAO,WAAO;AACtC,MAAI,WAAW,UAAU;AAAQ,WAAO;AACxC,SAAO,eAAe,UAAU;AAClC;AAEA,MAAM,+BAA+B,UAAU;AAAA,EAO7C,YAAY,OAAO;AACjB,UAAM,KAAK;AAPb,0BAAiB,IAAI,eAAe,MAAM,KAAK,WAAW,CAAC;AAE3D,qBAAY,CAAC;AAMX,SAAK,aAAaA,OAAM,UAAU;AAClC,SAAK,iBAAiBA,OAAM,UAAU;AACtC,SAAK,iBAAiBA,OAAM,UA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AAAA,IAC9C;AAAA,EAEJ;AACF;AA1IM,uBAKG,eAAe,EAAE,UAAU,MAAM,KAAK;AAwI/C,IAAO,iCAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -28,7 +28,9 @@ function getSvgPath({
|
|
|
28
28
|
if (!hasLeftRadius && hasRightRadius || hasRightRadius && hasLeftRadius) {
|
|
29
29
|
extraSizeForTopH = 0;
|
|
30
30
|
}
|
|
31
|
-
const pathMiddle = (hasRightRadius ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius : "") + "v" + (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) +
|
|
31
|
+
const pathMiddle = (hasRightRadius ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius : "") + "v" + (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) + // right vertical line
|
|
32
|
+
(hasRightRadius ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + radius : "") + "h" + (-width + 2 * cornerWidth - extraSizeForH) + (hasLeftRadius ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + -radius : "") + "v" + (-height + (2 * cornerWidth - (extraSizeForLeftV + 1.5))) + // left vertical line
|
|
33
|
+
(hasLeftRadius ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + -radius : "");
|
|
32
34
|
let path;
|
|
33
35
|
if (!isRtl) {
|
|
34
36
|
path = "M" + (cornerWidth + leadingStrokeLength + paddedNotchWidth) + "," + 0.5 + "h" + (width - 2 * cornerWidth - paddedNotchWidth - leadingStrokeLength + extraSizeForTopH) + pathMiddle + "h" + leadingStrokeLength;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FloatingLabelInput/getSvgPath.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable prefer-template,max-statements,no-nested-ternary */\nfunction getSvgPath({\n labelWidth = 50,\n width = 200,\n height = 35,\n radiusStyle,\n hasRightRadius = true,\n hasLeftRadius = true,\n}) {\n const notchWidth = labelWidth;\n const isRtl = false;\n\n const radius = parseFloat(radiusStyle);\n const cornerWidth = radius + 1.3;\n const leadingStrokeLength = 4;\n const paddedNotchWidth = notchWidth + 8;\n\n let extraSizeForH = 0;\n let extraSizeForLeftV = 0;\n let extraSizeForRightV = 0;\n let extraSizeForTopH = radius;\n\n if (!hasRightRadius) {\n extraSizeForH += radius;\n extraSizeForRightV = radius * 2;\n }\n if (!hasLeftRadius) {\n extraSizeForH += radius;\n extraSizeForLeftV = radius * 2;\n }\n\n if ((!hasLeftRadius && hasRightRadius) || (hasRightRadius && hasLeftRadius)) {\n extraSizeForTopH = 0;\n }\n\n const pathMiddle =\n '' +\n (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + radius : '') +\n 'v' +\n (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) + // right vertical line\n (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + radius : '') +\n 'h' +\n (-width + 2 * cornerWidth - extraSizeForH) +\n (hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + -radius : '') +\n 'v' +\n (-height + (2 * cornerWidth - (extraSizeForLeftV + 1.5))) + // left vertical line\n (hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + -radius : '');\n\n let path;\n if (!isRtl) {\n path =\n '' +\n 'M' +\n (cornerWidth + leadingStrokeLength + paddedNotchWidth) +\n ',' +\n 0.5 +\n 'h' +\n (width - 2 * cornerWidth - paddedNotchWidth - leadingStrokeLength + extraSizeForTopH) +\n pathMiddle +\n 'h' +\n leadingStrokeLength;\n } else {\n path =\n '' +\n 'M' +\n (width - cornerWidth - leadingStrokeLength) +\n ',' +\n 0.5 +\n 'h' +\n leadingStrokeLength +\n pathMiddle +\n 'h' +\n (width - 2 * cornerWidth - paddedNotchWid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;AACjB,yBAAqB,SAAS;AAAA,EAChC;AACA,MAAI,CAAC,eAAe;AAClB,qBAAiB;AACjB,wBAAoB,SAAS;AAAA,EAC/B;AAEA,MAAK,CAAC,iBAAiB,kBAAoB,kBAAkB,eAAgB;AAC3E,uBAAmB;AAAA,EACrB;AAEA,QAAM,cAEH,iBAAiB,MAAM,SAAS,MAAM,SAAS,YAAY,SAAS,MAAM,SAAS,MACpF,OACC,UAAU,IAAI,eAAe,qBAAqB;AAAA,GAClD,iBAAiB,MAAM,SAAS,MAAM,SAAS,YAAY,CAAC,SAAS,MAAM,SAAS,MACrF,OACC,CAAC,QAAQ,IAAI,cAAc,kBAC3B,gBAAgB,MAAM,SAAS,MAAM,SAAS,YAAY,CAAC,SAAS,MAAM,CAAC,SAAS,MACrF,OACC,CAAC,UAAU,IAAI,eAAe,oBAAoB;AAAA,GAClD,gBAAgB,MAAM,SAAS,MAAM,SAAS,YAAY,SAAS,MAAM,CAAC,SAAS;AAEtF,MAAI;AACJ,MAAI,CAAC,OAAO;AACV,WACE,OAEC,cAAc,sBAAsB,oBACrC,MACA,MACA,OACC,QAAQ,IAAI,cAAc,mBAAmB,sBAAsB,oBACpE,aACA,MACA;AAAA,EACJ,OAAO;AACL,WACE,OAEC,QAAQ,cAAc,uBACvB,MACA,MACA,MACA,sBACA,aACA,OACC,QAAQ,IAAI,cAAc,mBAAmB;AAAA,EAClD;AACA,SAAO;AACT;AAGA,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FloatingLabelInput/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFloatingLabelInput';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFloatingLabelInput.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { getComponentFromProps, useDeprecateComponent } from "@elliemae/ds-utilities";
|
|
5
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
5
6
|
import { Group } from "@elliemae/ds-shared";
|
|
6
|
-
import { DSInputGroup } from "../InputGroup";
|
|
7
|
-
import { DSFloatingLabelInput } from "../FloatingLabelInput";
|
|
8
|
-
import { DSError } from "./Error/DSError";
|
|
9
|
-
import { props } from "./props";
|
|
10
|
-
import { defaultProps } from "./defaultProps";
|
|
11
|
-
import { FORMITEM_LAYOUT_VARIANTS } from "./variants";
|
|
12
|
-
import { Suffix, SuffixInputWrapper, SuffixWrapper } from "./Suffix/Suffix";
|
|
7
|
+
import { DSInputGroup } from "../InputGroup/index.js";
|
|
8
|
+
import { DSFloatingLabelInput } from "../FloatingLabelInput/index.js";
|
|
9
|
+
import { DSError } from "./Error/DSError.js";
|
|
10
|
+
import { props } from "./props.js";
|
|
11
|
+
import { defaultProps } from "./defaultProps.js";
|
|
12
|
+
import { FORMITEM_LAYOUT_VARIANTS } from "./variants.js";
|
|
13
|
+
import { Suffix, SuffixInputWrapper, SuffixWrapper } from "./Suffix/Suffix.js";
|
|
13
14
|
const blockName = "form-item";
|
|
14
15
|
const Wrapper = aggregatedClasses("div")(blockName, null, ({ leftLabel, variant, fitContent, withHighlight }) => ({
|
|
15
16
|
"with-left-label": leftLabel,
|
|
@@ -31,7 +32,9 @@ const DSFormItemLayout = ({
|
|
|
31
32
|
labelText,
|
|
32
33
|
truncateText,
|
|
33
34
|
hasError,
|
|
35
|
+
// orientation = 'vertical', // one of [ vertical, horizontal ]
|
|
34
36
|
validationState,
|
|
37
|
+
// one of [ success, error, warning ]
|
|
35
38
|
validationMessage,
|
|
36
39
|
feedbackMessage,
|
|
37
40
|
readOnly,
|
|
@@ -59,6 +62,7 @@ const DSFormItemLayout = ({
|
|
|
59
62
|
containerProps,
|
|
60
63
|
...rest
|
|
61
64
|
}) => {
|
|
65
|
+
useDeprecateComponent({ componentName: "ds-form/FormItemLayout", version: "3.x Date: 2023 Q1" });
|
|
62
66
|
const isGroup = InputComponent.type === (/* @__PURE__ */ jsx(Group, {})).type;
|
|
63
67
|
const floatingLabelOverride = floatingLabel === "UNSAFE";
|
|
64
68
|
const WrapperContentComp = !isGroup ? WrapperContent : WrapperContentGroup;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/DSFormItemLayout.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { getComponentFromProps, useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSInputGroup } from '../InputGroup/index.js';\nimport { DSFloatingLabelInput } from '../FloatingLabelInput/index.js';\nimport { DSError } from './Error/DSError.js';\nimport { props } from './props.js';\nimport { defaultProps } from './defaultProps.js';\nimport { FORMITEM_LAYOUT_VARIANTS } from './variants.js';\nimport { Suffix, SuffixInputWrapper, SuffixWrapper } from './Suffix/Suffix.js';\n// import { maskTypes } from '../InputMask/MaskTypes';\n\nexport { DSError, FORMITEM_LAYOUT_VARIANTS };\n\nconst blockName = 'form-item';\n\nconst Wrapper = aggregatedClasses('div')(blockName, null, ({ leftLabel, variant, fitContent, withHighlight }) => ({\n 'with-left-label': leftLabel,\n 'fit-content': fitContent,\n [variant]: variant,\n 'with-highlight': withHighlight,\n}));\n\nconst WrapperContent = aggregatedClasses('div')(`${blockName}-content`);\nconst WrapperContentGroup = aggregatedClasses('fieldset')(`${blockName}-content`);\n\nconst DSFormItemLayout = ({\n leftLabel,\n floatingLabel,\n name,\n id,\n value,\n inputComponent: InputComponent,\n labelComponent: LabelComponent,\n feedbackComponent: FeedbackComponent,\n labelText,\n truncateText,\n hasError,\n // orientation = 'vertical', // one of [ vertical, horizontal ]\n validationState, // one of [ success, error, warning ]\n validationMessage,\n feedbackMessage,\n readOnly,\n focused,\n type,\n autoFocus,\n disabled,\n onChange,\n onBlur,\n onFocus,\n onPaste,\n onKeyUp,\n extraInputProps,\n extraContent,\n leftAddon,\n rightAddon,\n required,\n optional,\n mask,\n useSubfix,\n suffix,\n variant,\n fitContent,\n withHighlight,\n containerProps,\n ...rest\n}) => {\n useDeprecateComponent({ componentName: 'ds-form/FormItemLayout', version: '3.x Date: 2023 Q1' });\n\n const isGroup = InputComponent.type === (<Group />).type;\n const floatingLabelOverride = floatingLabel === 'UNSAFE';\n const WrapperContentComp = !isGroup ? WrapperContent : WrapperContentGroup;\n\n // group the input props to not duplicate it inside the specific inputComponent (floating or not)\n const inputProps = {\n ...extraInputProps,\n disabled,\n hasError: hasError || validationState === 'error',\n id,\n name,\n type,\n autoFocus,\n onBlur,\n onChange,\n onFocus,\n onPaste,\n onKeyUp,\n readOnly,\n value,\n mask,\n useSubfix,\n variant,\n required,\n ...rest,\n };\n\n const renderInput = (Input) =>\n leftAddon || rightAddon ? (\n <DSInputGroup leftAddon={leftAddon} rightAddon={rightAddon} variant={variant}>\n {Input}\n </DSInputGroup>\n ) : (\n Input\n );\n\n const renderFloating = (\n <DSFloatingLabelInput\n {...inputProps}\n extraInputProps={extraInputProps}\n focused={focused}\n inputComponent={InputComponent}\n labelComponent={LabelComponent}\n labelText={labelText}\n optional={optional}\n required={required}\n variant={variant}\n />\n );\n\n const InputWithLabel = floatingLabelOverride ? (\n renderInput(renderFloating)\n ) : (\n <>\n <LabelComponent\n htmlFor={id || name}\n label={labelText}\n optional={optional}\n required={required}\n isGroup={isGroup}\n truncateText={truncateText}\n />\n {renderInput(getComponentFromProps(InputComponent, inputProps))}\n </>\n );\n\n if (suffix) {\n return (\n <Wrapper\n classProps={{\n disabled,\n readOnly,\n hasError,\n leftLabel,\n variant,\n fitContent,\n withHighlight,\n }}\n {...containerProps}\n >\n <SuffixWrapper className=\"suffix-wrapper\">\n <SuffixInputWrapper className=\"suffix-input-wrapper\">\n <WrapperContentComp>\n {InputWithLabel}\n {extraContent}\n </WrapperContentComp>\n <FeedbackComponent\n hasError={hasError}\n text={validationState || hasError ? validationMessage : feedbackMessage}\n />\n </SuffixInputWrapper>\n <Suffix\n className=\"suffix-label\"\n label={!!labelText}\n withFeedback={Boolean(validationMessage || feedbackMessage)}\n >\n {suffix}\n </Suffix>\n </SuffixWrapper>\n </Wrapper>\n );\n }\n\n return (\n <Wrapper\n classProps={{\n disabled,\n readOnly,\n hasError,\n leftLabel,\n variant,\n fitContent,\n withHighlight,\n }}\n {...containerProps}\n >\n <WrapperContentComp>\n {InputWithLabel}\n {extraContent}\n </WrapperContentComp>\n <FeedbackComponent hasError={hasError} text={validationState || hasError ? validationMessage : feedbackMessage} />\n </Wrapper>\n );\n};\n\nDSFormItemLayout.propTypes = props;\nDSFormItemLayout.defaultProps = defaultProps;\nDSFormItemLayout.displayName = 'DSFormItemLayout';\nconst DSFormItemLayoutWithSchema = describe(DSFormItemLayout);\nDSFormItemLayoutWithSchema.propTypes = props;\n\nexport default DSFormItemLayout;\nexport { DSFormItemLayoutWithSchema, DSFormItemLayout };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyEoB,S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AA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,CAAC,CAAC;AAAA,cACT,cAAc,QAAQ,qBAAqB,eAAe;AAAA,cAEzD;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,6BAAC,sBACE;AAAA;AAAA,UACA;AAAA,WACH;AAAA,QACA,oBAAC,qBAAkB,UAAoB,MAAM,mBAAmB,WAAW,oBAAoB,iBAAiB;AAAA;AAAA;AAAA,EAClH;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAEvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
const DSError = ({ hasError = false, errorText = "Error" }) => {
|
|
5
5
|
if (!hasError)
|
|
6
6
|
return null;
|
|
7
7
|
return /* @__PURE__ */ jsx("div", { className: "em-ds-error", children: errorText });
|
|
8
8
|
};
|
|
9
9
|
const props = {
|
|
10
|
+
/** error state */
|
|
10
11
|
hasError: PropTypes.bool.description("error state"),
|
|
12
|
+
/** error label text */
|
|
11
13
|
errorText: PropTypes.string.description("error label text")
|
|
12
14
|
};
|
|
13
15
|
DSError.propTypes = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/FormItem/Error/DSError.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACKd;AAJT,SAAS,WAAW,gBAAgB;AAEpC,MAAM,UAAU,CAAC,EAAE,WAAW,OAAO,YAAY,QAAQ,MAAM;AAC7D,MAAI,CAAC;AAAU,WAAO;AACtB,SAAO,oBAAC,SAAI,WAAU,eAAe,qBAAU;AACjD;AAEA,MAAM,QAAQ;AAAA,EAEZ,UAAU,UAAU,KAAK,YAAY,aAAa;AAAA,EAElD,WAAW,UAAU,OAAO,YAAY,kBAAkB;AAC5D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAE1C,kBAAkB,YAAY;AAE9B,IAAO,kBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst DSError = ({ hasError = false, errorText = 'Error' }) => {\n if (!hasError) return null;\n return <div className=\"em-ds-error\">{errorText}</div>;\n};\n\nconst props = {\n /** error state */\n hasError: PropTypes.bool.description('error state'),\n /** error label text */\n errorText: PropTypes.string.description('error label text'),\n};\n\nDSError.propTypes = props;\nDSError.displayName = 'DSError';\nconst DSErrorWithSchema = describe(DSError);\n\nDSErrorWithSchema.propTypes = props;\n\nexport default DSError;\nexport { DSErrorWithSchema, DSError };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACKd;AAJT,SAAS,WAAW,gBAAgB;AAEpC,MAAM,UAAU,CAAC,EAAE,WAAW,OAAO,YAAY,QAAQ,MAAM;AAC7D,MAAI,CAAC;AAAU,WAAO;AACtB,SAAO,oBAAC,SAAI,WAAU,eAAe,qBAAU;AACjD;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,UAAU,UAAU,KAAK,YAAY,aAAa;AAAA;AAAA,EAElD,WAAW,UAAU,OAAO,YAAY,kBAAkB;AAC5D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAE1C,kBAAkB,YAAY;AAE9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
5
5
|
import { DSTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
|
-
import { RequiredMark } from "../../RequiredMark";
|
|
6
|
+
import { RequiredMark } from "../../RequiredMark/index.js";
|
|
7
7
|
const blockName = "em-ds-label";
|
|
8
8
|
const Text = aggregatedClasses("span")(blockName, "text");
|
|
9
9
|
const DSLabel = ({ children, label, htmlFor, required, optional, truncateText = true, isGroup = false }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/FormItem/Label/DSLabel.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jsx-a11y/label-has-associated-control */\n/* eslint-disable react/no-unknown-property, jsx-a11y/label-has-for */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '../../RequiredMark';\n\nconst blockName = 'em-ds-label';\n\nconst Text = aggregatedClasses('span')(blockName, 'text');\n\nconst DSLabel = ({ children, label, htmlFor, required, optional, truncateText = true, isGroup = false }) => {\n const Tag = isGroup ? 'legend' : 'label';\n\n return (\n <Tag className={`${blockName}${isGroup ? ` ${blockName}--group` : ''}`} htmlFor={htmlFor}>\n {truncateText ? <DSTruncatedTooltipText value={children || label} /> : <Text>{label}</Text>}\n <RequiredMark optional={optional} required={required} />\n </Tag>\n );\n};\n\nDSLabel.propTypes = {\n children: PropTypes.string,\n label: PropTypes.string,\n htmlFor: PropTypes.string,\n required: PropTypes.bool,\n optional: PropTypes.bool,\n truncateText: PropTypes.bool,\n isGroup: PropTypes.bool,\n};\n\nexport { DSLabel };\nexport default DSLabel;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jsx-a11y/label-has-associated-control */\n/* eslint-disable react/no-unknown-property, jsx-a11y/label-has-for */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '../../RequiredMark/index.js';\n\nconst blockName = 'em-ds-label';\n\nconst Text = aggregatedClasses('span')(blockName, 'text');\n\nconst DSLabel = ({ children, label, htmlFor, required, optional, truncateText = true, isGroup = false }) => {\n const Tag = isGroup ? 'legend' : 'label';\n\n return (\n <Tag className={`${blockName}${isGroup ? ` ${blockName}--group` : ''}`} htmlFor={htmlFor}>\n {truncateText ? <DSTruncatedTooltipText value={children || label} /> : <Text>{label}</Text>}\n <RequiredMark optional={optional} required={required} />\n </Tag>\n );\n};\n\nDSLabel.propTypes = {\n children: PropTypes.string,\n label: PropTypes.string,\n htmlFor: PropTypes.string,\n required: PropTypes.bool,\n optional: PropTypes.bool,\n truncateText: PropTypes.bool,\n isGroup: PropTypes.bool,\n};\n\nexport { DSLabel };\nexport default DSLabel;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBnB,SACkB,KADlB;AAbJ,OAAO,eAAe;AACtB,SAAS,yBAAyB;AAClC,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAE7B,MAAM,YAAY;AAElB,MAAM,OAAO,kBAAkB,MAAM,EAAE,WAAW,MAAM;AAExD,MAAM,UAAU,CAAC,EAAE,UAAU,OAAO,SAAS,UAAU,UAAU,eAAe,MAAM,UAAU,MAAM,MAAM;AAC1G,QAAM,MAAM,UAAU,WAAW;AAEjC,SACE,qBAAC,OAAI,WAAW,GAAG,YAAY,UAAU,IAAI,qBAAqB,MAAM,SACrE;AAAA,mBAAe,oBAAC,0BAAuB,OAAO,YAAY,OAAO,IAAK,oBAAC,QAAM,iBAAM;AAAA,IACpF,oBAAC,gBAAa,UAAoB,UAAoB;AAAA,KACxD;AAEJ;AAEA,QAAQ,YAAY;AAAA,EAClB,UAAU,UAAU;AAAA,EACpB,OAAO,UAAU;AAAA,EACjB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AAAA,EACpB,cAAc,UAAU;AAAA,EACxB,SAAS,UAAU;AACrB;AAGA,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/ValidationFieldWrapper.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Component } from 'react';\n\nexport default class ValidationFieldWrapper extends Component {\n static defaultProps = {\n validateOnBlur: false,\n validateOnChange: false,\n name: '', // name in context of the form\n value: '',\n validate: () => null,\n onChange: () => null,\n onBlur: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n value: props.value,\n };\n }\n\n componentDidMount() {\n const { value } = this.state;\n this.executeValidations(value);\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n const { value } = nextProps;\n if (value === prevState.value) return null;\n return {\n ...prevState,\n value,\n };\n }\n\n handleChange = (e) => {\n const { onChange } = this.props;\n this.setState({ value: e.target.value });\n if (onChange) onChange(e);\n };\n\n handleBlur = (e) => {\n const { onBlur, validateOnBlur } = this.props;\n const { value } = this.state;\n if (validateOnBlur) this.executeValidations(value);\n onBlur(e);\n };\n\n executeValidations = (value) => {\n const { validations } = this.props;\n if (validations && Array.isArray(validations)) {\n if (\n !validations.some((validation) => {\n const { error, payload } = validation({ value });\n if (error) this.setState({ validationMessage: payload, state: error });\n return error;\n })\n ) {\n this.setState({ hasError: false });\n }\n }\n };\n\n render() {\n const { children } = this.props;\n const { value, validationMessage, validationState, hasError } = this.state;\n return children({\n value,\n validationMessage,\n validationState,\n hasError,\n onChange: this.handleChange,\n onBlur: this.handleBlur,\n });\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAE1B,MAAO,+BAA6C,UAAU;AAAA,EAW5D,YAAY,OAAO;AACjB,UAAM,KAAK;AAoBb,wBAAe,CAAC,MAAM;AACpB,YAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,WAAK,SAAS,EAAE,OAAO,EAAE,OAAO,MAAM,CAAC;AACvC,UAAI;AAAU,iBAAS,CAAC;AAAA,IAC1B;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,eAAe,IAAI,KAAK;AACxC,YAAM,EAAE,MAAM,IAAI,KAAK;AACvB,UAAI;AAAgB,aAAK,mBAAmB,KAAK;AACjD,aAAO,CAAC;AAAA,IACV;AAEA,8BAAqB,CAAC,UAAU;AAC9B,YAAM,EAAE,YAAY,IAAI,KAAK;AAC7B,UAAI,eAAe,MAAM,QAAQ,WAAW,GAAG;AAC7C,YACE,CAAC,YAAY,KAAK,CAAC,eAAe;AAChC,gBAAM,EAAE,OAAO,QAAQ,IAAI,WAAW,EAAE,MAAM,CAAC;AAC/C,cAAI;AAAO,iBAAK,SAAS,EAAE,mBAAmB,SAAS,OAAO,MAAM,CAAC;AACrE,iBAAO;AAAA,QACT,CAAC,GACD;AACA,eAAK,SAAS,EAAE,UAAU,MAAM,CAAC;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AA7CE,SAAK,QAAQ;AAAA,M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"../TextBox";
|
|
3
|
-
import { DSLabel } from "./Label/DSLabel";
|
|
4
|
-
import { Feedback } from "./Feedback";
|
|
5
|
-
import { FORMITEM_LAYOUT_VARIANTS } from "./variants";
|
|
2
|
+
import { DSTextBox } from "../TextBox/index.js";
|
|
3
|
+
import { DSLabel } from "./Label/DSLabel.js";
|
|
4
|
+
import { Feedback } from "./Feedback.js";
|
|
5
|
+
import { FORMITEM_LAYOUT_VARIANTS } from "./variants.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
leftLabel: false,
|
|
8
8
|
floatingLabel: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/defaultProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSTextBox } from '../TextBox';\nimport { DSLabel } from './Label/DSLabel';\nimport { Feedback } from './Feedback';\nimport { FORMITEM_LAYOUT_VARIANTS } from './variants';\n\nexport const defaultProps = {\n leftLabel: false,\n floatingLabel: false,\n inputComponent: DSTextBox,\n labelComponent: DSLabel,\n feedbackComponent: Feedback,\n hasError: false,\n validationMessage: '',\n feedbackMessage: '',\n focused: false,\n autoFocus: false,\n disabled: false,\n onChange: () => {},\n onBlur: () => {},\n onFocus: () => {},\n onPaste: () => {},\n onKeyUp: () => {},\n extraInputProps: {},\n leftAddon: null,\n rightAddon: null,\n required: false,\n optional: false,\n useSubfix: '',\n suffix: '',\n variant: FORMITEM_LAYOUT_VARIANTS.DEFAULT,\n containerProps: {},\n fitContent: false,\n withHighlight: false,\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSTextBox } from '../TextBox/index.js';\nimport { DSLabel } from './Label/DSLabel.js';\nimport { Feedback } from './Feedback.js';\nimport { FORMITEM_LAYOUT_VARIANTS } from './variants.js';\n\nexport const defaultProps = {\n leftLabel: false,\n floatingLabel: false,\n inputComponent: DSTextBox,\n labelComponent: DSLabel,\n feedbackComponent: Feedback,\n hasError: false,\n validationMessage: '',\n feedbackMessage: '',\n focused: false,\n autoFocus: false,\n disabled: false,\n onChange: () => {},\n onBlur: () => {},\n onFocus: () => {},\n onPaste: () => {},\n onKeyUp: () => {},\n extraInputProps: {},\n leftAddon: null,\n rightAddon: null,\n required: false,\n optional: false,\n useSubfix: '',\n suffix: '',\n variant: FORMITEM_LAYOUT_VARIANTS.DEFAULT,\n containerProps: {},\n fitContent: false,\n withHighlight: false,\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,gCAAgC;AAElC,MAAM,eAAe;AAAA,EAC1B,WAAW;AAAA,EACX,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU,MAAM;AAAA,EAAC;AAAA,EACjB,QAAQ,MAAM;AAAA,EAAC;AAAA,EACf,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,iBAAiB,CAAC;AAAA,EAClB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS,yBAAyB;AAAA,EAClC,gBAAgB,CAAC;AAAA,EACjB,YAAY;AAAA,EACZ,eAAe;AACjB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
FORMITEM_LAYOUT_VARIANTS,
|
|
6
6
|
DSError,
|
|
7
7
|
DSFormItemLayoutWithSchema
|
|
8
|
-
} from "./DSFormItemLayout";
|
|
9
|
-
import { DSErrorWithSchema } from "./Error/DSError";
|
|
8
|
+
} from "./DSFormItemLayout.js";
|
|
9
|
+
import { DSErrorWithSchema } from "./Error/DSError.js";
|
|
10
10
|
export {
|
|
11
11
|
DSError,
|
|
12
12
|
DSErrorWithSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n default,\n DSFormItemLayout,\n FORMITEM_LAYOUT_VARIANTS,\n DSError,\n DSFormItemLayoutWithSchema,\n} from './DSFormItemLayout';\nexport { DSErrorWithSchema } from './Error/DSError';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n default,\n DSFormItemLayout,\n FORMITEM_LAYOUT_VARIANTS,\n DSError,\n DSFormItemLayoutWithSchema,\n} from './DSFormItemLayout.js';\nexport { DSErrorWithSchema } from './Error/DSError.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE,WAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|