@elliemae/ds-form 1.61.10 → 1.61.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Checkbox/DSCheckbox.js.map +1 -1
- package/cjs/Checkbox/defaultProps.js.map +1 -1
- package/cjs/Checkbox/elements/CheckMark.js.map +1 -1
- package/cjs/Checkbox/props.js.map +1 -1
- package/cjs/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/cjs/CheckboxGroup/defaultProps.js.map +1 -1
- package/cjs/CheckboxGroup/props.js.map +1 -1
- package/cjs/ComboBox/v1/DSComboBox.js.map +1 -1
- package/cjs/ComboBox/v1/components/AllOption.js.map +1 -1
- package/cjs/ComboBox/v1/components/ClearIndicator.js.map +1 -1
- package/cjs/ComboBox/v1/components/Control.js.map +1 -1
- package/cjs/ComboBox/v1/components/CustomOption.js.map +1 -1
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js.map +1 -1
- package/cjs/ComboBox/v1/components/DropdownIndicator.js.map +1 -1
- package/cjs/ComboBox/v1/components/MenuList.js.map +1 -1
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js.map +1 -1
- package/cjs/ComboBox/v1/components/MultiValueLabel.js.map +1 -1
- package/cjs/ComboBox/v1/components/MultiValueRemove.js.map +1 -1
- package/cjs/ComboBox/v1/components/SelectMenu.js.map +1 -1
- package/cjs/ComboBox/v1/components/SingleValueLabel.js.map +1 -1
- package/cjs/ComboBox/v1/components/ValueContainer.js.map +1 -1
- package/cjs/ComboBox/v1/components/calculateWidth.js.map +1 -1
- package/cjs/ComboBox/v1/components/getoptions.js.map +1 -1
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +3 -3
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js.map +1 -1
- package/cjs/ComboBox/v2/Combobox.js.map +1 -1
- package/cjs/ComboBox/v2/components/AllOption.js.map +1 -1
- package/cjs/ComboBox/v2/components/ClearIndicator.js.map +1 -1
- package/cjs/ComboBox/v2/components/Content.js.map +1 -1
- package/cjs/ComboBox/v2/components/Control.js.map +1 -1
- package/cjs/ComboBox/v2/components/CustomOption.js.map +1 -1
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js.map +1 -1
- package/cjs/ComboBox/v2/components/DropdownIndicator.js.map +1 -1
- package/cjs/ComboBox/v2/components/GroupHeading.js.map +1 -1
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js.map +1 -1
- package/cjs/ComboBox/v2/components/LoadingIndicator.js.map +1 -1
- package/cjs/ComboBox/v2/components/MenuList.js.map +1 -1
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js.map +1 -1
- package/cjs/ComboBox/v2/components/MultiValueLabel.js.map +1 -1
- package/cjs/ComboBox/v2/components/MultiValueRemove.js.map +1 -1
- package/cjs/ComboBox/v2/components/SelectMenu.js.map +1 -1
- package/cjs/ComboBox/v2/components/SingleValueLabel.js.map +1 -1
- package/cjs/ComboBox/v2/components/ValueContainer.js.map +1 -1
- package/cjs/ComboBox/v2/components/calculateWidth.js.map +1 -1
- package/cjs/ComboBox/v2/components/getoptions.js.map +1 -1
- package/cjs/ComboBox/v2/components/useMenuListHeight.js.map +1 -1
- package/cjs/ComboBox/v2/components/utils.js.map +1 -1
- package/cjs/ComboBox/v2/mockOptions.js.map +1 -1
- package/cjs/ComboBox/v3/ComboBox.js.map +1 -1
- package/cjs/ComboBox/v3/ComboBoxCTX.js.map +1 -1
- package/cjs/ComboBox/v3/ComboboxDataTestids.js.map +1 -1
- package/cjs/ComboBox/v3/config/constants.js.map +1 -1
- package/cjs/ComboBox/v3/config/useComboBox.js.map +1 -1
- package/cjs/ComboBox/v3/config/useGetPropsWithDefault.js.map +1 -1
- package/cjs/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js.map +1 -1
- package/cjs/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js.map +1 -1
- package/cjs/ComboBox/v3/parts/a11y-messages/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/container/Container.js.map +1 -1
- package/cjs/ComboBox/v3/parts/container/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/controls/Controls.js.map +1 -1
- package/cjs/ComboBox/v3/parts/controls/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js.map +1 -1
- package/cjs/ComboBox/v3/parts/controls-input/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js.map +1 -1
- package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js.map +1 -1
- package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/empty-state/index.js.map +1 -1
- package/cjs/ComboBox/v3/parts/empty-state/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js.map +1 -1
- package/cjs/ComboBox/v3/parts/header-list/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js.map +1 -1
- package/cjs/ComboBox/v3/parts/menu-list/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js.map +1 -1
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +1 -1
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/styled.js.map +1 -1
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js.map +1 -1
- package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js.map +1 -1
- package/cjs/ComboBox/v3/parts/single-selected-value-container/styled.js.map +1 -1
- package/cjs/ComboBox/v3/propTypes.js.map +1 -1
- package/cjs/ComboBox/v3/tests/utils.js.map +1 -1
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js.map +1 -1
- package/cjs/ComboBox/v3/utils/hooks/useOnWindowResize.js.map +1 -1
- package/cjs/ComboBox/v3/utils/listHelper.js.map +1 -1
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/cjs/DateInput/DSDateInput.js.map +1 -1
- package/cjs/DateInput/components/DateInputImpl.js.map +1 -1
- package/cjs/DateInput/components/DateInputs.js.map +1 -1
- package/cjs/DateInput/components/utils.js.map +1 -1
- package/cjs/DateInput/defaultProps.js.map +1 -1
- package/cjs/DateInput/props.js.map +1 -1
- package/cjs/DateInputV2/components/DSDateInput.js.map +1 -1
- package/cjs/DateInputV2/components/DateInputs.js.map +1 -1
- package/cjs/DateInputV2/components/helpers.js.map +1 -1
- package/cjs/DateInputV2/components/props.js.map +1 -1
- package/cjs/DateInputV2/components/propsTypes.js.map +1 -1
- package/cjs/DateInputV2/components/styled.js.map +1 -1
- package/cjs/DateInputV2/components/utils.js.map +1 -1
- package/cjs/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/cjs/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/cjs/FloatingLabelInput/getSvgPath.js.map +1 -1
- package/cjs/FormItem/DSFormItemLayout.js.map +1 -1
- package/cjs/FormItem/Error/DSError.js.map +1 -1
- package/cjs/FormItem/Feedback.js.map +1 -1
- package/cjs/FormItem/Label/DSLabel.js.map +1 -1
- package/cjs/FormItem/Suffix/Suffix.js.map +1 -1
- package/cjs/FormItem/ValidationFieldWrapper.js.map +1 -1
- package/cjs/FormItem/defaultProps.js.map +1 -1
- package/cjs/FormItem/props.js.map +1 -1
- package/cjs/FormItem/variants.js.map +1 -1
- package/cjs/Input/DSInput.js.map +1 -1
- package/cjs/Input/InputAddonWrapper.js.map +1 -1
- package/cjs/Input/InputImpl.js.map +1 -1
- package/cjs/InputGroup/AddonWrapper.js.map +1 -1
- package/cjs/InputGroup/DSInputGroup.js.map +1 -1
- package/cjs/InputGroup/defaultProps.js.map +1 -1
- package/cjs/InputGroup/props.js.map +1 -1
- package/cjs/InputMask/DSInputMask.js.map +1 -1
- package/cjs/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/cjs/InputMask/InputMaskContext.js.map +1 -1
- package/cjs/InputMask/MaskPipes.js.map +1 -1
- package/cjs/InputMask/MaskTypes.js.map +1 -1
- package/cjs/InputMask/addons/AutoCorrectedDatePipe.js.map +1 -1
- package/cjs/InputMask/defaultProps.js.map +1 -1
- package/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/cjs/InputMask/mask_types/index.js.map +1 -1
- package/cjs/InputMask/props.js.map +1 -1
- package/cjs/InputMask/utils/setCaretPosition.js.map +1 -1
- package/cjs/InputProtected/DSInputProtected.js.map +1 -1
- package/cjs/InputProtected/defaultProps.js.map +1 -1
- package/cjs/InputProtected/options.js.map +1 -1
- package/cjs/InputProtected/props.js.map +1 -1
- package/cjs/LargeInputText/DSLargeInputText.js.map +1 -1
- package/cjs/LargeInputText/defaultProps.js.map +1 -1
- package/cjs/LargeInputText/props.js.map +1 -1
- package/cjs/MenuItem/components/MenuItem/index.js.map +1 -1
- package/cjs/MenuItem/components/MenuItem/styled.js.map +1 -1
- package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js.map +1 -1
- package/cjs/MenuItem/components/MultiMenuItem/styled.js.map +1 -1
- package/cjs/MenuItem/components/Section/index.js.map +1 -1
- package/cjs/MenuItem/components/Section/props.js.map +1 -1
- package/cjs/MenuItem/components/Section/styled.js.map +1 -1
- package/cjs/MenuItem/components/Separator/index.js.map +1 -1
- package/cjs/MenuItem/components/Separator/styled.js.map +1 -1
- package/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js.map +1 -1
- package/cjs/MenuItem/components/SingleMenuItem/styled.js.map +1 -1
- package/cjs/MenuItem/components/SubmenuItem/index.js.map +1 -1
- package/cjs/MenuItem/components/SubmenuItem/styled.js.map +1 -1
- package/cjs/MenuItem/components/styled.js.map +1 -1
- package/cjs/MenuItem/props.js.map +1 -1
- package/cjs/Radio/Circle.js.map +1 -1
- package/cjs/Radio/DSRadio.js.map +1 -1
- package/cjs/RadioGroup/DSRadioGroup.js.map +1 -1
- package/cjs/RadioGroup/defaultProps.js.map +1 -1
- package/cjs/RadioGroup/props.js.map +1 -1
- package/cjs/RequiredMark/RequiredMark.js.map +1 -1
- package/cjs/SearchBox/DSSearchBox.js.map +1 -1
- package/cjs/SearchBox/NavSearchBox.js.map +1 -1
- package/cjs/SearchBox/SButton.js.map +1 -1
- package/cjs/SearchBox/SearchBoxToggle.js.map +1 -1
- package/cjs/SearchBox/defaultProps.js.map +1 -1
- package/cjs/SearchBox/props.js.map +1 -1
- package/cjs/SearchBox/styled.js.map +1 -1
- package/cjs/SearchBox/useSearch.js.map +1 -1
- package/cjs/SearchBox/withSearchable.js.map +1 -1
- package/cjs/TextBox/DSTextBox.js.map +1 -1
- package/cjs/TimeInput/DSTimeInput.js.map +1 -1
- package/cjs/TimeInput/TimeInputImpl.js.map +1 -1
- package/cjs/TimeInput/TimeInputs.js.map +1 -1
- package/cjs/Toggle/DSToggle.js.map +1 -1
- package/cjs/Toggle/DSToggleImpl.js.map +1 -1
- package/cjs/Toggle/DSToggleRender.js.map +1 -1
- package/cjs/Toggle/props.js.map +1 -1
- package/cjs/Toggle/toggleHelper.js.map +1 -1
- package/cjs/utils-f82fe290.js.map +1 -1
- package/esm/Checkbox/DSCheckbox.js.map +1 -1
- package/esm/Checkbox/defaultProps.js.map +1 -1
- package/esm/Checkbox/elements/CheckMark.js.map +1 -1
- package/esm/Checkbox/props.js.map +1 -1
- package/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/esm/CheckboxGroup/defaultProps.js.map +1 -1
- package/esm/CheckboxGroup/props.js.map +1 -1
- package/esm/ComboBox/v1/DSComboBox.js.map +1 -1
- package/esm/ComboBox/v1/components/AllOption.js.map +1 -1
- package/esm/ComboBox/v1/components/ClearIndicator.js.map +1 -1
- package/esm/ComboBox/v1/components/Control.js.map +1 -1
- package/esm/ComboBox/v1/components/CustomOption.js.map +1 -1
- package/esm/ComboBox/v1/components/CustomOptionMulti.js.map +1 -1
- package/esm/ComboBox/v1/components/DropdownIndicator.js.map +1 -1
- package/esm/ComboBox/v1/components/MenuList.js.map +1 -1
- package/esm/ComboBox/v1/components/MultiSelectHeader.js.map +1 -1
- package/esm/ComboBox/v1/components/MultiValueLabel.js.map +1 -1
- package/esm/ComboBox/v1/components/MultiValueRemove.js.map +1 -1
- package/esm/ComboBox/v1/components/SelectMenu.js.map +1 -1
- package/esm/ComboBox/v1/components/SingleValueLabel.js.map +1 -1
- package/esm/ComboBox/v1/components/ValueContainer.js.map +1 -1
- package/esm/ComboBox/v1/components/calculateWidth.js.map +1 -1
- package/esm/ComboBox/v1/components/getoptions.js.map +1 -1
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +3 -3
- package/esm/ComboBox/v1/withSelectStringValueConverter.js.map +1 -1
- package/esm/ComboBox/v2/Combobox.js.map +1 -1
- package/esm/ComboBox/v2/components/AllOption.js.map +1 -1
- package/esm/ComboBox/v2/components/ClearIndicator.js.map +1 -1
- package/esm/ComboBox/v2/components/Content.js.map +1 -1
- package/esm/ComboBox/v2/components/Control.js.map +1 -1
- package/esm/ComboBox/v2/components/CustomOption.js.map +1 -1
- package/esm/ComboBox/v2/components/CustomOptionMulti.js.map +1 -1
- package/esm/ComboBox/v2/components/DropdownIndicator.js.map +1 -1
- package/esm/ComboBox/v2/components/GroupHeading.js.map +1 -1
- package/esm/ComboBox/v2/components/IndicatorSeparator.js.map +1 -1
- package/esm/ComboBox/v2/components/LoadingIndicator.js.map +1 -1
- package/esm/ComboBox/v2/components/MenuList.js.map +1 -1
- package/esm/ComboBox/v2/components/MultiSelectHeader.js.map +1 -1
- package/esm/ComboBox/v2/components/MultiValueLabel.js.map +1 -1
- package/esm/ComboBox/v2/components/MultiValueRemove.js.map +1 -1
- package/esm/ComboBox/v2/components/SelectMenu.js.map +1 -1
- package/esm/ComboBox/v2/components/SingleValueLabel.js.map +1 -1
- package/esm/ComboBox/v2/components/ValueContainer.js.map +1 -1
- package/esm/ComboBox/v2/components/calculateWidth.js.map +1 -1
- package/esm/ComboBox/v2/components/getoptions.js.map +1 -1
- package/esm/ComboBox/v2/components/useMenuListHeight.js.map +1 -1
- package/esm/ComboBox/v2/components/utils.js.map +1 -1
- package/esm/ComboBox/v2/mockOptions.js.map +1 -1
- package/esm/ComboBox/v3/ComboBox.js.map +1 -1
- package/esm/ComboBox/v3/ComboBoxCTX.js.map +1 -1
- package/esm/ComboBox/v3/ComboboxDataTestids.js.map +1 -1
- package/esm/ComboBox/v3/config/constants.js.map +1 -1
- package/esm/ComboBox/v3/config/useComboBox.js.map +1 -1
- package/esm/ComboBox/v3/config/useGetPropsWithDefault.js.map +1 -1
- package/esm/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js.map +1 -1
- package/esm/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js.map +1 -1
- package/esm/ComboBox/v3/parts/a11y-messages/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/container/Container.js.map +1 -1
- package/esm/ComboBox/v3/parts/container/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/controls/Controls.js.map +1 -1
- package/esm/ComboBox/v3/parts/controls/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js.map +1 -1
- package/esm/ComboBox/v3/parts/controls-input/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js.map +1 -1
- package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js.map +1 -1
- package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/empty-state/index.js.map +1 -1
- package/esm/ComboBox/v3/parts/empty-state/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js.map +1 -1
- package/esm/ComboBox/v3/parts/header-list/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js.map +1 -1
- package/esm/ComboBox/v3/parts/menu-list/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js.map +1 -1
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map +1 -1
- package/esm/ComboBox/v3/parts/multi-selected-values-container/styled.js.map +1 -1
- package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js.map +1 -1
- package/esm/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js.map +1 -1
- package/esm/ComboBox/v3/parts/single-selected-value-container/styled.js.map +1 -1
- package/esm/ComboBox/v3/propTypes.js.map +1 -1
- package/esm/ComboBox/v3/tests/utils.js.map +1 -1
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js.map +1 -1
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js.map +1 -1
- package/esm/ComboBox/v3/utils/hooks/useOnWindowResize.js.map +1 -1
- package/esm/ComboBox/v3/utils/listHelper.js.map +1 -1
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/esm/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/esm/DateInput/DSDateInput.js.map +1 -1
- package/esm/DateInput/components/DateInputImpl.js.map +1 -1
- package/esm/DateInput/components/DateInputs.js.map +1 -1
- package/esm/DateInput/components/utils.js.map +1 -1
- package/esm/DateInput/defaultProps.js.map +1 -1
- package/esm/DateInput/props.js.map +1 -1
- package/esm/DateInputV2/components/DSDateInput.js.map +1 -1
- package/esm/DateInputV2/components/DateInputs.js.map +1 -1
- package/esm/DateInputV2/components/helpers.js.map +1 -1
- package/esm/DateInputV2/components/props.js.map +1 -1
- package/esm/DateInputV2/components/propsTypes.js.map +1 -1
- package/esm/DateInputV2/components/styled.js.map +1 -1
- package/esm/DateInputV2/components/utils.js.map +1 -1
- package/esm/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/esm/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/esm/FloatingLabelInput/getSvgPath.js.map +1 -1
- package/esm/FormItem/DSFormItemLayout.js.map +1 -1
- package/esm/FormItem/Error/DSError.js.map +1 -1
- package/esm/FormItem/Feedback.js.map +1 -1
- package/esm/FormItem/Label/DSLabel.js.map +1 -1
- package/esm/FormItem/Suffix/Suffix.js.map +1 -1
- package/esm/FormItem/ValidationFieldWrapper.js.map +1 -1
- package/esm/FormItem/defaultProps.js.map +1 -1
- package/esm/FormItem/props.js.map +1 -1
- package/esm/FormItem/variants.js.map +1 -1
- package/esm/Input/DSInput.js.map +1 -1
- package/esm/Input/InputAddonWrapper.js.map +1 -1
- package/esm/Input/InputImpl.js.map +1 -1
- package/esm/InputGroup/AddonWrapper.js.map +1 -1
- package/esm/InputGroup/DSInputGroup.js.map +1 -1
- package/esm/InputGroup/defaultProps.js.map +1 -1
- package/esm/InputGroup/props.js.map +1 -1
- package/esm/InputMask/DSInputMask.js.map +1 -1
- package/esm/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/esm/InputMask/InputMaskContext.js.map +1 -1
- package/esm/InputMask/MaskPipes.js.map +1 -1
- package/esm/InputMask/MaskTypes.js.map +1 -1
- package/esm/InputMask/addons/AutoCorrectedDatePipe.js.map +1 -1
- package/esm/InputMask/defaultProps.js.map +1 -1
- package/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/esm/InputMask/mask_types/index.js.map +1 -1
- package/esm/InputMask/props.js.map +1 -1
- package/esm/InputMask/utils/setCaretPosition.js.map +1 -1
- package/esm/InputProtected/DSInputProtected.js.map +1 -1
- package/esm/InputProtected/defaultProps.js.map +1 -1
- package/esm/InputProtected/options.js.map +1 -1
- package/esm/InputProtected/props.js.map +1 -1
- package/esm/LargeInputText/DSLargeInputText.js.map +1 -1
- package/esm/LargeInputText/defaultProps.js.map +1 -1
- package/esm/LargeInputText/props.js.map +1 -1
- package/esm/MenuItem/components/MenuItem/index.js.map +1 -1
- package/esm/MenuItem/components/MenuItem/styled.js.map +1 -1
- package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js.map +1 -1
- package/esm/MenuItem/components/MultiMenuItem/styled.js.map +1 -1
- package/esm/MenuItem/components/Section/index.js.map +1 -1
- package/esm/MenuItem/components/Section/props.js.map +1 -1
- package/esm/MenuItem/components/Section/styled.js.map +1 -1
- package/esm/MenuItem/components/Separator/index.js.map +1 -1
- package/esm/MenuItem/components/Separator/styled.js.map +1 -1
- package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js.map +1 -1
- package/esm/MenuItem/components/SingleMenuItem/styled.js.map +1 -1
- package/esm/MenuItem/components/SubmenuItem/index.js.map +1 -1
- package/esm/MenuItem/components/SubmenuItem/styled.js.map +1 -1
- package/esm/MenuItem/components/styled.js.map +1 -1
- package/esm/MenuItem/props.js.map +1 -1
- package/esm/Radio/Circle.js.map +1 -1
- package/esm/Radio/DSRadio.js.map +1 -1
- package/esm/RadioGroup/DSRadioGroup.js.map +1 -1
- package/esm/RadioGroup/defaultProps.js.map +1 -1
- package/esm/RadioGroup/props.js.map +1 -1
- package/esm/RequiredMark/RequiredMark.js.map +1 -1
- package/esm/SearchBox/DSSearchBox.js.map +1 -1
- package/esm/SearchBox/NavSearchBox.js.map +1 -1
- package/esm/SearchBox/SButton.js.map +1 -1
- package/esm/SearchBox/SearchBoxToggle.js.map +1 -1
- package/esm/SearchBox/defaultProps.js.map +1 -1
- package/esm/SearchBox/props.js.map +1 -1
- package/esm/SearchBox/styled.js.map +1 -1
- package/esm/SearchBox/useSearch.js.map +1 -1
- package/esm/SearchBox/withSearchable.js.map +1 -1
- package/esm/TextBox/DSTextBox.js.map +1 -1
- package/esm/TimeInput/DSTimeInput.js.map +1 -1
- package/esm/TimeInput/TimeInputImpl.js.map +1 -1
- package/esm/TimeInput/TimeInputs.js.map +1 -1
- package/esm/Toggle/DSToggle.js.map +1 -1
- package/esm/Toggle/DSToggleImpl.js.map +1 -1
- package/esm/Toggle/DSToggleRender.js.map +1 -1
- package/esm/Toggle/props.js.map +1 -1
- package/esm/Toggle/toggleHelper.js.map +1 -1
- package/esm/utils-ced363ec.js.map +1 -1
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockOptions.js","sources":["../../../../src/ComboBox/v2/mockOptions.tsx"],"sourcesContent":["const options = [\n {\n value: 'id_1',\n label: 'Luke Skywalker',\n },\n {\n value: 'id_2',\n label: 'Obi-Wan Kenobi',\n },\n {\n value: 'id_3',\n label: 'Padme Amidala',\n },\n {\n value: 'id_4',\n label: 'Han Solo',\n },\n {\n value: 'id_5',\n label: 'Anakin Skywalker',\n },\n];\n\nexport default options;\n"],"names":["options","value","label"],"mappings":";;IAAMA,OAAO,GAAG,CACd;
|
|
1
|
+
{"version":3,"file":"mockOptions.js","sources":["../../../../src/ComboBox/v2/mockOptions.tsx"],"sourcesContent":["const options = [\n {\n value: 'id_1',\n label: 'Luke Skywalker',\n },\n {\n value: 'id_2',\n label: 'Obi-Wan Kenobi',\n },\n {\n value: 'id_3',\n label: 'Padme Amidala',\n },\n {\n value: 'id_4',\n label: 'Han Solo',\n },\n {\n value: 'id_5',\n label: 'Anakin Skywalker',\n },\n];\n\nexport default options;\n"],"names":["options","value","label"],"mappings":";;IAAMA,OAAO,GAAG,CACd;EACEC,KAAK,EAAE,MADT;EAEEC,KAAK,EAAE;AAFT,CADc,EAKd;EACED,KAAK,EAAE,MADT;EAEEC,KAAK,EAAE;AAFT,CALc,EASd;EACED,KAAK,EAAE,MADT;EAEEC,KAAK,EAAE;AAFT,CATc,EAad;EACED,KAAK,EAAE,MADT;EAEEC,KAAK,EAAE;AAFT,CAbc,EAiBd;EACED,KAAK,EAAE,MADT;EAEEC,KAAK,EAAE;AAFT,CAjBc;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../src/ComboBox/v3/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { useComboBox } from './config/useComboBox';\nimport { Container } from './parts/container';\nimport { propTypes } from './propTypes';\nimport { ComboBoxContext, defaultProps } from './ComboBoxCTX';\nimport type { ComboBoxPropsT } from './index.d';\n\nconst DSComboBox = (props: ComboBoxPropsT): JSX.Element => {\n // if we detect wrong props configuration we throw meaningful errors\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, DSComboBoxWithSchema.toTypescript());\n const ctx = useComboBox(props);\n return (\n <ComboBoxContext.Provider value={ctx}>\n <Container />\n </ComboBoxContext.Provider>\n );\n};\nDSComboBox.propTypes = propTypes;\nconst DSComboBoxWithSchema = describe(DSComboBox);\nDSComboBoxWithSchema.propTypes = propTypes;\n\nexport { DSComboBox, DSComboBoxWithSchema };\n"],"names":["DSComboBox","props","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","useValidateTypescriptPropTypes","DSComboBoxWithSchema","toTypescript","ctx","useComboBox","React","ComboBoxContext","Container","propTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAwC
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../src/ComboBox/v3/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { useComboBox } from './config/useComboBox';\nimport { Container } from './parts/container';\nimport { propTypes } from './propTypes';\nimport { ComboBoxContext, defaultProps } from './ComboBoxCTX';\nimport type { ComboBoxPropsT } from './index.d';\n\nconst DSComboBox = (props: ComboBoxPropsT): JSX.Element => {\n // if we detect wrong props configuration we throw meaningful errors\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, DSComboBoxWithSchema.toTypescript());\n const ctx = useComboBox(props);\n return (\n <ComboBoxContext.Provider value={ctx}>\n <Container />\n </ComboBoxContext.Provider>\n );\n};\nDSComboBox.propTypes = propTypes;\nconst DSComboBoxWithSchema = describe(DSComboBox);\nDSComboBoxWithSchema.propTypes = propTypes;\n\nexport { DSComboBox, DSComboBoxWithSchema };\n"],"names":["DSComboBox","props","propsWithDefault","useMemoMergePropsWithDefault","defaultProps","useValidateTypescriptPropTypes","DSComboBoxWithSchema","toTypescript","ctx","useComboBox","React","ComboBoxContext","Container","propTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAwC;;EAEzD,IAAMC,gBAAgB,GAAGC,2CAA4B,CAACF,KAAD,EAAQG,oCAAR,CAArD;EAEAC,6CAA8B,CAACH,gBAAD,EAAmBI,oBAAoB,CAACC,YAArB,EAAnB,CAA9B;EACA,IAAMC,GAAG,GAAGC,0CAAW,CAACR,KAAD,CAAvB;EACA,oBACES,wCAACC,uCAAD,CAAiB,QAAjB;IAA0B,KAAK,EAAEH;kBAC/BE,wCAACE,+CAAD,OADF,CADF;AAKD;;AACDZ,UAAU,CAACa,SAAX,GAAuBA,+BAAvB;IACMP,oBAAoB,GAAGQ,kBAAQ,CAACd,UAAD;AACrCM,oBAAoB,CAACO,SAArB,GAAiCA,+BAAjC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxCTX.js","sources":["../../../../src/ComboBox/v3/ComboBoxCTX.tsx"],"sourcesContent":["import { createContext, createRef } from 'react';\nimport { ComboBoxPropsT, ComboBoxContextT } from './index.d';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nexport const defaultProps: ComboBoxPropsT = {\n placeholder: '',\n options: [],\n selectedValues: null,\n onChange: noop,\n onClear: noop,\n hasError: false,\n inline: false,\n autoFocus: false,\n onClearAll: undefined,\n onSelectAll: undefined,\n onCreate: undefined,\n onFilter: noop,\n};\nconst defaultContext = {\n props: defaultProps,\n showPopover: false,\n setShowPopover: noop,\n scrollOptionIntoView: noop,\n referenceElement: undefined,\n hasFocus: false,\n setHasFocus: noop,\n setReferenceElement: noop,\n inputRef: createRef<HTMLInputElement>(),\n listRef: createRef<HTMLDivElement>(),\n controlsWrapperRef: createRef<HTMLInputElement>(),\n selectedOptionsRef: createRef<HTMLInputElement>(),\n showSelectedValue: false,\n setShowSelectedValue: noop,\n focusOptionIdx: '',\n setCurrentOption: noop,\n};\n/** Context for cross component communication */\nexport const ComboBoxContext = createContext<ComboBoxContextT>(defaultContext);\n\nexport default ComboBoxContext;\n"],"names":["noop","defaultProps","placeholder","options","selectedValues","onChange","onClear","hasError","inline","autoFocus","onClearAll","undefined","onSelectAll","onCreate","onFilter","defaultContext","props","showPopover","setShowPopover","scrollOptionIntoView","referenceElement","hasFocus","setHasFocus","setReferenceElement","inputRef","createRef","listRef","controlsWrapperRef","selectedOptionsRef","showSelectedValue","setShowSelectedValue","focusOptionIdx","setCurrentOption","ComboBoxContext","createContext"],"mappings":";;;;;;AAEA;AACA,IAAMA,IAAI,GAAG,SAAPA,IAAO,GAAY,EAAzB;;IAEaC,YAA4B,GAAG;
|
|
1
|
+
{"version":3,"file":"ComboBoxCTX.js","sources":["../../../../src/ComboBox/v3/ComboBoxCTX.tsx"],"sourcesContent":["import { createContext, createRef } from 'react';\nimport { ComboBoxPropsT, ComboBoxContextT } from './index.d';\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nexport const defaultProps: ComboBoxPropsT = {\n placeholder: '',\n options: [],\n selectedValues: null,\n onChange: noop,\n onClear: noop,\n hasError: false,\n inline: false,\n autoFocus: false,\n onClearAll: undefined,\n onSelectAll: undefined,\n onCreate: undefined,\n onFilter: noop,\n};\nconst defaultContext = {\n props: defaultProps,\n showPopover: false,\n setShowPopover: noop,\n scrollOptionIntoView: noop,\n referenceElement: undefined,\n hasFocus: false,\n setHasFocus: noop,\n setReferenceElement: noop,\n inputRef: createRef<HTMLInputElement>(),\n listRef: createRef<HTMLDivElement>(),\n controlsWrapperRef: createRef<HTMLInputElement>(),\n selectedOptionsRef: createRef<HTMLInputElement>(),\n showSelectedValue: false,\n setShowSelectedValue: noop,\n focusOptionIdx: '',\n setCurrentOption: noop,\n};\n/** Context for cross component communication */\nexport const ComboBoxContext = createContext<ComboBoxContextT>(defaultContext);\n\nexport default ComboBoxContext;\n"],"names":["noop","defaultProps","placeholder","options","selectedValues","onChange","onClear","hasError","inline","autoFocus","onClearAll","undefined","onSelectAll","onCreate","onFilter","defaultContext","props","showPopover","setShowPopover","scrollOptionIntoView","referenceElement","hasFocus","setHasFocus","setReferenceElement","inputRef","createRef","listRef","controlsWrapperRef","selectedOptionsRef","showSelectedValue","setShowSelectedValue","focusOptionIdx","setCurrentOption","ComboBoxContext","createContext"],"mappings":";;;;;;AAEA;AACA,IAAMA,IAAI,GAAG,SAAPA,IAAO,GAAY,EAAzB;;IAEaC,YAA4B,GAAG;EAC1CC,WAAW,EAAE,EAD6B;EAE1CC,OAAO,EAAE,EAFiC;EAG1CC,cAAc,EAAE,IAH0B;EAI1CC,QAAQ,EAAEL,IAJgC;EAK1CM,OAAO,EAAEN,IALiC;EAM1CO,QAAQ,EAAE,KANgC;EAO1CC,MAAM,EAAE,KAPkC;EAQ1CC,SAAS,EAAE,KAR+B;EAS1CC,UAAU,EAAEC,SAT8B;EAU1CC,WAAW,EAAED,SAV6B;EAW1CE,QAAQ,EAAEF,SAXgC;EAY1CG,QAAQ,EAAEd;AAZgC;AAc5C,IAAMe,cAAc,GAAG;EACrBC,KAAK,EAAEf,YADc;EAErBgB,WAAW,EAAE,KAFQ;EAGrBC,cAAc,EAAElB,IAHK;EAIrBmB,oBAAoB,EAAEnB,IAJD;EAKrBoB,gBAAgB,EAAET,SALG;EAMrBU,QAAQ,EAAE,KANW;EAOrBC,WAAW,EAAEtB,IAPQ;EAQrBuB,mBAAmB,EAAEvB,IARA;EASrBwB,QAAQ,eAAEC,eAAS,EATE;EAUrBC,OAAO,eAAED,eAAS,EAVG;EAWrBE,kBAAkB,eAAEF,eAAS,EAXR;EAYrBG,kBAAkB,eAAEH,eAAS,EAZR;EAarBI,iBAAiB,EAAE,KAbE;EAcrBC,oBAAoB,EAAE9B,IAdD;EAerB+B,cAAc,EAAE,EAfK;EAgBrBC,gBAAgB,EAAEhC;AAhBG,CAAvB;AAkBA;;IACaiC,eAAe,gBAAGC,mBAAa,CAAmBnB,cAAnB;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxDataTestids.js","sources":["../../../../src/ComboBox/v3/ComboboxDataTestids.tsx"],"sourcesContent":["export const ComboboxDataTestid = {\n INPUT: 'combobox-input',\n LIST: 'combobox-menu-list',\n SELECTED_VALUES: 'combobox-selected-values',\n SELECT_ALL_BUTTON: 'combobox-all-btn',\n CLEAR_ALL_BUTTON: 'combobox-clear-btn',\n DROPDOWN: 'combobox-dropdown-btn',\n OPTION: 'combobox-option',\n};\n"],"names":["ComboboxDataTestid","INPUT","LIST","SELECTED_VALUES","SELECT_ALL_BUTTON","CLEAR_ALL_BUTTON","DROPDOWN","OPTION"],"mappings":";;;;IAAaA,kBAAkB,GAAG;
|
|
1
|
+
{"version":3,"file":"ComboboxDataTestids.js","sources":["../../../../src/ComboBox/v3/ComboboxDataTestids.tsx"],"sourcesContent":["export const ComboboxDataTestid = {\n INPUT: 'combobox-input',\n LIST: 'combobox-menu-list',\n SELECTED_VALUES: 'combobox-selected-values',\n SELECT_ALL_BUTTON: 'combobox-all-btn',\n CLEAR_ALL_BUTTON: 'combobox-clear-btn',\n DROPDOWN: 'combobox-dropdown-btn',\n OPTION: 'combobox-option',\n};\n"],"names":["ComboboxDataTestid","INPUT","LIST","SELECTED_VALUES","SELECT_ALL_BUTTON","CLEAR_ALL_BUTTON","DROPDOWN","OPTION"],"mappings":";;;;IAAaA,kBAAkB,GAAG;EAChCC,KAAK,EAAE,gBADyB;EAEhCC,IAAI,EAAE,oBAF0B;EAGhCC,eAAe,EAAE,0BAHe;EAIhCC,iBAAiB,EAAE,kBAJa;EAKhCC,gBAAgB,EAAE,oBALc;EAMhCC,QAAQ,EAAE,uBANsB;EAOhCC,MAAM,EAAE;AAPwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../src/ComboBox/v3/config/constants.tsx"],"sourcesContent":["export const DATA_TESTID = {\n COMBOBOX_MENU_LIST: 'combobox-menu-list',\n COMBOBOX_CLEAR_BTN: 'combobox-clear-btn',\n COMBOBOX_ALL_BTN: 'combobox-all-btn',\n COMBOBOX_DROPDOWN_BTN: 'combobox-dropdown-btn',\n COMBOBOX_OPTION: 'combobox-option',\n COMBOBOX: 'combobox',\n};\n"],"names":["DATA_TESTID","COMBOBOX_MENU_LIST","COMBOBOX_CLEAR_BTN","COMBOBOX_ALL_BTN","COMBOBOX_DROPDOWN_BTN","COMBOBOX_OPTION","COMBOBOX"],"mappings":";;;;IAAaA,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/ComboBox/v3/config/constants.tsx"],"sourcesContent":["export const DATA_TESTID = {\n COMBOBOX_MENU_LIST: 'combobox-menu-list',\n COMBOBOX_CLEAR_BTN: 'combobox-clear-btn',\n COMBOBOX_ALL_BTN: 'combobox-all-btn',\n COMBOBOX_DROPDOWN_BTN: 'combobox-dropdown-btn',\n COMBOBOX_OPTION: 'combobox-option',\n COMBOBOX: 'combobox',\n};\n"],"names":["DATA_TESTID","COMBOBOX_MENU_LIST","COMBOBOX_CLEAR_BTN","COMBOBOX_ALL_BTN","COMBOBOX_DROPDOWN_BTN","COMBOBOX_OPTION","COMBOBOX"],"mappings":";;;;IAAaA,WAAW,GAAG;EACzBC,kBAAkB,EAAE,oBADK;EAEzBC,kBAAkB,EAAE,oBAFK;EAGzBC,gBAAgB,EAAE,kBAHO;EAIzBC,qBAAqB,EAAE,uBAJE;EAKzBC,eAAe,EAAE,iBALQ;EAMzBC,QAAQ,EAAE;AANe;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComboBox.js","sources":["../../../../../src/ComboBox/v3/config/useComboBox.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState, useRef, useEffect, useCallback } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { useGetComboBoxWithDefaultsProps } from './useGetPropsWithDefault';\nimport type { ComboBoxPropsT, ComboBoxContextT } from '../index.d';\n\nexport const useComboBox = (props: Partial<ComboBoxPropsT>): ComboBoxContextT => {\n const [showPopover, setShowPopover] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement>();\n const [showSelectedValue, setShowSelectedValue] = useState<boolean>(false);\n const [hasFocus, setHasFocus] = useState<boolean>(false);\n const [focusOptionIdx, setCurrentOption] = useState<string>('');\n const inputRef = useRef<HTMLInputElement>();\n const listRef = useRef<HTMLDivElement>();\n const selectedOptionsRef = useRef<HTMLDivElement>();\n const controlsWrapperRef = useRef<HTMLDivElement>();\n const propsWithDefaults = useGetComboBoxWithDefaultsProps(props);\n const { options } = propsWithDefaults;\n\n // ---------------------------------------------------------------------------\n // Focusing first option when dropdown opens or input changes\n // ---------------------------------------------------------------------------\n useEffect(() => {\n if (showPopover) {\n for (let i = 0; i < options.length; i += 1)\n if (!['section', 'separator'].includes(options[i].type)) {\n setCurrentOption(options[i].dsId);\n break;\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showPopover, inputRef.current?.value]);\n // ===========================================================================\n // Virtualization setup\n // ===========================================================================\n const virtualListHelpers = useVirtual({\n size: propsWithDefaults.options.length,\n parentRef: listRef,\n overscan: 15,\n paddingStart: 0,\n });\n\n // ===========================================================================\n // Scroll into view function\n // ===========================================================================\n const scrollOptionIntoView = useCallback(\n (dsId: string, opts = { align: 'center' }) => {\n virtualListHelpers.scrollToIndex(\n propsWithDefaults.options.findIndex((opt) => opt.dsId === dsId),\n opts,\n );\n },\n [propsWithDefaults.options, virtualListHelpers],\n );\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefaults,\n virtualListHelpers,\n showPopover,\n referenceElement,\n inputRef,\n showSelectedValue,\n listRef,\n focusOptionIdx,\n selectedOptionsRef,\n controlsWrapperRef,\n hasFocus,\n setHasFocus,\n setCurrentOption,\n scrollOptionIntoView,\n setShowSelectedValue,\n setReferenceElement,\n setShowPopover,\n }),\n [\n scrollOptionIntoView,\n propsWithDefaults,\n virtualListHelpers,\n focusOptionIdx,\n showSelectedValue,\n showPopover,\n referenceElement,\n inputRef,\n selectedOptionsRef,\n controlsWrapperRef,\n hasFocus,\n listRef,\n ],\n );\n\n return ctx;\n};\n"],"names":["useComboBox","props","useState","showPopover","setShowPopover","referenceElement","setReferenceElement","showSelectedValue","setShowSelectedValue","hasFocus","setHasFocus","focusOptionIdx","setCurrentOption","inputRef","useRef","listRef","selectedOptionsRef","controlsWrapperRef","propsWithDefaults","useGetComboBoxWithDefaultsProps","options","useEffect","i","length","includes","type","dsId","current","value","virtualListHelpers","useVirtual","size","parentRef","overscan","paddingStart","scrollOptionIntoView","useCallback","opts","align","scrollToIndex","findIndex","opt","ctx","useMemo"],"mappings":";;;;;;;;;;;;;;;IASaA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAsD;
|
|
1
|
+
{"version":3,"file":"useComboBox.js","sources":["../../../../../src/ComboBox/v3/config/useComboBox.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState, useRef, useEffect, useCallback } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { useGetComboBoxWithDefaultsProps } from './useGetPropsWithDefault';\nimport type { ComboBoxPropsT, ComboBoxContextT } from '../index.d';\n\nexport const useComboBox = (props: Partial<ComboBoxPropsT>): ComboBoxContextT => {\n const [showPopover, setShowPopover] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement>();\n const [showSelectedValue, setShowSelectedValue] = useState<boolean>(false);\n const [hasFocus, setHasFocus] = useState<boolean>(false);\n const [focusOptionIdx, setCurrentOption] = useState<string>('');\n const inputRef = useRef<HTMLInputElement>();\n const listRef = useRef<HTMLDivElement>();\n const selectedOptionsRef = useRef<HTMLDivElement>();\n const controlsWrapperRef = useRef<HTMLDivElement>();\n const propsWithDefaults = useGetComboBoxWithDefaultsProps(props);\n const { options } = propsWithDefaults;\n\n // ---------------------------------------------------------------------------\n // Focusing first option when dropdown opens or input changes\n // ---------------------------------------------------------------------------\n useEffect(() => {\n if (showPopover) {\n for (let i = 0; i < options.length; i += 1)\n if (!['section', 'separator'].includes(options[i].type)) {\n setCurrentOption(options[i].dsId);\n break;\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showPopover, inputRef.current?.value]);\n // ===========================================================================\n // Virtualization setup\n // ===========================================================================\n const virtualListHelpers = useVirtual({\n size: propsWithDefaults.options.length,\n parentRef: listRef,\n overscan: 15,\n paddingStart: 0,\n });\n\n // ===========================================================================\n // Scroll into view function\n // ===========================================================================\n const scrollOptionIntoView = useCallback(\n (dsId: string, opts = { align: 'center' }) => {\n virtualListHelpers.scrollToIndex(\n propsWithDefaults.options.findIndex((opt) => opt.dsId === dsId),\n opts,\n );\n },\n [propsWithDefaults.options, virtualListHelpers],\n );\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefaults,\n virtualListHelpers,\n showPopover,\n referenceElement,\n inputRef,\n showSelectedValue,\n listRef,\n focusOptionIdx,\n selectedOptionsRef,\n controlsWrapperRef,\n hasFocus,\n setHasFocus,\n setCurrentOption,\n scrollOptionIntoView,\n setShowSelectedValue,\n setReferenceElement,\n setShowPopover,\n }),\n [\n scrollOptionIntoView,\n propsWithDefaults,\n virtualListHelpers,\n focusOptionIdx,\n showSelectedValue,\n showPopover,\n referenceElement,\n inputRef,\n selectedOptionsRef,\n controlsWrapperRef,\n hasFocus,\n listRef,\n ],\n );\n\n return ctx;\n};\n"],"names":["useComboBox","props","useState","showPopover","setShowPopover","referenceElement","setReferenceElement","showSelectedValue","setShowSelectedValue","hasFocus","setHasFocus","focusOptionIdx","setCurrentOption","inputRef","useRef","listRef","selectedOptionsRef","controlsWrapperRef","propsWithDefaults","useGetComboBoxWithDefaultsProps","options","useEffect","i","length","includes","type","dsId","current","value","virtualListHelpers","useVirtual","size","parentRef","overscan","paddingStart","scrollOptionIntoView","useCallback","opts","align","scrollToIndex","findIndex","opt","ctx","useMemo"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetPropsWithDefault.js","sources":["../../../../../src/ComboBox/v3/config/useGetPropsWithDefault.tsx"],"sourcesContent":["import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { defaultProps } from '../ComboBoxCTX';\nimport { ComboBoxPropsT } from '../index.d';\n// we have to merge the \"default\" nested default values with what the user gives us...\nexport const useGetComboBoxWithDefaultsProps = (props: Partial<ComboBoxPropsT>): ComboBoxPropsT =>\n useMemoMergePropsWithDefault(props, defaultProps);\n"],"names":["useGetComboBoxWithDefaultsProps","props","useMemoMergePropsWithDefault","defaultProps"],"mappings":";;;;;;;;AAGA;IACaA,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,KAAD;
|
|
1
|
+
{"version":3,"file":"useGetPropsWithDefault.js","sources":["../../../../../src/ComboBox/v3/config/useGetPropsWithDefault.tsx"],"sourcesContent":["import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { defaultProps } from '../ComboBoxCTX';\nimport { ComboBoxPropsT } from '../index.d';\n// we have to merge the \"default\" nested default values with what the user gives us...\nexport const useGetComboBoxWithDefaultsProps = (props: Partial<ComboBoxPropsT>): ComboBoxPropsT =>\n useMemoMergePropsWithDefault(props, defaultProps);\n"],"names":["useGetComboBoxWithDefaultsProps","props","useMemoMergePropsWithDefault","defaultProps"],"mappings":";;;;;;;;AAGA;IACaA,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,KAAD;EAAA,OAC7CC,2CAA4B,CAACD,KAAD,EAAQE,oCAAR,CADiB;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiAllyMessages.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { getSelectableOptions } from '../../utils/listHelper';\nimport { StyledA11ySelectedValues } from './styled';\nconst MultiAllyMessages = (): JSX.Element => {\n const {\n props: { options, selectedValues },\n } = useContext(ComboBoxContext);\n const selectableOptions = getSelectableOptions(options);\n\n const multipleSelectedValues = selectedValues as CBOptionT[];\n return (\n <StyledA11ySelectedValues aria-live=\"polite\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {`Options selected: ${multipleSelectedValues.map((item) => item.label).join(', ')}. ${\n multipleSelectedValues.length\n } of ${selectableOptions.length}`}\n </StyledA11ySelectedValues>\n );\n};\n\nexport { MultiAllyMessages };\n"],"names":["MultiAllyMessages","useContext","ComboBoxContext","props","options","selectedValues","selectableOptions","getSelectableOptions","multipleSelectedValues","React","StyledA11ySelectedValues","map","item","label","join","length"],"mappings":";;;;;;;;;;;;;;IAKMA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;
|
|
1
|
+
{"version":3,"file":"MultiAllyMessages.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { getSelectableOptions } from '../../utils/listHelper';\nimport { StyledA11ySelectedValues } from './styled';\nconst MultiAllyMessages = (): JSX.Element => {\n const {\n props: { options, selectedValues },\n } = useContext(ComboBoxContext);\n const selectableOptions = getSelectableOptions(options);\n\n const multipleSelectedValues = selectedValues as CBOptionT[];\n return (\n <StyledA11ySelectedValues aria-live=\"polite\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {`Options selected: ${multipleSelectedValues.map((item) => item.label).join(', ')}. ${\n multipleSelectedValues.length\n } of ${selectableOptions.length}`}\n </StyledA11ySelectedValues>\n );\n};\n\nexport { MultiAllyMessages };\n"],"names":["MultiAllyMessages","useContext","ComboBoxContext","props","options","selectedValues","selectableOptions","getSelectableOptions","multipleSelectedValues","React","StyledA11ySelectedValues","map","item","label","join","length"],"mappings":";;;;;;;;;;;;;;IAKMA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;EAC3C,kBAEIC,gBAAU,CAACC,uCAAD,CAFd;sCACEC,KADF;MACWC,OADX,qBACWA,OADX;MACoBC,cADpB,qBACoBA,cADpB;;EAGA,IAAMC,iBAAiB,GAAGC,iDAAoB,CAACH,OAAD,CAA9C;EAEA,IAAMI,sBAAsB,GAAGH,cAA/B;EACA,oBACEI,wCAACC,8DAAD;IAA0B,aAAU,QAApC;IAA6C,eAAY,OAAzD;IAAiE,iBAAc;iCACvDF,sBAAsB,CAACG,GAAvB,CAA2B,UAACC,IAAD;IAAA,OAAUA,IAAI,CAACC,KAAf;GAA3B,EAAiDC,IAAjD,CAAsD,IAAtD,CADxB,eAEIN,sBAAsB,CAACO,MAF3B,iBAGST,iBAAiB,CAACS,MAH3B,EADF;AAOD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleAllyMessages.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledA11ySelectedValues } from './styled';\nconst SingleAllyMessages = (): JSX.Element => {\n const {\n props: { selectedValues },\n } = useContext(ComboBoxContext);\n\n const singleSelectedValue = selectedValues as CBOptionT;\n return (\n <StyledA11ySelectedValues aria-live=\"polite\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {`Option selected: ${singleSelectedValue.label}.`}\n </StyledA11ySelectedValues>\n );\n};\n\nexport { SingleAllyMessages };\n"],"names":["SingleAllyMessages","useContext","ComboBoxContext","selectedValues","props","singleSelectedValue","React","StyledA11ySelectedValues","label"],"mappings":";;;;;;;;;;;;;IAIMA,kBAAkB,GAAG,SAArBA,kBAAqB,GAAmB;
|
|
1
|
+
{"version":3,"file":"SingleAllyMessages.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledA11ySelectedValues } from './styled';\nconst SingleAllyMessages = (): JSX.Element => {\n const {\n props: { selectedValues },\n } = useContext(ComboBoxContext);\n\n const singleSelectedValue = selectedValues as CBOptionT;\n return (\n <StyledA11ySelectedValues aria-live=\"polite\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {`Option selected: ${singleSelectedValue.label}.`}\n </StyledA11ySelectedValues>\n );\n};\n\nexport { SingleAllyMessages };\n"],"names":["SingleAllyMessages","useContext","ComboBoxContext","selectedValues","props","singleSelectedValue","React","StyledA11ySelectedValues","label"],"mappings":";;;;;;;;;;;;;IAIMA,kBAAkB,GAAG,SAArBA,kBAAqB,GAAmB;EAC5C,kBAEIC,gBAAU,CAACC,uCAAD,CAFd;MACWC,cADX,eACEC,KADF,CACWD,cADX;;EAIA,IAAME,mBAAmB,GAAGF,cAA5B;EACA,oBACEG,wCAACC,8DAAD;IAA0B,aAAU,QAApC;IAA6C,eAAY,OAAzD;IAAiE,iBAAc;gCACxDF,mBAAmB,CAACG,KAD3C,OADF;AAKD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledA11ySelectedValues = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledA11ySelectedValues","styled","span"],"mappings":";;;;;;;;;;IAEaA,wBAAwB,gBAAGC,0BAAM,CAACC,IAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/a11y-messages/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledA11ySelectedValues = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledA11ySelectedValues","styled","span"],"mappings":";;;;;;;;;;IAEaA,wBAAwB,gBAAGC,0BAAM,CAACC,IAAV;EAAA;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sources":["../../../../../../src/ComboBox/v3/parts/container/Container.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useCallback, useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledContainerWithPopper, StyledContainerInline, StyledPopperWrapper } from './styled';\nimport { Controls } from '../controls';\nimport { MenuList } from '../menu-list';\nconst Container = (): JSX.Element => {\n const {\n props: { inline },\n showPopover,\n inputRef,\n setReferenceElement,\n setShowPopover,\n referenceElement,\n } = useContext(ComboBoxContext);\n\n const handleCloseMenu = useCallback(() => {\n setShowPopover(false);\n inputRef.current.blur();\n }, [inputRef, setShowPopover]);\n\n const handleMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n const StyledContainer = inline ? StyledContainerInline : StyledContainerWithPopper;\n return (\n <div>\n <StyledContainer ref={setReferenceElement}>\n <Controls />\n {inline ? <MenuList /> : null}\n </StyledContainer>\n {!inline ? (\n <DSPopperJS\n customOffset={[0, 5]}\n closeContextMenu={handleCloseMenu}\n referenceElement={referenceElement}\n showPopover={showPopover}\n withoutPortal\n withoutArrow\n withoutAnimation\n zIndex={10}\n >\n <StyledPopperWrapper tabIndex={-1} onMouseDown={handleMouseDown}>\n <MenuList />\n </StyledPopperWrapper>\n </DSPopperJS>\n ) : null}\n </div>\n );\n};\n\nexport { Container };\n"],"names":["Container","useContext","ComboBoxContext","inline","props","showPopover","inputRef","setReferenceElement","setShowPopover","referenceElement","handleCloseMenu","useCallback","current","blur","handleMouseDown","e","preventDefault","StyledContainer","StyledContainerInline","StyledContainerWithPopper","React","Controls","MenuList","DSPopperJS","StyledPopperWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;IAOMA,SAAS,GAAG,SAAZA,SAAY,GAAmB;
|
|
1
|
+
{"version":3,"file":"Container.js","sources":["../../../../../../src/ComboBox/v3/parts/container/Container.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useCallback, useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledContainerWithPopper, StyledContainerInline, StyledPopperWrapper } from './styled';\nimport { Controls } from '../controls';\nimport { MenuList } from '../menu-list';\nconst Container = (): JSX.Element => {\n const {\n props: { inline },\n showPopover,\n inputRef,\n setReferenceElement,\n setShowPopover,\n referenceElement,\n } = useContext(ComboBoxContext);\n\n const handleCloseMenu = useCallback(() => {\n setShowPopover(false);\n inputRef.current.blur();\n }, [inputRef, setShowPopover]);\n\n const handleMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n const StyledContainer = inline ? StyledContainerInline : StyledContainerWithPopper;\n return (\n <div>\n <StyledContainer ref={setReferenceElement}>\n <Controls />\n {inline ? <MenuList /> : null}\n </StyledContainer>\n {!inline ? (\n <DSPopperJS\n customOffset={[0, 5]}\n closeContextMenu={handleCloseMenu}\n referenceElement={referenceElement}\n showPopover={showPopover}\n withoutPortal\n withoutArrow\n withoutAnimation\n zIndex={10}\n >\n <StyledPopperWrapper tabIndex={-1} onMouseDown={handleMouseDown}>\n <MenuList />\n </StyledPopperWrapper>\n </DSPopperJS>\n ) : null}\n </div>\n );\n};\n\nexport { Container };\n"],"names":["Container","useContext","ComboBoxContext","inline","props","showPopover","inputRef","setReferenceElement","setShowPopover","referenceElement","handleCloseMenu","useCallback","current","blur","handleMouseDown","e","preventDefault","StyledContainer","StyledContainerInline","StyledContainerWithPopper","React","Controls","MenuList","DSPopperJS","StyledPopperWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;IAOMA,SAAS,GAAG,SAAZA,SAAY,GAAmB;EACnC,kBAOIC,gBAAU,CAACC,uCAAD,CAPd;MACWC,MADX,eACEC,KADF,CACWD,MADX;MAEEE,WAFF,eAEEA,WAFF;MAGEC,QAHF,eAGEA,QAHF;MAIEC,mBAJF,eAIEA,mBAJF;MAKEC,cALF,eAKEA,cALF;MAMEC,gBANF,eAMEA,gBANF;;EASA,IAAMC,eAAe,GAAGC,iBAAW,CAAC,YAAM;IACxCH,cAAc,CAAC,KAAD,CAAd;IACAF,QAAQ,CAACM,OAAT,CAAiBC,IAAjB;GAFiC,EAGhC,CAACP,QAAD,EAAWE,cAAX,CAHgC,CAAnC;EAKA,IAAMM,eAAe,GAAGH,iBAAW,CAAC,UAACI,CAAD,EAAO;IACzCA,CAAC,CAACC,cAAF;GADiC,EAEhC,EAFgC,CAAnC;EAIA,IAAMC,eAAe,GAAGd,MAAM,GAAGe,wDAAH,GAA2BC,4DAAzD;EACA,oBACEC,kEACEA,wCAAC,eAAD;IAAiB,GAAG,EAAEb;kBACpBa,wCAACC,4CAAD,OADF,EAEGlB,MAAM,gBAAGiB,wCAACE,4CAAD,OAAH,GAAkB,IAF3B,CADF,EAKG,CAACnB,MAAD,gBACCiB,wCAACG,qBAAD;IACE,YAAY,EAAE,CAAC,CAAD,EAAI,CAAJ,CADhB;IAEE,gBAAgB,EAAEb,eAFpB;IAGE,gBAAgB,EAAED,gBAHpB;IAIE,WAAW,EAAEJ,WAJf;IAKE,aAAa,MALf;IAME,YAAY,MANd;IAOE,gBAAgB,MAPlB;IAQE,MAAM,EAAE;kBAERe,wCAACI,sDAAD;IAAqB,QAAQ,EAAE,CAAC,CAAhC;IAAmC,WAAW,EAAEV;kBAC9CM,wCAACE,4CAAD,OADF,CAVF,CADD,GAeG,IApBN,CADF;AAwBD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledContainerWithPopper = styled.div`\n width: 100%;\n height: 28px;\n position: relative;\n`;\n\nexport const StyledContainerInline = styled.div`\n width: 100%;\n position: relative;\n`;\n\nexport const StyledPopperWrapper = styled.div`\n background: #fff;\n overflow: auto;\n position: relative;\n`;\n"],"names":["StyledContainerWithPopper","styled","div","StyledContainerInline","StyledPopperWrapper"],"mappings":";;;;;;;;;;IAEaA,yBAAyB,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledContainerWithPopper = styled.div`\n width: 100%;\n height: 28px;\n position: relative;\n`;\n\nexport const StyledContainerInline = styled.div`\n width: 100%;\n position: relative;\n`;\n\nexport const StyledPopperWrapper = styled.div`\n background: #fff;\n overflow: auto;\n position: relative;\n`;\n"],"names":["StyledContainerWithPopper","styled","div","StyledContainerInline","StyledPopperWrapper"],"mappings":";;;;;;;;;;IAEaA,yBAAyB,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;IAMzBC,qBAAqB,gBAAGF,0BAAM,CAACC,GAAV;EAAA;AAAA;IAKrBE,mBAAmB,gBAAGH,0BAAM,CAACC,GAAV;EAAA;AAAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.js","sources":["../../../../../../src/ComboBox/v3/parts/controls/Controls.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport DropdownIndicator from '../dropdown-indicator/DropdownIndicator';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport {\n StyledControlsWrapper,\n StyleHeaderActionsSeparator,\n StyledHeaderActionsWrapper,\n StyledSelection,\n} from './styled';\nimport { MultiSelectedValuesContainer } from '../multi-selected-values-container';\nimport { ControlsInput } from '../controls-input/ControlsInput';\nimport { SingleSelectedValueContainer } from '../single-selected-value-container';\nconst Controls = (): JSX.Element => {\n const {\n props: { inline, hasError, selectedValues },\n inputRef,\n selectedOptionsRef,\n setShowPopover,\n showPopover,\n hasFocus,\n controlsWrapperRef,\n } = useContext(ComboBoxContext);\n\n const handleOnClick = useCallback(() => {\n if (hasFocus && showPopover && !inline) {\n inputRef.current.blur();\n } else if (hasFocus) {\n setShowPopover(true);\n } else {\n inputRef.current.focus();\n }\n }, [hasFocus, setShowPopover, showPopover, inputRef, inline]);\n\n const handleOnMouseDown = (e) => {\n if (hasFocus || inline) {\n e.preventDefault();\n }\n };\n const cols = !inline ? ['minmax(0px,max-content)', 'minmax(0px, auto)', '29px'] : ['minmax(0px, auto)'];\n return (\n <StyledControlsWrapper\n ref={controlsWrapperRef}\n cols={cols}\n hasError={hasError}\n hasFocus={hasFocus}\n inline={inline}\n onClick={handleOnClick}\n onMouseDown={handleOnMouseDown}\n >\n {!inline && (\n <StyledSelection ref={selectedOptionsRef} data-testid={ComboboxDataTestid.SELECTED_VALUES}>\n {Array.isArray(selectedValues) ? <MultiSelectedValuesContainer /> : <SingleSelectedValueContainer />}\n </StyledSelection>\n )}\n\n <ControlsInput />\n {!inline && (\n <StyledHeaderActionsWrapper>\n <StyleHeaderActionsSeparator />\n <DropdownIndicator />\n </StyledHeaderActionsWrapper>\n )}\n </StyledControlsWrapper>\n );\n};\n\nexport { Controls };\n"],"names":["Controls","useContext","ComboBoxContext","props","inline","hasError","selectedValues","inputRef","selectedOptionsRef","setShowPopover","showPopover","hasFocus","controlsWrapperRef","handleOnClick","useCallback","current","blur","focus","handleOnMouseDown","e","preventDefault","cols","React","StyledControlsWrapper","StyledSelection","ComboboxDataTestid","SELECTED_VALUES","Array","isArray","MultiSelectedValuesContainer","SingleSelectedValueContainer","ControlsInput","StyledHeaderActionsWrapper","StyleHeaderActionsSeparator","DropdownIndicator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;IAcMA,QAAQ,GAAG,SAAXA,QAAW,GAAmB;
|
|
1
|
+
{"version":3,"file":"Controls.js","sources":["../../../../../../src/ComboBox/v3/parts/controls/Controls.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport DropdownIndicator from '../dropdown-indicator/DropdownIndicator';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport {\n StyledControlsWrapper,\n StyleHeaderActionsSeparator,\n StyledHeaderActionsWrapper,\n StyledSelection,\n} from './styled';\nimport { MultiSelectedValuesContainer } from '../multi-selected-values-container';\nimport { ControlsInput } from '../controls-input/ControlsInput';\nimport { SingleSelectedValueContainer } from '../single-selected-value-container';\nconst Controls = (): JSX.Element => {\n const {\n props: { inline, hasError, selectedValues },\n inputRef,\n selectedOptionsRef,\n setShowPopover,\n showPopover,\n hasFocus,\n controlsWrapperRef,\n } = useContext(ComboBoxContext);\n\n const handleOnClick = useCallback(() => {\n if (hasFocus && showPopover && !inline) {\n inputRef.current.blur();\n } else if (hasFocus) {\n setShowPopover(true);\n } else {\n inputRef.current.focus();\n }\n }, [hasFocus, setShowPopover, showPopover, inputRef, inline]);\n\n const handleOnMouseDown = (e) => {\n if (hasFocus || inline) {\n e.preventDefault();\n }\n };\n const cols = !inline ? ['minmax(0px,max-content)', 'minmax(0px, auto)', '29px'] : ['minmax(0px, auto)'];\n return (\n <StyledControlsWrapper\n ref={controlsWrapperRef}\n cols={cols}\n hasError={hasError}\n hasFocus={hasFocus}\n inline={inline}\n onClick={handleOnClick}\n onMouseDown={handleOnMouseDown}\n >\n {!inline && (\n <StyledSelection ref={selectedOptionsRef} data-testid={ComboboxDataTestid.SELECTED_VALUES}>\n {Array.isArray(selectedValues) ? <MultiSelectedValuesContainer /> : <SingleSelectedValueContainer />}\n </StyledSelection>\n )}\n\n <ControlsInput />\n {!inline && (\n <StyledHeaderActionsWrapper>\n <StyleHeaderActionsSeparator />\n <DropdownIndicator />\n </StyledHeaderActionsWrapper>\n )}\n </StyledControlsWrapper>\n );\n};\n\nexport { Controls };\n"],"names":["Controls","useContext","ComboBoxContext","props","inline","hasError","selectedValues","inputRef","selectedOptionsRef","setShowPopover","showPopover","hasFocus","controlsWrapperRef","handleOnClick","useCallback","current","blur","focus","handleOnMouseDown","e","preventDefault","cols","React","StyledControlsWrapper","StyledSelection","ComboboxDataTestid","SELECTED_VALUES","Array","isArray","MultiSelectedValuesContainer","SingleSelectedValueContainer","ControlsInput","StyledHeaderActionsWrapper","StyleHeaderActionsSeparator","DropdownIndicator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;IAcMA,QAAQ,GAAG,SAAXA,QAAW,GAAmB;EAClC,kBAQIC,gBAAU,CAACC,uCAAD,CARd;sCACEC,KADF;MACWC,MADX,qBACWA,MADX;MACmBC,QADnB,qBACmBA,QADnB;MAC6BC,cAD7B,qBAC6BA,cAD7B;MAEEC,QAFF,eAEEA,QAFF;MAGEC,kBAHF,eAGEA,kBAHF;MAIEC,cAJF,eAIEA,cAJF;MAKEC,WALF,eAKEA,WALF;MAMEC,QANF,eAMEA,QANF;MAOEC,kBAPF,eAOEA,kBAPF;;EAUA,IAAMC,aAAa,GAAGC,iBAAW,CAAC,YAAM;IACtC,IAAIH,QAAQ,IAAID,WAAZ,IAA2B,CAACN,MAAhC,EAAwC;MACtCG,QAAQ,CAACQ,OAAT,CAAiBC,IAAjB;KADF,MAEO,IAAIL,QAAJ,EAAc;MACnBF,cAAc,CAAC,IAAD,CAAd;KADK,MAEA;MACLF,QAAQ,CAACQ,OAAT,CAAiBE,KAAjB;;GAN6B,EAQ9B,CAACN,QAAD,EAAWF,cAAX,EAA2BC,WAA3B,EAAwCH,QAAxC,EAAkDH,MAAlD,CAR8B,CAAjC;;EAUA,IAAMc,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,CAAD,EAAO;IAC/B,IAAIR,QAAQ,IAAIP,MAAhB,EAAwB;MACtBe,CAAC,CAACC,cAAF;;GAFJ;;EAKA,IAAMC,IAAI,GAAG,CAACjB,MAAD,GAAU,CAAC,yBAAD,EAA4B,mBAA5B,EAAiD,MAAjD,CAAV,GAAqE,CAAC,mBAAD,CAAlF;EACA,oBACEkB,wCAACC,uDAAD;IACE,GAAG,EAAEX,kBADP;IAEE,IAAI,EAAES,IAFR;IAGE,QAAQ,EAAEhB,QAHZ;IAIE,QAAQ,EAAEM,QAJZ;IAKE,MAAM,EAAEP,MALV;IAME,OAAO,EAAES,aANX;IAOE,WAAW,EAAEK;KAEZ,CAACd,MAAD,iBACCkB,wCAACE,iDAAD;IAAiB,GAAG,EAAEhB,kBAAtB;IAA0C,eAAaiB,kDAAkB,CAACC;KACvEC,KAAK,CAACC,OAAN,CAActB,cAAd,iBAAgCgB,wCAACO,wGAAD,OAAhC,gBAAmEP,wCAACQ,wGAAD,OADtE,CAVJ,eAeER,wCAACS,2DAAD,OAfF,EAgBG,CAAC3B,MAAD,iBACCkB,wCAACU,4DAAD,qBACEV,wCAACW,6DAAD,OADF,eAEEX,wCAACY,qDAAD,OAFF,CAjBJ,CADF;AAyBD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/controls/styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ComboBoxPropsT } from '../../index.d';\n\nexport const StyledControlsWrapper = styled(Grid)<Pick<ComboBoxPropsT, 'hasError' | 'inline'>>`\n background: transparent;\n position: relative;\n border: 1px solid ${(props) => (props.hasError ? props.theme.colors.danger[900] : props.theme.colors.neutral[400])};\n border-radius: 2px;\n align-items: center;\n align-content: center;\n height: 28px;\n padding-left: 8px;\n margin: ${({ inline }) => (inline ? '10px 16px' : 'none')};\n /* &:active::after,\n &:focus-within::after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n } */\n\n ${(props) => props.hasFocus && focusMixin}\n\n &:hover {\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n }\n`;\n\nconst focusMixin = css`\n &::after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nexport const StyledSelection = styled.div`\n font-size: 13px;\n margin-right: 3px;\n line-height: 13px;\n display: flex;\n`;\n\nexport const StyledHeaderActionsWrapper = styled.div`\n align-items: center;\n align-self: stretch;\n display: flex;\n box-sizing: border-box;\n height: 26px;\n\n .em-ds-button--text:focus::after {\n border: none;\n }\n`;\n\nexport const StyleDropdownIndicator = styled.div``;\n\nexport const StyleHeaderActionsSeparator = styled.span`\n align-self: stretch;\n margin: 4px 0px;\n width: 1px;\n background-color: ${(props) => props.theme.colors.neutral['500']};\n`;\n"],"names":["StyledControlsWrapper","styled","Grid","props","hasError","theme","colors","danger","neutral","inline","hasFocus","focusMixin","brand","css","StyledSelection","div","StyledHeaderActionsWrapper","StyleDropdownIndicator","StyleHeaderActionsSeparator","span"],"mappings":";;;;;;;;;;;IAIaA,qBAAqB,gBAAGC,0BAAM,CAACC,SAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/controls/styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ComboBoxPropsT } from '../../index.d';\n\nexport const StyledControlsWrapper = styled(Grid)<Pick<ComboBoxPropsT, 'hasError' | 'inline'>>`\n background: transparent;\n position: relative;\n border: 1px solid ${(props) => (props.hasError ? props.theme.colors.danger[900] : props.theme.colors.neutral[400])};\n border-radius: 2px;\n align-items: center;\n align-content: center;\n height: 28px;\n padding-left: 8px;\n margin: ${({ inline }) => (inline ? '10px 16px' : 'none')};\n /* &:active::after,\n &:focus-within::after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n } */\n\n ${(props) => props.hasFocus && focusMixin}\n\n &:hover {\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n }\n`;\n\nconst focusMixin = css`\n &::after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nexport const StyledSelection = styled.div`\n font-size: 13px;\n margin-right: 3px;\n line-height: 13px;\n display: flex;\n`;\n\nexport const StyledHeaderActionsWrapper = styled.div`\n align-items: center;\n align-self: stretch;\n display: flex;\n box-sizing: border-box;\n height: 26px;\n\n .em-ds-button--text:focus::after {\n border: none;\n }\n`;\n\nexport const StyleDropdownIndicator = styled.div``;\n\nexport const StyleHeaderActionsSeparator = styled.span`\n align-self: stretch;\n margin: 4px 0px;\n width: 1px;\n background-color: ${(props) => props.theme.colors.neutral['500']};\n`;\n"],"names":["StyledControlsWrapper","styled","Grid","props","hasError","theme","colors","danger","neutral","inline","hasFocus","focusMixin","brand","css","StyledSelection","div","StyledHeaderActionsWrapper","StyleDropdownIndicator","StyleHeaderActionsSeparator","span"],"mappings":";;;;;;;;;;;IAIaA,qBAAqB,gBAAGC,0BAAM,CAACC,SAAD,CAAT;EAAA;AAAA,+MAGZ,UAACC,KAAD;EAAA,OAAYA,KAAK,CAACC,QAAN,GAAiBD,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBC,MAAnB,CAA0B,GAA1B,CAAjB,GAAkDJ,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,GAA3B,CAA9D;AAAA,CAHY,EAStB;EAAA,IAAGC,MAAH,QAAGA,MAAH;EAAA,OAAiBA,MAAM,GAAG,WAAH,GAAiB,MAAxC;AAAA,CATsB,EAwB9B,UAACN,KAAD;EAAA,OAAWA,KAAK,CAACO,QAAN,IAAkBC,UAA7B;AAAA,CAxB8B,EA2BV,UAACR,KAAD;EAAA,OAAWA,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBM,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CA3BU;AA+BlC,IAAMD,UAAU,gBAAGE,UAAH,+IASQ;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaM,KAAb,CAAmB,GAAnB,CAAf;AAAA,CATR,CAAhB;IAeaE,eAAe,gBAAGb,0BAAM,CAACc,GAAV;EAAA;AAAA;IAOfC,0BAA0B,gBAAGf,0BAAM,CAACc,GAAV;EAAA;AAAA;IAY1BE,sBAAsB,gBAAGhB,0BAAM,CAACc,GAAV;EAAA;AAAA;IAEtBG,2BAA2B,gBAAGjB,0BAAM,CAACkB,IAAV;EAAA;AAAA,2EAIlB,UAAChB,KAAD;EAAA,OAAWA,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJkB;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ControlsInput.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/ControlsInput.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { StyledInput, StyledInputWrapper, StyledInputPlaceHolder, StyledInputWidthReference } from './styled';\nimport { useKeyboardNavigation } from '../../utils/hooks/useKeyboardNavigation';\nimport { useControlsInput } from './useControlsInput';\nimport ComboBoxContext from '../../ComboBoxCTX';\n\nconst ControlsInput = (): JSX.Element => {\n const {\n props: { autoFocus },\n showPopover,\n focusOptionIdx,\n inputRef,\n } = useContext(ComboBoxContext);\n const onInputKeyDown = useKeyboardNavigation();\n const { span, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } =\n useControlsInput();\n\n return (\n <StyledInputWrapper>\n <StyledInputWidthReference ref={span}>{spanReferenceText}</StyledInputWidthReference>\n <StyledInputPlaceHolder>\n <SimpleTruncatedTooltipText value={showPlaceholder}></SimpleTruncatedTooltipText>\n </StyledInputPlaceHolder>\n <StyledInput\n data-testid={ComboboxDataTestid.INPUT}\n autoFocus={autoFocus}\n aria-labelledby=\"combo-label\"\n aria-controls=\"combo-listbox\"\n aria-owns=\"combo-listbox\"\n aria-activedescendant={focusOptionIdx}\n aria-expanded={showPopover}\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n style={{ width }}\n ref={inputRef}\n type=\"text\"\n onKeyDown={onInputKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n />\n </StyledInputWrapper>\n );\n};\n\nexport { ControlsInput };\n"],"names":["ControlsInput","useContext","ComboBoxContext","autoFocus","props","showPopover","focusOptionIdx","inputRef","onInputKeyDown","useKeyboardNavigation","useControlsInput","span","width","spanReferenceText","showPlaceholder","handleOnBlur","handleOnChange","handleOnFocus","React","StyledInputWrapper","StyledInputWidthReference","StyledInputPlaceHolder","SimpleTruncatedTooltipText","StyledInput","ComboboxDataTestid","INPUT"],"mappings":";;;;;;;;;;;;;;;;;;;IAQMA,aAAa,GAAG,SAAhBA,aAAgB,GAAmB;
|
|
1
|
+
{"version":3,"file":"ControlsInput.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/ControlsInput.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { StyledInput, StyledInputWrapper, StyledInputPlaceHolder, StyledInputWidthReference } from './styled';\nimport { useKeyboardNavigation } from '../../utils/hooks/useKeyboardNavigation';\nimport { useControlsInput } from './useControlsInput';\nimport ComboBoxContext from '../../ComboBoxCTX';\n\nconst ControlsInput = (): JSX.Element => {\n const {\n props: { autoFocus },\n showPopover,\n focusOptionIdx,\n inputRef,\n } = useContext(ComboBoxContext);\n const onInputKeyDown = useKeyboardNavigation();\n const { span, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } =\n useControlsInput();\n\n return (\n <StyledInputWrapper>\n <StyledInputWidthReference ref={span}>{spanReferenceText}</StyledInputWidthReference>\n <StyledInputPlaceHolder>\n <SimpleTruncatedTooltipText value={showPlaceholder}></SimpleTruncatedTooltipText>\n </StyledInputPlaceHolder>\n <StyledInput\n data-testid={ComboboxDataTestid.INPUT}\n autoFocus={autoFocus}\n aria-labelledby=\"combo-label\"\n aria-controls=\"combo-listbox\"\n aria-owns=\"combo-listbox\"\n aria-activedescendant={focusOptionIdx}\n aria-expanded={showPopover}\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n style={{ width }}\n ref={inputRef}\n type=\"text\"\n onKeyDown={onInputKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n />\n </StyledInputWrapper>\n );\n};\n\nexport { ControlsInput };\n"],"names":["ControlsInput","useContext","ComboBoxContext","autoFocus","props","showPopover","focusOptionIdx","inputRef","onInputKeyDown","useKeyboardNavigation","useControlsInput","span","width","spanReferenceText","showPlaceholder","handleOnBlur","handleOnChange","handleOnFocus","React","StyledInputWrapper","StyledInputWidthReference","StyledInputPlaceHolder","SimpleTruncatedTooltipText","StyledInput","ComboboxDataTestid","INPUT"],"mappings":";;;;;;;;;;;;;;;;;;;IAQMA,aAAa,GAAG,SAAhBA,aAAgB,GAAmB;EACvC,kBAKIC,gBAAU,CAACC,uCAAD,CALd;MACWC,SADX,eACEC,KADF,CACWD,SADX;MAEEE,WAFF,eAEEA,WAFF;MAGEC,cAHF,eAGEA,cAHF;MAIEC,QAJF,eAIEA,QAJF;;EAMA,IAAMC,cAAc,GAAGC,mEAAqB,EAA5C;;EACA,wBACEC,iEAAgB,EADlB;MAAQC,IAAR,qBAAQA,IAAR;MAAcC,KAAd,qBAAcA,KAAd;MAAqBC,iBAArB,qBAAqBA,iBAArB;MAAwCC,eAAxC,qBAAwCA,eAAxC;MAAyDC,YAAzD,qBAAyDA,YAAzD;MAAuEC,cAAvE,qBAAuEA,cAAvE;MAAuFC,aAAvF,qBAAuFA,aAAvF;;EAGA,oBACEC,wCAACC,yDAAD,qBACED,wCAACE,gEAAD;IAA2B,GAAG,EAAET;KAAOE,iBAAvC,CADF,eAEEK,wCAACG,6DAAD,qBACEH,wCAACI,iDAAD;IAA4B,KAAK,EAAER;IADrC,CAFF,eAKEI,wCAACK,kDAAD;IACE,eAAaC,kDAAkB,CAACC,KADlC;IAEE,SAAS,EAAEtB,SAFb;IAGE,mBAAgB,aAHlB;IAIE,iBAAc,eAJhB;IAKE,aAAU,eALZ;IAME,yBAAuBG,cANzB;IAOE,iBAAeD,WAPjB;IAQE,iBAAc,SARhB;IASE,IAAI,EAAC,UATP;IAUE,KAAK,EAAE;MAAEO,KAAK,EAALA;KAVX;IAWE,GAAG,EAAEL,QAXP;IAYE,IAAI,EAAC,MAZP;IAaE,SAAS,EAAEC,cAbb;IAcE,QAAQ,EAAEQ,cAdZ;IAeE,MAAM,EAAED,YAfV;IAgBE,OAAO,EAAEE;IArBb,CADF;AA0BD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledInput = styled.input`\n font-size: 13px;\n line-height: 13px;\n border: none;\n padding: 0;\n outline: none;\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledInputPlaceHolder = styled.div`\n font-style: italic;\n color: ${(props) => props.theme.colors.neutral[500]};\n position: absolute;\n display: flex;\n align-items: center;\n width: 100%;\n user-select: none;\n height: 28px;\n`;\n\nexport const StyledInputWidthReference = styled.span`\n visibility: hidden;\n position: absolute;\n top: -9999px;\n`;\n\nexport const StyledInputWrapper = styled.div`\n position: relative;\n flex: 1;\n margin-right: 5px;\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledInput","styled","input","StyledInputPlaceHolder","div","props","theme","colors","neutral","StyledInputWidthReference","span","StyledInputWrapper"],"mappings":";;;;;;;;;;IAEaA,WAAW,gBAAGC,0BAAM,CAACC,KAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledInput = styled.input`\n font-size: 13px;\n line-height: 13px;\n border: none;\n padding: 0;\n outline: none;\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledInputPlaceHolder = styled.div`\n font-style: italic;\n color: ${(props) => props.theme.colors.neutral[500]};\n position: absolute;\n display: flex;\n align-items: center;\n width: 100%;\n user-select: none;\n height: 28px;\n`;\n\nexport const StyledInputWidthReference = styled.span`\n visibility: hidden;\n position: absolute;\n top: -9999px;\n`;\n\nexport const StyledInputWrapper = styled.div`\n position: relative;\n flex: 1;\n margin-right: 5px;\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledInput","styled","input","StyledInputPlaceHolder","div","props","theme","colors","neutral","StyledInputWidthReference","span","StyledInputWrapper"],"mappings":";;;;;;;;;;IAEaA,WAAW,gBAAGC,0BAAM,CAACC,KAAV;EAAA;AAAA;IAWXC,sBAAsB,gBAAGF,0BAAM,CAACG,GAAV;EAAA;AAAA,gIAExB,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CAFwB;IAWtBC,yBAAyB,gBAAGR,0BAAM,CAACS,IAAV;EAAA;AAAA;IAMzBC,kBAAkB,gBAAGV,0BAAM,CAACG,GAAV;EAAA;AAAA;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useControlsInput.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/useControlsInput.tsx"],"sourcesContent":["import { useContext, useEffect, useMemo, useRef, useCallback, useState } from 'react';\nimport { CBOptionT } from '../..';\n\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { isSelectedValueEmpty, findInCircularList } from '../../utils/listHelper';\n\ninterface useControlsInputT {\n handleOnFocus: () => void;\n handleOnBlur: () => void;\n handleOnChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n showPlaceholder?: string;\n spanReferenceText: string;\n width: number;\n span: React.Ref<HTMLSpanElement>;\n}\nconst useControlsInput = (): useControlsInputT => {\n const {\n props: { selectedValues, options, placeholder, onFilter },\n setShowPopover,\n setCurrentOption,\n inputRef,\n listRef,\n setHasFocus,\n setShowSelectedValue,\n } = useContext(ComboBoxContext);\n\n const [width, setWidth] = useState();\n const span = useRef(null);\n\n useEffect(() => {\n setWidth(span.current?.offsetWidth || 1);\n }, [inputRef.current?.value]);\n\n useEffect(() => {\n setShowSelectedValue(true);\n }, [selectedValues, setShowSelectedValue]);\n\n // When writting open popover\n // and refresh selected values and update filter outside value.\n const handleOnChange = useCallback(\n (e) => {\n if (e.target.value) setShowSelectedValue(false);\n setShowPopover(true);\n onFilter(e.target.value);\n },\n [onFilter, setShowPopover, setShowSelectedValue],\n );\n\n const handleOnBlur = useCallback(() => {\n setTimeout(() => {\n if (!listRef?.current?.contains(document.activeElement)) {\n setShowPopover(false);\n }\n setCurrentOption('');\n setHasFocus(false);\n setShowSelectedValue(true);\n onFilter('');\n if (inputRef.current) inputRef.current.value = '';\n }, 100);\n }, [setHasFocus, setCurrentOption, listRef, onFilter, inputRef, setShowPopover, setShowSelectedValue]);\n\n const handleOnFocus = useCallback(() => {\n setHasFocus(true);\n setShowPopover(true);\n const firstItem = findInCircularList(\n options,\n -1,\n (opt: CBOptionT): boolean => !['section', 'separator'].includes(opt.type),\n );\n setCurrentOption(options[firstItem] ? options[firstItem].dsId : '');\n }, [setHasFocus, options, setCurrentOption, setShowPopover]);\n\n const showPlaceholder = !inputRef.current?.value && isSelectedValueEmpty(selectedValues) ? placeholder : null;\n const spanReferenceText = inputRef.current?.value.replace(/\\s/g, '\\u00a0');\n\n return useMemo(\n () => ({\n handleOnFocus,\n handleOnBlur,\n handleOnChange,\n showPlaceholder,\n spanReferenceText,\n width,\n span,\n }),\n [handleOnFocus, handleOnBlur, handleOnChange, spanReferenceText, showPlaceholder, width, span],\n );\n};\n\nexport { useControlsInput };\n"],"names":["useControlsInput","useContext","ComboBoxContext","props","selectedValues","options","placeholder","onFilter","setShowPopover","setCurrentOption","inputRef","listRef","setHasFocus","setShowSelectedValue","useState","width","setWidth","span","useRef","useEffect","current","offsetWidth","value","handleOnChange","useCallback","e","target","handleOnBlur","setTimeout","contains","document","activeElement","handleOnFocus","firstItem","findInCircularList","opt","includes","type","dsId","showPlaceholder","isSelectedValueEmpty","spanReferenceText","replace","useMemo"],"mappings":";;;;;;;;;;;;;IAeMA,gBAAgB,GAAG,SAAnBA,gBAAmB,GAAyB;
|
|
1
|
+
{"version":3,"file":"useControlsInput.js","sources":["../../../../../../src/ComboBox/v3/parts/controls-input/useControlsInput.tsx"],"sourcesContent":["import { useContext, useEffect, useMemo, useRef, useCallback, useState } from 'react';\nimport { CBOptionT } from '../..';\n\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { isSelectedValueEmpty, findInCircularList } from '../../utils/listHelper';\n\ninterface useControlsInputT {\n handleOnFocus: () => void;\n handleOnBlur: () => void;\n handleOnChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n showPlaceholder?: string;\n spanReferenceText: string;\n width: number;\n span: React.Ref<HTMLSpanElement>;\n}\nconst useControlsInput = (): useControlsInputT => {\n const {\n props: { selectedValues, options, placeholder, onFilter },\n setShowPopover,\n setCurrentOption,\n inputRef,\n listRef,\n setHasFocus,\n setShowSelectedValue,\n } = useContext(ComboBoxContext);\n\n const [width, setWidth] = useState();\n const span = useRef(null);\n\n useEffect(() => {\n setWidth(span.current?.offsetWidth || 1);\n }, [inputRef.current?.value]);\n\n useEffect(() => {\n setShowSelectedValue(true);\n }, [selectedValues, setShowSelectedValue]);\n\n // When writting open popover\n // and refresh selected values and update filter outside value.\n const handleOnChange = useCallback(\n (e) => {\n if (e.target.value) setShowSelectedValue(false);\n setShowPopover(true);\n onFilter(e.target.value);\n },\n [onFilter, setShowPopover, setShowSelectedValue],\n );\n\n const handleOnBlur = useCallback(() => {\n setTimeout(() => {\n if (!listRef?.current?.contains(document.activeElement)) {\n setShowPopover(false);\n }\n setCurrentOption('');\n setHasFocus(false);\n setShowSelectedValue(true);\n onFilter('');\n if (inputRef.current) inputRef.current.value = '';\n }, 100);\n }, [setHasFocus, setCurrentOption, listRef, onFilter, inputRef, setShowPopover, setShowSelectedValue]);\n\n const handleOnFocus = useCallback(() => {\n setHasFocus(true);\n setShowPopover(true);\n const firstItem = findInCircularList(\n options,\n -1,\n (opt: CBOptionT): boolean => !['section', 'separator'].includes(opt.type),\n );\n setCurrentOption(options[firstItem] ? options[firstItem].dsId : '');\n }, [setHasFocus, options, setCurrentOption, setShowPopover]);\n\n const showPlaceholder = !inputRef.current?.value && isSelectedValueEmpty(selectedValues) ? placeholder : null;\n const spanReferenceText = inputRef.current?.value.replace(/\\s/g, '\\u00a0');\n\n return useMemo(\n () => ({\n handleOnFocus,\n handleOnBlur,\n handleOnChange,\n showPlaceholder,\n spanReferenceText,\n width,\n span,\n }),\n [handleOnFocus, handleOnBlur, handleOnChange, spanReferenceText, showPlaceholder, width, span],\n );\n};\n\nexport { useControlsInput };\n"],"names":["useControlsInput","useContext","ComboBoxContext","props","selectedValues","options","placeholder","onFilter","setShowPopover","setCurrentOption","inputRef","listRef","setHasFocus","setShowSelectedValue","useState","width","setWidth","span","useRef","useEffect","current","offsetWidth","value","handleOnChange","useCallback","e","target","handleOnBlur","setTimeout","contains","document","activeElement","handleOnFocus","firstItem","findInCircularList","opt","includes","type","dsId","showPlaceholder","isSelectedValueEmpty","spanReferenceText","replace","useMemo"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownIndicator.js","sources":["../../../../../../src/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable import/no-cycle */\nimport React, { useContext } from 'react';\nimport ChevronSmallDown from '@elliemae/ds-icons/ChevronSmallDown';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledDropDownButton } from './styled';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nconst DropdownIndicator = (): JSX.Element => {\n const { showPopover } = useContext(ComboBoxContext);\n\n return (\n <StyledDropDownButton\n data-testid={ComboboxDataTestid.DROPDOWN}\n aria-controls=\"combo-listbox\"\n aria-labelledby=\"combo-label\"\n aria-expanded={showPopover}\n aria-haspopup=\"listbox\"\n buttonType=\"text\"\n style={{ height: '100%' }}\n icon={<ChevronSmallDown />}\n tabIndex={-1}\n />\n );\n};\n\nexport default DropdownIndicator;\n"],"names":["DropdownIndicator","useContext","ComboBoxContext","showPopover","React","StyledDropDownButton","ComboboxDataTestid","DROPDOWN","height","ChevronSmallDown"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAOMA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;
|
|
1
|
+
{"version":3,"file":"DropdownIndicator.js","sources":["../../../../../../src/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable import/no-cycle */\nimport React, { useContext } from 'react';\nimport ChevronSmallDown from '@elliemae/ds-icons/ChevronSmallDown';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledDropDownButton } from './styled';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nconst DropdownIndicator = (): JSX.Element => {\n const { showPopover } = useContext(ComboBoxContext);\n\n return (\n <StyledDropDownButton\n data-testid={ComboboxDataTestid.DROPDOWN}\n aria-controls=\"combo-listbox\"\n aria-labelledby=\"combo-label\"\n aria-expanded={showPopover}\n aria-haspopup=\"listbox\"\n buttonType=\"text\"\n style={{ height: '100%' }}\n icon={<ChevronSmallDown />}\n tabIndex={-1}\n />\n );\n};\n\nexport default DropdownIndicator;\n"],"names":["DropdownIndicator","useContext","ComboBoxContext","showPopover","React","StyledDropDownButton","ComboboxDataTestid","DROPDOWN","height","ChevronSmallDown"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAOMA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;EAC3C,kBAAwBC,gBAAU,CAACC,uCAAD,CAAlC;MAAQC,WAAR,eAAQA,WAAR;;EAEA,oBACEC,wCAACC,+DAAD;IACE,eAAaC,kDAAkB,CAACC,QADlC;IAEE,iBAAc,eAFhB;IAGE,mBAAgB,aAHlB;IAIE,iBAAeJ,WAJjB;IAKE,iBAAc,SALhB;IAME,UAAU,EAAC,MANb;IAOE,KAAK,EAAE;MAAEK,MAAM,EAAE;KAPnB;IAQE,IAAI,eAAEJ,wCAACK,oCAAD,OARR;IASE,QAAQ,EAAE,CAAC;IAVf;AAaD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/dropdown-indicator/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport DSButton from '@elliemae/ds-button';\n\nexport const StyledDropDownButton = styled(DSButton)``;\n"],"names":["StyledDropDownButton","styled","DSButton"],"mappings":";;;;;;;;;;;;IAGaA,oBAAoB,gBAAGC,0BAAM,CAACC,4BAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/dropdown-indicator/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport DSButton from '@elliemae/ds-button';\n\nexport const StyledDropDownButton = styled(DSButton)``;\n"],"names":["StyledDropDownButton","styled","DSButton"],"mappings":";;;;;;;;;;;;IAGaA,oBAAoB,gBAAGC,0BAAM,CAACC,4BAAD,CAAT;EAAA;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/ComboBox/v3/parts/empty-state/index.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledNoResults, StyledNoResultsWrapper } from './styled';\n\nconst EmptyState = (): JSX.Element => {\n const {\n props: { onCreate },\n } = useContext(ComboBoxContext);\n return (\n <StyledNoResultsWrapper id=\"id-no-results\">\n {onCreate ? (\n <StyledNoResults>\n No items match your search, click RETURN at any point to add your unique entry to the field\n </StyledNoResults>\n ) : (\n <StyledNoResults>No matches found.</StyledNoResults>\n )}\n </StyledNoResultsWrapper>\n );\n};\n\nexport { EmptyState };\n"],"names":["EmptyState","useContext","ComboBoxContext","onCreate","props","React","StyledNoResultsWrapper","StyledNoResults"],"mappings":";;;;;;;;;;;;;IAIMA,UAAU,GAAG,SAAbA,UAAa,GAAmB;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/ComboBox/v3/parts/empty-state/index.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledNoResults, StyledNoResultsWrapper } from './styled';\n\nconst EmptyState = (): JSX.Element => {\n const {\n props: { onCreate },\n } = useContext(ComboBoxContext);\n return (\n <StyledNoResultsWrapper id=\"id-no-results\">\n {onCreate ? (\n <StyledNoResults>\n No items match your search, click RETURN at any point to add your unique entry to the field\n </StyledNoResults>\n ) : (\n <StyledNoResults>No matches found.</StyledNoResults>\n )}\n </StyledNoResultsWrapper>\n );\n};\n\nexport { EmptyState };\n"],"names":["EmptyState","useContext","ComboBoxContext","onCreate","props","React","StyledNoResultsWrapper","StyledNoResults"],"mappings":";;;;;;;;;;;;;IAIMA,UAAU,GAAG,SAAbA,UAAa,GAAmB;EACpC,kBAEIC,gBAAU,CAACC,uCAAD,CAFd;MACWC,QADX,eACEC,KADF,CACWD,QADX;;EAGA,oBACEE,wCAACC,0DAAD;IAAwB,EAAE,EAAC;KACxBH,QAAQ,gBACPE,wCAACE,mDAAD,sGADO,gBAKPF,wCAACE,mDAAD,4BANJ,CADF;AAWD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/empty-state/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledNoResultsWrapper = styled.div`\n padding: 16px;\n`;\n\nexport const StyledNoResults = styled.span``;\n"],"names":["StyledNoResultsWrapper","styled","div","StyledNoResults","span"],"mappings":";;;;;;;;;;IAEaA,sBAAsB,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/empty-state/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledNoResultsWrapper = styled.div`\n padding: 16px;\n`;\n\nexport const StyledNoResults = styled.span``;\n"],"names":["StyledNoResultsWrapper","styled","div","StyledNoResults","span"],"mappings":";;;;;;;;;;IAEaA,sBAAsB,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;IAItBC,eAAe,gBAAGF,0BAAM,CAACG,IAAV;EAAA;AAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderList.js","sources":["../../../../../../src/ComboBox/v3/parts/header-list/HeaderList.tsx"],"sourcesContent":["import React, { useContext, useCallback } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledHeaderListWrapper, StyledSelectedItems, ActionButtons, StyledButton, StyledSeparator } from './styled';\nimport { CBOptionT } from '../../index.d';\nimport { getSelectableOptions } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nconst HeaderList = (): JSX.Element => {\n const {\n props: { onSelectAll, onClearAll, selectedValues, options },\n inputRef,\n setShowPopover,\n } = useContext(ComboBoxContext);\n\n const multiSelectedValues = selectedValues as CBOptionT[];\n const selectableOptions = getSelectableOptions(options);\n const handleOnBlurSelectAll = (e) => {\n if (!onClearAll || multiSelectedValues.length === 0) {\n e.preventDefault();\n inputRef.current.focus();\n }\n };\n\n const handleOnBlurClearAll = (e) => {\n e.preventDefault();\n inputRef.current.focus();\n };\n\n const handleClickOnSelectAll = () => {\n onSelectAll();\n inputRef.current.focus();\n setShowPopover(false);\n };\n\n const handleClickOnClearAll = useCallback(\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n onClearAll();\n inputRef.current.focus();\n },\n [inputRef, onClearAll],\n );\n\n const handleOnMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n return (\n <StyledHeaderListWrapper onMouseDown={handleOnMouseDown}>\n <StyledSelectedItems>{`${multiSelectedValues.length} Selected`}</StyledSelectedItems>\n <ActionButtons>\n {onSelectAll && (\n <StyledButton\n disabled={selectableOptions.length === multiSelectedValues.length}\n tabIndex={0}\n data-testid={ComboboxDataTestid.SELECT_ALL_BUTTON}\n buttonType=\"text\"\n labelText=\"All\"\n size=\"s\"\n onMouseDown={handleOnMouseDown}\n onBlur={handleOnBlurSelectAll}\n onClick={handleClickOnSelectAll}\n />\n )}\n {onSelectAll && onClearAll && (\n <StyledSeparator orientation=\"vertical\" position=\"center\" type=\"group-level\" margin=\"none\" />\n )}\n {onClearAll && (\n <StyledButton\n disabled={multiSelectedValues.length === 0}\n tabIndex={0}\n data-testid={ComboboxDataTestid.CLEAR_ALL_BUTTON}\n buttonType=\"text\"\n labelText=\"Clear\"\n size=\"s\"\n onMouseDown={handleOnMouseDown}\n onBlur={handleOnBlurClearAll}\n onClick={handleClickOnClearAll}\n />\n )}\n </ActionButtons>\n </StyledHeaderListWrapper>\n );\n};\n\nexport { HeaderList };\n"],"names":["HeaderList","useContext","ComboBoxContext","props","onSelectAll","onClearAll","selectedValues","options","inputRef","setShowPopover","multiSelectedValues","selectableOptions","getSelectableOptions","handleOnBlurSelectAll","e","length","preventDefault","current","focus","handleOnBlurClearAll","handleClickOnSelectAll","handleClickOnClearAll","useCallback","stopPropagation","handleOnMouseDown","React","StyledHeaderListWrapper","StyledSelectedItems","ActionButtons","StyledButton","ComboboxDataTestid","SELECT_ALL_BUTTON","StyledSeparator","CLEAR_ALL_BUTTON"],"mappings":";;;;;;;;;;;;;;;;;IAOMA,UAAU,GAAG,SAAbA,UAAa,GAAmB;
|
|
1
|
+
{"version":3,"file":"HeaderList.js","sources":["../../../../../../src/ComboBox/v3/parts/header-list/HeaderList.tsx"],"sourcesContent":["import React, { useContext, useCallback } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledHeaderListWrapper, StyledSelectedItems, ActionButtons, StyledButton, StyledSeparator } from './styled';\nimport { CBOptionT } from '../../index.d';\nimport { getSelectableOptions } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nconst HeaderList = (): JSX.Element => {\n const {\n props: { onSelectAll, onClearAll, selectedValues, options },\n inputRef,\n setShowPopover,\n } = useContext(ComboBoxContext);\n\n const multiSelectedValues = selectedValues as CBOptionT[];\n const selectableOptions = getSelectableOptions(options);\n const handleOnBlurSelectAll = (e) => {\n if (!onClearAll || multiSelectedValues.length === 0) {\n e.preventDefault();\n inputRef.current.focus();\n }\n };\n\n const handleOnBlurClearAll = (e) => {\n e.preventDefault();\n inputRef.current.focus();\n };\n\n const handleClickOnSelectAll = () => {\n onSelectAll();\n inputRef.current.focus();\n setShowPopover(false);\n };\n\n const handleClickOnClearAll = useCallback(\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n onClearAll();\n inputRef.current.focus();\n },\n [inputRef, onClearAll],\n );\n\n const handleOnMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n return (\n <StyledHeaderListWrapper onMouseDown={handleOnMouseDown}>\n <StyledSelectedItems>{`${multiSelectedValues.length} Selected`}</StyledSelectedItems>\n <ActionButtons>\n {onSelectAll && (\n <StyledButton\n disabled={selectableOptions.length === multiSelectedValues.length}\n tabIndex={0}\n data-testid={ComboboxDataTestid.SELECT_ALL_BUTTON}\n buttonType=\"text\"\n labelText=\"All\"\n size=\"s\"\n onMouseDown={handleOnMouseDown}\n onBlur={handleOnBlurSelectAll}\n onClick={handleClickOnSelectAll}\n />\n )}\n {onSelectAll && onClearAll && (\n <StyledSeparator orientation=\"vertical\" position=\"center\" type=\"group-level\" margin=\"none\" />\n )}\n {onClearAll && (\n <StyledButton\n disabled={multiSelectedValues.length === 0}\n tabIndex={0}\n data-testid={ComboboxDataTestid.CLEAR_ALL_BUTTON}\n buttonType=\"text\"\n labelText=\"Clear\"\n size=\"s\"\n onMouseDown={handleOnMouseDown}\n onBlur={handleOnBlurClearAll}\n onClick={handleClickOnClearAll}\n />\n )}\n </ActionButtons>\n </StyledHeaderListWrapper>\n );\n};\n\nexport { HeaderList };\n"],"names":["HeaderList","useContext","ComboBoxContext","props","onSelectAll","onClearAll","selectedValues","options","inputRef","setShowPopover","multiSelectedValues","selectableOptions","getSelectableOptions","handleOnBlurSelectAll","e","length","preventDefault","current","focus","handleOnBlurClearAll","handleClickOnSelectAll","handleClickOnClearAll","useCallback","stopPropagation","handleOnMouseDown","React","StyledHeaderListWrapper","StyledSelectedItems","ActionButtons","StyledButton","ComboboxDataTestid","SELECT_ALL_BUTTON","StyledSeparator","CLEAR_ALL_BUTTON"],"mappings":";;;;;;;;;;;;;;;;;IAOMA,UAAU,GAAG,SAAbA,UAAa,GAAmB;EACpC,kBAIIC,gBAAU,CAACC,uCAAD,CAJd;sCACEC,KADF;MACWC,WADX,qBACWA,WADX;MACwBC,UADxB,qBACwBA,UADxB;MACoCC,cADpC,qBACoCA,cADpC;MACoDC,OADpD,qBACoDA,OADpD;MAEEC,QAFF,eAEEA,QAFF;MAGEC,cAHF,eAGEA,cAHF;;EAMA,IAAMC,mBAAmB,GAAGJ,cAA5B;EACA,IAAMK,iBAAiB,GAAGC,iDAAoB,CAACL,OAAD,CAA9C;;EACA,IAAMM,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,CAAD,EAAO;IACnC,IAAI,CAACT,UAAD,IAAeK,mBAAmB,CAACK,MAApB,KAA+B,CAAlD,EAAqD;MACnDD,CAAC,CAACE,cAAF;MACAR,QAAQ,CAACS,OAAT,CAAiBC,KAAjB;;GAHJ;;EAOA,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACL,CAAD,EAAO;IAClCA,CAAC,CAACE,cAAF;IACAR,QAAQ,CAACS,OAAT,CAAiBC,KAAjB;GAFF;;EAKA,IAAME,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAM;IACnChB,WAAW;IACXI,QAAQ,CAACS,OAAT,CAAiBC,KAAjB;IACAT,cAAc,CAAC,KAAD,CAAd;GAHF;;EAMA,IAAMY,qBAAqB,GAAGC,iBAAW,CACvC,UAACR,CAAD,EAAO;IACLA,CAAC,CAACE,cAAF;IACAF,CAAC,CAACS,eAAF;IACAlB,UAAU;IACVG,QAAQ,CAACS,OAAT,CAAiBC,KAAjB;GALqC,EAOvC,CAACV,QAAD,EAAWH,UAAX,CAPuC,CAAzC;EAUA,IAAMmB,iBAAiB,GAAGF,iBAAW,CAAC,UAACR,CAAD,EAAO;IAC3CA,CAAC,CAACE,cAAF;GADmC,EAElC,EAFkC,CAArC;EAIA,oBACES,wCAACC,2DAAD;IAAyB,WAAW,EAAEF;kBACpCC,wCAACE,uDAAD,kBAAyBjB,mBAAmB,CAACK,MAA7C,eADF,eAEEU,wCAACG,iDAAD,QACGxB,WAAW,iBACVqB,wCAACI,gDAAD;IACE,QAAQ,EAAElB,iBAAiB,CAACI,MAAlB,KAA6BL,mBAAmB,CAACK,MAD7D;IAEE,QAAQ,EAAE,CAFZ;IAGE,eAAae,kDAAkB,CAACC,iBAHlC;IAIE,UAAU,EAAC,MAJb;IAKE,SAAS,EAAC,KALZ;IAME,IAAI,EAAC,GANP;IAOE,WAAW,EAAEP,iBAPf;IAQE,MAAM,EAAEX,qBARV;IASE,OAAO,EAAEO;IAXf,EAcGhB,WAAW,IAAIC,UAAf,iBACCoB,wCAACO,mDAAD;IAAiB,WAAW,EAAC,UAA7B;IAAwC,QAAQ,EAAC,QAAjD;IAA0D,IAAI,EAAC,aAA/D;IAA6E,MAAM,EAAC;IAfxF,EAiBG3B,UAAU,iBACToB,wCAACI,gDAAD;IACE,QAAQ,EAAEnB,mBAAmB,CAACK,MAApB,KAA+B,CAD3C;IAEE,QAAQ,EAAE,CAFZ;IAGE,eAAae,kDAAkB,CAACG,gBAHlC;IAIE,UAAU,EAAC,MAJb;IAKE,SAAS,EAAC,OALZ;IAME,IAAI,EAAC,GANP;IAOE,WAAW,EAAET,iBAPf;IAQE,MAAM,EAAEL,oBARV;IASE,OAAO,EAAEE;IA3Bf,CAFF,CADF;AAoCD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/header-list/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport DSButton from '@elliemae/ds-button';\nimport DSSeparator from '@elliemae/ds-separator';\n\nexport const StyledHeaderListWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0px 16px;\n height: 28px;\n`;\n\nexport const ActionButtons = styled.div`\n display: inline-flex;\n align-items: center;\n\n color: ${(props) => props.theme.colors.neutral[500]};\n`;\n\nexport const StyledSeparator = styled(DSSeparator)`\n height: 50%;\n width: auto;\n`;\n\nexport const StyledButton = styled(DSButton)`\n padding: 0 ${(props) => props.theme.space.xxs};\n align-items: center;\n`;\n\nexport const StyledSelectedItems = styled.div`\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledHeaderListWrapper","styled","div","ActionButtons","props","theme","colors","neutral","StyledSeparator","DSSeparator","StyledButton","DSButton","space","xxs","StyledSelectedItems"],"mappings":";;;;;;;;;;;;;;IAIaA,uBAAuB,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/header-list/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport DSButton from '@elliemae/ds-button';\nimport DSSeparator from '@elliemae/ds-separator';\n\nexport const StyledHeaderListWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0px 16px;\n height: 28px;\n`;\n\nexport const ActionButtons = styled.div`\n display: inline-flex;\n align-items: center;\n\n color: ${(props) => props.theme.colors.neutral[500]};\n`;\n\nexport const StyledSeparator = styled(DSSeparator)`\n height: 50%;\n width: auto;\n`;\n\nexport const StyledButton = styled(DSButton)`\n padding: 0 ${(props) => props.theme.space.xxs};\n align-items: center;\n`;\n\nexport const StyledSelectedItems = styled.div`\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledHeaderListWrapper","styled","div","ActionButtons","props","theme","colors","neutral","StyledSeparator","DSSeparator","StyledButton","DSButton","space","xxs","StyledSelectedItems"],"mappings":";;;;;;;;;;;;;;IAIaA,uBAAuB,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;IAOvBC,aAAa,gBAAGF,0BAAM,CAACC,GAAV;EAAA;AAAA,2DAIf,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CAJe;IAObC,eAAe,gBAAGP,0BAAM,CAACQ,+BAAD,CAAT;EAAA;AAAA;IAKfC,YAAY,gBAAGT,0BAAM,CAACU,4BAAD,CAAT;EAAA;AAAA,2CACV,UAACP,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYO,KAAZ,CAAkBC,GAA7B;AAAA,CADU;IAKZC,mBAAmB,gBAAGb,0BAAM,CAACC,GAAV;EAAA;AAAA;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/MenuList.tsx"],"sourcesContent":["import React, { useContext, useCallback } from 'react';\nimport { getOptions } from '../../utils/listHelper';\nimport { StyledListWrapper, StyledList } from './styled';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { HeaderList } from '../header-list';\nimport { useOnElementResize } from '../../utils/hooks/useOnElementResize';\nimport { EmptyState } from '../empty-state';\nimport { useMenuList } from './useMenuList';\n\nconst MenuList = (): JSX.Element => {\n const {\n props: { inline, options, selectedValues },\n referenceElement,\n inputRef,\n listRef,\n showPopover,\n controlsWrapperRef,\n virtualListHelpers: { totalSize },\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const { ItemRenderer } = useMenuList();\n useOnElementResize(controlsWrapperRef);\n const listWidth = inline ? '100%' : `${referenceElement?.offsetWidth}px`;\n const selectableOptions = getOptions(options);\n\n const handleOnClick = useCallback(() => {\n inputRef?.current.focus();\n }, [inputRef]);\n\n return (\n <StyledListWrapper\n onMouseDown={(e) => e.preventDefault()}\n ref={listRef}\n width={listWidth}\n id=\"combo-listbox\"\n role=\"listbox\"\n >\n {!inline && multiple && options.length > 0 && <HeaderList />}\n {selectableOptions.length > 0 ? (\n <StyledList\n tabIndex={-1}\n aria-expanded={showPopover}\n onFocus={handleOnClick}\n data-testid={ComboboxDataTestid.LIST}\n style={{ height: totalSize }}\n >\n {ItemRenderer}\n </StyledList>\n ) : (\n <EmptyState />\n )}\n </StyledListWrapper>\n );\n};\n\nexport { MenuList };\n"],"names":["MenuList","useContext","ComboBoxContext","props","inline","options","selectedValues","referenceElement","inputRef","listRef","showPopover","controlsWrapperRef","totalSize","virtualListHelpers","multiple","Array","isArray","useMenuList","ItemRenderer","useOnElementResize","listWidth","offsetWidth","selectableOptions","getOptions","handleOnClick","useCallback","current","focus","React","StyledListWrapper","e","preventDefault","length","HeaderList","StyledList","ComboboxDataTestid","LIST","height","EmptyState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAUMA,QAAQ,GAAG,SAAXA,QAAW,GAAmB;
|
|
1
|
+
{"version":3,"file":"MenuList.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/MenuList.tsx"],"sourcesContent":["import React, { useContext, useCallback } from 'react';\nimport { getOptions } from '../../utils/listHelper';\nimport { StyledListWrapper, StyledList } from './styled';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { HeaderList } from '../header-list';\nimport { useOnElementResize } from '../../utils/hooks/useOnElementResize';\nimport { EmptyState } from '../empty-state';\nimport { useMenuList } from './useMenuList';\n\nconst MenuList = (): JSX.Element => {\n const {\n props: { inline, options, selectedValues },\n referenceElement,\n inputRef,\n listRef,\n showPopover,\n controlsWrapperRef,\n virtualListHelpers: { totalSize },\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const { ItemRenderer } = useMenuList();\n useOnElementResize(controlsWrapperRef);\n const listWidth = inline ? '100%' : `${referenceElement?.offsetWidth}px`;\n const selectableOptions = getOptions(options);\n\n const handleOnClick = useCallback(() => {\n inputRef?.current.focus();\n }, [inputRef]);\n\n return (\n <StyledListWrapper\n onMouseDown={(e) => e.preventDefault()}\n ref={listRef}\n width={listWidth}\n id=\"combo-listbox\"\n role=\"listbox\"\n >\n {!inline && multiple && options.length > 0 && <HeaderList />}\n {selectableOptions.length > 0 ? (\n <StyledList\n tabIndex={-1}\n aria-expanded={showPopover}\n onFocus={handleOnClick}\n data-testid={ComboboxDataTestid.LIST}\n style={{ height: totalSize }}\n >\n {ItemRenderer}\n </StyledList>\n ) : (\n <EmptyState />\n )}\n </StyledListWrapper>\n );\n};\n\nexport { MenuList };\n"],"names":["MenuList","useContext","ComboBoxContext","props","inline","options","selectedValues","referenceElement","inputRef","listRef","showPopover","controlsWrapperRef","totalSize","virtualListHelpers","multiple","Array","isArray","useMenuList","ItemRenderer","useOnElementResize","listWidth","offsetWidth","selectableOptions","getOptions","handleOnClick","useCallback","current","focus","React","StyledListWrapper","e","preventDefault","length","HeaderList","StyledList","ComboboxDataTestid","LIST","height","EmptyState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAUMA,QAAQ,GAAG,SAAXA,QAAW,GAAmB;EAClC,kBAQIC,gBAAU,CAACC,uCAAD,CARd;sCACEC,KADF;MACWC,MADX,qBACWA,MADX;MACmBC,OADnB,qBACmBA,OADnB;MAC4BC,cAD5B,qBAC4BA,cAD5B;MAEEC,gBAFF,eAEEA,gBAFF;MAGEC,QAHF,eAGEA,QAHF;MAIEC,OAJF,eAIEA,OAJF;MAKEC,WALF,eAKEA,WALF;MAMEC,kBANF,eAMEA,kBANF;MAOwBC,SAPxB,eAOEC,kBAPF,CAOwBD,SAPxB;;EAUA,IAAME,QAAQ,GAAGC,KAAK,CAACC,OAAN,CAAcV,cAAd,CAAjB;;EACA,mBAAyBW,kDAAW,EAApC;MAAQC,YAAR,gBAAQA,YAAR;;EACAC,6DAAkB,CAACR,kBAAD,CAAlB;EACA,IAAMS,SAAS,GAAGhB,MAAM,GAAG,MAAH,aAAeG,gBAAf,aAAeA,gBAAf,uBAAeA,gBAAgB,CAAEc,WAAjC,OAAxB;EACA,IAAMC,iBAAiB,GAAGC,uCAAU,CAAClB,OAAD,CAApC;EAEA,IAAMmB,aAAa,GAAGC,iBAAW,CAAC,YAAM;IACtCjB,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAEkB,OAAV,CAAkBC,KAAlB;GAD+B,EAE9B,CAACnB,QAAD,CAF8B,CAAjC;EAIA,oBACEoB,wCAACC,mDAAD;IACE,WAAW,EAAE,qBAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,cAAF,EAAP;KADf;IAEE,GAAG,EAAEtB,OAFP;IAGE,KAAK,EAAEW,SAHT;IAIE,EAAE,EAAC,eAJL;IAKE,IAAI,EAAC;KAEJ,CAAChB,MAAD,IAAWU,QAAX,IAAuBT,OAAO,CAAC2B,MAAR,GAAiB,CAAxC,iBAA6CJ,wCAACK,kDAAD,OAPhD,EAQGX,iBAAiB,CAACU,MAAlB,GAA2B,CAA3B,gBACCJ,wCAACM,4CAAD;IACE,QAAQ,EAAE,CAAC,CADb;IAEE,iBAAexB,WAFjB;IAGE,OAAO,EAAEc,aAHX;IAIE,eAAaW,kDAAkB,CAACC,IAJlC;IAKE,KAAK,EAAE;MAAEC,MAAM,EAAEzB;;KAEhBM,YAPH,CADD,gBAWCU,wCAACU,6CAAD,OAnBJ,CADF;AAwBD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledListWrapper = styled.div<{ width: string | number }>`\n width: ${(props) => props.width};\n overflow-y: auto;\n max-height: 300px;\n`;\n\nexport const StyledList = styled.ul`\n position: relative;\n padding: 0;\n margin: 0;\n`;\n"],"names":["StyledListWrapper","styled","div","props","width","StyledList","ul"],"mappings":";;;;;;;;;;IAEaA,iBAAiB,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledListWrapper = styled.div<{ width: string | number }>`\n width: ${(props) => props.width};\n overflow-y: auto;\n max-height: 300px;\n`;\n\nexport const StyledList = styled.ul`\n position: relative;\n padding: 0;\n margin: 0;\n`;\n"],"names":["StyledListWrapper","styled","div","props","width","StyledList","ul"],"mappings":";;;;;;;;;;IAEaA,iBAAiB,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA,qDACnB,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAjB;AAAA,CADmB;IAMjBC,UAAU,gBAAGJ,0BAAM,CAACK,EAAV;EAAA;AAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuList.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/useMenuList.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { SingleMenuItem, MultiMenuItem, Section, Separator } from '@elliemae/ds-form';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { isSelected } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nconst useMenuList = (): any => {\n const {\n props: { options, onChange, selectedValues, onFilter },\n inputRef,\n setShowPopover,\n focusOptionIdx,\n virtualListHelpers: { virtualItems },\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const CBItem = multiple ? MultiMenuItem : SingleMenuItem;\n\n const handleClick = useCallback(\n (option, e) => {\n if (!multiple) {\n setShowPopover(false);\n inputRef.current.value = '';\n } else {\n onFilter(inputRef.current.value);\n }\n onChange(option);\n inputRef.current.focus();\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, onChange, setShowPopover, multiple, inputRef],\n );\n\n const handleOnMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n const ItemRenderer = useMemo(\n () =>\n virtualItems.map((vItem) => {\n const option = options[vItem.index];\n const generalProps = {\n wrapperStyles: { position: 'absolute', top: vItem.start, left: 0, width: '100%' },\n key: `${option.dsId}`,\n innerRef: vItem.measureRef,\n };\n if (option.type === 'section') {\n return <Section label={option.label} {...generalProps} />;\n }\n if (option.type === 'separator') {\n return <Separator {...generalProps} />;\n }\n if (option.type === 'option') {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={option.disabled}\n onClick={(e) => handleClick(option, e)}\n onMouseDown={handleOnMouseDown}\n isActive={option.dsId === focusOptionIdx}\n isSelected={isSelected(selectedValues, option)}\n />\n );\n }\n return <></>;\n }),\n [options, focusOptionIdx, selectedValues, inputRef, virtualItems],\n );\n\n return useMemo(\n () => ({\n ItemRenderer,\n }),\n [ItemRenderer],\n );\n};\n\nexport { useMenuList };\n"],"names":["useMenuList","useContext","ComboBoxContext","props","options","onChange","selectedValues","onFilter","inputRef","setShowPopover","focusOptionIdx","virtualItems","virtualListHelpers","multiple","Array","isArray","CBItem","MultiMenuItem","SingleMenuItem","handleClick","useCallback","option","e","current","value","focus","stopPropagation","preventDefault","handleOnMouseDown","ItemRenderer","useMemo","map","vItem","index","generalProps","wrapperStyles","position","top","start","left","width","key","dsId","innerRef","measureRef","type","React","Section","label","Separator","ComboboxDataTestid","OPTION","disabled","isSelected"],"mappings":";;;;;;;;;;;;;;;;IAOMA,WAAW,GAAG,SAAdA,WAAc,GAAW;
|
|
1
|
+
{"version":3,"file":"useMenuList.js","sources":["../../../../../../src/ComboBox/v3/parts/menu-list/useMenuList.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { SingleMenuItem, MultiMenuItem, Section, Separator } from '@elliemae/ds-form';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { isSelected } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nconst useMenuList = (): any => {\n const {\n props: { options, onChange, selectedValues, onFilter },\n inputRef,\n setShowPopover,\n focusOptionIdx,\n virtualListHelpers: { virtualItems },\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const CBItem = multiple ? MultiMenuItem : SingleMenuItem;\n\n const handleClick = useCallback(\n (option, e) => {\n if (!multiple) {\n setShowPopover(false);\n inputRef.current.value = '';\n } else {\n onFilter(inputRef.current.value);\n }\n onChange(option);\n inputRef.current.focus();\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, onChange, setShowPopover, multiple, inputRef],\n );\n\n const handleOnMouseDown = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n const ItemRenderer = useMemo(\n () =>\n virtualItems.map((vItem) => {\n const option = options[vItem.index];\n const generalProps = {\n wrapperStyles: { position: 'absolute', top: vItem.start, left: 0, width: '100%' },\n key: `${option.dsId}`,\n innerRef: vItem.measureRef,\n };\n if (option.type === 'section') {\n return <Section label={option.label} {...generalProps} />;\n }\n if (option.type === 'separator') {\n return <Separator {...generalProps} />;\n }\n if (option.type === 'option') {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={option.disabled}\n onClick={(e) => handleClick(option, e)}\n onMouseDown={handleOnMouseDown}\n isActive={option.dsId === focusOptionIdx}\n isSelected={isSelected(selectedValues, option)}\n />\n );\n }\n return <></>;\n }),\n [options, focusOptionIdx, selectedValues, inputRef, virtualItems],\n );\n\n return useMemo(\n () => ({\n ItemRenderer,\n }),\n [ItemRenderer],\n );\n};\n\nexport { useMenuList };\n"],"names":["useMenuList","useContext","ComboBoxContext","props","options","onChange","selectedValues","onFilter","inputRef","setShowPopover","focusOptionIdx","virtualItems","virtualListHelpers","multiple","Array","isArray","CBItem","MultiMenuItem","SingleMenuItem","handleClick","useCallback","option","e","current","value","focus","stopPropagation","preventDefault","handleOnMouseDown","ItemRenderer","useMemo","map","vItem","index","generalProps","wrapperStyles","position","top","start","left","width","key","dsId","innerRef","measureRef","type","React","Section","label","Separator","ComboboxDataTestid","OPTION","disabled","isSelected"],"mappings":";;;;;;;;;;;;;;;;IAOMA,WAAW,GAAG,SAAdA,WAAc,GAAW;EAC7B,kBAMIC,gBAAU,CAACC,uCAAD,CANd;sCACEC,KADF;MACWC,OADX,qBACWA,OADX;MACoBC,QADpB,qBACoBA,QADpB;MAC8BC,cAD9B,qBAC8BA,cAD9B;MAC8CC,QAD9C,qBAC8CA,QAD9C;MAEEC,QAFF,eAEEA,QAFF;MAGEC,cAHF,eAGEA,cAHF;MAIEC,cAJF,eAIEA,cAJF;MAKwBC,YALxB,eAKEC,kBALF,CAKwBD,YALxB;;EAQA,IAAME,QAAQ,GAAGC,KAAK,CAACC,OAAN,CAAcT,cAAd,CAAjB;EACA,IAAMU,MAAM,GAAGH,QAAQ,GAAGI,oBAAH,GAAmBC,qBAA1C;EAEA,IAAMC,WAAW,GAAGC,iBAAW,CAC7B,UAACC,MAAD,EAASC,CAAT,EAAe;IACb,IAAI,CAACT,QAAL,EAAe;MACbJ,cAAc,CAAC,KAAD,CAAd;MACAD,QAAQ,CAACe,OAAT,CAAiBC,KAAjB,GAAyB,EAAzB;KAFF,MAGO;MACLjB,QAAQ,CAACC,QAAQ,CAACe,OAAT,CAAiBC,KAAlB,CAAR;;;IAEFnB,QAAQ,CAACgB,MAAD,CAAR;IACAb,QAAQ,CAACe,OAAT,CAAiBE,KAAjB;IACAH,CAAC,CAACI,eAAF;IACAJ,CAAC,CAACK,cAAF;GAX2B,EAa7B,CAACpB,QAAD,EAAWF,QAAX,EAAqBI,cAArB,EAAqCI,QAArC,EAA+CL,QAA/C,CAb6B,CAA/B;EAgBA,IAAMoB,iBAAiB,GAAGR,iBAAW,CAAC,UAACE,CAAD,EAAO;IAC3CA,CAAC,CAACK,cAAF;GADmC,EAElC,EAFkC,CAArC;EAIA,IAAME,YAAY,GAAGC,aAAO,CAC1B;IAAA,OACEnB,YAAY,CAACoB,GAAb,CAAiB,UAACC,KAAD,EAAW;MAC1B,IAAMX,MAAM,GAAGjB,OAAO,CAAC4B,KAAK,CAACC,KAAP,CAAtB;MACA,IAAMC,YAAY,GAAG;QACnBC,aAAa,EAAE;UAAEC,QAAQ,EAAE,UAAZ;UAAwBC,GAAG,EAAEL,KAAK,CAACM,KAAnC;UAA0CC,IAAI,EAAE,CAAhD;UAAmDC,KAAK,EAAE;SADtD;QAEnBC,GAAG,YAAKpB,MAAM,CAACqB,IAAZ,CAFgB;QAGnBC,QAAQ,EAAEX,KAAK,CAACY;OAHlB;;MAKA,IAAIvB,MAAM,CAACwB,IAAP,KAAgB,SAApB,EAA+B;QAC7B,oBAAOC,wCAACC,cAAD;UAAS,KAAK,EAAE1B,MAAM,CAAC2B;WAAWd,YAAlC,EAAP;;;MAEF,IAAIb,MAAM,CAACwB,IAAP,KAAgB,WAApB,EAAiC;QAC/B,oBAAOC,wCAACG,gBAAD,EAAef,YAAf,CAAP;;;MAEF,IAAIb,MAAM,CAACwB,IAAP,KAAgB,QAApB,EAA8B;QAC5B,oBACEC,wCAAC,MAAD,mCACMZ,YADN;UAEE,KAAK,EAAEb,MAAM,CAACG,KAFhB;UAGE,KAAK,EAAEH,MAAM,CAAC2B,KAHhB;UAIE,UAAU,EAAEE,kDAAkB,CAACC,MAJjC;UAKE,QAAQ,EAAE9B,MAAM,CAAC+B,QALnB;UAME,OAAO,EAAE,iBAAC9B,CAAD;YAAA,OAAOH,WAAW,CAACE,MAAD,EAASC,CAAT,CAAlB;WANX;UAOE,WAAW,EAAEM,iBAPf;UAQE,QAAQ,EAAEP,MAAM,CAACqB,IAAP,KAAgBhC,cAR5B;UASE,UAAU,EAAE2C,uCAAU,CAAC/C,cAAD,EAAiBe,MAAjB;WAV1B;;;MAcF,oBAAOyB,iFAAP;KA5BF,CADF;GAD0B,EAgC1B,CAAC1C,OAAD,EAAUM,cAAV,EAA0BJ,cAA1B,EAA0CE,QAA1C,EAAoDG,YAApD,CAhC0B,CAA5B;EAmCA,OAAOmB,aAAO,CACZ;IAAA,OAAO;MACLD,YAAY,EAAZA;KADF;GADY,EAIZ,CAACA,YAAD,CAJY,CAAd;AAMD;;;;"}
|
package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectedValuesContainer.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.tsx"],"sourcesContent":["import React, { useMemo, useContext, useRef } from 'react';\nimport Grid from '@elliemae/ds-grid';\n\nimport { DSPillGroupV2, DSPillV2 } from '@elliemae/ds-pills';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { useGroupPills } from './useGroupPills';\nimport { CBOptionT } from '../../index.d';\nimport { MultiAllyMessages } from '../a11y-messages';\nconst MultiSelectedValuesContainer = (): JSX.Element => {\n const {\n props: { onChange, selectedValues },\n inputRef,\n } = useContext(ComboBoxContext);\n\n const pillGroupRef = useRef<HTMLDivElement>(null);\n const multiSelectedValue = selectedValues as CBOptionT[];\n const pillsToShow = useGroupPills(pillGroupRef);\n const correctPillsToShow = pillsToShow || 1;\n\n const handleClick = (e) => {\n // prevent toggle drowpdown on pills remove\n e.stopPropagation();\n };\n\n const pills = useMemo(() => {\n const handleRemove = (option) => {\n onChange(option);\n inputRef.current.focus();\n };\n return (\n <Grid onClick={handleClick} style={{ width: 'max-content' }}>\n <DSPillGroupV2 innerRef={pillGroupRef}>\n {multiSelectedValue.length > 0 &&\n multiSelectedValue\n .slice(0, correctPillsToShow)\n .map((option) => (\n <DSPillV2\n labelTruncated={inputRef.current.value === '' || correctPillsToShow !== pillsToShow}\n key={option.value}\n label={option.label}\n type=\"removable\"\n onRemove={() => handleRemove(option)}\n />\n ))}\n {multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && (\n <DSPillV2\n labelTruncated={false}\n key=\"grouped\"\n label={`+${multiSelectedValue.length - correctPillsToShow}`}\n type=\"value\"\n tooltipValue={multiSelectedValue\n .slice(correctPillsToShow)\n .map((val) => val.label)\n .join(', ')}\n />\n )}\n </DSPillGroupV2>\n </Grid>\n );\n }, [pillsToShow, onChange, inputRef, multiSelectedValue, correctPillsToShow]);\n\n return (\n <>\n {multiSelectedValue.length > 0 && !inputRef.current.value && <MultiAllyMessages />}\n {pills}\n </>\n );\n};\n\nexport { MultiSelectedValuesContainer };\n"],"names":["MultiSelectedValuesContainer","useContext","ComboBoxContext","props","onChange","selectedValues","inputRef","pillGroupRef","useRef","multiSelectedValue","pillsToShow","useGroupPills","correctPillsToShow","handleClick","e","stopPropagation","pills","useMemo","handleRemove","option","current","focus","React","Grid","width","DSPillGroupV2","length","slice","map","DSPillV2","value","label","val","join","MultiAllyMessages"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQMA,4BAA4B,GAAG,SAA/BA,4BAA+B,GAAmB;
|
|
1
|
+
{"version":3,"file":"MultiSelectedValuesContainer.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.tsx"],"sourcesContent":["import React, { useMemo, useContext, useRef } from 'react';\nimport Grid from '@elliemae/ds-grid';\n\nimport { DSPillGroupV2, DSPillV2 } from '@elliemae/ds-pills';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { useGroupPills } from './useGroupPills';\nimport { CBOptionT } from '../../index.d';\nimport { MultiAllyMessages } from '../a11y-messages';\nconst MultiSelectedValuesContainer = (): JSX.Element => {\n const {\n props: { onChange, selectedValues },\n inputRef,\n } = useContext(ComboBoxContext);\n\n const pillGroupRef = useRef<HTMLDivElement>(null);\n const multiSelectedValue = selectedValues as CBOptionT[];\n const pillsToShow = useGroupPills(pillGroupRef);\n const correctPillsToShow = pillsToShow || 1;\n\n const handleClick = (e) => {\n // prevent toggle drowpdown on pills remove\n e.stopPropagation();\n };\n\n const pills = useMemo(() => {\n const handleRemove = (option) => {\n onChange(option);\n inputRef.current.focus();\n };\n return (\n <Grid onClick={handleClick} style={{ width: 'max-content' }}>\n <DSPillGroupV2 innerRef={pillGroupRef}>\n {multiSelectedValue.length > 0 &&\n multiSelectedValue\n .slice(0, correctPillsToShow)\n .map((option) => (\n <DSPillV2\n labelTruncated={inputRef.current.value === '' || correctPillsToShow !== pillsToShow}\n key={option.value}\n label={option.label}\n type=\"removable\"\n onRemove={() => handleRemove(option)}\n />\n ))}\n {multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && (\n <DSPillV2\n labelTruncated={false}\n key=\"grouped\"\n label={`+${multiSelectedValue.length - correctPillsToShow}`}\n type=\"value\"\n tooltipValue={multiSelectedValue\n .slice(correctPillsToShow)\n .map((val) => val.label)\n .join(', ')}\n />\n )}\n </DSPillGroupV2>\n </Grid>\n );\n }, [pillsToShow, onChange, inputRef, multiSelectedValue, correctPillsToShow]);\n\n return (\n <>\n {multiSelectedValue.length > 0 && !inputRef.current.value && <MultiAllyMessages />}\n {pills}\n </>\n );\n};\n\nexport { MultiSelectedValuesContainer };\n"],"names":["MultiSelectedValuesContainer","useContext","ComboBoxContext","props","onChange","selectedValues","inputRef","pillGroupRef","useRef","multiSelectedValue","pillsToShow","useGroupPills","correctPillsToShow","handleClick","e","stopPropagation","pills","useMemo","handleRemove","option","current","focus","React","Grid","width","DSPillGroupV2","length","slice","map","DSPillV2","value","label","val","join","MultiAllyMessages"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQMA,4BAA4B,GAAG,SAA/BA,4BAA+B,GAAmB;EACtD,kBAGIC,gBAAU,CAACC,uCAAD,CAHd;sCACEC,KADF;MACWC,QADX,qBACWA,QADX;MACqBC,cADrB,qBACqBA,cADrB;MAEEC,QAFF,eAEEA,QAFF;;EAKA,IAAMC,YAAY,GAAGC,YAAM,CAAiB,IAAjB,CAA3B;EACA,IAAMC,kBAAkB,GAAGJ,cAA3B;EACA,IAAMK,WAAW,GAAGC,0EAAa,CAACJ,YAAD,CAAjC;EACA,IAAMK,kBAAkB,GAAGF,WAAW,IAAI,CAA1C;;EAEA,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAACC,CAAD,EAAO;;IAEzBA,CAAC,CAACC,eAAF;GAFF;;EAKA,IAAMC,KAAK,GAAGC,aAAO,CAAC,YAAM;IAC1B,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,MAAD,EAAY;MAC/Bf,QAAQ,CAACe,MAAD,CAAR;MACAb,QAAQ,CAACc,OAAT,CAAiBC,KAAjB;KAFF;;IAIA,oBACEC,wCAACC,wBAAD;MAAM,OAAO,EAAEV,WAAf;MAA4B,KAAK,EAAE;QAAEW,KAAK,EAAE;;oBAC1CF,wCAACG,qBAAD;MAAe,QAAQ,EAAElB;OACtBE,kBAAkB,CAACiB,MAAnB,GAA4B,CAA5B,IACCjB,kBAAkB,CACfkB,KADH,CACS,CADT,EACYf,kBADZ,EAEGgB,GAFH,CAEO,UAACT,MAAD;MAAA,oBACHG,wCAACO,gBAAD;QACE,cAAc,EAAEvB,QAAQ,CAACc,OAAT,CAAiBU,KAAjB,KAA2B,EAA3B,IAAiClB,kBAAkB,KAAKF,WAD1E;QAEE,GAAG,EAAES,MAAM,CAACW,KAFd;QAGE,KAAK,EAAEX,MAAM,CAACY,KAHhB;QAIE,IAAI,EAAC,WAJP;QAKE,QAAQ,EAAE;UAAA,OAAMb,YAAY,CAACC,MAAD,CAAlB;;QANT;KAFP,CAFJ,EAaGV,kBAAkB,CAACiB,MAAnB,GAA4B,CAA5B,IAAiCd,kBAAkB,KAAKH,kBAAkB,CAACiB,MAA3E,iBACCJ,wCAACO,gBAAD;MACE,cAAc,EAAE,KADlB;MAEE,GAAG,EAAC,SAFN;MAGE,KAAK,aAAMpB,kBAAkB,CAACiB,MAAnB,GAA4Bd,kBAAlC,CAHP;MAIE,IAAI,EAAC,OAJP;MAKE,YAAY,EAAEH,kBAAkB,CAC7BkB,KADW,CACLf,kBADK,EAEXgB,GAFW,CAEP,UAACI,GAAD;QAAA,OAASA,GAAG,CAACD,KAAb;OAFO,EAGXE,IAHW,CAGN,IAHM;MAnBpB,CADF,CADF;GALmB,EAmClB,CAACvB,WAAD,EAAcN,QAAd,EAAwBE,QAAxB,EAAkCG,kBAAlC,EAAsDG,kBAAtD,CAnCkB,CAArB;EAqCA,oBACEU,kFACGb,kBAAkB,CAACiB,MAAnB,GAA4B,CAA5B,IAAiC,CAACpB,QAAQ,CAACc,OAAT,CAAiBU,KAAnD,iBAA4DR,wCAACY,kEAAD,OAD/D,EAEGlB,KAFH,CADF;AAMD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledGroupedPillPopoverContent = styled.div`\n padding: 10px;\n background-color: #fff;\n`;\n\nexport const StyledGroupPillWrapper = styled.div``;\n\nexport const StyledA11ySelectedValues = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledGroupedPillPopoverContent","styled","div","StyledGroupPillWrapper","StyledA11ySelectedValues","span"],"mappings":";;;;;;;;;;IAEaA,+BAA+B,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledGroupedPillPopoverContent = styled.div`\n padding: 10px;\n background-color: #fff;\n`;\n\nexport const StyledGroupPillWrapper = styled.div``;\n\nexport const StyledA11ySelectedValues = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledGroupedPillPopoverContent","styled","div","StyledGroupPillWrapper","StyledA11ySelectedValues","span"],"mappings":";;;;;;;;;;IAEaA,+BAA+B,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;IAK/BC,sBAAsB,gBAAGF,0BAAM,CAACC,GAAV;EAAA;AAAA;IAEtBE,wBAAwB,gBAAGH,0BAAM,CAACI,IAAV;EAAA;AAAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGroupPills.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useLayoutEffect } from 'react';\nimport { useOnElementResize } from '../../utils/hooks/useOnElementResize';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { CBOptionT } from '../../index.d';\n\nconst getGroupedPillWidth = (remainingPills: number): number => {\n if (remainingPills === 0) return 0;\n const digits = remainingPills.toString().length;\n return 8 * (digits - 1) + 31;\n};\nconst useGroupPills = (pillGroupRef: React.MutableRefObject<HTMLDivElement>): number => {\n const {\n props: { selectedValues },\n selectedOptionsRef,\n controlsWrapperRef,\n } = useContext(ComboBoxContext);\n\n const multiSelectedValues = selectedValues as CBOptionT[];\n const [pillsToShow, setPillsToShow] = useState(multiSelectedValues.length);\n const { width } = useOnElementResize(controlsWrapperRef);\n useEffect(() => {\n if (multiSelectedValues.length !== pillsToShow) {\n setPillsToShow(multiSelectedValues.length);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [multiSelectedValues.length, width]);\n\n useLayoutEffect(() => {\n if (selectedOptionsRef.current) {\n pillGroupRef.current.style.width = 'max-content';\n let lastPillFit = -1;\n let currentWidth = 0;\n const referenceWidth = selectedOptionsRef.current.offsetWidth;\n const pills: HTMLDivElement[] = [\n ...selectedOptionsRef.current.querySelectorAll('.ds-pill-wrapper-removable'),\n ] as HTMLDivElement[];\n const pillsWidth = pills.map((pill) => pill?.offsetWidth);\n pillsWidth.forEach((pillWidth, idx) => {\n currentWidth += pillWidth;\n if (currentWidth + getGroupedPillWidth(multiSelectedValues.length - idx - 1) <= referenceWidth) {\n lastPillFit = idx;\n }\n });\n const nextPillsToShow = lastPillFit + 1;\n\n if (nextPillsToShow !== pillsToShow) {\n setPillsToShow(nextPillsToShow);\n }\n pillGroupRef.current.style.width = 'fit-content';\n }\n }, [selectedOptionsRef, multiSelectedValues, pillsToShow, pillGroupRef, width]);\n\n return pillsToShow;\n};\n\nexport { useGroupPills };\n"],"names":["getGroupedPillWidth","remainingPills","digits","toString","length","useGroupPills","pillGroupRef","useContext","ComboBoxContext","selectedValues","props","selectedOptionsRef","controlsWrapperRef","multiSelectedValues","useState","pillsToShow","setPillsToShow","useOnElementResize","width","useEffect","useLayoutEffect","current","style","lastPillFit","currentWidth","referenceWidth","offsetWidth","pills","querySelectorAll","pillsWidth","map","pill","forEach","pillWidth","idx","nextPillsToShow"],"mappings":";;;;;;;;;;;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,cAAD,EAAoC;
|
|
1
|
+
{"version":3,"file":"useGroupPills.js","sources":["../../../../../../src/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useLayoutEffect } from 'react';\nimport { useOnElementResize } from '../../utils/hooks/useOnElementResize';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { CBOptionT } from '../../index.d';\n\nconst getGroupedPillWidth = (remainingPills: number): number => {\n if (remainingPills === 0) return 0;\n const digits = remainingPills.toString().length;\n return 8 * (digits - 1) + 31;\n};\nconst useGroupPills = (pillGroupRef: React.MutableRefObject<HTMLDivElement>): number => {\n const {\n props: { selectedValues },\n selectedOptionsRef,\n controlsWrapperRef,\n } = useContext(ComboBoxContext);\n\n const multiSelectedValues = selectedValues as CBOptionT[];\n const [pillsToShow, setPillsToShow] = useState(multiSelectedValues.length);\n const { width } = useOnElementResize(controlsWrapperRef);\n useEffect(() => {\n if (multiSelectedValues.length !== pillsToShow) {\n setPillsToShow(multiSelectedValues.length);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [multiSelectedValues.length, width]);\n\n useLayoutEffect(() => {\n if (selectedOptionsRef.current) {\n pillGroupRef.current.style.width = 'max-content';\n let lastPillFit = -1;\n let currentWidth = 0;\n const referenceWidth = selectedOptionsRef.current.offsetWidth;\n const pills: HTMLDivElement[] = [\n ...selectedOptionsRef.current.querySelectorAll('.ds-pill-wrapper-removable'),\n ] as HTMLDivElement[];\n const pillsWidth = pills.map((pill) => pill?.offsetWidth);\n pillsWidth.forEach((pillWidth, idx) => {\n currentWidth += pillWidth;\n if (currentWidth + getGroupedPillWidth(multiSelectedValues.length - idx - 1) <= referenceWidth) {\n lastPillFit = idx;\n }\n });\n const nextPillsToShow = lastPillFit + 1;\n\n if (nextPillsToShow !== pillsToShow) {\n setPillsToShow(nextPillsToShow);\n }\n pillGroupRef.current.style.width = 'fit-content';\n }\n }, [selectedOptionsRef, multiSelectedValues, pillsToShow, pillGroupRef, width]);\n\n return pillsToShow;\n};\n\nexport { useGroupPills };\n"],"names":["getGroupedPillWidth","remainingPills","digits","toString","length","useGroupPills","pillGroupRef","useContext","ComboBoxContext","selectedValues","props","selectedOptionsRef","controlsWrapperRef","multiSelectedValues","useState","pillsToShow","setPillsToShow","useOnElementResize","width","useEffect","useLayoutEffect","current","style","lastPillFit","currentWidth","referenceWidth","offsetWidth","pills","querySelectorAll","pillsWidth","map","pill","forEach","pillWidth","idx","nextPillsToShow"],"mappings":";;;;;;;;;;;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,cAAD,EAAoC;EAC9D,IAAIA,cAAc,KAAK,CAAvB,EAA0B,OAAO,CAAP;EAC1B,IAAMC,MAAM,GAAGD,cAAc,CAACE,QAAf,GAA0BC,MAAzC;EACA,OAAO,KAAKF,MAAM,GAAG,CAAd,IAAmB,EAA1B;AACD,CAJD;;IAKMG,aAAa,GAAG,SAAhBA,aAAgB,CAACC,YAAD,EAAkE;EACtF,kBAIIC,gBAAU,CAACC,uCAAD,CAJd;MACWC,cADX,eACEC,KADF,CACWD,cADX;MAEEE,kBAFF,eAEEA,kBAFF;MAGEC,kBAHF,eAGEA,kBAHF;;EAMA,IAAMC,mBAAmB,GAAGJ,cAA5B;;EACA,gBAAsCK,cAAQ,CAACD,mBAAmB,CAACT,MAArB,CAA9C;;MAAOW,WAAP;MAAoBC,cAApB;;EACA,0BAAkBC,6DAAkB,CAACL,kBAAD,CAApC;MAAQM,KAAR,uBAAQA,KAAR;;EACAC,eAAS,CAAC,YAAM;IACd,IAAIN,mBAAmB,CAACT,MAApB,KAA+BW,WAAnC,EAAgD;MAC9CC,cAAc,CAACH,mBAAmB,CAACT,MAArB,CAAd;KAFY;;GAAP,EAKN,CAACS,mBAAmB,CAACT,MAArB,EAA6Bc,KAA7B,CALM,CAAT;EAOAE,qBAAe,CAAC,YAAM;IACpB,IAAIT,kBAAkB,CAACU,OAAvB,EAAgC;MAC9Bf,YAAY,CAACe,OAAb,CAAqBC,KAArB,CAA2BJ,KAA3B,GAAmC,aAAnC;MACA,IAAIK,WAAW,GAAG,CAAC,CAAnB;MACA,IAAIC,YAAY,GAAG,CAAnB;MACA,IAAMC,cAAc,GAAGd,kBAAkB,CAACU,OAAnB,CAA2BK,WAAlD;;MACA,IAAMC,KAAuB,0CACxBhB,kBAAkB,CAACU,OAAnB,CAA2BO,gBAA3B,CAA4C,4BAA5C,CADwB,CAA7B;;MAGA,IAAMC,UAAU,GAAGF,KAAK,CAACG,GAAN,CAAU,UAACC,IAAD;QAAA,OAAUA,IAAV,aAAUA,IAAV,uBAAUA,IAAI,CAAEL,WAAhB;OAAV,CAAnB;MACAG,UAAU,CAACG,OAAX,CAAmB,UAACC,SAAD,EAAYC,GAAZ,EAAoB;QACrCV,YAAY,IAAIS,SAAhB;;QACA,IAAIT,YAAY,GAAGxB,mBAAmB,CAACa,mBAAmB,CAACT,MAApB,GAA6B8B,GAA7B,GAAmC,CAApC,CAAlC,IAA4ET,cAAhF,EAAgG;UAC9FF,WAAW,GAAGW,GAAd;;OAHJ;MAMA,IAAMC,eAAe,GAAGZ,WAAW,GAAG,CAAtC;;MAEA,IAAIY,eAAe,KAAKpB,WAAxB,EAAqC;QACnCC,cAAc,CAACmB,eAAD,CAAd;;;MAEF7B,YAAY,CAACe,OAAb,CAAqBC,KAArB,CAA2BJ,KAA3B,GAAmC,aAAnC;;GArBW,EAuBZ,CAACP,kBAAD,EAAqBE,mBAArB,EAA0CE,WAA1C,EAAuDT,YAAvD,EAAqEY,KAArE,CAvBY,CAAf;EAyBA,OAAOH,WAAP;AACD;;;;"}
|
package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectedValueContainer.js","sources":["../../../../../../src/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\n\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\n\nimport { StyledSingleSelectedValue } from './styled';\nconst SingleSelectedValueContainer = (): JSX.Element => {\n const {\n props: { selectedValues },\n showSelectedValue,\n } = useContext(ComboBoxContext);\n\n const singleSelectedValue = selectedValues as CBOptionT;\n return (\n <StyledSingleSelectedValue>\n {showSelectedValue ? <SimpleTruncatedTooltipText value={singleSelectedValue?.label} /> : null}\n </StyledSingleSelectedValue>\n );\n};\n\nexport { SingleSelectedValueContainer };\n"],"names":["SingleSelectedValueContainer","useContext","ComboBoxContext","selectedValues","props","showSelectedValue","singleSelectedValue","React","StyledSingleSelectedValue","SimpleTruncatedTooltipText","label"],"mappings":";;;;;;;;;;;;;;IAOMA,4BAA4B,GAAG,SAA/BA,4BAA+B,GAAmB;
|
|
1
|
+
{"version":3,"file":"SingleSelectedValueContainer.js","sources":["../../../../../../src/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\n\nimport { CBOptionT } from '../../index.d';\nimport ComboBoxContext from '../../ComboBoxCTX';\n\nimport { StyledSingleSelectedValue } from './styled';\nconst SingleSelectedValueContainer = (): JSX.Element => {\n const {\n props: { selectedValues },\n showSelectedValue,\n } = useContext(ComboBoxContext);\n\n const singleSelectedValue = selectedValues as CBOptionT;\n return (\n <StyledSingleSelectedValue>\n {showSelectedValue ? <SimpleTruncatedTooltipText value={singleSelectedValue?.label} /> : null}\n </StyledSingleSelectedValue>\n );\n};\n\nexport { SingleSelectedValueContainer };\n"],"names":["SingleSelectedValueContainer","useContext","ComboBoxContext","selectedValues","props","showSelectedValue","singleSelectedValue","React","StyledSingleSelectedValue","SimpleTruncatedTooltipText","label"],"mappings":";;;;;;;;;;;;;;IAOMA,4BAA4B,GAAG,SAA/BA,4BAA+B,GAAmB;EACtD,kBAGIC,gBAAU,CAACC,uCAAD,CAHd;MACWC,cADX,eACEC,KADF,CACWD,cADX;MAEEE,iBAFF,eAEEA,iBAFF;;EAKA,IAAMC,mBAAmB,GAAGH,cAA5B;EACA,oBACEI,wCAACC,+EAAD,QACGH,iBAAiB,gBAAGE,wCAACE,iDAAD;IAA4B,KAAK,EAAEH,mBAAF,aAAEA,mBAAF,uBAAEA,mBAAmB,CAAEI;IAA3D,GAAuE,IAD3F,CADF;AAKD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/single-selected-value-container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledSingleSelectedValue = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledSingleSelectedValue","styled","div"],"mappings":";;;;;;;;;;IAEaA,yBAAyB,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/ComboBox/v3/parts/single-selected-value-container/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledSingleSelectedValue = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n`;\n"],"names":["StyledSingleSelectedValue","styled","div"],"mappings":";;;;;;;;;;IAEaA,yBAAyB,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;;;;"}
|