@axa-fr/design-system-apollo-react 1.0.3-alpha.220 → 1.0.3-alpha.222
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/Form/Select/SelectApollo.d.ts +4 -0
- package/dist/Form/Select/SelectApollo.js +6 -0
- package/dist/Form/Select/SelectCommon.d.ts +19 -0
- package/dist/Form/Select/SelectCommon.js +13 -0
- package/dist/Form/Select/SelectLF.d.ts +4 -0
- package/dist/Form/Select/SelectLF.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/indexLF.d.ts +1 -0
- package/dist/indexLF.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectApollo.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Select as SelectCommon } from "./SelectCommon";
|
|
4
|
+
export declare const Select: (props: Omit<ComponentProps<typeof SelectCommon>, "ItemLabelComponent" | "ItemMessageComponent">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectApollo.scss";
|
|
3
|
+
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
|
|
5
|
+
import { Select as SelectCommon } from "./SelectCommon";
|
|
6
|
+
export const Select = (props) => (_jsx(SelectCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentProps, type ComponentPropsWithRef, type ComponentType } from "react";
|
|
2
|
+
import { ItemLabel } from "../ItemLabel/ItemLabelCommon";
|
|
3
|
+
import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
|
|
4
|
+
type SelectProps = ComponentPropsWithRef<"select"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
classModifier?: string;
|
|
7
|
+
label: ComponentProps<typeof ItemLabel>["label"];
|
|
8
|
+
errorLabel?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
success?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
buttonLabel?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
helper?: string;
|
|
15
|
+
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabel>, "ButtonComponent">>;
|
|
16
|
+
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
17
|
+
} & Partial<ComponentPropsWithRef<typeof ItemLabel>>;
|
|
18
|
+
declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
19
|
+
export { Select };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useId, } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
const Select = forwardRef(({ id, required, label, error, placeholder, children, helper, success, description, buttonLabel, onButtonClick, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, ...otherProps }, inputRef) => {
|
|
5
|
+
const idLabel = useId();
|
|
6
|
+
const idMessage = useId();
|
|
7
|
+
let inputId = useId();
|
|
8
|
+
inputId = id || inputId;
|
|
9
|
+
const classname = classNames("af-form__select-input", error && "af-form__select-input--error");
|
|
10
|
+
return (_jsxs("div", { children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId, idLabel: idLabel }), _jsxs("select", { className: classname, ...otherProps, ref: inputRef, id: inputId, children: [Boolean(placeholder) && (_jsx("option", { disabled: true, value: "", children: placeholder })), children] }), helper && _jsx("span", { className: "af-form__input-helper", children: helper }), _jsx(ItemMessageComponent, { id: idMessage, message: error || success, messageType: error ? "error" : "success" })] }));
|
|
11
|
+
});
|
|
12
|
+
Select.displayName = "Select";
|
|
13
|
+
export { Select };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectLF.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Select as SelectCommon } from "./SelectCommon";
|
|
4
|
+
export declare const Select: (props: Omit<ComponentProps<typeof SelectCommon>, "ItemLabelComponent" | "ItemMessageComponent">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectLF.scss";
|
|
3
|
+
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessageLF";
|
|
5
|
+
import { Select as SelectCommon } from "./SelectCommon";
|
|
6
|
+
export const Select = (props) => (_jsx(SelectCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { DebugGrid } from "./Grid/DebugGrid";
|
|
|
11
11
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
12
12
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
13
13
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
14
|
+
export { Select } from "./Form/Select/SelectApollo";
|
|
14
15
|
export { TextInput } from "./Form/TextInput/TextInputApollo";
|
|
15
16
|
export { Icon, iconVariants, type IconVariants, iconSizeVariants, type IconSizeVariants, } from "./Icon/IconApollo";
|
|
16
17
|
export { Divider } from "./Divider/DividerApollo";
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { DebugGrid } from "./Grid/DebugGrid";
|
|
|
11
11
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
12
12
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
13
13
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
14
|
+
export { Select } from "./Form/Select/SelectApollo";
|
|
14
15
|
export { TextInput } from "./Form/TextInput/TextInputApollo";
|
|
15
16
|
export { Icon, iconVariants, iconSizeVariants, } from "./Icon/IconApollo";
|
|
16
17
|
export { Divider } from "./Divider/DividerApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { Tag, type TagVariants, tagVariants } from "./Tag/TagLF";
|
|
|
9
9
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
10
10
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
11
11
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
12
|
+
export { Select } from "./Form/Select/SelectLF";
|
|
12
13
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
13
14
|
export { TextInput } from "./Form/TextInput/TextInputLF";
|
|
14
15
|
export { Icon, iconVariants, type IconVariants, iconSizeVariants, type IconSizeVariants, } from "./Icon/IconLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -9,6 +9,7 @@ export { Tag, tagVariants } from "./Tag/TagLF";
|
|
|
9
9
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
10
10
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
11
11
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
12
|
+
export { Select } from "./Form/Select/SelectLF";
|
|
12
13
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
13
14
|
export { TextInput } from "./Form/TextInput/TextInputLF";
|
|
14
15
|
export { Icon, iconVariants, iconSizeVariants, } from "./Icon/IconLF";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.222",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.3-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.3-alpha.222",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.222",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|