@panneau/form-auth 2.0.92 → 3.0.0

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.
Files changed (3) hide show
  1. package/es/index.js +10 -10
  2. package/lib/index.js +15 -14
  3. package/package.json +7 -6
package/es/index.js CHANGED
@@ -4,7 +4,7 @@ import Form from '@panneau/form';
4
4
  import PropTypes from 'prop-types';
5
5
  import React, { useCallback } from 'react';
6
6
  import { FormattedMessage } from 'react-intl';
7
- import { Link } from 'react-router-dom';
7
+ import Link, { Link as Link$1 } from '@panneau/element-link';
8
8
  import { postJSON, getCSRFHeaders } from '@folklore/fetch';
9
9
 
10
10
  var _excluded$8 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
@@ -191,8 +191,8 @@ var ForgotPassword = function ForgotPassword(_ref) {
191
191
  }],
192
192
  submitButtonLabel: submitButtonLabel,
193
193
  actions: withLoginLink ? /*#__PURE__*/React.createElement(Link, {
194
- className: "py-2 px-4",
195
- to: loginLink
194
+ href: loginLink,
195
+ className: "py-2 px-4"
196
196
  }, loginLabel) : null
197
197
  }, props));
198
198
  };
@@ -275,9 +275,9 @@ var Login = function Login(_ref) {
275
275
  label: passwordLabel
276
276
  }],
277
277
  submitButtonLabel: submitButtonLabel,
278
- actions: withForgotPassword ? /*#__PURE__*/React.createElement(Link, {
279
- className: "py-2 px-4",
280
- to: forgotPasswordLink
278
+ actions: withForgotPassword ? /*#__PURE__*/React.createElement(Link$1, {
279
+ href: forgotPasswordLink,
280
+ className: "py-2 px-4"
281
281
  }, forgotPasswordLabel) : null
282
282
  }, props));
283
283
  };
@@ -385,8 +385,8 @@ var Register = function Register(_ref) {
385
385
  }],
386
386
  submitButtonLabel: submitButtonLabel,
387
387
  actions: withLoginLink ? /*#__PURE__*/React.createElement(Link, {
388
- className: "py-2 px-4",
389
- to: loginLink
388
+ href: loginLink,
389
+ className: "py-2 px-4"
390
390
  }, loginLabel) : null
391
391
  }, props));
392
392
  };
@@ -579,7 +579,7 @@ var TwoFactorDisable = function TwoFactorDisable(_ref) {
579
579
  submitButtonLabel: submitButtonLabel,
580
580
  actions: withCancelLink ? /*#__PURE__*/React.createElement(Link, {
581
581
  className: "py-2 px-4",
582
- to: cancelLink
582
+ href: cancelLink
583
583
  }, cancelLabel) : null,
584
584
  postForm: defaultPostForm
585
585
  }, props), /*#__PURE__*/React.createElement("p", null, explainationLabel));
@@ -641,7 +641,7 @@ var TwoFactorEnable = function TwoFactorEnable(_ref) {
641
641
  submitButtonLabel: submitButtonLabel,
642
642
  actions: withSkipLink ? /*#__PURE__*/React.createElement(Link, {
643
643
  className: "py-2 px-4",
644
- to: skipLink
644
+ href: skipLink
645
645
  }, skipLabel) : null
646
646
  }, props), /*#__PURE__*/React.createElement("p", null, explainationLabel));
647
647
  };
package/lib/index.js CHANGED
@@ -8,7 +8,7 @@ var Form = require('@panneau/form');
8
8
  var PropTypes = require('prop-types');
9
9
  var React = require('react');
10
10
  var reactIntl = require('react-intl');
11
- var reactRouterDom = require('react-router-dom');
11
+ var Link = require('@panneau/element-link');
12
12
  var fetch = require('@folklore/fetch');
13
13
 
14
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -17,6 +17,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_obje
17
17
  var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
18
18
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
19
19
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
+ var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
20
21
 
21
22
  var _excluded$8 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
22
23
  var propTypes$8 = {
@@ -201,9 +202,9 @@ var ForgotPassword = function ForgotPassword(_ref) {
201
202
  label: emailLabel
202
203
  }],
203
204
  submitButtonLabel: submitButtonLabel,
204
- actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
205
- className: "py-2 px-4",
206
- to: loginLink
205
+ actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
206
+ href: loginLink,
207
+ className: "py-2 px-4"
207
208
  }, loginLabel) : null
208
209
  }, props));
209
210
  };
@@ -286,9 +287,9 @@ var Login = function Login(_ref) {
286
287
  label: passwordLabel
287
288
  }],
288
289
  submitButtonLabel: submitButtonLabel,
289
- actions: withForgotPassword ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
290
- className: "py-2 px-4",
291
- to: forgotPasswordLink
290
+ actions: withForgotPassword ? /*#__PURE__*/React__default["default"].createElement(Link.Link, {
291
+ href: forgotPasswordLink,
292
+ className: "py-2 px-4"
292
293
  }, forgotPasswordLabel) : null
293
294
  }, props));
294
295
  };
@@ -395,9 +396,9 @@ var Register = function Register(_ref) {
395
396
  label: passwordConfirmationLabel
396
397
  }],
397
398
  submitButtonLabel: submitButtonLabel,
398
- actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
399
- className: "py-2 px-4",
400
- to: loginLink
399
+ actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
400
+ href: loginLink,
401
+ className: "py-2 px-4"
401
402
  }, loginLabel) : null
402
403
  }, props));
403
404
  };
@@ -588,9 +589,9 @@ var TwoFactorDisable = function TwoFactorDisable(_ref) {
588
589
  return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
589
590
  action: action,
590
591
  submitButtonLabel: submitButtonLabel,
591
- actions: withCancelLink ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
592
+ actions: withCancelLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
592
593
  className: "py-2 px-4",
593
- to: cancelLink
594
+ href: cancelLink
594
595
  }, cancelLabel) : null,
595
596
  postForm: defaultPostForm
596
597
  }, props), /*#__PURE__*/React__default["default"].createElement("p", null, explainationLabel));
@@ -650,9 +651,9 @@ var TwoFactorEnable = function TwoFactorEnable(_ref) {
650
651
  return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
651
652
  action: action,
652
653
  submitButtonLabel: submitButtonLabel,
653
- actions: withSkipLink ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
654
+ actions: withSkipLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
654
655
  className: "py-2 px-4",
655
- to: skipLink
656
+ href: skipLink
656
657
  }, skipLabel) : null
657
658
  }, props), /*#__PURE__*/React__default["default"].createElement("p", null, explainationLabel));
658
659
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-auth",
3
- "version": "2.0.92",
3
+ "version": "3.0.0",
4
4
  "description": "Basic forgot password form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -42,21 +42,22 @@
42
42
  "peerDependencies": {
43
43
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
44
44
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
45
- "react-router-dom": "^6.2.1"
45
+ "wouter": "^2.0.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.12.5",
49
49
  "@folklore/fetch": "^0.1.15",
50
- "@panneau/core": "^2.0.92",
51
- "@panneau/form": "^2.0.92",
50
+ "@panneau/core": "^3.0.0",
51
+ "@panneau/element-link": "^3.0.0",
52
+ "@panneau/form": "^3.0.0",
52
53
  "classnames": "^2.2.6",
53
54
  "lodash": "^4.17.21",
54
55
  "prop-types": "^15.7.2",
55
56
  "react-intl": "^5.15.8||^6.0.0",
56
- "react-router-dom": "^6.2.1"
57
+ "wouter": "^2.0.0"
57
58
  },
58
59
  "publishConfig": {
59
60
  "access": "public"
60
61
  },
61
- "gitHead": "d0ff80c8a3a73f8ca115de91d4eaec8c3ea0b348"
62
+ "gitHead": "b72d6fe6309ac3be6e2bef67e187f9aaa77b774e"
62
63
  }