@rubin-epo/epo-widget-lib 0.5.1-alpha.0 → 0.6.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.
- package/dist/CameraFilter.d.ts +3 -0
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.d.ts +3 -0
- package/dist/ColorTool.js +115 -79
- package/dist/FilterTool.d.ts +3 -0
- package/dist/SourceSelector.d.ts +3 -0
- package/dist/atomic/Blinker/Blinker.d.ts +14 -0
- package/dist/atomic/Blinker/Controls/Controls.d.ts +11 -0
- package/dist/atomic/Blinker/Controls/styles.d.ts +272 -0
- package/dist/atomic/Blinker/Image/Image.d.ts +9 -0
- package/dist/atomic/Blinker/Image/styles.d.ts +283 -0
- package/dist/atomic/Blinker/Images/Images.d.ts +8 -0
- package/dist/atomic/Blinker/Images/styles.d.ts +544 -0
- package/dist/atomic/Blinker/_mocks/index.d.ts +2 -0
- package/dist/atomic/Blinker/index.d.ts +1 -0
- package/dist/atomic/ElapsedTime/ElapsedTime.d.ts +10 -0
- package/dist/atomic/ElapsedTime/index.d.ts +1 -0
- package/dist/atomic/ElapsedTime/styles.d.ts +1633 -0
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +9 -0
- package/dist/atomic/PlaybackControl/index.d.ts +1 -0
- package/dist/atomic/PlaybackControl/styles.d.ts +554 -0
- package/dist/hooks/useImage.cjs +1 -0
- package/dist/hooks/useImage.d.ts +10 -0
- package/dist/hooks/useImage.js +30 -0
- package/dist/hooks/useInterval.d.ts +1 -0
- package/dist/lib/reimg.cjs +1 -0
- package/dist/lib/reimg.d.ts +7 -0
- package/dist/lib/reimg.js +60 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.test.d.ts +1 -0
- package/dist/styles/svg.d.ts +272 -0
- package/dist/{types → widgets/CameraFilter}/CameraFilter.d.ts +3 -6
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.d.ts +9 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.d.ts +10 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.d.ts +11 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.d.ts +14 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/data.d.ts +39 -0
- package/dist/widgets/CameraFilter/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/styles.d.ts +4398 -0
- package/dist/widgets/ColorTool/Actions/Export/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/Export/index.d.ts +12 -0
- package/dist/widgets/ColorTool/Actions/Export/index.js +36 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.d.ts +9 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.js +39 -0
- package/dist/widgets/ColorTool/Actions/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/index.d.ts +13 -0
- package/dist/widgets/ColorTool/Actions/index.js +55 -0
- package/dist/widgets/ColorTool/Actions/styles.cjs +5 -0
- package/dist/widgets/ColorTool/Actions/styles.d.ts +272 -0
- package/dist/widgets/ColorTool/Actions/styles.js +9 -0
- package/dist/{types → widgets/ColorTool}/ColorTool.d.ts +44 -45
- package/dist/widgets/ColorTool/FilterControls/FilterControls.cjs +1 -1
- package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +14 -0
- package/dist/widgets/ColorTool/FilterControls/FilterControls.js +43 -41
- package/dist/widgets/ColorTool/FilterControls/index.d.ts +1 -0
- package/dist/widgets/ColorTool/FilterControls/styles.cjs +58 -0
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +956 -0
- package/dist/widgets/ColorTool/FilterControls/styles.js +67 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.cjs +1 -1
- package/dist/widgets/ColorTool/FilterImage/FilterImage.d.ts +16 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.js +40 -31
- package/dist/widgets/ColorTool/FilterImage/index.d.ts +1 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +12 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +54 -29
- package/dist/widgets/ColorTool/ImageComposite/index.d.ts +1 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +19 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +544 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.js +24 -0
- package/dist/widgets/ColorTool/index.d.ts +1 -0
- package/dist/widgets/ColorTool/styles.cjs +21 -77
- package/dist/widgets/ColorTool/styles.d.ts +1906 -0
- package/dist/widgets/ColorTool/styles.js +29 -96
- package/dist/widgets/ColorTool/utilities.cjs +1 -1
- package/dist/widgets/ColorTool/utilities.d.ts +22 -0
- package/dist/widgets/ColorTool/utilities.js +30 -29
- package/dist/{types → widgets/FilterTool}/FilterTool.d.ts +11 -16
- package/dist/widgets/FilterTool/index.d.ts +1 -0
- package/dist/widgets/FilterTool/styles.d.ts +3710 -0
- package/dist/widgets/SourceSelector/Message/Message.d.ts +10 -0
- package/dist/widgets/SourceSelector/Message/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/Message/styles.d.ts +5 -0
- package/dist/widgets/SourceSelector/Point/Point.d.ts +15 -0
- package/dist/widgets/SourceSelector/Point/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/Point/styles.d.ts +4 -0
- package/dist/widgets/SourceSelector/Points/Points.d.ts +13 -0
- package/dist/widgets/SourceSelector/Points/index.d.ts +1 -0
- package/dist/{types → widgets/SourceSelector}/SourceSelector.d.ts +22 -28
- package/dist/widgets/SourceSelector/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/mocks/index.d.ts +7 -0
- package/dist/widgets/SourceSelector/utilities.d.ts +1 -0
- package/dist/widgets/SourceSelector/utilities.test.d.ts +1 -0
- package/package.json +7 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react/jsx-runtime"),p=require("react"),x=require("@rubin-epo/epo-react-lib/Button"),g=require("../../../../lib/reimg.cjs"),v=t=>t&&t.__esModule?t:{default:t},_=v(x),c=({images:t,filters:o,filename:s,width:r,height:n,children:l,isDisabled:u})=>{const i=p.useCallback(()=>{const a=document.createElement("canvas"),e=a.getContext("2d");t&&e&&(e.canvas.width=r,e.canvas.height=n,e.globalCompositeOperation="screen",Array.from(t).forEach((d,f)=>{o[f].active&&e.drawImage(d,0,0,r,n)})),g.fromCanvas(a).downloadPng(s)},[t,o]);return m.jsx(_.default,{disabled:u,style:{"--button-text-align":"left"},icon:"ArrowUpFromBracket",onClick:i,isBlock:!0,children:l})};c.displayName="Widgets.ColorTool.Reset";const b=c;exports.default=b;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent, PropsWithChildren } from "react";
|
|
2
|
+
import { ImageFilter } from "../../ColorTool";
|
|
3
|
+
interface ExportProps {
|
|
4
|
+
images?: HTMLCollection;
|
|
5
|
+
filename: string;
|
|
6
|
+
filters: ImageFilter[];
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Export: FunctionComponent<PropsWithChildren<ExportProps>>;
|
|
12
|
+
export default Export;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as x } from "react";
|
|
3
|
+
import u from "@rubin-epo/epo-react-lib/Button";
|
|
4
|
+
import { fromCanvas as C } from "../../../../lib/reimg.js";
|
|
5
|
+
const c = ({
|
|
6
|
+
images: t,
|
|
7
|
+
filters: r,
|
|
8
|
+
filename: s,
|
|
9
|
+
width: e,
|
|
10
|
+
height: a,
|
|
11
|
+
children: l,
|
|
12
|
+
isDisabled: m
|
|
13
|
+
}) => {
|
|
14
|
+
const i = x(() => {
|
|
15
|
+
const n = document.createElement("canvas"), o = n.getContext("2d");
|
|
16
|
+
t && o && (o.canvas.width = e, o.canvas.height = a, o.globalCompositeOperation = "screen", Array.from(t).forEach((p, d) => {
|
|
17
|
+
r[d].active && o.drawImage(p, 0, 0, e, a);
|
|
18
|
+
})), C(n).downloadPng(s);
|
|
19
|
+
}, [t, r]);
|
|
20
|
+
return /* @__PURE__ */ f(
|
|
21
|
+
u,
|
|
22
|
+
{
|
|
23
|
+
disabled: m,
|
|
24
|
+
style: { "--button-text-align": "left" },
|
|
25
|
+
icon: "ArrowUpFromBracket",
|
|
26
|
+
onClick: i,
|
|
27
|
+
isBlock: !0,
|
|
28
|
+
children: l
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
c.displayName = "Widgets.ColorTool.Reset";
|
|
33
|
+
const k = c;
|
|
34
|
+
export {
|
|
35
|
+
k as default
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),r=require("@rubin-epo/epo-react-lib/Button"),a=require("../../utilities.cjs"),c=t=>t&&t.__esModule?t:{default:t},d=c(r),f=t=>t.map(e=>{const{defaultValue:s,min:o,max:u}=e,i=s||1;return{...e,active:!1,color:"",brightness:a.getBrightnessValue(o,u,i),value:i}}),l=({isDisabled:t,selectedData:e,onResetCallback:s,children:o})=>{const{filters:u}=e;return n.jsx(d.default,{style:{"--button-text-align":"left"},disabled:t,icon:"RotateLeftWithCenter",onClick:()=>s&&s({...e,filters:f(u)}),isBlock:!0,children:o})};l.displayName="Widgets.ColorTool.Reset";const g=l;exports.default=g;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent, PropsWithChildren } from "react";
|
|
2
|
+
import { AstroObject } from "../../ColorTool";
|
|
3
|
+
interface ResetProps {
|
|
4
|
+
isDisabled: boolean;
|
|
5
|
+
selectedData: AstroObject;
|
|
6
|
+
onResetCallback: (data: AstroObject) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Reset: FunctionComponent<PropsWithChildren<ResetProps>>;
|
|
9
|
+
export default Reset;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import a from "@rubin-epo/epo-react-lib/Button";
|
|
3
|
+
import { getBrightnessValue as m } from "../../utilities.js";
|
|
4
|
+
const u = (o) => o.map((t) => {
|
|
5
|
+
const { defaultValue: e, min: s, max: r } = t, i = e || 1;
|
|
6
|
+
return {
|
|
7
|
+
...t,
|
|
8
|
+
active: !1,
|
|
9
|
+
color: "",
|
|
10
|
+
brightness: m(s, r, i),
|
|
11
|
+
value: i
|
|
12
|
+
};
|
|
13
|
+
}), n = ({
|
|
14
|
+
isDisabled: o,
|
|
15
|
+
selectedData: t,
|
|
16
|
+
onResetCallback: e,
|
|
17
|
+
children: s
|
|
18
|
+
}) => {
|
|
19
|
+
const { filters: r } = t;
|
|
20
|
+
return /* @__PURE__ */ l(
|
|
21
|
+
a,
|
|
22
|
+
{
|
|
23
|
+
style: { "--button-text-align": "left" },
|
|
24
|
+
disabled: o,
|
|
25
|
+
icon: "RotateLeftWithCenter",
|
|
26
|
+
onClick: () => e && e({
|
|
27
|
+
...t,
|
|
28
|
+
filters: u(r)
|
|
29
|
+
}),
|
|
30
|
+
isBlock: !0,
|
|
31
|
+
children: s
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
n.displayName = "Widgets.ColorTool.Reset";
|
|
36
|
+
const d = n;
|
|
37
|
+
export {
|
|
38
|
+
d as default
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),A=require("./Reset/index.cjs"),b=require("./Export/index.cjs"),j=require("./styles.cjs"),p=require("react-i18next"),h=require("../utilities.cjs"),i=({actions:o,isDisabled:c,width:l,height:u,selectedData:e,selectionCallback:s,images:a})=>{const{t:d}=p.useTranslation(),{filters:x,name:f}=e,r=c||!h.areActionsActive(e);return t.jsx(j.Actions,{children:o.map((m,n)=>{switch(m){case"reset":return t.jsx(A.default,{isDisabled:r,selectedData:e,onResetCallback:q=>s&&s(q),children:d("colorTool.actions.reset")},n);case"export":return t.jsx(b.default,{isDisabled:r,filters:x,width:l,height:u,images:a,filename:f,children:"Export"},n);case"save":return null;default:return null}})})};i.displayName="Widgets.ColorTool.Actions";const v=i;exports.default=v;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { AstroObject, ColorToolAction } from "../ColorTool";
|
|
3
|
+
interface ActionsProps {
|
|
4
|
+
actions: Array<ColorToolAction>;
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
selectedData: AstroObject;
|
|
7
|
+
images: HTMLCollection | undefined;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
selectionCallback: (data: AstroObject) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Actions: FunctionComponent<ActionsProps>;
|
|
13
|
+
export default Actions;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import x from "./Reset/index.js";
|
|
3
|
+
import h from "./Export/index.js";
|
|
4
|
+
import { Actions as b } from "./styles.js";
|
|
5
|
+
import { useTranslation as T } from "react-i18next";
|
|
6
|
+
import { areActionsActive as v } from "../utilities.js";
|
|
7
|
+
const i = ({
|
|
8
|
+
actions: n,
|
|
9
|
+
isDisabled: c,
|
|
10
|
+
width: a,
|
|
11
|
+
height: l,
|
|
12
|
+
selectedData: o,
|
|
13
|
+
selectionCallback: t,
|
|
14
|
+
images: m
|
|
15
|
+
}) => {
|
|
16
|
+
const { t: p } = T(), { filters: f, name: u } = o, s = c || !v(o);
|
|
17
|
+
return /* @__PURE__ */ r(b, { children: n.map((d, e) => {
|
|
18
|
+
switch (d) {
|
|
19
|
+
case "reset":
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
|
+
x,
|
|
22
|
+
{
|
|
23
|
+
isDisabled: s,
|
|
24
|
+
selectedData: o,
|
|
25
|
+
onResetCallback: (A) => t && t(A),
|
|
26
|
+
children: p("colorTool.actions.reset")
|
|
27
|
+
},
|
|
28
|
+
e
|
|
29
|
+
);
|
|
30
|
+
case "export":
|
|
31
|
+
return /* @__PURE__ */ r(
|
|
32
|
+
h,
|
|
33
|
+
{
|
|
34
|
+
isDisabled: s,
|
|
35
|
+
filters: f,
|
|
36
|
+
width: a,
|
|
37
|
+
height: l,
|
|
38
|
+
images: m,
|
|
39
|
+
filename: u,
|
|
40
|
+
children: "Export"
|
|
41
|
+
},
|
|
42
|
+
e
|
|
43
|
+
);
|
|
44
|
+
case "save":
|
|
45
|
+
return null;
|
|
46
|
+
default:
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}) });
|
|
50
|
+
};
|
|
51
|
+
i.displayName = "Widgets.ColorTool.Actions";
|
|
52
|
+
const y = i;
|
|
53
|
+
export {
|
|
54
|
+
y as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),o=t=>t&&t.__esModule?t:{default:t},a=o(e),l=a.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: var(--color-tool-padding, var(--PADDING_SMALL, 20px));
|
|
4
|
+
grid-area: actions;
|
|
5
|
+
`;exports.Actions=l;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
export declare const Actions: import("styled-components").IStyledComponent<"web", {
|
|
2
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
3
|
+
key?: import("react").Key | null | undefined;
|
|
4
|
+
defaultChecked?: boolean | undefined;
|
|
5
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
6
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
7
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
8
|
+
accessKey?: string | undefined;
|
|
9
|
+
autoFocus?: boolean | undefined;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
12
|
+
contextMenu?: string | undefined;
|
|
13
|
+
dir?: string | undefined;
|
|
14
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
15
|
+
hidden?: boolean | undefined;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
lang?: string | undefined;
|
|
18
|
+
nonce?: string | undefined;
|
|
19
|
+
placeholder?: string | undefined;
|
|
20
|
+
slot?: string | undefined;
|
|
21
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
22
|
+
style?: import("react").CSSProperties | undefined;
|
|
23
|
+
tabIndex?: number | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
translate?: "yes" | "no" | undefined;
|
|
26
|
+
radioGroup?: string | undefined;
|
|
27
|
+
role?: import("react").AriaRole | undefined;
|
|
28
|
+
about?: string | undefined;
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
datatype?: string | undefined;
|
|
31
|
+
inlist?: any;
|
|
32
|
+
prefix?: string | undefined;
|
|
33
|
+
property?: string | undefined;
|
|
34
|
+
rel?: string | undefined;
|
|
35
|
+
resource?: string | undefined;
|
|
36
|
+
rev?: string | undefined;
|
|
37
|
+
typeof?: string | undefined;
|
|
38
|
+
vocab?: string | undefined;
|
|
39
|
+
autoCapitalize?: string | undefined;
|
|
40
|
+
autoCorrect?: string | undefined;
|
|
41
|
+
autoSave?: string | undefined;
|
|
42
|
+
color?: string | undefined;
|
|
43
|
+
itemProp?: string | undefined;
|
|
44
|
+
itemScope?: boolean | undefined;
|
|
45
|
+
itemType?: string | undefined;
|
|
46
|
+
itemID?: string | undefined;
|
|
47
|
+
itemRef?: string | undefined;
|
|
48
|
+
results?: number | undefined;
|
|
49
|
+
security?: string | undefined;
|
|
50
|
+
unselectable?: "on" | "off" | undefined;
|
|
51
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
52
|
+
is?: string | undefined;
|
|
53
|
+
children?: import("react").ReactNode;
|
|
54
|
+
"aria-activedescendant"?: string | undefined;
|
|
55
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
56
|
+
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
57
|
+
"aria-braillelabel"?: string | undefined;
|
|
58
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
59
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
60
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
61
|
+
"aria-colcount"?: number | undefined;
|
|
62
|
+
"aria-colindex"?: number | undefined;
|
|
63
|
+
"aria-colindextext"?: string | undefined;
|
|
64
|
+
"aria-colspan"?: number | undefined;
|
|
65
|
+
"aria-controls"?: string | undefined;
|
|
66
|
+
"aria-current"?: boolean | "page" | "time" | "step" | "true" | "false" | "location" | "date" | undefined;
|
|
67
|
+
"aria-describedby"?: string | undefined;
|
|
68
|
+
"aria-description"?: string | undefined;
|
|
69
|
+
"aria-details"?: string | undefined;
|
|
70
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
72
|
+
"aria-errormessage"?: string | undefined;
|
|
73
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
74
|
+
"aria-flowto"?: string | undefined;
|
|
75
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
76
|
+
"aria-haspopup"?: boolean | "grid" | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | undefined;
|
|
77
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
78
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
79
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
80
|
+
"aria-label"?: string | undefined;
|
|
81
|
+
"aria-labelledby"?: string | undefined;
|
|
82
|
+
"aria-level"?: number | undefined;
|
|
83
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
84
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
88
|
+
"aria-owns"?: string | undefined;
|
|
89
|
+
"aria-placeholder"?: string | undefined;
|
|
90
|
+
"aria-posinset"?: number | undefined;
|
|
91
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
92
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
94
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
95
|
+
"aria-roledescription"?: string | undefined;
|
|
96
|
+
"aria-rowcount"?: number | undefined;
|
|
97
|
+
"aria-rowindex"?: number | undefined;
|
|
98
|
+
"aria-rowindextext"?: string | undefined;
|
|
99
|
+
"aria-rowspan"?: number | undefined;
|
|
100
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-setsize"?: number | undefined;
|
|
102
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
103
|
+
"aria-valuemax"?: number | undefined;
|
|
104
|
+
"aria-valuemin"?: number | undefined;
|
|
105
|
+
"aria-valuenow"?: number | undefined;
|
|
106
|
+
"aria-valuetext"?: string | undefined;
|
|
107
|
+
dangerouslySetInnerHTML?: {
|
|
108
|
+
__html: string | TrustedHTML;
|
|
109
|
+
} | undefined;
|
|
110
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
111
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
112
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
115
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
116
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
117
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onDrag?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onDragEnd?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onDragStart?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
267
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
268
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
269
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
270
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
271
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
272
|
+
}>;
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import { FunctionComponent } from
|
|
2
|
-
import { ListboxOption } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export { }
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { ListboxOption } from "@rubin-epo/epo-react-lib/SelectListbox";
|
|
3
|
+
export interface ImageFilter {
|
|
4
|
+
label: string;
|
|
5
|
+
defaultColor?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
image: string;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
value: number;
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
brightness?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface AstroObject {
|
|
17
|
+
name: string;
|
|
18
|
+
filters: ImageFilter[];
|
|
19
|
+
}
|
|
20
|
+
export interface AstroCategory {
|
|
21
|
+
type: string;
|
|
22
|
+
objects: AstroObject[];
|
|
23
|
+
}
|
|
24
|
+
export type ColorToolAction = "reset" | "export" | "save";
|
|
25
|
+
interface ColorToolConfig {
|
|
26
|
+
actions?: Array<ColorToolAction>;
|
|
27
|
+
/** pixel width of the images in the tool */
|
|
28
|
+
width?: number;
|
|
29
|
+
/** pixel height of the images in the tool */
|
|
30
|
+
height?: number;
|
|
31
|
+
hideSubtitle?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ColorToolProps {
|
|
34
|
+
selectionCallback: (selectedData: AstroObject) => void;
|
|
35
|
+
data: AstroCategory[];
|
|
36
|
+
selectedData: AstroObject;
|
|
37
|
+
objectOptions?: ListboxOption[];
|
|
38
|
+
colorOptions?: ListboxOption[];
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
isDisplayOnly?: boolean;
|
|
41
|
+
config?: ColorToolConfig;
|
|
42
|
+
}
|
|
43
|
+
declare const ColorTool: FunctionComponent<ColorToolProps>;
|
|
44
|
+
export default ColorTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),q=require("@rubin-epo/epo-react-lib/SelectListbox"),S=require("../utilities.cjs"),T=require("react-i18next"),l=require("./styles.cjs"),f=e=>e&&e.__esModule?e:{default:e},I=f(q),a=({filter:e,colorOptions:d,isDisabled:r,onChangeFilterCallback:s,buttonLabelledById:u,selectLabelledById:h,sliderLabelledById:x})=>{const{t:b}=T.useTranslation(),{label:i,color:c="",value:g,active:n,min:m,max:j}=e,_=()=>s&&s({...e,active:!n}),p=o=>o&&s&&s({...e,color:o}),y=o=>s&&s({...e,brightness:S.getBrightnessValue(m,j,o),value:o}),v=b("colorTool.actions.select_filter");return t.jsxs(t.Fragment,{children:[t.jsxs(l.FilterLabel,{"aria-labelledby":u,children:[t.jsx(l.HiddenCheckbox,{disabled:r,checked:n,type:"checkbox",onChange:_}),t.jsx(l.FilterToggle,{as:"span",children:i})]}),t.jsx(I.default,{isDisabled:r,placeholder:v,value:c,options:d,onChangeCallback:p,width:"100%",maxWidth:"100%",labelledById:h}),t.jsx(l.Slider,{min:1,max:100,onChangeCallback:y,isDisabled:!n,labelledbyId:x,value:g,label:i,color:c})]})};a.displayName="Widgets.ColorTool.FilterControls";const B=a;exports.default=B;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ListboxOption } from "@rubin-epo/epo-react-lib/SelectListbox";
|
|
2
|
+
import { FunctionComponent } from "react";
|
|
3
|
+
import { ImageFilter } from "../ColorTool";
|
|
4
|
+
interface FilterControlProps {
|
|
5
|
+
filter: ImageFilter;
|
|
6
|
+
colorOptions: ListboxOption[];
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
onChangeFilterCallback: (filter: ImageFilter) => void;
|
|
9
|
+
buttonLabelledById: string;
|
|
10
|
+
selectLabelledById: string;
|
|
11
|
+
sliderLabelledById: string;
|
|
12
|
+
}
|
|
13
|
+
declare const FilterControls: FunctionComponent<FilterControlProps>;
|
|
14
|
+
export default FilterControls;
|