@longline/aqua-ui 1.0.326 → 1.0.327

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.
@@ -17,7 +17,7 @@ import * as React from 'react';
17
17
  import styled from 'styled-components';
18
18
  var HEIGHT = 24; // Hint height (px)
19
19
  var HintBase = React.forwardRef(function (props, ref) {
20
- return React.createElement("div", __assign({ ref: ref, style: props.styles }, props.attributes, { className: props.className }), props.children);
20
+ return React.createElement("div", __assign({ "data-testid": "MapButton.Hint", ref: ref, style: props.styles }, props.attributes, { className: props.className }), props.children);
21
21
  });
22
22
  var HintStyled = styled(HintBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n height: ", "px;\n padding: 0 12px 0 12px;\n margin: 0 12px 0 12px;\n font: ", ";\n z-index: 1000;\n\n // Border:\n border-radius: ", "px;\n\n // Color:\n background-color: ", ";\n color: ", ";\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n transition: opacity ease-in-out ", "ms;\n opacity: 0;\n\n // Content:\n display: flex;\n align-items: center;\n gap: 4px;\n"], ["\n position: absolute;\n height: ", "px;\n padding: 0 12px 0 12px;\n margin: 0 12px 0 12px;\n font: ", ";\n z-index: 1000;\n\n // Border:\n border-radius: ", "px;\n\n // Color:\n background-color: ", ";\n color: ", ";\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n transition: opacity ease-in-out ", "ms;\n opacity: 0;\n\n // Content:\n display: flex;\n align-items: center;\n gap: 4px;\n"
23
23
  /**
@@ -34,6 +34,10 @@ interface IProps {
34
34
  * Fired when the map button is clicked.
35
35
  */
36
36
  onClick: (e?: React.MouseEvent) => void;
37
+ /**
38
+ * Test ID for Playwright/testing. Forwarded to the root DOM element.
39
+ */
40
+ 'data-testid'?: string;
37
41
  }
38
42
  /**
39
43
  * A `MapButton` is a square button to be used on a Mapbox map. It must
@@ -60,7 +60,7 @@ var MapButtonBase = function (props) {
60
60
  ]
61
61
  }), styles = _c.styles, attributes = _c.attributes, update = _c.update;
62
62
  var renderButton = function () {
63
- return React.createElement("div", { ref: setWrapperRef, className: props.className, tabIndex: props.disabled ? -1 : 0, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
63
+ return React.createElement("div", { ref: setWrapperRef, className: props.className, "data-testid": props['data-testid'], tabIndex: props.disabled ? -1 : 0, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
64
64
  React.createElement(Button, { "$grouped": props.grouped, "$size": props.size, "$disabled": props.disabled, "$active": props.active }, props.children),
65
65
  props.hint &&
66
66
  createPortal(React.createElement(Hint, { ref: setHintRef, styles: styles.popper, attributes: __assign({}, attributes.popper) }, props.hint), document.body));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.326",
3
+ "version": "1.0.327",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",