@economic/taco 1.1.2 → 1.1.3
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/esm/_virtual/_rollupPluginBabelHelpers.js +1 -2
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/dist/esm/utils/hooks/useDraggable.js +0 -1
- package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
- package/dist/taco.cjs.development.js +1 -3
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +3 -2
- package/tailwind.config.js +2 -44
@@ -1,5 +1,5 @@
|
|
1
1
|
function _extends() {
|
2
|
-
_extends = Object.assign
|
2
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
3
3
|
for (var i = 1; i < arguments.length; i++) {
|
4
4
|
var source = arguments[i];
|
5
5
|
|
@@ -12,7 +12,6 @@ function _extends() {
|
|
12
12
|
|
13
13
|
return target;
|
14
14
|
};
|
15
|
-
|
16
15
|
return _extends.apply(this, arguments);
|
17
16
|
}
|
18
17
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -15,7 +15,6 @@ var useDraggable = function useDraggable(ref) {
|
|
15
15
|
|
16
16
|
var rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect(); // Prevent dragging out of bounds
|
17
17
|
|
18
|
-
// Prevent dragging out of bounds
|
19
18
|
if (rect && (rect.left + event.deltaX < 0 || rect.right + event.deltaX > window.innerWidth || rect.top + event.deltaY < 0 || rect.bottom + event.deltaY > window.innerHeight)) {
|
20
19
|
return;
|
21
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDraggable.js","sources":["../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const { moveProps } = useMove({\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n });\n\n return {\n position,\n handleProps: moveProps,\n };\n};\n"],"names":["useDraggable","ref","React","useState","x","y","position","setPosition","useMove","onMove","event","rect","current","getBoundingClientRect","left","deltaX","right","window","innerWidth","top","deltaY","bottom","innerHeight","moveProps","handleProps"],"mappings":";;;IAGaA,YAAY,GAAG,SAAfA,YAAe,CAACC,GAAD;EACxB,sBAAgCC,cAAK,CAACC,QAAN,CAAe;IAC3CC,CAAC,EAAE,CADwC;IAE3CC,CAAC,EAAE;GAFyB,CAAhC;MAAOC,QAAP;MAAiBC,WAAjB;;EAKA,eAAsBC,OAAO,CAAC;IAC1BC,MAD0B,kBACnBC,KADmB;;;MAEtB,IAAMC,IAAI,mBAAGV,GAAG,CAACW,OAAP,iDAAG,aAAaC,qBAAb,EAAb
|
1
|
+
{"version":3,"file":"useDraggable.js","sources":["../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const { moveProps } = useMove({\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n });\n\n return {\n position,\n handleProps: moveProps,\n };\n};\n"],"names":["useDraggable","ref","React","useState","x","y","position","setPosition","useMove","onMove","event","rect","current","getBoundingClientRect","left","deltaX","right","window","innerWidth","top","deltaY","bottom","innerHeight","moveProps","handleProps"],"mappings":";;;IAGaA,YAAY,GAAG,SAAfA,YAAe,CAACC,GAAD;EACxB,sBAAgCC,cAAK,CAACC,QAAN,CAAe;IAC3CC,CAAC,EAAE,CADwC;IAE3CC,CAAC,EAAE;GAFyB,CAAhC;MAAOC,QAAP;MAAiBC,WAAjB;;EAKA,eAAsBC,OAAO,CAAC;IAC1BC,MAD0B,kBACnBC,KADmB;;;MAEtB,IAAMC,IAAI,mBAAGV,GAAG,CAACW,OAAP,iDAAG,aAAaC,qBAAb,EAAb;;MAGA,IACIF,IAAI,KACHA,IAAI,CAACG,IAAL,GAAYJ,KAAK,CAACK,MAAlB,GAA2B,CAA3B,IACGJ,IAAI,CAACK,KAAL,GAAaN,KAAK,CAACK,MAAnB,GAA4BE,MAAM,CAACC,UADtC,IAEGP,IAAI,CAACQ,GAAL,GAAWT,KAAK,CAACU,MAAjB,GAA0B,CAF7B,IAGGT,IAAI,CAACU,MAAL,GAAcX,KAAK,CAACU,MAApB,GAA6BH,MAAM,CAACK,WAJpC,CADR,EAME;QACE;;;MAGJf,WAAW,CAAC;YAAGH,SAAAA;YAAGC,SAAAA;QACdD,CAAC,IAAIM,KAAK,CAACK,MAAX;QACAV,CAAC,IAAIK,KAAK,CAACU,MAAX;QACA,OAAO;UAAEhB,CAAC,EAADA,CAAF;UAAKC,CAAC,EAADA;SAAZ;OAHO,CAAX;;GAfqB,CAA7B;MAAQkB,SAAR,YAAQA,SAAR;;EAuBA,OAAO;IACHjB,QAAQ,EAARA,QADG;IAEHkB,WAAW,EAAED;GAFjB;AAIH;;;;"}
|
@@ -39,7 +39,7 @@ var Joyride = require('react-joyride');
|
|
39
39
|
var Joyride__default = _interopDefault(Joyride);
|
40
40
|
|
41
41
|
function _extends() {
|
42
|
-
_extends = Object.assign
|
42
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
43
43
|
for (var i = 1; i < arguments.length; i++) {
|
44
44
|
var source = arguments[i];
|
45
45
|
|
@@ -52,7 +52,6 @@ function _extends() {
|
|
52
52
|
|
53
53
|
return target;
|
54
54
|
};
|
55
|
-
|
56
55
|
return _extends.apply(this, arguments);
|
57
56
|
}
|
58
57
|
|
@@ -5715,7 +5714,6 @@ var useDraggable = function useDraggable(ref) {
|
|
5715
5714
|
|
5716
5715
|
var rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect(); // Prevent dragging out of bounds
|
5717
5716
|
|
5718
|
-
// Prevent dragging out of bounds
|
5719
5717
|
if (rect && (rect.left + event.deltaX < 0 || rect.right + event.deltaX > window.innerWidth || rect.top + event.deltaY < 0 || rect.bottom + event.deltaY > window.innerHeight)) {
|
5720
5718
|
return;
|
5721
5719
|
}
|