@elliemae/ds-form 2.0.1 → 2.1.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 +4 -4
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/cjs/ComboBox/index.js +0 -3
- package/cjs/ComboBox/v1/DSComboBox.js +2 -2
- package/cjs/ComboBox/v1/components/AllOption.js +2 -2
- package/cjs/ComboBox/v1/components/Control.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v1/components/MenuList.js +2 -2
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v1/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v1/components/ValueContainer.js +2 -2
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +2 -2
- package/cjs/ComboBox/v2/Combobox.js +2 -2
- package/cjs/ComboBox/v2/components/AllOption.js +2 -2
- package/cjs/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/Content.js +2 -2
- package/cjs/ComboBox/v2/components/Control.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/GroupHeading.js +2 -2
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/cjs/ComboBox/v2/components/MenuList.js +2 -2
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v2/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v2/components/ValueContainer.js +2 -2
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/cjs/DateInput/DSDateInput.js +2 -2
- package/cjs/DateInput/components/DateInputImpl.js +2 -2
- package/cjs/DateInput/components/DateInputs.js +2 -2
- package/cjs/DateInputV2/components/DateInputs.js +2 -2
- package/cjs/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/cjs/FormItem/DSFormItemLayout.js +2 -2
- package/cjs/FormItem/ValidationFieldWrapper.js +2 -2
- package/cjs/Input/DSInput.js +2 -2
- package/cjs/Input/InputAddonWrapper.js +2 -2
- package/cjs/Input/InputImpl.js +2 -2
- package/cjs/InputGroup/AddonWrapper.js +2 -2
- package/cjs/InputMask/DSInputMask.js +2 -2
- package/cjs/InputMask/DSInputMaskDeprecated.js +2 -2
- package/cjs/InputMask/MaskTypes.js +2 -2
- package/cjs/InputMask/mask_types/DateInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/cjs/InputMask/mask_types/index.js +2 -2
- package/cjs/InputProtected/DSInputProtected.js +2 -2
- package/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
- package/cjs/MenuItem/components/Section/styled.js +2 -2
- package/cjs/MenuItem/components/Separator/styled.js +2 -2
- package/cjs/MenuItem/components/SubmenuItem/index.js +3 -3
- package/cjs/MenuItem/components/styled.js +4 -9
- package/cjs/Radio/DSRadio.js +11 -6
- package/cjs/RadioGroup/DSRadioGroup.js +2 -2
- package/cjs/SearchBox/SearchBoxToggle.js +2 -2
- package/cjs/SearchBox/withSearchable.js +2 -2
- package/cjs/TextBox/DSTextBox.js +2 -2
- package/cjs/TimeInput/DSTimeInput.js +2 -2
- package/cjs/TimeInput/TimeInputImpl.js +2 -2
- package/cjs/TimeInput/TimeInputs.js +2 -2
- package/cjs/Toggle/DSToggle.js +2 -2
- package/cjs/Toggle/DSToggleImpl.js +2 -2
- package/cjs/Toggle/DSToggleRender.js +2 -2
- package/cjs/index.js +0 -2
- package/esm/Checkbox/DSCheckbox.js +4 -4
- package/esm/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/esm/ComboBox/index.js +0 -1
- package/esm/ComboBox/v1/DSComboBox.js +2 -2
- package/esm/ComboBox/v1/components/AllOption.js +2 -2
- package/esm/ComboBox/v1/components/Control.js +2 -2
- package/esm/ComboBox/v1/components/CustomOption.js +2 -2
- package/esm/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v1/components/MenuList.js +2 -2
- package/esm/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v1/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v1/components/ValueContainer.js +2 -2
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +2 -2
- package/esm/ComboBox/v2/Combobox.js +2 -2
- package/esm/ComboBox/v2/components/AllOption.js +2 -2
- package/esm/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/esm/ComboBox/v2/components/Content.js +2 -2
- package/esm/ComboBox/v2/components/Control.js +2 -2
- package/esm/ComboBox/v2/components/CustomOption.js +2 -2
- package/esm/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v2/components/GroupHeading.js +2 -2
- package/esm/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/esm/ComboBox/v2/components/MenuList.js +2 -2
- package/esm/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v2/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v2/components/ValueContainer.js +2 -2
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
- package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/esm/DateInput/DSDateInput.js +2 -2
- package/esm/DateInput/components/DateInputImpl.js +2 -2
- package/esm/DateInput/components/DateInputs.js +2 -2
- package/esm/DateInputV2/components/DateInputs.js +2 -2
- package/esm/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/esm/FormItem/DSFormItemLayout.js +2 -2
- package/esm/FormItem/ValidationFieldWrapper.js +2 -2
- package/esm/Input/DSInput.js +2 -2
- package/esm/Input/InputAddonWrapper.js +2 -2
- package/esm/Input/InputImpl.js +2 -2
- package/esm/InputGroup/AddonWrapper.js +2 -2
- package/esm/InputMask/DSInputMask.js +2 -2
- package/esm/InputMask/DSInputMaskDeprecated.js +2 -2
- package/esm/InputMask/MaskTypes.js +2 -2
- package/esm/InputMask/mask_types/DateInputMask.js +2 -2
- package/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/esm/InputMask/mask_types/NumberInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/esm/InputMask/mask_types/SsnInputMask.js +2 -2
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/esm/InputMask/mask_types/index.js +2 -2
- package/esm/InputProtected/DSInputProtected.js +2 -2
- package/esm/LargeInputText/DSLargeInputText.js +2 -2
- package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
- package/esm/MenuItem/components/Section/styled.js +2 -2
- package/esm/MenuItem/components/Separator/styled.js +2 -2
- package/esm/MenuItem/components/SubmenuItem/index.js +3 -3
- package/esm/MenuItem/components/styled.js +5 -9
- package/esm/Radio/DSRadio.js +11 -6
- package/esm/RadioGroup/DSRadioGroup.js +2 -2
- package/esm/SearchBox/SearchBoxToggle.js +2 -2
- package/esm/SearchBox/withSearchable.js +2 -2
- package/esm/TextBox/DSTextBox.js +2 -2
- package/esm/TimeInput/DSTimeInput.js +2 -2
- package/esm/TimeInput/TimeInputImpl.js +2 -2
- package/esm/TimeInput/TimeInputs.js +2 -2
- package/esm/Toggle/DSToggle.js +2 -2
- package/esm/Toggle/DSToggleImpl.js +2 -2
- package/esm/Toggle/DSToggleRender.js +2 -2
- package/esm/index.js +0 -1
- package/package.json +23 -207
- package/types/Checkbox/DSCheckbox.d.ts +36 -47
- package/types/Checkbox/props.d.ts +14 -14
- package/types/CheckboxGroup/DSCheckboxGroup.d.ts +12 -12
- package/types/CheckboxGroup/props.d.ts +12 -12
- package/types/ComboBox/index.d.ts +0 -1
- package/types/DateInput/DSDateInput.d.ts +32 -32
- package/types/DateInput/props.d.ts +64 -32
- package/types/DateInputV2/components/DSDateInput.d.ts +20 -20
- package/types/DateInputV2/components/props.d.ts +20 -20
- package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +38 -38
- package/types/FormItem/DSFormItemLayout.d.ts +112 -112
- package/types/FormItem/Error/DSError.d.ts +4 -4
- package/types/FormItem/defaultProps.d.ts +38 -38
- package/types/FormItem/props.d.ts +74 -74
- package/types/InputGroup/DSInputGroup.d.ts +14 -14
- package/types/InputGroup/props.d.ts +14 -14
- package/types/InputMask/DSInputMask.d.ts +54 -54
- package/types/InputMask/props.d.ts +54 -54
- package/types/InputProtected/DSInputProtected.d.ts +12 -12
- package/types/InputProtected/props.d.ts +12 -12
- package/types/LargeInputText/DSLargeInputText.d.ts +54 -54
- package/types/LargeInputText/props.d.ts +54 -54
- package/types/MenuItem/components/SubmenuItem/styled.d.ts +1 -1
- package/types/MenuItem/components/styled.d.ts +5 -3
- package/types/MenuItem/props.d.ts +4 -3
- package/types/Radio/DSRadio.d.ts +56 -46
- package/types/RadioGroup/DSRadioGroup.d.ts +12 -12
- package/types/RadioGroup/props.d.ts +12 -12
- package/types/SearchBox/DSSearchBox.d.ts +40 -40
- package/types/SearchBox/NavSearchBox.d.ts +24 -7
- package/types/SearchBox/SButton.d.ts +4 -4
- package/types/SearchBox/props.d.ts +44 -44
- package/types/TextBox/DSTextBox.d.ts +38 -38
- package/types/TimeInput/DSTimeInput.d.ts +22 -22
- package/types/Toggle/DSToggle.d.ts +22 -22
- package/cjs/ComboBox/v3/ComboBox.js +0 -33
- package/cjs/ComboBox/v3/ComboBoxCTX.js +0 -55
- package/cjs/ComboBox/v3/ComboboxDataTestids.js +0 -17
- package/cjs/ComboBox/v3/config/constants.js +0 -14
- package/cjs/ComboBox/v3/config/useComboBox.js +0 -122
- package/cjs/ComboBox/v3/config/useGetPropsWithDefault.js +0 -11
- package/cjs/ComboBox/v3/index.d.js +0 -2
- package/cjs/ComboBox/v3/index.js +0 -10
- package/cjs/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -33
- package/cjs/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -28
- package/cjs/ComboBox/v3/parts/a11y-messages/index.js +0 -11
- package/cjs/ComboBox/v3/parts/a11y-messages/styled.js +0 -15
- package/cjs/ComboBox/v3/parts/container/Container.js +0 -67
- package/cjs/ComboBox/v3/parts/container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/container/styled.js +0 -23
- package/cjs/ComboBox/v3/parts/controls/Controls.js +0 -71
- package/cjs/ComboBox/v3/parts/controls/index.js +0 -9
- package/cjs/ComboBox/v3/parts/controls/styled.js +0 -65
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -67
- package/cjs/ComboBox/v3/parts/controls-input/styled.js +0 -27
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -77
- package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -33
- package/cjs/ComboBox/v3/parts/dropdown-indicator/index.js +0 -2
- package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -17
- package/cjs/ComboBox/v3/parts/empty-state/index.js +0 -27
- package/cjs/ComboBox/v3/parts/empty-state/styled.js +0 -19
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +0 -113
- package/cjs/ComboBox/v3/parts/header-list/index.js +0 -9
- package/cjs/ComboBox/v3/parts/header-list/styled.js +0 -58
- package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -73
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +0 -81
- package/cjs/ComboBox/v3/parts/menu-list/index.js +0 -9
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +0 -33
- package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -105
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +0 -61
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -63
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -23
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -71
- package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -28
- package/cjs/ComboBox/v3/parts/single-selected-value-container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -15
- package/cjs/ComboBox/v3/propTypes.js +0 -25
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -152
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -37
- package/cjs/ComboBox/v3/utils/listHelper.js +0 -39
- package/esm/ComboBox/v3/ComboBox.js +0 -24
- package/esm/ComboBox/v3/ComboBoxCTX.js +0 -49
- package/esm/ComboBox/v3/ComboboxDataTestids.js +0 -13
- package/esm/ComboBox/v3/config/constants.js +0 -10
- package/esm/ComboBox/v3/config/useComboBox.js +0 -114
- package/esm/ComboBox/v3/config/useGetPropsWithDefault.js +0 -7
- package/esm/ComboBox/v3/index.d.js +0 -1
- package/esm/ComboBox/v3/index.js +0 -1
- package/esm/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -25
- package/esm/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -20
- package/esm/ComboBox/v3/parts/a11y-messages/index.js +0 -2
- package/esm/ComboBox/v3/parts/a11y-messages/styled.js +0 -7
- package/esm/ComboBox/v3/parts/container/Container.js +0 -59
- package/esm/ComboBox/v3/parts/container/index.js +0 -1
- package/esm/ComboBox/v3/parts/container/styled.js +0 -13
- package/esm/ComboBox/v3/parts/controls/Controls.js +0 -63
- package/esm/ComboBox/v3/parts/controls/index.js +0 -1
- package/esm/ComboBox/v3/parts/controls/styled.js +0 -52
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -59
- package/esm/ComboBox/v3/parts/controls-input/styled.js +0 -16
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -73
- package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -26
- package/esm/ComboBox/v3/parts/dropdown-indicator/index.js +0 -1
- package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -8
- package/esm/ComboBox/v3/parts/empty-state/index.js +0 -19
- package/esm/ComboBox/v3/parts/empty-state/styled.js +0 -10
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js +0 -105
- package/esm/ComboBox/v3/parts/header-list/index.js +0 -1
- package/esm/ComboBox/v3/parts/header-list/styled.js +0 -41
- package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -69
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +0 -73
- package/esm/ComboBox/v3/parts/menu-list/index.js +0 -1
- package/esm/ComboBox/v3/parts/menu-list/styled.js +0 -23
- package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -97
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +0 -57
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -54
- package/esm/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -1
- package/esm/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -13
- package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -67
- package/esm/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -20
- package/esm/ComboBox/v3/parts/single-selected-value-container/index.js +0 -1
- package/esm/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -7
- package/esm/ComboBox/v3/propTypes.js +0 -21
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -148
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -33
- package/esm/ComboBox/v3/utils/listHelper.js +0 -30
- package/types/ComboBox/v3/ComboBox.d.ts +0 -62
- package/types/ComboBox/v3/ComboBoxCTX.d.ts +0 -6
- package/types/ComboBox/v3/ComboboxDataTestids.d.ts +0 -11
- package/types/ComboBox/v3/config/constants.d.ts +0 -8
- package/types/ComboBox/v3/config/useComboBox.d.ts +0 -2
- package/types/ComboBox/v3/config/useGetPropsWithDefault.d.ts +0 -2
- package/types/ComboBox/v3/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.d.ts +0 -3
- package/types/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.d.ts +0 -3
- package/types/ComboBox/v3/parts/a11y-messages/index.d.ts +0 -2
- package/types/ComboBox/v3/parts/a11y-messages/styled.d.ts +0 -1
- package/types/ComboBox/v3/parts/container/Container.d.ts +0 -3
- package/types/ComboBox/v3/parts/container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/container/styled.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls/Controls.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/controls/styled.d.ts +0 -7
- package/types/ComboBox/v3/parts/controls-input/ControlsInput.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls-input/styled.d.ts +0 -4
- package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +0 -12
- package/types/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.d.ts +0 -3
- package/types/ComboBox/v3/parts/dropdown-indicator/index.d.ts +0 -0
- package/types/ComboBox/v3/parts/dropdown-indicator/styled.d.ts +0 -1
- package/types/ComboBox/v3/parts/empty-state/index.d.ts +0 -3
- package/types/ComboBox/v3/parts/empty-state/styled.d.ts +0 -2
- package/types/ComboBox/v3/parts/header-list/HeaderList.d.ts +0 -3
- package/types/ComboBox/v3/parts/header-list/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/header-list/styled.d.ts +0 -7
- package/types/ComboBox/v3/parts/header-list/useHeaderListHandlers.d.ts +0 -12
- package/types/ComboBox/v3/parts/menu-list/MenuList.d.ts +0 -3
- package/types/ComboBox/v3/parts/menu-list/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +0 -10
- package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +0 -2
- package/types/ComboBox/v3/parts/menu-list/useMenuList.d.ts +0 -2
- package/types/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.d.ts +0 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +0 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.d.ts +0 -2
- package/types/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.d.ts +0 -3
- package/types/ComboBox/v3/parts/single-selected-value-container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +0 -1
- package/types/ComboBox/v3/propTypes.d.ts +0 -51
- package/types/ComboBox/v3/tests/combobox-general.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-multi-select.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-single-select.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-special-keys.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/utils.d.ts +0 -22
- package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +0 -4
- package/types/ComboBox/v3/utils/hooks/useOnElementResize.d.ts +0 -3
- package/types/ComboBox/v3/utils/listHelper.d.ts +0 -7
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('react');
|
|
7
|
-
var reactDesc = require('react-desc');
|
|
8
|
-
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
9
|
-
var useComboBox = require('./config/useComboBox.js');
|
|
10
|
-
var Container = require('./parts/container/Container.js');
|
|
11
|
-
var propTypes = require('./propTypes.js');
|
|
12
|
-
var ComboBoxCTX = require('./ComboBoxCTX.js');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
17
|
-
|
|
18
|
-
var _Container;
|
|
19
|
-
|
|
20
|
-
const DSComboBox = props => {
|
|
21
|
-
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, ComboBoxCTX.defaultProps);
|
|
22
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, propTypes.propTypes);
|
|
23
|
-
const ctx = useComboBox.useComboBox(props);
|
|
24
|
-
return /*#__PURE__*/_jsx__default["default"](ComboBoxCTX.ComboBoxContext.Provider, {
|
|
25
|
-
value: ctx
|
|
26
|
-
}, void 0, _Container || (_Container = /*#__PURE__*/_jsx__default["default"](Container.Container, {})));
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const DSComboBoxWithSchema = reactDesc.describe(DSComboBox);
|
|
30
|
-
DSComboBoxWithSchema.propTypes = propTypes.propTypes;
|
|
31
|
-
|
|
32
|
-
exports.DSComboBox = DSComboBox;
|
|
33
|
-
exports.DSComboBoxWithSchema = DSComboBoxWithSchema;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var lodash = require('lodash');
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
placeholder: '',
|
|
11
|
-
options: [],
|
|
12
|
-
selectedValues: null,
|
|
13
|
-
hasError: false,
|
|
14
|
-
inline: false,
|
|
15
|
-
autoFocus: false,
|
|
16
|
-
startPlacementPreference: 'bottom-start',
|
|
17
|
-
placementOrderPreference: ['bottom-start', 'bottom-end'],
|
|
18
|
-
onClearAll: lodash.noop,
|
|
19
|
-
onSelectAll: lodash.noop,
|
|
20
|
-
onCreate: lodash.noop,
|
|
21
|
-
withToggle: false,
|
|
22
|
-
onChange: lodash.noop,
|
|
23
|
-
onKeyDown: lodash.noop,
|
|
24
|
-
onFilter: lodash.noop,
|
|
25
|
-
onMenuOpen: lodash.noop
|
|
26
|
-
};
|
|
27
|
-
const defaultContext = {
|
|
28
|
-
props: defaultProps,
|
|
29
|
-
showPopover: false,
|
|
30
|
-
setShowPopover: lodash.noop,
|
|
31
|
-
scrollOptionIntoView: lodash.noop,
|
|
32
|
-
referenceElement: null,
|
|
33
|
-
hasFocus: false,
|
|
34
|
-
setHasFocus: lodash.noop,
|
|
35
|
-
pillGroupRef: /*#__PURE__*/React.createRef(),
|
|
36
|
-
setReferenceElement: lodash.noop,
|
|
37
|
-
inputRef: /*#__PURE__*/React.createRef(),
|
|
38
|
-
listRef: /*#__PURE__*/React.createRef(),
|
|
39
|
-
wrapperListRef: /*#__PURE__*/React.createRef(),
|
|
40
|
-
controlsWrapperRef: /*#__PURE__*/React.createRef(),
|
|
41
|
-
selectedOptionsRef: /*#__PURE__*/React.createRef(),
|
|
42
|
-
showSelectedValue: false,
|
|
43
|
-
setShowSelectedValue: lodash.noop,
|
|
44
|
-
focusOptionIdx: '',
|
|
45
|
-
setCurrentOption: lodash.noop,
|
|
46
|
-
showSelectedOptions: false,
|
|
47
|
-
setShowSelectedOptions: lodash.noop
|
|
48
|
-
};
|
|
49
|
-
/** Context for cross component communication */
|
|
50
|
-
|
|
51
|
-
const ComboBoxContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
52
|
-
|
|
53
|
-
exports.ComboBoxContext = ComboBoxContext;
|
|
54
|
-
exports["default"] = ComboBoxContext;
|
|
55
|
-
exports.defaultProps = defaultProps;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const ComboboxDataTestid = {
|
|
6
|
-
INPUT: 'combobox-input',
|
|
7
|
-
LIST: 'combobox-menu-list',
|
|
8
|
-
SELECTED_VALUES: 'combobox-selected-values',
|
|
9
|
-
SELECT_ALL_BUTTON: 'combobox-all-btn',
|
|
10
|
-
CLEAR_ALL_BUTTON: 'combobox-clear-btn',
|
|
11
|
-
DROPDOWN: 'combobox-dropdown-btn',
|
|
12
|
-
OPTION: 'combobox-option',
|
|
13
|
-
SHOW_ALL_BUTTON: 'combobox-show-all-btn',
|
|
14
|
-
SHOW_SELECTED_OPTIONS_BUTTON: 'combobox-selected-options-btn'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.ComboboxDataTestid = ComboboxDataTestid;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const DATA_TESTID = {
|
|
6
|
-
COMBOBOX_MENU_LIST: 'combobox-menu-list',
|
|
7
|
-
COMBOBOX_CLEAR_BTN: 'combobox-clear-btn',
|
|
8
|
-
COMBOBOX_ALL_BTN: 'combobox-all-btn',
|
|
9
|
-
COMBOBOX_DROPDOWN_BTN: 'combobox-dropdown-btn',
|
|
10
|
-
COMBOBOX_OPTION: 'combobox-option',
|
|
11
|
-
COMBOBOX: 'combobox'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.DATA_TESTID = DATA_TESTID;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
8
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
-
require('core-js/modules/esnext.async-iterator.find.js');
|
|
11
|
-
require('core-js/modules/esnext.iterator.find.js');
|
|
12
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
13
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
14
|
-
var React = require('react');
|
|
15
|
-
var reactVirtual = require('react-virtual');
|
|
16
|
-
var useGetPropsWithDefault = require('./useGetPropsWithDefault.js');
|
|
17
|
-
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
-
|
|
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; }
|
|
23
|
-
|
|
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; }
|
|
25
|
-
const useComboBox = props => {
|
|
26
|
-
const [showPopover, setShowPopover] = React.useState(false);
|
|
27
|
-
const [referenceElement, setReferenceElement] = React.useState(null);
|
|
28
|
-
const [showSelectedValue, setShowSelectedValue] = React.useState(false);
|
|
29
|
-
const [showSelectedOptions, setShowSelectedOptions] = React.useState(false);
|
|
30
|
-
const [hasFocus, setHasFocus] = React.useState(false);
|
|
31
|
-
const [focusOptionIdx, setCurrentOption] = React.useState('');
|
|
32
|
-
const inputRef = React.useRef(null);
|
|
33
|
-
const listRef = React.useRef(null);
|
|
34
|
-
const wrapperListRef = React.useRef(null);
|
|
35
|
-
const selectedOptionsRef = React.useRef(null);
|
|
36
|
-
const controlsWrapperRef = React.useRef(null);
|
|
37
|
-
const pillGroupRef = React.useRef(null);
|
|
38
|
-
const propsWithDefaults = useGetPropsWithDefault.useGetComboBoxWithDefaultsProps(props);
|
|
39
|
-
const {
|
|
40
|
-
options,
|
|
41
|
-
selectedValues
|
|
42
|
-
} = propsWithDefaults; // ---------------------------------------------------------------------------
|
|
43
|
-
// Menu Options with/out selected filter
|
|
44
|
-
// ---------------------------------------------------------------------------
|
|
45
|
-
|
|
46
|
-
const selectedValuesWithSections = React.useCallback(() => {
|
|
47
|
-
var _items2;
|
|
48
|
-
|
|
49
|
-
const multiSelectedValue = selectedValues;
|
|
50
|
-
const items = [];
|
|
51
|
-
options.forEach(option => {
|
|
52
|
-
const isSelectedValue = multiSelectedValue.find(item => item.dsId === option.dsId);
|
|
53
|
-
|
|
54
|
-
if (isSelectedValue) {
|
|
55
|
-
items.push(option);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (option.type === 'section') {
|
|
59
|
-
var _items;
|
|
60
|
-
|
|
61
|
-
if (((_items = items[items.length - 1]) === null || _items === void 0 ? void 0 : _items.type) === 'section') {
|
|
62
|
-
items[items.length - 1] = option;
|
|
63
|
-
} else {
|
|
64
|
-
items.push(option);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
if (((_items2 = items[items.length - 1]) === null || _items2 === void 0 ? void 0 : _items2.type) === 'section') {
|
|
70
|
-
items.pop();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return items;
|
|
74
|
-
}, [options, selectedValues]);
|
|
75
|
-
const correctOptions = React.useMemo(() => showSelectedOptions && Array.isArray(selectedValues) && selectedValues.length > 0 ? selectedValuesWithSections() : options, [options, selectedValuesWithSections, selectedValues, showSelectedOptions]); // ===========================================================================
|
|
76
|
-
// Virtualization setup
|
|
77
|
-
// ===========================================================================
|
|
78
|
-
|
|
79
|
-
const virtualListHelpers = reactVirtual.useVirtual({
|
|
80
|
-
size: correctOptions.length,
|
|
81
|
-
parentRef: listRef,
|
|
82
|
-
overscan: 15,
|
|
83
|
-
paddingStart: 0
|
|
84
|
-
}); // ===========================================================================
|
|
85
|
-
// Scroll into view function
|
|
86
|
-
// ===========================================================================
|
|
87
|
-
|
|
88
|
-
const scrollOptionIntoView = React.useCallback(function (dsId) {
|
|
89
|
-
let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
90
|
-
align: 'center'
|
|
91
|
-
};
|
|
92
|
-
virtualListHelpers.scrollToIndex(correctOptions.findIndex(opt => opt.dsId === dsId), opts);
|
|
93
|
-
}, [correctOptions, virtualListHelpers]);
|
|
94
|
-
const ctx = React.useMemo(() => ({
|
|
95
|
-
props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
|
|
96
|
-
options: correctOptions
|
|
97
|
-
}),
|
|
98
|
-
virtualListHelpers,
|
|
99
|
-
showPopover,
|
|
100
|
-
referenceElement,
|
|
101
|
-
inputRef,
|
|
102
|
-
showSelectedValue,
|
|
103
|
-
listRef,
|
|
104
|
-
focusOptionIdx,
|
|
105
|
-
selectedOptionsRef,
|
|
106
|
-
controlsWrapperRef,
|
|
107
|
-
hasFocus,
|
|
108
|
-
pillGroupRef,
|
|
109
|
-
showSelectedOptions,
|
|
110
|
-
wrapperListRef,
|
|
111
|
-
setShowSelectedOptions,
|
|
112
|
-
setHasFocus,
|
|
113
|
-
setCurrentOption,
|
|
114
|
-
scrollOptionIntoView,
|
|
115
|
-
setShowSelectedValue,
|
|
116
|
-
setReferenceElement,
|
|
117
|
-
setShowPopover
|
|
118
|
-
}), [scrollOptionIntoView, correctOptions, propsWithDefaults, virtualListHelpers, focusOptionIdx, showSelectedValue, wrapperListRef, showSelectedOptions, showPopover, pillGroupRef, referenceElement, inputRef, selectedOptionsRef, controlsWrapperRef, hasFocus, listRef]);
|
|
119
|
-
return ctx;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
exports.useComboBox = useComboBox;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
|
-
var ComboBoxCTX = require('../ComboBoxCTX.js');
|
|
7
|
-
|
|
8
|
-
// we have to merge the "default" nested default values with what the user gives us...
|
|
9
|
-
const useGetComboBoxWithDefaultsProps = props => dsPropsHelpers.useMemoMergePropsWithDefault(props, ComboBoxCTX.defaultProps);
|
|
10
|
-
|
|
11
|
-
exports.useGetComboBoxWithDefaultsProps = useGetComboBoxWithDefaultsProps;
|
package/cjs/ComboBox/v3/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
10
|
-
var listHelper = require('../../utils/listHelper.js');
|
|
11
|
-
var styled = require('./styled.js');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
|
-
|
|
17
|
-
const MultiAllyMessages = () => {
|
|
18
|
-
const {
|
|
19
|
-
props: {
|
|
20
|
-
options,
|
|
21
|
-
selectedValues
|
|
22
|
-
}
|
|
23
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
24
|
-
const selectableOptions = listHelper.getSelectableOptions(options);
|
|
25
|
-
const multipleSelectedValues = selectedValues;
|
|
26
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
|
|
27
|
-
"aria-live": "polite",
|
|
28
|
-
"aria-atomic": "false",
|
|
29
|
-
"aria-relevant": "additions text"
|
|
30
|
-
}, void 0, "Options selected: ".concat(multipleSelectedValues.map(item => item.label).join(', '), ". ").concat(multipleSelectedValues.length, " of ").concat(selectableOptions.length));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.MultiAllyMessages = MultiAllyMessages;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
8
|
-
var styled = require('./styled.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
|
-
|
|
14
|
-
const SingleAllyMessages = () => {
|
|
15
|
-
const {
|
|
16
|
-
props: {
|
|
17
|
-
selectedValues
|
|
18
|
-
}
|
|
19
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
20
|
-
const singleSelectedValue = selectedValues;
|
|
21
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
|
|
22
|
-
"aria-live": "polite",
|
|
23
|
-
"aria-atomic": "false",
|
|
24
|
-
"aria-relevant": "additions text"
|
|
25
|
-
}, void 0, "Option selected: ".concat(singleSelectedValue.label, "."));
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.SingleAllyMessages = SingleAllyMessages;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var MultiAllyMessages = require('./MultiAllyMessages.js');
|
|
6
|
-
var SingleAllyMessages = require('./SingleAllyMessages.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.MultiAllyMessages = MultiAllyMessages.MultiAllyMessages;
|
|
11
|
-
exports.SingleAllyMessages = SingleAllyMessages.SingleAllyMessages;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledA11ySelectedValues = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
12
|
-
componentId: "sc-4xp40i-0"
|
|
13
|
-
})(["width:1px;height:1px;position:absolute;clip:rect(1px,1px,1px,1px);"]);
|
|
14
|
-
|
|
15
|
-
exports.StyledA11ySelectedValues = StyledA11ySelectedValues;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var dsPopperjs = require('@elliemae/ds-popperjs');
|
|
8
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
9
|
-
var styled = require('./styled.js');
|
|
10
|
-
var Controls = require('../controls/Controls.js');
|
|
11
|
-
var MenuList = require('../menu-list/MenuList.js');
|
|
12
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
17
|
-
|
|
18
|
-
var _Controls, _MenuList, _MenuList2;
|
|
19
|
-
|
|
20
|
-
const Container = () => {
|
|
21
|
-
const {
|
|
22
|
-
props: {
|
|
23
|
-
inline,
|
|
24
|
-
startPlacementPreference,
|
|
25
|
-
placementOrderPreference
|
|
26
|
-
},
|
|
27
|
-
showPopover,
|
|
28
|
-
inputRef,
|
|
29
|
-
setReferenceElement,
|
|
30
|
-
setShowPopover,
|
|
31
|
-
referenceElement
|
|
32
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
33
|
-
const handleCloseMenu = React.useCallback(() => {
|
|
34
|
-
setShowPopover(false);
|
|
35
|
-
if (inputRef.current) inputRef.current.blur();
|
|
36
|
-
}, [inputRef, setShowPopover]);
|
|
37
|
-
const handleMouseDown = React.useCallback(e => {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
}, []);
|
|
40
|
-
const handleOnClickContainer = React.useCallback(() => {
|
|
41
|
-
setShowPopover(!showPopover);
|
|
42
|
-
}, [setShowPopover, showPopover]);
|
|
43
|
-
const StyledContainer = inline ? styled.StyledContainerInline : styled.StyledContainerWithPopper;
|
|
44
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
45
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(StyledContainer, {
|
|
46
|
-
ref: setReferenceElement,
|
|
47
|
-
onClick: handleOnClickContainer,
|
|
48
|
-
children: [_Controls || (_Controls = /*#__PURE__*/_jsx__default["default"](Controls.Controls, {})), inline ? _MenuList || (_MenuList = /*#__PURE__*/_jsx__default["default"](MenuList.MenuList, {})) : null]
|
|
49
|
-
}), !inline ? /*#__PURE__*/_jsx__default["default"](dsPopperjs.DSPopperJS, {
|
|
50
|
-
customOffset: [0, 5],
|
|
51
|
-
closeContextMenu: handleCloseMenu,
|
|
52
|
-
referenceElement: referenceElement,
|
|
53
|
-
showPopover: showPopover,
|
|
54
|
-
startPlacementPreference: startPlacementPreference,
|
|
55
|
-
placementOrderPreference: placementOrderPreference,
|
|
56
|
-
withoutPortal: true,
|
|
57
|
-
withoutArrow: true,
|
|
58
|
-
withoutAnimation: true,
|
|
59
|
-
zIndex: 10
|
|
60
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyledPopperWrapper, {
|
|
61
|
-
tabIndex: -1,
|
|
62
|
-
onMouseDown: handleMouseDown
|
|
63
|
-
}, void 0, _MenuList2 || (_MenuList2 = /*#__PURE__*/_jsx__default["default"](MenuList.MenuList, {})))) : null]
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
exports.Container = Container;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledContainerWithPopper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
12
|
-
componentId: "sc-17wftik-0"
|
|
13
|
-
})(["width:100%;height:28px;position:relative;"]);
|
|
14
|
-
const StyledContainerInline = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
15
|
-
componentId: "sc-17wftik-1"
|
|
16
|
-
})(["width:100%;position:relative;"]);
|
|
17
|
-
const StyledPopperWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
|
-
componentId: "sc-17wftik-2"
|
|
19
|
-
})(["background:#fff;overflow:auto;position:relative;"]);
|
|
20
|
-
|
|
21
|
-
exports.StyledContainerInline = StyledContainerInline;
|
|
22
|
-
exports.StyledContainerWithPopper = StyledContainerWithPopper;
|
|
23
|
-
exports.StyledPopperWrapper = StyledPopperWrapper;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var DropdownIndicator = require('../dropdown-indicator/DropdownIndicator.js');
|
|
8
|
-
var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
|
|
9
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
10
|
-
var styled = require('./styled.js');
|
|
11
|
-
var MultiSelectedValuesContainer = require('../multi-selected-values-container/MultiSelectedValuesContainer.js');
|
|
12
|
-
var ControlsInput = require('../controls-input/ControlsInput.js');
|
|
13
|
-
var SingleSelectedValueContainer = require('../single-selected-value-container/SingleSelectedValueContainer.js');
|
|
14
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
15
|
-
|
|
16
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
-
|
|
18
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
|
-
|
|
20
|
-
var _MultiSelectedValuesC, _SingleSelectedValueC, _ControlsInput, _StyledHeaderActionsW;
|
|
21
|
-
|
|
22
|
-
const Controls = () => {
|
|
23
|
-
const {
|
|
24
|
-
props: {
|
|
25
|
-
inline,
|
|
26
|
-
inputMinWidth,
|
|
27
|
-
hasError,
|
|
28
|
-
selectedValues
|
|
29
|
-
},
|
|
30
|
-
inputRef,
|
|
31
|
-
selectedOptionsRef,
|
|
32
|
-
setShowPopover,
|
|
33
|
-
showPopover,
|
|
34
|
-
hasFocus,
|
|
35
|
-
controlsWrapperRef
|
|
36
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
37
|
-
const handleOnClick = React.useCallback(() => {
|
|
38
|
-
if (hasFocus && showPopover && !inline) {
|
|
39
|
-
inputRef.current.blur();
|
|
40
|
-
} else if (hasFocus) {
|
|
41
|
-
setShowPopover(true);
|
|
42
|
-
} else {
|
|
43
|
-
inputRef.current.focus();
|
|
44
|
-
}
|
|
45
|
-
}, [hasFocus, setShowPopover, showPopover, inputRef, inline]);
|
|
46
|
-
|
|
47
|
-
const handleOnMouseDown = e => {
|
|
48
|
-
if (hasFocus || inline) {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const cols = !inline ? ['minmax(0px,max-content)', 'minmax(20px, auto)', '29px'] : ['minmax(0px, auto)'];
|
|
54
|
-
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledControlsWrapper, {
|
|
55
|
-
ref: controlsWrapperRef,
|
|
56
|
-
cols: cols,
|
|
57
|
-
minWidth: inputMinWidth,
|
|
58
|
-
hasError: hasError,
|
|
59
|
-
hasFocus: hasFocus,
|
|
60
|
-
inline: inline,
|
|
61
|
-
onClick: handleOnClick,
|
|
62
|
-
onMouseDown: handleOnMouseDown,
|
|
63
|
-
children: [!inline && /*#__PURE__*/jsxRuntime.jsx(styled.StyledSelection, {
|
|
64
|
-
ref: selectedOptionsRef,
|
|
65
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SELECTED_VALUES,
|
|
66
|
-
children: Array.isArray(selectedValues) ? _MultiSelectedValuesC || (_MultiSelectedValuesC = /*#__PURE__*/_jsx__default["default"](MultiSelectedValuesContainer.MultiSelectedValuesContainer, {})) : _SingleSelectedValueC || (_SingleSelectedValueC = /*#__PURE__*/_jsx__default["default"](SingleSelectedValueContainer.SingleSelectedValueContainer, {}))
|
|
67
|
-
}), _ControlsInput || (_ControlsInput = /*#__PURE__*/_jsx__default["default"](ControlsInput.ControlsInput, {})), !inline && (_StyledHeaderActionsW || (_StyledHeaderActionsW = /*#__PURE__*/_jsx__default["default"](styled.StyledHeaderActionsWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyleHeaderActionsSeparator, {}), /*#__PURE__*/_jsx__default["default"](DropdownIndicator, {}))))]
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
exports.Controls = Controls;
|
|
@@ -1,65 +0,0 @@
|
|
|
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 Grid = require('@elliemae/ds-grid');
|
|
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
|
-
const normalBorder = dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n border: 1px solid\n ", ";\n"])), props => {
|
|
17
|
-
if (props.hasError) {
|
|
18
|
-
return props.theme.colors.danger[900];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return props.theme.colors.neutral[400];
|
|
22
|
-
});
|
|
23
|
-
const focusBorder = dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n border: 2px solid ", ";\n"])), _ref => {
|
|
24
|
-
let {
|
|
25
|
-
theme
|
|
26
|
-
} = _ref;
|
|
27
|
-
return theme.colors.brand[700];
|
|
28
|
-
});
|
|
29
|
-
const StyledControlsWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
30
|
-
componentId: "sc-64uci7-0"
|
|
31
|
-
})(["background:transparent;position:relative;border-radius:2px;min-width:", ";align-items:center;align-content:center;height:28px;padding-left:8px;margin:", ";&::after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2px;", " pointer-events:none;z-index:7;}"], _ref2 => {
|
|
32
|
-
let {
|
|
33
|
-
minWidth,
|
|
34
|
-
inline
|
|
35
|
-
} = _ref2;
|
|
36
|
-
return inline ? '' : "".concat(minWidth, "px");
|
|
37
|
-
}, _ref3 => {
|
|
38
|
-
let {
|
|
39
|
-
inline
|
|
40
|
-
} = _ref3;
|
|
41
|
-
return inline ? '10px 16px' : 'none';
|
|
42
|
-
}, _ref4 => {
|
|
43
|
-
let {
|
|
44
|
-
hasFocus
|
|
45
|
-
} = _ref4;
|
|
46
|
-
return hasFocus ? focusBorder : normalBorder;
|
|
47
|
-
});
|
|
48
|
-
const StyledSelection = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
49
|
-
componentId: "sc-64uci7-1"
|
|
50
|
-
})(["font-size:13px;margin-right:3px;line-height:13px;display:flex;"]);
|
|
51
|
-
const StyledHeaderActionsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
52
|
-
componentId: "sc-64uci7-2"
|
|
53
|
-
})(["align-items:center;align-self:stretch;display:flex;box-sizing:border-box;height:28px;.em-ds-button--text:focus::after{border:none;}"]);
|
|
54
|
-
const StyleDropdownIndicator = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
55
|
-
componentId: "sc-64uci7-3"
|
|
56
|
-
})([""]);
|
|
57
|
-
const StyleHeaderActionsSeparator = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
58
|
-
componentId: "sc-64uci7-4"
|
|
59
|
-
})(["align-self:stretch;margin:4px 0px;width:1px;background-color:", ";"], props => props.theme.colors.neutral['500']);
|
|
60
|
-
|
|
61
|
-
exports.StyleDropdownIndicator = StyleDropdownIndicator;
|
|
62
|
-
exports.StyleHeaderActionsSeparator = StyleHeaderActionsSeparator;
|
|
63
|
-
exports.StyledControlsWrapper = StyledControlsWrapper;
|
|
64
|
-
exports.StyledHeaderActionsWrapper = StyledHeaderActionsWrapper;
|
|
65
|
-
exports.StyledSelection = StyledSelection;
|