@beequip/hexagon 0.18.0-1 → 0.18.0

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.
@@ -12,7 +12,7 @@ exports.StyledCheckboxContainer = styled_components_1.default.div(templateObject
12
12
  "\n justify-content: space-between;\n flex-direction: row-reverse;\n ";
13
13
  });
14
14
  exports.StyledCheckboxLabel = styled_components_1.default.label(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n line-height: ", ";\n color: ", ";\n cursor: pointer;\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n line-height: ", ";\n color: ", ";\n cursor: pointer;\n"])), function (props) { return props.theme.font.heading; }, function (props) { return props.theme.font.sizes.s; }, function (props) { return props.theme.font.lineHeight; }, function (props) { return props.theme.colors.text.default; });
15
- exports.StyledCheckbox = styled_components_1.default.input(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n height: 14px;\n width: 14px;\n min-width: 14px;\n position: relative;\n border: 2px solid ", ";\n border-radius: 2px;\n background: none;\n cursor: pointer;\n font-size: 8px;\n line-height: 0;\n margin: 4px 0 0;\n outline: 0;\n padding: 0;\n -webkit-appearance: none;\n transition: ", ";\n\n &:before {\n content: '';\n position: absolute;\n right: 50%;\n top: 50%;\n width: 4px;\n height: 7px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n margin: 0px -1px 0 -2px;\n transform: rotate(45deg) translate(-50%, -50%);\n z-index: 2;\n }\n\n &:checked {\n border: none;\n background: ", ";\n }\n"], ["\n height: 14px;\n width: 14px;\n min-width: 14px;\n position: relative;\n border: 2px solid ", ";\n border-radius: 2px;\n background: none;\n cursor: pointer;\n font-size: 8px;\n line-height: 0;\n margin: 4px 0 0;\n outline: 0;\n padding: 0;\n -webkit-appearance: none;\n transition: ", ";\n\n &:before {\n content: '';\n position: absolute;\n right: 50%;\n top: 50%;\n width: 4px;\n height: 7px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n margin: 0px -1px 0 -2px;\n transform: rotate(45deg) translate(-50%, -50%);\n z-index: 2;\n }\n\n &:checked {\n border: none;\n background: ", ";\n }\n"])), function (_a) {
15
+ exports.StyledCheckbox = styled_components_1.default.input(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n height: 14px;\n width: 14px;\n min-width: 14px;\n position: relative;\n border: 2px solid ", ";\n border-radius: 2px;\n background: none;\n cursor: pointer;\n font-size: 8px;\n line-height: 0;\n margin: 5px 0 0;\n outline: 0;\n padding: 0;\n -webkit-appearance: none;\n transition: ", ";\n\n &:before {\n content: '';\n position: absolute;\n box-sizing: border-box;\n right: 50%;\n top: 50%;\n width: 4px;\n height: 7px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n margin: 0px -1px 0 -2px;\n transform: rotate(45deg) translate(-50%, -50%);\n z-index: 2;\n }\n\n &:checked {\n border: none;\n background: ", ";\n }\n"], ["\n height: 14px;\n width: 14px;\n min-width: 14px;\n position: relative;\n border: 2px solid ", ";\n border-radius: 2px;\n background: none;\n cursor: pointer;\n font-size: 8px;\n line-height: 0;\n margin: 5px 0 0;\n outline: 0;\n padding: 0;\n -webkit-appearance: none;\n transition: ", ";\n\n &:before {\n content: '';\n position: absolute;\n box-sizing: border-box;\n right: 50%;\n top: 50%;\n width: 4px;\n height: 7px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n margin: 0px -1px 0 -2px;\n transform: rotate(45deg) translate(-50%, -50%);\n z-index: 2;\n }\n\n &:checked {\n border: none;\n background: ", ";\n }\n"])), function (_a) {
16
16
  var theme = _a.theme;
17
17
  return theme.colors.grey[200];
18
18
  }, function (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Checkbox/styles.ts"],"names":[],"mappings":";;;;AAAA,uDAAsC;AAGzB,QAAA,uBAAuB,GAAG,2BAAM,CAAC,GAAG,mLAEhD,mFAIe,EAA+B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,EAC1C,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAA/B,CAA+B,EAEpD;AAEY,QAAA,cAAc,GAAG,2BAAM,CAAC,KAAK,21BAAA,8GAKlB,EAAqC,4NAU3C,EAAsC,obAmBlC,EAAmC,YAExD,KA/BuB,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AAAtB,CAAsB,EAU3C,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC;AAAvB,CAAuB,EAmBlC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,MAAM,CAAC,OAAO;AAApB,CAAoB,EAExD;AAEY,QAAA,iBAAiB,GAAG,2BAAM,CAAC,CAAC,kKAAA,qBACtB,EAAiC,oBACnC,EAAkC,gBACtC,EAAyC,iBACxC,EAA0C,KACvD,KAJkB,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,IAAI,CAAC,OAAO;AAAlB,CAAkB,EACnC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AAAnB,CAAmB,EACtC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;AAA1B,CAA0B,EACxC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,UAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,WAAQ;AAA3B,CAA2B,EACvD"}
@@ -1,12 +1,12 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
- export interface CurrencyInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onBlur'> {
1
+ import * as React from 'react';
2
+ export interface CurrencyInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onBlur'> {
3
3
  value: number | undefined;
4
- error?: string | ReactNode;
4
+ error?: string | React.ReactNode;
5
5
  hook: string;
6
6
  prefix?: string;
7
7
  autoComplete?: string;
8
8
  helpText?: string;
9
- tooltip?: ReactNode;
9
+ tooltip?: React.ReactNode;
10
10
  onChange: (value: number | '') => void;
11
11
  onBlur: (value: number | '') => void;
12
12
  }
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CurrencyInput = void 0;
4
4
  var tslib_1 = require("tslib");
5
- var react_1 = require("react");
5
+ var React = require("react");
6
6
  var styles_1 = require("../styles");
7
7
  var styles_2 = require("./styles");
8
8
  var utilities_1 = require("./utilities");
9
9
  var CurrencyInput = function (props) {
10
10
  var valueFromProp = props.value, hook = props.hook, prefix = props.prefix, helpText = props.helpText, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, className = props.className, rest = tslib_1.__rest(props, ["value", "hook", "prefix", "helpText", "onChange", "onFocus", "onBlur", "className"]);
11
- var _a = tslib_1.__read((0, react_1.useState)(props.autoFocus || false), 2), isFocussed = _a[0], setIsFocussed = _a[1];
12
- var _b = tslib_1.__read((0, react_1.useState)(valueFromProp !== undefined && valueFromProp !== null
11
+ var _a = tslib_1.__read(React.useState(props.autoFocus || false), 2), isFocussed = _a[0], setIsFocussed = _a[1];
12
+ var _b = tslib_1.__read(React.useState(valueFromProp !== undefined && valueFromProp !== null
13
13
  ? (0, utilities_1.addFormatting)(valueFromProp)
14
14
  : ''), 2), currentValue = _b[0], updateCurrentValue = _b[1];
15
15
  var handleChange = function (event) {
@@ -45,19 +45,19 @@ var CurrencyInput = function (props) {
45
45
  onBlur(valueAsInt);
46
46
  return null;
47
47
  };
48
- (0, react_1.useEffect)(function () {
48
+ React.useEffect(function () {
49
49
  if (valueFromProp && valueFromProp !== parseInt(currentValue, 10)) {
50
50
  updateCurrentValue((0, utilities_1.addFormatting)(valueFromProp));
51
51
  }
52
52
  }, [valueFromProp, currentValue]);
53
- return (react_1.default.createElement(styles_2.StyledCurrencyInputWrapper, { isFocussed: isFocussed, disabled: props.disabled, error: props.error, className: className },
54
- react_1.default.createElement(styles_1.StyledPreFix, null, prefix ? prefix : '€'),
55
- react_1.default.createElement(styles_2.StyledCurrencyInput, tslib_1.__assign({ type: "text", value: currentValue, onChange: handleChange, onFocus: function (e) {
53
+ return (React.createElement(styles_2.StyledCurrencyInputWrapper, { isFocussed: isFocussed, disabled: props.disabled, error: props.error, className: className },
54
+ React.createElement(styles_1.StyledPreFix, null, prefix ? prefix : '€'),
55
+ React.createElement(styles_2.StyledCurrencyInput, tslib_1.__assign({ type: "text", value: currentValue, onChange: handleChange, onFocus: function (e) {
56
56
  if (onFocus)
57
57
  onFocus(e);
58
58
  setIsFocussed(true);
59
59
  }, onBlur: handleBlur, "data-hook": hook, inputMode: "decimal" }, rest)),
60
- helpText && react_1.default.createElement(styles_1.StyledHelpText, null, helpText)));
60
+ helpText && React.createElement(styles_1.StyledHelpText, null, helpText)));
61
61
  };
62
62
  exports.CurrencyInput = CurrencyInput;
63
63
  exports.CurrencyInput.defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/index.tsx"],"names":[],"mappings":";;;;AAAA,+BAMc;AACd,oCAAwD;AACxD,mCAA0E;AAC1E,yCAIoB;AAeb,IAAM,aAAa,GAAG,UAAC,KAAyB;IAE/C,IAAO,aAAa,GASpB,KAAK,MATe,EACpB,IAAI,GAQJ,KAAK,KARD,EACJ,MAAM,GAON,KAAK,OAPC,EACN,QAAQ,GAMR,KAAK,SANG,EACR,QAAQ,GAKR,KAAK,SALG,EACR,OAAO,GAIP,KAAK,QAJE,EACP,MAAM,GAGN,KAAK,OAHC,EACN,SAAS,GAET,KAAK,UAFI,EACN,IAAI,kBACP,KAAK,EAVH,qFAUL,CADU,CACF;IACH,IAAA,KAAA,e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aAAa,iBAsGzB;AAED,qBAAa,CAAC,YAAY,GAAG;IACzB,YAAY,EAAE,KAAK;CACtB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/index.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAC9B,oCAAwD;AACxD,mCAA0E;AAC1E,yCAIoB;AAkBb,IAAM,aAAa,GAAG,UAAC,KAAyB;IAE/C,IAAO,aAAa,GASpB,KAAK,MATe,EACpB,IAAI,GAQJ,KAAK,KARD,EACJ,MAAM,GAON,KAAK,OAPC,EACN,QAAQ,GAMR,KAAK,SANG,EACR,QAAQ,GAKR,KAAK,SALG,EACR,OAAO,GAIP,KAAK,QAJE,EACP,MAAM,GAGN,KAAK,OAHC,EACN,SAAS,GAET,KAAK,UAFI,EACN,IAAI,kBACP,KAAK,EAVH,qFAUL,CADU,CACF;IACH,IAAA,KAAA,eAA8B,KAAK,CAAC,QAAQ,CAC9C,KAAK,CAAC,SAAS,IAAI,KAAK,CAC3B,IAAA,EAFM,UAAU,QAAA,EAAE,aAAa,QAE/B,CAAA;IACK,IAAA,KAAA,eAAqC,KAAK,CAAC,QAAQ,CACrD,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,IAAI;QACjD,CAAC,CAAC,IAAA,yBAAa,EAAC,aAAa,CAAC;QAC9B,CAAC,CAAC,EAAE,CACX,IAAA,EAJM,YAAY,QAAA,EAAE,kBAAkB,QAItC,CAAA;IAED,IAAM,YAAY,GAAG,UAAC,KAA0C;QAE9C,IAAA,KAAK,GACf,KAAK,aADU,CACV;QAET,IAAM,aAAa,GAAG,KAAK,CAAA;QAE3B,IAAI,aAAa,KAAK,EAAE,IAAI,aAAa,KAAK,IAAI,EAAE;YAChD,kBAAkB,CAAC,EAAE,CAAC,CAAA;YACtB,QAAQ,CAAC,EAAE,CAAC,CAAA;YACZ,OAAO,KAAK,CAAA;SACf;QAED,IAAM,UAAU,GAAG,QAAQ,CAAC,IAAA,4B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,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,SAAS;QAEpB,oBAAC,qBAAY,QAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAgB;QACpD,oBAAC,4BAAmB,qBAChB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,UAAA,CAAC;gBACN,IAAI,OAAO;oBAAE,OAAO,CAAC,CAAC,CAAC,CAAA;gBACvB,aAAa,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC,EACD,MAAM,EAAE,UAAU,eACP,IAAI,EACf,SAAS,EAAC,SAAS,IACf,IAAI,EACV;QACD,QAAQ,IAAI,oBAAC,uBAAc,QAAE,QAAQ,CAAkB,CAC/B,CAChC,CAAA;AACL,CAAC,CAAA;AAtGY,QAAA,aAAa,iBAsGzB;AAED,qBAAa,CAAC,YAAY,GAAG;IACzB,YAAY,EAAE,KAAK;CACtB,CAAA"}
@@ -1,8 +1,8 @@
1
- import React, { InputHTMLAttributes, ReactNode } from 'react';
1
+ import * as React from 'react';
2
2
  import { Tooltip } from '../../theme/types';
3
- export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  hook?: string;
5
- error?: string | ReactNode;
5
+ error?: string | React.ReactNode;
6
6
  helpText?: string;
7
7
  tooltip?: Tooltip;
8
8
  postfix?: string;
@@ -2,18 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Input = void 0;
4
4
  var tslib_1 = require("tslib");
5
- var react_1 = require("react");
5
+ var React = require("react");
6
6
  var react_tooltip_1 = require("react-tooltip");
7
7
  var InfoCircle_1 = require("../../assets/icons/InfoCircle");
8
8
  var theme_1 = require("../../theme/theme");
9
9
  var styles_1 = require("./styles");
10
- exports.Input = (0, react_1.forwardRef)(function (_a, ref) {
10
+ exports.Input = React.forwardRef(function (_a, ref) {
11
11
  var hook = _a.hook, helpText = _a.helpText, tooltip = _a.tooltip, postfix = _a.postfix, prefix = _a.prefix, className = _a.className, onFocus = _a.onFocus, onBlur = _a.onBlur, props = tslib_1.__rest(_a, ["hook", "helpText", "tooltip", "postfix", "prefix", "className", "onFocus", "onBlur"]);
12
- var _b = tslib_1.__read((0, react_1.useState)(props.autoFocus || false), 2), isFocussed = _b[0], setIsFocussed = _b[1];
13
- return (react_1.default.createElement(styles_1.StyledInputWrapper, { isFocussed: isFocussed, disabled: props.disabled, error: props.error, className: className },
14
- prefix && (react_1.default.createElement(styles_1.StyledPreFix, { className: "hexagon-input-prefix" }, prefix)),
15
- react_1.default.createElement(styles_1.StyledInputInner, null,
16
- react_1.default.createElement(styles_1.StyledInput, tslib_1.__assign({ "data-hook": hook, prefix: prefix, postfix: postfix, ref: ref, onFocus: function (e) {
12
+ var _b = tslib_1.__read(React.useState(props.autoFocus || false), 2), isFocussed = _b[0], setIsFocussed = _b[1];
13
+ return (React.createElement(styles_1.StyledInputWrapper, { isFocussed: isFocussed, disabled: props.disabled, error: props.error, className: className },
14
+ prefix && (React.createElement(styles_1.StyledPreFix, { className: "hexagon-input-prefix" }, prefix)),
15
+ React.createElement(styles_1.StyledInputInner, null,
16
+ React.createElement(styles_1.StyledInput, tslib_1.__assign({ "data-hook": hook, prefix: prefix, postfix: postfix, ref: ref, onFocus: function (e) {
17
17
  if (onFocus)
18
18
  onFocus(e);
19
19
  setIsFocussed(true);
@@ -22,11 +22,11 @@ exports.Input = (0, react_1.forwardRef)(function (_a, ref) {
22
22
  onBlur(e);
23
23
  setIsFocussed(false);
24
24
  }, className: "hexagon-input" }, props)),
25
- helpText && react_1.default.createElement(styles_1.StyledHelpText, null, helpText)),
26
- postfix && (react_1.default.createElement(styles_1.StyledPostFix, { className: "hexagon-input-postfix" }, postfix)),
27
- tooltip && (react_1.default.createElement(styles_1.StyledTooltip, null,
28
- react_1.default.createElement(react_tooltip_1.default, null),
29
- react_1.default.createElement(InfoCircle_1.InfoCircle, { "data-background-color": theme_1.GREY1, "data-multiline": true, "data-place": tooltip.place, "data-tip": tooltip.content, "data-offset": "{'top': 10, 'left': 10}", width: 16, color: theme_1.PRIMARY })))));
25
+ helpText && React.createElement(styles_1.StyledHelpText, null, helpText)),
26
+ postfix && (React.createElement(styles_1.StyledPostFix, { className: "hexagon-input-postfix" }, postfix)),
27
+ tooltip && (React.createElement(styles_1.StyledTooltip, null,
28
+ React.createElement(react_tooltip_1.default, null),
29
+ React.createElement(InfoCircle_1.InfoCircle, { "data-background-color": theme_1.GREY1, "data-multiline": true, "data-place": tooltip.place, "data-tip": tooltip.content, "data-offset": "{'top': 10, 'left': 10}", width: 16, color: theme_1.PRIMARY })))));
30
30
  });
31
31
  exports.Input.defaultProps = {
32
32
  autoComplete: 'off',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":";;;;AAAA,+BAKc;AACd,+CAAwC;AACxC,4DAA0D;AAC1D,2CAAkD;AAElD,mCAQiB;AAWJ,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC3B,UACI,EAUC,EACD,GAAG;IAVC,IAAA,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,OAAO,aAAA,EACP,MAAM,YAAA,EACN,SAAS,eAAA,EACT,OAAO,aAAA,EACP,MAAM,YAAA,EACH,KAAK,sBATZ,sFAUC,CADW;IAIN,IAAA,KAAA,eAA8B,IAAA,gBAAQ,EACxC,KAAK,CAAC,SAAS,IAAI,KAAK,CAC3B,IAAA,EAFM,UAAU,QAAA,EAAE,aAAa,QAE/B,CAAA;IACD,OAAO,CACH,8BAAC,2BAAkB,IACf,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,SAAS;QAEnB,MAAM,IAAI,CACP,8BAAC,qBAAY,IAAC,SAAS,EAAC,sBAAsB,IACzC,MAAM,CACI,CAClB;QACD,8BAAC,yBAAgB;YACb,8BAAC,oBAAW,kCACG,IAAI,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,UAAA,CAAC;oBACN,IAAI,OAAO;wBAAE,OAAO,CAAC,CAAC,CAAC,CAAA;oBACvB,aAAa,CAAC,IAAI,CAAC,CAAA;gBACvB,CAAC,EACD,MAAM,EAAE,UAAA,CAAC;oBACL,IAAI,MAAM;wBAAE,MAAM,CAAC,CAAC,CAAC,CAAA;oBACrB,aAAa,CAAC,KAAK,CAAC,CAAA;gBACxB,CAAC,EACD,SAAS,EAAC,eAAe,IACrB,KAAK,EACX;YACD,QAAQ,IAAI,8BAAC,uBAAc,QAAE,QAAQ,CAAkB,CACzC;QAClB,OAAO,IAAI,CACR,8BAAC,sBAAa,IAAC,SAAS,EAAC,uBAAuB,IAC3C,OAAO,CACI,CACnB;QACA,OAAO,IAAI,CACR,8BAAC,sBAAa;YACV,8BAAC,uBAAY,OAAG;YAChB,8BAAC,uBAAU,6BACgB,aAAK,oBACZ,IAAI,gBACR,OAAO,CAAC,KAAK,cACf,OAAO,CAAC,OAAO,iBACb,yBAAyB,EACrC,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,eAAO,GAChB,CACU,CACnB,CACgB,CACxB,CAAA;AACL,CAAC,CACJ,CAAA;AAED,aAAK,CAAC,YAAY,GAAG;IACjB,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,MAAM;CACf,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAC9B,+CAAwC;AACxC,4DAA0D;AAC1D,2CAAkD;AAElD,mCAQiB;AAYJ,QAAA,KAAK,G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AAY,OAAG;YAChB,oBAAC,uBAAU,6BACgB,aAAK,oBACZ,IAAI,gBACR,OAAO,CAAC,KAAK,cACf,OAAO,CAAC,OAAO,iBACb,yBAAyB,EACrC,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,eAAO,GAChB,CACU,CACnB,CACgB,CACxB,CAAA;AACL,CAAC,CACJ,CAAA;AAED,aAAK,CAAC,YAAY,GAAG;IACjB,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,MAAM;CACf,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beequip/hexagon",
3
- "version": "0.18.0-1",
3
+ "version": "0.18.0",
4
4
  "description": "Component library for BEEQUIP",
5
5
  "main": "dist/index.js",
6
6
  "files": [