@descope/flow-components 2.0.262 → 2.0.263
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/index.cjs.js +11 -18
- package/dist/index.esm.js +11 -18
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -26,6 +26,8 @@ const Boolean = React__default.default.forwardRef(({ type, ...props }, ref) => {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
const isImageSource = (src) => src.startsWith('data:image') || src.startsWith('http');
|
|
30
|
+
|
|
29
31
|
var apple = ({ noColor, ...props }) => (React__default.default.createElement("svg", { width: "1.5em", height: "1.5em", viewBox: "0 0 800 1000", xmlns: "http://www.w3.org/2000/svg", fill: noColor ? 'currentColor' : '#000000', style: { marginBottom: '0.1em' }, "data-icon": "apple", ...props },
|
|
30
32
|
React__default.default.createElement("path", { d: "M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z" })));
|
|
31
33
|
|
|
@@ -123,19 +125,18 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
|
123
125
|
whatsapp: whatsapp
|
|
124
126
|
});
|
|
125
127
|
|
|
126
|
-
const
|
|
128
|
+
const Icon = ({ icon, noColor, ...props }) => {
|
|
129
|
+
if (!icon)
|
|
130
|
+
return undefined;
|
|
131
|
+
if (isImageSource(icon))
|
|
132
|
+
return (React__default.default.createElement("img", { ...props, src: icon, alt: icon, style: { height: '1.5em', width: '1.5em' } }));
|
|
133
|
+
return React__default.default.createElement("descope-icon", null, icons[icon]?.({ noColor, ...props }));
|
|
134
|
+
};
|
|
127
135
|
|
|
128
136
|
const Button = React__default.default.forwardRef(({ children, startIcon, startIconColorText, color, ...props }, ref) => {
|
|
129
|
-
const
|
|
130
|
-
if (!startIcon)
|
|
131
|
-
return undefined;
|
|
132
|
-
if (isImageSource(startIcon))
|
|
133
|
-
return (React__default.default.createElement("img", { src: startIcon, alt: props.name, style: { height: '1.5em', width: '1.5em' } }));
|
|
134
|
-
return icons[startIcon]?.({ noColor: startIconColorText });
|
|
135
|
-
}, [startIcon, props.name, startIconColorText]);
|
|
136
|
-
const isSquare = React.useMemo(() => !!(icon && !children), [icon, children]);
|
|
137
|
+
const isSquare = React.useMemo(() => !!(startIcon && !children), [startIcon, children]);
|
|
137
138
|
return (React__default.default.createElement("descope-button", { ...props, mode: color, ref: ref, square: isSquare },
|
|
138
|
-
icon,
|
|
139
|
+
React__default.default.createElement(Icon, { icon: startIcon, noColor: startIconColorText }),
|
|
139
140
|
children));
|
|
140
141
|
});
|
|
141
142
|
Button.defaultProps = {
|
|
@@ -461,14 +462,6 @@ SAMLGroupMappings.defaultProps = {
|
|
|
461
462
|
size: 'md'
|
|
462
463
|
};
|
|
463
464
|
|
|
464
|
-
const Icon = ({ icon, noColor, ...props }) => {
|
|
465
|
-
if (!icon)
|
|
466
|
-
return undefined;
|
|
467
|
-
if (isImageSource(icon))
|
|
468
|
-
return (React__default.default.createElement("img", { ...props, src: icon, alt: icon, style: { height: '1.5em', width: '1.5em' } }));
|
|
469
|
-
return icons[icon]?.({ noColor, ...props });
|
|
470
|
-
};
|
|
471
|
-
|
|
472
465
|
const UserAuthMethod$1 = React__default.default.forwardRef(({ methodIcon, buttonIcon, ...props }, ref) => (React__default.default.createElement("descope-user-auth-method", { ...props, ref: ref },
|
|
473
466
|
React__default.default.createElement(Icon, { icon: methodIcon, slot: "method-icon", noColor: true }),
|
|
474
467
|
React__default.default.createElement(Icon, { icon: buttonIcon, slot: "button-icon", noColor: true, width: "1em", height: "1em" }))));
|
package/dist/index.esm.js
CHANGED
|
@@ -20,6 +20,8 @@ const Boolean = React.forwardRef(({ type, ...props }, ref) => {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
const isImageSource = (src) => src.startsWith('data:image') || src.startsWith('http');
|
|
24
|
+
|
|
23
25
|
var apple = ({ noColor, ...props }) => (React.createElement("svg", { width: "1.5em", height: "1.5em", viewBox: "0 0 800 1000", xmlns: "http://www.w3.org/2000/svg", fill: noColor ? 'currentColor' : '#000000', style: { marginBottom: '0.1em' }, "data-icon": "apple", ...props },
|
|
24
26
|
React.createElement("path", { d: "M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z" })));
|
|
25
27
|
|
|
@@ -117,19 +119,18 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
|
117
119
|
whatsapp: whatsapp
|
|
118
120
|
});
|
|
119
121
|
|
|
120
|
-
const
|
|
122
|
+
const Icon = ({ icon, noColor, ...props }) => {
|
|
123
|
+
if (!icon)
|
|
124
|
+
return undefined;
|
|
125
|
+
if (isImageSource(icon))
|
|
126
|
+
return (React.createElement("img", { ...props, src: icon, alt: icon, style: { height: '1.5em', width: '1.5em' } }));
|
|
127
|
+
return React.createElement("descope-icon", null, icons[icon]?.({ noColor, ...props }));
|
|
128
|
+
};
|
|
121
129
|
|
|
122
130
|
const Button = React.forwardRef(({ children, startIcon, startIconColorText, color, ...props }, ref) => {
|
|
123
|
-
const
|
|
124
|
-
if (!startIcon)
|
|
125
|
-
return undefined;
|
|
126
|
-
if (isImageSource(startIcon))
|
|
127
|
-
return (React.createElement("img", { src: startIcon, alt: props.name, style: { height: '1.5em', width: '1.5em' } }));
|
|
128
|
-
return icons[startIcon]?.({ noColor: startIconColorText });
|
|
129
|
-
}, [startIcon, props.name, startIconColorText]);
|
|
130
|
-
const isSquare = useMemo(() => !!(icon && !children), [icon, children]);
|
|
131
|
+
const isSquare = useMemo(() => !!(startIcon && !children), [startIcon, children]);
|
|
131
132
|
return (React.createElement("descope-button", { ...props, mode: color, ref: ref, square: isSquare },
|
|
132
|
-
icon,
|
|
133
|
+
React.createElement(Icon, { icon: startIcon, noColor: startIconColorText }),
|
|
133
134
|
children));
|
|
134
135
|
});
|
|
135
136
|
Button.defaultProps = {
|
|
@@ -455,14 +456,6 @@ SAMLGroupMappings.defaultProps = {
|
|
|
455
456
|
size: 'md'
|
|
456
457
|
};
|
|
457
458
|
|
|
458
|
-
const Icon = ({ icon, noColor, ...props }) => {
|
|
459
|
-
if (!icon)
|
|
460
|
-
return undefined;
|
|
461
|
-
if (isImageSource(icon))
|
|
462
|
-
return (React.createElement("img", { ...props, src: icon, alt: icon, style: { height: '1.5em', width: '1.5em' } }));
|
|
463
|
-
return icons[icon]?.({ noColor, ...props });
|
|
464
|
-
};
|
|
465
|
-
|
|
466
459
|
const UserAuthMethod$1 = React.forwardRef(({ methodIcon, buttonIcon, ...props }, ref) => (React.createElement("descope-user-auth-method", { ...props, ref: ref },
|
|
467
460
|
React.createElement(Icon, { icon: methodIcon, slot: "method-icon", noColor: true }),
|
|
468
461
|
React.createElement(Icon, { icon: buttonIcon, slot: "button-icon", noColor: true, width: "1em", height: "1em" }))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.263",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"typescript": "^5.0.0"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@descope/web-components-ui": "1.0.
|
|
103
|
+
"@descope/web-components-ui": "1.0.307"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": ">=17"
|