@beequip/hexagon 0.16.0-0 → 0.16.0-1

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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { IconProps } from '../../theme/types';
3
- export declare const InfoCircle: ({ width, ...rest }: IconProps) => JSX.Element;
3
+ export declare const InfoCircle: ({ width, color, text, id, ...rest }: IconProps) => JSX.Element;
@@ -4,11 +4,10 @@ exports.InfoCircle = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var React = require("react");
6
6
  var InfoCircle = function (_a) {
7
- var _b = _a.width, width = _b === void 0 ? '100%' : _b, rest = tslib_1.__rest(_a, ["width"]);
8
- return (React.createElement("svg", tslib_1.__assign({ width: width, height: "100%", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, rest),
9
- React.createElement("path", { d: "M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z" }),
10
- React.createElement("path", { d: "M11 11h2v6h-2zm0-4h2v2h-2z" }),
11
- ' '));
7
+ var _b = _a.width, width = _b === void 0 ? 21 : _b, color = _a.color, text = _a.text, id = _a.id, rest = tslib_1.__rest(_a, ["width", "color", "text", "id"]);
8
+ return (React.createElement("svg", tslib_1.__assign({ width: width, height: "100%", viewBox: "0 0 24 24", fill: "currentColor", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", "data-tip": text, "data-for": id }, rest),
9
+ React.createElement("path", { fill: color || 'currentColor', d: "M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z" }),
10
+ React.createElement("path", { fill: color || 'currentColor', d: "M11 11h2v6h-2zm0-4h2v2h-2z" })));
12
11
  };
13
12
  exports.InfoCircle = InfoCircle;
14
13
  //# sourceMappingURL=InfoCircle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoCircle.js","sourceRoot":"","sources":["../../../src/assets/icons/InfoCircle.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAGvB,IAAM,UAAU,GAAG,UAAC,EAAsC;IAApC,IAAA,aAAc,EAAd,KAAK,mBAAG,MAAM,KAAA,EAAK,IAAI,sBAAzB,SAA2B,CAAF;IAAkB,OAAA,CAClE,8CACI,KAAK,EAAE,KAAK,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,IAC9B,IAAI;QAER,8BAAM,CAAC,EAAC,wIAAwI,GAAG;QACnJ,8BAAM,CAAC,EAAC,4BAA4B,GAAG;QAAC,GAAG,CACzC,CACT,CAAA;CAAA,CAAA;AAZY,QAAA,UAAU,cAYtB"}
1
+ {"version":3,"file":"InfoCircle.js","sourceRoot":"","sources":["../../../src/assets/icons/InfoCircle.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAGvB,IAAM,UAAU,GAAG,UAAC,EAMf;IALR,IAAA,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,EAAE,QAAA,EACC,IAAI,sBALgB,gCAM1B,CADU;IACM,OAAA,CACb,8CACI,KAAK,EAAE,KAAK,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,4BAA4B,cACxB,IAAI,cACJ,EAAE,IACR,IAAI;QAER,8BACI,IAAI,EAAE,KAAK,IAAI,cAAc,EAC7B,CAAC,EAAC,wIAAwI,GACtI;QACR,8BACI,IAAI,EAAE,KAAK,IAAI,cAAc,EAC7B,CAAC,EAAC,4BAA4B,GAC1B,CACN,CACT,CAAA;CAAA,CAAA;AA5BY,QAAA,UAAU,cA4BtB"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface TooltipProps {
3
+ color?: string;
4
+ width?: number | string;
5
+ text: string;
6
+ style?: React.CSSProperties;
7
+ id?: string;
8
+ }
9
+ export declare const Tooltip: React.FC<TooltipProps>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tooltip = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var React = require("react");
6
+ var styles_1 = require("./styles");
7
+ var InfoCircle_1 = require("../../assets/icons/InfoCircle");
8
+ var Tooltip = function (_a) {
9
+ var id = _a.id, text = _a.text, color = _a.color, width = _a.width, style = _a.style, rest = tslib_1.__rest(_a, ["id", "text", "color", "width", "style"]);
10
+ return (React.createElement(styles_1.StyledContainer, tslib_1.__assign({}, rest),
11
+ React.createElement(styles_1.StyledTooltip, { "data-multiline": true, id: id }),
12
+ React.createElement(InfoCircle_1.InfoCircle, { style: style, "data-tip": text, id: id, color: color, width: width })));
13
+ };
14
+ exports.Tooltip = Tooltip;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAC9B,mCAAyD;AACzD,4DAA0D;AAUnD,IAAM,OAAO,GAA2B,UAAC,EAO/C;IANG,IAAA,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACL,KAAK,WAAA,EACF,IAAI,sBANqC,yCAO/C,CADU;IACL,OAAA,CACF,oBAAC,wBAAe,uBAAK,IAAI;QACrB,oBAAC,sBAAa,sBAAiB,IAAI,EAAE,EAAE,EAAE,EAAE,GAAI;QAC/C,oBAAC,uBAAU,IACP,KAAK,EAAE,KAAK,cACF,IAAI,EACd,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,GACd,CACY,CACrB,CAAA;CAAA,CAAA;AAlBY,QAAA,OAAO,WAkBnB"}
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react/types-6-0';
2
+ import { TooltipProps } from '.';
3
+ declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
4
+ export default _default;
5
+ export declare const Default: Story<TooltipProps>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Default = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = require("react");
6
+ var _1 = require(".");
7
+ exports.default = {
8
+ title: 'Hexagon/Tooltip',
9
+ component: _1.Tooltip,
10
+ decorators: [function (Story) { return react_1.default.createElement(Story, null); }],
11
+ };
12
+ var Template = function (_a) {
13
+ var args = tslib_1.__rest(_a, []);
14
+ return react_1.default.createElement(_1.Tooltip, tslib_1.__assign({}, args));
15
+ };
16
+ exports.Default = Template.bind({});
17
+ //# sourceMappingURL=index.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../src/components/Tooltip/index.stories.tsx"],"names":[],"mappings":";;;;AACA,+BAAyB;AACzB,sBAAyC;AAEzC,kBAAe;IACX,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAO;IAClB,UAAU,EAAE,CAAC,UAAA,KAAK,IAAI,OAAA,8BAAC,KAAK,OAAG,EAAT,CAAS,CAAC;CAC3B,CAAA;AAET,IAAM,QAAQ,GAAwB,UAAC,EAAW;QAAN,IAAI,sBAAT,EAAW,CAAF;IAC5C,OAAO,8BAAC,UAAO,uBAAK,IAAI,EAAI,CAAA;AAChC,CAAC,CAAA;AAEY,QAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import ReactTooltip from 'react-tooltip';
2
+ export declare const StyledTooltip: import("styled-components").StyledComponent<typeof ReactTooltip, any, {}, never>;
3
+ export declare const StyledContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledContainer = exports.StyledTooltip = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_tooltip_1 = require("react-tooltip");
6
+ var styled_components_1 = require("styled-components");
7
+ exports.StyledTooltip = styled_components_1.default(react_tooltip_1.default)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n max-width: 250px;\n line-height: 1.3;\n font-size: 12px !important;\n font-weight: normal !important;\n\n * {\n text-align: left !important;\n }\n"], ["\n max-width: 250px;\n line-height: 1.3;\n font-size: 12px !important;\n font-weight: normal !important;\n\n * {\n text-align: left !important;\n }\n"])));
8
+ exports.StyledContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n display: inline-flex;\n font-family: ", ";\n"], ["\n display: inline-flex;\n font-family: ", ";\n"])), function (props) { return props.theme.font.default; });
9
+ var templateObject_1, templateObject_2;
10
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Tooltip/styles.ts"],"names":[],"mappings":";;;;AAAA,+CAAwC;AACxC,uDAAsC;AAEzB,QAAA,aAAa,GAAG,2BAAM,CAAC,uBAAY,CAAC,2PAAA,gLAShD,KAAA;AAEY,QAAA,eAAe,GAAG,2BAAM,CAAC,GAAG,kIAAA,gDAEtB,EAAiC,KACnD,KADkB,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAxB,CAAwB,EACnD"}
package/dist/index.d.ts CHANGED
@@ -40,4 +40,5 @@ export { Tag } from './components/Tag';
40
40
  export { Text } from './components/Text';
41
41
  export { TextArea } from './components/TextArea';
42
42
  export { ToggleContainer } from './components/ToggleContainer';
43
+ export { Tooltip } from './components/Tooltip';
43
44
  export * from './theme';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToggleContainer = exports.TextArea = exports.Text = exports.Tag = exports.Table = exports.Row = exports.Head = exports.Foot = exports.Cell = exports.Body = exports.Spinner = exports.Select = exports.RadioGroup = exports.Radio = exports.Portal = exports.PageLoader = exports.OrderedList = exports.Notification = exports.NavLink = exports.Modal = exports.ListItem = exports.List = exports.Link = exports.Label = exports.CurrencyInput = exports.Input = exports.Image = exports.HelpText = exports.Heading = exports.GridColumn = exports.Grid = exports.Form = exports.FieldGroup = exports.FieldError = exports.Field = exports.Error = exports.ExternalLink = exports.CounterTag = exports.Container = exports.Checkbox = exports.Card = exports.ButtonGroup = exports.Button = exports.Box = exports.Badge = exports.AutocompleteItem = exports.Autocomplete = void 0;
3
+ exports.Tooltip = exports.ToggleContainer = exports.TextArea = exports.Text = exports.Tag = exports.Table = exports.Row = exports.Head = exports.Foot = exports.Cell = exports.Body = exports.Spinner = exports.Select = exports.RadioGroup = exports.Radio = exports.Portal = exports.PageLoader = exports.OrderedList = exports.Notification = exports.NavLink = exports.Modal = exports.ListItem = exports.List = exports.Link = exports.Label = exports.CurrencyInput = exports.Input = exports.Image = exports.HelpText = exports.Heading = exports.GridColumn = exports.Grid = exports.Form = exports.FieldGroup = exports.FieldError = exports.Field = exports.Error = exports.ExternalLink = exports.CounterTag = exports.Container = exports.Checkbox = exports.Card = exports.ButtonGroup = exports.Button = exports.Box = exports.Badge = exports.AutocompleteItem = exports.Autocomplete = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var Autocomplete_1 = require("./components/Autocomplete");
6
6
  Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return Autocomplete_1.Autocomplete; } });
@@ -91,5 +91,7 @@ var TextArea_1 = require("./components/TextArea");
91
91
  Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return TextArea_1.TextArea; } });
92
92
  var ToggleContainer_1 = require("./components/ToggleContainer");
93
93
  Object.defineProperty(exports, "ToggleContainer", { enumerable: true, get: function () { return ToggleContainer_1.ToggleContainer; } });
94
+ var Tooltip_1 = require("./components/Tooltip");
95
+ Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
94
96
  tslib_1.__exportStar(require("./theme"), exports);
95
97
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,uDAAiE;AAAxD,wGAAA,gBAAgB,OAAA;AACzB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,wCAAsC;AAA7B,0FAAA,GAAG,OAAA;AACZ,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,wDAAsD;AAA7C,0GAAA,WAAW,OAAA;AACpB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,oDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,0DAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;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U,OAAA;AACnB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,4CAAuE;AAA9D,6FAAA,IAAI,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,4FAAA,GAAG,OAAA;AAAE,8FAAA,KAAK,OAAA;AAC3C,wCAAsC;AAA7B,0FAAA,GAAG,OAAA;AACZ,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,gEAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,kDAAuB"}
@@ -33,8 +33,11 @@ export declare const SIZE_MEDIUM = "medium";
33
33
  export declare const SIZE_LARGE = "large";
34
34
  export declare type ButtonSize = typeof SIZE_SMALL | typeof SIZE_MEDIUM | typeof SIZE_LARGE;
35
35
  export interface IconProps {
36
- width?: number | string;
36
+ id?: string;
37
37
  color?: string;
38
+ width?: number | string;
39
+ text?: string;
40
+ style?: React.CSSProperties;
38
41
  }
39
42
  export interface Tooltip {
40
43
  content: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beequip/hexagon",
3
- "version": "0.16.0-0",
3
+ "version": "0.16.0-1",
4
4
  "description": "Component library for BEEQUIP",
5
5
  "main": "dist/index.js",
6
6
  "files": [