@armco/imageeditor 0.0.5 → 0.0.7
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/cjs/Control.js +1 -1
- package/cjs/ImageEditor.js +1 -1
- package/es/Control.js +24 -5
- package/es/ImageEditor.js +22 -21
- package/es/helper.js +1 -2
- package/package.json +7 -34
- package/cjs/Control-chunk.js +0 -1
- package/es/Control-chunk.js +0 -27
package/cjs/Control.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime")
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),r=require("@armco/types"),n=require("@armco/shared-components/Tooltip"),c=require("@armco/icon"),i=({icon:o,handler:e,tooltip:t})=>s.jsxs(n,{children:[s.jsx("span",{className:"mx-3 p-1 cursor-pointer",slot:r.ArPopoverSlots.ANCHOR,children:s.jsx(c,{icon:o,attributes:{colors:{fillColor:"#ffffff99"},classes:"cursor-pointer",size:"2rem"},events:{onClick:e}})}),s.jsx("span",{slot:r.ArPopoverSlots.POPOVER,children:t})]});module.exports=i;
|
package/cjs/ImageEditor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(".ar-ImageEditor .ar-ImageEditor__image-container{max-width:60vw;max-height:75vh}.ar-ImageEditor .ar-ImageEditor__editor-controls{transition:background-color .5s,box-shadow .5s ease-in-out;background-color:var(--ar-bg-tertiary-faded-2);border-radius:2rem}.ar-ImageEditor .ar-ImageEditor__editor-controls:hover{background-color:var(--ar-bg-tertiary-faded)}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__download-button{width:2rem;height:2rem;display:inline-block}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__download-button:hover{background-color:var(--ar-bg-tertiary-faded-2)}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__commit-button{width:2rem;height:2rem;display:inline-block}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__commit-button.is-dirty:hover{background-color:var(--ar-bg-tertiary-faded-2)}.ar-ImageEditor .ar-ImageEditor__controls{bottom:0}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container{transition:background-color .5s,box-shadow .5s,max-height .5s ease-in-out;background-color:var(--ar-bg-tertiary-faded-2);max-height:3.2rem;overflow:hidden}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container:hover{background-color:var(--ar-bg-tertiary-faded)}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container.expanded{max-height:20rem}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("react"),s=require("@armco/types"),y=require("@armco/icon"),q=require("@armco/shared-components/Image"),f=require("@armco/shared-components/Tooltip"),P=require("@armco/shared-components/Slider"),z=require("./Control.js"),F=require("./helper.js");let c={rotateBy:0,brightness:1,contrast:1,saturate:1,grayscale:0,blur:0,sepia:0,opacity:1,scale:1};const j=d=>(d%360+360)%360,C=22.5,H=d=>{const{demo:O,image:S,imageState:E,onChange:h,onCommit:x,viewOnly:m}=d;c={...c,...E};const v=n.useRef(null),[o,p]=n.useState({...c}),[r,I]=n.useState(),[l,R]=n.useState(),a=(e,i)=>{const u={...o,[e]:i},{rotateBy:g,...w}=u,{rotateBy:b,...B}=c;g!==void 0&&b!==void 0&&R(JSON.stringify(w)!==JSON.stringify(B)||j(g)!==j(b)),p(u),h&&h(u)},N=[{icon:"tb.TbFlipHorizontal",handler:()=>a("flipHorizontal",!o.flipHorizontal),tooltip:"Flip Horizontal"},{icon:"tb.TbFlipVertical",handler:()=>a("flipVertical",!o.flipVertical),tooltip:"Flip Vertical"},{icon:"ai.AiOutlineRotateLeft",handler:()=>a("rotateBy",o.rotateBy-C),tooltip:"Rotate Left"},{icon:"ai.AiOutlineRotateRight",handler:()=>a("rotateBy",o.rotateBy+C),tooltip:"Rotate Right"},{icon:"fi.FiZoomIn",handler:()=>a("scale",(o.scale+1)%10),tooltip:"Zoom In"},{icon:"fi.FiZoomOut",handler:()=>a("scale",(o.scale-1<0?0:o.scale-1)%10),tooltip:"Zoom Out"},{icon:r?"md.MdOutlineExpandLess":"md.MdOutlineExpandMore",handler:()=>I(!r),tooltip:r?"Hide Advanced Controls":"Show Advanced Controls"}],_=[{icon:"fi.FiZoomIn",handler:()=>p({...o,scale:(o.scale+1)%10}),tooltip:"Zoom In"},{icon:"fi.FiZoomOut",handler:()=>p({...o,scale:(o.scale-1<0?0:o.scale-1)%10}),tooltip:"Zoom Out"}],A=[[{label:"Brightness",min:0,max:5,precision:.1,handler:e=>a("brightness",+e.target.value)},{label:"Contrast",min:0,max:5,precision:.1,handler:e=>a("contrast",+e.target.value)}],[{label:"Saturation",min:0,max:10,precision:.2,handler:e=>a("saturate",+e.target.value)},{label:"Grayscale",min:0,max:1,precision:.05,handler:e=>a("grayscale",+e.target.value)}],[{label:"Blur",min:0,max:20,handler:e=>a("blur",+e.target.value)},{label:"Sepia",min:0,max:1,precision:.05,handler:e=>a("sepia",+e.target.value)}],[{label:"Opacity",min:0,max:1,precision:.05,handler:e=>a("opacity",+e.target.value)},{label:"Scale",min:0,max:10,precision:.2,handler:e=>a("scale",+e.target.value)}]];return t.jsxs("div",{className:"ar-ImageEditor d-flex flex-column h-100 overflow-auto flex-center position-relative",children:[!m&&t.jsxs("div",{className:"ar-ImageEditor__editor-controls position-absolute p-1 top-0 end-0 hover-shadow-dark",children:[t.jsxs(f,{children:[t.jsx("span",{className:"ar-ImageEditor__download-button cursor-pointer border-radius-50 p-1 me-2",slot:s.ArPopoverSlots.ANCHOR,children:t.jsx(y,{icon:"md/MdDownload",attributes:{colors:{fillColor:"#232323cc"},size:"1.5rem"},events:{onClick:()=>F.downloadEditedImage(v.current)}})}),t.jsx("span",{slot:s.ArPopoverSlots.POPOVER,children:"Download"})]}),t.jsxs(f,{children:[t.jsx("span",{className:`ar-ImageEditor__commit-button border-radius-50 p-1${l?" cursor-pointer is-dirty":""}`,slot:s.ArPopoverSlots.ANCHOR,children:t.jsx(y,{icon:"io5.IoCheckmarkCircleSharp",slot:s.ArPopoverSlots.ANCHOR,attributes:{colors:{fillColor:l?"#008000":"#00800077"},size:"1.5rem"},events:{onClick:()=>l&&x&&x(o)}})}),t.jsx("span",{slot:s.ArPopoverSlots.POPOVER,children:l?"Save":"Edit image to save"})]})]}),t.jsx("div",{className:"ar-ImageEditor__image-container mb-4",children:t.jsx(q,{ref:v,image:S,demo:O,fill:!0,preserveAspectRatio:!0,...o})}),t.jsx("div",{className:"ar-ImageEditor__controls py-3 flex-center z-1 position-absolute",children:t.jsxs("div",{className:`ar-ImageEditor__controls-container border-radius prominent hover-shadow-dark${r?" expanded":""}`,children:[t.jsx("div",{className:`ar-ImageEditor__basic-controls px-3 py-2 ${r?"border-bottom":""}`,children:(m?_:N).map(e=>t.jsx(z,{...e}))}),!m&&t.jsx("div",{className:"ar-ImageEditor__advanced-controls mt-2 px-3",children:A.map(e=>t.jsx("div",{className:"row pb-3 border-bottom",children:e.map(i=>t.jsx("div",{className:"col-6",children:t.jsx(P,{label:i.label,min:i.min,max:i.max,onChange:i.handler,precision:i.precision})}))}))})]})})]})};module.exports=H;
|
package/es/Control.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "@armco/shared-components/Tooltip";
|
|
4
|
-
import "@armco/icon";
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { ArPopoverSlots as r } from "@armco/types";
|
|
3
|
+
import i from "@armco/shared-components/Tooltip";
|
|
4
|
+
import n from "@armco/icon";
|
|
5
|
+
const a = ({
|
|
6
|
+
icon: s,
|
|
7
|
+
handler: t,
|
|
8
|
+
tooltip: e
|
|
9
|
+
}) => /* @__PURE__ */ l(i, { children: [
|
|
10
|
+
/* @__PURE__ */ o("span", { className: "mx-3 p-1 cursor-pointer", slot: r.ANCHOR, children: /* @__PURE__ */ o(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
icon: s,
|
|
14
|
+
attributes: {
|
|
15
|
+
colors: { fillColor: "#ffffff99" },
|
|
16
|
+
classes: "cursor-pointer",
|
|
17
|
+
size: "2rem"
|
|
18
|
+
},
|
|
19
|
+
events: { onClick: t }
|
|
20
|
+
}
|
|
21
|
+
) }),
|
|
22
|
+
/* @__PURE__ */ o("span", { slot: r.POPOVER, children: e })
|
|
23
|
+
] });
|
|
5
24
|
export {
|
|
6
|
-
|
|
25
|
+
a as default
|
|
7
26
|
};
|
package/es/ImageEditor.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(".ar-ImageEditor .ar-ImageEditor__image-container{max-width:60vw;max-height:75vh}.ar-ImageEditor .ar-ImageEditor__editor-controls{transition:background-color .5s,box-shadow .5s ease-in-out;background-color:var(--ar-bg-tertiary-faded-2);border-radius:2rem}.ar-ImageEditor .ar-ImageEditor__editor-controls:hover{background-color:var(--ar-bg-tertiary-faded)}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__download-button{width:2rem;height:2rem;display:inline-block}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__download-button:hover{background-color:var(--ar-bg-tertiary-faded-2)}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__commit-button{width:2rem;height:2rem;display:inline-block}.ar-ImageEditor .ar-ImageEditor__editor-controls .ar-ImageEditor__commit-button.is-dirty:hover{background-color:var(--ar-bg-tertiary-faded-2)}.ar-ImageEditor .ar-ImageEditor__controls{bottom:0}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container{transition:background-color .5s,box-shadow .5s,max-height .5s ease-in-out;background-color:var(--ar-bg-tertiary-faded-2);max-height:3.2rem;overflow:hidden}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container:hover{background-color:var(--ar-bg-tertiary-faded)}.ar-ImageEditor .ar-ImageEditor__controls .ar-ImageEditor__controls-container.expanded{max-height:20rem}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import {
|
|
3
|
+
import { useRef as H, useState as u } from "react";
|
|
4
|
+
import { ArPopoverSlots as n } from "@armco/types";
|
|
5
5
|
import y from "@armco/icon";
|
|
6
6
|
import Z from "@armco/shared-components/Image";
|
|
7
7
|
import C from "@armco/shared-components/Tooltip";
|
|
8
8
|
import k from "@armco/shared-components/Slider";
|
|
9
|
-
import
|
|
10
|
-
import "
|
|
9
|
+
import V from "./Control.js";
|
|
10
|
+
import { downloadEditedImage as P } from "./helper.js";
|
|
11
11
|
let c = {
|
|
12
12
|
rotateBy: 0,
|
|
13
13
|
brightness: 1,
|
|
@@ -19,18 +19,18 @@ let c = {
|
|
|
19
19
|
opacity: 1,
|
|
20
20
|
scale: 1
|
|
21
21
|
};
|
|
22
|
-
const O = (d) => (d % 360 + 360) % 360, E = 22.5,
|
|
23
|
-
const {
|
|
22
|
+
const O = (d) => (d % 360 + 360) % 360, E = 22.5, K = (d) => {
|
|
23
|
+
const { demo: I, image: R, imageState: N, onChange: g, onCommit: v, viewOnly: m } = d;
|
|
24
24
|
c = {
|
|
25
25
|
...c,
|
|
26
|
-
...
|
|
26
|
+
...N
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
const h = { ...o, [e]: i }, { rotateBy: f, ...z } = h, { rotateBy: x, ...
|
|
30
|
-
f !== void 0 && x !== void 0 &&
|
|
31
|
-
JSON.stringify(z) !== JSON.stringify(
|
|
28
|
+
const b = H(null), [o, p] = u({ ...c }), [r, _] = u(), [s, S] = u(), a = (e, i) => {
|
|
29
|
+
const h = { ...o, [e]: i }, { rotateBy: f, ...z } = h, { rotateBy: x, ...F } = c;
|
|
30
|
+
f !== void 0 && x !== void 0 && S(
|
|
31
|
+
JSON.stringify(z) !== JSON.stringify(F) || O(f) !== O(x)
|
|
32
32
|
), p(h), g && g(h);
|
|
33
|
-
},
|
|
33
|
+
}, w = [
|
|
34
34
|
{
|
|
35
35
|
icon: "tb.TbFlipHorizontal",
|
|
36
36
|
handler: () => a("flipHorizontal", !o.flipHorizontal),
|
|
@@ -69,7 +69,7 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
69
69
|
handler: () => _(!r),
|
|
70
70
|
tooltip: r ? "Hide Advanced Controls" : "Show Advanced Controls"
|
|
71
71
|
}
|
|
72
|
-
],
|
|
72
|
+
], B = [
|
|
73
73
|
{
|
|
74
74
|
icon: "fi.FiZoomIn",
|
|
75
75
|
handler: () => p({ ...o, scale: (o.scale + 1) % 10 }),
|
|
@@ -83,7 +83,7 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
83
83
|
}),
|
|
84
84
|
tooltip: "Zoom Out"
|
|
85
85
|
}
|
|
86
|
-
],
|
|
86
|
+
], A = [
|
|
87
87
|
[
|
|
88
88
|
{
|
|
89
89
|
label: "Brightness",
|
|
@@ -165,7 +165,7 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
165
165
|
size: "1.5rem"
|
|
166
166
|
},
|
|
167
167
|
events: {
|
|
168
|
-
onClick: () =>
|
|
168
|
+
onClick: () => P(b.current)
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
)
|
|
@@ -189,7 +189,7 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
189
189
|
size: "1.5rem"
|
|
190
190
|
},
|
|
191
191
|
events: {
|
|
192
|
-
onClick: () => s &&
|
|
192
|
+
onClick: () => s && v && v(o)
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
)
|
|
@@ -201,8 +201,9 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
201
201
|
/* @__PURE__ */ t("div", { className: "ar-ImageEditor__image-container mb-4", children: /* @__PURE__ */ t(
|
|
202
202
|
Z,
|
|
203
203
|
{
|
|
204
|
-
ref:
|
|
205
|
-
image:
|
|
204
|
+
ref: b,
|
|
205
|
+
image: R,
|
|
206
|
+
demo: I,
|
|
206
207
|
fill: !0,
|
|
207
208
|
preserveAspectRatio: !0,
|
|
208
209
|
...o
|
|
@@ -217,10 +218,10 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
217
218
|
"div",
|
|
218
219
|
{
|
|
219
220
|
className: `ar-ImageEditor__basic-controls px-3 py-2 ${r ? "border-bottom" : ""}`,
|
|
220
|
-
children: (m ?
|
|
221
|
+
children: (m ? B : w).map((e) => /* @__PURE__ */ t(V, { ...e }))
|
|
221
222
|
}
|
|
222
223
|
),
|
|
223
|
-
!m && /* @__PURE__ */ t("div", { className: "ar-ImageEditor__advanced-controls mt-2 px-3", children:
|
|
224
|
+
!m && /* @__PURE__ */ t("div", { className: "ar-ImageEditor__advanced-controls mt-2 px-3", children: A.map((e) => /* @__PURE__ */ t("div", { className: "row pb-3 border-bottom", children: e.map((i) => /* @__PURE__ */ t("div", { className: "col-6", children: /* @__PURE__ */ t(
|
|
224
225
|
k,
|
|
225
226
|
{
|
|
226
227
|
label: i.label,
|
|
@@ -236,5 +237,5 @@ const O = (d) => (d % 360 + 360) % 360, E = 22.5, q = (d) => {
|
|
|
236
237
|
] });
|
|
237
238
|
};
|
|
238
239
|
export {
|
|
239
|
-
|
|
240
|
+
K as default
|
|
240
241
|
};
|
package/es/helper.js
CHANGED
|
@@ -4,8 +4,7 @@ const i = (t) => {
|
|
|
4
4
|
const e = document.createElement("canvas");
|
|
5
5
|
e.width = t.naturalWidth, e.height = t.naturalHeight;
|
|
6
6
|
const a = e.getContext("2d");
|
|
7
|
-
if (!a)
|
|
8
|
-
return;
|
|
7
|
+
if (!a) return;
|
|
9
8
|
const o = t.style.filter, n = t.style.opacity, s = t.style.transform;
|
|
10
9
|
a.filter = o !== "" ? o : "", a.globalAlpha = n !== "" ? parseFloat(n) : 1, s && s !== "none" && d(a, s, e), a.drawImage(t, 0, 0), c(e.toDataURL());
|
|
11
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@armco/imageeditor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "cjs/ImageEditor.js",
|
|
6
6
|
"module": "es/ImageEditor.js",
|
|
@@ -13,40 +13,13 @@
|
|
|
13
13
|
"publish:sh": "./publish.sh",
|
|
14
14
|
"publish:local": "./publish-local.sh"
|
|
15
15
|
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@armco/icon": "^0.0.5",
|
|
18
|
-
"@armco/shared-components": "^0.0.52",
|
|
19
|
-
"@armco/utils": "^0.0.17",
|
|
20
|
-
"@types/node": "^22.5.5",
|
|
21
|
-
"react": ">16.8.0",
|
|
22
|
-
"react-dom": ">16.8.0"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@testing-library/dom": "^9.2.0",
|
|
26
|
-
"@testing-library/jest-dom": "^5.11.4",
|
|
27
|
-
"@testing-library/react": "^14.0.0",
|
|
28
|
-
"@testing-library/user-event": "^14.2.5",
|
|
29
|
-
"@types/react": "^18.0.15",
|
|
30
|
-
"@types/react-dom": "^18.0.6",
|
|
31
|
-
"@types/testing-library__jest-dom": "^5.14.5",
|
|
32
|
-
"@vitejs/plugin-react": "^4.3.1",
|
|
33
|
-
"eslint": "^8.0.0",
|
|
34
|
-
"eslint-config-react-app": "^7.0.1",
|
|
35
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
36
|
-
"jsdom": "^21.1.0",
|
|
37
|
-
"prettier": "^2.7.1",
|
|
38
|
-
"prettier-config-nick": "^1.0.2",
|
|
39
|
-
"sass": "^1.63.4",
|
|
40
|
-
"typescript": "^5.0.2",
|
|
41
|
-
"vite": "^4.0.0",
|
|
42
|
-
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
43
|
-
"vite-plugin-dts": "^4.2.2",
|
|
44
|
-
"vite-plugin-externalize-deps": "^0.8.0",
|
|
45
|
-
"vitest": "^0.30.1"
|
|
46
|
-
},
|
|
47
16
|
"peerDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
17
|
+
"@armco/types": "^0.0.17",
|
|
18
|
+
"@armco/utils": "^0.0.28",
|
|
19
|
+
"@armco/shared-components": "^0.0.56",
|
|
20
|
+
"@armco/icon": "^0.0.9",
|
|
21
|
+
"react": "^18.2.0",
|
|
22
|
+
"react-dom": "^18.2.0"
|
|
50
23
|
},
|
|
51
24
|
"eslintConfig": {
|
|
52
25
|
"extends": [
|
package/cjs/Control-chunk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),t=require("@armco/shared-components/Tooltip"),c=require("@armco/icon");var o=(r=>(r.POPOVER="popover",r.ANCHOR="anchor",r))(o||{});const i=({icon:r,handler:e,tooltip:n})=>s.jsxs(t,{children:[s.jsx("span",{className:"mx-3 p-1 cursor-pointer",slot:o.ANCHOR,children:s.jsx(c,{icon:r,attributes:{colors:{fillColor:"#ffffff99"},classes:"cursor-pointer",size:"2rem"},events:{onClick:e}})}),s.jsx("span",{slot:o.POPOVER,children:n})]});exports.Control=i;exports.L=o;
|
package/es/Control-chunk.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import n from "@armco/shared-components/Tooltip";
|
|
3
|
-
import i from "@armco/icon";
|
|
4
|
-
var s = /* @__PURE__ */ ((o) => (o.POPOVER = "popover", o.ANCHOR = "anchor", o))(s || {});
|
|
5
|
-
const a = ({
|
|
6
|
-
icon: o,
|
|
7
|
-
handler: t,
|
|
8
|
-
tooltip: e
|
|
9
|
-
}) => /* @__PURE__ */ l(n, { children: [
|
|
10
|
-
/* @__PURE__ */ r("span", { className: "mx-3 p-1 cursor-pointer", slot: s.ANCHOR, children: /* @__PURE__ */ r(
|
|
11
|
-
i,
|
|
12
|
-
{
|
|
13
|
-
icon: o,
|
|
14
|
-
attributes: {
|
|
15
|
-
colors: { fillColor: "#ffffff99" },
|
|
16
|
-
classes: "cursor-pointer",
|
|
17
|
-
size: "2rem"
|
|
18
|
-
},
|
|
19
|
-
events: { onClick: t }
|
|
20
|
-
}
|
|
21
|
-
) }),
|
|
22
|
-
/* @__PURE__ */ r("span", { slot: s.POPOVER, children: e })
|
|
23
|
-
] });
|
|
24
|
-
export {
|
|
25
|
-
a as C,
|
|
26
|
-
s as L
|
|
27
|
-
};
|