@elliemae/ds-form 2.0.0-alpha.1 → 2.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Checkbox/DSCheckbox.js +20 -17
- package/cjs/Checkbox/elements/CheckMark.js +1 -1
- package/cjs/Checkbox/index.js +2 -4
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +28 -20
- package/cjs/CheckboxGroup/index.js +1 -1
- package/cjs/ComboBox/DSComboBox.js +3 -7
- package/cjs/ComboBox/index.js +6 -7
- package/cjs/ComboBox/v1/DSComboBox.js +49 -47
- package/cjs/ComboBox/v1/components/AllOption.js +8 -3
- package/cjs/ComboBox/v1/components/ClearIndicator.js +3 -4
- package/cjs/ComboBox/v1/components/Control.js +15 -7
- package/cjs/ComboBox/v1/components/CustomOption.js +16 -10
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +17 -11
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +10 -6
- package/cjs/ComboBox/v1/components/MenuList.js +10 -4
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js +5 -2
- package/cjs/ComboBox/v1/components/MultiValueLabel.js +5 -4
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +6 -1
- package/cjs/ComboBox/v1/components/SelectMenu.js +30 -22
- package/cjs/ComboBox/v1/components/SingleValueLabel.js +5 -4
- package/cjs/ComboBox/v1/components/ValueContainer.js +9 -4
- package/cjs/ComboBox/v1/components/calculateWidth.js +4 -0
- package/cjs/ComboBox/v1/components/getoptions.js +11 -6
- package/cjs/ComboBox/v1/index.js +3 -7
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +29 -17
- package/cjs/ComboBox/v2/Combobox.js +23 -17
- package/cjs/ComboBox/v2/components/AllOption.js +8 -3
- package/cjs/ComboBox/v2/components/ClearIndicator.js +10 -6
- package/cjs/ComboBox/v2/components/Content.js +8 -3
- package/cjs/ComboBox/v2/components/Control.js +15 -7
- package/cjs/ComboBox/v2/components/CustomOption.js +18 -12
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +23 -15
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +12 -7
- package/cjs/ComboBox/v2/components/GroupHeading.js +9 -4
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +13 -5
- package/cjs/ComboBox/v2/components/LoadingIndicator.js +3 -3
- package/cjs/ComboBox/v2/components/MenuList.js +11 -5
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js +15 -12
- package/cjs/ComboBox/v2/components/MultiValueLabel.js +5 -4
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +7 -2
- package/cjs/ComboBox/v2/components/SelectMenu.js +9 -4
- package/cjs/ComboBox/v2/components/SingleValueLabel.js +5 -4
- package/cjs/ComboBox/v2/components/ValueContainer.js +11 -5
- package/cjs/ComboBox/v2/components/calculateWidth.js +4 -0
- package/cjs/ComboBox/v2/components/getoptions.js +11 -6
- package/cjs/ComboBox/v2/components/useMenuListHeight.js +5 -0
- package/cjs/ComboBox/v2/context.js +1 -1
- package/cjs/ComboBox/v2/index.js +1 -1
- package/cjs/ComboBox/v3/ComboBox.js +33 -0
- package/cjs/ComboBox/v3/ComboBoxCTX.js +55 -0
- package/cjs/ComboBox/v3/ComboboxDataTestids.js +17 -0
- package/cjs/ComboBox/v3/config/constants.js +14 -0
- package/cjs/ComboBox/v3/config/useComboBox.js +122 -0
- package/cjs/ComboBox/v3/config/useGetPropsWithDefault.js +11 -0
- package/cjs/ComboBox/v3/index.d.js +2 -0
- package/cjs/ComboBox/v3/index.js +10 -0
- package/cjs/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +33 -0
- package/cjs/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +28 -0
- package/cjs/ComboBox/v3/parts/a11y-messages/index.js +11 -0
- package/cjs/ComboBox/v3/parts/a11y-messages/styled.js +15 -0
- package/cjs/ComboBox/v3/parts/container/Container.js +67 -0
- package/cjs/ComboBox/v3/parts/container/index.js +9 -0
- package/cjs/ComboBox/v3/parts/container/styled.js +23 -0
- package/cjs/ComboBox/v3/parts/controls/Controls.js +71 -0
- package/cjs/ComboBox/v3/parts/controls/index.js +9 -0
- package/cjs/ComboBox/v3/parts/controls/styled.js +65 -0
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +67 -0
- package/cjs/ComboBox/v3/parts/controls-input/styled.js +27 -0
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +77 -0
- package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +33 -0
- package/cjs/ComboBox/v3/parts/dropdown-indicator/index.js +2 -0
- package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js +17 -0
- package/cjs/ComboBox/v3/parts/empty-state/index.js +27 -0
- package/cjs/ComboBox/v3/parts/empty-state/styled.js +19 -0
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +113 -0
- package/cjs/ComboBox/v3/parts/header-list/index.js +9 -0
- package/cjs/ComboBox/v3/parts/header-list/styled.js +58 -0
- package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +73 -0
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +81 -0
- package/cjs/ComboBox/v3/parts/menu-list/index.js +9 -0
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +33 -0
- package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +105 -0
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +61 -0
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +63 -0
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/index.js +9 -0
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/styled.js +23 -0
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +71 -0
- package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +28 -0
- package/cjs/ComboBox/v3/parts/single-selected-value-container/index.js +9 -0
- package/cjs/ComboBox/v3/parts/single-selected-value-container/styled.js +15 -0
- package/cjs/ComboBox/v3/propTypes.js +25 -0
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +152 -0
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +37 -0
- package/cjs/ComboBox/v3/utils/listHelper.js +39 -0
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +25 -18
- package/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js +24 -18
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +9 -5
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +7 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +9 -5
- package/cjs/DateInput/DSDateInput.js +37 -30
- package/cjs/DateInput/components/DateInputImpl.js +25 -19
- package/cjs/DateInput/components/DateInputs.js +61 -48
- package/cjs/DateInput/components/utils.js +32 -19
- package/cjs/DateInput/index.js +1 -1
- package/cjs/DateInputV2/components/DSDateInput.js +39 -33
- package/cjs/DateInputV2/components/DateInputs.js +33 -24
- package/cjs/DateInputV2/components/propsTypes.js +17 -17
- package/cjs/DateInputV2/components/styled.js +24 -21
- package/cjs/DateInputV2/components/utils.js +37 -24
- package/cjs/DateInputV2/index.js +1 -1
- package/cjs/ExpandableInput/DSExpandableInput.js +27 -24
- package/cjs/ExpandableInput/ExpandableInputImpl.js +24 -13
- package/cjs/FloatingLabelInput/DSFloatingLabelInput.js +121 -118
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +36 -31
- package/cjs/FloatingLabelInput/getSvgPath.js +12 -9
- package/cjs/FormItem/DSFormItemLayout.js +38 -31
- package/cjs/FormItem/Error/DSError.js +7 -6
- package/cjs/FormItem/Feedback.js +6 -5
- package/cjs/FormItem/Label/DSLabel.js +14 -13
- package/cjs/FormItem/Suffix/Suffix.js +6 -10
- package/cjs/FormItem/ValidationFieldWrapper.js +10 -4
- package/cjs/FormItem/defaultProps.js +1 -1
- package/cjs/FormItem/index.js +2 -2
- package/cjs/Input/DSInput.js +10 -4
- package/cjs/Input/InputAddonWrapper.js +30 -18
- package/cjs/Input/InputImpl.js +93 -83
- package/cjs/Input/index.js +1 -1
- package/cjs/InputGroup/AddonWrapper.js +15 -11
- package/cjs/InputGroup/DSInputGroup.js +21 -18
- package/cjs/InputGroup/index.js +1 -1
- package/cjs/InputMask/DSInputMask.js +9 -3
- package/cjs/InputMask/DSInputMaskDeprecated.js +40 -28
- package/cjs/InputMask/InputMaskContext.js +1 -1
- package/cjs/InputMask/MaskTypes.js +6 -1
- package/cjs/InputMask/addons/AutoCorrectedDatePipe.js +11 -4
- package/cjs/InputMask/index.js +1 -1
- package/cjs/InputMask/mask_types/DateInputMask.js +25 -14
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +25 -14
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +16 -9
- package/cjs/InputMask/mask_types/NumberInputMask.js +35 -27
- package/cjs/InputMask/mask_types/PhoneInputMask.js +25 -14
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +25 -14
- package/cjs/InputMask/mask_types/SsnInputMask.js +25 -14
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +16 -9
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +25 -14
- package/cjs/InputMask/mask_types/index.js +9 -4
- package/cjs/InputMask/props.js +1 -2
- package/cjs/InputProtected/DSInputProtected.js +23 -25
- package/cjs/InputProtected/index.js +3 -2
- package/cjs/InputProtected/props.js +1 -2
- package/cjs/LargeInputText/DSLargeInputText.js +51 -42
- package/cjs/LargeInputText/index.js +1 -1
- package/cjs/MenuItem/components/MenuItem/index.js +55 -0
- package/cjs/MenuItem/components/MenuItem/styled.js +15 -0
- package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +71 -0
- package/cjs/MenuItem/components/MultiMenuItem/styled.js +15 -0
- package/cjs/MenuItem/components/Section/index.js +38 -0
- package/cjs/MenuItem/components/Section/props.js +16 -0
- package/cjs/MenuItem/components/Section/styled.js +20 -0
- package/cjs/MenuItem/components/Separator/index.js +29 -0
- package/cjs/MenuItem/components/Separator/styled.js +20 -0
- package/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js +70 -0
- package/cjs/MenuItem/components/SubmenuItem/index.js +142 -0
- package/cjs/MenuItem/components/SubmenuItem/styled.js +20 -0
- package/cjs/MenuItem/components/index.js +22 -0
- package/cjs/MenuItem/components/styled.js +45 -0
- package/cjs/MenuItem/index.js +22 -0
- package/cjs/MenuItem/props.js +28 -0
- package/cjs/Radio/Circle.js +7 -6
- package/cjs/Radio/DSRadio.js +14 -9
- package/cjs/Radio/index.js +1 -1
- package/cjs/RadioGroup/DSRadioGroup.js +29 -21
- package/cjs/RadioGroup/index.js +1 -1
- package/cjs/RequiredMark/RequiredMark.js +9 -8
- package/cjs/SearchBox/DSSearchBox.js +34 -33
- package/cjs/SearchBox/NavSearchBox.js +26 -30
- package/cjs/SearchBox/SButton.js +15 -12
- package/cjs/SearchBox/SearchBoxToggle.js +17 -20
- package/cjs/SearchBox/index.js +1 -1
- package/cjs/SearchBox/styled.js +1 -1
- package/cjs/SearchBox/useSearch.js +13 -7
- package/cjs/SearchBox/withSearchable.js +21 -15
- package/cjs/TextBox/DSTextBox.js +16 -8
- package/cjs/TextBox/index.js +1 -1
- package/cjs/TimeInput/DSTimeInput.js +48 -40
- package/cjs/TimeInput/TimeInputImpl.js +20 -14
- package/cjs/TimeInput/TimeInputs.js +54 -36
- package/cjs/TimeInput/index.js +1 -1
- package/cjs/TimeInput/utils.js +13 -11
- package/cjs/Toggle/DSToggle.js +8 -3
- package/cjs/Toggle/DSToggleImpl.js +37 -32
- package/cjs/Toggle/DSToggleRender.js +46 -41
- package/cjs/Toggle/index.js +1 -1
- package/cjs/Toggle/props.js +11 -11
- package/cjs/Toggle/toggleHelper.js +21 -18
- package/cjs/index.js +72 -30
- package/esm/Checkbox/DSCheckbox.js +11 -6
- package/esm/CheckboxGroup/DSCheckboxGroup.js +21 -13
- package/esm/ComboBox/index.js +1 -0
- package/esm/ComboBox/v1/DSComboBox.js +34 -28
- package/esm/ComboBox/v1/components/AllOption.js +5 -0
- package/esm/ComboBox/v1/components/ClearIndicator.js +1 -1
- package/esm/ComboBox/v1/components/Control.js +14 -6
- package/esm/ComboBox/v1/components/CustomOption.js +12 -6
- package/esm/ComboBox/v1/components/CustomOptionMulti.js +12 -6
- package/esm/ComboBox/v1/components/DropdownIndicator.js +6 -1
- package/esm/ComboBox/v1/components/MenuList.js +7 -1
- package/esm/ComboBox/v1/components/MultiSelectHeader.js +4 -1
- package/esm/ComboBox/v1/components/MultiValueLabel.js +4 -3
- package/esm/ComboBox/v1/components/MultiValueRemove.js +5 -0
- package/esm/ComboBox/v1/components/SelectMenu.js +26 -18
- package/esm/ComboBox/v1/components/SingleValueLabel.js +4 -3
- package/esm/ComboBox/v1/components/ValueContainer.js +5 -0
- package/esm/ComboBox/v1/components/calculateWidth.js +4 -0
- package/esm/ComboBox/v1/components/getoptions.js +11 -6
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +28 -16
- package/esm/ComboBox/v2/Combobox.js +14 -6
- package/esm/ComboBox/v2/components/AllOption.js +5 -0
- package/esm/ComboBox/v2/components/ClearIndicator.js +6 -1
- package/esm/ComboBox/v2/components/Content.js +5 -0
- package/esm/ComboBox/v2/components/Control.js +14 -6
- package/esm/ComboBox/v2/components/CustomOption.js +12 -6
- package/esm/ComboBox/v2/components/CustomOptionMulti.js +14 -6
- package/esm/ComboBox/v2/components/DropdownIndicator.js +8 -2
- package/esm/ComboBox/v2/components/GroupHeading.js +5 -0
- package/esm/ComboBox/v2/components/IndicatorSeparator.js +11 -3
- package/esm/ComboBox/v2/components/MenuList.js +7 -1
- package/esm/ComboBox/v2/components/MultiSelectHeader.js +4 -1
- package/esm/ComboBox/v2/components/MultiValueLabel.js +4 -3
- package/esm/ComboBox/v2/components/MultiValueRemove.js +5 -0
- package/esm/ComboBox/v2/components/SelectMenu.js +5 -0
- package/esm/ComboBox/v2/components/SingleValueLabel.js +4 -3
- package/esm/ComboBox/v2/components/ValueContainer.js +7 -1
- package/esm/ComboBox/v2/components/calculateWidth.js +4 -0
- package/esm/ComboBox/v2/components/getoptions.js +11 -6
- package/esm/ComboBox/v2/components/useMenuListHeight.js +5 -0
- package/esm/ComboBox/v3/ComboBox.js +24 -0
- package/esm/ComboBox/v3/ComboBoxCTX.js +49 -0
- package/esm/ComboBox/v3/ComboboxDataTestids.js +13 -0
- package/esm/ComboBox/v3/config/constants.js +10 -0
- package/esm/ComboBox/v3/config/useComboBox.js +114 -0
- package/esm/ComboBox/v3/config/useGetPropsWithDefault.js +7 -0
- package/esm/ComboBox/v3/index.d.js +1 -0
- package/esm/ComboBox/v3/index.js +1 -0
- package/esm/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +25 -0
- package/esm/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +20 -0
- package/esm/ComboBox/v3/parts/a11y-messages/index.js +2 -0
- package/esm/ComboBox/v3/parts/a11y-messages/styled.js +7 -0
- package/esm/ComboBox/v3/parts/container/Container.js +59 -0
- package/esm/ComboBox/v3/parts/container/index.js +1 -0
- package/esm/ComboBox/v3/parts/container/styled.js +13 -0
- package/esm/ComboBox/v3/parts/controls/Controls.js +63 -0
- package/esm/ComboBox/v3/parts/controls/index.js +1 -0
- package/esm/ComboBox/v3/parts/controls/styled.js +52 -0
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +59 -0
- package/esm/ComboBox/v3/parts/controls-input/styled.js +16 -0
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +73 -0
- package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +26 -0
- package/esm/ComboBox/v3/parts/dropdown-indicator/index.js +1 -0
- package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js +8 -0
- package/esm/ComboBox/v3/parts/empty-state/index.js +19 -0
- package/esm/ComboBox/v3/parts/empty-state/styled.js +10 -0
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js +105 -0
- package/esm/ComboBox/v3/parts/header-list/index.js +1 -0
- package/esm/ComboBox/v3/parts/header-list/styled.js +41 -0
- package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +69 -0
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +73 -0
- package/esm/ComboBox/v3/parts/menu-list/index.js +1 -0
- package/esm/ComboBox/v3/parts/menu-list/styled.js +23 -0
- package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +97 -0
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +57 -0
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +54 -0
- package/esm/ComboBox/v3/parts/multi-selected-values-container/index.js +1 -0
- package/esm/ComboBox/v3/parts/multi-selected-values-container/styled.js +13 -0
- package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +67 -0
- package/esm/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +20 -0
- package/esm/ComboBox/v3/parts/single-selected-value-container/index.js +1 -0
- package/esm/ComboBox/v3/parts/single-selected-value-container/styled.js +7 -0
- package/esm/ComboBox/v3/propTypes.js +21 -0
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +148 -0
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +33 -0
- package/esm/ComboBox/v3/utils/listHelper.js +30 -0
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +23 -16
- package/esm/ComboBoxFreeSolo/components/MultiValueLabel.js +21 -15
- package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +6 -1
- package/esm/ComboBoxFreeSolo/components/SingleValue.js +5 -0
- package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +6 -1
- package/esm/DateInput/DSDateInput.js +33 -26
- package/esm/DateInput/components/DateInputImpl.js +23 -17
- package/esm/DateInput/components/DateInputs.js +56 -42
- package/esm/DateInput/components/utils.js +25 -12
- package/esm/DateInputV2/components/DSDateInput.js +39 -33
- package/esm/DateInputV2/components/DateInputs.js +23 -14
- package/esm/DateInputV2/components/styled.js +19 -16
- package/esm/DateInputV2/components/utils.js +25 -12
- package/esm/ExpandableInput/DSExpandableInput.js +27 -24
- package/esm/ExpandableInput/ExpandableInputImpl.js +21 -10
- package/esm/FloatingLabelInput/DSFloatingLabelInput.js +121 -118
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +24 -18
- package/esm/FloatingLabelInput/getSvgPath.js +12 -9
- package/esm/FormItem/DSFormItemLayout.js +26 -18
- package/esm/FormItem/Error/DSError.js +5 -4
- package/esm/FormItem/Feedback.js +5 -4
- package/esm/FormItem/Label/DSLabel.js +11 -10
- package/esm/FormItem/Suffix/Suffix.js +2 -6
- package/esm/FormItem/ValidationFieldWrapper.js +9 -3
- package/esm/Input/DSInput.js +7 -1
- package/esm/Input/InputAddonWrapper.js +27 -15
- package/esm/Input/InputImpl.js +47 -36
- package/esm/InputGroup/AddonWrapper.js +12 -8
- package/esm/InputGroup/DSInputGroup.js +20 -17
- package/esm/InputMask/DSInputMask.js +6 -0
- package/esm/InputMask/DSInputMaskDeprecated.js +36 -24
- package/esm/InputMask/MaskTypes.js +5 -0
- package/esm/InputMask/addons/AutoCorrectedDatePipe.js +11 -4
- package/esm/InputMask/mask_types/DateInputMask.js +23 -12
- package/esm/InputMask/mask_types/DateTimeInputMask.js +23 -12
- package/esm/InputMask/mask_types/DictionaryInputMask.js +13 -6
- package/esm/InputMask/mask_types/NumberInputMask.js +33 -25
- package/esm/InputMask/mask_types/PhoneInputMask.js +23 -12
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +23 -12
- package/esm/InputMask/mask_types/SsnInputMask.js +23 -12
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +13 -6
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +23 -12
- package/esm/InputMask/mask_types/index.js +5 -0
- package/esm/InputMask/props.js +1 -2
- package/esm/InputProtected/DSInputProtected.js +12 -10
- package/esm/InputProtected/index.js +1 -1
- package/esm/InputProtected/props.js +1 -2
- package/esm/LargeInputText/DSLargeInputText.js +47 -38
- package/esm/MenuItem/components/MenuItem/index.js +45 -0
- package/esm/MenuItem/components/MenuItem/styled.js +7 -0
- package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js +62 -0
- package/esm/MenuItem/components/MultiMenuItem/styled.js +7 -0
- package/esm/MenuItem/components/Section/index.js +29 -0
- package/esm/MenuItem/components/Section/props.js +11 -0
- package/esm/MenuItem/components/Section/styled.js +11 -0
- package/esm/MenuItem/components/Separator/index.js +21 -0
- package/esm/MenuItem/components/Separator/styled.js +11 -0
- package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js +61 -0
- package/esm/MenuItem/components/SubmenuItem/index.js +129 -0
- package/esm/MenuItem/components/SubmenuItem/styled.js +11 -0
- package/esm/MenuItem/components/index.js +6 -0
- package/esm/MenuItem/components/styled.js +34 -0
- package/esm/MenuItem/index.js +6 -0
- package/esm/MenuItem/props.js +23 -0
- package/esm/Radio/Circle.js +5 -4
- package/esm/Radio/DSRadio.js +7 -2
- package/esm/RadioGroup/DSRadioGroup.js +21 -13
- package/esm/RequiredMark/RequiredMark.js +7 -6
- package/esm/SearchBox/DSSearchBox.js +28 -25
- package/esm/SearchBox/NavSearchBox.js +9 -9
- package/esm/SearchBox/SButton.js +14 -11
- package/esm/SearchBox/SearchBoxToggle.js +11 -13
- package/esm/SearchBox/useSearch.js +12 -6
- package/esm/SearchBox/withSearchable.js +17 -11
- package/esm/TextBox/DSTextBox.js +12 -4
- package/esm/TimeInput/DSTimeInput.js +45 -37
- package/esm/TimeInput/TimeInputImpl.js +17 -11
- package/esm/TimeInput/TimeInputs.js +47 -29
- package/esm/TimeInput/utils.js +9 -7
- package/esm/Toggle/DSToggle.js +5 -0
- package/esm/Toggle/DSToggleImpl.js +35 -30
- package/esm/Toggle/DSToggleRender.js +39 -33
- package/esm/Toggle/toggleHelper.js +21 -18
- package/esm/index.js +26 -13
- package/package.json +282 -22
- package/types/Checkbox/DSCheckbox.d.ts +78 -13
- package/types/Checkbox/elements/CheckMark.d.ts +1 -1
- package/types/Checkbox/props.d.ts +58 -12
- package/types/CheckboxGroup/DSCheckboxGroup.d.ts +51 -7
- package/types/CheckboxGroup/props.d.ts +37 -6
- package/types/ComboBox/index.d.ts +1 -0
- package/types/ComboBox/v2/Combobox.d.ts +56 -1
- package/types/ComboBox/v3/ComboBox.d.ts +62 -0
- package/types/ComboBox/v3/ComboBoxCTX.d.ts +6 -0
- package/types/ComboBox/v3/ComboboxDataTestids.d.ts +11 -0
- package/types/ComboBox/v3/config/constants.d.ts +8 -0
- package/types/ComboBox/v3/config/useComboBox.d.ts +2 -0
- package/types/ComboBox/v3/config/useGetPropsWithDefault.d.ts +2 -0
- package/types/ComboBox/v3/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.d.ts +3 -0
- package/types/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.d.ts +3 -0
- package/types/ComboBox/v3/parts/a11y-messages/index.d.ts +2 -0
- package/types/ComboBox/v3/parts/a11y-messages/styled.d.ts +1 -0
- package/types/ComboBox/v3/parts/container/Container.d.ts +3 -0
- package/types/ComboBox/v3/parts/container/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/container/styled.d.ts +3 -0
- package/types/ComboBox/v3/parts/controls/Controls.d.ts +3 -0
- package/types/ComboBox/v3/parts/controls/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/controls/styled.d.ts +7 -0
- package/types/ComboBox/v3/parts/controls-input/ControlsInput.d.ts +3 -0
- package/types/ComboBox/v3/parts/controls-input/styled.d.ts +4 -0
- package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +12 -0
- package/types/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.d.ts +3 -0
- package/types/ComboBox/v3/parts/dropdown-indicator/index.d.ts +0 -0
- package/types/ComboBox/v3/parts/dropdown-indicator/styled.d.ts +1 -0
- package/types/ComboBox/v3/parts/empty-state/index.d.ts +3 -0
- package/types/ComboBox/v3/parts/empty-state/styled.d.ts +2 -0
- package/types/ComboBox/v3/parts/header-list/HeaderList.d.ts +3 -0
- package/types/ComboBox/v3/parts/header-list/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/header-list/styled.d.ts +7 -0
- package/types/ComboBox/v3/parts/header-list/useHeaderListHandlers.d.ts +12 -0
- package/types/ComboBox/v3/parts/menu-list/MenuList.d.ts +3 -0
- package/types/ComboBox/v3/parts/menu-list/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +10 -0
- package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +2 -0
- package/types/ComboBox/v3/parts/menu-list/useMenuList.d.ts +2 -0
- package/types/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.d.ts +3 -0
- package/types/ComboBox/v3/parts/multi-selected-values-container/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +3 -0
- package/types/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.d.ts +2 -0
- package/types/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.d.ts +3 -0
- package/types/ComboBox/v3/parts/single-selected-value-container/index.d.ts +1 -0
- package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +1 -0
- package/types/ComboBox/v3/propTypes.d.ts +51 -0
- package/types/ComboBox/v3/tests/combobox-general.test.d.ts +1 -0
- package/types/ComboBox/v3/tests/combobox-multi-select.test.d.ts +1 -0
- package/types/ComboBox/v3/tests/combobox-single-select.test.d.ts +1 -0
- package/types/ComboBox/v3/tests/combobox-special-keys.test.d.ts +1 -0
- package/types/ComboBox/v3/tests/utils.d.ts +22 -0
- package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +4 -0
- package/types/ComboBox/v3/utils/hooks/useOnElementResize.d.ts +3 -0
- package/types/ComboBox/v3/utils/listHelper.d.ts +7 -0
- package/types/DateInput/DSDateInput.d.ts +97 -16
- package/types/DateInput/components/utils.d.ts +8 -8
- package/types/DateInput/props.d.ts +97 -16
- package/types/DateInputV2/components/DSDateInput.d.ts +72 -5
- package/types/DateInputV2/components/DateInputs.d.ts +1 -1
- package/types/DateInputV2/components/props.d.ts +61 -10
- package/types/DateInputV2/components/styled.d.ts +4 -4
- package/types/DateInputV2/components/utils.d.ts +8 -8
- package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +120 -21
- package/types/FormItem/DSFormItemLayout.d.ts +392 -61
- package/types/FormItem/Error/DSError.d.ts +21 -3
- package/types/FormItem/Suffix/Suffix.d.ts +3 -3
- package/types/FormItem/defaultProps.d.ts +120 -21
- package/types/FormItem/index.d.ts +1 -1
- package/types/FormItem/props.d.ts +229 -39
- package/types/InputGroup/DSInputGroup.d.ts +56 -8
- package/types/InputGroup/props.d.ts +43 -7
- package/types/InputMask/DSInputMask.d.ts +172 -30
- package/types/InputMask/mask_types/DateInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/DateTimeInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/DictionaryInputMask.d.ts +37 -36
- package/types/InputMask/mask_types/NumberInputMask.d.ts +46 -45
- package/types/InputMask/mask_types/PhoneInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/PhoneInternationalInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/SsnInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/UsZipCodeInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/ZipCodeSearchInputMask.d.ts +34 -33
- package/types/InputMask/props.d.ts +172 -30
- package/types/InputProtected/DSInputProtected.d.ts +57 -10
- package/types/InputProtected/index.d.ts +1 -0
- package/types/InputProtected/props.d.ts +43 -8
- package/types/LargeInputText/DSLargeInputText.d.ts +163 -27
- package/types/LargeInputText/props.d.ts +163 -27
- package/types/MenuItem/components/MenuItem/index.d.ts +20 -0
- package/types/MenuItem/components/MenuItem/styled.d.ts +1 -0
- package/types/MenuItem/components/MultiMenuItem/MultiMenuItem.d.ts +21 -0
- package/types/MenuItem/components/MultiMenuItem/styled.d.ts +1 -0
- package/types/MenuItem/components/Section/index.d.ts +12 -0
- package/types/MenuItem/components/Section/props.d.ts +14 -0
- package/types/MenuItem/components/Section/styled.d.ts +2 -0
- package/types/MenuItem/components/Separator/index.d.ts +8 -0
- package/types/MenuItem/components/Separator/styled.d.ts +2 -0
- package/types/MenuItem/components/SingleMenuItem/SingleMenuItem.d.ts +16 -0
- package/types/MenuItem/components/SubmenuItem/index.d.ts +20 -0
- package/types/MenuItem/components/SubmenuItem/styled.d.ts +2 -0
- package/types/MenuItem/components/index.d.ts +6 -0
- package/types/MenuItem/components/styled.d.ts +3 -0
- package/types/MenuItem/index.d.ts +1 -0
- package/types/MenuItem/props.d.ts +37 -0
- package/types/Radio/Circle.d.ts +1 -1
- package/types/Radio/DSRadio.d.ts +79 -13
- package/types/RadioGroup/DSRadioGroup.d.ts +51 -7
- package/types/RadioGroup/props.d.ts +37 -6
- package/types/SearchBox/DSSearchBox.d.ts +146 -21
- package/types/SearchBox/NavSearchBox.d.ts +18 -3
- package/types/SearchBox/SButton.d.ts +13 -2
- package/types/SearchBox/props.d.ts +133 -22
- package/types/SearchBox/styled.d.ts +1 -48
- package/types/TextBox/DSTextBox.d.ts +148 -22
- package/types/TimeInput/DSTimeInput.d.ts +83 -12
- package/types/TimeInput/utils.d.ts +8 -8
- package/types/Toggle/DSToggle.d.ts +84 -12
- package/types/index.d.ts +29 -10
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
|
@@ -6,12 +6,9 @@ var _jsx = require('@babel/runtime/helpers/jsx');
|
|
|
6
6
|
require('react');
|
|
7
7
|
var styled = require('styled-components');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
|
-
var
|
|
10
|
-
var SearchIcon = require('@elliemae/ds-icons/Search');
|
|
11
|
-
var ChevronUp = require('@elliemae/ds-icons/ChevronUp');
|
|
9
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
10
|
var DSButton = require('@elliemae/ds-button');
|
|
13
11
|
var DSTextBox = require('../TextBox/DSTextBox.js');
|
|
14
|
-
var CloseXsmall = require('@elliemae/ds-icons/CloseXsmall');
|
|
15
12
|
var props = require('./props.js');
|
|
16
13
|
var defaultProps = require('./defaultProps.js');
|
|
17
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -20,27 +17,26 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
17
|
|
|
21
18
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
22
19
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
23
|
-
var ChevronDown__default = /*#__PURE__*/_interopDefaultLegacy(ChevronDown);
|
|
24
|
-
var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
|
|
25
|
-
var ChevronUp__default = /*#__PURE__*/_interopDefaultLegacy(ChevronUp);
|
|
26
20
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
27
|
-
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
28
21
|
|
|
29
22
|
var _StyledVerticalSepara, _VerticalSeparator;
|
|
30
|
-
const StyledResultTracker = /*#__PURE__*/styled__default[
|
|
23
|
+
const StyledResultTracker = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
24
|
componentId: "sc-sbwvud-0"
|
|
32
25
|
})(["padding:0 8px;color:#a2a9b6;white-space:nowrap;word-spacing:2px;"]);
|
|
33
|
-
const StyledVerticalSeparator = /*#__PURE__*/styled__default[
|
|
26
|
+
const StyledVerticalSeparator = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
27
|
componentId: "sc-sbwvud-1"
|
|
35
28
|
})(["height:60%;border-right:1px solid #a2a9b6;"]);
|
|
36
|
-
const StyledToolbarRightAddonsWrapper = /*#__PURE__*/styled__default[
|
|
29
|
+
const StyledToolbarRightAddonsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
30
|
componentId: "sc-sbwvud-2"
|
|
38
31
|
})(["display:flex;align-items:center;justify-content:flex-end;"]);
|
|
39
|
-
const NavBtn = /*#__PURE__*/styled__default[
|
|
32
|
+
const NavBtn = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
40
33
|
componentId: "sc-sbwvud-3"
|
|
41
|
-
})(["height:calc(100% - 2px);border:none;border-radius:", ";"],
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
})(["height:calc(100% - 2px);border:none;border-radius:", ";"], _ref => {
|
|
35
|
+
let {
|
|
36
|
+
last
|
|
37
|
+
} = _ref;
|
|
38
|
+
return last ? '2px 2px 0px 0px' : '0px';
|
|
39
|
+
});
|
|
44
40
|
|
|
45
41
|
const RightButtonsGroup = props => {
|
|
46
42
|
const {
|
|
@@ -52,41 +48,41 @@ const RightButtonsGroup = props => {
|
|
|
52
48
|
} = props;
|
|
53
49
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
54
50
|
children: [!hideNavs && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
55
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
51
|
+
children: [/*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
56
52
|
buttonType: "text",
|
|
57
53
|
containerProps: {
|
|
58
54
|
'data-testid': 'ds-navsearchbox-next'
|
|
59
55
|
},
|
|
60
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
56
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronDown, {
|
|
61
57
|
color: ['brand-primary', '800']
|
|
62
58
|
}),
|
|
63
59
|
onClick: onNext
|
|
64
|
-
}), /*#__PURE__*/_jsx__default[
|
|
60
|
+
}), /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
65
61
|
buttonType: "text",
|
|
66
62
|
containerProps: {
|
|
67
63
|
'data-testid': 'ds-navsearchbox-prev'
|
|
68
64
|
},
|
|
69
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
65
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronUp, {
|
|
70
66
|
color: ['brand-primary', '800']
|
|
71
67
|
}),
|
|
72
68
|
onClick: onPrevious
|
|
73
69
|
})]
|
|
74
|
-
}), showClear ? /*#__PURE__*/_jsx__default[
|
|
70
|
+
}), showClear ? /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
75
71
|
containerProps: {
|
|
76
72
|
'data-testid': 'ds-navsearchbox-clear'
|
|
77
73
|
},
|
|
78
74
|
buttonType: "text",
|
|
79
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
75
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.CloseXsmall, {
|
|
80
76
|
color: ['brand-primary', '800']
|
|
81
77
|
}),
|
|
82
78
|
onClick: onClear,
|
|
83
79
|
last: true
|
|
84
|
-
}) : /*#__PURE__*/_jsx__default[
|
|
80
|
+
}) : /*#__PURE__*/_jsx__default["default"](NavBtn, {
|
|
85
81
|
containerProps: {
|
|
86
82
|
'data-testid': 'ds-navsearchbox-clear'
|
|
87
83
|
},
|
|
88
84
|
buttonType: "text",
|
|
89
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
85
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.Search, {
|
|
90
86
|
color: ['brand-primary', '800']
|
|
91
87
|
}),
|
|
92
88
|
last: true
|
|
@@ -100,11 +96,11 @@ const ResultTracker = props => {
|
|
|
100
96
|
totalResults
|
|
101
97
|
} = props;
|
|
102
98
|
if (currentResultIndex === -1 && !totalResults) return null;
|
|
103
|
-
if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx__default[
|
|
104
|
-
return /*#__PURE__*/_jsx__default[
|
|
99
|
+
if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, totalResults);
|
|
100
|
+
return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, "".concat(currentResultIndex + 1, " / ").concat(totalResults));
|
|
105
101
|
};
|
|
106
102
|
|
|
107
|
-
const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx__default[
|
|
103
|
+
const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx__default["default"](StyledVerticalSeparator, {}));
|
|
108
104
|
|
|
109
105
|
const ToolbarRightAddons = props => {
|
|
110
106
|
const {
|
|
@@ -115,10 +111,10 @@ const ToolbarRightAddons = props => {
|
|
|
115
111
|
totalResults,
|
|
116
112
|
showClear
|
|
117
113
|
} = props;
|
|
118
|
-
return /*#__PURE__*/_jsx__default[
|
|
114
|
+
return /*#__PURE__*/_jsx__default["default"](StyledToolbarRightAddonsWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](ResultTracker, {
|
|
119
115
|
currentResultIndex: currentResultIndex,
|
|
120
116
|
totalResults: totalResults
|
|
121
|
-
}), currentResultIndex !== -1 || totalResults ? _VerticalSeparator || (_VerticalSeparator = /*#__PURE__*/_jsx__default[
|
|
117
|
+
}), currentResultIndex !== -1 || totalResults ? _VerticalSeparator || (_VerticalSeparator = /*#__PURE__*/_jsx__default["default"](VerticalSeparator, {})) : null, /*#__PURE__*/_jsx__default["default"](RightButtonsGroup, {
|
|
122
118
|
onNext: onNext,
|
|
123
119
|
hideNavs: currentResultIndex === -1 && !totalResults,
|
|
124
120
|
onPrevious: onPrevious,
|
|
@@ -159,7 +155,7 @@ const NavSearchBox = props => {
|
|
|
159
155
|
}
|
|
160
156
|
};
|
|
161
157
|
|
|
162
|
-
return /*#__PURE__*/_jsx__default[
|
|
158
|
+
return /*#__PURE__*/_jsx__default["default"](DSTextBox["default"], {
|
|
163
159
|
onChange: handleChange,
|
|
164
160
|
containerProps: {
|
|
165
161
|
'data-testid': 'ds-nav-searchbox-input'
|
|
@@ -168,7 +164,7 @@ const NavSearchBox = props => {
|
|
|
168
164
|
onKeyDown: handleKeyDown,
|
|
169
165
|
placeholder: placeholder,
|
|
170
166
|
value: value,
|
|
171
|
-
rightComponent: /*#__PURE__*/_jsx__default[
|
|
167
|
+
rightComponent: /*#__PURE__*/_jsx__default["default"](ToolbarRightAddons, {
|
|
172
168
|
showClear: !!value,
|
|
173
169
|
onNext: onNext,
|
|
174
170
|
onPrevious: onPrevious,
|
package/cjs/SearchBox/SButton.js
CHANGED
|
@@ -12,20 +12,23 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
14
|
|
|
15
|
-
const Button = /*#__PURE__*/styled__default[
|
|
15
|
+
const Button = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
16
16
|
componentId: "sc-15udc15-0"
|
|
17
17
|
})(["all:unset;position:absolute;height:calc(100% - 2px);width:28px;top:1px;right:1px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;cursor:pointer;z-index:1;svg{fill:", ";}&:disabled{color:#5d6775;cursor:not-allowed;svg{fill:#5d6775;}}&:focus{", "}"], props => props.theme.colors.brand['600'], dsSystem.focus());
|
|
18
18
|
|
|
19
|
-
const SButton =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const SButton = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
icon,
|
|
22
|
+
disabled,
|
|
23
|
+
onClick,
|
|
24
|
+
dataTestid = "ds-searchbox-button"
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/_jsx__default["default"](Button, {
|
|
27
|
+
"data-testid": dataTestid,
|
|
28
|
+
onClick: onClick,
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
type: "button"
|
|
31
|
+
}, void 0, icon);
|
|
32
|
+
};
|
|
30
33
|
|
|
31
34
|
exports.SButton = SButton;
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
5
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
6
12
|
var React = require('react');
|
|
7
13
|
var styled = require('styled-components');
|
|
8
|
-
var
|
|
14
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
9
15
|
var DSButton = require('@elliemae/ds-button');
|
|
10
16
|
var DSSearchBox = require('./DSSearchBox.js');
|
|
11
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -16,56 +22,47 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
16
22
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
17
23
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
18
24
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
19
|
-
var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
|
|
20
25
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
21
26
|
|
|
22
|
-
var
|
|
27
|
+
var _Search;
|
|
23
28
|
|
|
24
29
|
const _excluded = ["onSearchButtonClick", "width"];
|
|
25
30
|
|
|
26
31
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
27
32
|
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
34
|
const SEARCH_BUTTON_WIDTH = 26;
|
|
30
|
-
const SearchWrap = /*#__PURE__*/styled__default[
|
|
35
|
+
const SearchWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
36
|
componentId: "sc-xt33wm-0"
|
|
32
|
-
})(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ?
|
|
33
|
-
opacity:0;
|
|
34
|
-
|
|
35
|
-
& * {
|
|
36
|
-
width: ${SEARCH_BUTTON_WIDTH}px;
|
|
37
|
-
height: 0;
|
|
38
|
-
border: 0;
|
|
39
|
-
}
|
|
40
|
-
` : '', props => props.isOpen ? `width: ${props.width};opacity: 1;height: auto;` : ''); // eslint-disable-next-line react/prop-types
|
|
37
|
+
})(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ? "\n opacity:0;\n\n & * {\n width: ".concat(SEARCH_BUTTON_WIDTH, "px;\n height: 0;\n border: 0;\n }\n ") : '', props => props.isOpen ? "width: ".concat(props.width, ";opacity: 1;height: auto;") : ''); // eslint-disable-next-line react/prop-types
|
|
41
38
|
|
|
42
39
|
const SearchBoxToggle = _ref => {
|
|
43
40
|
let {
|
|
44
41
|
onSearchButtonClick,
|
|
45
42
|
width
|
|
46
43
|
} = _ref,
|
|
47
|
-
rest = _objectWithoutProperties__default[
|
|
44
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
48
45
|
|
|
49
46
|
const [isOpen, setOpen] = React.useState(false);
|
|
50
47
|
const [show, setShow] = React.useState(true);
|
|
51
|
-
const computedWidth = typeof width === 'number' ?
|
|
48
|
+
const computedWidth = typeof width === 'number' ? "".concat(width, "px") : width;
|
|
52
49
|
|
|
53
|
-
const button = /*#__PURE__*/_jsx__default[
|
|
50
|
+
const button = /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
54
51
|
onClick: () => {
|
|
55
52
|
setOpen(true);
|
|
56
53
|
},
|
|
57
54
|
buttonType: "text",
|
|
58
|
-
icon:
|
|
55
|
+
icon: _Search || (_Search = /*#__PURE__*/_jsx__default["default"](dsIcons.Search, {}))
|
|
59
56
|
});
|
|
60
57
|
|
|
61
|
-
return /*#__PURE__*/_jsx__default[
|
|
58
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, show && !isOpen && button, /*#__PURE__*/_jsx__default["default"](SearchWrap, {
|
|
62
59
|
show: !show || isOpen,
|
|
63
60
|
isOpen: isOpen,
|
|
64
61
|
width: computedWidth,
|
|
65
62
|
onTransitionEnd: () => {
|
|
66
63
|
setShow(!isOpen);
|
|
67
64
|
}
|
|
68
|
-
}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSSearchBox[
|
|
65
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSSearchBox["default"], _objectSpread(_objectSpread({}, rest), {}, {
|
|
69
66
|
onSearchButtonClick: () => {
|
|
70
67
|
onSearchButtonClick();
|
|
71
68
|
setOpen(false);
|
package/cjs/SearchBox/index.js
CHANGED
|
@@ -10,6 +10,6 @@ var NavSearchBox = require('./NavSearchBox.js');
|
|
|
10
10
|
|
|
11
11
|
exports.SearchBoxToggle = SearchBoxToggle;
|
|
12
12
|
exports.SearchBoxWithSchema = DSSearchBox.SearchBoxWithSchema;
|
|
13
|
-
exports
|
|
13
|
+
exports["default"] = DSSearchBox["default"];
|
|
14
14
|
exports.DSNavSearchBox = NavSearchBox.NavSearchBox;
|
|
15
15
|
exports.DSNavSearchBoxWithSchema = NavSearchBox.DSNavSearchBoxWithSchema;
|
package/cjs/SearchBox/styled.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
const SearchBoxTextBox = /*#__PURE__*/styled__default[
|
|
12
|
+
const SearchBoxTextBox = /*#__PURE__*/styled__default["default"](DSTextBox["default"]).withConfig({
|
|
13
13
|
componentId: "sc-44ofm-0"
|
|
14
14
|
})(["padding-right:33px;"]);
|
|
15
15
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
|
-
var
|
|
7
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
7
8
|
|
|
8
9
|
function handleSearch(clearOnSearch, setValue, searchOnEnter, value, onSearch, property, clickTrigger, onSearchButtonClick) {
|
|
9
10
|
if (clickTrigger) {
|
|
@@ -21,7 +22,8 @@ function handleSearch(clearOnSearch, setValue, searchOnEnter, value, onSearch, p
|
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
function useSearch(
|
|
25
|
+
function useSearch() {
|
|
26
|
+
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
25
27
|
const {
|
|
26
28
|
onKeyUp,
|
|
27
29
|
onSearch,
|
|
@@ -33,7 +35,7 @@ function useSearch(params = {}) {
|
|
|
33
35
|
onClearButtonClick
|
|
34
36
|
} = params;
|
|
35
37
|
const [value, setValue] = React.useState(params.value);
|
|
36
|
-
const debouncedSearch = React.useCallback(
|
|
38
|
+
const debouncedSearch = React.useCallback(dsUtilities.debounce(handleSearch, 200), []); // update state if prop changes
|
|
37
39
|
|
|
38
40
|
React.useEffect(() => {
|
|
39
41
|
if (value !== params.value) {
|
|
@@ -41,11 +43,15 @@ function useSearch(params = {}) {
|
|
|
41
43
|
}
|
|
42
44
|
}, [params.value]);
|
|
43
45
|
|
|
44
|
-
const searchWithParams = (
|
|
46
|
+
const searchWithParams = function () {
|
|
47
|
+
let clickedSearchButton = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
48
|
+
return handleSearch(clearOnSearch, setValue, searchOnEnter, value, onSearch, property, clickedSearchButton, onSearchButtonClick);
|
|
49
|
+
};
|
|
45
50
|
|
|
46
|
-
const handleChange =
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
const handleChange = _ref => {
|
|
52
|
+
let {
|
|
53
|
+
target
|
|
54
|
+
} = _ref;
|
|
49
55
|
onChange(target.value);
|
|
50
56
|
setValue(target.value);
|
|
51
57
|
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
4
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
4
8
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
9
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
10
|
var React = require('react');
|
|
6
|
-
var
|
|
11
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
7
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
13
|
|
|
9
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
15
|
|
|
11
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
12
16
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
13
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
19
|
|
|
15
20
|
const _excluded = ["containerProps"];
|
|
16
21
|
|
|
17
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
18
23
|
|
|
19
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
20
25
|
|
|
21
26
|
const withSearchable = WrappedComponent => {
|
|
22
27
|
class Searchable extends React.Component {
|
|
23
28
|
constructor(props) {
|
|
24
29
|
super(props);
|
|
25
|
-
|
|
26
|
-
_defineProperty__default['default'](this, "debouncedSearch", utils.debounce(this.handleSearch, 200));
|
|
27
|
-
|
|
30
|
+
this.debouncedSearch = dsUtilities.debounce(this.handleSearch, 200);
|
|
28
31
|
this.state = {
|
|
29
32
|
value: props.value
|
|
30
33
|
};
|
|
31
34
|
this.handleSearch = this.handleSearch.bind(this);
|
|
32
35
|
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
33
36
|
this.handleChange = this.handleChange.bind(this);
|
|
34
|
-
this.buttonRef = /*#__PURE__*/React__default[
|
|
37
|
+
this.buttonRef = /*#__PURE__*/React__default["default"].createRef();
|
|
35
38
|
this.handleChange = this.handleChange.bind(this);
|
|
36
39
|
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
37
40
|
this.handleSearch = this.handleSearch.bind(this);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
static getDerivedStateFromProps(nextProps, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
static getDerivedStateFromProps(nextProps, _ref) {
|
|
44
|
+
let {
|
|
45
|
+
prevPropValue
|
|
46
|
+
} = _ref;
|
|
47
|
+
|
|
43
48
|
if (nextProps.value !== prevPropValue) {
|
|
44
49
|
return {
|
|
45
50
|
value: nextProps.value,
|
|
@@ -89,9 +94,10 @@ const withSearchable = WrappedComponent => {
|
|
|
89
94
|
});
|
|
90
95
|
}
|
|
91
96
|
|
|
92
|
-
handleChange({
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
handleChange(_ref2) {
|
|
98
|
+
let {
|
|
99
|
+
target
|
|
100
|
+
} = _ref2;
|
|
95
101
|
const {
|
|
96
102
|
value
|
|
97
103
|
} = target;
|
|
@@ -116,7 +122,7 @@ const withSearchable = WrappedComponent => {
|
|
|
116
122
|
{
|
|
117
123
|
containerProps
|
|
118
124
|
} = _this$props,
|
|
119
|
-
rest = _objectWithoutProperties__default[
|
|
125
|
+
rest = _objectWithoutProperties__default["default"](_this$props, _excluded);
|
|
120
126
|
|
|
121
127
|
return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, _objectSpread(_objectSpread({}, rest), {}, {
|
|
122
128
|
buttonRef: this.buttonRef,
|
package/cjs/TextBox/DSTextBox.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
12
|
require('react');
|
|
@@ -14,11 +19,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
19
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
15
20
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
16
21
|
|
|
17
|
-
const _excluded = ["containerProps", "autoFocus", "disabled", "maxLength", "minLength", "fluidWidth", "placeholder", "value", "hasError", "readOnly", "innerRef", "type", "min", "max", "clearable", "leftComponent", "rightComponent", "required", "variant", "disableTooltip"];
|
|
22
|
+
const _excluded = ["containerProps", "autoFocus", "disabled", "maxLength", "minLength", "fluidWidth", "placeholder", "value", "hasError", "readOnly", "innerRef", "type", "min", "max", "clearable", "leftComponent", "rightComponent", "required", "variant", "disableTooltip", "id"];
|
|
18
23
|
|
|
19
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
20
25
|
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
22
27
|
|
|
23
28
|
const DSTextBox = _ref => {
|
|
24
29
|
let {
|
|
@@ -41,12 +46,14 @@ const DSTextBox = _ref => {
|
|
|
41
46
|
rightComponent = null,
|
|
42
47
|
required = false,
|
|
43
48
|
variant,
|
|
44
|
-
disableTooltip
|
|
49
|
+
disableTooltip,
|
|
50
|
+
id
|
|
45
51
|
} = _ref,
|
|
46
|
-
otherProps = _objectWithoutProperties__default[
|
|
52
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
47
53
|
|
|
48
|
-
return /*#__PURE__*/jsxRuntime.jsx(DSInput[
|
|
49
|
-
"aria-label": otherProps['aria-label'] || 'Text Box',
|
|
54
|
+
return /*#__PURE__*/jsxRuntime.jsx(DSInput["default"], _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
55
|
+
"aria-label": !id ? otherProps['aria-label'] || 'Text Box' : undefined,
|
|
56
|
+
"aria-describedby": otherProps['aria-describedby'] || "".concat(id, "_feedback_message"),
|
|
50
57
|
autoFocus: autoFocus,
|
|
51
58
|
clearable: clearable,
|
|
52
59
|
containerProps: containerProps,
|
|
@@ -67,7 +74,8 @@ const DSTextBox = _ref => {
|
|
|
67
74
|
type: type,
|
|
68
75
|
value: value,
|
|
69
76
|
variant: variant,
|
|
70
|
-
disableTooltip: disableTooltip
|
|
77
|
+
disableTooltip: disableTooltip,
|
|
78
|
+
id: id
|
|
71
79
|
}));
|
|
72
80
|
};
|
|
73
81
|
|
|
@@ -169,4 +177,4 @@ const DSTextBoxWithSchema = reactDesc.describe(DSTextBox);
|
|
|
169
177
|
DSTextBoxWithSchema.propTypes = props;
|
|
170
178
|
|
|
171
179
|
exports.DSTextBoxWithSchema = DSTextBoxWithSchema;
|
|
172
|
-
exports[
|
|
180
|
+
exports["default"] = DSTextBox;
|
package/cjs/TextBox/index.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
11
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
12
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -21,45 +26,48 @@ const _excluded = ["onChange"];
|
|
|
21
26
|
|
|
22
27
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
28
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
25
|
-
|
|
26
|
-
const DSTimeInput =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
30
|
+
|
|
31
|
+
const DSTimeInput = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
containerProps = {},
|
|
34
|
+
innerRef,
|
|
35
|
+
className = '',
|
|
36
|
+
style = {},
|
|
37
|
+
onChange = () => null,
|
|
38
|
+
format,
|
|
39
|
+
value = '',
|
|
40
|
+
clearable = false,
|
|
41
|
+
disabled = false,
|
|
42
|
+
ariaLabel = 'Time input'
|
|
43
|
+
} = _ref;
|
|
44
|
+
return /*#__PURE__*/_jsx__default["default"](DSInput["default"], {
|
|
45
|
+
className: className,
|
|
46
|
+
clearable: clearable,
|
|
47
|
+
containerProps: containerProps,
|
|
48
|
+
customInputType: _ref2 => {
|
|
49
|
+
let {
|
|
50
|
+
onChange: inputOnChange
|
|
51
|
+
} = _ref2,
|
|
52
|
+
restInputProps = _objectWithoutProperties__default["default"](_ref2, _excluded);
|
|
53
|
+
|
|
54
|
+
return /*#__PURE__*/jsxRuntime.jsx(TimeInputImpl, _objectSpread(_objectSpread({
|
|
55
|
+
"aria-label": ariaLabel,
|
|
56
|
+
disabled: disabled,
|
|
57
|
+
format: format,
|
|
58
|
+
onChange: time => inputOnChange(time)
|
|
59
|
+
}, restInputProps), {}, {
|
|
60
|
+
style: style
|
|
61
|
+
}));
|
|
62
|
+
},
|
|
63
|
+
disabled: disabled,
|
|
64
|
+
innerRef: innerRef,
|
|
65
|
+
isShowElipsisActive: false,
|
|
66
|
+
onChange: onChange,
|
|
67
|
+
onClear: () => onChange(null),
|
|
68
|
+
value: value
|
|
69
|
+
});
|
|
70
|
+
};
|
|
63
71
|
|
|
64
72
|
DSTimeInput.defaultProps = {
|
|
65
73
|
format: 'hh:mm:ss',
|
|
@@ -119,4 +127,4 @@ DSTimeInputWithSchema.propTypes = props;
|
|
|
119
127
|
|
|
120
128
|
exports.TimeInputImpl = TimeInputImpl;
|
|
121
129
|
exports.DSTimeInputWithSchema = DSTimeInputWithSchema;
|
|
122
|
-
exports[
|
|
130
|
+
exports["default"] = DSTimeInput;
|