@descope/flow-components 2.0.115 → 2.0.117

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 CHANGED
@@ -103,7 +103,8 @@ var icons = /*#__PURE__*/Object.freeze({
103
103
 
104
104
  const Button = React__default.default.forwardRef(({ children, startIcon, startIconColorText, color, ...props }, ref) => {
105
105
  const icon = React.useMemo(() => icons[startIcon]?.({ noColor: startIconColorText }), [startIcon, startIconColorText]);
106
- return (React__default.default.createElement("descope-button", { ...props, mode: color, ref: ref },
106
+ const isSquare = React.useMemo(() => !!(icon && !children), [icon, children]);
107
+ return (React__default.default.createElement("descope-button", { ...props, mode: color, ref: ref, square: isSquare },
107
108
  icon,
108
109
  children));
109
110
  });
package/dist/index.d.ts CHANGED
@@ -52,6 +52,7 @@ declare global {
52
52
  interface IntrinsicElements {
53
53
  'descope-button': React.DetailedHTMLProps<React.HTMLAttributes<HTMLButtonElement>, HTMLButtonElement> & {
54
54
  mode: string;
55
+ square?: boolean;
55
56
  };
56
57
  }
57
58
  }
@@ -278,8 +279,8 @@ type Props$6 = {
278
279
  'phone-input-placeholder'?: string;
279
280
  'country-input-placeholder'?: string;
280
281
  'restrict-countries'?: string;
281
- };
282
- declare const Phone: React.ForwardRefExoticComponent<Props$6 & React.RefAttributes<HTMLInputElement>>;
282
+ } & DescopeInputProps;
283
+ declare const Phone: React.ForwardRefExoticComponent<Omit<Props$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
283
284
 
284
285
  type Props$5 = {
285
286
  children?: JSX.Element[];
package/dist/index.esm.js CHANGED
@@ -97,7 +97,8 @@ var icons = /*#__PURE__*/Object.freeze({
97
97
 
98
98
  const Button = React.forwardRef(({ children, startIcon, startIconColorText, color, ...props }, ref) => {
99
99
  const icon = useMemo(() => icons[startIcon]?.({ noColor: startIconColorText }), [startIcon, startIconColorText]);
100
- return (React.createElement("descope-button", { ...props, mode: color, ref: ref },
100
+ const isSquare = useMemo(() => !!(icon && !children), [icon, children]);
101
+ return (React.createElement("descope-button", { ...props, mode: color, ref: ref, square: isSquare },
101
102
  icon,
102
103
  children));
103
104
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.115",
3
+ "version": "2.0.117",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -99,7 +99,7 @@
99
99
  "typescript": "^4.5.3"
100
100
  },
101
101
  "dependencies": {
102
- "@descope/web-components-ui": "1.0.176",
102
+ "@descope/web-components-ui": "1.0.177",
103
103
  "rollup-plugin-dts": "^5.3.0"
104
104
  },
105
105
  "peerDependencies": {