@sebgroup/green-react 3.21.0 → 3.22.0
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/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
3
|
"main": "./src/index.js",
|
|
4
4
|
"module": "./src/index.js",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.22.0",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"react": "^17 || ^18",
|
|
8
8
|
"react-dom": "^17 || ^18"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@sebgroup/green-core": "^1.48.1",
|
|
12
|
-
"@sebgroup/chlorophyll": "^3.6.
|
|
12
|
+
"@sebgroup/chlorophyll": "^3.6.10",
|
|
13
13
|
"@sebgroup/extract": "^3.0.1",
|
|
14
14
|
"@lit/react": "^1.0.2",
|
|
15
15
|
"classnames": "^2.3.2",
|
|
@@ -58,6 +58,7 @@ export declare const CoreDropdown: import("@lit/react").ReactWebComponent<GdsDro
|
|
|
58
58
|
export declare const CoreOption: import("@lit/react").ReactWebComponent<GdsOption, {}>;
|
|
59
59
|
export interface DropdownProps extends DropdownArgs {
|
|
60
60
|
onChange?: OnChange;
|
|
61
|
+
required?: boolean;
|
|
61
62
|
}
|
|
62
|
-
export declare const Dropdown: ({ compareWith, display, id, informationLabel, label, multiSelect, onChange, options, searchFilter, searchable, texts, useValue, validator, value, syncPopoverWidth, disableMobileStyles, onGdsUiState, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const Dropdown: ({ compareWith, display, id, informationLabel, label, multiSelect, onChange, options, searchFilter, searchable, texts, useValue, validator, value, syncPopoverWidth, disableMobileStyles, onGdsUiState, required, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
64
|
export default Dropdown;
|
|
@@ -43,7 +43,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
43
43
|
syncPopoverWidth = _a.syncPopoverWidth,
|
|
44
44
|
disableMobileStyles = _a.disableMobileStyles,
|
|
45
45
|
_onGdsUiState = _a.onGdsUiState,
|
|
46
|
-
|
|
46
|
+
required = _a.required,
|
|
47
|
+
props = __rest(_a, ["compareWith", "display", "id", "informationLabel", "label", "multiSelect", "onChange", "options", "searchFilter", "searchable", "texts", "useValue", "validator", "value", "syncPopoverWidth", "disableMobileStyles", "onGdsUiState", "required"]);
|
|
47
48
|
var handleOnChange = function handleOnChange(e) {
|
|
48
49
|
if ('value' in e.detail) {
|
|
49
50
|
onChange === null || onChange === void 0 ? void 0 : onChange(e.detail.value);
|
|
@@ -78,6 +79,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
78
79
|
hideLabel: props.hideLabel,
|
|
79
80
|
maxHeight: props.maxHeight,
|
|
80
81
|
disableMobileStyles: disableMobileStyles,
|
|
82
|
+
required: required,
|
|
81
83
|
onGdsUiState: function onGdsUiState(e) {
|
|
82
84
|
return _onGdsUiState === null || _onGdsUiState === void 0 ? void 0 : _onGdsUiState(e);
|
|
83
85
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes, RefObject } from 'react';
|
|
2
|
-
declare const useInput: (props: InputHTMLAttributes<HTMLInputElement>, onChanges?: (
|
|
2
|
+
declare const useInput: (props: InputHTMLAttributes<HTMLInputElement>, onChanges?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string) => InputHTMLAttributes<HTMLInputElement> & {
|
|
3
3
|
ref: RefObject<HTMLInputElement>;
|
|
4
4
|
};
|
|
5
5
|
export default useInput;
|