@ballistix.digital/react-components 0.4.78 → 0.4.79
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.d.ts +3 -8
- package/dist/index.esm.js +5 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { TButtonElementStyles as TButtonElementStyles$1 } from 'components/Eleme
|
|
|
7
7
|
import { TDropdownElementStyles as TDropdownElementStyles$1 } from 'components/Element/Dropdown';
|
|
8
8
|
import { TPagePaginationNavigationStyles as TPagePaginationNavigationStyles$1 } from 'components/Navigation/PagePagination';
|
|
9
9
|
export { createColumnHelper } from 'helpers/table';
|
|
10
|
+
import { SelectValue } from 'react-tailwindcss-select/dist/components/type';
|
|
10
11
|
|
|
11
12
|
declare const base$j: {
|
|
12
13
|
loading: string;
|
|
@@ -790,16 +791,10 @@ type TSelectMenuFormProps = {
|
|
|
790
791
|
isDisabled?: boolean;
|
|
791
792
|
isClearable?: boolean;
|
|
792
793
|
isSearchable?: boolean;
|
|
793
|
-
|
|
794
|
+
isMultiple?: boolean;
|
|
794
795
|
isDarkMode?: boolean;
|
|
795
796
|
isSolo?: boolean;
|
|
796
|
-
onChange?: (value:
|
|
797
|
-
value: string;
|
|
798
|
-
label: string;
|
|
799
|
-
}[] | {
|
|
800
|
-
value: string;
|
|
801
|
-
label: string;
|
|
802
|
-
} | string) => void;
|
|
797
|
+
onChange?: (value: SelectValue) => void;
|
|
803
798
|
onSearchInputChange?: ((e: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
804
799
|
onClear: (name: string) => void;
|
|
805
800
|
onBlur?: any;
|
package/dist/index.esm.js
CHANGED
|
@@ -2618,7 +2618,7 @@ const Select = ({ options = [], value = null, onChange, onSearchInputChange, pla
|
|
|
2618
2618
|
|
|
2619
2619
|
var SelectMenuForm = function (props) {
|
|
2620
2620
|
var _a;
|
|
2621
|
-
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.type, type = _c === void 0 ? 'normal' : _c, _d = props.isRequired, isRequired = _d === void 0 ? false : _d, isLoading = props.isLoading, _e = props.isTouched, isTouched = _e === void 0 ? false : _e, isDisabled = props.isDisabled, _f = props.isClearable, isClearable = _f === void 0 ? true : _f, _g = props.
|
|
2621
|
+
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.type, type = _c === void 0 ? 'normal' : _c, _d = props.isRequired, isRequired = _d === void 0 ? false : _d, isLoading = props.isLoading, _e = props.isTouched, isTouched = _e === void 0 ? false : _e, isDisabled = props.isDisabled, _f = props.isClearable, isClearable = _f === void 0 ? true : _f, _g = props.isMultiple, isMultiple = _g === void 0 ? false : _g, _h = props.isSearchable, isSearchable = _h === void 0 ? true : _h, _j = props.isSolo, isSolo = _j === void 0 ? false : _j, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
2622
2622
|
var _k = useState(value !== null && value !== void 0 ? value : null), state = _k[0], setState = _k[1];
|
|
2623
2623
|
var _l = useState(true), isFocus = _l[0], setIsFocus = _l[1];
|
|
2624
2624
|
var isValid = error === undefined;
|
|
@@ -2630,9 +2630,9 @@ var SelectMenuForm = function (props) {
|
|
|
2630
2630
|
});
|
|
2631
2631
|
return result;
|
|
2632
2632
|
};
|
|
2633
|
-
var handleChange = function (
|
|
2634
|
-
setState(
|
|
2635
|
-
onChange && onChange(
|
|
2633
|
+
var handleChange = function (selectValue) {
|
|
2634
|
+
setState(selectValue);
|
|
2635
|
+
onChange && onChange(selectValue);
|
|
2636
2636
|
setIsFocus(false);
|
|
2637
2637
|
};
|
|
2638
2638
|
var styles$1 = handleGenerateStyle();
|
|
@@ -2654,7 +2654,7 @@ var SelectMenuForm = function (props) {
|
|
|
2654
2654
|
//
|
|
2655
2655
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.select, noOptionsMessage: (jsx("p", __assign({ className: styles$1.emptyState }, { children: (_a = placeholder === null || placeholder === void 0 ? void 0 : placeholder.emptyState) !== null && _a !== void 0 ? _a : 'No results found' }))), searchInputPlaceholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.searchInput,
|
|
2656
2656
|
//
|
|
2657
|
-
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple:
|
|
2657
|
+
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple: isMultiple, isSearchable: isSearchable,
|
|
2658
2658
|
//
|
|
2659
2659
|
options: options,
|
|
2660
2660
|
//
|
package/dist/index.js
CHANGED
|
@@ -2628,7 +2628,7 @@ const Select = ({ options = [], value = null, onChange, onSearchInputChange, pla
|
|
|
2628
2628
|
|
|
2629
2629
|
var SelectMenuForm = function (props) {
|
|
2630
2630
|
var _a;
|
|
2631
|
-
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.type, type = _c === void 0 ? 'normal' : _c, _d = props.isRequired, isRequired = _d === void 0 ? false : _d, isLoading = props.isLoading, _e = props.isTouched, isTouched = _e === void 0 ? false : _e, isDisabled = props.isDisabled, _f = props.isClearable, isClearable = _f === void 0 ? true : _f, _g = props.
|
|
2631
|
+
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.type, type = _c === void 0 ? 'normal' : _c, _d = props.isRequired, isRequired = _d === void 0 ? false : _d, isLoading = props.isLoading, _e = props.isTouched, isTouched = _e === void 0 ? false : _e, isDisabled = props.isDisabled, _f = props.isClearable, isClearable = _f === void 0 ? true : _f, _g = props.isMultiple, isMultiple = _g === void 0 ? false : _g, _h = props.isSearchable, isSearchable = _h === void 0 ? true : _h, _j = props.isSolo, isSolo = _j === void 0 ? false : _j, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
2632
2632
|
var _k = React.useState(value !== null && value !== void 0 ? value : null), state = _k[0], setState = _k[1];
|
|
2633
2633
|
var _l = React.useState(true), isFocus = _l[0], setIsFocus = _l[1];
|
|
2634
2634
|
var isValid = error === undefined;
|
|
@@ -2640,9 +2640,9 @@ var SelectMenuForm = function (props) {
|
|
|
2640
2640
|
});
|
|
2641
2641
|
return result;
|
|
2642
2642
|
};
|
|
2643
|
-
var handleChange = function (
|
|
2644
|
-
setState(
|
|
2645
|
-
onChange && onChange(
|
|
2643
|
+
var handleChange = function (selectValue) {
|
|
2644
|
+
setState(selectValue);
|
|
2645
|
+
onChange && onChange(selectValue);
|
|
2646
2646
|
setIsFocus(false);
|
|
2647
2647
|
};
|
|
2648
2648
|
var styles$1 = handleGenerateStyle();
|
|
@@ -2664,7 +2664,7 @@ var SelectMenuForm = function (props) {
|
|
|
2664
2664
|
//
|
|
2665
2665
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.select, noOptionsMessage: (jsxRuntime.jsx("p", __assign({ className: styles$1.emptyState }, { children: (_a = placeholder === null || placeholder === void 0 ? void 0 : placeholder.emptyState) !== null && _a !== void 0 ? _a : 'No results found' }))), searchInputPlaceholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.searchInput,
|
|
2666
2666
|
//
|
|
2667
|
-
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple:
|
|
2667
|
+
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple: isMultiple, isSearchable: isSearchable,
|
|
2668
2668
|
//
|
|
2669
2669
|
options: options,
|
|
2670
2670
|
//
|