@elliemae/ds-form 2.0.0-next.7 → 2.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Checkbox/DSCheckbox.js +7 -2
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +18 -10
- package/cjs/ComboBox/index.js +3 -0
- package/cjs/ComboBox/v1/DSComboBox.js +31 -26
- package/cjs/ComboBox/v1/components/AllOption.js +5 -0
- package/cjs/ComboBox/v1/components/ClearIndicator.js +2 -3
- package/cjs/ComboBox/v1/components/Control.js +14 -6
- package/cjs/ComboBox/v1/components/CustomOption.js +12 -6
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +12 -6
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +7 -3
- package/cjs/ComboBox/v1/components/MenuList.js +5 -0
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js +3 -0
- package/cjs/ComboBox/v1/components/MultiValueLabel.js +4 -3
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +5 -0
- package/cjs/ComboBox/v1/components/SelectMenu.js +26 -18
- package/cjs/ComboBox/v1/components/SingleValueLabel.js +4 -3
- package/cjs/ComboBox/v1/components/ValueContainer.js +5 -0
- package/cjs/ComboBox/v1/components/calculateWidth.js +4 -0
- package/cjs/ComboBox/v1/components/getoptions.js +9 -6
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +27 -16
- package/cjs/ComboBox/v2/Combobox.js +13 -8
- package/cjs/ComboBox/v2/components/AllOption.js +5 -0
- package/cjs/ComboBox/v2/components/ClearIndicator.js +7 -3
- package/cjs/ComboBox/v2/components/Content.js +5 -0
- package/cjs/ComboBox/v2/components/Control.js +14 -6
- package/cjs/ComboBox/v2/components/CustomOption.js +12 -6
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +14 -6
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +7 -3
- package/cjs/ComboBox/v2/components/GroupHeading.js +5 -0
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +11 -3
- package/cjs/ComboBox/v2/components/MenuList.js +5 -0
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js +3 -0
- package/cjs/ComboBox/v2/components/MultiValueLabel.js +4 -3
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +5 -0
- package/cjs/ComboBox/v2/components/SelectMenu.js +5 -0
- package/cjs/ComboBox/v2/components/SingleValueLabel.js +4 -3
- package/cjs/ComboBox/v2/components/ValueContainer.js +7 -2
- package/cjs/ComboBox/v2/components/calculateWidth.js +4 -0
- package/cjs/ComboBox/v2/components/getoptions.js +9 -6
- package/cjs/ComboBox/v2/components/useMenuListHeight.js +3 -0
- 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 +34 -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 +23 -16
- package/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js +22 -16
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +7 -3
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +5 -0
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +7 -3
- package/cjs/DateInput/DSDateInput.js +32 -26
- package/cjs/DateInput/components/DateInputImpl.js +23 -17
- package/cjs/DateInput/components/DateInputs.js +56 -44
- package/cjs/DateInput/components/utils.js +29 -16
- package/cjs/DateInputV2/components/DSDateInput.js +39 -33
- package/cjs/DateInputV2/components/DateInputs.js +18 -10
- package/cjs/DateInputV2/components/styled.js +22 -13
- package/cjs/DateInputV2/components/utils.js +34 -21
- package/cjs/ExpandableInput/DSExpandableInput.js +27 -24
- package/cjs/ExpandableInput/ExpandableInputImpl.js +21 -10
- package/cjs/FloatingLabelInput/DSFloatingLabelInput.js +121 -118
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +25 -20
- package/cjs/FloatingLabelInput/getSvgPath.js +9 -8
- package/cjs/FormItem/DSFormItemLayout.js +24 -17
- package/cjs/FormItem/Error/DSError.js +5 -4
- package/cjs/FormItem/Feedback.js +5 -4
- package/cjs/FormItem/Label/DSLabel.js +10 -9
- package/cjs/FormItem/ValidationFieldWrapper.js +9 -3
- package/cjs/Input/DSInput.js +5 -0
- package/cjs/Input/InputAddonWrapper.js +26 -15
- package/cjs/Input/InputImpl.js +43 -35
- package/cjs/InputGroup/AddonWrapper.js +11 -8
- package/cjs/InputGroup/DSInputGroup.js +20 -17
- package/cjs/InputMask/DSInputMask.js +5 -0
- package/cjs/InputMask/DSInputMaskDeprecated.js +36 -24
- package/cjs/InputMask/MaskTypes.js +5 -0
- package/cjs/InputMask/addons/AutoCorrectedDatePipe.js +11 -4
- package/cjs/InputMask/mask_types/DateInputMask.js +22 -12
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +22 -12
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +12 -6
- package/cjs/InputMask/mask_types/NumberInputMask.js +31 -24
- package/cjs/InputMask/mask_types/PhoneInputMask.js +22 -12
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +22 -12
- package/cjs/InputMask/mask_types/SsnInputMask.js +22 -12
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +12 -6
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +22 -12
- package/cjs/InputMask/mask_types/index.js +5 -0
- package/cjs/InputProtected/DSInputProtected.js +14 -17
- package/cjs/InputProtected/index.js +3 -2
- package/cjs/LargeInputText/DSLargeInputText.js +45 -36
- 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 +5 -4
- package/cjs/Radio/DSRadio.js +6 -1
- package/cjs/RadioGroup/DSRadioGroup.js +18 -10
- package/cjs/RequiredMark/RequiredMark.js +5 -4
- package/cjs/SearchBox/DSSearchBox.js +25 -27
- package/cjs/SearchBox/NavSearchBox.js +11 -15
- package/cjs/SearchBox/SButton.js +14 -11
- package/cjs/SearchBox/SearchBoxToggle.js +8 -4
- package/cjs/SearchBox/useSearch.js +12 -7
- package/cjs/SearchBox/withSearchable.js +18 -12
- package/cjs/TextBox/DSTextBox.js +5 -0
- package/cjs/TimeInput/DSTimeInput.js +45 -37
- package/cjs/TimeInput/TimeInputImpl.js +18 -12
- package/cjs/TimeInput/TimeInputs.js +46 -29
- package/cjs/TimeInput/utils.js +13 -11
- package/cjs/Toggle/DSToggle.js +5 -0
- package/cjs/Toggle/DSToggleImpl.js +33 -28
- package/cjs/Toggle/DSToggleRender.js +38 -33
- package/cjs/Toggle/toggleHelper.js +21 -18
- package/cjs/index.js +61 -15
- package/esm/Checkbox/DSCheckbox.js +6 -1
- package/esm/CheckboxGroup/DSCheckboxGroup.js +18 -10
- package/esm/ComboBox/index.js +1 -0
- package/esm/ComboBox/v1/DSComboBox.js +29 -24
- 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 +5 -0
- package/esm/ComboBox/v1/components/MultiSelectHeader.js +3 -0
- 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 +9 -6
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +27 -16
- package/esm/ComboBox/v2/Combobox.js +10 -3
- 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 +6 -1
- 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 +5 -0
- package/esm/ComboBox/v2/components/MultiSelectHeader.js +3 -0
- 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 +6 -1
- package/esm/ComboBox/v2/components/calculateWidth.js +4 -0
- package/esm/ComboBox/v2/components/getoptions.js +9 -6
- package/esm/ComboBox/v2/components/useMenuListHeight.js +3 -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 +24 -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 +31 -25
- package/esm/DateInput/components/DateInputImpl.js +23 -17
- package/esm/DateInput/components/DateInputs.js +55 -42
- package/esm/DateInput/components/utils.js +23 -10
- package/esm/DateInputV2/components/DSDateInput.js +39 -33
- package/esm/DateInputV2/components/DateInputs.js +18 -10
- package/esm/DateInputV2/components/styled.js +19 -10
- package/esm/DateInputV2/components/utils.js +23 -10
- 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 +9 -8
- package/esm/FormItem/DSFormItemLayout.js +23 -15
- package/esm/FormItem/Error/DSError.js +5 -4
- package/esm/FormItem/Feedback.js +5 -4
- package/esm/FormItem/Label/DSLabel.js +10 -9
- package/esm/FormItem/ValidationFieldWrapper.js +9 -3
- package/esm/Input/DSInput.js +5 -0
- package/esm/Input/InputAddonWrapper.js +26 -15
- package/esm/Input/InputImpl.js +41 -32
- package/esm/InputGroup/AddonWrapper.js +10 -7
- package/esm/InputGroup/DSInputGroup.js +20 -17
- package/esm/InputMask/DSInputMask.js +5 -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 +22 -12
- package/esm/InputMask/mask_types/DateTimeInputMask.js +22 -12
- package/esm/InputMask/mask_types/DictionaryInputMask.js +12 -6
- package/esm/InputMask/mask_types/NumberInputMask.js +31 -24
- package/esm/InputMask/mask_types/PhoneInputMask.js +22 -12
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +22 -12
- package/esm/InputMask/mask_types/SsnInputMask.js +22 -12
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +12 -6
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +22 -12
- package/esm/InputMask/mask_types/index.js +5 -0
- package/esm/InputProtected/DSInputProtected.js +9 -8
- package/esm/InputProtected/index.js +1 -1
- package/esm/LargeInputText/DSLargeInputText.js +45 -36
- 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 +6 -1
- package/esm/RadioGroup/DSRadioGroup.js +18 -10
- package/esm/RequiredMark/RequiredMark.js +5 -4
- package/esm/SearchBox/DSSearchBox.js +24 -24
- package/esm/SearchBox/NavSearchBox.js +8 -8
- package/esm/SearchBox/SButton.js +14 -11
- package/esm/SearchBox/SearchBoxToggle.js +8 -3
- package/esm/SearchBox/useSearch.js +11 -6
- package/esm/SearchBox/withSearchable.js +17 -11
- package/esm/TextBox/DSTextBox.js +5 -0
- package/esm/TimeInput/DSTimeInput.js +45 -37
- package/esm/TimeInput/TimeInputImpl.js +17 -11
- package/esm/TimeInput/TimeInputs.js +46 -29
- package/esm/TimeInput/utils.js +9 -7
- package/esm/Toggle/DSToggle.js +5 -0
- package/esm/Toggle/DSToggleImpl.js +34 -29
- package/esm/Toggle/DSToggleRender.js +37 -31
- 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 +118 -20
- package/types/FormItem/DSFormItemLayout.d.ts +390 -60
- package/types/FormItem/Error/DSError.d.ts +21 -3
- package/types/FormItem/Suffix/Suffix.d.ts +3 -3
- package/types/FormItem/defaultProps.d.ts +118 -20
- 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 -49
- package/types/TextBox/DSTextBox.d.ts +146 -21
- 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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
13
|
+
var React = require('react');
|
|
14
|
+
var reactDesc = require('react-desc');
|
|
15
|
+
var Grid = require('@elliemae/ds-grid');
|
|
16
|
+
var DSButton = require('@elliemae/ds-button');
|
|
17
|
+
var Ellipsis = require('@elliemae/ds-icons/MoreOptionsVert');
|
|
18
|
+
var ChevronRight = require('@elliemae/ds-icons/ChevronRight');
|
|
19
|
+
var dsDropdownmenu = require('@elliemae/ds-dropdownmenu');
|
|
20
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
21
|
+
var props = require('../../props.js');
|
|
22
|
+
var styled$1 = require('./styled.js');
|
|
23
|
+
var styled = require('../styled.js');
|
|
24
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
25
|
+
|
|
26
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
|
+
|
|
28
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
29
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
30
|
+
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
31
|
+
var Ellipsis__default = /*#__PURE__*/_interopDefaultLegacy(Ellipsis);
|
|
32
|
+
var ChevronRight__default = /*#__PURE__*/_interopDefaultLegacy(ChevronRight);
|
|
33
|
+
|
|
34
|
+
var _Ellipsis, _ChevronRight;
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
const SubmenuItem = props$1 => {
|
|
41
|
+
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.defaultProps);
|
|
42
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, props.itemProps);
|
|
43
|
+
const {
|
|
44
|
+
dsId,
|
|
45
|
+
label,
|
|
46
|
+
isSelected,
|
|
47
|
+
isActive,
|
|
48
|
+
onClick,
|
|
49
|
+
isFocus,
|
|
50
|
+
rightAddon,
|
|
51
|
+
options,
|
|
52
|
+
selectedOptions,
|
|
53
|
+
innerRef,
|
|
54
|
+
onMouseEnter,
|
|
55
|
+
onMouseLeave,
|
|
56
|
+
onKeyDown,
|
|
57
|
+
onOptionClick,
|
|
58
|
+
onClickOutside,
|
|
59
|
+
wrapperStyles,
|
|
60
|
+
minWidth,
|
|
61
|
+
maxHeight,
|
|
62
|
+
render
|
|
63
|
+
} = propsWithDefault; // If we don't delay the opening of the poppers, the position will not be placed correctly
|
|
64
|
+
// That why we delay it for the next render using the useEffect hook
|
|
65
|
+
|
|
66
|
+
const [delayedIsOpened, setDelayedIsOpened] = React.useState(false);
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
setDelayedIsOpened(isSelected);
|
|
69
|
+
}, [isSelected]);
|
|
70
|
+
const timeoutRef = React.useRef(null);
|
|
71
|
+
const onMouseEnterHandler = React.useCallback(e => {
|
|
72
|
+
if (rightAddon !== 'ellipsis') {
|
|
73
|
+
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);else if (!isSelected) onClick(e);
|
|
74
|
+
timeoutRef.current = null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (e.target) onMouseEnter(e);
|
|
78
|
+
}, [isSelected, onClick, onMouseEnter, rightAddon]);
|
|
79
|
+
const onMouseLeaveHandler = React.useCallback(e => {
|
|
80
|
+
if (rightAddon !== 'ellipsis') {
|
|
81
|
+
if (timeoutRef.current === null) {
|
|
82
|
+
timeoutRef.current = setTimeout(() => {
|
|
83
|
+
timeoutRef.current = null;
|
|
84
|
+
onClick(e);
|
|
85
|
+
}, 300);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
onMouseLeave(e);
|
|
90
|
+
}, [onClick, onMouseLeave, rightAddon]);
|
|
91
|
+
return /*#__PURE__*/_jsx__default["default"](dsDropdownmenu.DSDropdownMenuV2, {
|
|
92
|
+
isOpened: delayedIsOpened,
|
|
93
|
+
options: options,
|
|
94
|
+
onOptionClick: onOptionClick,
|
|
95
|
+
startPlacementPreference: "right-start",
|
|
96
|
+
placementOrderPreference: ['right-start', 'right-end', 'left-start', 'left-end'],
|
|
97
|
+
selectedOptions: selectedOptions,
|
|
98
|
+
onKeyDown: onKeyDown,
|
|
99
|
+
onMouseEnter: onMouseEnterHandler,
|
|
100
|
+
onMouseLeave: onMouseLeaveHandler,
|
|
101
|
+
onClickOutside: onClickOutside,
|
|
102
|
+
customOffset: [0, 1],
|
|
103
|
+
wrapperStyles: _objectSpread(_objectSpread({}, wrapperStyles), {}, {
|
|
104
|
+
width: '100%'
|
|
105
|
+
}),
|
|
106
|
+
minWidth: minWidth,
|
|
107
|
+
maxHeight: maxHeight
|
|
108
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsxs(styled.StyledSubmenuItemWrapper, {
|
|
109
|
+
"aria-selected": isSelected,
|
|
110
|
+
pr: 0,
|
|
111
|
+
id: dsId,
|
|
112
|
+
role: "option",
|
|
113
|
+
isSelected: isSelected,
|
|
114
|
+
isActive: isActive,
|
|
115
|
+
isFocus: isFocus,
|
|
116
|
+
onClick: onClick,
|
|
117
|
+
ref: innerRef,
|
|
118
|
+
onMouseEnter: onMouseEnterHandler,
|
|
119
|
+
onMouseLeave: onMouseLeaveHandler,
|
|
120
|
+
"aria-describedby": "dropdownmenu-submenu-".concat(dsId),
|
|
121
|
+
children: [render ? render(props$1) : /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
122
|
+
cols: ['auto', 'min-content']
|
|
123
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styled$1.StyledItemLabel, {}, void 0, label), /*#__PURE__*/_jsx__default["default"](DSButton.DSButtonV2, {
|
|
124
|
+
buttonType: "icon",
|
|
125
|
+
onClick: e => {
|
|
126
|
+
e.stopPropagation();
|
|
127
|
+
onClick(e);
|
|
128
|
+
}
|
|
129
|
+
}, void 0, rightAddon === 'ellipsis' ? _Ellipsis || (_Ellipsis = /*#__PURE__*/_jsx__default["default"](Ellipsis__default["default"], {})) : _ChevronRight || (_ChevronRight = /*#__PURE__*/_jsx__default["default"](ChevronRight__default["default"], {})))), /*#__PURE__*/_jsx__default["default"]("span", {
|
|
130
|
+
id: "dropdownmenu-submenu-".concat(dsId),
|
|
131
|
+
style: {
|
|
132
|
+
display: 'none'
|
|
133
|
+
}
|
|
134
|
+
}, void 0, "Submenu. To open this submenu press the Right Arrow key.")]
|
|
135
|
+
}));
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const SubmenuItemWithSchema = reactDesc.describe(SubmenuItem);
|
|
139
|
+
SubmenuItemWithSchema.propTypes = props.itemProps;
|
|
140
|
+
|
|
141
|
+
exports.SubmenuItem = SubmenuItem;
|
|
142
|
+
exports.SubmenuItemWithSchema = SubmenuItemWithSchema;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var styled$1 = require('../styled.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
const StyledItemWrapper = /*#__PURE__*/styled__default["default"](styled$1.StyledGlobalMenuItemWrapper).withConfig({
|
|
13
|
+
componentId: "sc-1kei8ft-0"
|
|
14
|
+
})(["background-color:", " !important;"], props => props.isSelected ? props.theme.colors.brand[200] : 'white');
|
|
15
|
+
const StyledItemLabel = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
16
|
+
componentId: "sc-1kei8ft-1"
|
|
17
|
+
})(["display:grid;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;"]);
|
|
18
|
+
|
|
19
|
+
exports.StyledItemLabel = StyledItemLabel;
|
|
20
|
+
exports.StyledItemWrapper = StyledItemWrapper;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var SingleMenuItem = require('./SingleMenuItem/SingleMenuItem.js');
|
|
6
|
+
var MultiMenuItem = require('./MultiMenuItem/MultiMenuItem.js');
|
|
7
|
+
var index = require('./MenuItem/index.js');
|
|
8
|
+
var index$1 = require('./SubmenuItem/index.js');
|
|
9
|
+
var index$2 = require('./Section/index.js');
|
|
10
|
+
var index$3 = require('./Separator/index.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.SingleMenuItem = SingleMenuItem.SingleMenuItem;
|
|
15
|
+
exports.MultiMenuItem = MultiMenuItem.MultiMenuItem;
|
|
16
|
+
exports.MultiMenuItemWithSchema = MultiMenuItem.MultiMenuItemWithSchema;
|
|
17
|
+
exports.MenuItem = index.MenuItem;
|
|
18
|
+
exports.MenuItemWithSchema = index.MenuItemWithSchema;
|
|
19
|
+
exports.SubmenuItem = index$1.SubmenuItem;
|
|
20
|
+
exports.SubmenuItemWithSchema = index$1.SubmenuItemWithSchema;
|
|
21
|
+
exports.Section = index$2.Section;
|
|
22
|
+
exports.Separator = index$3.Separator;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
8
|
+
var styledSystem = require('styled-system');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
13
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
|
+
|
|
15
|
+
var _templateObject, _templateObject2;
|
|
16
|
+
|
|
17
|
+
const borderOutside = function (color) {
|
|
18
|
+
let width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
19
|
+
return dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n :after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ", "px solid ", ";\n pointer-events: none;\n z-index: 7;\n }\n"])), width, color);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const disabledOption = () => dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n"])));
|
|
23
|
+
|
|
24
|
+
const activeBorderCss = props => borderOutside(props.theme.colors.brand[500]);
|
|
25
|
+
|
|
26
|
+
const focusBorderCss = props => borderOutside(props.theme.colors.brand[700], 2);
|
|
27
|
+
|
|
28
|
+
const StyledGlobalMenuItemWrapper = /*#__PURE__*/styled__default["default"].li.withConfig({
|
|
29
|
+
componentId: "sc-jyoobd-0"
|
|
30
|
+
})(["cursor:pointer;height:32px;padding-left:16px;padding-right:16px;display:grid;align-items:center;list-style:none;position:relative;", " ", " ", ";background-color:", ";&:hover{background-color:", ";}"], styledSystem.position, styledSystem.layout, props => {
|
|
31
|
+
if (props.disabled) return disabledOption();
|
|
32
|
+
if (props.isFocus) return focusBorderCss(props);
|
|
33
|
+
if (props.isActive) return activeBorderCss(props);
|
|
34
|
+
return '';
|
|
35
|
+
}, props => props.isActive ? props.theme.colors.brand[200] : 'white', props => !props.disabled && props.theme.colors.brand[200]);
|
|
36
|
+
const StyledMenuItemWrapper = /*#__PURE__*/styled__default["default"](StyledGlobalMenuItemWrapper).withConfig({
|
|
37
|
+
componentId: "sc-jyoobd-1"
|
|
38
|
+
})(["background-color:", " !important;cursor:", ";", ";"], props => props.isSelected ? props.theme.colors.brand[200] : 'white', props => props.disabled && 'not-allowed', props => props.isSelected && !props.isFocus ? activeBorderCss(props) : '');
|
|
39
|
+
const StyledSubmenuItemWrapper = /*#__PURE__*/styled__default["default"](StyledGlobalMenuItemWrapper).withConfig({
|
|
40
|
+
componentId: "sc-jyoobd-2"
|
|
41
|
+
})(["", ";padding-right:0;"], props => props.isSelected || props.isActive ? activeBorderCss(props) : '');
|
|
42
|
+
|
|
43
|
+
exports.StyledGlobalMenuItemWrapper = StyledGlobalMenuItemWrapper;
|
|
44
|
+
exports.StyledMenuItemWrapper = StyledMenuItemWrapper;
|
|
45
|
+
exports.StyledSubmenuItemWrapper = StyledSubmenuItemWrapper;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var SingleMenuItem = require('./components/SingleMenuItem/SingleMenuItem.js');
|
|
6
|
+
var MultiMenuItem = require('./components/MultiMenuItem/MultiMenuItem.js');
|
|
7
|
+
var index = require('./components/MenuItem/index.js');
|
|
8
|
+
var index$1 = require('./components/SubmenuItem/index.js');
|
|
9
|
+
var index$2 = require('./components/Section/index.js');
|
|
10
|
+
var index$3 = require('./components/Separator/index.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.SingleMenuItem = SingleMenuItem.SingleMenuItem;
|
|
15
|
+
exports.MultiMenuItem = MultiMenuItem.MultiMenuItem;
|
|
16
|
+
exports.MultiMenuItemWithSchema = MultiMenuItem.MultiMenuItemWithSchema;
|
|
17
|
+
exports.MenuItem = index.MenuItem;
|
|
18
|
+
exports.MenuItemWithSchema = index.MenuItemWithSchema;
|
|
19
|
+
exports.SubmenuItem = index$1.SubmenuItem;
|
|
20
|
+
exports.SubmenuItemWithSchema = index$1.SubmenuItemWithSchema;
|
|
21
|
+
exports.Section = index$2.Section;
|
|
22
|
+
exports.Separator = index$3.Separator;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var lodash = require('lodash');
|
|
6
|
+
var reactDesc = require('react-desc');
|
|
7
|
+
|
|
8
|
+
const defaultProps = {
|
|
9
|
+
dsId: '',
|
|
10
|
+
value: '',
|
|
11
|
+
label: '',
|
|
12
|
+
onClick: lodash.noop,
|
|
13
|
+
onKeyUp: lodash.noop,
|
|
14
|
+
isSelected: false,
|
|
15
|
+
isActive: false,
|
|
16
|
+
isFocus: false,
|
|
17
|
+
disabled: false,
|
|
18
|
+
wrapperStyles: {},
|
|
19
|
+
withVirtualization: false,
|
|
20
|
+
dataTestid: 'ds-menu-item'
|
|
21
|
+
};
|
|
22
|
+
const itemProps = {
|
|
23
|
+
value: reactDesc.PropTypes.any.description('').defaultValue(''),
|
|
24
|
+
label: reactDesc.PropTypes.string.description('').defaultValue('')
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.defaultProps = defaultProps;
|
|
28
|
+
exports.itemProps = itemProps;
|
package/cjs/Radio/Circle.js
CHANGED
|
@@ -8,10 +8,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
10
10
|
|
|
11
|
-
const Circle =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const Circle = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
checked,
|
|
14
|
+
theme
|
|
15
|
+
} = _ref;
|
|
15
16
|
const r = theme.breakpoints.medium.split('px')[0] - window.innerWidth >= 0 ? 6 : 4;
|
|
16
17
|
return /*#__PURE__*/_jsx__default["default"]("svg", {
|
|
17
18
|
width: "100%",
|
package/cjs/Radio/DSRadio.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');
|
|
@@ -89,7 +94,7 @@ const DSRadio = _ref => {
|
|
|
89
94
|
},
|
|
90
95
|
role: "radio",
|
|
91
96
|
style: style,
|
|
92
|
-
tabIndex: tabIndex,
|
|
97
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
93
98
|
value: value,
|
|
94
99
|
children: /*#__PURE__*/_jsx__default["default"](Circle, {
|
|
95
100
|
checked: checked
|
|
@@ -4,6 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
14
|
var React = require('react');
|
|
8
15
|
var reactDesc = require('react-desc');
|
|
9
16
|
var GroupItem = require('@elliemae/ds-shared/GroupContext/GroupItem');
|
|
@@ -37,16 +44,17 @@ const RadioItem = props => /*#__PURE__*/_jsx__default["default"](GroupItem__defa
|
|
|
37
44
|
}))
|
|
38
45
|
});
|
|
39
46
|
|
|
40
|
-
const DSRadioGroup =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
const DSRadioGroup = _ref => {
|
|
48
|
+
let {
|
|
49
|
+
containerProps,
|
|
50
|
+
onChange,
|
|
51
|
+
activeValue,
|
|
52
|
+
children,
|
|
53
|
+
orientation,
|
|
54
|
+
disabled,
|
|
55
|
+
truncateText,
|
|
56
|
+
labelProps
|
|
57
|
+
} = _ref;
|
|
50
58
|
const checkRefs = [];
|
|
51
59
|
const count = React__default["default"].Children.count(children);
|
|
52
60
|
|
|
@@ -12,10 +12,11 @@ const {
|
|
|
12
12
|
cssClassName
|
|
13
13
|
} = dsClassnames.convertPropToCssClassName('form-required-mark');
|
|
14
14
|
|
|
15
|
-
const RequiredMark =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const RequiredMark = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
required = false,
|
|
18
|
+
optional = false
|
|
19
|
+
} = _ref;
|
|
19
20
|
if (!required && !optional) return null;
|
|
20
21
|
|
|
21
22
|
if (required) {
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDesc = require('react-desc');
|
|
8
|
-
var
|
|
8
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
9
9
|
var dsIcon = require('@elliemae/ds-icon');
|
|
10
|
-
var CloseXsmall = require('@elliemae/ds-icons/CloseXsmall');
|
|
11
10
|
var styled = require('./styled.js');
|
|
12
11
|
var SButton = require('./SButton.js');
|
|
13
12
|
var useSearch = require('./useSearch.js');
|
|
@@ -18,32 +17,31 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
17
|
|
|
19
18
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
20
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
|
|
22
|
-
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
23
20
|
|
|
24
21
|
var _Search;
|
|
25
22
|
|
|
26
|
-
const DSSearchBox =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
23
|
+
const DSSearchBox = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
className,
|
|
26
|
+
clearable,
|
|
27
|
+
containerProps,
|
|
28
|
+
disableButton,
|
|
29
|
+
disabled,
|
|
30
|
+
innerRef,
|
|
31
|
+
onBlur,
|
|
32
|
+
onChange,
|
|
33
|
+
onKeyUp,
|
|
34
|
+
onSearch,
|
|
35
|
+
onClearButtonClick,
|
|
36
|
+
placeholder,
|
|
37
|
+
property,
|
|
38
|
+
readOnly,
|
|
39
|
+
searchOnEnter,
|
|
40
|
+
onSearchButtonClick,
|
|
41
|
+
showIcon,
|
|
42
|
+
style,
|
|
43
|
+
value
|
|
44
|
+
} = _ref;
|
|
47
45
|
const {
|
|
48
46
|
searchValue,
|
|
49
47
|
handleChange,
|
|
@@ -64,7 +62,7 @@ const DSSearchBox = ({
|
|
|
64
62
|
const shouldShowSearchIcon = !shouldShowClearIcon && showIcon;
|
|
65
63
|
const shouldShowAnyIcon = shouldShowClearIcon || shouldShowSearchIcon;
|
|
66
64
|
const PureSearchboxIcon = React__default["default"].useMemo(() => {
|
|
67
|
-
let Icon = _Search || (_Search = /*#__PURE__*/_jsx__default["default"](
|
|
65
|
+
let Icon = _Search || (_Search = /*#__PURE__*/_jsx__default["default"](dsIcons.Search, {
|
|
68
66
|
"aria-label": "Search"
|
|
69
67
|
}));
|
|
70
68
|
|
|
@@ -73,7 +71,7 @@ const DSSearchBox = ({
|
|
|
73
71
|
if (!shouldShowAnyIcon) return null;
|
|
74
72
|
|
|
75
73
|
if (shouldShowClearIcon) {
|
|
76
|
-
Icon = /*#__PURE__*/_jsx__default["default"](
|
|
74
|
+
Icon = /*#__PURE__*/_jsx__default["default"](dsIcons.CloseXsmall, {
|
|
77
75
|
color: dsIcon.DSIconColors.PRIMARY,
|
|
78
76
|
"aria-label": "Clear input"
|
|
79
77
|
});
|
|
@@ -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,11 +17,7 @@ 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
23
|
const StyledResultTracker = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
@@ -38,9 +31,12 @@ const StyledToolbarRightAddonsWrapper = /*#__PURE__*/styled__default["default"].
|
|
|
38
31
|
})(["display:flex;align-items:center;justify-content:flex-end;"]);
|
|
39
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 {
|
|
@@ -57,7 +53,7 @@ const RightButtonsGroup = props => {
|
|
|
57
53
|
containerProps: {
|
|
58
54
|
'data-testid': 'ds-navsearchbox-next'
|
|
59
55
|
},
|
|
60
|
-
icon: /*#__PURE__*/_jsx__default["default"](
|
|
56
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronDown, {
|
|
61
57
|
color: ['brand-primary', '800']
|
|
62
58
|
}),
|
|
63
59
|
onClick: onNext
|
|
@@ -66,7 +62,7 @@ const RightButtonsGroup = props => {
|
|
|
66
62
|
containerProps: {
|
|
67
63
|
'data-testid': 'ds-navsearchbox-prev'
|
|
68
64
|
},
|
|
69
|
-
icon: /*#__PURE__*/_jsx__default["default"](
|
|
65
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronUp, {
|
|
70
66
|
color: ['brand-primary', '800']
|
|
71
67
|
}),
|
|
72
68
|
onClick: onPrevious
|
|
@@ -76,7 +72,7 @@ const RightButtonsGroup = props => {
|
|
|
76
72
|
'data-testid': 'ds-navsearchbox-clear'
|
|
77
73
|
},
|
|
78
74
|
buttonType: "text",
|
|
79
|
-
icon: /*#__PURE__*/_jsx__default["default"](
|
|
75
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.CloseXsmall, {
|
|
80
76
|
color: ['brand-primary', '800']
|
|
81
77
|
}),
|
|
82
78
|
onClick: onClear,
|
|
@@ -86,7 +82,7 @@ const RightButtonsGroup = props => {
|
|
|
86
82
|
'data-testid': 'ds-navsearchbox-clear'
|
|
87
83
|
},
|
|
88
84
|
buttonType: "text",
|
|
89
|
-
icon: /*#__PURE__*/_jsx__default["default"](
|
|
85
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.Search, {
|
|
90
86
|
color: ['brand-primary', '800']
|
|
91
87
|
}),
|
|
92
88
|
last: true
|
package/cjs/SearchBox/SButton.js
CHANGED
|
@@ -16,16 +16,19 @@ 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;
|
|
@@ -4,9 +4,14 @@ 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
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');
|
|
7
12
|
var React = require('react');
|
|
8
13
|
var styled = require('styled-components');
|
|
9
|
-
var
|
|
14
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
15
|
var DSButton = require('@elliemae/ds-button');
|
|
11
16
|
var DSSearchBox = require('./DSSearchBox.js');
|
|
12
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -17,10 +22,9 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
17
22
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
23
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
19
24
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
20
|
-
var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
|
|
21
25
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
22
26
|
|
|
23
|
-
var
|
|
27
|
+
var _Search;
|
|
24
28
|
|
|
25
29
|
const _excluded = ["onSearchButtonClick", "width"];
|
|
26
30
|
|
|
@@ -48,7 +52,7 @@ const SearchBoxToggle = _ref => {
|
|
|
48
52
|
setOpen(true);
|
|
49
53
|
},
|
|
50
54
|
buttonType: "text",
|
|
51
|
-
icon:
|
|
55
|
+
icon: _Search || (_Search = /*#__PURE__*/_jsx__default["default"](dsIcons.Search, {}))
|
|
52
56
|
});
|
|
53
57
|
|
|
54
58
|
return /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, show && !isOpen && button, /*#__PURE__*/_jsx__default["default"](SearchWrap, {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
8
8
|
|
|
9
9
|
function handleSearch(clearOnSearch, setValue, searchOnEnter, value, onSearch, property, clickTrigger, onSearchButtonClick) {
|
|
10
10
|
if (clickTrigger) {
|
|
@@ -22,7 +22,8 @@ function handleSearch(clearOnSearch, setValue, searchOnEnter, value, onSearch, p
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function useSearch(
|
|
25
|
+
function useSearch() {
|
|
26
|
+
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
27
|
const {
|
|
27
28
|
onKeyUp,
|
|
28
29
|
onSearch,
|
|
@@ -34,7 +35,7 @@ function useSearch(params = {}) {
|
|
|
34
35
|
onClearButtonClick
|
|
35
36
|
} = params;
|
|
36
37
|
const [value, setValue] = React.useState(params.value);
|
|
37
|
-
const debouncedSearch = React.useCallback(
|
|
38
|
+
const debouncedSearch = React.useCallback(dsUtilities.debounce(handleSearch, 200), []); // update state if prop changes
|
|
38
39
|
|
|
39
40
|
React.useEffect(() => {
|
|
40
41
|
if (value !== params.value) {
|
|
@@ -42,11 +43,15 @@ function useSearch(params = {}) {
|
|
|
42
43
|
}
|
|
43
44
|
}, [params.value]);
|
|
44
45
|
|
|
45
|
-
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
|
+
};
|
|
46
50
|
|
|
47
|
-
const handleChange =
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
const handleChange = _ref => {
|
|
52
|
+
let {
|
|
53
|
+
target
|
|
54
|
+
} = _ref;
|
|
50
55
|
onChange(target.value);
|
|
51
56
|
setValue(target.value);
|
|
52
57
|
|