@longline/aqua-ui 1.0.330 → 1.0.331
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/Types.d.ts +9 -1
- package/containers/Anchor/Anchor.d.ts +2 -1
- package/containers/Anchor/Anchor.js +1 -1
- package/containers/Dock/Dock.d.ts +2 -1
- package/containers/Dock/Dock.js +1 -1
- package/containers/Dock/Dockable.d.ts +2 -1
- package/containers/Dock/Dockable.js +1 -1
- package/containers/DragBar/DragBar.d.ts +2 -1
- package/containers/DragBar/DragBar.js +1 -1
- package/containers/Form/elements/BoxWrapper.js +1 -1
- package/containers/Form/elements/Hint.js +1 -1
- package/containers/Form/elements/SimpleWrapper.js +1 -1
- package/containers/GlassPane/GlassPane.d.ts +2 -1
- package/containers/GlassPane/GlassPane.js +1 -1
- package/containers/InfoBox/InfoBox.d.ts +2 -1
- package/containers/InfoBox/InfoBox.js +1 -1
- package/containers/InfoBox/elements/Content.d.ts +2 -1
- package/containers/InfoBox/elements/Content.js +1 -1
- package/containers/InfoBox/elements/Footer.d.ts +2 -1
- package/containers/InfoBox/elements/Footer.js +1 -1
- package/containers/InfoBox/elements/Header.d.ts +2 -1
- package/containers/InfoBox/elements/Header.js +1 -1
- package/containers/InfoBox/elements/Row.d.ts +4 -2
- package/containers/InfoBox/elements/Row.js +1 -1
- package/containers/List/List.d.ts +2 -1
- package/containers/List/List.js +1 -1
- package/containers/List/ListCell.d.ts +2 -1
- package/containers/List/ListCell.js +1 -1
- package/containers/List/ListRow.d.ts +2 -1
- package/containers/List/ListRow.js +1 -1
- package/containers/Message/Message.d.ts +2 -1
- package/containers/Message/Message.js +1 -1
- package/containers/Openable/Openable.d.ts +2 -1
- package/containers/Openable/Openable.js +2 -2
- package/containers/PublicRoute/Help.d.ts +2 -1
- package/containers/PublicRoute/Help.js +1 -1
- package/containers/PublicRoute/PublicRoute.d.ts +2 -1
- package/containers/PublicRoute/PublicRoute.js +1 -1
- package/containers/Tabs/Pane.d.ts +2 -1
- package/containers/Tabs/Pane.js +1 -1
- package/containers/Tabs/Tabs.d.ts +2 -1
- package/containers/Tabs/Tabs.js +1 -1
- package/controls/Chip/Chip.d.ts +2 -1
- package/controls/Chip/Chip.js +1 -1
- package/controls/CircularProgress/CircularProgress.d.ts +2 -1
- package/controls/CircularProgress/CircularProgress.js +1 -1
- package/controls/Dropzone/Dropzone.d.ts +2 -1
- package/controls/Dropzone/Dropzone.js +1 -1
- package/controls/Fab/Fab.d.ts +2 -1
- package/controls/Fab/Fab.js +1 -1
- package/controls/Ghost/Ghost.d.ts +2 -1
- package/controls/Ghost/Ghost.js +1 -1
- package/controls/Gradient/Gradient.d.ts +2 -2
- package/controls/Gradient/Gradient.js +1 -1
- package/controls/Histogram/Histogram.d.ts +2 -1
- package/controls/Histogram/Histogram.js +14 -14
- package/controls/Icon/Icon.d.ts +2 -2
- package/controls/Icon/Icon.js +1 -1
- package/controls/Key/Key.d.ts +2 -1
- package/controls/Key/Key.js +1 -1
- package/controls/LinearChart/LinearChart.d.ts +2 -1
- package/controls/LinearChart/LinearChart.js +1 -1
- package/controls/ListButton/ListButton.d.ts +2 -1
- package/controls/ListButton/ListButton.js +1 -1
- package/controls/ListView/ListView.d.ts +2 -1
- package/controls/ListView/ListView.js +1 -1
- package/controls/Mouse/Mouse.d.ts +2 -1
- package/controls/Mouse/Mouse.js +1 -1
- package/controls/PrimaryButton/PrimaryButton.d.ts +2 -1
- package/controls/PrimaryButton/PrimaryButton.js +1 -1
- package/controls/Progress/Progress.d.ts +2 -1
- package/controls/Progress/Progress.js +1 -1
- package/controls/SecondaryButton/SecondaryButton.d.ts +2 -1
- package/controls/SecondaryButton/SecondaryButton.js +1 -1
- package/controls/TabBar/Tab.d.ts +2 -1
- package/controls/TabBar/Tab.js +1 -1
- package/controls/TabBar/TabBar.d.ts +2 -1
- package/controls/TabBar/TabBar.js +1 -1
- package/controls/TertiaryButton/TertiaryButton.d.ts +2 -1
- package/controls/TertiaryButton/TertiaryButton.js +1 -1
- package/controls/ToggleButton/ToggleButton.d.ts +2 -1
- package/controls/ToggleButton/ToggleButton.js +1 -1
- package/controls/View/View.d.ts +2 -1
- package/controls/View/View.js +1 -1
- package/inputs/DateInput/DateInput.d.ts +2 -5
- package/inputs/Dropdown/Dropdown.d.ts +2 -5
- package/inputs/Editor/Editor.d.ts +3 -5
- package/inputs/Input/Input.d.ts +2 -5
- package/inputs/Input/InputWrapper.d.ts +2 -1
- package/inputs/Input/InputWrapper.js +1 -1
- package/inputs/MonthRange/MonthRange.d.ts +2 -5
- package/inputs/Selector/Selector.d.ts +2 -5
- package/inputs/Slider/Slider.d.ts +2 -5
- package/inputs/Textarea/Textarea.d.ts +2 -5
- package/map/Map/Map.d.ts +2 -1
- package/map/Map/Map.js +1 -1
- package/map/PositionsManager/PositionBox.d.ts +2 -1
- package/map/PositionsManager/PositionBox.js +1 -1
- package/map/controls/CompassButton/CompassButton.js +3 -3
- package/map/controls/FullscreenButton/FullscreenButton.js +1 -1
- package/map/controls/Geocoder/Geocoder.js +1 -1
- package/map/controls/MapLoader/MapLoader.js +1 -1
- package/map/controls/ScaleControl/ScaleControl.js +1 -1
- package/map/controls/ZoomInButton/ZoomInButton.js +1 -1
- package/map/controls/ZoomOutButton/ZoomOutButton.js +1 -1
- package/map/controls/base/MapButton/MapButton.d.ts +0 -4
- package/map/controls/base/MapButton/MapButton.js +2 -2
- package/map/controls/base/MapControl/MapControl.d.ts +2 -1
- package/map/controls/base/MapControl/MapControl.js +2 -2
- package/modules/Filter/Filter.d.ts +2 -1
- package/modules/Filter/Filter.js +1 -1
- package/modules/MainMenu/Item.d.ts +2 -1
- package/modules/MainMenu/Item.js +1 -1
- package/modules/MainMenu/MainMenu.d.ts +2 -1
- package/modules/MainMenu/MainMenu.js +1 -1
- package/modules/Root/Sidebar.js +1 -1
- package/package.json +1 -1
- package/services/Dialog/Dialog.d.ts +2 -1
- package/services/Dialog/Dialog.js +2 -2
- package/services/Dialog/DialogWindow.d.ts +2 -1
- package/services/Dialog/DialogWindow.js +1 -1
|
@@ -30,30 +30,30 @@ import { HistogramNoData } from './HistogramNoData';
|
|
|
30
30
|
import { HistogramBar } from './HistogramBar';
|
|
31
31
|
import { HistogramTick } from './HistogramTick';
|
|
32
32
|
import { DefaultHistogramAppearance } from './HistogramAppearance';
|
|
33
|
-
var HistogramBase = function (
|
|
33
|
+
var HistogramBase = function (props) {
|
|
34
34
|
// Abort if there are no bins.
|
|
35
|
-
if (
|
|
36
|
-
return React.createElement(HistogramNoData, null,
|
|
35
|
+
if (props.bins.length === 0)
|
|
36
|
+
return React.createElement(HistogramNoData, null, props.nodata);
|
|
37
37
|
// Find tallest bar. This is used to calculate the percentage height
|
|
38
38
|
// of each bar.
|
|
39
|
-
var maxHeight = Math.max.apply(Math,
|
|
39
|
+
var maxHeight = Math.max.apply(Math, props.bins.map(function (b) { return b.count; }));
|
|
40
40
|
// Abort if bins are all empty.
|
|
41
41
|
if (maxHeight === 0)
|
|
42
|
-
return React.createElement(HistogramNoData, null,
|
|
43
|
-
return (React.createElement("div", { "data-testid": "Histogram", className:
|
|
42
|
+
return React.createElement(HistogramNoData, null, props.nodata);
|
|
43
|
+
return (React.createElement("div", { "data-testid": props['data-testid'] || "Histogram", className: props.className },
|
|
44
44
|
React.createElement(ChartArea, null,
|
|
45
45
|
React.createElement(Indent, null,
|
|
46
|
-
React.createElement(BarArea, null,
|
|
47
|
-
return React.createElement(HistogramBar, { key: idx, values:
|
|
46
|
+
React.createElement(BarArea, null, props.bins.map(function (bin, idx) {
|
|
47
|
+
return React.createElement(HistogramBar, { key: idx, values: props.values, value: bin.count, label: bin.name, height: 100 * bin.count / maxHeight, onClick: props.onClick ? function () { return props.onClick(idx); } : null, loading: props.loading, appearance: props.appearance });
|
|
48
48
|
})))),
|
|
49
|
-
|
|
49
|
+
props.tickStyle !== 'none' && React.createElement(AxisArea, null,
|
|
50
50
|
React.createElement(Indent, null,
|
|
51
|
-
|
|
52
|
-
return React.createElement(HistogramTick, { key: idx, showValue:
|
|
51
|
+
props.bins.map(function (bin, idx) {
|
|
52
|
+
return React.createElement(HistogramTick, { key: idx, showValue: props.tickStyle === 'value', left: 100 * idx / props.bins.length, value: bin.binStart });
|
|
53
53
|
}),
|
|
54
|
-
|
|
55
|
-
React.createElement(HistogramTick, { left: 100, showValue:
|
|
56
|
-
|
|
54
|
+
props.bins.length > 0 &&
|
|
55
|
+
React.createElement(HistogramTick, { left: 100, showValue: props.tickStyle === 'value', value: props.bins[props.bins.length - 1].binEnd }))),
|
|
56
|
+
props.unit && React.createElement(UnitArea, null, props.unit)));
|
|
57
57
|
};
|
|
58
58
|
var ChartArea = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
59
59
|
var AxisArea = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
|
package/controls/Icon/Icon.d.ts
CHANGED
package/controls/Icon/Icon.js
CHANGED
|
@@ -36,7 +36,7 @@ var IconBase = function (props) {
|
|
|
36
36
|
if (props.onClick)
|
|
37
37
|
props.onClick(e);
|
|
38
38
|
};
|
|
39
|
-
return (React.createElement("svg", { "data-testid": "Icon", className: props.className, onClick: handleClick, focusable: "false", role: "img" },
|
|
39
|
+
return (React.createElement("svg", { "data-testid": props['data-testid'] || "Icon", className: props.className, onClick: handleClick, focusable: "false", role: "img" },
|
|
40
40
|
props.title && React.createElement("title", null, props.title),
|
|
41
41
|
React.createElement("use", { xlinkHref: props.url })));
|
|
42
42
|
};
|
package/controls/Key/Key.d.ts
CHANGED
package/controls/Key/Key.js
CHANGED
|
@@ -48,7 +48,7 @@ var KeyBase = function (props) {
|
|
|
48
48
|
}
|
|
49
49
|
return { symbol: sym, wide: isWide };
|
|
50
50
|
}, [props.value, isMac]), symbol = _a.symbol, wide = _a.wide;
|
|
51
|
-
return (React.createElement("span", { "data-testid": "Key", className: props.className, style: {
|
|
51
|
+
return (React.createElement("span", { "data-testid": props['data-testid'] || "Key", className: props.className, style: {
|
|
52
52
|
maxWidth: wide ? 'auto' : '16px',
|
|
53
53
|
minWidth: wide ? '36px' : 'auto'
|
|
54
54
|
}, "aria-label": props.value },
|
|
@@ -29,7 +29,7 @@ import styled from 'styled-components';
|
|
|
29
29
|
import { Ghost } from '../Ghost';
|
|
30
30
|
var LinearChartBase = function (props) {
|
|
31
31
|
var percentage = Math.round(Math.max(0, Math.min(100, props.value))) + "%";
|
|
32
|
-
return (React.createElement("div", { "data-testid": "LinearChart", className: props.className, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(props.value) },
|
|
32
|
+
return (React.createElement("div", { "data-testid": props['data-testid'] || "LinearChart", className: props.className, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(props.value) },
|
|
33
33
|
props.label && React.createElement(Label, null,
|
|
34
34
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: '2px', right: 0, bottom: '2px' } }),
|
|
35
35
|
!props.ghost && props.label),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Placement } from '@popperjs/core';
|
|
3
|
-
|
|
3
|
+
import { ITestable } from '../../Types';
|
|
4
|
+
interface IListButtonProps extends ITestable {
|
|
4
5
|
/** @ignore */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Toggle control that opens/closes the list. Receives an `onClick` handler. */
|
|
@@ -59,7 +59,7 @@ var ListButtonBase = function (props) {
|
|
|
59
59
|
update();
|
|
60
60
|
};
|
|
61
61
|
return (React.createElement(React.Fragment, null,
|
|
62
|
-
React.createElement("div", { "data-testid": "ListButton", ref: buttonRef, style: { display: 'inline-block' } }, React.cloneElement(props.toggle, { onClick: toggleOpen })),
|
|
62
|
+
React.createElement("div", { "data-testid": props['data-testid'] || "ListButton", ref: buttonRef, style: { display: 'inline-block' } }, React.cloneElement(props.toggle, { onClick: toggleOpen })),
|
|
63
63
|
createPortal(React.createElement(Pane, __assign({ "$open": open, "$width": props.width, style: styles.popper }, attributes.popper, { ref: paneRef }), open && React.createElement(List, { maxItems: 6, contract: true }, props.children)), document.body)));
|
|
64
64
|
};
|
|
65
65
|
var Pane = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n width: ", "px;\n z-index: 2500;\n"], ["\n display: ", ";\n width: ", "px;\n z-index: 2500;\n"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IColumnProps } from './Column';
|
|
3
3
|
import { IListViewProps } from './IListViewProps';
|
|
4
|
-
|
|
4
|
+
import { ITestable } from '../../Types';
|
|
5
|
+
interface IProps extends IListViewProps, ITestable {
|
|
5
6
|
/**
|
|
6
7
|
* Column specifications. These are a set of `Column` children,
|
|
7
8
|
* each of which set a column name, width, sort key and sort direction, and
|
|
@@ -120,7 +120,7 @@ var ListViewBase = function (props) {
|
|
|
120
120
|
if (props.ghost) {
|
|
121
121
|
return React.createElement(Ghost, __assign({}, otherProps, { columns: columns }));
|
|
122
122
|
}
|
|
123
|
-
return (React.createElement(Table, __assign({ "data-testid": "ListView" }, otherProps, { data: data, columns: columns, sort: sort, reverse: reverse, onSortClick: handleSort, columnsMode: columnsMode, onOpenColumns: handleColumns, onCheck: props.onCheck ? handleCheck : null, onChangeColumns: handleChangeColumns, onCloseColumns: function () { return setColumnsMode(false); }, onResetColumns: handleResetColumns })));
|
|
123
|
+
return (React.createElement(Table, __assign({ "data-testid": props['data-testid'] || "ListView" }, otherProps, { data: data, columns: columns, sort: sort, reverse: reverse, onSortClick: handleSort, columnsMode: columnsMode, onOpenColumns: handleColumns, onCheck: props.onCheck ? handleCheck : null, onChangeColumns: handleChangeColumns, onCloseColumns: function () { return setColumnsMode(false); }, onResetColumns: handleResetColumns })));
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
126
|
* A data table with sorting, column management, virtualization, and row selection.
|
package/controls/Mouse/Mouse.js
CHANGED
|
@@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
var MouseBase = function (props) {
|
|
30
|
-
return (React.createElement("svg", { "data-testid": "Mouse", className: props.className, viewBox: "3 0 22 29", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" // Hide from assistive tech (for non-interactive icons)
|
|
30
|
+
return (React.createElement("svg", { "data-testid": props['data-testid'] || "Mouse", className: props.className, viewBox: "3 0 22 29", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" // Hide from assistive tech (for non-interactive icons)
|
|
31
31
|
, focusable: "false" },
|
|
32
32
|
React.createElement("path", { d: "M14 1.75623C8.69307 1.75623 4.375 6.07429 4.375 11.3812V18.3812C4.375 23.6882 8.69307 28.0062 14 28.0062C19.3069 28.0062 23.625 23.6882 23.625 18.3812V11.3812C23.625 6.07429 19.3069 1.75623 14 1.75623ZM21.875 11.3812V12.2562H16.625V10.5062C16.625 9.36653 15.8911 8.40403 14.875 8.04199V3.55756C18.806 3.99506 21.875 7.33546 21.875 11.3812ZM14 9.63123C14.4834 9.63123 14.875 10.0239 14.875 10.5062V13.1312C14.875 13.6136 14.4834 14.0062 14 14.0062C13.5166 14.0062 13.125 13.6136 13.125 13.1312V10.5062C13.125 10.0239 13.5166 9.63123 14 9.63123ZM6.125 11.3812C6.125 7.33546 9.19403 3.99389 13.125 3.55779V8.04223C12.1089 8.40427 11.375 9.36677 11.375 10.5065V12.2565H6.125V11.3812ZM14 26.2562C9.65767 26.2562 6.125 22.7236 6.125 18.3812V14.0062H11.5358C11.8978 15.0223 12.8603 15.7562 14 15.7562C15.1397 15.7562 16.1022 15.0223 16.4642 14.0062H21.875V18.3812C21.875 22.7236 18.3423 26.2562 14 26.2562Z", fill: props.color }),
|
|
33
33
|
props.left && React.createElement("path", { className: "left", d: "M13.125 3.55798C9.19403 3.99408 6.125 7.33565 6.125 11.3814V12.2567H11.375V10.5067C11.375 9.36696 12.1089 8.40446 13.125 8.04242V3.55798Z" }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IIconProps } from '../Icon';
|
|
3
|
-
|
|
3
|
+
import { ITestable } from '../../Types';
|
|
4
|
+
interface IPrimaryButtonProps extends ITestable {
|
|
4
5
|
/** @ignore */
|
|
5
6
|
className?: string;
|
|
6
7
|
/** Button content. Can be JSX. */
|
|
@@ -40,7 +40,7 @@ var PrimaryButtonBase = function (props) {
|
|
|
40
40
|
// An IIconProps was provided. Use it as the props for the icon.
|
|
41
41
|
return React.createElement(Icon, __assign({ color: theme.colors.neutral[100] }, props.icon));
|
|
42
42
|
};
|
|
43
|
-
return (React.createElement("button", { "data-testid": "PrimaryButton", className: props.className, type: "button", onClick: props.onClick, title: props.title, "aria-disabled": props.disabled, disabled: props.disabled },
|
|
43
|
+
return (React.createElement("button", { "data-testid": props['data-testid'] || "PrimaryButton", className: props.className, type: "button", onClick: props.onClick, title: props.title, "aria-disabled": props.disabled, disabled: props.disabled },
|
|
44
44
|
icon(),
|
|
45
45
|
props.children));
|
|
46
46
|
};
|
|
@@ -34,7 +34,7 @@ var getClampedValue = function (value) {
|
|
|
34
34
|
return Math.round(Math.min(100, Math.max(0, value)));
|
|
35
35
|
};
|
|
36
36
|
var ProgressBase = function (props) {
|
|
37
|
-
return React.createElement("div", { "data-testid": "Progress", className: props.className, role: "progressbar", "aria-valuenow": getClampedValue(props.value), "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
37
|
+
return React.createElement("div", { "data-testid": props['data-testid'] || "Progress", className: props.className, role: "progressbar", "aria-valuenow": getClampedValue(props.value), "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
38
38
|
React.createElement(FillOuter, null,
|
|
39
39
|
React.createElement(FillInner, { style: { transform: "scaleX(".concat(getClampedValue(props.value) / 100, ")") } })),
|
|
40
40
|
props.numbered && React.createElement(Value, null, "".concat(getClampedValue(props.value), "%")));
|
|
@@ -29,7 +29,7 @@ import styled, { css, useTheme } from 'styled-components';
|
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var SecondaryButtonBase = function (props) {
|
|
31
31
|
var theme = useTheme();
|
|
32
|
-
return (React.createElement("button", { "data-testid": "SecondaryButton", type: "button", className: props.className, disabled: props.disabled, onClick: props.onClick, title: props.title, "aria-label": props.title },
|
|
32
|
+
return (React.createElement("button", { "data-testid": props['data-testid'] || "SecondaryButton", type: "button", className: props.className, disabled: props.disabled, onClick: props.onClick, title: props.title, "aria-label": props.title },
|
|
33
33
|
React.createElement(Icon, __assign({ color: theme.colors.neutral[100] }, (typeof props.icon === 'string' ? { url: props.icon } : props.icon)))));
|
|
34
34
|
};
|
|
35
35
|
//
|
package/controls/TabBar/Tab.d.ts
CHANGED
package/controls/TabBar/Tab.js
CHANGED
|
@@ -32,7 +32,7 @@ var TabBase = React.forwardRef(function (props, ref) {
|
|
|
32
32
|
if (props.onClick)
|
|
33
33
|
props.onClick();
|
|
34
34
|
};
|
|
35
|
-
return (React.createElement("div", { "data-testid": "TabBar.Tab", className: props.className, role: "tab", "aria-selected": props.active, ref: ref, onClick: handleClick },
|
|
35
|
+
return (React.createElement("div", { "data-testid": props['data-testid'] || "TabBar.Tab", className: props.className, role: "tab", "aria-selected": props.active, ref: ref, onClick: handleClick },
|
|
36
36
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: '5px', top: '9px', right: '5px', bottom: '9px', zIndex: 100 } }),
|
|
37
37
|
React.createElement(Content, null,
|
|
38
38
|
props.children,
|
|
@@ -190,7 +190,7 @@ var TabBarBase = function (props) {
|
|
|
190
190
|
setActive(idx);
|
|
191
191
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, idx);
|
|
192
192
|
};
|
|
193
|
-
return (React.createElement("div", { "data-testid": "TabBar", className: props.className, ref: barRef, "aria-orientation": "horizontal" },
|
|
193
|
+
return (React.createElement("div", { "data-testid": props['data-testid'] || "TabBar", className: props.className, ref: barRef, "aria-orientation": "horizontal" },
|
|
194
194
|
React.createElement(Slider, { ref: sliderRef, onMouseDown: handleMouseDown },
|
|
195
195
|
React.Children.map(props.children, function (child, idx) {
|
|
196
196
|
return React.cloneElement(child, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IIconProps } from '../Icon';
|
|
3
|
-
|
|
3
|
+
import { ITestable } from '../../Types';
|
|
4
|
+
interface ITertiaryButtonProps extends ITestable {
|
|
4
5
|
/** @ignore */
|
|
5
6
|
className?: string;
|
|
6
7
|
/** Button content. Can be JSX. */
|
|
@@ -39,7 +39,7 @@ var TertiaryButtonBase = React.forwardRef(function (props, ref) {
|
|
|
39
39
|
// An IIconProps was provided. Use it as the props for the icon.
|
|
40
40
|
return React.createElement(Icon, __assign({ color: props.primary ? theme.colors.neutral[100] : theme.colors.primary[3] }, props.icon));
|
|
41
41
|
};
|
|
42
|
-
return (React.createElement("button", { "data-testid": "TertiaryButton", ref: ref, className: props.className, type: "button", disabled: props.disabled, onClick: props.onClick },
|
|
42
|
+
return (React.createElement("button", { "data-testid": props['data-testid'] || "TertiaryButton", ref: ref, className: props.className, type: "button", disabled: props.disabled, onClick: props.onClick },
|
|
43
43
|
icon(),
|
|
44
44
|
props.children));
|
|
45
45
|
});
|
|
@@ -28,7 +28,7 @@ import * as React from 'react';
|
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var ToggleButtonBase = React.forwardRef(function (props, ref) {
|
|
31
|
-
return React.createElement("button", { "data-testid": "ToggleButton", className: props.className, ref: ref, type: "button", onClick: props.onClick, title: props.title, disabled: props.disabled, "aria-pressed": props.active, "aria-expanded": props.open, "aria-disabled": props.disabled },
|
|
31
|
+
return React.createElement("button", { "data-testid": props['data-testid'] || "ToggleButton", className: props.className, ref: ref, type: "button", onClick: props.onClick, title: props.title, disabled: props.disabled, "aria-pressed": props.active, "aria-expanded": props.open, "aria-disabled": props.disabled },
|
|
32
32
|
React.createElement(Icon, { url: props.url }));
|
|
33
33
|
});
|
|
34
34
|
var ToggleButtonStyled = styled(ToggleButtonBase).attrs(function (p) {
|
package/controls/View/View.d.ts
CHANGED
package/controls/View/View.js
CHANGED
|
@@ -31,7 +31,7 @@ import { ScrollingContent } from './ScrollingContent';
|
|
|
31
31
|
import { EllipsizedContent } from './EllipsizedContent';
|
|
32
32
|
import { Ghost } from '../Ghost';
|
|
33
33
|
var ViewBase = function (props) {
|
|
34
|
-
return React.createElement("div", { "data-testid": "View", className: props.className },
|
|
34
|
+
return React.createElement("div", { "data-testid": props['data-testid'] || "View", className: props.className },
|
|
35
35
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, zIndex: 100 } }),
|
|
36
36
|
React.createElement(Label, null, props.badge ? (React.createElement(BadgeWrapper, null,
|
|
37
37
|
props.label,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
3
|
+
interface IDateInputProps extends ITestable {
|
|
3
4
|
/** @ignore */
|
|
4
5
|
className?: string;
|
|
5
6
|
/**
|
|
@@ -64,10 +65,6 @@ interface IDateInputProps {
|
|
|
64
65
|
* Listeners are notified when the Input receives focus.
|
|
65
66
|
*/
|
|
66
67
|
onFocus?: () => void;
|
|
67
|
-
/**
|
|
68
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
69
|
-
*/
|
|
70
|
-
'data-testid'?: string;
|
|
71
68
|
}
|
|
72
69
|
declare const DateInput: {
|
|
73
70
|
({ direction, noTabIndex, disabled, transparent, fluid, error, clearable, nofuture, ...props }: IDateInputProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
3
|
+
interface IDropdownProps extends ITestable {
|
|
3
4
|
/** @ignore */
|
|
4
5
|
className?: string;
|
|
5
6
|
/** @ignore */
|
|
@@ -112,10 +113,6 @@ interface IDropdownProps {
|
|
|
112
113
|
* is closed.
|
|
113
114
|
*/
|
|
114
115
|
onClose?: () => void;
|
|
115
|
-
/**
|
|
116
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
117
|
-
*/
|
|
118
|
-
'data-testid'?: string;
|
|
119
116
|
}
|
|
120
117
|
/**
|
|
121
118
|
* A `Dropdown` is a replacement for `<select>` (select). It opens upwards or
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
3
|
+
interface IEditorProps extends ITestable {
|
|
3
4
|
/** @ignore */
|
|
4
5
|
className?: string;
|
|
5
6
|
/**
|
|
@@ -65,10 +66,7 @@ interface IEditorProps {
|
|
|
65
66
|
/**
|
|
66
67
|
* Listeners are notified whenever the user interacts with the Editor.
|
|
67
68
|
*/
|
|
68
|
-
onChange?: (value: any) => void;
|
|
69
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
70
|
-
*/
|
|
71
|
-
'data-testid'?: string;
|
|
69
|
+
onChange?: (value: any) => void;
|
|
72
70
|
}
|
|
73
71
|
declare const Editor: {
|
|
74
72
|
({ fluid, error, disabled, transparent, ghost, allowFullscreen, codeButtons, ...props }: IEditorProps): React.JSX.Element;
|
package/inputs/Input/Input.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IIconProps } from '../../controls/Icon';
|
|
3
|
-
|
|
3
|
+
import { ITestable } from '../../Types';
|
|
4
|
+
interface IInputProps extends ITestable {
|
|
4
5
|
/** @ignore */
|
|
5
6
|
className?: string;
|
|
6
7
|
/** @ignore */
|
|
@@ -128,10 +129,6 @@ interface IInputProps {
|
|
|
128
129
|
* Listeners are notified when the Input receives focus.
|
|
129
130
|
*/
|
|
130
131
|
onFocus?: () => void;
|
|
131
|
-
/**
|
|
132
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
133
|
-
*/
|
|
134
|
-
'data-testid'?: string;
|
|
135
132
|
}
|
|
136
133
|
declare const Input: {
|
|
137
134
|
(props: IInputProps): React.JSX.Element;
|
|
@@ -42,7 +42,7 @@ var InputWrapperBase = function (props) {
|
|
|
42
42
|
else if (props.icon != null) {
|
|
43
43
|
icon = (React.createElement(Icon, __assign({ size: 17, color: (_a = props.icon.color) !== null && _a !== void 0 ? _a : theme.colors.primary[3] }, props.icon)));
|
|
44
44
|
}
|
|
45
|
-
return (React.createElement("div", { "data-testid": "InputWrapper", className: props.className, onClick: props.onClick },
|
|
45
|
+
return (React.createElement("div", { "data-testid": props['data-testid'] || "InputWrapper", className: props.className, onClick: props.onClick },
|
|
46
46
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, zIndex: 100 } }),
|
|
47
47
|
icon && !props.ghost && props.iconPosition == 'left' && icon,
|
|
48
48
|
React.createElement(Content, null, props.children),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
3
|
+
interface IMonthRangeProps extends ITestable {
|
|
3
4
|
/** @ignore */
|
|
4
5
|
className?: string;
|
|
5
6
|
/**
|
|
@@ -63,10 +64,6 @@ interface IMonthRangeProps {
|
|
|
63
64
|
* Listeners are notified when the `MonthRange` receives focus.
|
|
64
65
|
*/
|
|
65
66
|
onFocus?: () => void;
|
|
66
|
-
/**
|
|
67
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
68
|
-
*/
|
|
69
|
-
'data-testid'?: string;
|
|
70
67
|
}
|
|
71
68
|
/**
|
|
72
69
|
* A `MonthRange` allows a selection of a time period, measured in months.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ISelectorProps } from './ISelectorProps';
|
|
3
|
+
import { ITestable } from '../../Types';
|
|
3
4
|
type TCheckboxType = 'check' | 'toggle' | 'slider' | 'circle';
|
|
4
|
-
interface IProps extends ISelectorProps {
|
|
5
|
+
interface IProps extends ISelectorProps, ITestable {
|
|
5
6
|
/** @ignore */
|
|
6
7
|
className?: string;
|
|
7
8
|
/**
|
|
@@ -25,10 +26,6 @@ interface IProps extends ISelectorProps {
|
|
|
25
26
|
* If set, checkbox has a dark label.
|
|
26
27
|
*/
|
|
27
28
|
dark?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
30
|
-
*/
|
|
31
|
-
'data-testid'?: string;
|
|
32
29
|
}
|
|
33
30
|
/**
|
|
34
31
|
* A Selector can be used to create either a HTML checkbox or a HTML radio button.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
3
|
+
interface ISliderProps extends ITestable {
|
|
3
4
|
/** @ignore */
|
|
4
5
|
className?: string;
|
|
5
6
|
/**
|
|
@@ -72,10 +73,6 @@ interface ISliderProps {
|
|
|
72
73
|
* Event is triggered when slider's value changes.
|
|
73
74
|
*/
|
|
74
75
|
onChange?: (value: number) => void;
|
|
75
|
-
/**
|
|
76
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
77
|
-
*/
|
|
78
|
-
'data-testid'?: string;
|
|
79
76
|
}
|
|
80
77
|
/**
|
|
81
78
|
* Sliders allow users to view and select a value (or range) along a track.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
2
3
|
/**
|
|
3
4
|
* Textarea validates itself using the HTML validation API whenever its
|
|
4
5
|
* content changes. Listeners can use onValidate to obtain the resulting
|
|
5
6
|
* ValidityState.
|
|
6
7
|
*/
|
|
7
|
-
interface ITextareaProps {
|
|
8
|
+
interface ITextareaProps extends ITestable {
|
|
8
9
|
/** @ignore */
|
|
9
10
|
className?: string;
|
|
10
11
|
/**
|
|
@@ -69,10 +70,6 @@ interface ITextareaProps {
|
|
|
69
70
|
* Listeners are notified whenever the user interacts with the Textarea.
|
|
70
71
|
*/
|
|
71
72
|
onChange?: (value: any) => void;
|
|
72
|
-
/**
|
|
73
|
-
* Test ID for Playwright/testing. Forwarded to the root DOM element.
|
|
74
|
-
*/
|
|
75
|
-
'data-testid'?: string;
|
|
76
73
|
}
|
|
77
74
|
/**
|
|
78
75
|
* `Textarea` encapsulated and styles the `<textarea>` element. Like `Input`,
|
package/map/Map/Map.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MapMouseEvent, Map as OriginalMap } from 'mapbox-gl';
|
|
3
3
|
import { ViewState, ViewStateChangeEvent } from 'react-map-gl/mapbox';
|
|
4
|
-
|
|
4
|
+
import { ITestable } from '../../Types';
|
|
5
|
+
interface IMapProps extends ITestable {
|
|
5
6
|
/** @ignore */
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
/**
|
package/map/Map/Map.js
CHANGED
|
@@ -218,7 +218,7 @@ var MapBase = function (props) {
|
|
|
218
218
|
if (props.onMove)
|
|
219
219
|
props.onMove(e);
|
|
220
220
|
};
|
|
221
|
-
return (React.createElement(GLMap, __assign({ "data-testid": "Map" }, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
|
|
221
|
+
return (React.createElement(GLMap, __assign({ "data-testid": props['data-testid'] || "Map" }, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
|
|
222
222
|
props.clipped && React.createElement(React.Fragment, null,
|
|
223
223
|
React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
|
|
224
224
|
React.createElement(Layer, { id: "overlay", type: "raster" })),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ITestable } from '../../Types';
|
|
2
3
|
interface IPosition {
|
|
3
4
|
lng: number;
|
|
4
5
|
lat: number;
|
|
5
6
|
zoom: number;
|
|
6
7
|
}
|
|
7
|
-
interface IPositionBoxProps {
|
|
8
|
+
interface IPositionBoxProps extends ITestable {
|
|
8
9
|
coord: IPosition;
|
|
9
10
|
onMove: (x: number, y: number) => void;
|
|
10
11
|
onDelete: () => void;
|
|
@@ -52,7 +52,7 @@ var PositionBox = function (props) {
|
|
|
52
52
|
console.error("Could not write to clipboard: context not secure.");
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
return (React.createElement(Dockable, { latitude: props.coord.lat, longitude: props.coord.lng, offsetX: -9, offsetY: -38 },
|
|
55
|
+
return (React.createElement(Dockable, { "data-testid": props['data-testid'] || 'PositionBox', latitude: props.coord.lat, longitude: props.coord.lng, offsetX: -9, offsetY: -38 },
|
|
56
56
|
React.createElement(Wrapper, { ref: wrapperRef },
|
|
57
57
|
React.createElement(Icon, { onClick: props.onDelete },
|
|
58
58
|
React.createElement(Target, null,
|
|
@@ -31,11 +31,11 @@ import { MapButton } from '../base/MapButton';
|
|
|
31
31
|
import { useViewState } from '../../Map';
|
|
32
32
|
import { Mouse } from '../../../controls/Mouse';
|
|
33
33
|
import { Key } from '../../../controls/Key';
|
|
34
|
-
var CompassButtonBase = function (
|
|
34
|
+
var CompassButtonBase = function (props) {
|
|
35
35
|
var viewState = useViewState();
|
|
36
36
|
var map = useMap().current;
|
|
37
|
-
return (React.createElement(MapButton, __assign({ "data-testid": "CompassButton", onClick: function () { map.rotateTo(0); map.resetNorthPitch(); } },
|
|
38
|
-
React.createElement("div", { style: { transform: "rotateX(".concat(
|
|
37
|
+
return (React.createElement(MapButton, __assign({ "data-testid": props['data-testid'] || "CompassButton", onClick: function () { map.rotateTo(0); map.resetNorthPitch(); } }, props),
|
|
38
|
+
React.createElement("div", { style: { transform: "rotateX(".concat(props.visualizePitch ? viewState.pitch : 0, "deg)") } },
|
|
39
39
|
React.createElement("svg", { style: { transform: "rotateZ(".concat(-viewState.bearing, "deg)") }, xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 1000 1000" },
|
|
40
40
|
React.createElement("polygon", { className: "tip", points: "100,1000 500,0 900,1000 500,700 " }),
|
|
41
41
|
React.createElement("polygon", { className: "arrow", points: "500,0 423,192.6 500,351.6 577,192.6 " })))));
|
|
@@ -59,7 +59,7 @@ var FullscreenButton = function (_a) {
|
|
|
59
59
|
window.document.exitFullscreen();
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
return (React.createElement(MapButton, __assign({ "data-testid": "FullscreenButton", disabled: !checkFullscreenSupport(), onClick: toggle, hint: hint }, props),
|
|
62
|
+
return (React.createElement(MapButton, __assign({ "data-testid": props['data-testid'] || "FullscreenButton", disabled: !checkFullscreenSupport(), onClick: toggle, hint: hint }, props),
|
|
63
63
|
React.createElement("svg", { width: "100", height: "100", viewBox: "0 0 448 512", xmlns: "http://www.w3.org/2000/svg" },
|
|
64
64
|
React.createElement("path", { d: "M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z" }))));
|
|
65
65
|
};
|
|
@@ -129,7 +129,7 @@ var GeocoderBase = function (props) {
|
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
return (React.createElement(MapControl, { "data-testid": "Geocoder", x: props.x, y: props.y },
|
|
132
|
+
return (React.createElement(MapControl, { "data-testid": props['data-testid'] || "Geocoder", x: props.x, y: props.y },
|
|
133
133
|
React.createElement("div", { className: props.className, onKeyDown: function (e) { return handleKeyDown(e); }, ref: wrapperRef },
|
|
134
134
|
React.createElement(GeocoderSelector, { placeholder: props.placeholder, searchIcon: props.searchIcon, value: q, onChange: handleChange }),
|
|
135
135
|
features.length > 0 && React.createElement(GeocoderList, { upwards: props.upwards }, features.map(function (f, idx) {
|