@longline/aqua-ui 1.0.183 → 1.0.186

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.
Files changed (131) hide show
  1. package/containers/Dock/Dock.d.ts +7 -4
  2. package/containers/Dock/Dock.js +2 -1
  3. package/containers/Dock/Dockable.d.ts +14 -3
  4. package/containers/Dock/Dockable.js +45 -14
  5. package/containers/DragBar/DragBar.d.ts +4 -1
  6. package/containers/DragBar/DragBar.js +1 -0
  7. package/containers/GlassPane/GlassPane.d.ts +16 -4
  8. package/containers/GlassPane/GlassPane.js +41 -8
  9. package/containers/InfoBox/InfoBox.d.ts +23 -2
  10. package/containers/InfoBox/InfoBox.js +40 -2
  11. package/containers/InfoBox/elements/Content.d.ts +4 -1
  12. package/containers/InfoBox/elements/Content.js +1 -0
  13. package/containers/InfoBox/elements/Footer.d.ts +4 -1
  14. package/containers/InfoBox/elements/Footer.js +1 -0
  15. package/containers/InfoBox/elements/Header.d.ts +4 -1
  16. package/containers/InfoBox/elements/Header.js +2 -1
  17. package/containers/List/ListCell.d.ts +4 -1
  18. package/containers/List/ListCell.js +2 -1
  19. package/containers/List/ListRow.d.ts +4 -1
  20. package/containers/List/ListRow.js +2 -1
  21. package/containers/Message/Error.d.ts +4 -1
  22. package/containers/Message/Error.js +1 -0
  23. package/containers/Message/Message.d.ts +13 -3
  24. package/containers/Message/Message.js +2 -1
  25. package/containers/Message/NoData.d.ts +4 -1
  26. package/containers/Message/NoData.js +1 -0
  27. package/containers/Message/NoFilteredData.d.ts +4 -1
  28. package/containers/Message/NoFilteredData.js +1 -0
  29. package/controls/Chip/Chip.d.ts +7 -4
  30. package/controls/Chip/Chip.js +12 -12
  31. package/controls/Dropzone/Dropzone.d.ts +14 -10
  32. package/controls/Dropzone/Dropzone.js +88 -20
  33. package/controls/Fab/Fab.d.ts +7 -5
  34. package/controls/Fab/Fab.js +19 -18
  35. package/controls/FilterButton/FilterButton.d.ts +4 -5
  36. package/controls/FilterButton/FilterButton.js +11 -16
  37. package/controls/Gradient/Gradient.d.ts +8 -2
  38. package/controls/Gradient/Gradient.js +32 -6
  39. package/controls/Gradient/PresetGradients.d.ts +11 -4
  40. package/controls/Gradient/PresetGradients.js +7 -0
  41. package/controls/Icon/Icon.d.ts +7 -4
  42. package/controls/Icon/Icon.js +6 -5
  43. package/controls/Key/Key.d.ts +5 -2
  44. package/controls/Key/Key.js +36 -35
  45. package/controls/LinearChart/LinearChart.d.ts +4 -1
  46. package/controls/LinearChart/LinearChart.js +3 -2
  47. package/controls/ListView/ColumnsManager/ColumnsManager.js +1 -1
  48. package/controls/ListView/ListView.d.ts +2 -1
  49. package/controls/ListView/ListView.js +6 -5
  50. package/controls/ListView/NoData.d.ts +4 -1
  51. package/controls/ListView/NoData.js +1 -0
  52. package/controls/ListView/{Body.d.ts → elements/Body.d.ts} +2 -2
  53. package/controls/ListView/{Body.js → elements/Body.js} +1 -1
  54. package/controls/ListView/elements/Ghost.d.ts +12 -0
  55. package/controls/ListView/{Ghost.js → elements/Ghost.js} +4 -3
  56. package/controls/ListView/{Header.d.ts → elements/Header.d.ts} +2 -2
  57. package/controls/ListView/{Header.js → elements/Header.js} +3 -14
  58. package/controls/ListView/{HeaderButton.d.ts → elements/HeaderButton.d.ts} +4 -1
  59. package/controls/ListView/{HeaderButton.js → elements/HeaderButton.js} +1 -1
  60. package/controls/ListView/{HeaderCell.d.ts → elements/HeaderCell.d.ts} +7 -4
  61. package/controls/ListView/{HeaderCell.js → elements/HeaderCell.js} +5 -3
  62. package/controls/ListView/{SortButton.d.ts → elements/SortButton.d.ts} +1 -1
  63. package/controls/ListView/elements/SortButton.js +27 -0
  64. package/controls/ListView/{Table.d.ts → elements/Table.d.ts} +6 -3
  65. package/controls/ListView/{Table.js → elements/Table.js} +5 -4
  66. package/controls/ListView/{Total.d.ts → elements/Total.d.ts} +5 -1
  67. package/controls/ListView/{Total.js → elements/Total.js} +2 -1
  68. package/controls/Mouse/Mouse.d.ts +8 -3
  69. package/controls/Mouse/Mouse.js +21 -7
  70. package/controls/PrimaryButton/PrimaryButton.d.ts +6 -2
  71. package/controls/PrimaryButton/PrimaryButton.js +14 -9
  72. package/controls/Progress/Progress.d.ts +22 -6
  73. package/controls/Progress/Progress.js +38 -7
  74. package/controls/SecondaryButton/SecondaryButton.d.ts +12 -5
  75. package/controls/SecondaryButton/SecondaryButton.js +29 -19
  76. package/controls/TabBar/Tab.js +1 -1
  77. package/controls/TabBar/TabBar.d.ts +15 -4
  78. package/controls/TabBar/TabBar.js +105 -10
  79. package/controls/TabBar/Underliner.js +2 -1
  80. package/controls/TertiaryButton/TertiaryButton.d.ts +4 -1
  81. package/controls/TertiaryButton/TertiaryButton.js +3 -8
  82. package/controls/View/EllipsizedContent.d.ts +4 -1
  83. package/controls/View/EllipsizedContent.js +14 -1
  84. package/controls/View/ScrollingContent.d.ts +4 -1
  85. package/controls/View/ScrollingContent.js +14 -1
  86. package/controls/View/View.d.ts +6 -1
  87. package/controls/View/View.js +5 -4
  88. package/formatters/DateTime/DateTime.d.ts +46 -8
  89. package/formatters/DateTime/DateTime.js +14 -10
  90. package/formatters/DateTime/elements/Custom.d.ts +6 -17
  91. package/formatters/DateTime/elements/Custom.js +1 -0
  92. package/formatters/DateTime/elements/DistanceDate.d.ts +14 -0
  93. package/formatters/DateTime/elements/{Distance.js → DistanceDate.js} +1 -0
  94. package/formatters/DateTime/elements/LongDate.d.ts +23 -13
  95. package/formatters/DateTime/elements/LongDate.js +31 -5
  96. package/formatters/DateTime/elements/LongDateTime.d.ts +29 -13
  97. package/formatters/DateTime/elements/LongDateTime.js +28 -1
  98. package/formatters/DateTime/elements/LongTime.d.ts +25 -13
  99. package/formatters/DateTime/elements/LongTime.js +23 -1
  100. package/formatters/DateTime/elements/ShortDate.d.ts +27 -13
  101. package/formatters/DateTime/elements/ShortDate.js +28 -1
  102. package/formatters/DateTime/elements/ShortDateTime.d.ts +27 -13
  103. package/formatters/DateTime/elements/ShortDateTime.js +28 -1
  104. package/formatters/DateTime/elements/ShortTime.d.ts +13 -12
  105. package/formatters/DateTime/elements/ShortTime.js +19 -5
  106. package/formatters/DateTime/elements/index.d.ts +8 -0
  107. package/formatters/DateTime/elements/index.js +8 -0
  108. package/formatters/Filesize/Filesize.d.ts +23 -14
  109. package/formatters/Filesize/Filesize.js +33 -42
  110. package/formatters/GIS/Latitude.d.ts +11 -5
  111. package/formatters/GIS/Latitude.js +26 -3
  112. package/formatters/GIS/Longitude.d.ts +9 -5
  113. package/formatters/GIS/Longitude.js +24 -3
  114. package/formatters/Highlight/Highlight.d.ts +21 -6
  115. package/formatters/Highlight/Highlight.js +37 -19
  116. package/formatters/Human/Human.d.ts +18 -7
  117. package/formatters/Human/Human.js +17 -25
  118. package/formatters/Number/Number.d.ts +10 -2
  119. package/formatters/Number/Number.js +13 -7
  120. package/helper/DMS.d.ts +44 -6
  121. package/helper/DMS.js +86 -24
  122. package/package.json +1 -1
  123. package/controls/Dropzone/Dropbox.d.ts +0 -19
  124. package/controls/Dropzone/Dropbox.js +0 -47
  125. package/controls/ListView/Ghost.d.ts +0 -9
  126. package/controls/ListView/SortButton.js +0 -26
  127. package/formatters/DateTime/elements/Distance.d.ts +0 -24
  128. package/formatters/GIS/toDMS.d.ts +0 -2
  129. package/formatters/GIS/toDMS.js +0 -16
  130. /package/controls/ListView/{sortItems.d.ts → elements/sortItems.d.ts} +0 -0
  131. /package/controls/ListView/{sortItems.js → elements/sortItems.js} +0 -0
@@ -11,17 +11,17 @@ interface IProps {
11
11
  bordered?: boolean;
12
12
  /**
13
13
  * Dock offset from top of map, in pixels.
14
- * @default 20
14
+ * @default 8
15
15
  */
16
16
  top?: number;
17
17
  /**
18
18
  * Dock offset from bottom of map, in pixels.
19
- * @default 20
19
+ * @default 8
20
20
  */
21
21
  bottom?: number;
22
22
  /**
23
23
  * Dock offset from right side of map, in pixels.
24
- * @default 20
24
+ * @default 8
25
25
  */
26
26
  right?: number;
27
27
  /**
@@ -41,5 +41,8 @@ interface IProps {
41
41
  * When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
42
42
  * absolute positioning on the map and do not stick to the Dock.
43
43
  */
44
- declare const Dock: ({ bordered, top, bottom, right, gap, ...props }: IProps) => React.JSX.Element;
44
+ declare const Dock: {
45
+ ({ bordered, top, bottom, right, gap, ...props }: IProps): React.JSX.Element;
46
+ displayName: string;
47
+ };
45
48
  export { Dock };
@@ -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 DockBase = function (props) {
30
- return React.createElement("div", { className: props.className }, props.children);
30
+ return React.createElement("div", { className: props.className, "aria-hidden": "true", role: "presentation" }, props.children);
31
31
  };
32
32
  var DockStyled = styled(DockBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"], ["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"
33
33
  /**
@@ -57,5 +57,6 @@ var Dock = function (_a) {
57
57
  var _b = _a.bordered, bordered = _b === void 0 ? false : _b, _c = _a.top, top = _c === void 0 ? 8 : _c, _d = _a.bottom, bottom = _d === void 0 ? 8 : _d, _e = _a.right, right = _e === void 0 ? 8 : _e, _f = _a.gap, gap = _f === void 0 ? 16 : _f, props = __rest(_a, ["bordered", "top", "bottom", "right", "gap"]);
58
58
  return React.createElement(DockStyled, __assign({ bordered: bordered, top: top, bottom: bottom, right: right, gap: gap }, props));
59
59
  };
60
+ Dock.displayName = "Dock";
60
61
  export { Dock };
61
62
  var templateObject_1, templateObject_2;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- interface IDockableProps {
2
+ interface IProps {
3
3
  /** @ignore */
4
4
  className?: string;
5
5
  /** @ignore */
@@ -48,6 +48,14 @@ interface IDockableProps {
48
48
  * @default false
49
49
  */
50
50
  fill?: boolean | number;
51
+ /**
52
+ * Forgiving area around map center were Dockable doesn't immediately swap
53
+ * sides (in pixels).
54
+ * This is useful for preventing flickering when the Dockable is close to
55
+ * the center of the map.
56
+ * @default 60
57
+ */
58
+ hysteresis?: number;
51
59
  }
52
60
  /**
53
61
  * A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
@@ -56,5 +64,8 @@ interface IDockableProps {
56
64
  *
57
65
  * When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
58
66
  */
59
- declare const Dockable: ({ longitude, latitude, offsetX, offsetY, swappable, alwaysDocked, zIndex, ...props }: IDockableProps) => React.JSX.Element;
60
- export { Dockable, IDockableProps };
67
+ declare const Dockable: {
68
+ ({ longitude, latitude, offsetX, offsetY, swappable, alwaysDocked, zIndex, hysteresis, ...props }: IProps): React.JSX.Element;
69
+ displayName: string;
70
+ };
71
+ export { Dockable, IProps as IDockableProps };
@@ -29,8 +29,9 @@ import { useMap } from 'react-map-gl/mapbox';
29
29
  import styled, { css } from 'styled-components';
30
30
  import { useViewState } from '../../map/Map';
31
31
  var DockableBase = function (props) {
32
+ var _a, _b, _c, _d;
32
33
  // Reference to Dockable div:
33
- var _a = React.useState(null), containerRef = _a[0], setContainerRef = _a[1];
34
+ var containerRef = React.useRef(null);
34
35
  // Using the ViewState will cause this component to be rerendered when the
35
36
  // map moves:
36
37
  useViewState();
@@ -39,20 +40,49 @@ var DockableBase = function (props) {
39
40
  var mapWidth = map.current.getContainer().clientWidth;
40
41
  var mapHeight = map.current.getContainer().clientHeight;
41
42
  // Convert Dockable's lat/lng to pixel coordinates:
42
- var _b = map.current.project([props.longitude, props.latitude]), x = _b.x, y = _b.y;
43
+ var _e = map.current.project([props.longitude, props.latitude]), x = _e.x, y = _e.y;
43
44
  // Get size of Dockable:
44
- var myWidth = containerRef ? containerRef.clientWidth : 0;
45
- var myHeight = containerRef ? containerRef.clientHeight : 0;
45
+ var myWidth = (_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
46
+ var myHeight = (_d = (_c = containerRef.current) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
46
47
  // Is Dockable currently offscreen (boolean)?
47
48
  var offsetX = props.offsetX;
48
49
  var offsetY = props.offsetY;
49
- var offscreen = props.alwaysDocked
50
- || x + offsetX < 0
51
- || y + offsetY < 0
52
- || x + offsetX + myWidth + (props.swappable ? -myWidth - offsetX * 2 : 0) > mapWidth
53
- || y + offsetY + myHeight > mapHeight;
54
- var rightHalf = x > mapWidth / 2;
55
- var bottomHalf = y > mapHeight / 2; // TODO: Future use for vertical swappable.
50
+ var swapHorizontally = props.swappable === 'horizontal' || props.swappable === 'both';
51
+ var swapVertically = props.swappable === 'vertical' || props.swappable === 'both';
52
+ var possibleXs = swapHorizontally
53
+ ? [x + offsetX, x + offsetX - myWidth - offsetX * 2]
54
+ : [x + offsetX];
55
+ var possibleYs = swapVertically
56
+ ? [y + offsetY, y + offsetY - myHeight - offsetY * 2]
57
+ : [y + offsetY];
58
+ var isOffscreenX = possibleXs.every(function (posX) { return posX < 0 || posX + myWidth > mapWidth; });
59
+ var isOffscreenY = possibleYs.every(function (posY) { return posY < 0 || posY + myHeight > mapHeight; });
60
+ var offscreen = props.alwaysDocked || isOffscreenX || isOffscreenY;
61
+ // Horizontal hysteresis logic:
62
+ var wasRightRef = React.useRef(x > mapWidth / 2);
63
+ var wasBottomRef = React.useRef(y > mapHeight / 2);
64
+ // Horizontal hysteresis:
65
+ React.useEffect(function () {
66
+ var center = mapWidth / 2;
67
+ if (x > center + props.hysteresis) {
68
+ wasRightRef.current = true;
69
+ }
70
+ else if (x < center - props.hysteresis) {
71
+ wasRightRef.current = false;
72
+ }
73
+ }, [x, mapWidth]);
74
+ // Vertical hysteresis:
75
+ React.useEffect(function () {
76
+ var center = mapHeight / 2;
77
+ if (y > center + props.hysteresis) {
78
+ wasBottomRef.current = true;
79
+ }
80
+ else if (y < center - props.hysteresis) {
81
+ wasBottomRef.current = false;
82
+ }
83
+ }, [y, mapHeight]);
84
+ var rightHalf = wasRightRef.current;
85
+ var bottomHalf = wasBottomRef.current;
56
86
  // A local style object is used rather than styled-components, because the
57
87
  // style changes constantly and would produce too many styled-components
58
88
  // classes.
@@ -73,7 +103,7 @@ var DockableBase = function (props) {
73
103
  style.left = "".concat(x + offsetX, "px");
74
104
  style.top = "".concat(y + offsetY, "px");
75
105
  }
76
- return (React.createElement("div", { style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: setContainerRef }, props.children));
106
+ return (React.createElement("div", { style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: containerRef }, props.children));
77
107
  };
78
108
  var DockableStyled = styled(DockableBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: white;\n z-index: ", ";\n ", "\n"], ["\n color: white;\n z-index: ", ";\n ", "\n"
79
109
  /**
@@ -92,8 +122,9 @@ var DockableStyled = styled(DockableBase)(templateObject_4 || (templateObject_4
92
122
  * When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
93
123
  */
94
124
  var Dockable = function (_a) {
95
- var _b = _a.longitude, longitude = _b === void 0 ? 0 : _b, _c = _a.latitude, latitude = _c === void 0 ? 0 : _c, _d = _a.offsetX, offsetX = _d === void 0 ? 0 : _d, _e = _a.offsetY, offsetY = _e === void 0 ? 0 : _e, _f = _a.swappable, swappable = _f === void 0 ? 'none' : _f, _g = _a.alwaysDocked, alwaysDocked = _g === void 0 ? false : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 0 : _h, props = __rest(_a, ["longitude", "latitude", "offsetX", "offsetY", "swappable", "alwaysDocked", "zIndex"]);
96
- return React.createElement(DockableStyled, __assign({ longitude: longitude, latitude: latitude, offsetX: offsetX, offsetY: offsetY, swappable: swappable, alwaysDocked: alwaysDocked, zIndex: zIndex }, props));
125
+ var _b = _a.longitude, longitude = _b === void 0 ? 0 : _b, _c = _a.latitude, latitude = _c === void 0 ? 0 : _c, _d = _a.offsetX, offsetX = _d === void 0 ? 0 : _d, _e = _a.offsetY, offsetY = _e === void 0 ? 0 : _e, _f = _a.swappable, swappable = _f === void 0 ? 'none' : _f, _g = _a.alwaysDocked, alwaysDocked = _g === void 0 ? false : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 0 : _h, _j = _a.hysteresis, hysteresis = _j === void 0 ? 60 : _j, props = __rest(_a, ["longitude", "latitude", "offsetX", "offsetY", "swappable", "alwaysDocked", "zIndex", "hysteresis"]);
126
+ return React.createElement(DockableStyled, __assign({ longitude: longitude, latitude: latitude, offsetX: offsetX, offsetY: offsetY, swappable: swappable, alwaysDocked: alwaysDocked, zIndex: zIndex, hysteresis: hysteresis }, props));
97
127
  };
128
+ Dockable.displayName = 'Dockable';
98
129
  export { Dockable };
99
130
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -37,5 +37,8 @@ interface IProps {
37
37
  * A `DragBar` fills all horizontal space available to it. Its `height` is
38
38
  * set in pixels.
39
39
  */
40
- declare const DragBar: ({ height, navigation, navigationDelta, behavior, ...props }: IProps) => React.JSX.Element;
40
+ declare const DragBar: {
41
+ ({ height, navigation, navigationDelta, behavior, ...props }: IProps): React.JSX.Element;
42
+ displayName: string;
43
+ };
41
44
  export { DragBar };
@@ -115,5 +115,6 @@ var DragBar = function (_a) {
115
115
  var _b = _a.height, height = _b === void 0 ? 40 : _b, _c = _a.navigation, navigation = _c === void 0 ? false : _c, _d = _a.navigationDelta, navigationDelta = _d === void 0 ? 100 : _d, _e = _a.behavior, behavior = _e === void 0 ? 'smooth' : _e, props = __rest(_a, ["height", "navigation", "navigationDelta", "behavior"]);
116
116
  return React.createElement(DragBarStyled, __assign({ height: height, navigation: navigation, navigationDelta: navigationDelta, behavior: behavior }, props));
117
117
  };
118
+ DragBar.displayName = "DragBar";
118
119
  export { DragBar };
119
120
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -5,17 +5,17 @@ interface IProps {
5
5
  /** @ignore */
6
6
  children?: React.ReactNode;
7
7
  /**
8
- * If set, adds a shiny border.
8
+ * If set, adds a shiny border around the component.
9
9
  * @default false
10
10
  */
11
11
  bordered?: boolean;
12
12
  /**
13
- * If set, adds 16px of inner padding.
13
+ * If set, adds 16px of inner padding to the pane.
14
14
  * @default false
15
15
  */
16
16
  padded?: boolean;
17
17
  /**
18
- * If set, animates on mount.
18
+ * If true, fades in and blurs smoothly on mount via a CSS transition.
19
19
  * @default false
20
20
  */
21
21
  animated?: boolean;
@@ -28,9 +28,21 @@ interface IProps {
28
28
  * * Width is unset; glass panel will fill its container.
29
29
  * * Height is content-dependent. The panel will `flex:1`, though.
30
30
  *
31
+ * ### Props
32
+ * - `bordered`: Adds a shiny border.
33
+ * - `padded`: Adds 16px of inner padding.
34
+ * - `animated`: Animates on mount.
35
+ *
31
36
  * By default, there is no internal padding (though some can be added with `padded`). The panel's
32
37
  * content is expected to set its own padding.
33
38
  *
39
+ * @example
40
+ * <GlassPane bordered padded animated>
41
+ * <Content />
42
+ * </GlassPane>*
34
43
  */
35
- declare const GlassPane: ({ bordered, padded, animated, ...props }: IProps) => React.JSX.Element;
44
+ declare const GlassPane: {
45
+ ({ bordered, padded, animated, ...props }: IProps): React.JSX.Element;
46
+ displayName: string;
47
+ };
36
48
  export { GlassPane, IProps };
@@ -25,14 +25,28 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import * as React from 'react';
28
- import styled, { css, keyframes } from 'styled-components';
29
- var GlassPaneBase = function (props) {
30
- return React.createElement("div", { className: props.className }, props.children);
31
- };
28
+ import styled, { css } from 'styled-components';
29
+ var GlassPaneBase = React.memo(function (props) {
30
+ // Keep track of whether the component has mounted. Non-animated panels
31
+ // are instantly mounted; animated panels are mounted after 1 tick so that
32
+ // a CSS transition will run.
33
+ var _a = React.useState(props.animated ? false : true), mounted = _a[0], setMounted = _a[1];
34
+ // If animation is requested, then set the class "mounted" on the component
35
+ // after the component has mounted. This will trigger the animation.
36
+ React.useEffect(function () {
37
+ if (props.animated) {
38
+ var timeout_1 = window.requestAnimationFrame(function () { return setMounted(true); });
39
+ return function () { return window.cancelAnimationFrame(timeout_1); };
40
+ }
41
+ else {
42
+ return function () { };
43
+ }
44
+ }, [props.animated]);
45
+ return (React.createElement("div", { className: "".concat(props.className, " ").concat(mounted ? 'mounted' : '') }, props.children));
46
+ });
32
47
  var GRADIENT_0 = "rgb(255,255,255,0.6)";
33
48
  var GRADIENT_1 = "rgb(255,255,255,0.3)";
34
- var Anim = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n opacity: 0;\n backdrop-filter: contrast(130%) brightness(120%) blur(0);\n }\n 100% {\n opacity: 1;\n backdrop-filter: contrast(130%) brightness(120%) blur(3px);\n }\n"], ["\n 0% {\n opacity: 0;\n backdrop-filter: contrast(130%) brightness(120%) blur(0);\n }\n 100% {\n opacity: 1;\n backdrop-filter: contrast(130%) brightness(120%) blur(3px);\n }\n"])));
35
- var GlassPaneStyled = styled(GlassPaneBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n z-index: 1;\n flex: 1;\n ", ";\n display: flex;\n flex-direction: column;\n\n // Content:\n overflow: hidden;\n\n ", "\n\n // Appearance:\n backdrop-filter: contrast(130%) brightness(120%) blur(5px);\n color: ", ";\n box-shadow: ", ";\n\n background:\n // Adds a light source:\n 0 0/300% 100% radial-gradient(\n ellipse at 16.7% -10%,\n hsla(0, 0%, 100%, 0.44) 24%,\n hsla(0, 0%, 100%, 0.4) 25%,\n hsla(0, 0%, 100%, 0.2) 45%,\n hsla(0, 0%, 100%, 0.1)\n ) padding-box,\n // General milky background:\n linear-gradient(rgb(128 128 128 / 60%), rgb(128 128 128 / 60%)) padding-box,\n // Border gradient:\n linear-gradient(to top right, ", ", ", ", ", ") border-box;\n\n border-radius: ", "px;\n border: solid ", "px transparent;\n"], ["\n // Position and size:\n position: relative;\n z-index: 1;\n flex: 1;\n ", ";\n display: flex;\n flex-direction: column;\n\n // Content:\n overflow: hidden;\n\n ", "\n\n // Appearance:\n backdrop-filter: contrast(130%) brightness(120%) blur(5px);\n color: ", ";\n box-shadow: ", ";\n\n background:\n // Adds a light source:\n 0 0/300% 100% radial-gradient(\n ellipse at 16.7% -10%,\n hsla(0, 0%, 100%, 0.44) 24%,\n hsla(0, 0%, 100%, 0.4) 25%,\n hsla(0, 0%, 100%, 0.2) 45%,\n hsla(0, 0%, 100%, 0.1)\n ) padding-box,\n // General milky background:\n linear-gradient(rgb(128 128 128 / 60%), rgb(128 128 128 / 60%)) padding-box,\n // Border gradient:\n linear-gradient(to top right, ", ", ", ", ", ") border-box;\n\n border-radius: ", "px;\n border: solid ", "px transparent;\n"
49
+ var GlassPaneStyled = styled(GlassPaneBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n z-index: 1;\n flex: 1;\n ", ";\n display: flex;\n flex-direction: column;\n\n // Content:\n overflow: hidden;\n\n // Appearance:\n transition: opacity 500ms ease, backdrop-filter 500ms ease;\n opacity: 0;\n backdrop-filter: contrast(130%) brightness(120%) blur(0);\n color: ", ";\n box-shadow: ", ";\n\n &.mounted {\n opacity: 1;\n backdrop-filter: contrast(130%) brightness(120%) blur(3px);\n }\n\n background:\n // Adds a light source:\n 0 0/300% 100% radial-gradient(\n ellipse at 16.7% -10%,\n hsla(0, 0%, 100%, 0.44) 24%,\n hsla(0, 0%, 100%, 0.4) 25%,\n hsla(0, 0%, 100%, 0.2) 45%,\n hsla(0, 0%, 100%, 0.1)\n ) padding-box,\n // General milky background:\n linear-gradient(rgb(128 128 128 / 60%), rgb(128 128 128 / 60%)) padding-box,\n // Border gradient:\n linear-gradient(to top right, ", ", ", ", ", ") border-box;\n\n border-radius: ", "px;\n border: solid ", "px transparent;\n"], ["\n // Position and size:\n position: relative;\n z-index: 1;\n flex: 1;\n ", ";\n display: flex;\n flex-direction: column;\n\n // Content:\n overflow: hidden;\n\n // Appearance:\n transition: opacity 500ms ease, backdrop-filter 500ms ease;\n opacity: 0;\n backdrop-filter: contrast(130%) brightness(120%) blur(0);\n color: ", ";\n box-shadow: ", ";\n\n &.mounted {\n opacity: 1;\n backdrop-filter: contrast(130%) brightness(120%) blur(3px);\n }\n\n background:\n // Adds a light source:\n 0 0/300% 100% radial-gradient(\n ellipse at 16.7% -10%,\n hsla(0, 0%, 100%, 0.44) 24%,\n hsla(0, 0%, 100%, 0.4) 25%,\n hsla(0, 0%, 100%, 0.2) 45%,\n hsla(0, 0%, 100%, 0.1)\n ) padding-box,\n // General milky background:\n linear-gradient(rgb(128 128 128 / 60%), rgb(128 128 128 / 60%)) padding-box,\n // Border gradient:\n linear-gradient(to top right, ", ", ", ", ", ") border-box;\n\n border-radius: ", "px;\n border: solid ", "px transparent;\n"
36
50
  /**
37
51
  * A `GlassPane` is used over a colorful background, like a map.
38
52
  *
@@ -41,11 +55,20 @@ var GlassPaneStyled = styled(GlassPaneBase)(templateObject_4 || (templateObject_
41
55
  * * Width is unset; glass panel will fill its container.
42
56
  * * Height is content-dependent. The panel will `flex:1`, though.
43
57
  *
58
+ * ### Props
59
+ * - `bordered`: Adds a shiny border.
60
+ * - `padded`: Adds 16px of inner padding.
61
+ * - `animated`: Animates on mount.
62
+ *
44
63
  * By default, there is no internal padding (though some can be added with `padded`). The panel's
45
64
  * content is expected to set its own padding.
46
65
  *
66
+ * @example
67
+ * <GlassPane bordered padded animated>
68
+ * <Content />
69
+ * </GlassPane>*
47
70
  */
48
- ])), function (p) { return p.padded && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["padding: 15px;"], ["padding: 15px;"]))); }, function (p) { return p.animated && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n animation: ", " 500ms forwards;\n "], ["\n animation: ", " 500ms forwards;\n "])), Anim); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.shadows.medium; }, GRADIENT_0, GRADIENT_1, GRADIENT_0, function (p) { return p.theme.radius.normal; }, function (p) { return p.bordered ? 1 : 0; });
71
+ ])), function (p) { return p.padded && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["padding: 15px;"], ["padding: 15px;"]))); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.shadows.medium; }, GRADIENT_0, GRADIENT_1, GRADIENT_0, function (p) { return p.theme.radius.normal; }, function (p) { return p.bordered ? 1 : 0; });
49
72
  /**
50
73
  * A `GlassPane` is used over a colorful background, like a map.
51
74
  *
@@ -54,13 +77,23 @@ var GlassPaneStyled = styled(GlassPaneBase)(templateObject_4 || (templateObject_
54
77
  * * Width is unset; glass panel will fill its container.
55
78
  * * Height is content-dependent. The panel will `flex:1`, though.
56
79
  *
80
+ * ### Props
81
+ * - `bordered`: Adds a shiny border.
82
+ * - `padded`: Adds 16px of inner padding.
83
+ * - `animated`: Animates on mount.
84
+ *
57
85
  * By default, there is no internal padding (though some can be added with `padded`). The panel's
58
86
  * content is expected to set its own padding.
59
87
  *
88
+ * @example
89
+ * <GlassPane bordered padded animated>
90
+ * <Content />
91
+ * </GlassPane>*
60
92
  */
61
93
  var GlassPane = function (_a) {
62
94
  var _b = _a.bordered, bordered = _b === void 0 ? false : _b, _c = _a.padded, padded = _c === void 0 ? false : _c, _d = _a.animated, animated = _d === void 0 ? false : _d, props = __rest(_a, ["bordered", "padded", "animated"]);
63
95
  return React.createElement(GlassPaneStyled, __assign({ bordered: bordered, padded: padded, animated: animated }, props));
64
96
  };
97
+ GlassPane.displayName = "GlassPane";
65
98
  export { GlassPane };
66
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
99
+ var templateObject_1, templateObject_2;
@@ -17,7 +17,7 @@ interface IProps {
17
17
  */
18
18
  minHeight?: number;
19
19
  /**
20
- * Add padding to content?
20
+ * If set, adds padding to content.
21
21
  * @default false
22
22
  */
23
23
  padded?: boolean;
@@ -37,5 +37,26 @@ interface IProps {
37
37
  */
38
38
  scroll?: boolean;
39
39
  }
40
- declare const InfoBox: ({ width, minHeight, padded, scroll, ...props }: IProps) => React.JSX.Element;
40
+ /**
41
+ * `InfoBox` is a layout container that presents structured content inside a
42
+ * glass-like pane. It optionally includes a header and footer, and can
43
+ * support scrollable content areas.
44
+ *
45
+ * ### Features
46
+ * - Width control via `width` prop.
47
+ * - Optional header/footer injection.
48
+ * - Internal scroll support for use in flexible layouts.
49
+ * - Optional padding for inner content.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <InfoBox header="Title" footer={<Actions />} scroll padded>
54
+ * <p>This is a scrollable info panel</p>
55
+ * </InfoBox>
56
+ * ```
57
+ */
58
+ declare const InfoBox: {
59
+ ({ width, minHeight, padded, scroll, ...props }: IProps): React.JSX.Element;
60
+ displayName: string;
61
+ };
41
62
  export { InfoBox, IProps };
@@ -32,14 +32,52 @@ import { Footer } from './elements/Footer';
32
32
  * An `InfoBox` is a glass pane with an optional header and footer.
33
33
  */
34
34
  var InfoBoxBase = function (props) {
35
- return React.createElement("div", { className: props.className },
35
+ return React.createElement("div", { className: props.className, role: "region", "aria-label": "Information" },
36
36
  React.createElement(Content, { header: props.header, padded: props.padded, minHeight: props.minHeight, scroll: props.scroll }, props.children),
37
37
  props.footer && React.createElement(Footer, null, props.footer));
38
38
  };
39
- var InfoBoxStyled = styled(InfoBoxBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n width: ", "px;\n // Will flex if in flex-container:\n flex: 1;\n\n // Behavior:\n user-select: none;\n pointer-events: none; // Avoid pointer-events in spaces between footer buttons.\n\n // Content:\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: start;\n"], ["\n // Position and size:\n position: relative;\n width: ", "px;\n // Will flex if in flex-container:\n flex: 1;\n\n // Behavior:\n user-select: none;\n pointer-events: none; // Avoid pointer-events in spaces between footer buttons.\n\n // Content:\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: start;\n"])), function (p) { return p.width; });
39
+ var InfoBoxStyled = styled(InfoBoxBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n width: ", "px;\n // Will flex if in flex-container:\n flex: 1;\n\n // Behavior:\n user-select: none;\n pointer-events: none; // Avoid pointer-events in spaces between footer buttons.\n\n // Content:\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: start;\n"], ["\n // Position and size:\n position: relative;\n width: ", "px;\n // Will flex if in flex-container:\n flex: 1;\n\n // Behavior:\n user-select: none;\n pointer-events: none; // Avoid pointer-events in spaces between footer buttons.\n\n // Content:\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: start;\n"
40
+ /**
41
+ * `InfoBox` is a layout container that presents structured content inside a
42
+ * glass-like pane. It optionally includes a header and footer, and can
43
+ * support scrollable content areas.
44
+ *
45
+ * ### Features
46
+ * - Width control via `width` prop.
47
+ * - Optional header/footer injection.
48
+ * - Internal scroll support for use in flexible layouts.
49
+ * - Optional padding for inner content.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <InfoBox header="Title" footer={<Actions />} scroll padded>
54
+ * <p>This is a scrollable info panel</p>
55
+ * </InfoBox>
56
+ * ```
57
+ */
58
+ ])), function (p) { return p.width; });
59
+ /**
60
+ * `InfoBox` is a layout container that presents structured content inside a
61
+ * glass-like pane. It optionally includes a header and footer, and can
62
+ * support scrollable content areas.
63
+ *
64
+ * ### Features
65
+ * - Width control via `width` prop.
66
+ * - Optional header/footer injection.
67
+ * - Internal scroll support for use in flexible layouts.
68
+ * - Optional padding for inner content.
69
+ *
70
+ * @example
71
+ * ```tsx
72
+ * <InfoBox header="Title" footer={<Actions />} scroll padded>
73
+ * <p>This is a scrollable info panel</p>
74
+ * </InfoBox>
75
+ * ```
76
+ */
40
77
  var InfoBox = function (_a) {
41
78
  var _b = _a.width, width = _b === void 0 ? 360 : _b, _c = _a.minHeight, minHeight = _c === void 0 ? 0 : _c, _d = _a.padded, padded = _d === void 0 ? false : _d, _e = _a.scroll, scroll = _e === void 0 ? false : _e, props = __rest(_a, ["width", "minHeight", "padded", "scroll"]);
42
79
  return React.createElement(InfoBoxStyled, __assign({ width: width, minHeight: minHeight, padded: padded, scroll: scroll }, props));
43
80
  };
81
+ InfoBox.displayName = "InfoBox";
44
82
  export { InfoBox };
45
83
  var templateObject_1;
@@ -23,5 +23,8 @@ interface IProps {
23
23
  /**
24
24
  * InfoBox.Content fills up all vertical space it can get.
25
25
  */
26
- declare const Content: (props: IProps) => React.JSX.Element;
26
+ declare const Content: {
27
+ (props: IProps): React.JSX.Element;
28
+ displayName: string;
29
+ };
27
30
  export { Content, IProps };
@@ -44,5 +44,6 @@ var ContentStyled = styled(ContentBase)(templateObject_4 || (templateObject_4 =
44
44
  * InfoBox.Content fills up all vertical space it can get.
45
45
  */
46
46
  var Content = function (props) { return React.createElement(ContentStyled, __assign({}, props)); };
47
+ Content.displayName = "InfoBox.Content";
47
48
  export { Content };
48
49
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -5,5 +5,8 @@ interface IProps {
5
5
  /** @ignore */
6
6
  children?: React.ReactNode;
7
7
  }
8
- declare const Footer: (props: IProps) => React.JSX.Element;
8
+ declare const Footer: {
9
+ (props: IProps): React.JSX.Element;
10
+ displayName: string;
11
+ };
9
12
  export { Footer, IProps };
@@ -20,5 +20,6 @@ var FooterBase = function (props) {
20
20
  };
21
21
  var FooterStyled = styled(FooterBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n width: 100%;\n padding-top: 8px;\n padding-left: 16px;\n padding-right: 16px;\n box-sizing: border-box;\n \n // Appearance;\n color: ", ";\n font: ", ";\n\n // Content:\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 16px;\n\n // While InfoBox blocks all pointer events, contents inside\n // the footer must receive events:\n & > * {\n pointer-events: all;\n }\n"], ["\n // Position and size:\n position: relative;\n width: 100%;\n padding-top: 8px;\n padding-left: 16px;\n padding-right: 16px;\n box-sizing: border-box;\n \n // Appearance;\n color: ", ";\n font: ", ";\n\n // Content:\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 16px;\n\n // While InfoBox blocks all pointer events, contents inside\n // the footer must receive events:\n & > * {\n pointer-events: all;\n }\n"])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.bodyMedium; });
22
22
  var Footer = function (props) { return React.createElement(FooterStyled, __assign({}, props)); };
23
+ Footer.displayName = "InfoBox.Footer";
23
24
  export { Footer };
24
25
  var templateObject_1;
@@ -5,5 +5,8 @@ interface IProps {
5
5
  /** @ignore */
6
6
  children?: React.ReactNode;
7
7
  }
8
- declare const Header: (props: IProps) => React.JSX.Element;
8
+ declare const Header: {
9
+ (props: IProps): React.JSX.Element;
10
+ displayName: string;
11
+ };
9
12
  export { Header, IProps };
@@ -18,7 +18,8 @@ import styled from "styled-components";
18
18
  var HeaderBase = function (props) {
19
19
  return React.createElement("div", { className: props.className }, props.children);
20
20
  };
21
- var HeaderStyled = styled(HeaderBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n //background: rgb(from #1E242A r g b / 80%);\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"], ["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n //background: rgb(from #1E242A r g b / 80%);\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.headingMedium; });
21
+ var HeaderStyled = styled(HeaderBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"], ["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.headingMedium; });
22
22
  var Header = function (props) { return React.createElement(HeaderStyled, __assign({}, props)); };
23
+ Header.displayName = "InfoBox.Header";
23
24
  export { Header };
24
25
  var templateObject_1;
@@ -9,5 +9,8 @@ interface IProps {
9
9
  /** Text alignment. Defaults to 'left'. */
10
10
  align?: 'left' | 'right';
11
11
  }
12
- declare const ListCell: (props: IProps) => React.JSX.Element;
12
+ declare const ListCell: {
13
+ (props: IProps): React.JSX.Element;
14
+ displayName: string;
15
+ };
13
16
  export { ListCell };
@@ -18,7 +18,8 @@ import styled, { css } from 'styled-components';
18
18
  var ListCellBase = function (props) {
19
19
  return React.createElement("div", { className: props.className }, props.children);
20
20
  };
21
- var ListCellStyled = styled(ListCellBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) { return p.width && typeof p.width === 'string' && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["width: ", ""], ["width: ", ""])), p.width); }, function (p) { return p.width && typeof p.width !== 'string' && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["flex: ", ""], ["flex: ", ""])), p.width); }, function (p) { return !p.width && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["flex: 1;"], ["flex: 1;"]))); }, function (p) { return p.align === 'right' ? 'right' : 'left'; });
21
+ var ListCellStyled = styled(ListCellBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) { return p.width && typeof p.width === 'string' && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["width: ", ";"], ["width: ", ";"])), p.width); }, function (p) { return p.width && typeof p.width !== 'string' && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["flex: ", ";"], ["flex: ", ";"])), p.width); }, function (p) { return !p.width && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["flex: 1;"], ["flex: 1;"]))); }, function (p) { return p.align === 'right' ? 'right' : 'left'; });
22
22
  var ListCell = function (props) { return React.createElement(ListCellStyled, __assign({}, props)); };
23
+ ListCell.displayName = "ListCell";
23
24
  export { ListCell };
24
25
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -11,5 +11,8 @@ interface IProps {
11
11
  /** Triggered when row is clicked. */
12
12
  onClick?: (e?: React.MouseEvent) => void;
13
13
  }
14
- declare const ListRow: (props: IProps) => React.JSX.Element;
14
+ declare const ListRow: {
15
+ (props: IProps): React.JSX.Element;
16
+ displayName: string;
17
+ };
15
18
  export { ListRow };
@@ -16,9 +16,10 @@ var __assign = (this && this.__assign) || function () {
16
16
  import * as React from 'react';
17
17
  import styled, { css } from 'styled-components';
18
18
  var ListRowBase = function (props) {
19
- return (React.createElement("div", { className: props.className, onClick: function (e) { return props.onClick(e); } }, props.children));
19
+ return React.createElement("div", { className: props.className, onClick: function (e) { return props.onClick(e); } }, props.children);
20
20
  };
21
21
  var ListRowStyled = styled(ListRowBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-left: 16px;\n padding-right: 16px;\n min-height: 42px;\n user-select: none;\n outline: none;\n color: ", ";\n\n // Entire row is clickable:\n cursor: ", ";\n\n // Cells are flex-aligned:\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: ", "px;\n\n // Background color on hover:\n &:hover {\n background-color: ", ";\n }\n\n // Background color on pressed:\n ", "\n\n ", "\n"], ["\n padding-left: 16px;\n padding-right: 16px;\n min-height: 42px;\n user-select: none;\n outline: none;\n color: ", ";\n\n // Entire row is clickable:\n cursor: ", ";\n\n // Cells are flex-aligned:\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: ", "px;\n\n // Background color on hover:\n &:hover {\n background-color: ", ";\n }\n\n // Background color on pressed:\n ", "\n\n ", "\n"])), function (p) { return p.theme.colors.neutral[30]; }, function (p) { return p.onClick ? 'pointer' : 'auto'; }, function (p) { return p.gap; }, function (p) { return p.theme.colors.neutral[95]; }, function (p) { return p.onClick && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:active {\n background-color: rgb(from ", " r g b / 65%) !important;\n color: ", ";\n }\n "], ["\n &:active {\n background-color: rgb(from ", " r g b / 65%) !important;\n color: ", ";\n }\n "])), function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; }); }, function (p) { return p.active && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: rgb(from ", " r g b / 45%) !important;\n color: ", ";\n "], ["\n background-color: rgb(from ", " r g b / 45%) !important;\n color: ", ";\n "])), function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; }); });
22
22
  var ListRow = function (props) { return React.createElement(ListRowStyled, __assign({}, props)); };
23
+ ListRow.displayName = "ListRow";
23
24
  export { ListRow };
24
25
  var templateObject_1, templateObject_2, templateObject_3;
@@ -7,5 +7,8 @@ interface IProps {
7
7
  /** If set, add a margin around the message box. */
8
8
  margin?: boolean;
9
9
  }
10
- declare const Error: (props: IProps) => React.JSX.Element;
10
+ declare const Error: {
11
+ (props: IProps): React.JSX.Element;
12
+ displayName: string;
13
+ };
11
14
  export { Error, IProps };
@@ -6,4 +6,5 @@ var Error = function (props) {
6
6
  return React.createElement(Message, { margin: props.margin }, (_a = props.children) !== null && _a !== void 0 ? _a : "An error occurred.",
7
7
  props.onRetry && React.createElement(TertiaryButton, { onClick: props.onRetry }, "RETRY"));
8
8
  };
9
+ Error.displayName = "Message.Error";
9
10
  export { Error };
@@ -19,17 +19,27 @@ declare const Message: {
19
19
  * filter is currently active. This Message offers no actions for the user
20
20
  * to take.
21
21
  */
22
- NoData: (props: import("./NoData").IProps) => React.JSX.Element;
22
+ NoData: {
23
+ (props: import("./NoData").IProps): React.JSX.Element;
24
+ displayName: string;
25
+ };
23
26
  /**
24
27
  * A `NoFilteredData` `Message` should be used when a filter is active, and
25
28
  * this may be the cause of a lack of data. Optionally a button can be shown
26
29
  * to clear the filter.
27
30
  */
28
- NoFilteredData: (props: import("./NoFilteredData").IProps) => React.JSX.Element;
31
+ NoFilteredData: {
32
+ (props: import("./NoFilteredData").IProps): React.JSX.Element;
33
+ displayName: string;
34
+ };
29
35
  /**
30
36
  * An `Error` `Message` should be shown when there was an error retrieving
31
37
  * data from the server. A `Retry` button can optionally be shown.
32
38
  */
33
- Error: (props: import("./Error").IProps) => React.JSX.Element;
39
+ Error: {
40
+ (props: import("./Error").IProps): React.JSX.Element;
41
+ displayName: string;
42
+ };
43
+ displayName: string;
34
44
  };
35
45
  export { Message };
@@ -27,7 +27,7 @@ var MessageStyled = styled(MessageBase)(templateObject_1 || (templateObject_1 =
27
27
  * has occurred: a list is empty, or an error occurred. A `Message` ideally
28
28
  * includes a button with an action to resolve the situation.
29
29
  */
30
- ])), function (p) { return p.margin ? '32px' : 0; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.primary[5]; });
30
+ ])), function (p) { return "".concat(p.margin ? 32 : 0, "px"); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.primary[5]; });
31
31
  /**
32
32
  * A `Message` is used to communicate to the user that something unusual
33
33
  * has occurred: a list is empty, or an error occurred. A `Message` ideally
@@ -51,5 +51,6 @@ Message.NoFilteredData = NoFilteredData;
51
51
  * data from the server. A `Retry` button can optionally be shown.
52
52
  */
53
53
  Message.Error = Error;
54
+ Message.displayName = "Message";
54
55
  export { Message };
55
56
  var templateObject_1;
@@ -5,5 +5,8 @@ interface IProps {
5
5
  /** If set, add a margin around the message box. */
6
6
  margin?: boolean;
7
7
  }
8
- declare const NoData: (props: IProps) => React.JSX.Element;
8
+ declare const NoData: {
9
+ (props: IProps): React.JSX.Element;
10
+ displayName: string;
11
+ };
9
12
  export { NoData, IProps };
@@ -4,4 +4,5 @@ var NoData = function (props) {
4
4
  var _a;
5
5
  return React.createElement(Message, { margin: props.margin }, (_a = props.children) !== null && _a !== void 0 ? _a : "There are no records yet.");
6
6
  };
7
+ NoData.displayName = "Message.NoData";
7
8
  export { NoData };