@modul/mbui 0.0.25-beta-pv-53369-bac51231 → 0.0.25

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.
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const React = (0, tslib_1.__importStar)(require("react"));
5
5
  const SvgIcon_1 = require("../SvgIcon");
6
6
  const SvgErase = (props) => (React.createElement(SvgIcon_1.SvgIcon, { width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ...props },
7
- React.createElement("path", { d: "M9.34 5h10.43C21.01 5 22 6 22 7.2v9.6c0 1.2-.99 2.2-2.23 2.2H9.34c-.62 0-1.21-.26-1.63-.7l-5.55-5.9a.59.59 0 0 1 0-.8l5.55-5.9c.42-.44 1.01-.7 1.63-.7Z", stroke: "currentColor", "stroke-width": "2" }),
7
+ React.createElement("path", { d: "M9.34 5h10.43C21.01 5 22 6 22 7.2v9.6c0 1.2-.99 2.2-2.23 2.2H9.34c-.62 0-1.21-.26-1.63-.7l-5.55-5.9a.59.59 0 0 1 0-.8l5.55-5.9c.42-.44 1.01-.7 1.63-.7Z", stroke: "currentColor", strokeWidth: "2" }),
8
8
  React.createElement("path", { fill: "currentColor", d: "M18.17 9.1c.3-.32.3-.83 0-1.14a.78.78 0 0 0-1.11 0l-2.78 2.83-2.78-2.83a.78.78 0 0 0-1.11 0c-.3.31-.3.82 0 1.13l2.78 2.83-2.78 2.83c-.3.31-.3.82 0 1.13.3.31.8.31 1.11 0l2.78-2.83 2.78 2.83c.3.31.8.31 1.1 0 .31-.31.31-.82 0-1.13l-2.77-2.83 2.78-2.83Z" })));
9
9
  exports.default = SvgErase;
10
10
  //# sourceMappingURL=Erase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Erase.js","sourceRoot":"","sources":["../../../src/Icon/icons/Erase.tsx"],"names":[],"mappings":";;;AAAA,0DAA8B;AAE9B,wCAAoC;AACpC,MAAM,QAAQ,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACpD,oBAAC,iBAAO,IACP,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,KACf,KAAK;IAET,8BAAM,CAAC,EAAC,yJAAyJ,EAAC,MAAM,EAAC,cAAc,kBAAc,GAAG,GAAE;IAC1M,8BAAM,IAAI,EAAC,cAAc,EAAC,CAAC,EAAC,2PAA2P,GAAE,CAChR,CACV,CAAA;AACD,kBAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"Erase.js","sourceRoot":"","sources":["../../../src/Icon/icons/Erase.tsx"],"names":[],"mappings":";;;AAAA,0DAA8B;AAE9B,wCAAoC;AACpC,MAAM,QAAQ,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACpD,oBAAC,iBAAO,IACP,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,KACf,KAAK;IAET,8BAAM,CAAC,EAAC,yJAAyJ,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,GAAE;IACzM,8BAAM,IAAI,EAAC,cAAc,EAAC,CAAC,EAAC,2PAA2P,GAAE,CAChR,CACV,CAAA;AACD,kBAAe,QAAQ,CAAA"}
@@ -1,4 +1,4 @@
1
- import React, { FC } from "react";
1
+ import React, { FC } from 'react';
2
2
  interface IProps extends React.PropsWithChildren {
3
3
  contentToShowRight: React.ReactNode;
4
4
  }
@@ -22,32 +22,32 @@ const Swipe2Show = ({ children, contentToShowRight }) => {
22
22
  }
23
23
  };
24
24
  (0, react_1.useEffect)(() => {
25
- document.addEventListener("mousedown", checkClickOutside);
26
- document.addEventListener("touchstart", checkClickOutside);
25
+ document.addEventListener('mousedown', checkClickOutside);
26
+ document.addEventListener('touchstart', checkClickOutside);
27
27
  return () => {
28
- document.removeEventListener("mousedown", checkClickOutside);
29
- document.removeEventListener("touchstart", checkClickOutside);
28
+ document.removeEventListener('mousedown', checkClickOutside);
29
+ document.removeEventListener('touchstart', checkClickOutside);
30
30
  };
31
31
  });
32
- return (react_1.default.createElement("div", { style: { position: "relative" }, ref: wrapperRef },
32
+ return (react_1.default.createElement("div", { style: { position: 'relative' }, ref: wrapperRef },
33
33
  (0, react_1.cloneElement)(children, {
34
34
  style: {
35
35
  position: 'relative',
36
36
  transform: showRight && `translateX(-${translateX}px)`,
37
- transition: "transform .15s ease-in-out",
38
- width: "100%",
39
- zIndex: "1",
37
+ transition: 'transform .15s ease-in-out',
38
+ width: '100%',
39
+ zIndex: '1',
40
40
  touchAction: 'pan-x',
41
41
  },
42
42
  ...handlers,
43
43
  }),
44
44
  react_1.default.createElement("div", { ref: actionRef, style: {
45
- position: "absolute",
46
- top: ".5px",
47
- right: "0",
48
- bottom: ".5px",
45
+ position: 'absolute',
46
+ top: '.5px',
47
+ right: '0',
48
+ bottom: '.5px',
49
49
  opacity: `${showRight ? '1' : '0'}`,
50
- transition: 'opacity .15s ease-in-out'
50
+ transition: 'opacity .15s ease-in-out',
51
51
  } }, contentToShowRight)));
52
52
  };
53
53
  exports.Swipe2Show = Swipe2Show;
@@ -1 +1 @@
1
- {"version":3,"file":"Swipe2Show.js","sourceRoot":"","sources":["../../src/Swipe2Show/Swipe2Show.tsx"],"names":[],"mappings":";;;;AAAA,4DAAyF;AACzF,qDAA8C;AAM9C,MAAM,UAAU,GAAe,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,EAAE;IACnE,MAAM,UAAU,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IACjD,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,CAAA;IAEjD,MAAM,QAAQ,GAAG,IAAA,8BAAY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ACF,CAAC,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAA;QACzD,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAA;QAE1D,OAAO,GAAG,EAAE;YACX,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAA;YAC5D,QAAQ,CAAC,mBAAmB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAA;QAC9D,CAAC,CAAA;IACF,CAAC,CAAC,CAAA;IAEF,OAAO,CACN,uCACC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAC/B,GAAG,EAAE,UAAU;QAEd,IAAA,oBAAY,EAAC,QAAmC,EAAE;YAClD,KAAK,EAAE;gBACN,QAAQ,EAAE,UAAU;gBACpB,SAAS,EAAE,SAAS,IAAI,eAAe,UAAU,KAAK;gBACtD,UAAU,EAAE,4BAA4B;gBACxC,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG;gBACX,WAAW,EAAE,OAAO;aACpB;YACD,GAAG,QAAQ;SACX,CAAC;QACF,uCACC,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;gBACN,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE;gBACnC,UAAU,EAAE,0BAA0B;aACtC,IAEA,kBAAkB,CACd,CACD,CACN,CAAA;AACF,CAAC,CAAA;AAEQ,gCAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.25-beta-pv-53369-bac51231",
3
+ "version": "0.0.25",
4
4
  "packageManager": "yarn@3.5.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -9,7 +9,7 @@ const SvgErase = (props: SVGProps<SVGSVGElement>) => (
9
9
  viewBox="0 0 24 24"
10
10
  {...props}
11
11
  >
12
- <path d="M9.34 5h10.43C21.01 5 22 6 22 7.2v9.6c0 1.2-.99 2.2-2.23 2.2H9.34c-.62 0-1.21-.26-1.63-.7l-5.55-5.9a.59.59 0 0 1 0-.8l5.55-5.9c.42-.44 1.01-.7 1.63-.7Z" stroke="currentColor" stroke-width="2"/>
12
+ <path d="M9.34 5h10.43C21.01 5 22 6 22 7.2v9.6c0 1.2-.99 2.2-2.23 2.2H9.34c-.62 0-1.21-.26-1.63-.7l-5.55-5.9a.59.59 0 0 1 0-.8l5.55-5.9c.42-.44 1.01-.7 1.63-.7Z" stroke="currentColor" strokeWidth="2"/>
13
13
  <path fill="currentColor" d="M18.17 9.1c.3-.32.3-.83 0-1.14a.78.78 0 0 0-1.11 0l-2.78 2.83-2.78-2.83a.78.78 0 0 0-1.11 0c-.3.31-.3.82 0 1.13l2.78 2.83-2.78 2.83c-.3.31-.3.82 0 1.13.3.31.8.31 1.11 0l2.78-2.83 2.78 2.83c.3.31.8.31 1.1 0 .31-.31.31-.82 0-1.13l-2.77-2.83 2.78-2.83Z"/>
14
14
  </SvgIcon>
15
15
  )
@@ -1,23 +1,23 @@
1
- import React, { cloneElement, FC, useCallback, useEffect, useRef, useState } from "react"
2
- import { useSwipeable } from "react-swipeable"
1
+ import React, { cloneElement, FC, useCallback, useEffect, useRef, useState } from 'react'
2
+ import { useSwipeable } from 'react-swipeable'
3
3
 
4
4
  interface IProps extends React.PropsWithChildren {
5
- contentToShowRight: React.ReactNode
5
+ contentToShowRight: React.ReactNode
6
6
  }
7
7
 
8
8
  const Swipe2Show: FC<IProps> = ({ children, contentToShowRight }) => {
9
- const wrapperRef = useRef<HTMLDivElement>(null);
10
- const actionRef = useRef<HTMLDivElement>(null)
11
- const [showRight, setShowRight] = useState(false)
12
- const translateX = actionRef.current?.offsetWidth
9
+ const wrapperRef = useRef<HTMLDivElement>(null)
10
+ const actionRef = useRef<HTMLDivElement>(null)
11
+ const [showRight, setShowRight] = useState(false)
12
+ const translateX = actionRef.current?.offsetWidth
13
13
 
14
- const handlers = useSwipeable({
15
- onSwipedLeft: () => setShowRight(true),
16
- onSwipedRight: () => setShowRight(false),
17
- swipeDuration: 500,
18
- preventScrollOnSwipe: true,
19
- trackMouse: true,
20
- })
14
+ const handlers = useSwipeable({
15
+ onSwipedLeft: () => setShowRight(true),
16
+ onSwipedRight: () => setShowRight(false),
17
+ swipeDuration: 500,
18
+ preventScrollOnSwipe: true,
19
+ trackMouse: true,
20
+ })
21
21
 
22
22
  const checkClickOutside = (evt) => {
23
23
  if (showRight && wrapperRef.current && !wrapperRef.current.contains(evt.target)) {
@@ -25,44 +25,47 @@ const Swipe2Show: FC<IProps> = ({ children, contentToShowRight }) => {
25
25
  }
26
26
  }
27
27
 
28
- useEffect(() => {
29
- document.addEventListener("mousedown", checkClickOutside)
30
- document.addEventListener("touchstart", checkClickOutside)
28
+ useEffect(() => {
29
+ document.addEventListener('mousedown', checkClickOutside)
30
+ document.addEventListener('touchstart', checkClickOutside)
31
31
 
32
- return () => {
33
- document.removeEventListener("mousedown", checkClickOutside)
34
- document.removeEventListener("touchstart", checkClickOutside)
35
- }
36
- })
32
+ return () => {
33
+ document.removeEventListener('mousedown', checkClickOutside)
34
+ document.removeEventListener('touchstart', checkClickOutside)
35
+ }
36
+ })
37
37
 
38
- return (
39
- <div style={{ position: "relative" }} ref={wrapperRef}>
40
- {cloneElement(children as React.ReactElement<any>, {
41
- style: {
38
+ return (
39
+ <div
40
+ style={{ position: 'relative' }}
41
+ ref={wrapperRef}
42
+ >
43
+ {cloneElement(children as React.ReactElement<any>, {
44
+ style: {
42
45
  position: 'relative',
43
- transform: showRight && `translateX(-${translateX}px)`,
44
- transition: "transform .15s ease-in-out",
45
- width: "100%",
46
- zIndex: "1",
46
+ transform: showRight && `translateX(-${translateX}px)`,
47
+ transition: 'transform .15s ease-in-out',
48
+ width: '100%',
49
+ zIndex: '1',
47
50
  touchAction: 'pan-x',
48
- },
49
- ...handlers,
50
- })}
51
- <div
52
- ref={actionRef}
53
- style={{
54
- position: "absolute",
55
- top: ".5px",
56
- right: "0",
57
- bottom: ".5px",
58
- opacity: `${showRight ? '1': '0'}`,
59
- transition: 'opacity .15s ease-in-out'
60
- }}
61
- >
62
- {contentToShowRight}
63
- </div>
64
- </div>
65
- )
51
+ },
52
+ ...handlers,
53
+ })}
54
+ <div
55
+ ref={actionRef}
56
+ style={{
57
+ position: 'absolute',
58
+ top: '.5px',
59
+ right: '0',
60
+ bottom: '.5px',
61
+ opacity: `${showRight ? '1' : '0'}`,
62
+ transition: 'opacity .15s ease-in-out',
63
+ }}
64
+ >
65
+ {contentToShowRight}
66
+ </div>
67
+ </div>
68
+ )
66
69
  }
67
70
 
68
- export { Swipe2Show }
71
+ export { Swipe2Show }