@elliemae/ds-form 2.0.1 → 2.1.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Checkbox/DSCheckbox.js +4 -4
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/cjs/ComboBox/index.js +0 -3
- package/cjs/ComboBox/v1/DSComboBox.js +2 -2
- package/cjs/ComboBox/v1/components/AllOption.js +2 -2
- package/cjs/ComboBox/v1/components/Control.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v1/components/MenuList.js +2 -2
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v1/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v1/components/ValueContainer.js +2 -2
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +2 -2
- package/cjs/ComboBox/v2/Combobox.js +2 -2
- package/cjs/ComboBox/v2/components/AllOption.js +2 -2
- package/cjs/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/Content.js +2 -2
- package/cjs/ComboBox/v2/components/Control.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/GroupHeading.js +2 -2
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/cjs/ComboBox/v2/components/MenuList.js +2 -2
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v2/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v2/components/ValueContainer.js +2 -2
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/cjs/DateInput/DSDateInput.js +2 -2
- package/cjs/DateInput/components/DateInputImpl.js +2 -2
- package/cjs/DateInput/components/DateInputs.js +2 -2
- package/cjs/DateInputV2/components/DateInputs.js +2 -2
- package/cjs/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/cjs/FormItem/DSFormItemLayout.js +2 -2
- package/cjs/FormItem/ValidationFieldWrapper.js +2 -2
- package/cjs/Input/DSInput.js +2 -2
- package/cjs/Input/InputAddonWrapper.js +2 -2
- package/cjs/Input/InputImpl.js +2 -2
- package/cjs/InputGroup/AddonWrapper.js +2 -2
- package/cjs/InputMask/DSInputMask.js +2 -2
- package/cjs/InputMask/DSInputMaskDeprecated.js +2 -2
- package/cjs/InputMask/MaskTypes.js +2 -2
- package/cjs/InputMask/mask_types/DateInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/cjs/InputMask/mask_types/index.js +2 -2
- package/cjs/InputProtected/DSInputProtected.js +2 -2
- package/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
- package/cjs/MenuItem/components/Section/styled.js +2 -2
- package/cjs/MenuItem/components/Separator/styled.js +2 -2
- package/cjs/MenuItem/components/SubmenuItem/index.js +3 -3
- package/cjs/MenuItem/components/styled.js +4 -9
- package/cjs/Radio/DSRadio.js +11 -6
- package/cjs/RadioGroup/DSRadioGroup.js +2 -2
- package/cjs/SearchBox/SearchBoxToggle.js +2 -2
- package/cjs/SearchBox/withSearchable.js +2 -2
- package/cjs/TextBox/DSTextBox.js +2 -2
- package/cjs/TimeInput/DSTimeInput.js +2 -2
- package/cjs/TimeInput/TimeInputImpl.js +2 -2
- package/cjs/TimeInput/TimeInputs.js +2 -2
- package/cjs/Toggle/DSToggle.js +2 -2
- package/cjs/Toggle/DSToggleImpl.js +2 -2
- package/cjs/Toggle/DSToggleRender.js +2 -2
- package/cjs/index.js +0 -2
- package/esm/Checkbox/DSCheckbox.js +4 -4
- package/esm/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/esm/ComboBox/index.js +0 -1
- package/esm/ComboBox/v1/DSComboBox.js +2 -2
- package/esm/ComboBox/v1/components/AllOption.js +2 -2
- package/esm/ComboBox/v1/components/Control.js +2 -2
- package/esm/ComboBox/v1/components/CustomOption.js +2 -2
- package/esm/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v1/components/MenuList.js +2 -2
- package/esm/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v1/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v1/components/ValueContainer.js +2 -2
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +2 -2
- package/esm/ComboBox/v2/Combobox.js +2 -2
- package/esm/ComboBox/v2/components/AllOption.js +2 -2
- package/esm/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/esm/ComboBox/v2/components/Content.js +2 -2
- package/esm/ComboBox/v2/components/Control.js +2 -2
- package/esm/ComboBox/v2/components/CustomOption.js +2 -2
- package/esm/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v2/components/GroupHeading.js +2 -2
- package/esm/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/esm/ComboBox/v2/components/MenuList.js +2 -2
- package/esm/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v2/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v2/components/ValueContainer.js +2 -2
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
- package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/esm/DateInput/DSDateInput.js +2 -2
- package/esm/DateInput/components/DateInputImpl.js +2 -2
- package/esm/DateInput/components/DateInputs.js +2 -2
- package/esm/DateInputV2/components/DateInputs.js +2 -2
- package/esm/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
- package/esm/FormItem/DSFormItemLayout.js +2 -2
- package/esm/FormItem/ValidationFieldWrapper.js +2 -2
- package/esm/Input/DSInput.js +2 -2
- package/esm/Input/InputAddonWrapper.js +2 -2
- package/esm/Input/InputImpl.js +2 -2
- package/esm/InputGroup/AddonWrapper.js +2 -2
- package/esm/InputMask/DSInputMask.js +2 -2
- package/esm/InputMask/DSInputMaskDeprecated.js +2 -2
- package/esm/InputMask/MaskTypes.js +2 -2
- package/esm/InputMask/mask_types/DateInputMask.js +2 -2
- package/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/esm/InputMask/mask_types/NumberInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/esm/InputMask/mask_types/SsnInputMask.js +2 -2
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/esm/InputMask/mask_types/index.js +2 -2
- package/esm/InputProtected/DSInputProtected.js +2 -2
- package/esm/LargeInputText/DSLargeInputText.js +2 -2
- package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
- package/esm/MenuItem/components/Section/styled.js +2 -2
- package/esm/MenuItem/components/Separator/styled.js +2 -2
- package/esm/MenuItem/components/SubmenuItem/index.js +3 -3
- package/esm/MenuItem/components/styled.js +5 -9
- package/esm/Radio/DSRadio.js +11 -6
- package/esm/RadioGroup/DSRadioGroup.js +2 -2
- package/esm/SearchBox/SearchBoxToggle.js +2 -2
- package/esm/SearchBox/withSearchable.js +2 -2
- package/esm/TextBox/DSTextBox.js +2 -2
- package/esm/TimeInput/DSTimeInput.js +2 -2
- package/esm/TimeInput/TimeInputImpl.js +2 -2
- package/esm/TimeInput/TimeInputs.js +2 -2
- package/esm/Toggle/DSToggle.js +2 -2
- package/esm/Toggle/DSToggleImpl.js +2 -2
- package/esm/Toggle/DSToggleRender.js +2 -2
- package/esm/index.js +0 -1
- package/package.json +23 -207
- package/types/Checkbox/DSCheckbox.d.ts +36 -47
- package/types/Checkbox/props.d.ts +14 -14
- package/types/CheckboxGroup/DSCheckboxGroup.d.ts +12 -12
- package/types/CheckboxGroup/props.d.ts +12 -12
- package/types/ComboBox/index.d.ts +0 -1
- package/types/DateInput/DSDateInput.d.ts +32 -32
- package/types/DateInput/props.d.ts +64 -32
- package/types/DateInputV2/components/DSDateInput.d.ts +20 -20
- package/types/DateInputV2/components/props.d.ts +20 -20
- package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +38 -38
- package/types/FormItem/DSFormItemLayout.d.ts +112 -112
- package/types/FormItem/Error/DSError.d.ts +4 -4
- package/types/FormItem/defaultProps.d.ts +38 -38
- package/types/FormItem/props.d.ts +74 -74
- package/types/InputGroup/DSInputGroup.d.ts +14 -14
- package/types/InputGroup/props.d.ts +14 -14
- package/types/InputMask/DSInputMask.d.ts +54 -54
- package/types/InputMask/props.d.ts +54 -54
- package/types/InputProtected/DSInputProtected.d.ts +12 -12
- package/types/InputProtected/props.d.ts +12 -12
- package/types/LargeInputText/DSLargeInputText.d.ts +54 -54
- package/types/LargeInputText/props.d.ts +54 -54
- package/types/MenuItem/components/SubmenuItem/styled.d.ts +1 -1
- package/types/MenuItem/components/styled.d.ts +5 -3
- package/types/MenuItem/props.d.ts +4 -3
- package/types/Radio/DSRadio.d.ts +56 -46
- package/types/RadioGroup/DSRadioGroup.d.ts +12 -12
- package/types/RadioGroup/props.d.ts +12 -12
- package/types/SearchBox/DSSearchBox.d.ts +40 -40
- package/types/SearchBox/NavSearchBox.d.ts +24 -7
- package/types/SearchBox/SButton.d.ts +4 -4
- package/types/SearchBox/props.d.ts +44 -44
- package/types/TextBox/DSTextBox.d.ts +38 -38
- package/types/TimeInput/DSTimeInput.d.ts +22 -22
- package/types/Toggle/DSToggle.d.ts +22 -22
- package/cjs/ComboBox/v3/ComboBox.js +0 -33
- package/cjs/ComboBox/v3/ComboBoxCTX.js +0 -55
- package/cjs/ComboBox/v3/ComboboxDataTestids.js +0 -17
- package/cjs/ComboBox/v3/config/constants.js +0 -14
- package/cjs/ComboBox/v3/config/useComboBox.js +0 -122
- package/cjs/ComboBox/v3/config/useGetPropsWithDefault.js +0 -11
- package/cjs/ComboBox/v3/index.d.js +0 -2
- package/cjs/ComboBox/v3/index.js +0 -10
- package/cjs/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -33
- package/cjs/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -28
- package/cjs/ComboBox/v3/parts/a11y-messages/index.js +0 -11
- package/cjs/ComboBox/v3/parts/a11y-messages/styled.js +0 -15
- package/cjs/ComboBox/v3/parts/container/Container.js +0 -67
- package/cjs/ComboBox/v3/parts/container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/container/styled.js +0 -23
- package/cjs/ComboBox/v3/parts/controls/Controls.js +0 -71
- package/cjs/ComboBox/v3/parts/controls/index.js +0 -9
- package/cjs/ComboBox/v3/parts/controls/styled.js +0 -65
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -67
- package/cjs/ComboBox/v3/parts/controls-input/styled.js +0 -27
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -77
- package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -33
- package/cjs/ComboBox/v3/parts/dropdown-indicator/index.js +0 -2
- package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -17
- package/cjs/ComboBox/v3/parts/empty-state/index.js +0 -27
- package/cjs/ComboBox/v3/parts/empty-state/styled.js +0 -19
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +0 -113
- package/cjs/ComboBox/v3/parts/header-list/index.js +0 -9
- package/cjs/ComboBox/v3/parts/header-list/styled.js +0 -58
- package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -73
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +0 -81
- package/cjs/ComboBox/v3/parts/menu-list/index.js +0 -9
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +0 -33
- package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -105
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +0 -61
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -63
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -23
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -71
- package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -28
- package/cjs/ComboBox/v3/parts/single-selected-value-container/index.js +0 -9
- package/cjs/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -15
- package/cjs/ComboBox/v3/propTypes.js +0 -25
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -152
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -37
- package/cjs/ComboBox/v3/utils/listHelper.js +0 -39
- package/esm/ComboBox/v3/ComboBox.js +0 -24
- package/esm/ComboBox/v3/ComboBoxCTX.js +0 -49
- package/esm/ComboBox/v3/ComboboxDataTestids.js +0 -13
- package/esm/ComboBox/v3/config/constants.js +0 -10
- package/esm/ComboBox/v3/config/useComboBox.js +0 -114
- package/esm/ComboBox/v3/config/useGetPropsWithDefault.js +0 -7
- package/esm/ComboBox/v3/index.d.js +0 -1
- package/esm/ComboBox/v3/index.js +0 -1
- package/esm/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -25
- package/esm/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -20
- package/esm/ComboBox/v3/parts/a11y-messages/index.js +0 -2
- package/esm/ComboBox/v3/parts/a11y-messages/styled.js +0 -7
- package/esm/ComboBox/v3/parts/container/Container.js +0 -59
- package/esm/ComboBox/v3/parts/container/index.js +0 -1
- package/esm/ComboBox/v3/parts/container/styled.js +0 -13
- package/esm/ComboBox/v3/parts/controls/Controls.js +0 -63
- package/esm/ComboBox/v3/parts/controls/index.js +0 -1
- package/esm/ComboBox/v3/parts/controls/styled.js +0 -52
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -59
- package/esm/ComboBox/v3/parts/controls-input/styled.js +0 -16
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -73
- package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -26
- package/esm/ComboBox/v3/parts/dropdown-indicator/index.js +0 -1
- package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -8
- package/esm/ComboBox/v3/parts/empty-state/index.js +0 -19
- package/esm/ComboBox/v3/parts/empty-state/styled.js +0 -10
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js +0 -105
- package/esm/ComboBox/v3/parts/header-list/index.js +0 -1
- package/esm/ComboBox/v3/parts/header-list/styled.js +0 -41
- package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -69
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +0 -73
- package/esm/ComboBox/v3/parts/menu-list/index.js +0 -1
- package/esm/ComboBox/v3/parts/menu-list/styled.js +0 -23
- package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -97
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +0 -57
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -54
- package/esm/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -1
- package/esm/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -13
- package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -67
- package/esm/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -20
- package/esm/ComboBox/v3/parts/single-selected-value-container/index.js +0 -1
- package/esm/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -7
- package/esm/ComboBox/v3/propTypes.js +0 -21
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -148
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -33
- package/esm/ComboBox/v3/utils/listHelper.js +0 -30
- package/types/ComboBox/v3/ComboBox.d.ts +0 -62
- package/types/ComboBox/v3/ComboBoxCTX.d.ts +0 -6
- package/types/ComboBox/v3/ComboboxDataTestids.d.ts +0 -11
- package/types/ComboBox/v3/config/constants.d.ts +0 -8
- package/types/ComboBox/v3/config/useComboBox.d.ts +0 -2
- package/types/ComboBox/v3/config/useGetPropsWithDefault.d.ts +0 -2
- package/types/ComboBox/v3/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.d.ts +0 -3
- package/types/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.d.ts +0 -3
- package/types/ComboBox/v3/parts/a11y-messages/index.d.ts +0 -2
- package/types/ComboBox/v3/parts/a11y-messages/styled.d.ts +0 -1
- package/types/ComboBox/v3/parts/container/Container.d.ts +0 -3
- package/types/ComboBox/v3/parts/container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/container/styled.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls/Controls.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/controls/styled.d.ts +0 -7
- package/types/ComboBox/v3/parts/controls-input/ControlsInput.d.ts +0 -3
- package/types/ComboBox/v3/parts/controls-input/styled.d.ts +0 -4
- package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +0 -12
- package/types/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.d.ts +0 -3
- package/types/ComboBox/v3/parts/dropdown-indicator/index.d.ts +0 -0
- package/types/ComboBox/v3/parts/dropdown-indicator/styled.d.ts +0 -1
- package/types/ComboBox/v3/parts/empty-state/index.d.ts +0 -3
- package/types/ComboBox/v3/parts/empty-state/styled.d.ts +0 -2
- package/types/ComboBox/v3/parts/header-list/HeaderList.d.ts +0 -3
- package/types/ComboBox/v3/parts/header-list/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/header-list/styled.d.ts +0 -7
- package/types/ComboBox/v3/parts/header-list/useHeaderListHandlers.d.ts +0 -12
- package/types/ComboBox/v3/parts/menu-list/MenuList.d.ts +0 -3
- package/types/ComboBox/v3/parts/menu-list/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +0 -10
- package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +0 -2
- package/types/ComboBox/v3/parts/menu-list/useMenuList.d.ts +0 -2
- package/types/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.d.ts +0 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +0 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.d.ts +0 -2
- package/types/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.d.ts +0 -3
- package/types/ComboBox/v3/parts/single-selected-value-container/index.d.ts +0 -1
- package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +0 -1
- package/types/ComboBox/v3/propTypes.d.ts +0 -51
- package/types/ComboBox/v3/tests/combobox-general.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-multi-select.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-single-select.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/combobox-special-keys.test.d.ts +0 -1
- package/types/ComboBox/v3/tests/utils.d.ts +0 -22
- package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +0 -4
- package/types/ComboBox/v3/utils/hooks/useOnElementResize.d.ts +0 -3
- package/types/ComboBox/v3/utils/listHelper.d.ts +0 -7
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
8
|
-
var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
|
|
9
|
-
var styled = require('./styled.js');
|
|
10
|
-
var useKeyboardNavigation = require('../../utils/hooks/useKeyboardNavigation.js');
|
|
11
|
-
var useControlsInput = require('./useControlsInput.js');
|
|
12
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
13
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
-
|
|
17
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
|
-
|
|
19
|
-
const ControlsInput = () => {
|
|
20
|
-
const {
|
|
21
|
-
props: {
|
|
22
|
-
autoFocus
|
|
23
|
-
},
|
|
24
|
-
showPopover,
|
|
25
|
-
focusOptionIdx,
|
|
26
|
-
inputRef
|
|
27
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
28
|
-
const {
|
|
29
|
-
onInputKeyDown
|
|
30
|
-
} = useKeyboardNavigation.useKeyboardNavigation();
|
|
31
|
-
const {
|
|
32
|
-
spanReference,
|
|
33
|
-
width,
|
|
34
|
-
spanReferenceText,
|
|
35
|
-
showPlaceholder,
|
|
36
|
-
handleOnBlur,
|
|
37
|
-
handleOnChange,
|
|
38
|
-
handleOnFocus
|
|
39
|
-
} = useControlsInput.useControlsInput();
|
|
40
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledInputWrapper, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledInputWidthReference, {
|
|
41
|
-
ref: spanReference,
|
|
42
|
-
children: spanReferenceText
|
|
43
|
-
}), /*#__PURE__*/_jsx__default["default"](styled.StyledInputPlaceHolder, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
44
|
-
value: showPlaceholder
|
|
45
|
-
})), /*#__PURE__*/jsxRuntime.jsx(styled.StyledInput, {
|
|
46
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.INPUT,
|
|
47
|
-
autoFocus: autoFocus,
|
|
48
|
-
"aria-labelledby": "combo-label",
|
|
49
|
-
"aria-controls": "combo-listbox",
|
|
50
|
-
"aria-owns": "combo-listbox",
|
|
51
|
-
"aria-activedescendant": focusOptionIdx,
|
|
52
|
-
"aria-expanded": showPopover,
|
|
53
|
-
"aria-haspopup": "listbox",
|
|
54
|
-
role: "combobox",
|
|
55
|
-
style: {
|
|
56
|
-
width
|
|
57
|
-
},
|
|
58
|
-
ref: inputRef,
|
|
59
|
-
type: "text",
|
|
60
|
-
onKeyDown: onInputKeyDown,
|
|
61
|
-
onChange: handleOnChange,
|
|
62
|
-
onBlur: handleOnBlur,
|
|
63
|
-
onFocus: handleOnFocus
|
|
64
|
-
}));
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
exports.ControlsInput = ControlsInput;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledInput = /*#__PURE__*/styled__default["default"].input.withConfig({
|
|
12
|
-
componentId: "sc-1ue5xik-0"
|
|
13
|
-
})(["font-size:13px;line-height:13px;border:none;padding:0;outline:none;color:", ";&:focus{outline:none;}"], props => props.theme.colors.neutral[700]);
|
|
14
|
-
const StyledInputPlaceHolder = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
15
|
-
componentId: "sc-1ue5xik-1"
|
|
16
|
-
})(["font-style:italic;color:", ";position:absolute;display:flex;align-items:center;width:100%;user-select:none;height:28px;"], props => props.theme.colors.neutral[500]);
|
|
17
|
-
const StyledInputWidthReference = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
18
|
-
componentId: "sc-1ue5xik-2"
|
|
19
|
-
})(["visibility:hidden;position:absolute;top:-9999px;"]);
|
|
20
|
-
const StyledInputWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
21
|
-
componentId: "sc-1ue5xik-3"
|
|
22
|
-
})(["position:relative;flex:1;margin-right:5px;display:flex;align-items:center;"]);
|
|
23
|
-
|
|
24
|
-
exports.StyledInput = StyledInput;
|
|
25
|
-
exports.StyledInputPlaceHolder = StyledInputPlaceHolder;
|
|
26
|
-
exports.StyledInputWidthReference = StyledInputWidthReference;
|
|
27
|
-
exports.StyledInputWrapper = StyledInputWrapper;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
-
require('core-js/modules/es.string.replace.js');
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
9
|
-
var listHelper = require('../../utils/listHelper.js');
|
|
10
|
-
|
|
11
|
-
const useControlsInput = () => {
|
|
12
|
-
var _inputRef$current, _inputRef$current2, _inputRef$current3;
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
props: {
|
|
16
|
-
selectedValues,
|
|
17
|
-
placeholder,
|
|
18
|
-
onFilter
|
|
19
|
-
},
|
|
20
|
-
setShowPopover,
|
|
21
|
-
setCurrentOption,
|
|
22
|
-
inputRef,
|
|
23
|
-
wrapperListRef,
|
|
24
|
-
setHasFocus,
|
|
25
|
-
setShowSelectedValue,
|
|
26
|
-
setShowSelectedOptions
|
|
27
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
28
|
-
const [width, setWidth] = React.useState(1);
|
|
29
|
-
const spanReference = React.useRef(null);
|
|
30
|
-
React.useEffect(() => {
|
|
31
|
-
var _spanReference$curren;
|
|
32
|
-
|
|
33
|
-
setWidth(((_spanReference$curren = spanReference.current) === null || _spanReference$curren === void 0 ? void 0 : _spanReference$curren.offsetWidth) || 1);
|
|
34
|
-
}, [(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value]);
|
|
35
|
-
React.useEffect(() => {
|
|
36
|
-
setShowSelectedValue(true);
|
|
37
|
-
}, [selectedValues, setShowSelectedValue]); // When writting open popover
|
|
38
|
-
// and refresh selected values and update filter outside value.
|
|
39
|
-
|
|
40
|
-
const handleOnChange = React.useCallback(e => {
|
|
41
|
-
setShowSelectedOptions(false);
|
|
42
|
-
if (e.currentTarget.value) setShowSelectedValue(false);
|
|
43
|
-
setShowPopover(true);
|
|
44
|
-
onFilter(e.currentTarget.value);
|
|
45
|
-
}, [onFilter, setShowPopover, setShowSelectedOptions, setShowSelectedValue]);
|
|
46
|
-
const handleOnBlur = React.useCallback(() => {
|
|
47
|
-
setHasFocus(false);
|
|
48
|
-
setTimeout(() => {
|
|
49
|
-
var _wrapperListRef$curre;
|
|
50
|
-
|
|
51
|
-
if (!(wrapperListRef !== null && wrapperListRef !== void 0 && (_wrapperListRef$curre = wrapperListRef.current) !== null && _wrapperListRef$curre !== void 0 && _wrapperListRef$curre.contains(document.activeElement))) {
|
|
52
|
-
setShowPopover(false);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
setCurrentOption('');
|
|
56
|
-
setShowSelectedValue(true);
|
|
57
|
-
onFilter('');
|
|
58
|
-
if (inputRef.current) inputRef.current.value = '';
|
|
59
|
-
});
|
|
60
|
-
}, [setHasFocus, setCurrentOption, wrapperListRef, onFilter, inputRef, setShowPopover, setShowSelectedValue]);
|
|
61
|
-
const handleOnFocus = React.useCallback(() => {
|
|
62
|
-
setHasFocus(true);
|
|
63
|
-
}, [setHasFocus]);
|
|
64
|
-
const showPlaceholder = !((_inputRef$current2 = inputRef.current) !== null && _inputRef$current2 !== void 0 && _inputRef$current2.value) && listHelper.isSelectedValueEmpty(selectedValues) ? placeholder : null;
|
|
65
|
-
const spanReferenceText = (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.value.replace(/\s/g, '\u00a0');
|
|
66
|
-
return React.useMemo(() => ({
|
|
67
|
-
handleOnFocus,
|
|
68
|
-
handleOnBlur,
|
|
69
|
-
handleOnChange,
|
|
70
|
-
showPlaceholder,
|
|
71
|
-
spanReferenceText,
|
|
72
|
-
width,
|
|
73
|
-
spanReference
|
|
74
|
-
}), [handleOnFocus, handleOnBlur, handleOnChange, spanReferenceText, showPlaceholder, width, spanReference]);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
exports.useControlsInput = useControlsInput;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var ChevronSmallDown = require('@elliemae/ds-icons/ChevronSmallDown');
|
|
6
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
7
|
-
var styled = require('./styled.js');
|
|
8
|
-
var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
|
-
var ChevronSmallDown__default = /*#__PURE__*/_interopDefaultLegacy(ChevronSmallDown);
|
|
14
|
-
|
|
15
|
-
var _ChevronSmallDown;
|
|
16
|
-
|
|
17
|
-
const DropdownIndicator = () => {
|
|
18
|
-
const {
|
|
19
|
-
showPopover
|
|
20
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
21
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledDropDownButton, {
|
|
22
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.DROPDOWN,
|
|
23
|
-
"aria-controls": "combo-listbox",
|
|
24
|
-
"aria-labelledby": "combo-label",
|
|
25
|
-
"aria-expanded": showPopover,
|
|
26
|
-
"aria-haspopup": "listbox",
|
|
27
|
-
buttonType: "text",
|
|
28
|
-
icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx__default["default"](ChevronSmallDown__default["default"], {})),
|
|
29
|
-
tabIndex: -1
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
module.exports = DropdownIndicator;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var DSButton = require('@elliemae/ds-button');
|
|
7
|
-
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
-
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
12
|
-
|
|
13
|
-
const StyledDropDownButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
14
|
-
componentId: "sc-1ijoe1w-0"
|
|
15
|
-
})(["box-sizing:border-box;width:100;& svg{fill:", ";}"], props => props.theme.colors.brand['700']);
|
|
16
|
-
|
|
17
|
-
exports.StyledDropDownButton = StyledDropDownButton;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
8
|
-
var styled = require('./styled.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
|
-
|
|
14
|
-
var _StyledNoResults, _StyledNoResults2;
|
|
15
|
-
|
|
16
|
-
const EmptyState = () => {
|
|
17
|
-
const {
|
|
18
|
-
props: {
|
|
19
|
-
onCreate
|
|
20
|
-
}
|
|
21
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
22
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledNoResultsWrapper, {
|
|
23
|
-
id: "id-no-results"
|
|
24
|
-
}, void 0, onCreate ? _StyledNoResults || (_StyledNoResults = /*#__PURE__*/_jsx__default["default"](styled.StyledNoResults, {}, void 0, "No items match your search, click RETURN at any point to add your unique entry to the field")) : _StyledNoResults2 || (_StyledNoResults2 = /*#__PURE__*/_jsx__default["default"](styled.StyledNoResults, {}, void 0, "No matches found.")));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.EmptyState = EmptyState;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledNoResultsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
12
|
-
componentId: "sc-o4fon6-0"
|
|
13
|
-
})(["padding:16px;"]);
|
|
14
|
-
const StyledNoResults = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
15
|
-
componentId: "sc-o4fon6-1"
|
|
16
|
-
})([""]);
|
|
17
|
-
|
|
18
|
-
exports.StyledNoResults = StyledNoResults;
|
|
19
|
-
exports.StyledNoResultsWrapper = StyledNoResultsWrapper;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var lodash = require('lodash');
|
|
8
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
9
|
-
var styled = require('./styled.js');
|
|
10
|
-
var listHelper = require('../../utils/listHelper.js');
|
|
11
|
-
var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
|
|
12
|
-
var useHeaderListHandlers = require('./useHeaderListHandlers.js');
|
|
13
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
-
|
|
17
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
|
-
|
|
19
|
-
var _StyledSeparator, _StyledNoOptionsSelec, _StyledSeparator2;
|
|
20
|
-
|
|
21
|
-
const HeaderList = () => {
|
|
22
|
-
var _inputRef$current;
|
|
23
|
-
|
|
24
|
-
const {
|
|
25
|
-
props: {
|
|
26
|
-
onSelectAll,
|
|
27
|
-
onClearAll,
|
|
28
|
-
withToggle,
|
|
29
|
-
selectedValues,
|
|
30
|
-
options
|
|
31
|
-
},
|
|
32
|
-
showSelectedOptions,
|
|
33
|
-
inputRef
|
|
34
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
35
|
-
const isSelectAllSupplied = onSelectAll !== lodash.noop;
|
|
36
|
-
const isClearAllSupplied = onClearAll !== lodash.noop;
|
|
37
|
-
const multiSelectedValues = selectedValues;
|
|
38
|
-
const selectableOptions = listHelper.getSelectableOptions(options);
|
|
39
|
-
const {
|
|
40
|
-
handleKeyDown,
|
|
41
|
-
handleClickOnClearAll,
|
|
42
|
-
handleClickOnSelectAll,
|
|
43
|
-
handleOnBlurClearAll,
|
|
44
|
-
handleOnBlurSelectAll,
|
|
45
|
-
handleOnMouseDown,
|
|
46
|
-
handleToggle
|
|
47
|
-
} = useHeaderListHandlers.useHeaderListHandlers();
|
|
48
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledHeaderListWrapper, {
|
|
49
|
-
onKeyDown: handleKeyDown,
|
|
50
|
-
onMouseDown: handleOnMouseDown
|
|
51
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0, isSelectAllSupplied && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
52
|
-
disabled: (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) !== '' || selectableOptions.length === multiSelectedValues.length,
|
|
53
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SELECT_ALL_BUTTON,
|
|
54
|
-
buttonType: "text",
|
|
55
|
-
labelText: "All",
|
|
56
|
-
size: "s",
|
|
57
|
-
onMouseDown: handleOnMouseDown,
|
|
58
|
-
onBlur: handleOnBlurSelectAll,
|
|
59
|
-
onClick: handleClickOnSelectAll
|
|
60
|
-
}), isSelectAllSupplied && isClearAllSupplied && (_StyledSeparator || (_StyledSeparator = /*#__PURE__*/_jsx__default["default"](styled.StyledSeparator, {
|
|
61
|
-
orientation: "vertical",
|
|
62
|
-
position: "center",
|
|
63
|
-
type: "group-level",
|
|
64
|
-
margin: "none"
|
|
65
|
-
}))), isClearAllSupplied && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
66
|
-
disabled: multiSelectedValues.length === 0,
|
|
67
|
-
tabIndex: 0,
|
|
68
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.CLEAR_ALL_BUTTON,
|
|
69
|
-
buttonType: "text",
|
|
70
|
-
size: "s",
|
|
71
|
-
labelText: "Clear",
|
|
72
|
-
onMouseDown: handleOnMouseDown,
|
|
73
|
-
onBlur: handleOnBlurClearAll,
|
|
74
|
-
onClick: handleClickOnClearAll
|
|
75
|
-
})), /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0, withToggle ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
76
|
-
children: multiSelectedValues.length > 0 ? /*#__PURE__*/_jsx__default["default"](styled.StyledButtonSelection, {
|
|
77
|
-
buttonType: "text",
|
|
78
|
-
disabled: !showSelectedOptions && selectableOptions.length === multiSelectedValues.length,
|
|
79
|
-
onClick: handleToggle,
|
|
80
|
-
labelText: !showSelectedOptions ? "".concat(multiSelectedValues.length, " SELECTED") : 'SHOW ALL',
|
|
81
|
-
size: "s"
|
|
82
|
-
}) : _StyledNoOptionsSelec || (_StyledNoOptionsSelec = /*#__PURE__*/_jsx__default["default"](styled.StyledNoOptionsSelected, {}, void 0, "0 SELECTED"))
|
|
83
|
-
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
84
|
-
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledShowAllButton, {
|
|
85
|
-
buttonType: "text",
|
|
86
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SHOW_ALL_BUTTON,
|
|
87
|
-
tabIndex: !showSelectedOptions ? -1 : 0,
|
|
88
|
-
onClick: showSelectedOptions ? handleToggle : lodash.noop,
|
|
89
|
-
labelText: "SHOW ALL",
|
|
90
|
-
isSelected: !showSelectedOptions,
|
|
91
|
-
size: "s",
|
|
92
|
-
style: {
|
|
93
|
-
fontWeight: showSelectedOptions ? '300' : '600'
|
|
94
|
-
}
|
|
95
|
-
}), _StyledSeparator2 || (_StyledSeparator2 = /*#__PURE__*/_jsx__default["default"](styled.StyledSeparator, {
|
|
96
|
-
orientation: "vertical",
|
|
97
|
-
position: "center",
|
|
98
|
-
type: "group-level",
|
|
99
|
-
margin: "none"
|
|
100
|
-
})), /*#__PURE__*/_jsx__default["default"](styled.StyledButtonSelection, {
|
|
101
|
-
tabIndex: showSelectedOptions ? -1 : 0,
|
|
102
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SHOW_SELECTED_OPTIONS_BUTTON,
|
|
103
|
-
disabled: multiSelectedValues.length === 0 || !showSelectedOptions && selectableOptions.length === multiSelectedValues.length,
|
|
104
|
-
buttonType: "text",
|
|
105
|
-
isSelected: showSelectedOptions,
|
|
106
|
-
onClick: !showSelectedOptions ? handleToggle : lodash.noop,
|
|
107
|
-
labelText: "".concat(multiSelectedValues.length, " SELECTED"),
|
|
108
|
-
size: "s"
|
|
109
|
-
})]
|
|
110
|
-
})));
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
exports.HeaderList = HeaderList;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
var dsSystem = require('@elliemae/ds-system');
|
|
8
|
-
var DSButton = require('@elliemae/ds-button');
|
|
9
|
-
var DSSeparator = require('@elliemae/ds-separator');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
14
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
|
-
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
16
|
-
var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
|
|
17
|
-
|
|
18
|
-
var _templateObject;
|
|
19
|
-
|
|
20
|
-
const selectedStyle = isSelected => dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n & span {\n border-bottom: 2px solid ", ";\n }\n cursor: ", ";\n"])), props => isSelected ? props.theme.colors.brand[700] : '#FFF', isSelected && 'default');
|
|
21
|
-
|
|
22
|
-
const StyledHeaderListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
23
|
-
componentId: "sc-dazbzt-0"
|
|
24
|
-
})(["display:flex;position:fixed;top:0;z-index:10;justify-content:space-between;padding:0px 12px 0px 12px;width:100%;height:28px;background-color:#fff;box-shadow:0 4px 2px -4px ", ";overflow-x:hidden;& button{font-size:13px;}"], props => props.theme.colors.neutral[700]);
|
|
25
|
-
const StyledSeparator = /*#__PURE__*/styled__default["default"](DSSeparator__default["default"]).withConfig({
|
|
26
|
-
componentId: "sc-dazbzt-1"
|
|
27
|
-
})(["height:50%;width:auto;"]);
|
|
28
|
-
const StyledButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
29
|
-
componentId: "sc-dazbzt-2"
|
|
30
|
-
})(["padding:0 ", ";align-items:center;"], props => props.theme.space.xxs);
|
|
31
|
-
const StyledGeneralSelectionButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
32
|
-
componentId: "sc-dazbzt-3"
|
|
33
|
-
})(["border-radius:0px;padding:0 ", ";margin:0;align-items:center;", " transition:unset;"], props => props.theme.space.xxs, _ref => {
|
|
34
|
-
let {
|
|
35
|
-
isSelected
|
|
36
|
-
} = _ref;
|
|
37
|
-
return selectedStyle(isSelected);
|
|
38
|
-
});
|
|
39
|
-
const StyledButtonSelection = /*#__PURE__*/styled__default["default"](StyledGeneralSelectionButton).withConfig({
|
|
40
|
-
componentId: "sc-dazbzt-4"
|
|
41
|
-
})(["&:hover:not([disabled]){background-color:transparent;color:", ";}"], props => props.theme.colors.brand['700']);
|
|
42
|
-
const StyledShowAllButton = /*#__PURE__*/styled__default["default"](StyledGeneralSelectionButton).withConfig({
|
|
43
|
-
componentId: "sc-dazbzt-5"
|
|
44
|
-
})(["color:", ";&:hover:not([disabled]){background-color:transparent;color:", ";}"], props => props.theme.colors.neutral['700'], props => props.theme.colors.neutral['700']);
|
|
45
|
-
const StyledSelectedItems = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
46
|
-
componentId: "sc-dazbzt-6"
|
|
47
|
-
})(["display:flex;align-items:center;"]);
|
|
48
|
-
const StyledNoOptionsSelected = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
49
|
-
componentId: "sc-dazbzt-7"
|
|
50
|
-
})(["padding:0 ", ";"], props => props.theme.space.xxs);
|
|
51
|
-
|
|
52
|
-
exports.StyledButton = StyledButton;
|
|
53
|
-
exports.StyledButtonSelection = StyledButtonSelection;
|
|
54
|
-
exports.StyledHeaderListWrapper = StyledHeaderListWrapper;
|
|
55
|
-
exports.StyledNoOptionsSelected = StyledNoOptionsSelected;
|
|
56
|
-
exports.StyledSelectedItems = StyledSelectedItems;
|
|
57
|
-
exports.StyledSeparator = StyledSeparator;
|
|
58
|
-
exports.StyledShowAllButton = StyledShowAllButton;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
7
|
-
|
|
8
|
-
const useHeaderListHandlers = () => {
|
|
9
|
-
const {
|
|
10
|
-
props: {
|
|
11
|
-
onSelectAll,
|
|
12
|
-
onFilter,
|
|
13
|
-
onClearAll,
|
|
14
|
-
selectedValues
|
|
15
|
-
},
|
|
16
|
-
inputRef,
|
|
17
|
-
showSelectedOptions,
|
|
18
|
-
setShowSelectedOptions,
|
|
19
|
-
setShowPopover
|
|
20
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
21
|
-
const multiSelectedValues = selectedValues;
|
|
22
|
-
const handleOnBlurSelectAll = React.useCallback(e => {
|
|
23
|
-
if (!onClearAll || multiSelectedValues.length === 0) {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
inputRef.current.focus();
|
|
26
|
-
}
|
|
27
|
-
}, [inputRef, onClearAll, multiSelectedValues]);
|
|
28
|
-
const handleOnBlurClearAll = React.useCallback(e => {// since ux change order from the action buttons this is unneccesary. will comment until review finish
|
|
29
|
-
// e.preventDefault();
|
|
30
|
-
// inputRef.current.focus();
|
|
31
|
-
}, [inputRef]);
|
|
32
|
-
const handleClickOnSelectAll = React.useCallback(() => {
|
|
33
|
-
onSelectAll();
|
|
34
|
-
inputRef.current.focus();
|
|
35
|
-
}, [onSelectAll, inputRef, setShowPopover]);
|
|
36
|
-
const handleClickOnClearAll = React.useCallback(e => {
|
|
37
|
-
setShowSelectedOptions(false);
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
e.stopPropagation();
|
|
40
|
-
onClearAll();
|
|
41
|
-
inputRef.current.focus();
|
|
42
|
-
}, [inputRef, setShowSelectedOptions, onClearAll]);
|
|
43
|
-
const handleOnMouseDown = React.useCallback(e => {
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
}, []);
|
|
46
|
-
const handleToggle = React.useCallback(() => {
|
|
47
|
-
inputRef.current.value = '';
|
|
48
|
-
onFilter('');
|
|
49
|
-
setShowSelectedOptions(!showSelectedOptions);
|
|
50
|
-
inputRef.current.focus();
|
|
51
|
-
}, [setShowSelectedOptions, inputRef, onFilter, showSelectedOptions]);
|
|
52
|
-
const handleKeyDown = React.useCallback(e => {
|
|
53
|
-
if (e.key === 'Escape') {
|
|
54
|
-
setShowPopover(false);
|
|
55
|
-
}
|
|
56
|
-
}, [setShowPopover]);
|
|
57
|
-
React.useEffect(() => {
|
|
58
|
-
if (multiSelectedValues.length === 0) {
|
|
59
|
-
setShowSelectedOptions(false);
|
|
60
|
-
}
|
|
61
|
-
}, [multiSelectedValues, setShowSelectedOptions]);
|
|
62
|
-
return React.useMemo(() => ({
|
|
63
|
-
handleKeyDown,
|
|
64
|
-
handleToggle,
|
|
65
|
-
handleOnMouseDown,
|
|
66
|
-
handleClickOnClearAll,
|
|
67
|
-
handleClickOnSelectAll,
|
|
68
|
-
handleOnBlurClearAll,
|
|
69
|
-
handleOnBlurSelectAll
|
|
70
|
-
}), [handleKeyDown, handleToggle, handleOnMouseDown, handleClickOnClearAll, handleClickOnSelectAll, handleOnBlurClearAll, handleOnBlurSelectAll]);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
exports.useHeaderListHandlers = useHeaderListHandlers;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var styled = require('./styled.js');
|
|
8
|
-
var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
|
|
9
|
-
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
10
|
-
var HeaderList = require('../header-list/HeaderList.js');
|
|
11
|
-
var useOnElementResize = require('../../utils/hooks/useOnElementResize.js');
|
|
12
|
-
var index = require('../empty-state/index.js');
|
|
13
|
-
var useItemRenderer = require('./useItemRenderer.js');
|
|
14
|
-
var useMenuList = require('./useMenuList.js');
|
|
15
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
16
|
-
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
20
|
-
|
|
21
|
-
var _HeaderList, _EmptyState;
|
|
22
|
-
|
|
23
|
-
const MenuList = () => {
|
|
24
|
-
const {
|
|
25
|
-
props: {
|
|
26
|
-
menuMinWidth,
|
|
27
|
-
menuMaxHeight,
|
|
28
|
-
inline,
|
|
29
|
-
options,
|
|
30
|
-
selectedValues
|
|
31
|
-
},
|
|
32
|
-
referenceElement,
|
|
33
|
-
inputRef,
|
|
34
|
-
listRef,
|
|
35
|
-
showPopover,
|
|
36
|
-
wrapperListRef,
|
|
37
|
-
controlsWrapperRef,
|
|
38
|
-
virtualListHelpers: {
|
|
39
|
-
totalSize
|
|
40
|
-
}
|
|
41
|
-
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
42
|
-
const multiple = Array.isArray(selectedValues);
|
|
43
|
-
const withHeader = !inline && multiple && options.length > 0;
|
|
44
|
-
const ItemRenderer = useItemRenderer.useItemRenderer();
|
|
45
|
-
useMenuList.useMenuList();
|
|
46
|
-
useOnElementResize.useOnElementResize(controlsWrapperRef);
|
|
47
|
-
const listWidth = React.useMemo(() => menuMinWidth || "".concat(referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.offsetWidth), [menuMinWidth, referenceElement]);
|
|
48
|
-
const handleOnFocus = React.useCallback(() => {
|
|
49
|
-
var _inputRef$current;
|
|
50
|
-
|
|
51
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
52
|
-
}, [inputRef]);
|
|
53
|
-
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledListWrapper, {
|
|
54
|
-
tabIndex: -1,
|
|
55
|
-
ref: wrapperListRef,
|
|
56
|
-
inline: inline,
|
|
57
|
-
onMouseDown: e => e.preventDefault(),
|
|
58
|
-
minWidth: listWidth,
|
|
59
|
-
id: "combo-listbox",
|
|
60
|
-
role: "listbox",
|
|
61
|
-
children: [withHeader && (_HeaderList || (_HeaderList = /*#__PURE__*/_jsx__default["default"](HeaderList.HeaderList, {}))), options.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(styled.StyledVirtualListWrapper, {
|
|
62
|
-
tabIndex: -1,
|
|
63
|
-
inline: inline,
|
|
64
|
-
maxHeight: menuMaxHeight,
|
|
65
|
-
ref: listRef,
|
|
66
|
-
withHeader: withHeader,
|
|
67
|
-
children: /*#__PURE__*/_jsx__default["default"](styled.StyledList, {
|
|
68
|
-
tabIndex: -1,
|
|
69
|
-
"aria-expanded": showPopover,
|
|
70
|
-
onFocus: handleOnFocus,
|
|
71
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.LIST,
|
|
72
|
-
style: {
|
|
73
|
-
height: totalSize,
|
|
74
|
-
margin: inline ? '0px' : '8px 0px'
|
|
75
|
-
}
|
|
76
|
-
}, void 0, ItemRenderer)
|
|
77
|
-
}) : _EmptyState || (_EmptyState = /*#__PURE__*/_jsx__default["default"](index.EmptyState, {}))]
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
exports.MenuList = MenuList;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
12
|
-
componentId: "sc-1uedyf-0"
|
|
13
|
-
})(["min-width:", ";"], props => props.inline ? '100%' : "".concat(props.minWidth, "px"));
|
|
14
|
-
const StyledList = /*#__PURE__*/styled__default["default"].ul.withConfig({
|
|
15
|
-
componentId: "sc-1uedyf-1"
|
|
16
|
-
})(["position:relative;padding:0;"]);
|
|
17
|
-
const StyledVirtualListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
|
-
componentId: "sc-1uedyf-2"
|
|
19
|
-
})(["overflow-y:auto;margin-top:", ";max-height:", ";"], _ref => {
|
|
20
|
-
let {
|
|
21
|
-
withHeader
|
|
22
|
-
} = _ref;
|
|
23
|
-
return withHeader ? '28px' : '';
|
|
24
|
-
}, _ref2 => {
|
|
25
|
-
let {
|
|
26
|
-
maxHeight
|
|
27
|
-
} = _ref2;
|
|
28
|
-
return !maxHeight ? '400px' : "".concat(maxHeight, "px");
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
exports.StyledList = StyledList;
|
|
32
|
-
exports.StyledListWrapper = StyledListWrapper;
|
|
33
|
-
exports.StyledVirtualListWrapper = StyledVirtualListWrapper;
|