@progress/kendo-react-inputs 5.7.0-sig.202208281415 → 5.7.0
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/LICENSE.md +11 -0
- package/NOTICE.txt +111 -0
- package/README.md +4 -4
- package/about.md +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/checkbox/Checkbox.js +1 -0
- package/dist/es/colors/ColorInput.js +1 -1
- package/dist/es/colors/ColorPalette.d.ts +1 -1
- package/dist/es/colors/ColorPicker.js +1 -1
- package/dist/es/colors/FlatColorPicker.js +1 -1
- package/dist/es/input/InputClearValue.d.ts +15 -0
- package/dist/es/input/InputClearValue.js +24 -0
- package/dist/es/input/InputPrefix.d.ts +15 -0
- package/dist/es/input/InputPrefix.js +24 -0
- package/dist/es/input/InputSeparator.d.ts +15 -0
- package/dist/es/input/InputSeparator.js +24 -0
- package/dist/es/input/InputSuffix.d.ts +15 -0
- package/dist/es/input/InputSuffix.js +24 -0
- package/dist/es/input/InputValidationIcon.d.ts +14 -0
- package/dist/es/input/InputValidationIcon.js +20 -0
- package/dist/es/main.d.ts +6 -0
- package/dist/es/main.js +6 -0
- package/dist/es/maskedtextbox/MaskedTextBox.d.ts +1 -1
- package/dist/es/numerictextbox/NumericTextBox.js +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rating/Rating.js +1 -1
- package/dist/es/signature/Signature.js +5 -5
- package/dist/es/signature/interfaces/SignatureProps.d.ts +4 -0
- package/dist/es/slider/Slider.js +2 -6
- package/dist/es/slider/SliderLabel.js +1 -2
- package/dist/es/switch/Switch.js +5 -5
- package/dist/es/textbox/Textbox.d.ts +69 -0
- package/dist/es/textbox/Textbox.js +111 -0
- package/dist/npm/checkbox/Checkbox.js +1 -0
- package/dist/npm/colors/ColorInput.js +1 -1
- package/dist/npm/colors/ColorPalette.d.ts +1 -1
- package/dist/npm/colors/ColorPicker.js +1 -1
- package/dist/npm/colors/FlatColorPicker.js +1 -1
- package/dist/npm/input/InputClearValue.d.ts +15 -0
- package/dist/npm/input/InputClearValue.js +27 -0
- package/dist/npm/input/InputPrefix.d.ts +15 -0
- package/dist/npm/input/InputPrefix.js +27 -0
- package/dist/npm/input/InputSeparator.d.ts +15 -0
- package/dist/npm/input/InputSeparator.js +27 -0
- package/dist/npm/input/InputSuffix.d.ts +15 -0
- package/dist/npm/input/InputSuffix.js +27 -0
- package/dist/npm/input/InputValidationIcon.d.ts +14 -0
- package/dist/npm/input/InputValidationIcon.js +23 -0
- package/dist/npm/main.d.ts +6 -0
- package/dist/npm/main.js +13 -1
- package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +1 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rating/Rating.js +1 -1
- package/dist/npm/signature/Signature.js +5 -5
- package/dist/npm/signature/interfaces/SignatureProps.d.ts +4 -0
- package/dist/npm/slider/Slider.js +2 -6
- package/dist/npm/slider/SliderLabel.js +1 -2
- package/dist/npm/switch/Switch.js +5 -5
- package/dist/npm/textbox/Textbox.d.ts +69 -0
- package/dist/npm/textbox/Textbox.js +114 -0
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +19 -17
- package/api.json +0 -71211
- package/dist/npm/signature/interfaces/SignatureState.d.ts +0 -15
- package/dist/npm/signature/interfaces/SignatureState.js +0 -2
- package/docs/_meta.yml +0 -3
- package/docs/api/Checkbox.md +0 -23
- package/docs/api/CheckboxBlurEvent.md +0 -132
- package/docs/api/CheckboxChangeEvent.md +0 -167
- package/docs/api/CheckboxFocusEvent.md +0 -132
- package/docs/api/CheckboxHandle.md +0 -167
- package/docs/api/CheckboxProps.md +0 -1068
- package/docs/api/CheckboxPropsContext.md +0 -17
- package/docs/api/ColorGradient.md +0 -27
- package/docs/api/ColorGradientChangeEvent.md +0 -167
- package/docs/api/ColorGradientHandle.md +0 -99
- package/docs/api/ColorGradientProps.md +0 -538
- package/docs/api/ColorGradientPropsContext.md +0 -17
- package/docs/api/ColorPalette.md +0 -26
- package/docs/api/ColorPaletteChangeEvent.md +0 -202
- package/docs/api/ColorPaletteHandle.md +0 -64
- package/docs/api/ColorPaletteProps.md +0 -542
- package/docs/api/ColorPalettePropsContext.md +0 -17
- package/docs/api/ColorPicker.md +0 -23
- package/docs/api/ColorPickerActiveColorClick.md +0 -132
- package/docs/api/ColorPickerBlurEvent.md +0 -97
- package/docs/api/ColorPickerChangeEvent.md +0 -132
- package/docs/api/ColorPickerFocusEvent.md +0 -97
- package/docs/api/ColorPickerGradientSettings.md +0 -102
- package/docs/api/ColorPickerPaletteSettings.md +0 -148
- package/docs/api/ColorPickerPopupSettings.md +0 -97
- package/docs/api/ColorPickerProps.md +0 -1078
- package/docs/api/ColorPickerPropsContext.md +0 -17
- package/docs/api/ColorPickerView.md +0 -19
- package/docs/api/Direction.md +0 -12
- package/docs/api/FlatColorPicker.md +0 -13
- package/docs/api/FlatColorPickerHandle.md +0 -127
- package/docs/api/FlatColorPickerProps.md +0 -412
- package/docs/api/FormComponentValidity.md +0 -428
- package/docs/api/Input.md +0 -17
- package/docs/api/InputChangeEvent.md +0 -167
- package/docs/api/InputHandle.md +0 -204
- package/docs/api/InputProps.md +0 -428
- package/docs/api/InputPropsContext.md +0 -17
- package/docs/api/MaskedTextBox.md +0 -17
- package/docs/api/MaskedTextBoxChangeEvent.md +0 -237
- package/docs/api/MaskedTextBoxEvent.md +0 -132
- package/docs/api/MaskedTextBoxHandle.md +0 -265
- package/docs/api/MaskedTextBoxProps.md +0 -1395
- package/docs/api/MaskedTextBoxPropsContext.md +0 -17
- package/docs/api/NumericTextBox.md +0 -13
- package/docs/api/NumericTextBoxBlurEvent.md +0 -132
- package/docs/api/NumericTextBoxChangeEvent.md +0 -167
- package/docs/api/NumericTextBoxFocusEvent.md +0 -132
- package/docs/api/NumericTextBoxHandle.md +0 -197
- package/docs/api/NumericTextBoxProps.md +0 -1471
- package/docs/api/NumericTextBoxPropsContext.md +0 -17
- package/docs/api/RadioButton.md +0 -17
- package/docs/api/RadioButtonBlurEvent.md +0 -132
- package/docs/api/RadioButtonChangeEvent.md +0 -167
- package/docs/api/RadioButtonFocusEvent.md +0 -132
- package/docs/api/RadioButtonHandle.md +0 -97
- package/docs/api/RadioButtonProps.md +0 -791
- package/docs/api/RadioButtonPropsContext.md +0 -17
- package/docs/api/RadioGroup.md +0 -17
- package/docs/api/RadioGroupChangeEvent.md +0 -167
- package/docs/api/RadioGroupFocusEvent.md +0 -132
- package/docs/api/RadioGroupHandle.md +0 -97
- package/docs/api/RadioGroupProps.md +0 -707
- package/docs/api/RadioGroupPropsContext.md +0 -17
- package/docs/api/Range.md +0 -13
- package/docs/api/RangeSlider.md +0 -17
- package/docs/api/RangeSliderChangeEvent.md +0 -132
- package/docs/api/RangeSliderHandle.md +0 -127
- package/docs/api/RangeSliderProps.md +0 -853
- package/docs/api/RangeSliderPropsContext.md +0 -17
- package/docs/api/Rating.md +0 -17
- package/docs/api/RatingChangeEvent.md +0 -132
- package/docs/api/RatingFocusEvent.md +0 -97
- package/docs/api/RatingHandle.md +0 -97
- package/docs/api/RatingItem.md +0 -13
- package/docs/api/RatingItemFocusEvent.md +0 -97
- package/docs/api/RatingItemHandle.md +0 -132
- package/docs/api/RatingItemKeyboardEvent.md +0 -97
- package/docs/api/RatingItemMouseEvent.md +0 -97
- package/docs/api/RatingItemProps.md +0 -941
- package/docs/api/RatingKeyboardEvent.md +0 -97
- package/docs/api/RatingMouseEvent.md +0 -97
- package/docs/api/RatingProps.md +0 -1308
- package/docs/api/RatingPropsContext.md +0 -17
- package/docs/api/Signature.md +0 -13
- package/docs/api/SignatureBlurEvent.md +0 -132
- package/docs/api/SignatureChangeEvent.md +0 -167
- package/docs/api/SignatureCloseEvent.md +0 -132
- package/docs/api/SignatureFocusEvent.md +0 -132
- package/docs/api/SignatureHandle.md +0 -162
- package/docs/api/SignatureOpenEvent.md +0 -132
- package/docs/api/SignatureProps.md +0 -1592
- package/docs/api/SignaturePropsContext.md +0 -17
- package/docs/api/Slider.md +0 -17
- package/docs/api/SliderChangeEvent.md +0 -167
- package/docs/api/SliderHandle.md +0 -99
- package/docs/api/SliderLabel.md +0 -62
- package/docs/api/SliderLabelProps.md +0 -171
- package/docs/api/SliderProps.md +0 -902
- package/docs/api/SliderPropsContext.md +0 -17
- package/docs/api/Switch.md +0 -17
- package/docs/api/SwitchChangeEvent.md +0 -167
- package/docs/api/SwitchHandle.md +0 -239
- package/docs/api/SwitchProps.md +0 -1081
- package/docs/api/SwitchPropsContext.md +0 -17
- package/docs/api/TextArea.md +0 -27
- package/docs/api/TextAreaBlurEvent.md +0 -132
- package/docs/api/TextAreaChangeEvent.md +0 -167
- package/docs/api/TextAreaFocusEvent.md +0 -132
- package/docs/api/TextAreaProps.md +0 -1082
- package/docs/api/TextAreaPropsContext.md +0 -17
- package/docs/api/TileSize.md +0 -18
- package/docs/api/ToggleBaseProps.md +0 -132
- package/docs/api/_meta.yml +0 -3
- package/docs/api/index.md +0 -425
- package/docs/auto-imports.js +0 -40
- package/docs/checkbox/_meta.yml +0 -3
- package/docs/checkbox/accessibility.md +0 -26
- package/docs/checkbox/appearance.md +0 -28
- package/docs/checkbox/controlled.md +0 -57
- package/docs/checkbox/default-state.md +0 -24
- package/docs/checkbox/disabled.md +0 -23
- package/docs/checkbox/forms-support.md +0 -90
- package/docs/checkbox/index.md +0 -46
- package/docs/checkbox/keyboard-navigation.md +0 -36
- package/docs/checkbox/labels.md +0 -36
- package/docs/colorgradient/_meta.yml +0 -3
- package/docs/colorgradient/color-contrast.md +0 -34
- package/docs/colorgradient/controlled.md +0 -32
- package/docs/colorgradient/disabled.md +0 -23
- package/docs/colorgradient/index.md +0 -42
- package/docs/colorgradient/noopacity.md +0 -28
- package/docs/colorpalette/_meta.yml +0 -3
- package/docs/colorpalette/assets/demo-img.png +0 -0
- package/docs/colorpalette/controlled.md +0 -32
- package/docs/colorpalette/custom.md +0 -23
- package/docs/colorpalette/disabled.md +0 -23
- package/docs/colorpalette/events.md +0 -27
- package/docs/colorpalette/index.md +0 -47
- package/docs/colorpalette/keyboard-navigation.md +0 -36
- package/docs/colorpalette/presets.md +0 -23
- package/docs/colorpicker/_meta.yml +0 -3
- package/docs/colorpicker/appearance.md +0 -30
- package/docs/colorpicker/color-contrast.md +0 -33
- package/docs/colorpicker/combined-views.md +0 -46
- package/docs/colorpicker/controlled.md +0 -57
- package/docs/colorpicker/custom.md +0 -67
- package/docs/colorpicker/default-value.md +0 -20
- package/docs/colorpicker/disabled.md +0 -20
- package/docs/colorpicker/index.md +0 -41
- package/docs/colorpicker/keyboard-navigation.md +0 -39
- package/docs/custom-attributes.md +0 -27
- package/docs/examples/attribute/class/main.tsx +0 -44
- package/docs/examples/attribute/func/main.tsx +0 -58
- package/docs/examples/checkbox/appearance/func/main.tsx +0 -33
- package/docs/examples/checkbox/controlled/checked/class/main.tsx +0 -32
- package/docs/examples/checkbox/controlled/checked/func/main.tsx +0 -29
- package/docs/examples/checkbox/controlled/value/class/main.tsx +0 -32
- package/docs/examples/checkbox/controlled/value/func/main.tsx +0 -28
- package/docs/examples/checkbox/default/func/main.tsx +0 -15
- package/docs/examples/checkbox/disabled/func/main.tsx +0 -19
- package/docs/examples/checkbox/forms/basic/class/main.tsx +0 -79
- package/docs/examples/checkbox/forms/basic/func/main.tsx +0 -71
- package/docs/examples/checkbox/forms/custom-message/class/main.tsx +0 -117
- package/docs/examples/checkbox/forms/custom-message/func/main.tsx +0 -124
- package/docs/examples/checkbox/forms/disable-styles/class/main.tsx +0 -126
- package/docs/examples/checkbox/forms/disable-styles/func/main.tsx +0 -125
- package/docs/examples/checkbox/forms/kendo-react-form/func/main.tsx +0 -137
- package/docs/examples/checkbox/keyboard/class/main.tsx +0 -32
- package/docs/examples/checkbox/keyboard/func/main.tsx +0 -27
- package/docs/examples/checkbox/labels/custom/func/main.tsx +0 -20
- package/docs/examples/checkbox/labels/setup/func/main.tsx +0 -20
- package/docs/examples/checkbox/main/func/main.tsx +0 -22
- package/docs/examples/colorgradient/colorcontrast/class/main.tsx +0 -48
- package/docs/examples/colorgradient/colorcontrast/func/main.tsx +0 -43
- package/docs/examples/colorgradient/controlled/class/main.tsx +0 -29
- package/docs/examples/colorgradient/controlled/func/main.tsx +0 -21
- package/docs/examples/colorgradient/disabled/func/main.tsx +0 -17
- package/docs/examples/colorgradient/opacity/class/main.tsx +0 -32
- package/docs/examples/colorgradient/opacity/func/main.tsx +0 -24
- package/docs/examples/colorgradient/overview/class/main.tsx +0 -42
- package/docs/examples/colorgradient/overview/func/main.tsx +0 -34
- package/docs/examples/colorpalette/controlled/class/main.tsx +0 -25
- package/docs/examples/colorpalette/controlled/func/main.tsx +0 -17
- package/docs/examples/colorpalette/custom/func/main.tsx +0 -13
- package/docs/examples/colorpalette/disabled/func/main.tsx +0 -13
- package/docs/examples/colorpalette/keyboard/class/main.tsx +0 -30
- package/docs/examples/colorpalette/keyboard/func/main.tsx +0 -30
- package/docs/examples/colorpalette/overview/basic/class/main.tsx +0 -55
- package/docs/examples/colorpalette/overview/basic/class/styles.css +0 -50
- package/docs/examples/colorpalette/overview/basic/func/main.tsx +0 -47
- package/docs/examples/colorpalette/overview/basic/func/styles.css +0 -50
- package/docs/examples/colorpalette/overview/events/class/main.tsx +0 -48
- package/docs/examples/colorpalette/overview/events/func/main.tsx +0 -40
- package/docs/examples/colorpalette/presets/func/main.tsx +0 -70
- package/docs/examples/colorpicker/appearance/func/main.tsx +0 -37
- package/docs/examples/colorpicker/colorcontrast/class/main.tsx +0 -50
- package/docs/examples/colorpicker/colorcontrast/func/main.tsx +0 -44
- package/docs/examples/colorpicker/controlled/popup/class/main.tsx +0 -39
- package/docs/examples/colorpicker/controlled/popup/func/main.tsx +0 -31
- package/docs/examples/colorpicker/controlled/value/class/main.tsx +0 -25
- package/docs/examples/colorpicker/controlled/value/func/main.tsx +0 -17
- package/docs/examples/colorpicker/custom/custom-icons/func/main.tsx +0 -18
- package/docs/examples/colorpicker/custom/gradient/func/main.tsx +0 -24
- package/docs/examples/colorpicker/custom/kendo-icons/func/main.tsx +0 -18
- package/docs/examples/colorpicker/custom/palette/func/main.tsx +0 -28
- package/docs/examples/colorpicker/default/func/main.tsx +0 -24
- package/docs/examples/colorpicker/disabled/func/main.tsx +0 -17
- package/docs/examples/colorpicker/keyboard/class/main.tsx +0 -30
- package/docs/examples/colorpicker/keyboard/func/main.tsx +0 -29
- package/docs/examples/colorpicker/overview/func/main.tsx +0 -24
- package/docs/examples/colorpicker/view/combined/class/main.tsx +0 -37
- package/docs/examples/colorpicker/view/combined/func/main.tsx +0 -27
- package/docs/examples/colorpicker/view/popup/class/main.tsx +0 -66
- package/docs/examples/colorpicker/view/popup/func/main.tsx +0 -55
- package/docs/examples/flatcolorpicker/basic/func/main.tsx +0 -13
- package/docs/examples/flatcolorpicker/customization/footer/func/main.tsx +0 -13
- package/docs/examples/flatcolorpicker/customization/header/func/main.tsx +0 -13
- package/docs/examples/flatcolorpicker/disabled/func/main.tsx +0 -13
- package/docs/examples/get-started/func/main.tsx +0 -14
- package/docs/examples/globalization/func/main.tsx +0 -47
- package/docs/examples/input/counter/main.tsx +0 -30
- package/docs/examples/input/forms/basic/class/main.tsx +0 -87
- package/docs/examples/input/forms/basic/func/main.tsx +0 -79
- package/docs/examples/input/forms/custom-message/class/main.tsx +0 -94
- package/docs/examples/input/forms/custom-message/func/main.tsx +0 -86
- package/docs/examples/input/forms/disable-styles/class/main.tsx +0 -115
- package/docs/examples/input/forms/disable-styles/func/main.tsx +0 -106
- package/docs/examples/input/forms/override/class/main.tsx +0 -111
- package/docs/examples/input/forms/override/func/main.tsx +0 -102
- package/docs/examples/input/main/main.jsx +0 -17
- package/docs/examples/input/overview/func/main.tsx +0 -88
- package/docs/examples/label/class/main.tsx +0 -69
- package/docs/examples/label/func/main.tsx +0 -65
- package/docs/examples/maskedtextbox/appearance/func/main.tsx +0 -41
- package/docs/examples/maskedtextbox/disabled/func/main.tsx +0 -24
- package/docs/examples/maskedtextbox/forms/basic/class/main.tsx +0 -78
- package/docs/examples/maskedtextbox/forms/basic/func/main.tsx +0 -70
- package/docs/examples/maskedtextbox/forms/custom-message/class/main.tsx +0 -81
- package/docs/examples/maskedtextbox/forms/custom-message/func/main.tsx +0 -73
- package/docs/examples/maskedtextbox/forms/disable-styles/class/main.tsx +0 -75
- package/docs/examples/maskedtextbox/forms/disable-styles/func/main.tsx +0 -67
- package/docs/examples/maskedtextbox/forms/override/class/main.tsx +0 -85
- package/docs/examples/maskedtextbox/forms/override/func/main.tsx +0 -75
- package/docs/examples/maskedtextbox/mask/basic/func/main.tsx +0 -19
- package/docs/examples/maskedtextbox/mask/extend/func/main.tsx +0 -35
- package/docs/examples/maskedtextbox/overview/basic/func/main.tsx +0 -18
- package/docs/examples/maskedtextbox/readonly/func/main.tsx +0 -20
- package/docs/examples/maskedtextbox/valid/class/main.tsx +0 -59
- package/docs/examples/maskedtextbox/valid/func/main.tsx +0 -51
- package/docs/examples/maskedtextbox/value/class/main.tsx +0 -37
- package/docs/examples/maskedtextbox/value/func/main.tsx +0 -29
- package/docs/examples/numerictextbox/appearance/func/main.tsx +0 -39
- package/docs/examples/numerictextbox/formats/func/main.tsx +0 -53
- package/docs/examples/numerictextbox/forms/basic/class/main.tsx +0 -75
- package/docs/examples/numerictextbox/forms/basic/func/main.tsx +0 -67
- package/docs/examples/numerictextbox/forms/custom-message/class/main.tsx +0 -82
- package/docs/examples/numerictextbox/forms/custom-message/func/main.tsx +0 -74
- package/docs/examples/numerictextbox/forms/disable-styles/class/main.tsx +0 -98
- package/docs/examples/numerictextbox/forms/disable-styles/func/main.tsx +0 -85
- package/docs/examples/numerictextbox/forms/override/class/main.tsx +0 -96
- package/docs/examples/numerictextbox/forms/override/func/main.tsx +0 -87
- package/docs/examples/numerictextbox/forms/ref/class/main.tsx +0 -44
- package/docs/examples/numerictextbox/forms/ref/func/main.tsx +0 -34
- package/docs/examples/numerictextbox/keyboard/func/main.tsx +0 -20
- package/docs/examples/numerictextbox/overview/class/main.tsx +0 -55
- package/docs/examples/numerictextbox/overview/func/main.tsx +0 -43
- package/docs/examples/numerictextbox/spin/func/main.tsx +0 -22
- package/docs/examples/numerictextbox/step/func/main.tsx +0 -21
- package/docs/examples/overview/func/main.tsx +0 -102
- package/docs/examples/props-context/overview/class/grid-with-filtering.tsx +0 -32
- package/docs/examples/props-context/overview/class/main.tsx +0 -26
- package/docs/examples/props-context/overview/class/sample-products.ts +0 -182
- package/docs/examples/props-context/overview/func/grid-with-filtering.tsx +0 -32
- package/docs/examples/props-context/overview/func/main.tsx +0 -24
- package/docs/examples/props-context/overview/func/sample-products.ts +0 -182
- package/docs/examples/radiobutton/appearance/func/main.tsx +0 -28
- package/docs/examples/radiobutton/custom-labels/func/main.tsx +0 -28
- package/docs/examples/radiobutton/disabled/func/main.tsx +0 -20
- package/docs/examples/radiobutton/labels/func/main.tsx +0 -20
- package/docs/examples/radiobutton/overview/class/main.tsx +0 -35
- package/docs/examples/radiobutton/overview/func/main.tsx +0 -30
- package/docs/examples/radiogroup/controlled/class/main.tsx +0 -49
- package/docs/examples/radiogroup/controlled/func/main.tsx +0 -40
- package/docs/examples/radiogroup/default-state/func/main.tsx +0 -19
- package/docs/examples/radiogroup/forms/class/main.tsx +0 -150
- package/docs/examples/radiogroup/forms/func/main.tsx +0 -146
- package/docs/examples/radiogroup/keyboard/class/main.tsx +0 -37
- package/docs/examples/radiogroup/keyboard/func/main.tsx +0 -31
- package/docs/examples/radiogroup/layout/class/main.tsx +0 -49
- package/docs/examples/radiogroup/layout/func/main.tsx +0 -43
- package/docs/examples/radiogroup/overview/func/main.tsx +0 -18
- package/docs/examples/rangeslider/controlled/class/main.tsx +0 -45
- package/docs/examples/rangeslider/controlled/func/main.tsx +0 -37
- package/docs/examples/rangeslider/disabled/func/main.tsx +0 -27
- package/docs/examples/rangeslider/labels/func/main.tsx +0 -26
- package/docs/examples/rangeslider/orientation/func/main.tsx +0 -27
- package/docs/examples/rangeslider/overview/func/main.tsx +0 -26
- package/docs/examples/rating/controlled/class/main.tsx +0 -29
- package/docs/examples/rating/controlled/func/main.tsx +0 -21
- package/docs/examples/rating/disabled/func/main.tsx +0 -18
- package/docs/examples/rating/forms/class/main.tsx +0 -85
- package/docs/examples/rating/forms/func/main.tsx +0 -79
- package/docs/examples/rating/icon/func/main.tsx +0 -15
- package/docs/examples/rating/items/func/main.tsx +0 -15
- package/docs/examples/rating/label/class/main.tsx +0 -33
- package/docs/examples/rating/label/func/main.tsx +0 -26
- package/docs/examples/rating/navigation/func/main.tsx +0 -15
- package/docs/examples/rating/overview/func/main.tsx +0 -12
- package/docs/examples/rating/precision/func/main.tsx +0 -27
- package/docs/examples/rating/rating-item/advanced/class/main.tsx +0 -82
- package/docs/examples/rating/rating-item/advanced/func/main.tsx +0 -76
- package/docs/examples/rating/rating-item/overview/func/main.tsx +0 -75
- package/docs/examples/rating/readonly/func/main.tsx +0 -18
- package/docs/examples/rating/selection/func/main.tsx +0 -25
- package/docs/examples/rtl/func/main.tsx +0 -99
- package/docs/examples/shared/checkbox-style-configurator.tsx +0 -69
- package/docs/examples/shared/es.json +0 -6
- package/docs/examples/shared/radiobutton-style-configurator.tsx +0 -47
- package/docs/examples/shared/sample-signature.ts +0 -2
- package/docs/examples/shared/style-configurator.tsx +0 -93
- package/docs/examples/shared/switch-style-configurator.tsx +0 -91
- package/docs/examples/signature/appearance/all-options/func/main.tsx +0 -89
- package/docs/examples/signature/appearance/color/func/main.tsx +0 -17
- package/docs/examples/signature/appearance/stroke-width/func/main.tsx +0 -16
- package/docs/examples/signature/controlled/export-scale/func/main.tsx +0 -34
- package/docs/examples/signature/controlled/popup/func/main.tsx +0 -28
- package/docs/examples/signature/controlled/value/func/main.tsx +0 -19
- package/docs/examples/signature/disabled/func/main.tsx +0 -17
- package/docs/examples/signature/events/func/main.tsx +0 -66
- package/docs/examples/signature/forms/kendo/func/main.tsx +0 -148
- package/docs/examples/signature/overview/func/main.tsx +0 -239
- package/docs/examples/signature/overview/func/styles.css +0 -56
- package/docs/examples/signature/popup/disabled/func/main.tsx +0 -14
- package/docs/examples/signature/popup/scale/func/main.tsx +0 -14
- package/docs/examples/signature/readonly/func/main.tsx +0 -17
- package/docs/examples/signature/smooth/func/main.tsx +0 -14
- package/docs/examples/slider/buttons/func/main.tsx +0 -18
- package/docs/examples/slider/controlled/class/main.tsx +0 -45
- package/docs/examples/slider/controlled/func/main.tsx +0 -36
- package/docs/examples/slider/labels/class/main.tsx +0 -44
- package/docs/examples/slider/labels/func/main.tsx +0 -35
- package/docs/examples/slider/orientation/func/main.tsx +0 -25
- package/docs/examples/slider/overview/func/main.tsx +0 -24
- package/docs/examples/switch/appearance/func/main.tsx +0 -38
- package/docs/examples/switch/controlled/manual/class/main.tsx +0 -40
- package/docs/examples/switch/controlled/manual/func/main.tsx +0 -33
- package/docs/examples/switch/controlled/readonly/func/main.tsx +0 -15
- package/docs/examples/switch/default/func/main.tsx +0 -15
- package/docs/examples/switch/disabled/func/main.tsx +0 -15
- package/docs/examples/switch/forms/basic/class/main.tsx +0 -81
- package/docs/examples/switch/forms/basic/func/main.tsx +0 -72
- package/docs/examples/switch/forms/custom-message/class/main.tsx +0 -108
- package/docs/examples/switch/forms/custom-message/func/main.tsx +0 -100
- package/docs/examples/switch/forms/disable-styles/class/main.tsx +0 -129
- package/docs/examples/switch/forms/disable-styles/func/main.tsx +0 -118
- package/docs/examples/switch/forms/kendo-react-form/class/main.tsx +0 -104
- package/docs/examples/switch/forms/kendo-react-form/func/main.tsx +0 -106
- package/docs/examples/switch/keyboard/class/main.tsx +0 -22
- package/docs/examples/switch/keyboard/func/main.tsx +0 -23
- package/docs/examples/switch/labels/func/main.tsx +0 -15
- package/docs/examples/switch/overview/basic/func/main.tsx +0 -15
- package/docs/examples/textarea/appearance/func/main.tsx +0 -39
- package/docs/examples/textarea/auto-sizing/func/main.tsx +0 -18
- package/docs/examples/textarea/controlled/class/main.tsx +0 -32
- package/docs/examples/textarea/controlled/func/main.tsx +0 -26
- package/docs/examples/textarea/counter/class/main.tsx +0 -38
- package/docs/examples/textarea/counter/func/main.tsx +0 -32
- package/docs/examples/textarea/default-state/func/main.tsx +0 -18
- package/docs/examples/textarea/disabled/func/main.tsx +0 -20
- package/docs/examples/textarea/forms/kendo-react-form/class/main.tsx +0 -152
- package/docs/examples/textarea/forms/kendo-react-form/func/main.tsx +0 -140
- package/docs/examples/textarea/main/func/main.tsx +0 -15
- package/docs/examples/textarea/overview/class/main.tsx +0 -103
- package/docs/examples/textarea/overview/func/main.tsx +0 -90
- package/docs/examples/textarea/sizing/func/main.tsx +0 -15
- package/docs/examples/tsconfig.json +0 -29
- package/docs/flatcolorpicker/_meta.yml +0 -3
- package/docs/flatcolorpicker/customization.md +0 -33
- package/docs/flatcolorpicker/disabled.md +0 -22
- package/docs/flatcolorpicker/index.md +0 -30
- package/docs/floating-labels.md +0 -35
- package/docs/get-started.md +0 -153
- package/docs/globalization.md +0 -67
- package/docs/index.md +0 -212
- package/docs/input/_meta.yml +0 -3
- package/docs/input/counter.md +0 -20
- package/docs/input/forms.md +0 -87
- package/docs/input/index.md +0 -40
- package/docs/maskedtextbox/_meta.yml +0 -3
- package/docs/maskedtextbox/accessibility.md +0 -22
- package/docs/maskedtextbox/appearance.md +0 -30
- package/docs/maskedtextbox/disabled-state.md +0 -20
- package/docs/maskedtextbox/forms.md +0 -87
- package/docs/maskedtextbox/index.md +0 -40
- package/docs/maskedtextbox/masks.md +0 -44
- package/docs/maskedtextbox/readonly-state.md +0 -20
- package/docs/maskedtextbox/valid-state.md +0 -25
- package/docs/maskedtextbox/value.md +0 -23
- package/docs/numerictextbox/_meta.yml +0 -3
- package/docs/numerictextbox/accessibility.md +0 -25
- package/docs/numerictextbox/appearance.md +0 -30
- package/docs/numerictextbox/formats.md +0 -25
- package/docs/numerictextbox/forms.md +0 -87
- package/docs/numerictextbox/index.md +0 -49
- package/docs/numerictextbox/keyboard-navigation.md +0 -26
- package/docs/numerictextbox/predefined-step.md +0 -20
- package/docs/numerictextbox/ref.md +0 -28
- package/docs/numerictextbox/spin-buttons.md +0 -20
- package/docs/props-context.md +0 -65
- package/docs/radiobutton/_meta.yml +0 -3
- package/docs/radiobutton/appearance.md +0 -26
- package/docs/radiobutton/disabled.md +0 -23
- package/docs/radiobutton/index.md +0 -47
- package/docs/radiobutton/labels.md +0 -36
- package/docs/radiogroup/_meta.yml +0 -3
- package/docs/radiogroup/accessibility.md +0 -25
- package/docs/radiogroup/controlled_mode.md +0 -34
- package/docs/radiogroup/default_state.md +0 -24
- package/docs/radiogroup/forms_support.md +0 -37
- package/docs/radiogroup/index.md +0 -41
- package/docs/radiogroup/keyboard_navigation.md +0 -37
- package/docs/radiogroup/layout.md +0 -29
- package/docs/rangeslider/_meta.yml +0 -3
- package/docs/rangeslider/accessibility.md +0 -26
- package/docs/rangeslider/controlled.md +0 -32
- package/docs/rangeslider/disabled.md +0 -23
- package/docs/rangeslider/index.md +0 -41
- package/docs/rangeslider/keyboard-navigation.md +0 -33
- package/docs/rangeslider/orientation.md +0 -24
- package/docs/rangeslider/ticks.md +0 -26
- package/docs/rating/_meta.yml +0 -3
- package/docs/rating/accessibility.md +0 -26
- package/docs/rating/forms_support.md +0 -39
- package/docs/rating/functionality-and-features/_meta.yml +0 -2
- package/docs/rating/functionality-and-features/controlled.md +0 -34
- package/docs/rating/functionality-and-features/disabled.md +0 -23
- package/docs/rating/functionality-and-features/icon.md +0 -27
- package/docs/rating/functionality-and-features/items.md +0 -24
- package/docs/rating/functionality-and-features/label.md +0 -28
- package/docs/rating/functionality-and-features/precision.md +0 -51
- package/docs/rating/functionality-and-features/readonly.md +0 -23
- package/docs/rating/functionality-and-features/selection.md +0 -23
- package/docs/rating/index.md +0 -45
- package/docs/rating/item_custamization.md +0 -45
- package/docs/rating/keyboard-navigation.md +0 -33
- package/docs/signature/_meta.yml +0 -3
- package/docs/signature/appearance.md +0 -96
- package/docs/signature/controlled.md +0 -60
- package/docs/signature/disabled.md +0 -21
- package/docs/signature/events.md +0 -20
- package/docs/signature/forms.md +0 -28
- package/docs/signature/index.md +0 -34
- package/docs/signature/line-smoothing.md +0 -16
- package/docs/signature/popup.md +0 -34
- package/docs/signature/readonly.md +0 -21
- package/docs/slider/_meta.yml +0 -3
- package/docs/slider/accessibility.md +0 -26
- package/docs/slider/controlled.md +0 -32
- package/docs/slider/index.md +0 -41
- package/docs/slider/keyboard-navigation.md +0 -33
- package/docs/slider/orientation.md +0 -24
- package/docs/slider/side-buttons.md +0 -24
- package/docs/slider/ticks.md +0 -31
- package/docs/switch/_meta.yml +0 -3
- package/docs/switch/accessibility.md +0 -17
- package/docs/switch/appearance.md +0 -30
- package/docs/switch/controlled-switch.md +0 -44
- package/docs/switch/default-state.md +0 -20
- package/docs/switch/disabled-state.md +0 -20
- package/docs/switch/forms-support.md +0 -78
- package/docs/switch/index.md +0 -44
- package/docs/switch/keyboard-navigation.md +0 -31
- package/docs/switch/labels.md +0 -29
- package/docs/textarea/_meta.yml +0 -3
- package/docs/textarea/appearance.md +0 -30
- package/docs/textarea/controlled_mode.md +0 -37
- package/docs/textarea/counter.md +0 -28
- package/docs/textarea/default_state.md +0 -25
- package/docs/textarea/disabled.md +0 -24
- package/docs/textarea/forms_support.md +0 -39
- package/docs/textarea/index.md +0 -51
- package/docs/textarea/sizing.md +0 -38
- package/e2e/a11y.tests.ts +0 -154
- package/e2e/input.tests.ts +0 -143
- package/e2e/numeric.tests.ts +0 -134
- package/e2e/switch.tests.ts +0 -122
- package/examples/checkbox/checkbox.html +0 -9
- package/examples/checkbox/checkbox.tsx +0 -292
- package/examples/checkbox/checkboxForm.html +0 -9
- package/examples/checkbox/checkboxForm.tsx +0 -81
- package/examples/checkbox/checked-n-value.html +0 -9
- package/examples/checkbox/checked-n-value.tsx +0 -115
- package/examples/checkbox/controlled-mode.html +0 -9
- package/examples/checkbox/controlled-mode.tsx +0 -69
- package/examples/checkbox/form.html +0 -9
- package/examples/checkbox/form.tsx +0 -78
- package/examples/checkbox/formik.html +0 -9
- package/examples/checkbox/formik.tsx +0 -89
- package/examples/colors/colorContrast.html +0 -12
- package/examples/colors/colorContrast.tsx +0 -52
- package/examples/colors/colorGradient.html +0 -9
- package/examples/colors/colorGradient.tsx +0 -37
- package/examples/colors/colorPalette.html +0 -9
- package/examples/colors/colorPalette.tsx +0 -29
- package/examples/colors/colorPicker.html +0 -22
- package/examples/colors/colorPicker.tsx +0 -58
- package/examples/colors/colorPickerLocalization.html +0 -9
- package/examples/colors/colorPickerLocalization.tsx +0 -31
- package/examples/colors/flatColorPicker.html +0 -12
- package/examples/colors/flatColorPicker.tsx +0 -21
- package/examples/context/class/grid-with-filtering.tsx +0 -32
- package/examples/context/class/index.html +0 -9
- package/examples/context/class/index.tsx +0 -28
- package/examples/context/class/sample-products.tsx +0 -182
- package/examples/context/func/grid-with-filtering.tsx +0 -32
- package/examples/context/func/index.html +0 -9
- package/examples/context/func/index.tsx +0 -26
- package/examples/context/func/sample-products.tsx +0 -182
- package/examples/e2e/accessibility/CheckboxExample.tsx +0 -26
- package/examples/e2e/accessibility/ColorGradientExample.tsx +0 -28
- package/examples/e2e/accessibility/ColorPaletteExample.tsx +0 -33
- package/examples/e2e/accessibility/ColorPickerExample.tsx +0 -21
- package/examples/e2e/accessibility/InputExample.tsx +0 -49
- package/examples/e2e/accessibility/MaskedTextBoxExample.tsx +0 -29
- package/examples/e2e/accessibility/NumericTextBoxExample.tsx +0 -24
- package/examples/e2e/accessibility/RadioButtonExample.tsx +0 -29
- package/examples/e2e/accessibility/RangeSliderExample.tsx +0 -26
- package/examples/e2e/accessibility/RatingExample.tsx +0 -13
- package/examples/e2e/accessibility/SliderExample.tsx +0 -19
- package/examples/e2e/accessibility/SwitchExample.tsx +0 -26
- package/examples/e2e/accessibility/TextAreaExample.tsx +0 -70
- package/examples/e2e/accessibility/main.html +0 -14
- package/examples/e2e/accessibility/main.tsx +0 -104
- package/examples/e2e/input/input.html +0 -9
- package/examples/e2e/input/input.tsx +0 -58
- package/examples/e2e/numerictextbox/numericLabel.html +0 -9
- package/examples/e2e/numerictextbox/numericLabel.tsx +0 -38
- package/examples/e2e/switch/switch.html +0 -16
- package/examples/e2e/switch/switch.tsx +0 -74
- package/examples/focus/focus.html +0 -9
- package/examples/focus/focus.tsx +0 -81
- package/examples/input/inputFloatingLabels.html +0 -9
- package/examples/input/inputFloatingLabels.tsx +0 -26
- package/examples/input/inputForm.html +0 -9
- package/examples/input/inputForm.tsx +0 -151
- package/examples/maskedtextbox/basic.html +0 -9
- package/examples/maskedtextbox/basic.tsx +0 -54
- package/examples/maskedtextbox/ipmask.html +0 -9
- package/examples/maskedtextbox/ipmask.tsx +0 -79
- package/examples/messages/index.ts +0 -4
- package/examples/numerictextbox/newNumeric.html +0 -9
- package/examples/numerictextbox/newNumeric.tsx +0 -149
- package/examples/numerictextbox/numeric.html +0 -9
- package/examples/numerictextbox/numeric.tsx +0 -247
- package/examples/numerictextbox/numericApiExample.html +0 -9
- package/examples/numerictextbox/numericApiExample.tsx +0 -25
- package/examples/numerictextbox/numericForm.html +0 -9
- package/examples/numerictextbox/numericForm.tsx +0 -89
- package/examples/numerictextbox/roundingIssues.html +0 -9
- package/examples/numerictextbox/roundingIssues.tsx +0 -51
- package/examples/numerictextbox/test.html +0 -9
- package/examples/numerictextbox/test.tsx +0 -165
- package/examples/numerictextbox/testingBlurDisabled.html +0 -9
- package/examples/numerictextbox/testingBlurDisabled.tsx +0 -167
- package/examples/radio-group/customization/index.html +0 -12
- package/examples/radio-group/customization/index.tsx +0 -32
- package/examples/radioButton/accessibility.html +0 -12
- package/examples/radioButton/accessibility.tsx +0 -81
- package/examples/radioButton/html-forms.html +0 -9
- package/examples/radioButton/html-forms.tsx +0 -63
- package/examples/radioButton/kendo-react-form.html +0 -12
- package/examples/radioButton/kendo-react-form.tsx +0 -80
- package/examples/radioButton/radio.html +0 -9
- package/examples/radioButton/radio.tsx +0 -45
- package/examples/radioButton/standalone-radio.html +0 -9
- package/examples/radioButton/standalone-radio.tsx +0 -76
- package/examples/range-slider/form/index.html +0 -9
- package/examples/range-slider/form/index.tsx +0 -57
- package/examples/range-slider/index.html +0 -9
- package/examples/range-slider/index.tsx +0 -147
- package/examples/rating/index.html +0 -9
- package/examples/rating/index.tsx +0 -158
- package/examples/rtl/index.html +0 -12
- package/examples/rtl/index.tsx +0 -29
- package/examples/signature/basic.html +0 -9
- package/examples/signature/basic.tsx +0 -72
- package/examples/signature/forms-basic.html +0 -9
- package/examples/signature/forms-basic.tsx +0 -72
- package/examples/signature/forms.html +0 -9
- package/examples/signature/forms.tsx +0 -90
- package/examples/slider/slider.html +0 -15
- package/examples/slider/slider.tsx +0 -99
- package/examples/slider/vertical.html +0 -15
- package/examples/slider/vertical.tsx +0 -28
- package/examples/switch/switch.html +0 -9
- package/examples/switch/switch.tsx +0 -44
- package/examples/switch/switchDoubleEvent.html +0 -9
- package/examples/switch/switchDoubleEvent.tsx +0 -25
- package/examples/switch/switchForm.html +0 -9
- package/examples/switch/switchForm.tsx +0 -138
- package/examples/textarea/formik.html +0 -12
- package/examples/textarea/formik.tsx +0 -84
- package/examples/textarea/textarea.html +0 -12
- package/examples/textarea/textarea.tsx +0 -96
- package/gulpfile.js +0 -7
- package/src/checkbox/Checkbox.tsx +0 -352
- package/src/checkbox/interfaces/CheckboxBlurEvent.ts +0 -7
- package/src/checkbox/interfaces/CheckboxChangeEvent.ts +0 -12
- package/src/checkbox/interfaces/CheckboxFocusEvent.ts +0 -7
- package/src/checkbox/interfaces/CheckboxProps.ts +0 -122
- package/src/colors/ColorContrastLabels.tsx +0 -83
- package/src/colors/ColorContrastSvg.tsx +0 -88
- package/src/colors/ColorGradient.tsx +0 -450
- package/src/colors/ColorInput.tsx +0 -192
- package/src/colors/ColorPalette.tsx +0 -329
- package/src/colors/ColorPicker.tsx +0 -387
- package/src/colors/FlatColorPicker.tsx +0 -258
- package/src/colors/HexInput.tsx +0 -67
- package/src/colors/Picker.tsx +0 -56
- package/src/colors/interfaces/ColorGradientChangeEvent.ts +0 -12
- package/src/colors/interfaces/ColorGradientProps.ts +0 -77
- package/src/colors/interfaces/ColorPaletteChangeEvent.ts +0 -16
- package/src/colors/interfaces/ColorPaletteProps.ts +0 -78
- package/src/colors/interfaces/ColorPickerActiveColorClick.ts +0 -17
- package/src/colors/interfaces/ColorPickerBlurEvent.ts +0 -13
- package/src/colors/interfaces/ColorPickerChangeEvent.ts +0 -17
- package/src/colors/interfaces/ColorPickerFocusEvent.ts +0 -13
- package/src/colors/interfaces/ColorPickerGradientSettings.ts +0 -19
- package/src/colors/interfaces/ColorPickerPaletteSettings.ts +0 -35
- package/src/colors/interfaces/ColorPickerPopupSettings.ts +0 -16
- package/src/colors/interfaces/ColorPickerProps.ts +0 -170
- package/src/colors/interfaces/ColorPickerView.ts +0 -10
- package/src/colors/interfaces/PickerPopupSettings.ts +0 -21
- package/src/colors/interfaces/PickerProps.ts +0 -51
- package/src/colors/models/hsva.ts +0 -9
- package/src/colors/models/output-format.ts +0 -4
- package/src/colors/models/palette-presets.ts +0 -54
- package/src/colors/models/rgb.ts +0 -8
- package/src/colors/models/rgba.ts +0 -9
- package/src/colors/models/table-cell.ts +0 -7
- package/src/colors/models/tile-size.ts +0 -8
- package/src/colors/utils/color-cache.ts +0 -71
- package/src/colors/utils/color-palette.service.ts +0 -79
- package/src/colors/utils/color-parser.ts +0 -158
- package/src/colors/utils/misc.ts +0 -23
- package/src/colors/utils/svg-calc.ts +0 -115
- package/src/common/SliderTooltip.tsx +0 -83
- package/src/common/SwitchController.ts +0 -130
- package/src/common/SwitchModel.ts +0 -12
- package/src/input/Input.tsx +0 -346
- package/src/input/interfaces/InputChangeEvent.tsx +0 -12
- package/src/interfaces/Direction.ts +0 -1
- package/src/interfaces/ToggleBaseProps.ts +0 -8
- package/src/main.ts +0 -57
- package/src/maskedtextbox/MaskedTextBox.tsx +0 -541
- package/src/maskedtextbox/MaskedTextBoxProps.ts +0 -215
- package/src/maskedtextbox/masking.service.ts +0 -230
- package/src/maskedtextbox/parsing/combinators.ts +0 -30
- package/src/maskedtextbox/parsing/parsers.ts +0 -179
- package/src/maskedtextbox/parsing/result.ts +0 -39
- package/src/maskedtextbox/parsing/stream.ts +0 -41
- package/src/maskedtextbox/utils.ts +0 -70
- package/src/messages/index.ts +0 -151
- package/src/numerictextbox/NumericTextBox.tsx +0 -626
- package/src/numerictextbox/interfaces/NumericTextBoxBlurEvent.tsx +0 -7
- package/src/numerictextbox/interfaces/NumericTextBoxChangeEvent.tsx +0 -12
- package/src/numerictextbox/interfaces/NumericTextBoxFocusEvent.tsx +0 -7
- package/src/numerictextbox/interfaces/NumericTextBoxHandle.tsx +0 -40
- package/src/numerictextbox/interfaces/NumericTextBoxProps.tsx +0 -180
- package/src/numerictextbox/interfaces/NumericTextBoxState.tsx +0 -15
- package/src/numerictextbox/utils/index.tsx +0 -744
- package/src/package-metadata.ts +0 -13
- package/src/radiobutton/RadioButton.tsx +0 -194
- package/src/radiobutton/RadioGroup.tsx +0 -190
- package/src/radiobutton/interfaces/RadioButtonBlurEvent.ts +0 -7
- package/src/radiobutton/interfaces/RadioButtonChangeEvent.ts +0 -12
- package/src/radiobutton/interfaces/RadioButtonFocusEvent.ts +0 -7
- package/src/radiobutton/interfaces/RadioButtonProps.ts +0 -102
- package/src/radiobutton/interfaces/RadioGroupChangeEvent.ts +0 -12
- package/src/radiobutton/interfaces/RadioGroupFocusEvent.ts +0 -7
- package/src/radiobutton/interfaces/RadioGroupProps.ts +0 -89
- package/src/range-slider/RangeSlider.tsx +0 -644
- package/src/range-slider/range-raducer.tsx +0 -153
- package/src/rating/Rating.tsx +0 -633
- package/src/rating/RatingItem.tsx +0 -268
- package/src/rating/models/index.tsx +0 -91
- package/src/rating/rating-reducer.tsx +0 -70
- package/src/rating/utils/index.tsx +0 -65
- package/src/signature/Signature.tsx +0 -488
- package/src/signature/interfaces/SignatureBlurEvent.tsx +0 -7
- package/src/signature/interfaces/SignatureChangeEvent.tsx +0 -12
- package/src/signature/interfaces/SignatureCloseEvent.tsx +0 -7
- package/src/signature/interfaces/SignatureFocusEvent.tsx +0 -7
- package/src/signature/interfaces/SignatureHandle.tsx +0 -35
- package/src/signature/interfaces/SignatureOpenEvent.tsx +0 -7
- package/src/signature/interfaces/SignatureProps.tsx +0 -227
- package/src/signature/interfaces/index.ts +0 -7
- package/src/signature/utils/index.ts +0 -11
- package/src/slider/Slider.tsx +0 -470
- package/src/slider/SliderLabel.tsx +0 -69
- package/src/switch/Switch.tsx +0 -559
- package/src/textarea/TextArea.tsx +0 -263
- package/src/textarea/interfaces/TextAreaBlurEvent.ts +0 -7
- package/src/textarea/interfaces/TextAreaChangeEvent.ts +0 -12
- package/src/textarea/interfaces/TextAreaFocusEvent.ts +0 -7
- package/src/textarea/interfaces/TextAreaProps.tsx +0 -131
- package/src/utils.ts +0 -16
- package/test/Checkbox.tsx +0 -252
- package/test/ColorGradient.tsx +0 -260
- package/test/ColorPalette.tsx +0 -440
- package/test/ColorPicker.tsx +0 -74
- package/test/Input.tsx +0 -255
- package/test/NumericTextBox.tsx +0 -984
- package/test/RadioButton.tsx +0 -176
- package/test/RangeSlider.tsx +0 -502
- package/test/Rating.tsx +0 -227
- package/test/Slider.tsx +0 -198
- package/test/Switch.tsx +0 -154
- package/test/TextArea.tsx +0 -216
- package/test/maskedtextbox/component.tsx +0 -424
- package/test/maskedtextbox/masking.service.tsx +0 -1345
- package/test/maskedtextbox/parser.tsx +0 -364
- package/tsconfig.es.json +0 -25
- package/tsconfig.json +0 -26
- package/tsconfig.npm.json +0 -25
|
@@ -1,744 +0,0 @@
|
|
|
1
|
-
import { NumericTextBoxState } from '../interfaces/NumericTextBoxState';
|
|
2
|
-
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
3
|
-
|
|
4
|
-
const DEFAULT_NUMBER = 1111111.1111111;
|
|
5
|
-
const MAX_DECIMAL = 0.31111111111111117;
|
|
6
|
-
const MIN_DECIMAL = 1;
|
|
7
|
-
const ONE_NUMBER = 1;
|
|
8
|
-
const ZERO_NUMBER = 0;
|
|
9
|
-
const DIGITS_REGEX = /\d/;
|
|
10
|
-
const MAX_PRECISION = 15;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export const getInitialState = () => ({
|
|
16
|
-
eventValue: null,
|
|
17
|
-
prevLooseValue: '',
|
|
18
|
-
currentLooseValue: '',
|
|
19
|
-
|
|
20
|
-
focused: false,
|
|
21
|
-
|
|
22
|
-
selectionStart: undefined,
|
|
23
|
-
selectionEnd: undefined,
|
|
24
|
-
decimalSelect: false,
|
|
25
|
-
valueIsCorrected: false,
|
|
26
|
-
valueIsOutOfRange: false
|
|
27
|
-
} as NumericTextBoxState);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export const getStateOrPropsValue = (
|
|
33
|
-
value: number | null | undefined,
|
|
34
|
-
stateValue: number | null | undefined
|
|
35
|
-
): number | null | undefined => {
|
|
36
|
-
return value !== undefined ? value : stateValue;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @hidden
|
|
41
|
-
*/
|
|
42
|
-
export const formatValue = (
|
|
43
|
-
value: string | number | null | undefined,
|
|
44
|
-
format: string | NumberFormatOptions | undefined,
|
|
45
|
-
intlService: any
|
|
46
|
-
): string => {
|
|
47
|
-
if (value === null && value === undefined) {
|
|
48
|
-
return '';
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (typeof value === 'string') {
|
|
52
|
-
return value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return intlService.formatNumber(value, format);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
export const fractionLength = (value: number) => {
|
|
62
|
-
return (String(value).split('.')[1] || '').length;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @hidden
|
|
67
|
-
*/
|
|
68
|
-
const maxFractionLength = (value1: number, value2: number): number => {
|
|
69
|
-
return Math.max(fractionLength(value1), fractionLength(value2));
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @hidden
|
|
74
|
-
*/
|
|
75
|
-
export const limitPrecision = (precision: number): number => Math.min(precision, MAX_PRECISION);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
export const toFixedPrecision = (value: number, precision: number): number => {
|
|
81
|
-
const maxPrecision = limitPrecision(precision);
|
|
82
|
-
|
|
83
|
-
return parseFloat(value.toFixed(maxPrecision));
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @hidden
|
|
88
|
-
*/
|
|
89
|
-
export const increaseValue = (value: any, newState: any, step: any, min: any, max: any, format: any, intlService: any) => {
|
|
90
|
-
const maxPrecision = maxFractionLength(value || 0, step || 0);
|
|
91
|
-
const increasedValue = rangeValue(toFixedPrecision((value || 0) + (step || 0), maxPrecision), min, max);
|
|
92
|
-
|
|
93
|
-
newState.eventValue = increasedValue;
|
|
94
|
-
newState.currentLooseValue = formatValue(increasedValue, format, intlService);
|
|
95
|
-
|
|
96
|
-
newState.selectionStart = newState.selectionEnd = getLastNumberIndex(newState.currentLooseValue, DIGITS_REGEX);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
102
|
-
export const decreaseValue = (value: any, newState: any, step: any, min: any, max: any, format: any, intlService: any) => {
|
|
103
|
-
const maxPrecision = maxFractionLength(value || 0, step || 0);
|
|
104
|
-
const decreasedValue = rangeValue(toFixedPrecision((value || 0) - (step || 0), maxPrecision), min, max);
|
|
105
|
-
|
|
106
|
-
newState.eventValue = decreasedValue;
|
|
107
|
-
newState.currentLooseValue = formatValue(decreasedValue, format, intlService);
|
|
108
|
-
newState.selectionStart = newState.selectionEnd = getLastNumberIndex(newState.currentLooseValue, DIGITS_REGEX);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @hidden
|
|
113
|
-
*/
|
|
114
|
-
export const rangeValue = (value: number | null, min?: number, max?: number): number | null => {
|
|
115
|
-
if (value == null) {
|
|
116
|
-
return value;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (!(value > 1 || value < 1 || value === 1)) {
|
|
120
|
-
// null, undefined or NaN
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (max !== undefined && min !== undefined && max < min) {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (max !== undefined && value > max) {
|
|
129
|
-
value = max;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (min !== undefined && value! < min) {
|
|
133
|
-
value = min;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return value;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @hidden
|
|
141
|
-
*/
|
|
142
|
-
export const getMaxCursorPosition = (nextValue: string, formatInfo: string[][]) => {
|
|
143
|
-
const formatSuffixIndex = formatInfo.findIndex(([_, currSuffix]) => {
|
|
144
|
-
return Boolean(currSuffix) && nextValue.indexOf(currSuffix) === nextValue.length - currSuffix.length;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
if (formatSuffixIndex === -1) {
|
|
148
|
-
return -1;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const suffix = formatInfo[formatSuffixIndex][1];
|
|
152
|
-
return nextValue.length - suffix.length;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @hidden
|
|
157
|
-
*/
|
|
158
|
-
export const getMinCursorPosition = (nextValue: string, formatInfo: string[][]) => {
|
|
159
|
-
const formatPrefixIndex = formatInfo.findIndex(([currPrefix, _]) => {
|
|
160
|
-
return Boolean(currPrefix) && nextValue.indexOf(currPrefix) === 0;
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
if (formatPrefixIndex === -1) {
|
|
164
|
-
return -1;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const prefix = formatInfo[formatPrefixIndex][0];
|
|
168
|
-
return prefix.length;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @hidden
|
|
173
|
-
*/
|
|
174
|
-
export const rangeSelection = (nextLooseValue: string, formatInfo: string[][], newState: NumericTextBoxState) => {
|
|
175
|
-
const maxPosition = getMaxCursorPosition(nextLooseValue, formatInfo);
|
|
176
|
-
|
|
177
|
-
if (maxPosition !== -1 && newState.selectionStart! > maxPosition) {
|
|
178
|
-
newState.selectionStart = newState.selectionEnd = maxPosition;
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (newState.selectionStart! > nextLooseValue.length) {
|
|
183
|
-
newState.selectionStart = newState.selectionEnd = nextLooseValue.length;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const minPosition = getMinCursorPosition(nextLooseValue, formatInfo);
|
|
187
|
-
|
|
188
|
-
if (minPosition !== -1 && newState.selectionStart! < minPosition) {
|
|
189
|
-
newState.selectionStart = newState.selectionEnd = minPosition;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (newState.selectionStart! === -1) {
|
|
193
|
-
newState.selectionStart = newState.selectionEnd = 0;
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* @hidden
|
|
199
|
-
*/
|
|
200
|
-
export const setSelection = (newState: NumericTextBoxState, newIndex: number, nextLooseValue: string, formatInfo: string[][]) => {
|
|
201
|
-
newState.selectionStart = newState.selectionEnd = newIndex;
|
|
202
|
-
|
|
203
|
-
rangeSelection(nextLooseValue, formatInfo, newState);
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @hidden
|
|
208
|
-
*/
|
|
209
|
-
export const setInvalid = (
|
|
210
|
-
newState: NumericTextBoxState,
|
|
211
|
-
format: string | NumberFormatOptions | undefined,
|
|
212
|
-
formatInfo: string[][],
|
|
213
|
-
intlService: any
|
|
214
|
-
): void => {
|
|
215
|
-
newState.eventValue = intlService.parseNumber(newState.prevLooseValue, format);
|
|
216
|
-
newState.currentLooseValue = newState.prevLooseValue;
|
|
217
|
-
newState.valueIsCorrected = true;
|
|
218
|
-
|
|
219
|
-
setSelection(newState, newState.selectionStart!, newState.currentLooseValue!, formatInfo);
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @hidden
|
|
224
|
-
*/
|
|
225
|
-
export const isMinusSymbolAdded = (newState: NumericTextBoxState, symbols: any) => {
|
|
226
|
-
const newText = String(newState.currentLooseValue);
|
|
227
|
-
const oldText = String(newState.prevLooseValue);
|
|
228
|
-
|
|
229
|
-
return (
|
|
230
|
-
newText.split(symbols.minusSign).length !== oldText.split(symbols.minusSign).length &&
|
|
231
|
-
newText.length === oldText.length + symbols.minusSign.length
|
|
232
|
-
);
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* @hidden
|
|
237
|
-
*/
|
|
238
|
-
export const isMinusSymbolRemoved = (newState: NumericTextBoxState, symbols: any) => {
|
|
239
|
-
const newText = String(newState.currentLooseValue);
|
|
240
|
-
const oldText = String(newState.prevLooseValue);
|
|
241
|
-
|
|
242
|
-
return (
|
|
243
|
-
newText.indexOf(symbols.minusSign) === -1 && oldText.indexOf(symbols.minusSign) !== -1
|
|
244
|
-
);
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* @hidden
|
|
249
|
-
*/
|
|
250
|
-
export const isDecimalDuplicated = (newState: NumericTextBoxState, symbols: any) => {
|
|
251
|
-
const newText = String(newState.currentLooseValue);
|
|
252
|
-
|
|
253
|
-
return newText.split(symbols.decimal).length > 2;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @hidden
|
|
258
|
-
*/
|
|
259
|
-
export const getFormatPrefixSufix = (format: string | NumberFormatOptions | undefined, intlService: any) => {
|
|
260
|
-
const positiveResult = intlService.formatNumber(DEFAULT_NUMBER, format);
|
|
261
|
-
const negativeResult = intlService.formatNumber(-DEFAULT_NUMBER, format);
|
|
262
|
-
const zeroResult = intlService.formatNumber(ZERO_NUMBER, format);
|
|
263
|
-
const oneResult = intlService.formatNumber(ONE_NUMBER, format);
|
|
264
|
-
|
|
265
|
-
const positivePrefix = getPrefix(positiveResult);
|
|
266
|
-
const negativePrefix = getPrefix(negativeResult);
|
|
267
|
-
const zeroPrefix = getPrefix(zeroResult);
|
|
268
|
-
const onePrefix = getPrefix(oneResult);
|
|
269
|
-
|
|
270
|
-
const positiveSuffix = getSuffix(positiveResult);
|
|
271
|
-
const negativeSuffix = getSuffix(negativeResult);
|
|
272
|
-
const zeroSuffix = getSuffix(zeroResult);
|
|
273
|
-
const oneSuffix = getSuffix(oneResult);
|
|
274
|
-
|
|
275
|
-
return {
|
|
276
|
-
positiveInfo: [positivePrefix, positiveSuffix],
|
|
277
|
-
negativeInfo: [negativePrefix, negativeSuffix],
|
|
278
|
-
zeroInfo: [zeroPrefix, zeroSuffix],
|
|
279
|
-
oneInfo: [onePrefix, oneSuffix]
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* @hidden
|
|
285
|
-
*/
|
|
286
|
-
export const getFormatSymbols = (format: string | NumberFormatOptions | undefined, intlService: any): string => {
|
|
287
|
-
const positiveResult = intlService.formatNumber(DEFAULT_NUMBER, format);
|
|
288
|
-
const negativeResult = intlService.formatNumber(-DEFAULT_NUMBER, format);
|
|
289
|
-
const zeroResult = intlService.formatNumber(ZERO_NUMBER, format);
|
|
290
|
-
const oneResult = intlService.formatNumber(ONE_NUMBER, format);
|
|
291
|
-
|
|
292
|
-
const symbols = intlService.numberSymbols();
|
|
293
|
-
const sanitizeRegex = new RegExp(`[\\d\\${symbols.decimal}${symbols.group}]`, 'g');
|
|
294
|
-
|
|
295
|
-
const resultWithDuplicates = [positiveResult, negativeResult, zeroResult, oneResult]
|
|
296
|
-
.map(result => result.replace(sanitizeRegex, ''))
|
|
297
|
-
.join('');
|
|
298
|
-
|
|
299
|
-
return resultWithDuplicates
|
|
300
|
-
.split('')
|
|
301
|
-
.filter((x, n, s) => s.indexOf(x) === n)
|
|
302
|
-
.join('');
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* @hidden
|
|
307
|
-
*/
|
|
308
|
-
export const getInitialPosition = (nextLooseValue: string, symbols: any) => {
|
|
309
|
-
const decimalIdex = nextLooseValue.indexOf(symbols.decimal);
|
|
310
|
-
if (decimalIdex > -1) {
|
|
311
|
-
return decimalIdex;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return getLastNumberIndex(nextLooseValue, DIGITS_REGEX);
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* @hidden
|
|
319
|
-
*/
|
|
320
|
-
export const reverseString = (str: string): string => {
|
|
321
|
-
return str.split('').reverse().join('');
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* @hidden
|
|
326
|
-
*/
|
|
327
|
-
export const getLastNumberIndex = (currentLooseValue: string, inputRegex: RegExp) => {
|
|
328
|
-
return currentLooseValue.length - reverseString(currentLooseValue).search(inputRegex);
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* @hidden
|
|
333
|
-
*/
|
|
334
|
-
export const getPrefix = (str: string): string => {
|
|
335
|
-
return str.split(str[str.search(DIGITS_REGEX)])[0];
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* @hidden
|
|
340
|
-
*/
|
|
341
|
-
export const getSuffix = (str: string): string => {
|
|
342
|
-
const reversedString = reverseString(str);
|
|
343
|
-
return reverseString(reversedString.split(reversedString[reversedString.search(DIGITS_REGEX)])[0]);
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* @hidden
|
|
348
|
-
*/
|
|
349
|
-
export const getFirstNumberIndex = (prevLooseValue: string, inputRegex: RegExp) => {
|
|
350
|
-
return prevLooseValue.search(inputRegex);
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* @hidden
|
|
355
|
-
*/
|
|
356
|
-
export const getDecimalCount = (value: string, decimal: string) => {
|
|
357
|
-
const currentDecimalPlace = value.indexOf(decimal);
|
|
358
|
-
|
|
359
|
-
return currentDecimalPlace > -1 ? value.length - currentDecimalPlace - 1 : 0;
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* @hidden
|
|
364
|
-
*/
|
|
365
|
-
export const changeBasedSelection = (
|
|
366
|
-
currentValue: string,
|
|
367
|
-
nextValue: string,
|
|
368
|
-
selectionPosition: number,
|
|
369
|
-
isDelete: boolean,
|
|
370
|
-
sanitizeRegex: any
|
|
371
|
-
) => {
|
|
372
|
-
const isCurrentLeadingZero = currentValue.replace(sanitizeRegex, '')[0] === '0';
|
|
373
|
-
const isNextLeadingZero = nextValue.replace(sanitizeRegex, '')[0] === '0';
|
|
374
|
-
|
|
375
|
-
if (isCurrentLeadingZero && !isNextLeadingZero) {
|
|
376
|
-
return selectionPosition - 1;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
if (isNextLeadingZero && isDelete) {
|
|
380
|
-
return selectionPosition + 1;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
let numberCounter = 0;
|
|
384
|
-
for (let idx = 0; idx < selectionPosition; idx++) {
|
|
385
|
-
if (DIGITS_REGEX.test(currentValue.charAt(idx))) {
|
|
386
|
-
numberCounter++;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
let newSelection = 0;
|
|
391
|
-
while (numberCounter > 0 && nextValue.length > newSelection) {
|
|
392
|
-
if (DIGITS_REGEX.test(nextValue.charAt(newSelection))) {
|
|
393
|
-
numberCounter--;
|
|
394
|
-
}
|
|
395
|
-
newSelection++;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
return newSelection;
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* @hidden
|
|
403
|
-
*/
|
|
404
|
-
export const sanitizeNumber = (
|
|
405
|
-
state: NumericTextBoxState,
|
|
406
|
-
format: string | NumberFormatOptions | undefined,
|
|
407
|
-
intlService: any
|
|
408
|
-
): NumericTextBoxState => {
|
|
409
|
-
const newState: NumericTextBoxState = { ...state };
|
|
410
|
-
|
|
411
|
-
const { prevLooseValue } = newState;
|
|
412
|
-
const symbols = intlService.numberSymbols();
|
|
413
|
-
const restrictedSymbols = getFormatSymbols(format, intlService);
|
|
414
|
-
|
|
415
|
-
const currentLooseValueAsString = String(newState.currentLooseValue);
|
|
416
|
-
const prevLooseValueAsString = String(prevLooseValue);
|
|
417
|
-
|
|
418
|
-
const sanitizeRegex = new RegExp(`[^\\d\\${symbols.decimal}]`, 'g');
|
|
419
|
-
const sanitizeGroupRegex = new RegExp(`[^\\d\\${symbols.decimal}\\${symbols.group}]`, 'g');
|
|
420
|
-
const allSymbolsRegex = new RegExp(`[\\d\\${symbols.decimal}\\${symbols.group}]`);
|
|
421
|
-
|
|
422
|
-
const sanitizedString = currentLooseValueAsString.replace(sanitizeRegex, '');
|
|
423
|
-
|
|
424
|
-
const numberStart = getFirstNumberIndex(currentLooseValueAsString, DIGITS_REGEX);
|
|
425
|
-
const numberEnd = numberStart === -1 ? -1 : getLastNumberIndex(currentLooseValueAsString, DIGITS_REGEX);
|
|
426
|
-
const decimalIndex = currentLooseValueAsString.indexOf(symbols.decimal);
|
|
427
|
-
|
|
428
|
-
const sanitizedFormattedString = (
|
|
429
|
-
currentLooseValueAsString.substring(0, numberStart) +
|
|
430
|
-
currentLooseValueAsString.substring(numberStart, numberEnd).replace(sanitizeGroupRegex, '') +
|
|
431
|
-
currentLooseValueAsString.substring(numberEnd, currentLooseValueAsString.length))
|
|
432
|
-
.split('')
|
|
433
|
-
.filter(s => restrictedSymbols.indexOf(s) !== -1 || s.search(allSymbolsRegex) !== -1)
|
|
434
|
-
.join('');
|
|
435
|
-
|
|
436
|
-
const formattedMax = intlService.formatNumber(MAX_DECIMAL, format).replace(sanitizeRegex, '');
|
|
437
|
-
const maxDecimalIndex = formattedMax.indexOf(symbols.decimal);
|
|
438
|
-
const maxDecimalCount = maxDecimalIndex > -1 ? formattedMax.length - maxDecimalIndex - 1 : 0;
|
|
439
|
-
|
|
440
|
-
const formattedMin = intlService.formatNumber(MIN_DECIMAL, format).replace(sanitizeRegex, '');
|
|
441
|
-
const minDecimalIndex = formattedMin.indexOf(symbols.decimal);
|
|
442
|
-
const minDecimalCount = minDecimalIndex > -1 ? formattedMin.length - minDecimalIndex - 1 : 0;
|
|
443
|
-
|
|
444
|
-
const {
|
|
445
|
-
positiveInfo, negativeInfo, zeroInfo, oneInfo
|
|
446
|
-
} = getFormatPrefixSufix(format, intlService);
|
|
447
|
-
const formatInfo: string[][] = [positiveInfo, negativeInfo, zeroInfo, oneInfo];
|
|
448
|
-
const isFormatContainPrefixSuffix = formatInfo.findIndex(info => info.findIndex(nestedInfo => Boolean(nestedInfo)) !== -1) !== 1;
|
|
449
|
-
const isDelete = currentLooseValueAsString.length > 0 && currentLooseValueAsString.length < prevLooseValueAsString.length;
|
|
450
|
-
const isPercentFormat = typeof format === 'string' &&
|
|
451
|
-
format[0] === 'p' &&
|
|
452
|
-
currentLooseValueAsString &&
|
|
453
|
-
currentLooseValueAsString.indexOf(symbols.percentSign) === -1;
|
|
454
|
-
|
|
455
|
-
if (!newState.isPaste) {
|
|
456
|
-
// 1. Empty input
|
|
457
|
-
if (currentLooseValueAsString === '') {
|
|
458
|
-
newState.eventValue = null;
|
|
459
|
-
newState.currentLooseValue = '';
|
|
460
|
-
|
|
461
|
-
return newState;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// 2. Check is minus sign
|
|
465
|
-
if (newState.currentLooseValue === symbols.minusSign && intlService.formatNumber(-0, format) !== prevLooseValueAsString) {
|
|
466
|
-
newState.eventValue = -0;
|
|
467
|
-
newState.currentLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
468
|
-
|
|
469
|
-
setSelection(
|
|
470
|
-
newState,
|
|
471
|
-
getInitialPosition(newState.currentLooseValue, symbols),
|
|
472
|
-
newState.currentLooseValue,
|
|
473
|
-
formatInfo
|
|
474
|
-
);
|
|
475
|
-
|
|
476
|
-
return newState;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// 3. Minus sign toggle
|
|
480
|
-
if (isMinusSymbolAdded(newState, symbols)) {
|
|
481
|
-
const nextValue = intlService.parseNumber(prevLooseValue, format);
|
|
482
|
-
newState.eventValue = -(nextValue !== null ? nextValue : 0);
|
|
483
|
-
newState.currentLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
484
|
-
|
|
485
|
-
const currentNumberStart = getFirstNumberIndex(newState.currentLooseValue, DIGITS_REGEX);
|
|
486
|
-
const oldNumberStart = getFirstNumberIndex(prevLooseValueAsString, DIGITS_REGEX);
|
|
487
|
-
|
|
488
|
-
setSelection(
|
|
489
|
-
newState,
|
|
490
|
-
newState.selectionEnd! - 1 + (currentNumberStart - oldNumberStart),
|
|
491
|
-
newState.currentLooseValue,
|
|
492
|
-
formatInfo
|
|
493
|
-
);
|
|
494
|
-
|
|
495
|
-
return newState;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
if (isMinusSymbolRemoved(newState, symbols)) {
|
|
499
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
500
|
-
|
|
501
|
-
setSelection(
|
|
502
|
-
newState,
|
|
503
|
-
newState.selectionStart!,
|
|
504
|
-
newState.currentLooseValue!,
|
|
505
|
-
formatInfo
|
|
506
|
-
);
|
|
507
|
-
|
|
508
|
-
return newState;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
// 4. Check is decimal symbol
|
|
512
|
-
if (newState.currentLooseValue === symbols.decimal) {
|
|
513
|
-
newState.eventValue = 0;
|
|
514
|
-
const valueCandidate = formatValue(newState.eventValue, format, intlService);
|
|
515
|
-
|
|
516
|
-
if (minDecimalCount === 0 && maxDecimalCount > 0) {
|
|
517
|
-
const currentLastNumberIndex = getLastNumberIndex(valueCandidate, DIGITS_REGEX);
|
|
518
|
-
newState.currentLooseValue = valueCandidate.substring(0, currentLastNumberIndex) +
|
|
519
|
-
symbols.decimal +
|
|
520
|
-
valueCandidate.substring(currentLastNumberIndex);
|
|
521
|
-
} else {
|
|
522
|
-
newState.currentLooseValue = valueCandidate;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
setSelection(
|
|
526
|
-
newState,
|
|
527
|
-
getInitialPosition(newState.currentLooseValue, symbols) + 1,
|
|
528
|
-
newState.currentLooseValue,
|
|
529
|
-
formatInfo
|
|
530
|
-
);
|
|
531
|
-
|
|
532
|
-
return newState;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
// 5. Duplicate decimal - it's possible only as trailing
|
|
536
|
-
if (isDecimalDuplicated(newState, symbols)) {
|
|
537
|
-
setInvalid(newState, format, formatInfo, intlService);
|
|
538
|
-
|
|
539
|
-
return newState;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
// 6. Percent format
|
|
543
|
-
if (isPercentFormat) {
|
|
544
|
-
newState.eventValue = intlService.parseNumber(currentLooseValueAsString, format) / 100;
|
|
545
|
-
newState.currentLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
546
|
-
|
|
547
|
-
return newState;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
// 7. More than 15 numeric symbols
|
|
551
|
-
const numericSymbols = String(newState.currentLooseValue).replace(/[^\d]/g, '');
|
|
552
|
-
|
|
553
|
-
if (numericSymbols.length > MAX_PRECISION) {
|
|
554
|
-
setInvalid(newState, format, formatInfo, intlService);
|
|
555
|
-
|
|
556
|
-
return newState;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// 8. Check prefix / suffix for modifications
|
|
560
|
-
if (sanitizedString !== currentLooseValueAsString &&
|
|
561
|
-
currentLooseValueAsString &&
|
|
562
|
-
isFormatContainPrefixSuffix
|
|
563
|
-
) {
|
|
564
|
-
const formatInfoIndex = formatInfo.findIndex(([prefix, suffix]) => {
|
|
565
|
-
const prefixIndex = currentLooseValueAsString.indexOf(prefix);
|
|
566
|
-
const suffixIndex = currentLooseValueAsString.indexOf(suffix);
|
|
567
|
-
|
|
568
|
-
const prefixFound = prefixIndex === 0;
|
|
569
|
-
const suffixFound = suffixIndex === currentLooseValueAsString.length - suffix.length;
|
|
570
|
-
|
|
571
|
-
const prefixGap = prefixIndex + prefix.length !== numberStart &&
|
|
572
|
-
numberStart !== -1 &&
|
|
573
|
-
currentLooseValueAsString[prefixIndex + prefix.length] !== symbols.decimal;
|
|
574
|
-
|
|
575
|
-
const suffixGap = suffixIndex !== numberEnd &&
|
|
576
|
-
numberEnd !== -1 &&
|
|
577
|
-
currentLooseValueAsString[suffixIndex - 1] !== symbols.decimal;
|
|
578
|
-
|
|
579
|
-
if (prefix && suffix) {
|
|
580
|
-
if (prefixGap || suffixGap) {
|
|
581
|
-
return false;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
return prefixFound && suffixFound;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
if (prefix) {
|
|
588
|
-
if (prefixGap) {
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return prefixFound;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
if (suffix) {
|
|
596
|
-
if (suffixGap) {
|
|
597
|
-
return false;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
return suffixFound;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
return false;
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
if (formatInfoIndex === -1) {
|
|
607
|
-
setInvalid(newState, format, formatInfo, intlService);
|
|
608
|
-
|
|
609
|
-
return newState;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
// 9. Value ending on decimal separator (here as decimal might be typed inside format)
|
|
614
|
-
if (sanitizedString[sanitizedString.length - 1] === symbols.decimal && maxDecimalCount > 0) {
|
|
615
|
-
newState.eventValue = intlService.parseNumber(currentLooseValueAsString, format);
|
|
616
|
-
newState.currentLooseValue = sanitizedFormattedString;
|
|
617
|
-
|
|
618
|
-
return newState;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// 10. prevent deleting decimal and group symbols
|
|
622
|
-
if (newState.currentLooseValue && prevLooseValue) {
|
|
623
|
-
const isSpecialSymbolDeleted = (restrictedSymbols + symbols.decimal + symbols.group)
|
|
624
|
-
.split('')
|
|
625
|
-
.findIndex(s => {
|
|
626
|
-
if (currentLooseValueAsString.split('').filter(x => x === s).length <
|
|
627
|
-
prevLooseValueAsString.split('').filter(x => x === s).length &&
|
|
628
|
-
currentLooseValueAsString.length + 1 === prevLooseValueAsString.length) {
|
|
629
|
-
|
|
630
|
-
if (s === symbols.decimal &&
|
|
631
|
-
getDecimalCount(prevLooseValueAsString.replace(sanitizeRegex, ''), symbols.decimal) === 0) {
|
|
632
|
-
return false;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
return true;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
return false;
|
|
639
|
-
}) > -1;
|
|
640
|
-
|
|
641
|
-
if (isSpecialSymbolDeleted) {
|
|
642
|
-
newState.eventValue = intlService.parseNumber(state.prevLooseValue, format);
|
|
643
|
-
newState.currentLooseValue = state.prevLooseValue;
|
|
644
|
-
|
|
645
|
-
return newState;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
const currentDecimalCount = getDecimalCount(sanitizedString, symbols.decimal);
|
|
650
|
-
const endsOnDecimal = sanitizedString[sanitizedString.length - 1] === '0';
|
|
651
|
-
|
|
652
|
-
// 11. Deleting more decimals than allowed
|
|
653
|
-
if (isDelete && endsOnDecimal && currentDecimalCount < minDecimalCount) {
|
|
654
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
655
|
-
newState.currentLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
656
|
-
|
|
657
|
-
return newState;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
// 12. Ending on zero OR more decimals than allowed
|
|
661
|
-
if (currentDecimalCount > 0) {
|
|
662
|
-
const valueUntillDecimal = currentLooseValueAsString.substring(0, decimalIndex);
|
|
663
|
-
|
|
664
|
-
if (endsOnDecimal && (!valueUntillDecimal || prevLooseValueAsString.indexOf(valueUntillDecimal) !== 0)) {
|
|
665
|
-
// ending on zero but typing before decimal separator
|
|
666
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
667
|
-
const nextLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
668
|
-
|
|
669
|
-
setSelection(
|
|
670
|
-
newState,
|
|
671
|
-
changeBasedSelection(currentLooseValueAsString, nextLooseValue, newState.selectionEnd!, isDelete, sanitizeRegex),
|
|
672
|
-
nextLooseValue,
|
|
673
|
-
formatInfo
|
|
674
|
-
);
|
|
675
|
-
|
|
676
|
-
newState.currentLooseValue = nextLooseValue;
|
|
677
|
-
|
|
678
|
-
return newState;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
if (currentDecimalCount > maxDecimalCount) {
|
|
682
|
-
// typing more symbols than format allows
|
|
683
|
-
const looseDecimalPlace = currentLooseValueAsString.indexOf(symbols.decimal);
|
|
684
|
-
|
|
685
|
-
const result = currentLooseValueAsString.substring(0, looseDecimalPlace) +
|
|
686
|
-
currentLooseValueAsString.substring(looseDecimalPlace, looseDecimalPlace + 1 + maxDecimalCount) +
|
|
687
|
-
currentLooseValueAsString.substring(numberEnd, String(newState.currentLooseValue).length);
|
|
688
|
-
|
|
689
|
-
newState.eventValue = intlService.parseNumber(result, format);
|
|
690
|
-
newState.currentLooseValue = result;
|
|
691
|
-
|
|
692
|
-
setSelection(newState, newState.selectionStart!, result, formatInfo);
|
|
693
|
-
|
|
694
|
-
return newState;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
if (minDecimalCount !== maxDecimalCount && currentDecimalCount <= maxDecimalCount && endsOnDecimal) {
|
|
698
|
-
// adding trailing zeroes
|
|
699
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
700
|
-
newState.currentLooseValue = sanitizedFormattedString;
|
|
701
|
-
|
|
702
|
-
return newState;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
if (currentDecimalCount < minDecimalCount) {
|
|
706
|
-
// deleting more decimals than allowed
|
|
707
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
708
|
-
newState.currentLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
709
|
-
|
|
710
|
-
return newState;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
// X. All other values should be parsed
|
|
716
|
-
newState.eventValue = intlService.parseNumber(newState.currentLooseValue, format);
|
|
717
|
-
|
|
718
|
-
if (isPercentFormat) {
|
|
719
|
-
newState.eventValue = newState.eventValue! / 100;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
if (typeof newState.eventValue === 'number') {
|
|
723
|
-
const nextLooseValue = formatValue(newState.eventValue, format, intlService);
|
|
724
|
-
|
|
725
|
-
// First digit add
|
|
726
|
-
if (currentLooseValueAsString.length === 1) {
|
|
727
|
-
setSelection(newState, getInitialPosition(nextLooseValue, symbols), nextLooseValue, formatInfo);
|
|
728
|
-
} else {
|
|
729
|
-
setSelection(
|
|
730
|
-
newState,
|
|
731
|
-
changeBasedSelection(currentLooseValueAsString, nextLooseValue, newState.selectionEnd!, isDelete, sanitizeRegex),
|
|
732
|
-
nextLooseValue,
|
|
733
|
-
formatInfo
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
newState.currentLooseValue = nextLooseValue;
|
|
738
|
-
} else {
|
|
739
|
-
// Case when deleting last number
|
|
740
|
-
newState.currentLooseValue = formatValue(intlService.parseNumber(sanitizedString), format, intlService);
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
return newState;
|
|
744
|
-
};
|