@axa-fr/design-system-apollo-react 1.0.3-alpha.219 → 1.0.3-alpha.221
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/ClickIcon/ClickIconApollo.d.ts +2 -0
- package/dist/ClickIcon/ClickIconApollo.js +2 -0
- package/dist/ClickIcon/ClickIconCommon.d.ts +9 -0
- package/dist/ClickIcon/ClickIconCommon.js +3 -0
- package/dist/ClickIcon/ClickIconLF.d.ts +2 -0
- package/dist/ClickIcon/ClickIconLF.js +2 -0
- 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/Icon/IconCommon.d.ts +1 -1
- package/dist/Icon/IconCommon.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/indexLF.d.ts +2 -0
- package/dist/indexLF.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { IconVariants } from "../Icon/IconCommon";
|
|
3
|
+
export type ClickIconProps = ComponentPropsWithRef<"button"> & {
|
|
4
|
+
src: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
iconVariant?: IconVariants;
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ClickIcon: ({ src, className, iconVariant, iconClassName, ...props }: ClickIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "../Icon/IconCommon";
|
|
3
|
+
export const ClickIcon = ({ src, className, iconVariant = "primary", iconClassName, ...props }) => (_jsx("button", { type: "button", className: ["af-click-icon", className].filter(Boolean).join(" "), ...props, children: _jsx(Icon, { src: src, variant: iconVariant, className: iconClassName }) }));
|
|
@@ -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 }));
|
|
@@ -3,7 +3,7 @@ import { Svg } from "../Svg/Svg";
|
|
|
3
3
|
export declare const iconVariants: {
|
|
4
4
|
readonly primary: "primary";
|
|
5
5
|
readonly secondary: "secondary";
|
|
6
|
-
readonly
|
|
6
|
+
readonly disabled: "disabled";
|
|
7
7
|
};
|
|
8
8
|
export type IconVariants = keyof typeof iconVariants;
|
|
9
9
|
export declare const iconSizeVariants: {
|
package/dist/Icon/IconCommon.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -11,9 +11,11 @@ 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";
|
|
18
|
+
export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
17
19
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
18
20
|
export { BasePicture } from "./BasePicture/BasePictureApollo";
|
|
19
21
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageApollo";
|
package/dist/index.js
CHANGED
|
@@ -11,9 +11,11 @@ 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";
|
|
18
|
+
export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
17
19
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
18
20
|
export { BasePicture } from "./BasePicture/BasePictureApollo";
|
|
19
21
|
export { Message, messageVariants, } from "./Message/MessageApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -9,10 +9,12 @@ 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";
|
|
15
16
|
export { Divider } from "./Divider/DividerLF";
|
|
17
|
+
export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
16
18
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
17
19
|
export { BasePicture } from "./BasePicture/BasePictureLF";
|
|
18
20
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -9,10 +9,12 @@ 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";
|
|
15
16
|
export { Divider } from "./Divider/DividerLF";
|
|
17
|
+
export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
16
18
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
17
19
|
export { BasePicture } from "./BasePicture/BasePictureLF";
|
|
18
20
|
export { Message, messageVariants, } from "./Message/MessageLF";
|
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.221",
|
|
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.221",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.221",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|