@seeqdev/qomponents 0.0.144 → 0.0.145
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/dist/index.esm.js +2 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -13390,7 +13390,6 @@ const multiValueStyles = [
|
|
|
13390
13390
|
*
|
|
13391
13391
|
*/
|
|
13392
13392
|
const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no matching options', isSearchable = true, creatable = false, isMulti = false, isClearable = false, closeMenuOnSelect = true, id, inputId, menuPortalTarget, getOptionLabel, getSelectedValueLabel, getOptionValue, onChange, menuIsOpen, menuPlacement = 'auto', extraClassNames, inputGroup, filterConfig, filterOption, small = false, isDisabled = false, showError = false, isLoading = false, formatGroupLabel, onRemove, defaultValue, onMenuOpen, onMenuClose, components, onMenuInputFocus, onInputChange, inputValue, }) => {
|
|
13393
|
-
const [isSelectOptionsOpen, setIsSelectOptionsOpen] = React__default.useState(false);
|
|
13394
13393
|
const getOptionOrSelectedLabel = (option, { context }) => {
|
|
13395
13394
|
const getSelectedOptionLabel = getSelectedValueLabel ? getSelectedValueLabel : getOptionLabel;
|
|
13396
13395
|
if (getOptionLabel || getSelectedValueLabel) {
|
|
@@ -13446,7 +13445,6 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
13446
13445
|
classNames: {
|
|
13447
13446
|
control: ({ menuIsOpen }) => {
|
|
13448
13447
|
let border = menuIsOpen ? 'tw-rounded-t-md' : 'tw-rounded-md';
|
|
13449
|
-
setIsSelectOptionsOpen(menuIsOpen);
|
|
13450
13448
|
// if it's on the left side of the input group make sure the right side is straight and not curved
|
|
13451
13449
|
if (inputGroup === 'left') {
|
|
13452
13450
|
border = menuIsOpen ? 'tw-rounded-tl-md' : 'tw-rounded-l-md';
|
|
@@ -13458,8 +13456,8 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
13458
13456
|
return `${appliedClasses} ${baseClasses$3} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw-pl-2 tw-pr-1' : 'tw-pl-2.5 tw-pr-1.5'}`;
|
|
13459
13457
|
},
|
|
13460
13458
|
placeholder: () => placeholderStyles,
|
|
13461
|
-
container: () => {
|
|
13462
|
-
const containerBorderStyles =
|
|
13459
|
+
container: ({ selectProps }) => {
|
|
13460
|
+
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw-rounded-t-md' : 'tw-rounded-md';
|
|
13463
13461
|
return `${textStyles} ${containerStyles} ${extraClassNames} ${containerBorderStyles}`;
|
|
13464
13462
|
},
|
|
13465
13463
|
input: () => textStyles + ' specSelectInput',
|