@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
@@ -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", { className: props.className, onClick: handleClick, focusable: "false" },
39
+ return (React.createElement("svg", { 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
  };
@@ -44,10 +44,10 @@ var rotate = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObj
44
44
  var IconStyled = styled(IconBase).attrs(function (p) {
45
45
  var _a, _b;
46
46
  return ({
47
- realSize: typeof p.size === 'number' ? "".concat(p.size, "px") : "".concat(scaleSize((_a = p.size) !== null && _a !== void 0 ? _a : 'medium', 1, 'minorThird'), "em"),
48
- color: (_b = p.color) !== null && _b !== void 0 ? _b : p.theme.colors.neutral[100]
47
+ $realSize: typeof p.size === 'number' ? "".concat(p.size, "px") : "".concat(scaleSize((_a = p.size) !== null && _a !== void 0 ? _a : 'medium', 1, 'minorThird'), "em"),
48
+ $color: (_b = p.$color) !== null && _b !== void 0 ? _b : p.theme.colors.neutral[100]
49
49
  });
50
- })(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n ", "\n ", "\n ", "\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"], ["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n ", "\n ", "\n ", "\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"])), function (p) { return p.circle && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 50%;\n border: solid 1px ", ";\n "], ["\n border-radius: 50%;\n border: solid 1px ", ";\n "])), p.color); }, function (p) { return p.padded && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["margin: 2px;"], ["margin: 2px;"]))); }, function (p) { return p.onClick && !p.disabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["cursor: pointer;"], ["cursor: pointer;"]))); }, function (p) { return p.disabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n pointer-events: none;\n opacity: 0.6;\n "], ["\n pointer-events: none;\n opacity: 0.6;\n "]))); }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.flipped && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["scale: 1 -1;"], ["scale: 1 -1;"]))); }, function (p) { return p.mirrored && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["scale: -1 1;"], ["scale: -1 1;"]))); }, function (p) { return p.rotated && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["rotate: ", "deg;"], ["rotate: ", "deg;"])), p.rotated); }, function (p) { return p.color; }, function (p) { return p.onClick && css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "], ["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "])), function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, lighten(0.3, p.color), lighten(0.3, p.color)); }, function (p) { return p.animated && css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n animation: ", " 2s linear infinite;\n "], ["\n animation: ", " 2s linear infinite;\n "])), rotate); });
50
+ })(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n transform: ", " ", " ", ";\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"], ["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n transform: ", " ", " ", ";\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"])), function (p) { return p.circle && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 50%;\n border: solid 1px ", ";\n "], ["\n border-radius: 50%;\n border: solid 1px ", ";\n "])), p.color); }, function (p) { return p.padded && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["margin: 2px;"], ["margin: 2px;"]))); }, function (p) { return p.onClick && !p.disabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["cursor: pointer;"], ["cursor: pointer;"]))); }, function (p) { return p.disabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n pointer-events: none;\n opacity: 0.6;\n "], ["\n pointer-events: none;\n opacity: 0.6;\n "]))); }, function (p) { return p.$realSize; }, function (p) { return p.$realSize; }, function (p) { return p.$realSize; }, function (p) { return p.$realSize; }, function (p) { return p.flipped ? 'scaleY(-1)' : ''; }, function (p) { return p.mirrored ? 'scaleX(-1)' : ''; }, function (p) { return p.rotated ? "rotate(".concat(p.rotated, "deg)") : ''; }, function (p) { return p.color; }, function (p) { return p.onClick && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "], ["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "])), function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, lighten(0.3, p.color), lighten(0.3, p.color)); }, function (p) { return p.animated && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n animation: ", " 2s linear infinite;\n "], ["\n animation: ", " 2s linear infinite;\n "])), rotate); });
51
51
  /**
52
52
  * Displays an icon. An `Icon` is an SVG symbol taken from a sprite sheet,
53
53
  * with an URL of the form `spritesheet.svg#my-icon`.
@@ -75,5 +75,6 @@ var Icon = function (_a) {
75
75
  var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.flipped, flipped = _d === void 0 ? false : _d, _e = _a.mirrored, mirrored = _e === void 0 ? false : _e, _f = _a.animated, animated = _f === void 0 ? false : _f, _g = _a.padded, padded = _g === void 0 ? false : _g, _h = _a.circle, circle = _h === void 0 ? false : _h, props = __rest(_a, ["size", "disabled", "flipped", "mirrored", "animated", "padded", "circle"]);
76
76
  return React.createElement(IconStyled, __assign({ size: size, disabled: disabled, flipped: flipped, mirrored: mirrored, animated: animated, padded: padded, circle: circle }, props));
77
77
  };
78
+ Icon.displayName = "Icon";
78
79
  export { IconBase, Icon, IconStyled };
79
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
80
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -14,9 +14,12 @@ interface IProps {
14
14
  }
15
15
  /**
16
16
  * A `Key` displays a keyboard key. The value is the key description,
17
- * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
17
+ * e.g. `Ctrl` or `Alt`. A key is 16x16px square, unless the key description
18
18
  * is longer than 1 character, in which case the width becomes 36px.
19
19
  * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
20
20
  */
21
- declare const Key: (props: IProps) => React.JSX.Element;
21
+ declare const Key: {
22
+ (props: IProps): React.JSX.Element;
23
+ displayName: string;
24
+ };
22
25
  export { Key };
@@ -19,56 +19,57 @@ import { Icon } from '../Icon';
19
19
  import { SVG } from '../../svg';
20
20
  var KeyBase = function (props) {
21
21
  var isMac = navigator.userAgent.includes('Mac') || props._fakeMac;
22
- var symbol = props.value;
23
- var wide = false;
24
- // Key replacement:
25
- switch (props.value) {
26
- case 'Ctrl':
27
- // On a Mac, the Ctrl key becomes a Mac symbol.
28
- if (isMac) {
29
- symbol = React.createElement(Icon, { url: SVG.Icons.Cmd });
30
- }
31
- else {
32
- wide = true;
33
- }
34
- break;
35
- case 'ArrowUp':
36
- symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: -90 });
37
- break;
38
- case 'ArrowDown':
39
- symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 90 });
40
- break;
41
- case 'ArrowRight':
42
- symbol = React.createElement(Icon, { url: SVG.Icons.Arrow });
43
- break;
44
- case 'ArrowLeft':
45
- symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 180 });
46
- break;
47
- default:
48
- if (props.value.length > 1)
49
- wide = true;
50
- }
22
+ // symbol and wide depend only on isMac and props.value, so we memoize them:
23
+ var _a = React.useMemo(function () {
24
+ var sym = props.value;
25
+ var isWide = false;
26
+ switch (props.value) {
27
+ case 'Ctrl':
28
+ if (isMac)
29
+ sym = React.createElement(Icon, { url: SVG.Icons.Cmd });
30
+ else
31
+ isWide = true;
32
+ break;
33
+ case 'ArrowUp':
34
+ sym = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: -90 });
35
+ break;
36
+ case 'ArrowDown':
37
+ sym = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 90 });
38
+ break;
39
+ case 'ArrowRight':
40
+ sym = React.createElement(Icon, { url: SVG.Icons.Arrow });
41
+ break;
42
+ case 'ArrowLeft':
43
+ sym = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 180 });
44
+ break;
45
+ default:
46
+ if (props.value.length > 1)
47
+ isWide = true;
48
+ }
49
+ return { symbol: sym, wide: isWide };
50
+ }, [props.value, isMac]), symbol = _a.symbol, wide = _a.wide;
51
51
  return (React.createElement("span", { className: props.className, style: {
52
52
  maxWidth: wide ? 'auto' : '16px',
53
53
  minWidth: wide ? '36px' : 'auto'
54
- } },
55
- React.createElement(Inner, { style: { justifyContent: wide ? 'start' : 'center' } }, symbol)));
54
+ }, "aria-label": props.value },
55
+ React.createElement(Inner, { style: { justifyContent: wide ? 'flex-start' : 'center' } }, symbol)));
56
56
  };
57
57
  var Inner = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n"])));
58
- var KeyStyled = styled(KeyBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n color: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"], ["\n display: inline-block;\n color: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"
58
+ var KeyStyled = styled(KeyBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n color: ", ";\n fill: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"], ["\n display: inline-block;\n color: ", ";\n fill: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"
59
59
  /**
60
60
  * A `Key` displays a keyboard key. The value is the key description,
61
- * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
61
+ * e.g. `Ctrl` or `Alt`. A key is 16x16px square, unless the key description
62
62
  * is longer than 1 character, in which case the width becomes 36px.
63
63
  * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
64
64
  */
65
- ])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.font.labelSmall; });
65
+ ])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.font.labelSmall; });
66
66
  /**
67
67
  * A `Key` displays a keyboard key. The value is the key description,
68
- * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
68
+ * e.g. `Ctrl` or `Alt`. A key is 16x16px square, unless the key description
69
69
  * is longer than 1 character, in which case the width becomes 36px.
70
70
  * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
71
71
  */
72
72
  var Key = function (props) { return React.createElement(KeyStyled, __assign({}, props)); };
73
+ Key.displayName = "Key";
73
74
  export { Key };
74
75
  var templateObject_1, templateObject_2;
@@ -27,5 +27,8 @@ interface IProps {
27
27
  * The `LinearChart` will fill all horizontal space available to it.
28
28
  * A percentage value and a text label are optional.
29
29
  */
30
- declare const LinearChart: ({ numbered, ...props }: IProps) => React.JSX.Element;
30
+ declare const LinearChart: {
31
+ ({ numbered, ...props }: IProps): React.JSX.Element;
32
+ displayName: string;
33
+ };
31
34
  export { LinearChart, IProps };
@@ -28,12 +28,12 @@ import * as React from 'react';
28
28
  import styled from 'styled-components';
29
29
  var LinearChartBase = function (props) {
30
30
  var percentage = Math.round(Math.max(0, Math.min(100, props.value))) + "%";
31
- return (React.createElement("div", { className: props.className },
31
+ return (React.createElement("div", { className: props.className, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(props.value) },
32
32
  props.label && React.createElement(Label, null, props.label),
33
33
  props.numbered && React.createElement(Number, null, percentage),
34
34
  React.createElement(Bar, null)));
35
35
  };
36
- var Label = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"], ["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"])));
36
+ var Label = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n"], ["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n"])));
37
37
  var Number = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"], ["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"])));
38
38
  var Bar = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"], ["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"])), function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.animation.duration * 2; });
39
39
  var LinearChartStyled = styled(LinearChartBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n min-width: 200px;\n user-select: none;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n min-width: 200px;\n user-select: none;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"
@@ -54,5 +54,6 @@ var LinearChart = function (_a) {
54
54
  var _b = _a.numbered, numbered = _b === void 0 ? false : _b, props = __rest(_a, ["numbered"]);
55
55
  return React.createElement(LinearChartStyled, __assign({ numbered: numbered }, props));
56
56
  };
57
+ LinearChart.displayName = "LinearChart";
57
58
  export { LinearChart };
58
59
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -51,7 +51,7 @@ var ColumnsManagerBase = function (props) {
51
51
  React.createElement(Header, null, "Available columns"),
52
52
  React.createElement(Header, null,
53
53
  "Selected columns ",
54
- React.createElement(SecondaryButton, { icon: SVG.Icons.Reset, onClick: props.onReset })),
54
+ React.createElement(SecondaryButton, { title: "Reset", icon: SVG.Icons.Reset, onClick: props.onReset })),
55
55
  React.createElement(SourceColumns, { columns: props.columns, onChange: props.onChange }),
56
56
  React.createElement(OrderColumns, { columns: props.columns, onChange: props.onChange, onReset: props.onReset })))));
57
57
  };
@@ -11,7 +11,8 @@ interface IProps extends IListViewProps {
11
11
  children?: React.ReactElement<IColumnProps> | React.ReactElement<IColumnProps>[];
12
12
  }
13
13
  declare const ListView: {
14
- ({ dark, noheader, hover, striped, grid, total, singular, plural, narrow, shadow, ghost, rowHeight, columnsEditable, expanded, focusActive, ...props }: IProps): React.JSX.Element;
14
+ ({ data, dark, noheader, hover, striped, grid, total, singular, plural, narrow, shadow, ghost, rowHeight, columnsEditable, expanded, focusActive, ...props }: IProps): React.JSX.Element;
15
+ displayName: string;
15
16
  Column: {
16
17
  (_: IColumnProps): null;
17
18
  displayName: string;
@@ -31,9 +31,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
31
31
  };
32
32
  import * as React from 'react';
33
33
  import { Column } from './Column';
34
- import { Table } from './Table';
35
- import { sortItems } from './sortItems';
36
- import { Ghost } from './Ghost';
34
+ import { Table } from './elements/Table';
35
+ import { sortItems } from './elements/sortItems';
36
+ import { Ghost } from './elements/Ghost';
37
37
  var ListViewBase = function (props) {
38
38
  var _a, _b;
39
39
  var children = props.children, otherProps = __rest(props, ["children"]);
@@ -99,8 +99,9 @@ var ListViewBase = function (props) {
99
99
  };
100
100
  // Wrapper for default values:
101
101
  var ListView = function (_a) {
102
- var _b = _a.dark, dark = _b === void 0 ? false : _b, _c = _a.noheader, noheader = _c === void 0 ? false : _c, _d = _a.hover, hover = _d === void 0 ? false : _d, _e = _a.striped, striped = _e === void 0 ? false : _e, _f = _a.grid, grid = _f === void 0 ? false : _f, _g = _a.total, total = _g === void 0 ? false : _g, _h = _a.singular, singular = _h === void 0 ? "record" : _h, _j = _a.plural, plural = _j === void 0 ? "records" : _j, _k = _a.narrow, narrow = _k === void 0 ? false : _k, _l = _a.shadow, shadow = _l === void 0 ? false : _l, _m = _a.ghost, ghost = _m === void 0 ? false : _m, _o = _a.rowHeight, rowHeight = _o === void 0 ? 48 : _o, _p = _a.columnsEditable, columnsEditable = _p === void 0 ? false : _p, _q = _a.expanded, expanded = _q === void 0 ? false : _q, _r = _a.focusActive, focusActive = _r === void 0 ? false : _r, props = __rest(_a, ["dark", "noheader", "hover", "striped", "grid", "total", "singular", "plural", "narrow", "shadow", "ghost", "rowHeight", "columnsEditable", "expanded", "focusActive"]);
103
- return React.createElement(ListViewBase, __assign({ dark: dark, noheader: noheader, hover: hover, striped: striped, grid: grid, total: total, singular: singular, plural: plural, narrow: narrow, shadow: shadow, ghost: ghost, rowHeight: rowHeight, columnsEditable: columnsEditable, expanded: expanded, focusActive: focusActive }, props));
102
+ var _b = _a.data, data = _b === void 0 ? null : _b, _c = _a.dark, dark = _c === void 0 ? false : _c, _d = _a.noheader, noheader = _d === void 0 ? false : _d, _e = _a.hover, hover = _e === void 0 ? false : _e, _f = _a.striped, striped = _f === void 0 ? false : _f, _g = _a.grid, grid = _g === void 0 ? false : _g, _h = _a.total, total = _h === void 0 ? false : _h, _j = _a.singular, singular = _j === void 0 ? "record" : _j, _k = _a.plural, plural = _k === void 0 ? "records" : _k, _l = _a.narrow, narrow = _l === void 0 ? false : _l, _m = _a.shadow, shadow = _m === void 0 ? false : _m, _o = _a.ghost, ghost = _o === void 0 ? false : _o, _p = _a.rowHeight, rowHeight = _p === void 0 ? 48 : _p, _q = _a.columnsEditable, columnsEditable = _q === void 0 ? false : _q, _r = _a.expanded, expanded = _r === void 0 ? false : _r, _s = _a.focusActive, focusActive = _s === void 0 ? false : _s, props = __rest(_a, ["data", "dark", "noheader", "hover", "striped", "grid", "total", "singular", "plural", "narrow", "shadow", "ghost", "rowHeight", "columnsEditable", "expanded", "focusActive"]);
103
+ return React.createElement(ListViewBase, __assign({ data: data, dark: dark, noheader: noheader, hover: hover, striped: striped, grid: grid, total: total, singular: singular, plural: plural, narrow: narrow, shadow: shadow, ghost: ghost, rowHeight: rowHeight, columnsEditable: columnsEditable, expanded: expanded, focusActive: focusActive }, props));
104
104
  };
105
+ ListView.displayName = "ListView";
105
106
  ListView.Column = Column;
106
107
  export { ListView };
@@ -15,5 +15,8 @@ interface IProps {
15
15
  */
16
16
  dark?: boolean;
17
17
  }
18
- declare const NoData: (props: IProps) => React.JSX.Element;
18
+ declare const NoData: {
19
+ (props: IProps): React.JSX.Element;
20
+ displayName: string;
21
+ };
19
22
  export { NoData, IProps };
@@ -26,5 +26,6 @@ var NoDataBase = function (props) {
26
26
  };
27
27
  var NoDataStyled = styled(NoDataBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 48px; /* Height of header row */\n width: 100%;\n z-index: 1;\n"], ["\n position: absolute;\n top: 48px; /* Height of header row */\n width: 100%;\n z-index: 1;\n"])));
28
28
  var NoData = function (props) { return React.createElement(NoDataStyled, __assign({}, props)); };
29
+ NoData.displayName = "NoData";
29
30
  export { NoData };
30
31
  var templateObject_1;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { IListViewProps } from './IListViewProps';
3
- import { IColumnProps } from './Column';
2
+ import { IListViewProps } from '../IListViewProps';
3
+ import { IColumnProps } from '../Column';
4
4
  interface IProps extends IListViewProps {
5
5
  columns: IColumnProps[];
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Selector } from '../../inputs/Selector';
2
+ import { Selector } from '../../../inputs/Selector';
3
3
  var Body = React.forwardRef(function (props, ref) {
4
4
  var getRows = function () {
5
5
  var trs = [];
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { IListViewProps } from '../IListViewProps';
3
+ import { IColumnProps } from '../Column';
4
+ interface IProps extends IListViewProps {
5
+ className?: string;
6
+ columns: IColumnProps[];
7
+ }
8
+ declare const Ghost: {
9
+ (props: IProps): React.JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export { Ghost };
@@ -16,16 +16,16 @@ var __assign = (this && this.__assign) || function () {
16
16
  import * as React from 'react';
17
17
  import styled, { css, keyframes } from 'styled-components';
18
18
  var GhostBase = function (props) {
19
- return (React.createElement("div", { className: props.className },
19
+ return React.createElement("div", { className: props.className },
20
20
  React.createElement("div", { className: "mask1" }),
21
21
  React.createElement("div", { className: "mask2" }),
22
22
  !props.noheader && props.onCheck && React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": false }),
23
23
  !props.noheader && props.columns.filter(function (c) { return c.active; }).map(function (c, idx) { return React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": true, key: idx }); }),
24
- !props.noheader && props.columnsEditable && React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": false })));
24
+ !props.noheader && props.columnsEditable && React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": false }));
25
25
  };
26
26
  var Pulse = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n background-position-x: 0px;\n }\n 100% {\n background-position-x: 250px;\n }\n"], ["\n 0% {\n background-position-x: 0px;\n }\n 100% {\n background-position-x: 250px;\n }\n"])));
27
27
  var Pulse2 = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n background-position-x: 125px;\n }\n 50% {\n background-position-x: 250px; \n }\n 50.1% {\n background-position-x: 0px; \n } \n 100% {\n background-position-x: 125px;\n }\n"], ["\n 0% {\n background-position-x: 125px;\n }\n 50% {\n background-position-x: 250px; \n }\n 50.1% {\n background-position-x: 0px; \n } \n 100% {\n background-position-x: 125px;\n }\n"])));
28
- var Cell = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"], ["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"])), function (p) { return p.$dark ? p.theme.colors.primary[5] : p.theme.colors.neutral[100]; }, function (p) { return p.$dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]; }, function (p) { return p.$dark ? p.theme.colors.primary[4] : p.theme.colors.neutral[80]; }, function (p) { return p.$content ? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["right: 0;"], ["right: 0;"]))) : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["width:14px"], ["width:14px"]))); }, function (p) { return p.$shadow && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "], ["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "]))); });
28
+ var Cell = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"], ["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"])), function (p) { return p.$dark ? p.theme.colors.primary[5] : p.theme.colors.neutral[100]; }, function (p) { return p.$dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]; }, function (p) { return p.$dark ? p.theme.colors.primary[4] : p.theme.colors.neutral[80]; }, function (p) { return p.$content ? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["right: 0;"], ["right: 0;"]))) : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["width: 14px;"], ["width: 14px;"]))); }, function (p) { return p.$shadow && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "], ["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "]))); });
29
29
  var GhostStyled = styled(GhostBase).attrs(function (p) {
30
30
  return {
31
31
  fg: p.dark ? p.theme.colors.primary[1] : p.theme.colors.primary[1],
@@ -48,5 +48,6 @@ var GhostStyled = styled(GhostBase).attrs(function (p) {
48
48
  .join(" ");
49
49
  }, function (p) { return p.rowHeight; }, function (p) { return p.fg; }, function (p) { return p.bg; }, function (p) { return p.fg; }, function (p) { return p.rowHeight - 1; }, function (p) { return p.rowHeight - 1; }, function (p) { return p.rowHeight; }, function (p) { return p.rowHeight * 2; }, Pulse, function (p) { return p.fg; }, function (p) { return p.bg; }, function (p) { return p.fg; }, function (p) { return p.rowHeight * 2 - 1; }, function (p) { return p.rowHeight * 2; }, Pulse2);
50
50
  var Ghost = function (props) { return React.createElement(GhostStyled, __assign({}, props)); };
51
+ Ghost.displayName = "Ghost";
51
52
  export { Ghost };
52
53
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { IListViewProps } from './IListViewProps';
3
- import { IColumnProps } from './Column';
2
+ import { IListViewProps } from '../IListViewProps';
3
+ import { IColumnProps } from '../Column';
4
4
  interface IProps extends IListViewProps {
5
5
  columns: IColumnProps[];
6
6
  sort: string;
@@ -1,18 +1,7 @@
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
1
  import * as React from 'react';
13
2
  import { HeaderCell } from './HeaderCell';
14
- import { Selector } from '../../inputs/Selector';
15
- import { SVG } from '../../svg';
3
+ import { Selector } from '../../../inputs/Selector';
4
+ import { SVG } from '../../../svg';
16
5
  import { HeaderButton } from './HeaderButton';
17
6
  var Header = function (props) {
18
7
  // Are ALL items checked?
@@ -25,7 +14,7 @@ var Header = function (props) {
25
14
  props.onCheck &&
26
15
  React.createElement("th", null,
27
16
  React.createElement(Selector, { indeterminate: indeterminate, checked: allChecked, onChange: function () { return props.onCheck(allChecked ? false : true); } })),
28
- props.columns.map(function (col, index) { return React.createElement(HeaderCell, __assign({ key: index, column: col }, props)); }),
17
+ props.columns.map(function (col, index) { return React.createElement(HeaderCell, { key: index, column: col, sort: props.sort, reverse: props.reverse, dark: props.dark, onSortClick: props.onSortClick }); }),
29
18
  props.columnsEditable &&
30
19
  React.createElement("th", null,
31
20
  React.createElement(HeaderButton, { dark: props.dark, url: SVG.Icons.Columns, onClick: props.onOpenColumns })))));
@@ -1,8 +1,11 @@
1
1
  import * as React from 'react';
2
2
  interface IProps {
3
- onClick: () => void;
3
+ /** Icon URL. */
4
4
  url: string;
5
+ /** Dark theme? */
5
6
  dark: boolean;
7
+ /** Fired when button is clicked. */
8
+ onClick: () => void;
6
9
  }
7
10
  declare const HeaderButton: (props: IProps) => React.JSX.Element;
8
11
  export { HeaderButton };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useTheme } from 'styled-components';
3
- import { Icon } from '../Icon';
3
+ import { Icon } from '../../Icon';
4
4
  var HeaderButton = function (props) {
5
5
  var theme = useTheme();
6
6
  return (React.createElement(Icon, { url: props.url, onClick: props.onClick, color: props.dark ? theme.colors.neutral[100] : theme.colors.neutral[10] }));
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
- import { IColumnProps } from './Column';
3
- import { IListViewProps } from './IListViewProps';
4
- interface IProps extends IListViewProps {
2
+ import { IColumnProps } from '../Column';
3
+ interface IProps {
5
4
  /** @ignore */
6
5
  className?: string;
7
6
  /** Column properties */
8
7
  column: IColumnProps;
9
8
  sort: string;
10
9
  reverse: boolean;
10
+ dark?: boolean;
11
11
  /** Fired when column is clicked. */
12
12
  onSortClick: (column: IColumnProps) => void;
13
13
  }
@@ -16,5 +16,8 @@ interface IProps extends IListViewProps {
16
16
  * the column is sortable. In order to avoid creating many styled-components
17
17
  * classes, styling is mostly left to `Table`.
18
18
  */
19
- declare const HeaderCell: (props: IProps) => React.JSX.Element;
19
+ declare const HeaderCell: {
20
+ (props: IProps): React.JSX.Element;
21
+ displayName: string;
22
+ };
20
23
  export { HeaderCell };
@@ -25,13 +25,14 @@ var HeaderCellBase = function (props) {
25
25
  // Sortable column has pointer cursor:
26
26
  cursor: props.column.sort ? 'pointer' : 'auto'
27
27
  }, onClick: (props.column.sort && props.onSortClick) ? function () { return props.onSortClick(props.column); } : null },
28
- React.createElement("div", { style: { width: '100%' } }, (_a = props.column.label) !== null && _a !== void 0 ? _a : props.column.name),
28
+ React.createElement(Label, null, (_a = props.column.label) !== null && _a !== void 0 ? _a : props.column.name),
29
29
  props.column.sort && React.createElement(SortButton, { dark: props.dark, active: sorted,
30
30
  // If currently sorted, show sort direction.
31
31
  // If not currently sorted, show default sort direction.
32
32
  reverse: sorted ? props.reverse : props.column.reverse })));
33
33
  };
34
- var HeaderCellStyled = styled(HeaderCellBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:hover {\n ", " {\n opacity: 1 !important; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"], ["\n &:hover {\n ", " {\n opacity: 1 !important; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"
34
+ var Label = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
35
+ var HeaderCellStyled = styled(HeaderCellBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n &:hover {\n ", " {\n opacity: 1; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"], ["\n &:hover {\n ", " {\n opacity: 1; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"
35
36
  /**
36
37
  * `HeaderCell` wraps a <th>. It shows the column label, and a sort icon if
37
38
  * the column is sortable. In order to avoid creating many styled-components
@@ -44,5 +45,6 @@ var HeaderCellStyled = styled(HeaderCellBase)(templateObject_1 || (templateObjec
44
45
  * classes, styling is mostly left to `Table`.
45
46
  */
46
47
  var HeaderCell = function (props) { return React.createElement(HeaderCellStyled, __assign({}, props)); };
48
+ HeaderCell.displayName = "HeaderCell";
47
49
  export { HeaderCell };
48
- var templateObject_1;
50
+ var templateObject_1, templateObject_2;
@@ -12,5 +12,5 @@ interface IProps {
12
12
  * The SortButton displays a caret that rotates and lights up depending on
13
13
  * its active/reverse props.
14
14
  */
15
- declare const SortButton: 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>>;
15
+ declare const SortButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<IProps, IProps>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
16
16
  export { SortButton };
@@ -0,0 +1,27 @@
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, { keyframes } from 'styled-components';
7
+ var SortButtonBase = function (props) {
8
+ return React.createElement("button", { type: "button", className: props.className, "aria-label": "Sort list" },
9
+ React.createElement("svg", { viewBox: "0 0 100 100" },
10
+ React.createElement("path", { className: "bottom", d: "M9.5,77.9h81c4.3,0,8.1,3.3,8.1,7.2v6.1c0,3.9-3.8,7.2-8.1,7.2h-81c-4.3,0-8.1-3.3-8.1-7.2\r\n v-6.1C1.4,81.2,5.2,77.9,9.5,77.9z" }),
11
+ React.createElement("path", { className: "middle", d: "M9.5,39.5h52.9c4.3,0,8.1,3.3,8.1,7.2v6.1c0,3.9-3.8,7.2-8.1,7.2H9.5c-4.3,0-8.1-3.3-8.1-7.2\r\n v-6.1C1.4,42.9,5.2,39.5,9.5,39.5z" }),
12
+ React.createElement("path", { className: "top", d: "M10,1.1h24.8c4.9,0,8.6,3.3,8.6,7.2v6.1c0,3.9-3.8,7.2-8.6,7.2H10c-4.9,0-8.6-3.3-8.6-7.2V8.4\r\n C1.4,3.9,5.2,1.1,10,1.1z" })));
13
+ };
14
+ var SortIconAnimation = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n opacity: 1;\n }\n 40% {\n opacity: 0;\n }\n 60% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"], ["\n 0% {\n opacity: 1;\n }\n 40% {\n opacity: 0;\n }\n 60% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"
15
+ /**
16
+ * The SortButton displays a caret that rotates and lights up depending on
17
+ * its active/reverse props.
18
+ */
19
+ ])));
20
+ /**
21
+ * The SortButton displays a caret that rotates and lights up depending on
22
+ * its active/reverse props.
23
+ */
24
+ var SortButton = styled(SortButtonBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position:\n position: relative;\n display: flex; // Needed for SVG to be centered in div.\n width: 12px;\n height: 12px;\n\n // Appearance:\n border: none;\n background-color: transparent;\n padding: 0;\n margin: 0;\n cursor: pointer;\n transition: opacity ease-in-out 150ms,\n transform ease-in-out 150ms;\n transform: scaleY(", ");\n opacity: ", ";\n\n svg {\n transition: fill ease-in-out 150ms;\n fill: ", ";\n path.top, path.middle, path.bottom {\n transform-origin: 0 0;\n animation-name: ", ";\n // Animation duration is set by parent HeaderCell.\n animation-duration: 0s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n path.middle {\n animation-delay: 0.25s;\n }\n path.bottom {\n animation-delay: 0.5s;\n } \n }\n"], ["\n // Position:\n position: relative;\n display: flex; // Needed for SVG to be centered in div.\n width: 12px;\n height: 12px;\n\n // Appearance:\n border: none;\n background-color: transparent;\n padding: 0;\n margin: 0;\n cursor: pointer;\n transition: opacity ease-in-out 150ms,\n transform ease-in-out 150ms;\n transform: scaleY(", ");\n opacity: ", ";\n\n svg {\n transition: fill ease-in-out 150ms;\n fill: ", ";\n path.top, path.middle, path.bottom {\n transform-origin: 0 0;\n animation-name: ", ";\n // Animation duration is set by parent HeaderCell.\n animation-duration: 0s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n path.middle {\n animation-delay: 0.25s;\n }\n path.bottom {\n animation-delay: 0.5s;\n } \n }\n"])), function (p) { return p.reverse ? -1 : 1; }, function (p) { return p.active ? 1 : 0; }, function (p) { return p.dark ? p.theme.colors.primary[1] : p.theme.colors.neutral[10]; }, SortIconAnimation);
25
+ SortButton.displayName = "SortButton";
26
+ export { SortButton };
27
+ var templateObject_1, templateObject_2;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { IListViewProps } from './IListViewProps';
3
- import { IColumnProps } from './Column';
2
+ import { IListViewProps } from '../IListViewProps';
3
+ import { IColumnProps } from '../Column';
4
4
  interface IProps extends IListViewProps {
5
5
  /** @ignore */
6
6
  className?: string;
@@ -14,5 +14,8 @@ interface IProps extends IListViewProps {
14
14
  onCloseColumns: () => void;
15
15
  onResetColumns: () => void;
16
16
  }
17
- declare const Table: (props: IProps) => React.JSX.Element;
17
+ declare const Table: {
18
+ (props: IProps): React.JSX.Element;
19
+ displayName: string;
20
+ };
18
21
  export { Table };
@@ -30,11 +30,11 @@ import { usePopper } from 'react-popper';
30
30
  import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
31
31
  import { Header } from './Header';
32
32
  import { Body } from './Body';
33
- import { darken } from '../../helper/darken';
33
+ import { darken } from '../../../helper/darken';
34
34
  import { Total } from './Total';
35
- import { NoData } from './NoData';
36
- import { ColumnsManager } from './ColumnsManager/ColumnsManager';
37
- import { Anchor } from '../../containers/Anchor';
35
+ import { NoData } from '../NoData';
36
+ import { ColumnsManager } from '../ColumnsManager/ColumnsManager';
37
+ import { Anchor } from '../../../containers/Anchor';
38
38
  var HEADER_HEIGHT = 48;
39
39
  var TableBase = function (_a) {
40
40
  var className = _a.className, props = __rest(_a, ["className"]);
@@ -132,5 +132,6 @@ var TableStyled = styled(TableBase)(templateObject_9 || (templateObject_9 = __ma
132
132
  .join(" ");
133
133
  }, function (p) { return p.theme.font.bodyMedium; }, function (p) { return p.dark ? p.theme.colors.neutral[100] : p.theme.colors.neutral[10]; }, function (p) { return p.dark ? p.theme.colors.primary[3] : p.theme.colors.neutral[100]; }, function (p) { return p.hover && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n tr:hover td { background-color: ", "; }\n "], ["\n tr:hover td { background-color: ", "; }\n "])), p.dark ? p.theme.colors.primary[4] : p.theme.colors.neutral[95]); }, function (p) { return p.striped && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n tr:nth-child(2n+2) td {\n background-color: ", ";\n }\n "], ["\n tr:nth-child(2n+2) td {\n background-color: ", ";\n }\n "])), darken(0.02, p.dark ? p.theme.colors.primary[3] : p.theme.colors.neutral[100])); }, function (p) { return p.theme.animation.duration; }, function (p) { return p.dark ? p.theme.colors.primary[5] : p.theme.colors.neutral[100]; }, function (p) { return p.dark ? p.theme.colors.neutral[10] : p.theme.colors.neutral[95]; }, function (p) { return p.dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]; }, function (p) { return p.shadow && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "], ["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "]))); }, function (p) { return p.dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]; }, function (p) { var _a; return (_a = p.activeColor) !== null && _a !== void 0 ? _a : p.theme.colors.primary[1]; }, function (p) { return p.grid && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n td:not(:last-child), th:not(:last-child) {\n border-right: dashed 1px ", ";\n }\n "], ["\n td:not(:last-child), th:not(:last-child) {\n border-right: dashed 1px ", ";\n }\n "])), p.dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]); }, function (p) { return p.columnsEditable && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n th:last-child {\n &:hover {\n &:after { \n background-color: ", ";\n }\n }\n }\n th:nth-last-child(2), td:nth-last-child(2) {\n border-right: none;\n }\n "], ["\n th:last-child {\n &:hover {\n &:after { \n background-color: ", ";\n }\n }\n }\n th:nth-last-child(2), td:nth-last-child(2) {\n border-right: none;\n }\n "])), function (p) { return p.theme.colors.primary[2]; }); }, function (p) { return p.narrow && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n grid-template-columns: 1fr;\n tr th {\n display: none;\n } \n th, td:not(:last-child) {\n &:after {\n visibility: hidden;\n }\n }\n td {\n flex-direction: column;\n align-items: start;\n justify-content: center;\n }\n td span.label {\n font: ", ";\n }\n td:last-child {\n padding-right: 16px;\n }\n "], ["\n grid-template-columns: 1fr;\n tr th {\n display: none;\n } \n th, td:not(:last-child) {\n &:after {\n visibility: hidden;\n }\n }\n td {\n flex-direction: column;\n align-items: start;\n justify-content: center;\n }\n td span.label {\n font: ", ";\n }\n td:last-child {\n padding-right: 16px;\n }\n "])), function (p) { return p.theme.font.labelSmall; }); }, HEADER_HEIGHT);
134
134
  var Table = function (props) { return React.createElement(TableStyled, __assign({}, props)); };
135
+ Table.displayName = "Table";
135
136
  export { Table };
136
137
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
@@ -1,9 +1,13 @@
1
1
  import * as React from 'react';
2
2
  interface IProps {
3
+ /** @ignore */
3
4
  className?: string;
4
5
  value: number;
5
6
  singular?: React.ReactNode;
6
7
  plural?: React.ReactNode;
7
8
  }
8
- declare const Total: (props: IProps) => React.JSX.Element;
9
+ declare const Total: {
10
+ (props: IProps): React.JSX.Element;
11
+ displayName: string;
12
+ };
9
13
  export { Total };
@@ -15,7 +15,7 @@ var __assign = (this && this.__assign) || function () {
15
15
  };
16
16
  import * as React from 'react';
17
17
  import styled from 'styled-components';
18
- import { Number } from '../../formatters/Number';
18
+ import { Number } from '../../../formatters/Number';
19
19
  var TotalBase = function (props) {
20
20
  return React.createElement("div", { className: props.className },
21
21
  React.createElement(Number, { value: props.value, decimals: 0 }),
@@ -24,5 +24,6 @@ var TotalBase = function (props) {
24
24
  };
25
25
  var TotalStyled = styled(TotalBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position:\n position: absolute;\n z-index: 1;\n left: 8px;\n bottom: 8px;\n\n // Behavior:\n user-select: none;\n pointer-events: none;\n\n // Appearance:\n font: ", ";\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n padding: 5px 8px;\n"], ["\n // Position:\n position: absolute;\n z-index: 1;\n left: 8px;\n bottom: 8px;\n\n // Behavior:\n user-select: none;\n pointer-events: none;\n\n // Appearance:\n font: ", ";\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n padding: 5px 8px;\n"])), function (p) { return p.theme.font.labelSmall; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.colors.neutral[100]; });
26
26
  var Total = function (props) { return React.createElement(TotalStyled, __assign({}, props)); };
27
+ Total.displayName = "Total";
27
28
  export { Total };
28
29
  var templateObject_1;
@@ -31,8 +31,13 @@ interface IProps {
31
31
  size?: number;
32
32
  }
33
33
  /**
34
- * `Mouse` renders an SVG with a mouse image, optionally with its
35
- * `left`, `right` or `wheel` buttons pressed.
34
+ * `Mouse` Renders an SVG mouse shape with optional highlighting of the
35
+ * left, right, and wheel buttons.
36
+ *
37
+ * - `left`, `right`, `wheel`: Whether each button appears "pressed"
38
+ * - `color`: Main mouse fill color (defaults to theme neutral color)
39
+ * - `accent`: Fill color of the wheel (defaults to primary theme color)
40
+ * - `size`: Scales the mouse height in pixels
36
41
  */
37
- declare const Mouse: ({ left, right, wheel, ...props }: IProps) => React.JSX.Element;
42
+ declare const Mouse: React.MemoExoticComponent<({ left, right, wheel, ...props }: IProps) => React.JSX.Element>;
38
43
  export { Mouse };