@axa-fr/design-system-apollo-react 1.0.5-alpha.305 → 1.0.5-alpha.313
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/Svg/Svg.d.ts +3 -0
- package/dist/Svg/Svg.js +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/indexLF.d.ts +9 -3
- package/dist/indexLF.js +9 -3
- package/dist/utilities/getComponentClassName.js +1 -0
- package/package.json +3 -3
package/dist/Svg/Svg.d.ts
CHANGED
|
@@ -3,5 +3,8 @@ type SvgProps = SVGAttributes<SVGSVGElement> & {
|
|
|
3
3
|
src: string;
|
|
4
4
|
alt?: string;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use Icon instead
|
|
8
|
+
*/
|
|
6
9
|
export declare const Svg: ({ src, alt, width, height, ...props }: SvgProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
10
|
export {};
|
package/dist/Svg/Svg.js
CHANGED
|
@@ -7,6 +7,9 @@ const cloneAttributes = (from, to) => {
|
|
|
7
7
|
to.setAttribute(attribute, from.getAttribute(attribute));
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use Icon instead
|
|
12
|
+
*/
|
|
10
13
|
export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
|
|
11
14
|
const rootRef = React.useRef(null);
|
|
12
15
|
const [hasError, setHasError] = React.useState(false);
|
|
@@ -14,6 +17,7 @@ export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
|
|
|
14
17
|
if (hasError) {
|
|
15
18
|
setHasError(false);
|
|
16
19
|
}
|
|
20
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
21
|
}, [src]);
|
|
18
22
|
React.useLayoutEffect(() => {
|
|
19
23
|
if (hasError) {
|
|
@@ -25,6 +29,8 @@ export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
|
|
|
25
29
|
const svg = document.createElement("svg");
|
|
26
30
|
parent.appendChild(svg);
|
|
27
31
|
cloneAttributes(root, svg);
|
|
32
|
+
// Default SVG size was 24px with @material-design-icons/svg. With @material-symbols/svg-400 this is now 48px (with no native way to change it)
|
|
33
|
+
// In order not to break existing CSS, we manually set the default value back to 24px
|
|
28
34
|
svg.setAttribute("width", width.toString());
|
|
29
35
|
svg.setAttribute("height", height.toString());
|
|
30
36
|
svgInjector(svg, {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
|
9
9
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
|
10
10
|
export { Divider } from "./Divider/DividerApollo";
|
|
11
11
|
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
12
|
-
export { CardCheckbox,
|
|
12
|
+
export { CardCheckbox,
|
|
13
|
+
/** @deprecated Use `CardCheckbox` instead. */
|
|
14
|
+
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
13
15
|
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
14
16
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
15
17
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,9 @@ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
|
9
9
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
|
10
10
|
export { Divider } from "./Divider/DividerApollo";
|
|
11
11
|
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
12
|
-
export { CardCheckbox,
|
|
12
|
+
export { CardCheckbox,
|
|
13
|
+
/** @deprecated Use `CardCheckbox` instead. */
|
|
14
|
+
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
13
15
|
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
14
16
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
15
17
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -8,15 +8,21 @@ export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
|
8
8
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
|
9
9
|
export { Divider } from "./Divider/DividerLF";
|
|
10
10
|
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
11
|
-
export { CardCheckbox,
|
|
11
|
+
export { CardCheckbox,
|
|
12
|
+
/** @deprecated Use `CardCheckbox` instead. */
|
|
13
|
+
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
12
14
|
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
13
|
-
export { InputDate,
|
|
15
|
+
export { InputDate,
|
|
16
|
+
/** @deprecated Use `InputDate` instead. */
|
|
17
|
+
InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
14
18
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
15
19
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
16
20
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
17
21
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
18
22
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
19
|
-
export { InputText,
|
|
23
|
+
export { InputText,
|
|
24
|
+
/** @deprecated Use `InputText` instead. */
|
|
25
|
+
InputText as TextInput, } from "./Form/InputText/InputTextLF";
|
|
20
26
|
export { DebugGrid } from "./Grid/DebugGridLF";
|
|
21
27
|
export { Heading, type HeadingLevel } from "./Heading/HeadingLF";
|
|
22
28
|
export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./Icon/IconLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -8,15 +8,21 @@ export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
|
8
8
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
|
9
9
|
export { Divider } from "./Divider/DividerLF";
|
|
10
10
|
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
11
|
-
export { CardCheckbox,
|
|
11
|
+
export { CardCheckbox,
|
|
12
|
+
/** @deprecated Use `CardCheckbox` instead. */
|
|
13
|
+
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
12
14
|
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
13
|
-
export { InputDate,
|
|
15
|
+
export { InputDate,
|
|
16
|
+
/** @deprecated Use `InputDate` instead. */
|
|
17
|
+
InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
14
18
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
15
19
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
16
20
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
17
21
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
18
22
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
19
|
-
export { InputText,
|
|
23
|
+
export { InputText,
|
|
24
|
+
/** @deprecated Use `InputText` instead. */
|
|
25
|
+
InputText as TextInput, } from "./Form/InputText/InputTextLF";
|
|
20
26
|
export { DebugGrid } from "./Grid/DebugGridLF";
|
|
21
27
|
export { Heading } from "./Heading/HeadingLF";
|
|
22
28
|
export { Icon, iconSizeVariants, iconVariants, } from "./Icon/IconLF";
|
|
@@ -12,6 +12,7 @@ const listClassModifier = (classModifier) => {
|
|
|
12
12
|
return classModifier.split(" ");
|
|
13
13
|
};
|
|
14
14
|
export const getComponentClassName = (defaultClassName, className, classModifier) => {
|
|
15
|
+
// Fail fast, when no defaultClassName we don't want to loop on modifier
|
|
15
16
|
if (!defaultClassName) {
|
|
16
17
|
return "";
|
|
17
18
|
}
|
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.313",
|
|
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.313",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.313",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|