authscape 1.0.396 → 1.0.399

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/index.js CHANGED
@@ -2216,7 +2216,7 @@ Object.defineProperty(exports, "__esModule", {
2216
2216
  });
2217
2217
  exports.Action = void 0;
2218
2218
  var _react = _interopRequireWildcard(require("react"));
2219
- var _excluded = ["active", "className", "cursor", "style"];
2219
+ var _excluded = ["active", "className", "cursor", "icon", "style"];
2220
2220
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
2221
2221
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2222
2222
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -2233,6 +2233,7 @@ var Action = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
2233
2233
  var active = _ref.active,
2234
2234
  className = _ref.className,
2235
2235
  cursor = _ref.cursor,
2236
+ icon = _ref.icon,
2236
2237
  style = _ref.style,
2237
2238
  props = _objectWithoutProperties(_ref, _excluded);
2238
2239
  return /*#__PURE__*/_react["default"].createElement("button", _extends({
@@ -2245,7 +2246,7 @@ var Action = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
2245
2246
  '--fill': active === null || active === void 0 ? void 0 : active.fill,
2246
2247
  '--background': active === null || active === void 0 ? void 0 : active.background
2247
2248
  })
2248
- }));
2249
+ }), icon());
2249
2250
  });
2250
2251
  exports.Action = Action;
2251
2252
  "use strict";
@@ -2347,12 +2348,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
2347
2348
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2348
2349
  // import {Action} from './Action';
2349
2350
 
2351
+ var icon = function icon() {
2352
+ return /*#__PURE__*/_react["default"].createElement(_DragIndicatorRounded["default"], null);
2353
+ };
2350
2354
  var Handle = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
2351
2355
  return /*#__PURE__*/_react["default"].createElement(Action, _extends({
2352
2356
  ref: ref,
2357
+ icon: icon,
2353
2358
  cursor: "grab",
2354
2359
  "data-cypress": "draggable-handle"
2355
- }, props), /*#__PURE__*/_react["default"].createElement(_DragIndicatorRounded["default"], null));
2360
+ }, props));
2356
2361
  });
2357
2362
  exports.Handle = Handle;
2358
2363
  "use strict";
@@ -3332,13 +3337,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
3332
3337
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3333
3338
  // import {Action} from './Action';
3334
3339
 
3340
+ var icon = function icon() {
3341
+ return /*#__PURE__*/_react["default"].createElement(_DeleteRounded["default"], null);
3342
+ };
3335
3343
  function Remove(props) {
3336
- return /*#__PURE__*/_react["default"].createElement(Action, _extends({}, props, {
3344
+ return /*#__PURE__*/_react["default"].createElement(Action, _extends({
3345
+ icon: icon
3346
+ }, props, {
3337
3347
  active: {
3338
3348
  fill: 'rgba(255, 70, 70, 0.95)',
3339
3349
  background: 'rgba(255, 70, 70, 0.1)'
3340
3350
  }
3341
- }), /*#__PURE__*/_react["default"].createElement(_DeleteRounded["default"], null));
3351
+ }));
3342
3352
  }
3343
3353
  "use strict";
3344
3354
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.396",
3
+ "version": "1.0.399",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ import React, {forwardRef, CSSProperties} from 'react';
2
2
  // import classNames from 'classnames';
3
3
 
4
4
  export const Action = forwardRef(
5
- ({active, className, cursor, style, ...props}, ref) => {
5
+ ({active, className, cursor, icon, style, ...props}, ref) => {
6
6
  return (
7
7
  <button
8
8
  ref={ref}
@@ -17,7 +17,9 @@ export const Action = forwardRef(
17
17
  '--background': active?.background,
18
18
  }
19
19
  }
20
- />
20
+ >
21
+ {icon()}
22
+ </button>
21
23
  );
22
24
  }
23
25
  );
@@ -2,16 +2,20 @@ import React, {forwardRef} from 'react';
2
2
  import DragIndicatorRoundedIcon from '@mui/icons-material/DragIndicatorRounded';
3
3
  // import {Action} from './Action';
4
4
 
5
+ const icon = () => {
6
+ return <DragIndicatorRoundedIcon/>
7
+ }
8
+
5
9
  export const Handle = forwardRef(
6
10
  (props, ref) => {
7
11
  return (
8
12
  <Action
9
13
  ref={ref}
14
+ icon={icon}
10
15
  cursor="grab"
11
16
  data-cypress="draggable-handle"
12
17
  {...props}
13
18
  >
14
- <DragIndicatorRoundedIcon/>
15
19
  </Action>
16
20
  );
17
21
  }
@@ -2,16 +2,20 @@ import React from 'react';
2
2
  import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded';
3
3
  // import {Action} from './Action';
4
4
 
5
+ const icon = () => {
6
+ return <DeleteRoundedIcon/>
7
+ }
8
+
5
9
  export function Remove(props) {
6
10
  return (
7
11
  <Action
12
+ icon={icon}
8
13
  {...props}
9
14
  active={{
10
15
  fill: 'rgba(255, 70, 70, 0.95)',
11
16
  background: 'rgba(255, 70, 70, 0.1)',
12
17
  }}
13
18
  >
14
- <DeleteRoundedIcon />
15
19
  </Action>
16
20
  );
17
21
  }