@terraware/web-components 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/IconTooltip/index.d.ts +10 -0
- package/components/IconTooltip/index.d.ts.map +1 -0
- package/components/IconTooltip/index.js +69 -0
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +8 -0
- package/package.json +1 -1
- package/stories/IconTooltip.stories.d.ts +10 -0
- package/stories/IconTooltip.stories.d.ts.map +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
|
+
import { IconName } from '../Icon/icons';
|
|
4
|
+
export declare type IconTooltipProps = {
|
|
5
|
+
iconName?: IconName;
|
|
6
|
+
placement?: TooltipProps['placement'];
|
|
7
|
+
title: TooltipProps['title'];
|
|
8
|
+
};
|
|
9
|
+
export default function IconTooltip({ iconName, placement, title }: IconTooltipProps): JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconTooltip/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAkB,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAwBzC,oBAAY,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAiB,EAAE,SAAuB,EAAE,KAAK,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAsBxH"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = IconTooltip;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _material = require("@mui/material");
|
|
13
|
+
|
|
14
|
+
var _styles = require("@mui/styles");
|
|
15
|
+
|
|
16
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
17
|
+
|
|
18
|
+
var _utils = require("../../utils");
|
|
19
|
+
|
|
20
|
+
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
21
|
+
return {
|
|
22
|
+
arrow: {
|
|
23
|
+
color: theme.palette.ClrBaseGray800,
|
|
24
|
+
marginLeft: '3px',
|
|
25
|
+
marginTop: '-1px'
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
fill: theme.palette.ClrBaseGray800,
|
|
29
|
+
verticalAlign: 'text-top'
|
|
30
|
+
},
|
|
31
|
+
tooltip: {
|
|
32
|
+
backgroundColor: theme.palette.ClrBaseGray800,
|
|
33
|
+
borderRadius: '8px',
|
|
34
|
+
color: theme.palette.ClrBaseWhite,
|
|
35
|
+
padding: '8px',
|
|
36
|
+
'& a': {
|
|
37
|
+
color: theme.palette.ClrBaseWhite
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function IconTooltip(_ref) {
|
|
44
|
+
var _ref$iconName = _ref.iconName,
|
|
45
|
+
iconName = _ref$iconName === void 0 ? 'info' : _ref$iconName,
|
|
46
|
+
_ref$placement = _ref.placement,
|
|
47
|
+
placement = _ref$placement === void 0 ? 'top-start' : _ref$placement,
|
|
48
|
+
title = _ref.title;
|
|
49
|
+
|
|
50
|
+
var _useDeviceInfo = (0, _utils.useDeviceInfo)(),
|
|
51
|
+
isMobile = _useDeviceInfo.isMobile;
|
|
52
|
+
|
|
53
|
+
var classes = useStyles();
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
55
|
+
arrow: true,
|
|
56
|
+
classes: {
|
|
57
|
+
arrow: classes.arrow,
|
|
58
|
+
tooltip: classes.tooltip
|
|
59
|
+
},
|
|
60
|
+
placement: placement,
|
|
61
|
+
sx: {
|
|
62
|
+
maxWidth: isMobile ? '342px' : '464px'
|
|
63
|
+
},
|
|
64
|
+
title: title
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
66
|
+
name: iconName,
|
|
67
|
+
className: classes.icon
|
|
68
|
+
})));
|
|
69
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import Divisor from './components/Divisor';
|
|
|
7
7
|
import Dropdown, { DropdownV1 } from './components/Dropdown';
|
|
8
8
|
import ErrorBox from './components/ErrorBox/ErrorBox';
|
|
9
9
|
import Icon from './components/Icon/Icon';
|
|
10
|
+
import IconTooltip from './components/IconTooltip';
|
|
10
11
|
import icons from './components/Icon/icons';
|
|
11
12
|
import Navbar from './components/Navbar/Navbar';
|
|
12
13
|
import NavFooter from './components/Navbar/NavFooter';
|
|
@@ -29,5 +30,5 @@ import theme from './theme';
|
|
|
29
30
|
export type { IconName } from './components/Icon/icons/';
|
|
30
31
|
export type { Size } from './components/Size';
|
|
31
32
|
export type { EnhancedTableDetailsRow, RendererProps, TableColumnType, TableRowType, SortOrder };
|
|
32
|
-
export { Autocomplete, Button, CellRenderer, CellDateRenderer, Checkbox, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownV1, ErrorBox, getComparator, icons, Icon, Message, NavFooter, NavItem, NavSection, Navbar, Note, ProgressCircle, RadioButton, Select, SelectT, stableSort, SummaryBox, Svg, Textfield, Table, theme, };
|
|
33
|
+
export { Autocomplete, Button, CellRenderer, CellDateRenderer, Checkbox, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownV1, ErrorBox, getComparator, icons, Icon, IconTooltip, Message, NavFooter, NavItem, NavSection, Navbar, Note, ProgressCircle, RadioButton, Select, SelectT, stableSort, SummaryBox, Svg, Textfield, Table, theme, };
|
|
33
34
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAC5C,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,SAAS,MAAM,+BAA+B,CAAC;AACtD,OAAO,OAAO,MAAM,6BAA6B,CAAC;AAClD,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,cAAc,MAAM,4CAA4C,CAAC;AACxE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,OAAO,MAAM,6BAA6B,CAAC;AAElD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO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C;AAEjG,OAAO,EACL,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,cAAc,EACd,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,GAAG,EACH,SAAS,EACT,KAAK,EACL,KAAK,GACN,CAAC"}
|
package/index.js
CHANGED
|
@@ -65,6 +65,12 @@ Object.defineProperty(exports, "Icon", {
|
|
|
65
65
|
return _Icon.default;
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
+
Object.defineProperty(exports, "IconTooltip", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _IconTooltip.default;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
68
74
|
Object.defineProperty(exports, "icons", {
|
|
69
75
|
enumerable: true,
|
|
70
76
|
get: function get() {
|
|
@@ -205,6 +211,8 @@ var _ErrorBox = _interopRequireDefault(require("./components/ErrorBox/ErrorBox")
|
|
|
205
211
|
|
|
206
212
|
var _Icon = _interopRequireDefault(require("./components/Icon/Icon"));
|
|
207
213
|
|
|
214
|
+
var _IconTooltip = _interopRequireDefault(require("./components/IconTooltip"));
|
|
215
|
+
|
|
208
216
|
var _icons = _interopRequireDefault(require("./components/Icon/icons"));
|
|
209
217
|
|
|
210
218
|
var _Navbar = _interopRequireDefault(require("./components/Navbar/Navbar"));
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import IconTooltip, { IconTooltipProps } from '../components/IconTooltip';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof IconTooltip;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<IconTooltipProps>;
|
|
9
|
+
export declare const HTML: Story<IconTooltipProps>;
|
|
10
|
+
//# sourceMappingURL=IconTooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTooltip.stories.d.ts","sourceRoot":"","sources":["../../src/stories/IconTooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,WAAW,EAAE,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;;;;;AAE1E,wBAGE;AAMF,eAAO,MAAM,OAAO,yBAAoB,CAAC;AAOzC,eAAO,MAAM,IAAI,yBAAoB,CAAC"}
|