@axa-fr/design-system-look-and-feel-react 1.0.5-ci.21 → 1.0.5-ci.22
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.
@@ -6,8 +6,8 @@ type Option = {
|
|
6
6
|
value: string | number;
|
7
7
|
};
|
8
8
|
type Props = Omit<ComponentPropsWithRef<ReactSelect>, "placeholder" | "noOptionsMessage"> & {
|
9
|
-
id
|
10
|
-
label
|
9
|
+
id?: string;
|
10
|
+
label?: string;
|
11
11
|
options: {
|
12
12
|
label: string;
|
13
13
|
value?: string | number | readonly string[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Form/Select/Select.scss";
|
3
3
|
import ReactSelect from "react-select";
|
4
4
|
import { forwardRef, useId } from "react";
|
@@ -11,7 +11,7 @@ const Select = forwardRef(({ id, required, disabled, label, errorLabel, noOption
|
|
11
11
|
const idError = useId();
|
12
12
|
let inputId = useId();
|
13
13
|
inputId = id || inputId;
|
14
|
-
return (_jsxs(
|
14
|
+
return (_jsxs("div", { children: [label && (_jsxs("label", { htmlFor: inputId, className: "af-form__select-label", children: [label, required && _jsx("span", { "aria-hidden": "true", children: " *" })] })), _jsx(ReactSelect, { inputId: inputId, "aria-errormessage": idError, "aria-invalid": Boolean(errorLabel), ariaLiveMessages: defaultAriaLiveMessages, screenReaderStatus: ({ count }) => `${count} résultat${count > 1 ? "s" : ""} disponible${count > 1 ? "s" : ""}`, unstyled: true, isDisabled: disabled, noOptionsMessage: () => noOptionsMessage || "Aucun résultat", components: {
|
15
15
|
DropdownIndicator,
|
16
16
|
Option: CustomOption,
|
17
17
|
}, classNames: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axa-fr/design-system-look-and-feel-react",
|
3
|
-
"version": "1.0.5-ci.
|
3
|
+
"version": "1.0.5-ci.22",
|
4
4
|
"description": "",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
@@ -45,7 +45,7 @@
|
|
45
45
|
},
|
46
46
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
47
47
|
"peerDependencies": {
|
48
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.
|
48
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.22",
|
49
49
|
"@material-symbols/svg-400": ">= 0.19.0",
|
50
50
|
"react": ">= 18"
|
51
51
|
},
|