@longline/aqua-ui 1.0.236 → 1.0.237

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.
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import { IHistogramAppearance } from './HistogramAppearance';
3
+ import { IHistogramBin } from './IHistogramBin';
4
+ type TTickStyle = 'none' | 'tick' | 'value';
5
+ type TValueStyle = 'hide' | 'show' | 'hover';
6
+ interface IProps {
7
+ /** @ignore */
8
+ className?: string;
9
+ /**
10
+ * Name, count, start and end for each bin.
11
+ */
12
+ bins: IHistogramBin[];
13
+ /**
14
+ * If currently `loading`, a Histogram displays grey bars and no values.
15
+ * @default false
16
+ */
17
+ loading?: boolean;
18
+ /**
19
+ * Show axis with ticks?
20
+ * @default none
21
+ */
22
+ tickStyle?: TTickStyle;
23
+ /**
24
+ * Optional unit to show under the Histogram
25
+ */
26
+ unit?: string;
27
+ /**
28
+ * Show values?
29
+ * @default show
30
+ */
31
+ values?: TValueStyle;
32
+ /**
33
+ * Histogram appearance (with sensible defaults).
34
+ * @default DefaultHistogramAppearance
35
+ */
36
+ appearance?: IHistogramAppearance;
37
+ /**
38
+ * No data text. A default text is supplied.
39
+ */
40
+ nodata?: React.ReactNode;
41
+ /**
42
+ * Optional click event includes the index of the bar clicked (0-based):
43
+ */
44
+ onClick?: (idx: number) => void;
45
+ }
46
+ /**
47
+ * A `Histogram` visualizes a number of bins, each of which has a `name`,
48
+ * a `count` (number of items in the bin), and a `start` and `end` for the
49
+ * values interval contained within the bin.
50
+ */
51
+ declare const Histogram: ({ appearance, values, tickStyle, ...props }: IProps) => React.JSX.Element;
52
+ export { Histogram, TValueStyle };
@@ -0,0 +1,92 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import * as React from 'react';
28
+ import styled from 'styled-components';
29
+ import { HistogramNoData } from './HistogramNoData';
30
+ import { HistogramBar } from './HistogramBar';
31
+ import { HistogramTick } from './HistogramTick';
32
+ import { DefaultHistogramAppearance } from './HistogramAppearance';
33
+ /**
34
+ * @example
35
+ * <Histogram
36
+ * tickStyle='tick'
37
+ * hoverValues
38
+ * onClick={(idx: number) => console.log(`Bin ${idx} clicked.`)}
39
+ * bins: {[
40
+ * { count: 50, start: 0, binEnd: 1000 },
41
+ * { count: 70, end: 1000, binEnd: 2000 },
42
+ * ]}/>
43
+ * @todo Consider using children for bins.
44
+ */
45
+ var HistogramBase = function (p) {
46
+ // Abort if there are no bins.
47
+ if (p.bins.length == 0)
48
+ return React.createElement(HistogramNoData, null, p.nodata);
49
+ // Find tallest bar. This is used to calculate the percentage height
50
+ // of each bar.
51
+ var maxHeight = Math.max.apply(Math, p.bins.map(function (b) { return b.count; }));
52
+ // Abort if bins are all empty.
53
+ if (maxHeight == 0)
54
+ return React.createElement(HistogramNoData, null, p.nodata);
55
+ return (React.createElement("div", { className: p.className },
56
+ React.createElement(ChartArea, null,
57
+ React.createElement(Indent, null,
58
+ React.createElement(BarArea, null, p.bins.map(function (bin, idx) {
59
+ return React.createElement(HistogramBar, { key: idx, values: p.values, value: bin.count, label: bin.name, height: 100 * bin.count / maxHeight, onClick: p.onClick ? function () { return p.onClick(idx); } : null, loading: p.loading, appearance: p.appearance });
60
+ })))),
61
+ p.tickStyle != 'none' && React.createElement(AxisArea, null,
62
+ React.createElement(Indent, null,
63
+ p.bins.map(function (bin, idx) {
64
+ return React.createElement(HistogramTick, { key: idx, showValue: p.tickStyle === 'value', left: 100 * idx / p.bins.length, value: bin.start });
65
+ }),
66
+ p.bins.length > 0 &&
67
+ React.createElement(HistogramTick, { left: 100, showValue: p.tickStyle === 'value', value: p.bins[p.bins.length - 1].end }))),
68
+ p.unit && React.createElement(UnitArea, null, p.unit)));
69
+ };
70
+ var ChartArea = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
71
+ var AxisArea = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
72
+ var UnitArea = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
73
+ var BarArea = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject([""], [""])));
74
+ var Indent = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject([""], [""])));
75
+ var HistogramStyled = styled(HistogramBase)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n // Chart elements are stacked vertically:\n display: flex;\n flex-direction: column;\n // Histogram fills available space:\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n ", " {\n position: relative;\n flex: 1;\n }\n ", " {\n position: relative;\n flex: 0;\n height: 22px;\n min-height: 22px;\n box-sizing: border-box;\n }\n ", " {\n flex: 0;\n height: 20px;\n min-height: 20px;\n font-size: 10px;\n color: #fff;\n user-select: none; \n display: flex;\n flex-direction: column;\n justify-content: end;\n align-items: center;\n }\n ", " {\n // BarArea takes up an absolute position:\n position: absolute;\n width: 100%;\n height: 100%;\n // Bars are placed using flexbox:\n display: flex;\n flex-direction: row; \n justify-content: center;\n align-items: flex-end;\n overflow-y: hidden;\n overflow-x: hidden;\n }\n ", " {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 5%;\n right: 5%;\n }\n"], ["\n // Chart elements are stacked vertically:\n display: flex;\n flex-direction: column;\n // Histogram fills available space:\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n ", " {\n position: relative;\n flex: 1;\n }\n ", " {\n position: relative;\n flex: 0;\n height: 22px;\n min-height: 22px;\n box-sizing: border-box;\n }\n ", " {\n flex: 0;\n height: 20px;\n min-height: 20px;\n font-size: 10px;\n color: #fff;\n user-select: none; \n display: flex;\n flex-direction: column;\n justify-content: end;\n align-items: center;\n }\n ", " {\n // BarArea takes up an absolute position:\n position: absolute;\n width: 100%;\n height: 100%;\n // Bars are placed using flexbox:\n display: flex;\n flex-direction: row; \n justify-content: center;\n align-items: flex-end;\n overflow-y: hidden;\n overflow-x: hidden;\n }\n ", " {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 5%;\n right: 5%;\n }\n"
76
+ /**
77
+ * A `Histogram` visualizes a number of bins, each of which has a `name`,
78
+ * a `count` (number of items in the bin), and a `start` and `end` for the
79
+ * values interval contained within the bin.
80
+ */
81
+ ])), ChartArea, AxisArea, UnitArea, BarArea, Indent);
82
+ /**
83
+ * A `Histogram` visualizes a number of bins, each of which has a `name`,
84
+ * a `count` (number of items in the bin), and a `start` and `end` for the
85
+ * values interval contained within the bin.
86
+ */
87
+ var Histogram = function (_a) {
88
+ var _b = _a.appearance, appearance = _b === void 0 ? DefaultHistogramAppearance : _b, _c = _a.values, values = _c === void 0 ? 'show' : _c, _d = _a.tickStyle, tickStyle = _d === void 0 ? 'none' : _d, props = __rest(_a, ["appearance", "values", "tickStyle"]);
89
+ return React.createElement(HistogramStyled, __assign({ appearance: appearance, values: values, tickStyle: tickStyle }, props));
90
+ };
91
+ export { Histogram };
92
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * IHistogramAppearance describes what a Histogram looks like.
3
+ */
4
+ interface IHistogramAppearance {
5
+ /** Normal bar gradient start color. */
6
+ bar_color_start: string;
7
+ /** Normal bar gradient end color. */
8
+ bar_color_end: string;
9
+ /** Bar loading color. */
10
+ bar_color_loading: string;
11
+ /** Gap on either side of a bar, in px. */
12
+ bar_gap: number;
13
+ /** Bar opacity on hover. */
14
+ hover_opacity: number;
15
+ /** Minimum bar height, in %. */
16
+ min_height: number;
17
+ /** Bar border radius, in px. */
18
+ bar_radius: number;
19
+ }
20
+ declare const DefaultHistogramAppearance: IHistogramAppearance;
21
+ declare const BlueHistogramAppearance: IHistogramAppearance;
22
+ export { IHistogramAppearance, DefaultHistogramAppearance, BlueHistogramAppearance };
@@ -0,0 +1,22 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var DefaultHistogramAppearance = {
13
+ bar_color_start: "#F2AF47",
14
+ bar_color_end: "#EBC95E",
15
+ bar_color_loading: "#dddddd",
16
+ bar_gap: 6,
17
+ hover_opacity: 0.5,
18
+ min_height: 3,
19
+ bar_radius: 6
20
+ };
21
+ var BlueHistogramAppearance = __assign(__assign({}, DefaultHistogramAppearance), { bar_color_start: "#B4D9F1", bar_color_end: "#B4D9F1", bar_gap: 2, bar_radius: 2 });
22
+ export { DefaultHistogramAppearance, BlueHistogramAppearance };
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { IHistogramAppearance } from './HistogramAppearance';
3
+ import { TValueStyle } from './Histogram';
4
+ interface IProps {
5
+ /** @ignore */
6
+ className?: string;
7
+ /** Absolute bar value. */
8
+ value: number;
9
+ /** Optional bar label. */
10
+ label?: string;
11
+ /** Height must be a percentage. */
12
+ height: number;
13
+ /** Show values? */
14
+ values?: TValueStyle;
15
+ /** Currently loading? Defaults to false. */
16
+ loading?: boolean;
17
+ /** Histogram appearance. */
18
+ appearance: IHistogramAppearance;
19
+ /** Fired if bar is clicked. */
20
+ onClick?: () => void;
21
+ }
22
+ declare const HistogramBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IProps, never>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
23
+ export { HistogramBar };
@@ -0,0 +1,20 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import * as React from 'react';
6
+ import styled, { css } from 'styled-components';
7
+ import { NumberFormatter } from '../../formatters/NumberFormatter';
8
+ var HistogramBarBase = function (props) {
9
+ return React.createElement("div", { className: props.className, onClick: props.onClick }, props.values != 'hide' && !props.loading && !isNaN(props.value) &&
10
+ React.createElement(HistogramBarText, { title: props.label },
11
+ React.createElement(HistogramBarLabel, null, props.label),
12
+ React.createElement(HistogramBarCount, null,
13
+ React.createElement(NumberFormatter, { value: Math.round(props.value), decimals: 0 }))));
14
+ };
15
+ var HistogramBarText = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position:\n position: absolute;\n top: 10px;\n bottom: 10px;\n left: 0;\n right: 0;\n\n // Content:\n user-select: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n\n transition: opacity ease-in-out 0.2s;\n"], ["\n // Position:\n position: absolute;\n top: 10px;\n bottom: 10px;\n left: 0;\n right: 0;\n\n // Content:\n user-select: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n\n transition: opacity ease-in-out 0.2s;\n"])));
16
+ var HistogramBarCount = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n transform: rotate(-180deg);\n text-align: left;\n writing-mode: vertical-lr;\n user-select: none;\n z-index: 2;\n color: #fff;\n"], ["\n flex: 1;\n transform: rotate(-180deg);\n text-align: left;\n writing-mode: vertical-lr;\n user-select: none;\n z-index: 2;\n color: #fff;\n"])));
17
+ var HistogramBarLabel = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n transform: rotate(-180deg);\n text-align: right;\n writing-mode: vertical-lr;\n user-select: none;\n z-index: 2;\n white-space: nowrap;\n color: #fff;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n transform: rotate(-180deg);\n text-align: right;\n writing-mode: vertical-lr;\n user-select: none;\n z-index: 2;\n white-space: nowrap;\n color: #fff;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
18
+ var HistogramBar = styled(HistogramBarBase)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n flex: 1;\n background-color: transparent;\n margin: 0 ", "px 0 ", "px;\n border-radius: ", "px;\n\n // Cursor is only changed if onClick handler is provided and loading is complete:\n cursor: ", ";\n\n /** :after is the actual bar. */\n transition: background-color ease-in-out 0.2s;\n &:after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n bottom: 0;\n width: 100%;\n\n height: ", "%;\n min-height: ", "%;\n ", "\n\n border-radius: ", "px;\n background: linear-gradient(to bottom, ", ", ", ");\n ", "\n opacity: 1;\n transition: height ease-in-out 1s, \n background-color ease-in-out 1s, \n opacity ease-in-out 0.2s;\n }\n\n // Hover effect only if hoverValues is set and loading is complete.\n ", "\n"], ["\n position: relative;\n height: 100%;\n flex: 1;\n background-color: transparent;\n margin: 0 ", "px 0 ", "px;\n border-radius: ", "px;\n\n // Cursor is only changed if onClick handler is provided and loading is complete:\n cursor: ", ";\n\n /** :after is the actual bar. */\n transition: background-color ease-in-out 0.2s;\n &:after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n bottom: 0;\n width: 100%;\n\n height: ", "%;\n min-height: ", "%;\n ", "\n\n border-radius: ", "px;\n background: linear-gradient(to bottom, ", ", ", ");\n ", "\n opacity: 1;\n transition: height ease-in-out 1s, \n background-color ease-in-out 1s, \n opacity ease-in-out 0.2s;\n }\n\n // Hover effect only if hoverValues is set and loading is complete.\n ", "\n"])), function (p) { return p.appearance.bar_gap; }, function (p) { return p.appearance.bar_gap; }, function (p) { return p.appearance.bar_radius; }, function (p) { return p.onClick && !p.loading ? "pointer" : null; }, function (p) { return p.height; }, function (p) { return p.appearance.min_height; }, function (p) { return p.loading && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["height: 50%;"], ["height: 50%;"]))); }, function (p) { return p.appearance.bar_radius; }, function (p) { return p.appearance.bar_color_start; }, function (p) { return p.appearance.bar_color_end; }, function (p) { return p.loading && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["background: ", ";"], ["background: ", ";"])), p.appearance.bar_color_loading); }, function (p) { return (p.values == 'hover' || p.onClick) && !p.loading && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n &:hover {\n background-color: ", ";\n ", " {\n opacity: 1;\n color: #fff;\n }\n }\n // Hovering over :after\n &:hover {\n &:after {\n opacity: ", ";\n } \n }\n "], ["\n ", "\n &:hover {\n background-color: ", ";\n ", " {\n opacity: 1;\n color: #fff;\n }\n }\n // Hovering over :after\n &:hover {\n &:after {\n opacity: ", ";\n } \n }\n "])), p.values == 'hover' && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", " {\n opacity: 0;\n }\n "], ["\n ", " {\n opacity: 0;\n }\n "])), HistogramBarText), function (p) { return p.theme.colors.primary[1]; }, HistogramBarText, p.appearance.hover_opacity); });
19
+ export { HistogramBar };
20
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /** @ignore */
6
+ children?: React.ReactNode;
7
+ }
8
+ declare const HistogramNoData: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IProps, never>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
9
+ export { HistogramNoData };
@@ -0,0 +1,18 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import * as React from 'react';
6
+ import styled from 'styled-components';
7
+ /**
8
+ * Special content for Histogram in case no data is found (all bars have a
9
+ * count of zero).
10
+ */
11
+ var HistogramNoDataBase = function (props) {
12
+ return React.createElement("div", { className: props.className },
13
+ React.createElement(Label, null, props.children ? props.children : "No data"));
14
+ };
15
+ var HistogramNoData = styled(HistogramNoDataBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n"])));
16
+ var Label = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n color: #aaa;\n gap: 8px;\n user-select: none;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n color: #aaa;\n gap: 8px;\n user-select: none;\n"])));
17
+ export { HistogramNoData };
18
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ value: string;
6
+ }
7
+ declare const HistogramSingleValue: (props: IProps) => React.JSX.Element;
8
+ export { HistogramSingleValue };
@@ -0,0 +1,26 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import * as React from 'react';
17
+ import styled from 'styled-components';
18
+ var HistogramSingleValueBase = function (props) {
19
+ return React.createElement("div", { className: props.className },
20
+ React.createElement("svg", { viewBox: "0 0 100 100", x: "0", y: "0" },
21
+ React.createElement("text", { x: "50%", y: "55", textLength: "100%", textAnchor: "middle", lengthAdjust: "spacingAndGlyphs" }, props.value)));
22
+ };
23
+ var HistogramSingleValueStyled = styled(HistogramSingleValueBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n &>svg {\n width: 100%;\n height: 100%;\n font-weight: 500;\n fill: #333;\n user-select: none;\n }\n"], ["\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n &>svg {\n width: 100%;\n height: 100%;\n font-weight: 500;\n fill: #333;\n user-select: none;\n }\n"])));
24
+ var HistogramSingleValue = function (props) { return React.createElement(HistogramSingleValueStyled, __assign({}, props)); };
25
+ export { HistogramSingleValue };
26
+ var templateObject_1;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /** Tick's left offset, in pixels. */
6
+ left: number;
7
+ /** Tick value. */
8
+ value: number;
9
+ /** Show tick value? */
10
+ showValue?: boolean;
11
+ }
12
+ declare const HistogramTick: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IProps, never>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
13
+ export { HistogramTick };
@@ -0,0 +1,14 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import * as React from 'react';
6
+ import styled from 'styled-components';
7
+ import { HumanFormatter } from '../../formatters/HumanFormatter';
8
+ var HistogramTickBase = function (props) {
9
+ return React.createElement("div", { className: props.className }, props.showValue && React.createElement("span", null,
10
+ React.createElement(HumanFormatter, { value: props.value })));
11
+ };
12
+ var HistogramTick = styled(HistogramTickBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position:\n position: absolute;\n left: ", "%;\n top: 4px;\n width: 2px;\n height: 5px;\n box-sizing: border-box;\n\n // Appearance (tick line):\n border-radius: 1px;\n border: solid 1px #fff;\n background-color: #fff;\n\n // Appearance (tick value):\n span {\n display: block;\n position: absolute;\n top: 5px;\n left: 0;\n transform: translate(-50%, 0);\n font-size: 10px;\n color: #fff;\n user-select: none;\n }\n"], ["\n // Position:\n position: absolute;\n left: ", "%;\n top: 4px;\n width: 2px;\n height: 5px;\n box-sizing: border-box;\n\n // Appearance (tick line):\n border-radius: 1px;\n border: solid 1px #fff;\n background-color: #fff;\n\n // Appearance (tick value):\n span {\n display: block;\n position: absolute;\n top: 5px;\n left: 0;\n transform: translate(-50%, 0);\n font-size: 10px;\n color: #fff;\n user-select: none;\n }\n"])), function (p) { return p.left; });
13
+ export { HistogramTick };
14
+ var templateObject_1;
@@ -0,0 +1,21 @@
1
+ interface IHistogramBin {
2
+ /**
3
+ * Bin name
4
+ */
5
+ name?: string;
6
+ /**
7
+ * Bin value (e.g. pond count)
8
+ */
9
+ count?: number;
10
+ /**
11
+ * Parameter start value
12
+ * e.g. Ponds of at least 200 km2
13
+ */
14
+ start?: number;
15
+ /**
16
+ * Parameter end value
17
+ * e.g. Ponds of at most 200 km2
18
+ */
19
+ end?: number;
20
+ }
21
+ export { IHistogramBin };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Histogram';
@@ -0,0 +1 @@
1
+ export * from './Histogram';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.236",
3
+ "version": "1.0.237",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",