@axa-fr/design-system-apollo-react 1.0.5-alpha.298 → 1.0.5-alpha.299
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/Dropdown/DropdownApollo.d.ts +4 -0
- package/dist/Form/Dropdown/DropdownApollo.js +6 -0
- package/dist/Form/{Select/SelectCommon.d.ts → Dropdown/DropdownCommon.d.ts} +3 -3
- package/dist/Form/{Select/SelectCommon.js → Dropdown/DropdownCommon.js} +4 -4
- package/dist/Form/Dropdown/DropdownLF.d.ts +4 -0
- package/dist/Form/Dropdown/DropdownLF.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/indexLF.d.ts +1 -1
- package/dist/indexLF.js +1 -1
- package/package.json +3 -3
- package/dist/Form/Select/SelectApollo.d.ts +0 -27
- package/dist/Form/Select/SelectApollo.js +0 -8
- package/dist/Form/Select/SelectLF.d.ts +0 -27
- package/dist/Form/Select/SelectLF.js +0 -8
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Dropdown/DropdownApollo.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Dropdown as DropdownCommon } from "./DropdownCommon";
|
|
4
|
+
export declare const Dropdown: (props: Omit<ComponentProps<typeof DropdownCommon>, "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/Dropdown/DropdownApollo.scss";
|
|
3
|
+
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
|
|
5
|
+
import { Dropdown as DropdownCommon } from "./DropdownCommon";
|
|
6
|
+
export const Dropdown = (props) => (_jsx(DropdownCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentPropsWithRef, type ComponentType } from "react";
|
|
2
2
|
import { ItemLabel } from "../ItemLabel/ItemLabelCommon";
|
|
3
3
|
import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
|
|
4
|
-
type
|
|
4
|
+
type DropdownProps = ComponentPropsWithRef<"select"> & {
|
|
5
5
|
id?: string;
|
|
6
6
|
classModifier?: string;
|
|
7
7
|
label?: ComponentProps<typeof ItemLabel>["label"];
|
|
@@ -14,5 +14,5 @@ type SelectProps = ComponentPropsWithRef<"select"> & {
|
|
|
14
14
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabel>, "ButtonComponent">>;
|
|
15
15
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
16
16
|
} & Partial<ComponentPropsWithRef<typeof ItemLabel>>;
|
|
17
|
-
declare const
|
|
18
|
-
export {
|
|
17
|
+
declare const Dropdown: import("react").ForwardRefExoticComponent<Omit<DropdownProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
18
|
+
export { Dropdown };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId, } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
const
|
|
4
|
+
const Dropdown = forwardRef(({ id, required, label, error, placeholder, children, helper, success, description, buttonLabel, onButtonClick, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, ...otherProps }, inputRef) => {
|
|
5
5
|
const idLabel = useId();
|
|
6
6
|
const idMessage = useId();
|
|
7
7
|
let inputId = useId();
|
|
8
8
|
inputId = id || inputId;
|
|
9
|
-
const classname = classNames("af-
|
|
9
|
+
const classname = classNames("af-form__dropdown-input", error && "af-form__dropdown-input--error");
|
|
10
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
11
|
});
|
|
12
|
-
|
|
13
|
-
export {
|
|
12
|
+
Dropdown.displayName = "Dropdown";
|
|
13
|
+
export { Dropdown };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Dropdown/DropdownLF.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Dropdown as DropdownCommon } from "./DropdownCommon";
|
|
4
|
+
export declare const Dropdown: (props: Omit<ComponentProps<typeof DropdownCommon>, "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/Dropdown/DropdownLF.scss";
|
|
3
|
+
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessageLF";
|
|
5
|
+
import { Dropdown as DropdownCommon } from "./DropdownCommon";
|
|
6
|
+
export const Dropdown = (props) => (_jsx(DropdownCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
|
14
14
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
15
15
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
16
16
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
17
|
-
export { Select } from "./Form/Select/SelectApollo";
|
|
18
17
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
19
18
|
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
20
19
|
export { RadioCard } from "./Form/Radio/RadioCard/RadioCardApollo";
|
|
@@ -34,3 +33,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
34
33
|
export { Tag, tagVariants, type TagVariants } from "./Tag/TagApollo";
|
|
35
34
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
36
35
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
36
|
+
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
|
14
14
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
15
15
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
16
16
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
17
|
-
export { Select } from "./Form/Select/SelectApollo";
|
|
18
17
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
19
18
|
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
20
19
|
export { RadioCard } from "./Form/Radio/RadioCard/RadioCardApollo";
|
|
@@ -34,3 +33,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
34
33
|
export { Tag, tagVariants } from "./Tag/TagApollo";
|
|
35
34
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
36
35
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
36
|
+
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
|
13
13
|
export { InputDate, InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
14
14
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
15
15
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
16
|
-
export { Select } from "./Form/Select/SelectLF";
|
|
17
16
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
18
17
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
19
18
|
export { RadioCard } from "./Form/Radio/RadioCard/RadioCardLF";
|
|
@@ -33,3 +32,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
33
32
|
export { Tag, tagVariants, type TagVariants } from "./Tag/TagLF";
|
|
34
33
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
35
34
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
35
|
+
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -13,7 +13,6 @@ export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
|
13
13
|
export { InputDate, InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
14
14
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
15
15
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
16
|
-
export { Select } from "./Form/Select/SelectLF";
|
|
17
16
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
18
17
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
19
18
|
export { RadioCard } from "./Form/Radio/RadioCard/RadioCardLF";
|
|
@@ -33,3 +32,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
33
32
|
export { Tag, tagVariants } from "./Tag/TagLF";
|
|
34
33
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
35
34
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
35
|
+
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.299",
|
|
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.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.299",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.299",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectApollo.scss";
|
|
2
|
-
import { type ComponentProps } from "react";
|
|
3
|
-
import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
|
|
4
|
-
export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & {
|
|
5
|
-
id?: string;
|
|
6
|
-
classModifier?: string;
|
|
7
|
-
label?: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
8
|
-
error?: string;
|
|
9
|
-
success?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
buttonLabel?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
helper?: string;
|
|
14
|
-
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
15
|
-
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
16
|
-
} & Partial<{
|
|
17
|
-
label?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
inputId: string;
|
|
21
|
-
idLabel: string;
|
|
22
|
-
sideButtonLabel?: string;
|
|
23
|
-
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
|
-
buttonLabel?: string;
|
|
25
|
-
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
26
|
-
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
27
|
-
}>, "ref"> & import("react").RefAttributes<HTMLSelectElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectApollo.scss";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
5
|
-
import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
|
|
6
|
-
import { Select as SelectCommon } from "./SelectCommon";
|
|
7
|
-
export const Select = forwardRef((props, ref) => (_jsx(SelectCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
|
|
8
|
-
Select.displayName = "Select";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectLF.scss";
|
|
2
|
-
import { type ComponentProps } from "react";
|
|
3
|
-
import { ItemMessage } from "../ItemMessage/ItemMessageLF";
|
|
4
|
-
export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & {
|
|
5
|
-
id?: string;
|
|
6
|
-
classModifier?: string;
|
|
7
|
-
label?: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
8
|
-
error?: string;
|
|
9
|
-
success?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
buttonLabel?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
helper?: string;
|
|
14
|
-
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
15
|
-
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
16
|
-
} & Partial<{
|
|
17
|
-
label?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
inputId: string;
|
|
21
|
-
idLabel: string;
|
|
22
|
-
sideButtonLabel?: string;
|
|
23
|
-
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
|
-
buttonLabel?: string;
|
|
25
|
-
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
26
|
-
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
27
|
-
}>, "ref"> & import("react").RefAttributes<HTMLSelectElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Select/SelectLF.scss";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
5
|
-
import { ItemMessage } from "../ItemMessage/ItemMessageLF";
|
|
6
|
-
import { Select as SelectCommon } from "./SelectCommon";
|
|
7
|
-
export const Select = forwardRef((props, ref) => (_jsx(SelectCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
|
|
8
|
-
Select.displayName = "Select";
|