Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@konturio/ui-kit

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@konturio/ui-kit - npm Package Compare versions

Comparing version 3.0.0-alpha.42 to 3.0.0-alpha.43

4

package.json
{
"name": "@konturio/ui-kit",
"version": "3.0.0-alpha.42",
"version": "3.0.0-alpha.43",
"repository": {

@@ -28,3 +28,3 @@ "type": "git",

},
"gitHead": "e1abf245523efc0b74affb2ead4a58ab8f01b3ed"
"gitHead": "3d4aa42f63c1a90c9974675ca43093ae6bde12fa"
}

@@ -21,5 +21,7 @@ /// <reference types="react" />

};
onCellPointerOver?: (e: MouseEvent, cell: Cell, i: number) => void;
onCellPointerLeave?: (e: MouseEvent, cell: Cell, i: number) => void;
}
export declare const Legend: ({ cells, size, axis, title, showAxisLabels }: LegendProps) => JSX.Element;
export declare const Legend: ({ cells, size, axis, title, showAxisLabels, onCellPointerOver, onCellPointerLeave, }: LegendProps) => JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

@@ -14,3 +14,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";

const ArrowHead = ({ className, type }) => (_jsx("div", Object.assign({ className: className }, { children: type === 'horizontal' ? (_jsx("svg", Object.assign({ width: "6", height: "12", viewBox: "0 0 6 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M6,6L0,0l0,2.4L3.6,6L0,9.6L0,12L6,6z", fill: "currentColor" }) }))) : (_jsx("svg", Object.assign({ width: "12", height: "6", viewBox: "0 0 12 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M6,0L0,6l2.4,0L6,2.4L9.6,6L12,6L6,0z", fill: "currentColor" }) }))) })));
export const Legend = ({ cells, size, axis, title, showAxisLabels = false }) => {
export const Legend = ({ cells, size, axis, title, showAxisLabels = false, onCellPointerOver, onCellPointerLeave, }) => {
const TEMPLATE = useMemo(() => [

@@ -30,7 +30,3 @@ `y ${new Array(size + 1).fill('.').join(' ')}`,

})),
c: cells.map((cell) => ({
label: _jsx("span", { children: cell.label }),
className: cn(styles.cell, styles.colorCell),
style: { backgroundColor: cell.color },
})),
c: cells.map((cell, i) => (Object.assign(Object.assign({ label: _jsx("span", { children: cell.label }), className: cn(styles.cell, styles.colorCell), style: { backgroundColor: cell.color } }, (onCellPointerOver && { onPointerOver: (e) => onCellPointerOver(e, cell, i) })), (onCellPointerLeave && { onPointerLeave: (e) => onCellPointerLeave(e, cell, i) })))),
});

@@ -40,3 +36,3 @@ return (_jsxs("div", { children: [title && _jsx("div", Object.assign({ className: styles.legendTitle }, { children: title })), _jsxs("div", Object.assign({ className: styles.grid, style: {

gridTemplateRows: `repeat(${size + 2}, auto)`,
} }, { children: [showAxisLabels && axis.x.label ? _jsx("div", Object.assign({ className: styles.axisLabelX }, { children: axis.x.label })) : null, showAxisLabels && axis.y.label ? _jsx("div", Object.assign({ className: styles.axisLabelY }, { children: axis.y.label })) : null, _jsx("div", Object.assign({ className: styles.arrowX }, { children: _jsx(ArrowHead, { type: "horizontal", className: styles.arrowHeadX }) })), _jsx("div", Object.assign({ className: styles.arrowY }, { children: _jsx(ArrowHead, { type: "vertical", className: cn({ [styles.arrowHeadY]: true, [styles.arrowHeadY_angle0]: !showAxisLabels }) }) })), gridCells.map((cell) => (_jsx("div", Object.assign({ style: Object.assign(getCellPositionStyle(cell._position.x, cell._position.y), cell.style), className: cn(cell.className, styles.cell) }, { children: cell.label }), `${cell._position.x}|${cell._position.y}`)))] }))] }));
} }, { children: [showAxisLabels && axis.x.label ? _jsx("div", Object.assign({ className: styles.axisLabelX }, { children: axis.x.label })) : null, showAxisLabels && axis.y.label ? _jsx("div", Object.assign({ className: styles.axisLabelY }, { children: axis.y.label })) : null, _jsx("div", Object.assign({ className: styles.arrowX }, { children: _jsx(ArrowHead, { type: "horizontal", className: styles.arrowHeadX }) })), _jsx("div", Object.assign({ className: styles.arrowY }, { children: _jsx(ArrowHead, { type: "vertical", className: cn({ [styles.arrowHeadY]: true, [styles.arrowHeadY_angle0]: !showAxisLabels }) }) })), gridCells.map((cell) => (_jsx("div", Object.assign({ style: Object.assign(getCellPositionStyle(cell._position.x, cell._position.y), cell.style), className: cn(cell.className, styles.cell), onPointerOver: cell.onPointerOver, onPointerLeave: cell.onPointerLeave }, { children: cell.label }), `${cell._position.x}|${cell._position.y}`)))] }))] }));
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc