`;
+
+ btn.className = "af-form__group row";
+
+ return btn;
+ },
+ args: {
+ label: "Select",
+ },
+ argTypes: {},
+};
diff --git a/packages/css/src/Form/InputText/InputText.agent.scss b/packages/css/src/Form/InputText/InputText.agent.scss
index 9aafcd708..a9059441c 100644
--- a/packages/css/src/Form/InputText/InputText.agent.scss
+++ b/packages/css/src/Form/InputText/InputText.agent.scss
@@ -84,14 +84,6 @@
display: none;
}
- &__help {
- position: absolute;
- bottom: -20px;
- display: block;
- font-size: 0.8125em;
- color: common.$color-gray;
- }
-
&__clear {
position: absolute;
top: 0.75rem;
diff --git a/packages/css/src/Form/core/FormCore.agent.scss b/packages/css/src/Form/core/FormCore.agent.scss
index 900f10126..89f862278 100644
--- a/packages/css/src/Form/core/FormCore.agent.scss
+++ b/packages/css/src/Form/core/FormCore.agent.scss
@@ -50,6 +50,14 @@
}
}
+ &__help {
+ position: absolute;
+ bottom: -20px;
+ display: block;
+ font-size: 0.8125em;
+ color: common.$color-gray;
+ }
+
&__input-cmplt {
display: inline-flex;
margin-left: 1rem;
diff --git a/packages/react/src/Form/Select/Select.mdx b/packages/react/src/Form/Select/Select.mdx
new file mode 100644
index 000000000..4ba3da9ca
--- /dev/null
+++ b/packages/react/src/Form/Select/Select.mdx
@@ -0,0 +1,45 @@
+import * as SelectInputStories from "./SelectInput.stories.tsx";
+import * as SelectStories from "./Select.stories.tsx";
+import { ArgsTable, Canvas, Meta } from "@storybook/addon-docs";
+
+
+
+# Select
+
+The select component comes in two variants: [**with layout** `InputSelect`](#inputselect--with-label) and [**without** label `Select`](#select-without-label).
+`SelectBase` also exists, but is just the `Select` component in `mode="base"`, and will be deprecated in the future.
+
+In most cases you will want to use the version with the label. However, in some cases, the default layout will not work for you.
+In that case, you can use the version without the label.
+
+## `InputSelect` — With label
+
+This is the complete component, with label, description, and error message.
+
+
+
+
+
+### Required
+
+The component can be required. In that case, the label will be followed by a red asterisk. In order to make the component required, you need to add to the `classModifier` the value `required`.
+
+### Status messages
+
+The component can be in one of 4 states: the default one which will display the help message, `success`, `error`, and `warning`.
+In order to display the message and color the component, you need to pass the `message`, `messageType` props and set `forceDisplayMessage` to `true`.
+
+
+
+### Placeholders
+
+The component comes with 2 modes : `base` and `default`. The only difference is that the `base` mode **never** displays the placeholder.
+If you are not sure which mode to use, use the `default` mode.
+
+## `Select` Without label
+
+The component without the label is a bare-bones version of the component. It is useful when you need to customize the layout of the component.
+
+
+
+
diff --git a/packages/react/src/Form/Select/Select.stories.tsx b/packages/react/src/Form/Select/Select.stories.tsx
new file mode 100644
index 000000000..9a6af10fd
--- /dev/null
+++ b/packages/react/src/Form/Select/Select.stories.tsx
@@ -0,0 +1,43 @@
+import { Meta, StoryObj } from "@storybook/react";
+import { ComponentProps } from "react";
+import { Select } from "./Select";
+
+const options = [
+ { value: "fun", label: "For fun" },
+ { value: "work", label: "For work" },
+ { value: "drink", label: "For drink" },
+];
+
+const meta: Meta = {
+ component: Select,
+ title: "Components/Form/Input/Select",
+ argTypes: { onChange: { action: "onChange" } },
+};
+
+export default meta;
+
+type StoryProps = ComponentProps;
+type Story = StoryObj;
+
+export const SelectStory: Story = {
+ name: "Select",
+ tags: ["Form", "Input"],
+ render: ({ onChange, ...args }) => ,
+ args: {
+ mode: "default",
+ className: "",
+ options,
+ placeholder: "- Select -",
+ name: "name",
+ id: "nameid",
+ disabled: false,
+ },
+ argTypes: {
+ mode: {
+ control: {
+ type: "select",
+ options: ["default", "base"],
+ },
+ },
+ },
+};
diff --git a/packages/react/src/Form/Select/Select.tsx b/packages/react/src/Form/Select/Select.tsx
new file mode 100644
index 000000000..b07038582
--- /dev/null
+++ b/packages/react/src/Form/Select/Select.tsx
@@ -0,0 +1,13 @@
+import { ComponentProps } from "react";
+import { SelectBase } from "./SelectBase";
+import { SelectDefault } from "./SelectDefault";
+
+type SelectProps = ComponentProps & {
+ mode?: "default" | "base";
+};
+const Select = ({ mode = "default", children, ...props }: SelectProps) => {
+ const DynamicComponent = mode === "default" ? SelectDefault : SelectBase;
+ return {children};
+};
+
+export { Select };
diff --git a/packages/react/src/Form/Select/SelectBase.tsx b/packages/react/src/Form/Select/SelectBase.tsx
new file mode 100644
index 000000000..6cd15c426
--- /dev/null
+++ b/packages/react/src/Form/Select/SelectBase.tsx
@@ -0,0 +1,50 @@
+import "@axa-fr/design-system-css/dist/Form/InputSelect/InputSelect.agent.scss";
+import {
+ ComponentPropsWithoutRef,
+ forwardRef,
+ OptionHTMLAttributes,
+} from "react";
+import { getComponentClassName } from "../core";
+
+type Props = Omit<
+ ComponentPropsWithoutRef<"select"> & {
+ options: OptionHTMLAttributes[];
+ classModifier?: string;
+ },
+ "required"
+>;
+
+/**
+ * @deprecated Use Select instead
+ */
+const SelectBase = forwardRef(
+ ({ options, id, className, classModifier, ...otherProps }, inputRef) => {
+ const componentClassName = getComponentClassName(
+ className,
+ classModifier,
+ "af-form__input-select",
+ );
+ return (
+