@veeqo/ui 9.2.0 → 9.3.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.
Files changed (47) hide show
  1. package/dist/components/DimensionsInput/DimensionsInput.cjs +8 -8
  2. package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
  3. package/dist/components/DimensionsInput/DimensionsInput.js +9 -9
  4. package/dist/components/DimensionsInput/DimensionsInput.js.map +1 -1
  5. package/dist/components/DimensionsInput/index.cjs +10 -0
  6. package/dist/components/DimensionsInput/index.cjs.map +1 -0
  7. package/dist/components/DimensionsInput/index.d.ts +2 -1
  8. package/dist/components/DimensionsInput/index.js +8 -0
  9. package/dist/components/DimensionsInput/index.js.map +1 -0
  10. package/dist/components/DimensionsInput/styled.cjs +2 -7
  11. package/dist/components/DimensionsInput/styled.cjs.map +1 -1
  12. package/dist/components/DimensionsInput/styled.d.ts +1 -11
  13. package/dist/components/DimensionsInput/styled.js +3 -7
  14. package/dist/components/DimensionsInput/styled.js.map +1 -1
  15. package/dist/components/DimensionsInput/types.d.ts +2 -5
  16. package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.cjs +15 -0
  17. package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.cjs.map +1 -0
  18. package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.d.ts +9 -0
  19. package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js +9 -0
  20. package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js.map +1 -0
  21. package/dist/components/InputGroup/components/InputGroupLabel/index.d.ts +1 -0
  22. package/dist/components/InputGroup/components/InputGroupLabel/styled.cjs +13 -0
  23. package/dist/components/InputGroup/components/InputGroupLabel/styled.cjs.map +1 -0
  24. package/dist/components/InputGroup/components/InputGroupLabel/styled.d.ts +4 -0
  25. package/dist/components/InputGroup/components/InputGroupLabel/styled.js +7 -0
  26. package/dist/components/InputGroup/components/InputGroupLabel/styled.js.map +1 -0
  27. package/dist/components/InputGroup/index.cjs +4 -1
  28. package/dist/components/InputGroup/index.cjs.map +1 -1
  29. package/dist/components/InputGroup/index.d.ts +1 -0
  30. package/dist/components/InputGroup/index.js +4 -1
  31. package/dist/components/InputGroup/index.js.map +1 -1
  32. package/dist/components/WeightInput/WeightInput.cjs +10 -9
  33. package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
  34. package/dist/components/WeightInput/WeightInput.js +11 -10
  35. package/dist/components/WeightInput/WeightInput.js.map +1 -1
  36. package/dist/components/WeightInput/index.cjs +10 -0
  37. package/dist/components/WeightInput/index.cjs.map +1 -0
  38. package/dist/components/WeightInput/index.d.ts +2 -1
  39. package/dist/components/WeightInput/index.js +8 -0
  40. package/dist/components/WeightInput/index.js.map +1 -0
  41. package/dist/components/WeightInput/styled.cjs +1 -2
  42. package/dist/components/WeightInput/styled.cjs.map +1 -1
  43. package/dist/components/WeightInput/styled.js +2 -2
  44. package/dist/components/WeightInput/styled.js.map +1 -1
  45. package/dist/index.cjs +12 -12
  46. package/dist/index.js +2 -2
  47. package/package.json +2 -2
@@ -3,27 +3,27 @@
3
3
  var React = require('react');
4
4
  var index$1 = require('../InputGroup/index.cjs');
5
5
  var types = require('../types.cjs');
6
- var withLabels = require('../../hoc/withLabels/withLabels.cjs');
7
6
  var styled = require('./styled.cjs');
8
7
  var CrossIcon = require('../../tempIcons/CrossIcon.cjs');
9
8
  var index = require('../../theme/index.cjs');
10
9
  var blockInvalidCharacters = require('../../utils/blockInvalidCharacters.cjs');
11
10
  var invalidCharactersNumeric = require('../../utils/invalidCharactersNumeric.cjs');
11
+ var InputGroupLabel = require('../InputGroup/components/InputGroupLabel/InputGroupLabel.cjs');
12
12
 
13
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
14
 
15
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
16
 
17
17
  const blockInvalidChars = (e) => blockInvalidCharacters.blockInvalidCharacters(e, invalidCharactersNumeric.invalidCharsList);
18
- const DimensionsInput = withLabels.withLabels(({ size = types.ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit, ...rest }) => (React__default.default.createElement(styled.Container, { className: className },
18
+ const DimensionsInput = ({ size = types.ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit = 'cm', ...rest }) => (React__default.default.createElement(styled.Container, { className: className, role: "group", "aria-label": "Dimensions" },
19
19
  React__default.default.createElement(styled.Row, null,
20
- React__default.default.createElement(styled.TextField, { onChange: handleChangeLength, size: size, name: "length", type: "number", placeholder: "L", value: length, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
21
- React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base }),
22
- React__default.default.createElement(styled.TextField, { onChange: handleChangeWidth, size: size, name: "width", type: "number", placeholder: "W", value: width, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
23
- React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base }),
20
+ React__default.default.createElement(styled.TextField, { name: "length", type: "number", value: length, "aria-label": "Length", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeLength, onKeyDown: blockInvalidChars, size: size, placeholder: "L", ...rest }),
21
+ React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base, role: "presentation" }),
22
+ React__default.default.createElement(styled.TextField, { name: "width", type: "number", value: width, "aria-label": "Width", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeWidth, onKeyDown: blockInvalidChars, size: size, placeholder: "W", ...rest }),
23
+ React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base, role: "presentation" }),
24
24
  React__default.default.createElement(index$1.InputGroup, null,
25
- React__default.default.createElement(styled.TextField, { onChange: handleChangeHeight, size: size, name: "height", type: "number", placeholder: "H", value: height, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
26
- React__default.default.createElement(styled.Button, { size: size }, unit))))));
25
+ React__default.default.createElement(styled.TextField, { name: "height", type: "number", value: height, "aria-label": "Height", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeHeight, onKeyDown: blockInvalidChars, size: size, placeholder: "H", ...rest }),
26
+ React__default.default.createElement(InputGroupLabel.InputGroupLabel, { size: size, unit: unit, id: "dimensions-unit" })))));
27
27
  DimensionsInput.displayName = 'DimensionsInput';
28
28
 
29
29
  exports.DimensionsInput = DimensionsInput;
@@ -1 +1 @@
1
- {"version":3,"file":"DimensionsInput.cjs","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup } from '../InputGroup';\nimport { ComponentSize } from '../types';\nimport { withLabels } from '../../hoc';\n\nimport { Container, Row, TextField, Button } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\nexport const DimensionsInput: FC<DimensionsProps> = withLabels(\n ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit,\n ...rest\n }: DimensionsProps) => (\n <Container className={className}>\n <Row>\n <TextField\n onChange={handleChangeLength}\n size={size}\n name=\"length\"\n type=\"number\"\n placeholder=\"L\"\n value={length}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} />\n <TextField\n onChange={handleChangeWidth}\n size={size}\n name=\"width\"\n type=\"number\"\n placeholder=\"W\"\n value={width}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} />\n <InputGroup>\n <TextField\n onChange={handleChangeHeight}\n size={size}\n name=\"height\"\n type=\"number\"\n placeholder=\"H\"\n value={height}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button size={size}>{unit}</Button>\n </InputGroup>\n </Row>\n </Container>\n ),\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["blockInvalidCharacters","invalidCharsList","withLabels","ComponentSize","React","Container","Row","TextField","CrossIcon","theme","InputGroup","Button"],"mappings":";;;;;;;;;;;;;;;;AAcA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAKA,6CAAsB,CAAC,CAAC,EAAEC,yCAAgB,CAAC;AACpF,MAAA,eAAe,GAAwBC,qBAAU,CAC5D,CAAC,EACC,IAAI,GAAGC,mBAAa,CAAC,IAAI,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACS,MAChBC,sBAAA,CAAA,aAAA,CAACC,gBAAS,EAAC,EAAA,SAAS,EAAE,SAAS,EAAA;AAC7B,IAAAD,sBAAA,CAAA,aAAA,CAACE,UAAG,EAAA,IAAA;AACF,QAAAF,sBAAA,CAAA,aAAA,CAACG,gBAAS,EACR,EAAA,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,QAAAH,sBAAA,CAAA,aAAA,CAACI,mBAAS,EAAC,EAAA,MAAM,EAAEC,WAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAEA,WAAK,CAAC,KAAK,CAAC,IAAI,EAAI,CAAA;AAChE,QAAAL,sBAAA,CAAA,aAAA,CAACG,gBAAS,EACR,EAAA,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,KAAK,EACZ,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,QAAAH,sBAAA,CAAA,aAAA,CAACI,mBAAS,EAAC,EAAA,MAAM,EAAEC,WAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAEA,WAAK,CAAC,KAAK,CAAC,IAAI,EAAI,CAAA;AAChE,QAAAL,sBAAA,CAAA,aAAA,CAACM,kBAAU,EAAA,IAAA;AACT,YAAAN,sBAAA,CAAA,aAAA,CAACG,gBAAS,EACR,EAAA,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,YAAAH,sBAAA,CAAA,aAAA,CAACO,aAAM,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA,EAAG,IAAI,CAAU,CACxB,CACT,CACI,CACb;AAGH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
1
+ {"version":3,"file":"DimensionsInput.cjs","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\nimport { ComponentSize } from '../types';\n\nimport { Container, Row, TextField } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const DimensionsInput: FC<DimensionsProps> = ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit = 'cm',\n ...rest\n}: DimensionsProps) => (\n <Container className={className} role=\"group\" aria-label=\"Dimensions\">\n <Row>\n <TextField\n name=\"length\"\n type=\"number\"\n value={length}\n aria-label=\"Length\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeLength}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"L\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <TextField\n name=\"width\"\n type=\"number\"\n value={width}\n aria-label=\"Width\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeWidth}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"W\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <InputGroup>\n <TextField\n name=\"height\"\n type=\"number\"\n value={height}\n aria-label=\"Height\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeHeight}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"H\"\n {...rest}\n />\n <InputGroupLabel size={size} unit={unit} id=\"dimensions-unit\" />\n </InputGroup>\n </Row>\n </Container>\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["blockInvalidCharacters","invalidCharsList","ComponentSize","React","Container","Row","TextField","CrossIcon","theme","InputGroup","InputGroupLabel"],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,iBAAi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,WAAW,EAAC,GAAG,EAAA,GACX,IAAI,EACR,CAAA;QACFH,sBAAC,CAAA,aAAA,CAAAI,mBAAS,IAAC,MAAM,EAAEC,WAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAEA,WAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,EAAG,CAAA;AACpF,QAAAL,sBAAA,CAAA,aAAA,CAACM,kBAAU,EAAA,IAAA;AACT,YAAAN,sBAAA,CAAA,aAAA,CAACG,gBAAS,EACR,EAAA,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,MAAM,EACF,YAAA,EAAA,QAAQ,sBACF,iBAAiB,EAClC,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,kBAAkB,EAC5B,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,GAAG,EAAA,GACX,IAAI,EACR,CAAA;AACF,YAAAH,sBAAA,CAAA,aAAA,CAACO,+BAAe,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAC,iBAAiB,EAAA,CAAG,CACrD,CACT,CACI;AAGd,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
@@ -1,23 +1,23 @@
1
1
  import React from 'react';
2
2
  import { InputGroup } from '../InputGroup/index.js';
3
3
  import { ComponentSize } from '../types.js';
4
- import { withLabels } from '../../hoc/withLabels/withLabels.js';
5
- import { Container, Row, TextField as StyledTextField, Button as StyledButton } from './styled.js';
4
+ import { Container, Row, TextField as StyledTextField } from './styled.js';
6
5
  import { CrossIcon } from '../../tempIcons/CrossIcon.js';
7
6
  import { theme } from '../../theme/index.js';
8
7
  import { blockInvalidCharacters } from '../../utils/blockInvalidCharacters.js';
9
8
  import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
9
+ import { InputGroupLabel } from '../InputGroup/components/InputGroupLabel/InputGroupLabel.js';
10
10
 
11
11
  const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
12
- const DimensionsInput = withLabels(({ size = ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit, ...rest }) => (React.createElement(Container, { className: className },
12
+ const DimensionsInput = ({ size = ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit = 'cm', ...rest }) => (React.createElement(Container, { className: className, role: "group", "aria-label": "Dimensions" },
13
13
  React.createElement(Row, null,
14
- React.createElement(StyledTextField, { onChange: handleChangeLength, size: size, name: "length", type: "number", placeholder: "L", value: length, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
15
- React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base }),
16
- React.createElement(StyledTextField, { onChange: handleChangeWidth, size: size, name: "width", type: "number", placeholder: "W", value: width, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
17
- React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base }),
14
+ React.createElement(StyledTextField, { name: "length", type: "number", value: length, "aria-label": "Length", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeLength, onKeyDown: blockInvalidChars, size: size, placeholder: "L", ...rest }),
15
+ React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base, role: "presentation" }),
16
+ React.createElement(StyledTextField, { name: "width", type: "number", value: width, "aria-label": "Width", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeWidth, onKeyDown: blockInvalidChars, size: size, placeholder: "W", ...rest }),
17
+ React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base, role: "presentation" }),
18
18
  React.createElement(InputGroup, null,
19
- React.createElement(StyledTextField, { onChange: handleChangeHeight, size: size, name: "height", type: "number", placeholder: "H", value: height, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
20
- React.createElement(StyledButton, { size: size }, unit))))));
19
+ React.createElement(StyledTextField, { name: "height", type: "number", value: height, "aria-label": "Height", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeHeight, onKeyDown: blockInvalidChars, size: size, placeholder: "H", ...rest }),
20
+ React.createElement(InputGroupLabel, { size: size, unit: unit, id: "dimensions-unit" })))));
21
21
  DimensionsInput.displayName = 'DimensionsInput';
22
22
 
23
23
  export { DimensionsInput };
@@ -1 +1 @@
1
- {"version":3,"file":"DimensionsInput.js","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup } from '../InputGroup';\nimport { ComponentSize } from '../types';\nimport { withLabels } from '../../hoc';\n\nimport { Container, Row, TextField, Button } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\nexport const DimensionsInput: FC<DimensionsProps> = withLabels(\n ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit,\n ...rest\n }: DimensionsProps) => (\n <Container className={className}>\n <Row>\n <TextField\n onChange={handleChangeLength}\n size={size}\n name=\"length\"\n type=\"number\"\n placeholder=\"L\"\n value={length}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} />\n <TextField\n onChange={handleChangeWidth}\n size={size}\n name=\"width\"\n type=\"number\"\n placeholder=\"W\"\n value={width}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} />\n <InputGroup>\n <TextField\n onChange={handleChangeHeight}\n size={size}\n name=\"height\"\n type=\"number\"\n placeholder=\"H\"\n value={height}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button size={size}>{unit}</Button>\n </InputGroup>\n </Row>\n </Container>\n ),\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["TextField","Button"],"mappings":";;;;;;;;;;AAcA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AACpF,MAAA,eAAe,GAAwB,UAAU,CAC5D,CAAC,EACC,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACS,MAChB,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,SAAS,EAAE,SAAS,EAAA;AAC7B,IAAA,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,IAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAI,CAAA;AAChE,QAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,KAAK,EACZ,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAI,CAAA;AAChE,QAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;AACT,YAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,GAAG,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAACC,YAAM,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA,EAAG,IAAI,CAAU,CACxB,CACT,CACI,CACb;AAGH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
1
+ {"version":3,"file":"DimensionsInput.js","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\nimport { ComponentSize } from '../types';\n\nimport { Container, Row, TextField } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const DimensionsInput: FC<DimensionsProps> = ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit = 'cm',\n ...rest\n}: DimensionsProps) => (\n <Container className={className} role=\"group\" aria-label=\"Dimensions\">\n <Row>\n <TextField\n name=\"length\"\n type=\"number\"\n value={length}\n aria-label=\"Length\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeLength}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"L\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <TextField\n name=\"width\"\n type=\"number\"\n value={width}\n aria-label=\"Width\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeWidth}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"W\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <InputGroup>\n <TextField\n name=\"height\"\n type=\"number\"\n value={height}\n aria-label=\"Height\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeHeight}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"H\"\n {...rest}\n />\n <InputGroupLabel size={size} unit={unit} id=\"dimensions-unit\" />\n </InputGroup>\n </Row>\n </Container>\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["TextField"],"mappings":";;;;;;;;;;AAaA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;MAEpF,eAAe,GAAwB,CAAC,EACnD,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,GAAG,IAAI,EACX,GAAG,IAAI,EACS,MAChB,oBAAC,SAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,O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QAAQ,EACb,KAAK,EAAE,MAAM,EACF,YAAA,EAAA,QAAQ,sBACF,iBAAiB,EAClC,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,kBAAkB,EAC5B,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,GAAG,EAAA,GACX,IAAI,EACR,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAC,iBAAiB,EAAA,CAAG,CACrD,CACT,CACI;AAGd,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var withLabels = require('../../hoc/withLabels/withLabels.cjs');
4
+ require('react');
5
+ var DimensionsInput$1 = require('./DimensionsInput.cjs');
6
+
7
+ const DimensionsInput = withLabels.withLabels(DimensionsInput$1.DimensionsInput);
8
+
9
+ exports.DimensionsInput = DimensionsInput;
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/DimensionsInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { DimensionsInput as BaseDimensionsInput } from './DimensionsInput';\n\nexport const DimensionsInput = withLabels(BaseDimensionsInput);\n"],"names":["withLabels","BaseDimensionsInput"],"mappings":";;;;;;MAGa,eAAe,GAAGA,qBAAU,CAACC,iCAAmB;;;;"}
@@ -1 +1,2 @@
1
- export { DimensionsInput } from './DimensionsInput';
1
+ /// <reference types="react" />
2
+ export declare const DimensionsInput: import("react").FC<import("./types").DimensionsProps & import("../../hoc/withLabels/withLabels").WithLabelsProps>;
@@ -0,0 +1,8 @@
1
+ import { withLabels } from '../../hoc/withLabels/withLabels.js';
2
+ import 'react';
3
+ import { DimensionsInput as DimensionsInput$1 } from './DimensionsInput.js';
4
+
5
+ const DimensionsInput = withLabels(DimensionsInput$1);
6
+
7
+ export { DimensionsInput };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/DimensionsInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { DimensionsInput as BaseDimensionsInput } from './DimensionsInput';\n\nexport const DimensionsInput = withLabels(BaseDimensionsInput);\n"],"names":["BaseDimensionsInput"],"mappings":";;;;MAGa,eAAe,GAAG,UAAU,CAACA,iBAAmB;;;;"}
@@ -1,9 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var styled = require('styled-components');
4
- var Text = require('../Text/Text.cjs');
5
4
  var index = require('../TextField/index.cjs');
6
- var Button = require('../Button/Button.cjs');
7
5
  var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
8
6
  var index$1 = require('../../theme/index.cjs');
9
7
 
@@ -14,12 +12,9 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
14
12
  const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--oxhxoy" }) `display:flex;flex-direction:column;position:relative;`;
15
13
  const Row = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--w9sg63" }) `display:flex;align-items:center;margin-top:4px;gap:8px;`;
16
14
  const StyledTextField = styled__default.default(index.TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1dp86fg" }) `width:52px;margin:0;padding:0 6px;&&&{text-align:left;border-color:${index$1.theme.colors.neutral.ink.lightest};}`;
17
- const StyledButton = styled__default.default(Button.Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--1h9einl" }) `padding:0 6px;border-color:${index$1.theme.colors.neutral.ink.lightest};`;
18
- styled__default.default(Text.Text).withConfig({ displayName: "vui--Label", componentId: "vui--2iwwsg" }) ``;
19
- styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1ln478r" }) `display:block;font-family:${index$1.theme.text.error.fontFamily};font-size:${index$1.theme.text.error.fontSize};font-weight:${index$1.theme.text.error.fontWeight};line-height:${index$1.theme.text.error.lineHeight};color:${index$1.theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${index$1.theme.sizes[2]} * -1);width:2px;background-color:${index$1.theme.colors.secondary.red.base};}`;
20
- styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--5lfadq" }) `display:block;font-family:${index$1.theme.fontFamily};font-size:${index$1.theme.sizes[3]};line-height:${index$1.theme.sizes[4]};color:${index$1.theme.colors.neutral.ink.light};`;
15
+ styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1isax7l" }) `display:block;font-family:${index$1.theme.text.error.fontFamily};font-size:${index$1.theme.text.error.fontSize};font-weight:${index$1.theme.text.error.fontWeight};line-height:${index$1.theme.text.error.lineHeight};color:${index$1.theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${index$1.theme.sizes[2]} * -1);width:2px;background-color:${index$1.theme.colors.secondary.red.base};}`;
16
+ styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--gorpke" }) `display:block;font-family:${index$1.theme.fontFamily};font-size:${index$1.theme.sizes[3]};line-height:${index$1.theme.sizes[4]};color:${index$1.theme.colors.neutral.ink.light};`;
21
17
 
22
- exports.Button = StyledButton;
23
18
  exports.Container = Container;
24
19
  exports.Row = Row;
25
20
  exports.TextField = StyledTextField;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { Text } from '../Text';\nimport { TextField } from '../TextField';\nimport { Button } from '../Button';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst StyledButton = styled(Button)`\n padding: 0 6px;\n border-color: ${theme.colors.neutral.ink.lightest};\n`;\n\nconst Label = styled(Text)``;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField, StyledButton as Button, Label };\n"],"names":["styled","BaseContainer","TextField","theme","Button","Text"],"mappings":";;;;;;;;;;;;;AAQA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAQjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC,CAOrB,UAAA,CAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mEAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAIrD,MAAM,YAAY,GAAGH,uBAAM,CAACI,aAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAAD,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAGrCH,uBAAM,CAACK,SAAI,CAAC;AAEZL,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAERG,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,WAAA,EAC7BA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,aAAA,EACvBA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC3B,aAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CACjC,OAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,oEAOhBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAEP,kCAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI;AAI1CH,uBAAM,CAAC,IAAI,CAEP,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAAG,aAAK,CAAC,UAAU,cAClBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpBA,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;;;;"}
1
+ {"version":3,"file":"styled.cjs","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField };\n"],"names":["styled","BaseContainer","TextField","theme"],"mappings":";;;;;;;;;;;AAMA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAQjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC,CAOrB,UAAA,CAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mEAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAIvCH,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAERG,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,WAAA,EAC7BA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,aAAA,EACvBA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC3B,aAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CACjC,OAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,oEAOhBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAEP,kCAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI;AAI1CH,uBAAM,CAAC,IAAI,CAEP,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAAG,aAAK,CAAC,UAAU,cAClBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpBA,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;;;"}
@@ -303,16 +303,6 @@ declare const StyledTextField: import("styled-components").StyledComponent<impor
303
303
  size?: "base" | "sm" | undefined;
304
304
  multiline?: boolean | undefined;
305
305
  } & import("react").RefAttributes<HTMLInputElement> & import("../../hoc/withLabels/withLabels").WithLabelsProps>, any, {}, never>;
306
- declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
307
- children?: import("react").ReactNode;
308
- variant?: import("../Button/types").ButtonVariant | undefined;
309
- size?: "base" | "sm" | undefined;
310
- iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
311
- dropdown?: boolean | undefined;
312
- loading?: boolean | undefined;
313
- contentStyles?: import("react").CSSProperties | undefined;
314
- } & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
315
- declare const Label: import("styled-components").StyledComponent<"span", any, {} & import("../Text/types").TextProps, never>;
316
306
  declare const Error: import("styled-components").StyledComponent<"span", any, {}, never>;
317
307
  declare const Hint: import("styled-components").StyledComponent<"span", any, {}, never>;
318
- export { Container, Row, Error, Hint, StyledTextField as TextField, StyledButton as Button, Label };
308
+ export { Container, Row, Error, Hint, StyledTextField as TextField };
@@ -1,17 +1,13 @@
1
1
  import styled from 'styled-components';
2
- import { Text } from '../Text/Text.js';
3
2
  import { TextField } from '../TextField/index.js';
4
- import { Button } from '../Button/Button.js';
5
3
  import { BaseContainer } from '../BaseContainer/BaseContainer.js';
6
4
  import { theme } from '../../theme/index.js';
7
5
 
8
6
  const Container = styled(BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--oxhxoy" }) `display:flex;flex-direction:column;position:relative;`;
9
7
  const Row = styled(BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--w9sg63" }) `display:flex;align-items:center;margin-top:4px;gap:8px;`;
10
8
  const StyledTextField = styled(TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1dp86fg" }) `width:52px;margin:0;padding:0 6px;&&&{text-align:left;border-color:${theme.colors.neutral.ink.lightest};}`;
11
- const StyledButton = styled(Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--1h9einl" }) `padding:0 6px;border-color:${theme.colors.neutral.ink.lightest};`;
12
- styled(Text).withConfig({ displayName: "vui--Label", componentId: "vui--2iwwsg" }) ``;
13
- styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1ln478r" }) `display:block;font-family:${theme.text.error.fontFamily};font-size:${theme.text.error.fontSize};font-weight:${theme.text.error.fontWeight};line-height:${theme.text.error.lineHeight};color:${theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${theme.sizes[2]} * -1);width:2px;background-color:${theme.colors.secondary.red.base};}`;
14
- styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--5lfadq" }) `display:block;font-family:${theme.fontFamily};font-size:${theme.sizes[3]};line-height:${theme.sizes[4]};color:${theme.colors.neutral.ink.light};`;
9
+ styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1isax7l" }) `display:block;font-family:${theme.text.error.fontFamily};font-size:${theme.text.error.fontSize};font-weight:${theme.text.error.fontWeight};line-height:${theme.text.error.lineHeight};color:${theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${theme.sizes[2]} * -1);width:2px;background-color:${theme.colors.secondary.red.base};}`;
10
+ styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--gorpke" }) `display:block;font-family:${theme.fontFamily};font-size:${theme.sizes[3]};line-height:${theme.sizes[4]};color:${theme.colors.neutral.ink.light};`;
15
11
 
16
- export { StyledButton as Button, Container, Row, StyledTextField as TextField };
12
+ export { Container, Row, StyledTextField as TextField };
17
13
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { Text } from '../Text';\nimport { TextField } from '../TextField';\nimport { Button } from '../Button';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst StyledButton = styled(Button)`\n padding: 0 6px;\n border-color: ${theme.colors.neutral.ink.lightest};\n`;\n\nconst Label = styled(Text)``;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField, StyledButton as Button, Label };\n"],"names":[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CAAC,UAAU,cAClB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZ,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAQjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAOrB,UAAA,CAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mEAAA,EAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAIvC,MAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAER,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,WAAA,EAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,aAAA,EACvB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC3B,aAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CACjC,OAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,oEAOhB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAEP,kCAAA,EAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI;AAI1C,MAAM,CAAC,IAAI,CAEP,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAA,KAAK,CAAC,UAAU,cAClB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZ,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;"}
@@ -1,15 +1,12 @@
1
1
  import { ComponentSize } from '../types';
2
- export interface DimensionsProps {
2
+ export type DimensionsProps = {
3
3
  size?: ComponentSize;
4
4
  handleChangeHeight: (value: string) => void;
5
5
  handleChangeWidth: (value: string) => void;
6
6
  handleChangeLength: (value: string) => void;
7
- label?: string;
8
- hint?: string;
9
- error?: string;
10
7
  height: string;
11
8
  width: string;
12
9
  length: string;
13
10
  unit?: string;
14
11
  className?: string;
15
- }
12
+ };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var Text = require('../../../Text/Text.cjs');
5
+ var styled = require('./styled.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const InputGroupLabel = ({ id, unit, size }) => (React__default.default.createElement(styled.GroupLabelWrapper, { size: size },
12
+ React__default.default.createElement(Text.Text, { variant: "body", id: id }, unit)));
13
+
14
+ exports.InputGroupLabel = InputGroupLabel;
15
+ //# sourceMappingURL=InputGroupLabel.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputGroupLabel.cjs","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/InputGroupLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentSize } from 'src/components/types';\nimport { Text } from '../../../Text';\nimport { GroupLabelWrapper } from './styled';\n\ntype InputGroupLabelProps = {\n id?: string;\n unit: string;\n size: ComponentSize;\n};\n\nexport const InputGroupLabel = ({ id, unit, size }: InputGroupLabelProps) => (\n <GroupLabelWrapper size={size}>\n <Text variant=\"body\" id={id}>\n {unit}\n </Text>\n </GroupLabelWrapper>\n);\n"],"names":["React","GroupLabelWrapper","Text"],"mappings":";;;;;;;;;;MAWa,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAwB,MACtEA,qCAACC,wBAAiB,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA;AAC3B,IAAAD,sBAAA,CAAA,aAAA,CAACE,SAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,EACxB,EAAA,IAAI,CACA,CACW;;;;"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ComponentSize } from 'src/components/types';
3
+ type InputGroupLabelProps = {
4
+ id?: string;
5
+ unit: string;
6
+ size: ComponentSize;
7
+ };
8
+ export declare const InputGroupLabel: ({ id, unit, size }: InputGroupLabelProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Text } from '../../../Text/Text.js';
3
+ import { GroupLabelWrapper } from './styled.js';
4
+
5
+ const InputGroupLabel = ({ id, unit, size }) => (React.createElement(GroupLabelWrapper, { size: size },
6
+ React.createElement(Text, { variant: "body", id: id }, unit)));
7
+
8
+ export { InputGroupLabel };
9
+ //# sourceMappingURL=InputGroupLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputGroupLabel.js","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/InputGroupLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentSize } from 'src/components/types';\nimport { Text } from '../../../Text';\nimport { GroupLabelWrapper } from './styled';\n\ntype InputGroupLabelProps = {\n id?: string;\n unit: string;\n size: ComponentSize;\n};\n\nexport const InputGroupLabel = ({ id, unit, size }: InputGroupLabelProps) => (\n <GroupLabelWrapper size={size}>\n <Text variant=\"body\" id={id}>\n {unit}\n </Text>\n </GroupLabelWrapper>\n);\n"],"names":[],"mappings":";;;;MAWa,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAwB,MACtE,oBAAC,iBAAiB,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA;AAC3B,IAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,EACxB,EAAA,IAAI,CACA,CACW;;;;"}
@@ -0,0 +1 @@
1
+ export { InputGroupLabel } from './InputGroupLabel';
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var styled = require('styled-components');
4
+ var index = require('../../../../theme/index.cjs');
5
+
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
+
8
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
9
+
10
+ const GroupLabelWrapper = styled__default.default.div.withConfig({ displayName: "vui--GroupLabelWrapper", componentId: "vui--1nbjbcg" }) `display:flex;align-items:center;padding:0 6px;border:1px solid;border-color:${index.theme.colors.neutral.ink.lightest};border-radius:${index.theme.radius.base};`;
11
+
12
+ exports.GroupLabelWrapper = GroupLabelWrapper;
13
+ //# sourceMappingURL=styled.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.cjs","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/styled.ts"],"sourcesContent":["import { ComponentSize } from 'src/components/types';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const GroupLabelWrapper = styled.div<{ size: ComponentSize }>`\n display: flex;\n align-items: center;\n\n padding: 0 6px;\n\n border: 1px solid;\n border-color: ${theme.colors.neutral.ink.lightest};\n border-radius: ${theme.radius.base};\n`;\n"],"names":["styled","theme"],"mappings":";;;;;;;;;AAIa,MAAA,iBAAiB,GAAGA,uBAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,4EAAA,EAOzBC,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAChC,eAAA,EAAAA,WAAK,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ import { ComponentSize } from 'src/components/types';
2
+ export declare const GroupLabelWrapper: import("styled-components").StyledComponent<"div", any, {
3
+ size: ComponentSize;
4
+ }, never>;
@@ -0,0 +1,7 @@
1
+ import styled from 'styled-components';
2
+ import { theme } from '../../../../theme/index.js';
3
+
4
+ const GroupLabelWrapper = styled.div.withConfig({ displayName: "vui--GroupLabelWrapper", componentId: "vui--1nbjbcg" }) `display:flex;align-items:center;padding:0 6px;border:1px solid;border-color:${theme.colors.neutral.ink.lightest};border-radius:${theme.radius.base};`;
5
+
6
+ export { GroupLabelWrapper };
7
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/styled.ts"],"sourcesContent":["import { ComponentSize } from 'src/components/types';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const GroupLabelWrapper = styled.div<{ size: ComponentSize }>`\n display: flex;\n align-items: center;\n\n padding: 0 6px;\n\n border: 1px solid;\n border-color: ${theme.colors.neutral.ink.lightest};\n border-radius: ${theme.radius.base};\n`;\n"],"names":[],"mappings":";;;AAIa,MAAA,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,4EAAA,EAOzB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAChC,eAAA,EAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA;;;;"}
@@ -1,12 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var styled = require('styled-components');
4
+ require('react');
5
+ require('../Text/Text.cjs');
6
+ require('./components/InputGroupLabel/styled.cjs');
4
7
 
5
8
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
9
 
7
10
  var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
8
11
 
9
- const InputGroup = styled__default.default.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:hover{}& > *:focus,& > *:active{z-index:5;border-right-width:1px !important;}& > *:focus + *,& > *:active + *{border-left-width:0 !important;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
12
+ const InputGroup = styled__default.default.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:focus,& > *:active{z-index:5;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
10
13
 
11
14
  exports.InputGroup = InputGroup;
12
15
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:hover {\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n border-right-width: 1px !important;\n }\n\n & > *:focus + *,\n & > *:active + * {\n border-left-width: 0 !important;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":["styled"],"mappings":";;;;;;;;MAEa,UAAU,GAAGA,uBAAM,CAAC,GAAG;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport { InputGroupLabel } from './components/InputGroupLabel';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":["styled"],"mappings":";;;;;;;;;;;MAIa,UAAU,GAAGA,uBAAM,CAAC,GAAG;;;;"}
@@ -1 +1,2 @@
1
+ export { InputGroupLabel } from './components/InputGroupLabel';
1
2
  export declare const InputGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,6 +1,9 @@
1
1
  import styled from 'styled-components';
2
+ import 'react';
3
+ import '../Text/Text.js';
4
+ import './components/InputGroupLabel/styled.js';
2
5
 
3
- const InputGroup = styled.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:hover{}& > *:focus,& > *:active{z-index:5;border-right-width:1px !important;}& > *:focus + *,& > *:active + *{border-left-width:0 !important;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
6
+ const InputGroup = styled.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:focus,& > *:active{z-index:5;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
4
7
 
5
8
  export { InputGroup };
6
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:hover {\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n border-right-width: 1px !important;\n }\n\n & > *:focus + *,\n & > *:active + * {\n border-left-width: 0 !important;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":[],"mappings":";;MAEa,UAAU,GAAG,MAAM,CAAC,GAAG;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport { InputGroupLabel } from './components/InputGroupLabel';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":[],"mappings":";;;;;MAIa,UAAU,GAAG,MAAM,CAAC,GAAG;;;;"}
@@ -1,31 +1,32 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var index$1 = require('../../theme/index.cjs');
4
5
  var types = require('./types.cjs');
5
6
  var types$1 = require('../types.cjs');
6
7
  var index = require('../InputGroup/index.cjs');
7
- var withLabels = require('../../hoc/withLabels/withLabels.cjs');
8
8
  var styled = require('./styled.cjs');
9
9
  var blockInvalidCharacters = require('../../utils/blockInvalidCharacters.cjs');
10
10
  var invalidCharactersNumeric = require('../../utils/invalidCharactersNumeric.cjs');
11
+ var InputGroupLabel = require('../InputGroup/components/InputGroupLabel/InputGroupLabel.cjs');
11
12
 
12
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
14
 
14
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
16
 
16
17
  const blockInvalidChars = (e) => blockInvalidCharacters.blockInvalidCharacters(e, invalidCharactersNumeric.invalidCharsList);
17
- const WeightInput = withLabels.withLabels(({ size = types$1.ComponentSize.base, hasError, className, ...rest }) => (React__default.default.createElement(styled.Container, { className: className },
18
+ const WeightInput = ({ size = types$1.ComponentSize.base, hasError, className, ...rest }) => (React__default.default.createElement(styled.Container, { className: className, role: "group", "aria-label": "Weight" },
18
19
  React__default.default.createElement(styled.Row, null,
19
20
  types.isWeightMetric(rest) && (React__default.default.createElement(index.InputGroup, null,
20
- React__default.default.createElement(styled.TextField, { size: size, onChange: rest.handleChangeGram, name: "gram", type: "number", value: rest.gram, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
21
- React__default.default.createElement(styled.Button, { hasError: hasError, size: size }, "g"))),
21
+ React__default.default.createElement(styled.TextField, { name: "gram", type: "number", value: rest.gram, "aria-label": "Grams", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeGram, onKeyDown: blockInvalidChars }),
22
+ React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "g", size: size }))),
22
23
  types.isWeightImperial(rest) && (React__default.default.createElement(React__default.default.Fragment, null,
24
+ React__default.default.createElement(index.InputGroup, { style: { marginRight: index$1.theme.sizes.xs } },
25
+ React__default.default.createElement(styled.TextField, { name: "pound", type: "number", value: rest.pound, "aria-label": "Pounds", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangePound, onKeyDown: blockInvalidChars }),
26
+ React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "lb", size: size })),
23
27
  React__default.default.createElement(index.InputGroup, null,
24
- React__default.default.createElement(styled.TextField, { size: size, onChange: rest.handleChangePound, name: "pound", type: "number", value: rest.pound, hasError: hasError, step: "any", min: "0", onKeyDown: blockInvalidChars, ...rest }),
25
- React__default.default.createElement(styled.Button, { hasError: hasError, size: size }, "lb")),
26
- React__default.default.createElement(index.InputGroup, null,
27
- React__default.default.createElement(styled.TextField, { size: size, onChange: rest.handleChangeOunce, name: "ounce", type: "number", value: rest.ounce, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
28
- React__default.default.createElement(styled.Button, { hasError: hasError, size: size }, "oz"))))))));
28
+ React__default.default.createElement(styled.TextField, { name: "ounce", type: "number", value: rest.ounce, "aria-label": "Ounces", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeOunce, onKeyDown: blockInvalidChars }),
29
+ React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "oz", size: size })))))));
29
30
  WeightInput.displayName = 'WeightInput';
30
31
  WeightInput.defaultProps = {
31
32
  weightUnit: 'lb',
@@ -1 +1 @@
1
- {"version":3,"file":"WeightInput.cjs","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup } from '../InputGroup';\nimport { withLabels } from '../../hoc';\n\nimport { Container, TextField, Row, Button } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\nexport const WeightInput: FC<WeightProps> = withLabels(\n ({ size = ComponentSize.base, hasError, className, ...rest }: WeightProps) => (\n <Container className={className}>\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangeGram}\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n hasError={hasError}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n g\n </Button>\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangePound}\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n hasError={hasError}\n step=\"any\"\n min=\"0\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n lb\n </Button>\n </InputGroup>\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangeOunce}\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n hasError={hasError}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n oz\n </Button>\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n ),\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["blockInvalidCharacters","invalidCharsList","withLabels","ComponentSize","React","Container","Row","isWeightMetric","InputGroup","TextField","Button","isWeightImperial"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAKA,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AI,EAAC,KAAK,EACV,GAAG,EAAC,GAAG,EACP,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;gBACFL,sBAAC,CAAA,aAAA,CAAAM,aAAM,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAA,EAAA,IAAA,CAE7B,CACE;AACb,YAAAN,sBAAA,CAAA,aAAA,CAACI,gBAAU,EAAA,IAAA;AACT,gBAAAJ,sBAAA,CAAA,aAAA,CAACK,gBAAS,EACR,EAAA,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,gBAAAL,sBAAA,CAAA,aAAA,CAACM,aAAM,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAA,EAAA,IAAA,CAE7B,CACE,CACZ,CACJ,CACG,CACI,CACb;AAGH,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
1
+ {"version":3,"file":"WeightInput.cjs","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["blockInvalidCharacters","invalidCharsList","ComponentSize","React","Container","Row","isWeightMetric","InputGroup","TextField","InputGroupLabel","isWeightImperial","theme"],"mappings":";;;;;;;;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAKA,6CAAsB,CAAC,CAAC,EAAEC,yCAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAGC,qBAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACK,MACZC,qCAACC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AA,CAAAM,+BAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B;AACb,YAAAN,sBAAA,CAAA,aAAA,CAACI,gBAAU,EAAA,IAAA;AACT,gBAAAJ,sBAAA,CAAA,aAAA,CAACK,gBAAS,EACR,EAAA,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,gBACN,QAAQ,EACnB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,SAAS,EAAE,iBAAiB,EAC5B,CAAA;AACF,gBAAAL,sBAAA,CAAA,aAAA,CAACM,+BAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B,CACZ,CACJ,CACG,CACI;AAGd,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
@@ -1,25 +1,26 @@
1
1
  import React from 'react';
2
+ import { theme } from '../../theme/index.js';
2
3
  import { isWeightMetric, isWeightImperial } from './types.js';
3
4
  import { ComponentSize } from '../types.js';
4
5
  import { InputGroup } from '../InputGroup/index.js';
5
- import { withLabels } from '../../hoc/withLabels/withLabels.js';
6
- import { Container, Row, TextField as StyledTextField, Button as StyledButton } from './styled.js';
6
+ import { Container, Row, TextField as StyledTextField } from './styled.js';
7
7
  import { blockInvalidCharacters } from '../../utils/blockInvalidCharacters.js';
8
8
  import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
9
+ import { InputGroupLabel } from '../InputGroup/components/InputGroupLabel/InputGroupLabel.js';
9
10
 
10
11
  const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
11
- const WeightInput = withLabels(({ size = ComponentSize.base, hasError, className, ...rest }) => (React.createElement(Container, { className: className },
12
+ const WeightInput = ({ size = ComponentSize.base, hasError, className, ...rest }) => (React.createElement(Container, { className: className, role: "group", "aria-label": "Weight" },
12
13
  React.createElement(Row, null,
13
14
  isWeightMetric(rest) && (React.createElement(InputGroup, null,
14
- React.createElement(StyledTextField, { size: size, onChange: rest.handleChangeGram, name: "gram", type: "number", value: rest.gram, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
15
- React.createElement(StyledButton, { hasError: hasError, size: size }, "g"))),
15
+ React.createElement(StyledTextField, { name: "gram", type: "number", value: rest.gram, "aria-label": "Grams", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeGram, onKeyDown: blockInvalidChars }),
16
+ React.createElement(InputGroupLabel, { unit: "g", size: size }))),
16
17
  isWeightImperial(rest) && (React.createElement(React.Fragment, null,
18
+ React.createElement(InputGroup, { style: { marginRight: theme.sizes.xs } },
19
+ React.createElement(StyledTextField, { name: "pound", type: "number", value: rest.pound, "aria-label": "Pounds", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangePound, onKeyDown: blockInvalidChars }),
20
+ React.createElement(InputGroupLabel, { unit: "lb", size: size })),
17
21
  React.createElement(InputGroup, null,
18
- React.createElement(StyledTextField, { size: size, onChange: rest.handleChangePound, name: "pound", type: "number", value: rest.pound, hasError: hasError, step: "any", min: "0", onKeyDown: blockInvalidChars, ...rest }),
19
- React.createElement(StyledButton, { hasError: hasError, size: size }, "lb")),
20
- React.createElement(InputGroup, null,
21
- React.createElement(StyledTextField, { size: size, onChange: rest.handleChangeOunce, name: "ounce", type: "number", value: rest.ounce, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
22
- React.createElement(StyledButton, { hasError: hasError, size: size }, "oz"))))))));
22
+ React.createElement(StyledTextField, { name: "ounce", type: "number", value: rest.ounce, "aria-label": "Ounces", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeOunce, onKeyDown: blockInvalidChars }),
23
+ React.createElement(InputGroupLabel, { unit: "oz", size: size })))))));
23
24
  WeightInput.displayName = 'WeightInput';
24
25
  WeightInput.defaultProps = {
25
26
  weightUnit: 'lb',
@@ -1 +1 @@
1
- {"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup } from '../InputGroup';\nimport { withLabels } from '../../hoc';\n\nimport { Container, TextField, Row, Button } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\nexport const WeightInput: FC<WeightProps> = withLabels(\n ({ size = ComponentSize.base, hasError, className, ...rest }: WeightProps) => (\n <Container className={className}>\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangeGram}\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n hasError={hasError}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n g\n </Button>\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangePound}\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n hasError={hasError}\n step=\"any\"\n min=\"0\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n lb\n </Button>\n </InputGroup>\n <InputGroup>\n <TextField\n size={size}\n onChange={rest.handleChangeOunce}\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n hasError={hasError}\n min=\"0\"\n step=\"any\"\n onKeyDown={blockInvalidChars}\n {...rest}\n />\n <Button hasError={hasError} size={size}>\n oz\n </Button>\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n ),\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["TextField","Button"],"mappings":";;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AAC1F,MAAM,WAAW,GAAoB,UAAU,CACpD,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAe,MACvE,KAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,SAAS,EAAE,SAAS,EAAA;AAC7B,IAAA,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,IAAA;AACD,QAAA,cAAc,CAAC,IAAI,CAAC,KACnB,oBAAC,UAAU,EAAA,IAAA;AACT,YAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;YACF,KAAC,CAAA,aAAA,CAAAC,YAAM,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAE7B,EAAA,GAAA,CAAA,CACE,CACd;AAEA,QAAA,gBAAgB,CAAC,IAAI,CAAC,KACrB,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA;AACE,YAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;AACT,gBAAA,KAAA,CAAA,aAAA,CAACD,eAAS,EACR,EAAA,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,KAAK,EACV,GAAG,EAAC,GAAG,EACP,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;gBACF,KAAC,CAAA,aAAA,CAAAC,YAAM,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAA,EAAA,IAAA,CAE7B,CACE;AACb,YAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;AACT,gBAAA,KAAA,CAAA,aAAA,CAACD,eAAS,EACR,EAAA,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,SAAS,EAAE,iBAAiB,EAAA,GACxB,IAAI,EACR,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAACC,YAAM,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAA,EAAA,IAAA,CAE7B,CACE,CACZ,CACJ,CACG,CACI,CACb;AAGH,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
1
+ {"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["TextField"],"mappings":";;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,E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,CAAA,eAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B;AACb,YAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;AACT,gBAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,gBACN,QAAQ,EACnB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,SAAS,EAAE,iBAAiB,EAC5B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B,CACZ,CACJ,CACG,CACI;AAGd,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var withLabels = require('../../hoc/withLabels/withLabels.cjs');
4
+ require('react');
5
+ var WeightInput$1 = require('./WeightInput.cjs');
6
+
7
+ const WeightInput = withLabels.withLabels(WeightInput$1.WeightInput);
8
+
9
+ exports.WeightInput = WeightInput;
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/WeightInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { WeightInput as BaseWeightInput } from './WeightInput';\n\nexport const WeightInput = withLabels(BaseWeightInput);\n"],"names":["withLabels","BaseWeightInput"],"mappings":";;;;;;MAGa,WAAW,GAAGA,qBAAU,CAACC,yBAAe;;;;"}
@@ -1 +1,2 @@
1
- export { WeightInput } from './WeightInput';
1
+ /// <reference types="react" />
2
+ export declare const WeightInput: import("react").FC<import("./types").WeightProps & import("../../hoc/withLabels/withLabels").WithLabelsProps>;
@@ -0,0 +1,8 @@
1
+ import { withLabels } from '../../hoc/withLabels/withLabels.js';
2
+ import 'react';
3
+ import { WeightInput as WeightInput$1 } from './WeightInput.js';
4
+
5
+ const WeightInput = withLabels(WeightInput$1);
6
+
7
+ export { WeightInput };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/WeightInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { WeightInput as BaseWeightInput } from './WeightInput';\n\nexport const WeightInput = withLabels(BaseWeightInput);\n"],"names":["BaseWeightInput"],"mappings":";;;;MAGa,WAAW,GAAG,UAAU,CAACA,aAAe;;;;"}
@@ -13,12 +13,11 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
13
13
  const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--18asccd" }) `display:flex;flex-direction:column;position:relative;`;
14
14
  const Row = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--hefld1" }) `display:flex;flex-direction:row;`;
15
15
  const StyledTextField = styled__default.default(index.TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1w2y0ok" }) `&&&{text-align:left;width:52px;}`;
16
- const StyledButton = styled__default.default(Button.Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${index$1.theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
16
+ styled__default.default(Button.Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${index$1.theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
17
17
  `
18
18
  border-color: ${index$1.theme.colors.secondary.red.base};
19
19
  `};`;
20
20
 
21
- exports.Button = StyledButton;
22
21
  exports.Container = Container;
23
22
  exports.Row = Row;
24
23
  exports.TextField = StyledTextField;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":["styled","BaseContainer","TextField","Button","theme"],"mappings":";;;;;;;;;;;;AAQA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAKjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC;AAOnC,MAAA,YAAY,GAAGF,uBAAM,CAACG,aAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;;;;"}
1
+ {"version":3,"file":"styled.cjs","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":["styled","BaseContainer","TextField","Button","theme"],"mappings":";;;;;;;;;;;;AAQA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAKjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC;AAOpBF,uBAAM,CAACG,aAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;;;"}
@@ -7,10 +7,10 @@ import { BaseContainer } from '../BaseContainer/BaseContainer.js';
7
7
  const Container = styled(BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--18asccd" }) `display:flex;flex-direction:column;position:relative;`;
8
8
  const Row = styled(BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--hefld1" }) `display:flex;flex-direction:row;`;
9
9
  const StyledTextField = styled(TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1w2y0ok" }) `&&&{text-align:left;width:52px;}`;
10
- const StyledButton = styled(Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
10
+ styled(Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
11
11
  `
12
12
  border-color: ${theme.colors.secondary.red.base};
13
13
  `};`;
14
14
 
15
- export { StyledButton as Button, Container, Row, StyledTextField as TextField };
15
+ export { Container, Row, StyledTextField as TextField };
16
16
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAKjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC;AAOnC,MAAA,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAKjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC;AAOpB,MAAM,CAAC,MAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;"}
package/dist/index.cjs CHANGED
@@ -34,12 +34,12 @@ var useScrollPosition = require('./components/DataTable/hooks/useScrollPosition.
34
34
  var useSelection = require('./components/DataTable/hooks/useSelection.cjs');
35
35
  var DescriptionList = require('./components/DescriptionList/DescriptionList.cjs');
36
36
  var DetailPage = require('./components/DetailPage/DetailPage.cjs');
37
- var DimensionsInput = require('./components/DimensionsInput/DimensionsInput.cjs');
37
+ var index$1 = require('./components/DimensionsInput/index.cjs');
38
38
  var Dropdown = require('./components/Dropdown/Dropdown.cjs');
39
39
  var FilterTag = require('./components/FilterTag/FilterTag.cjs');
40
- var index$1 = require('./components/Grid/index.cjs');
40
+ var index$2 = require('./components/Grid/index.cjs');
41
41
  var Image = require('./components/Image/Image.cjs');
42
- var index$2 = require('./components/InputGroup/index.cjs');
42
+ var index$3 = require('./components/InputGroup/index.cjs');
43
43
  var LegacyDataTable = require('./components/LegacyDataTable/LegacyDataTable.cjs');
44
44
  var Loader = require('./components/Loader/Loader.cjs');
45
45
  var LoginWithAmazonButton = require('./components/LoginWithAmazonButton/LoginWithAmazonButton.cjs');
@@ -61,7 +61,7 @@ var Stack = require('./components/Stack/Stack.cjs');
61
61
  var Stepper = require('./components/Stepper/Stepper.cjs');
62
62
  var Tag = require('./components/Tag/Tag.cjs');
63
63
  var Text = require('./components/Text/Text.cjs');
64
- var index$3 = require('./components/TextField/index.cjs');
64
+ var index$4 = require('./components/TextField/index.cjs');
65
65
  var ToastsLayout = require('./components/ToastsLayout/ToastsLayout.cjs');
66
66
  var Toggle = require('./components/Toggle/Toggle.cjs');
67
67
  var ToggleButton = require('./components/ToggleButton/ToggleButton.cjs');
@@ -73,7 +73,7 @@ var Popup = require('./components/VideoModal/components/Popup.cjs');
73
73
  var View = require('./components/View/View.cjs');
74
74
  var ViewTab = require('./components/ViewTab/ViewTab.cjs');
75
75
  var ViewsContainer = require('./components/ViewsContainer/ViewsContainer.cjs');
76
- var WeightInput = require('./components/WeightInput/WeightInput.cjs');
76
+ var index$5 = require('./components/WeightInput/index.cjs');
77
77
  var Indicator = require('./components/Indicator/Indicator.cjs');
78
78
  var useClickOutside = require('./hooks/useClickOutside.cjs');
79
79
  var useDebounce = require('./hooks/useDebounce.cjs');
@@ -89,7 +89,7 @@ var buildClassnames = require('./utils/buildClassnames.cjs');
89
89
  var color = require('./utils/color.cjs');
90
90
  var generateId = require('./utils/generateId.cjs');
91
91
  var isExternalLink = require('./utils/isExternalLink.cjs');
92
- var index$4 = require('./theme/index.cjs');
92
+ var index$6 = require('./theme/index.cjs');
93
93
  var utils = require('./theme/utils.cjs');
94
94
 
95
95
 
@@ -135,12 +135,12 @@ exports.useScrollPosition = useScrollPosition.useScrollPosition;
135
135
  exports.useSelection = useSelection.useSelection;
136
136
  exports.DescriptionList = DescriptionList.DescriptionList;
137
137
  exports.DetailPage = DetailPage.DetailPage;
138
- exports.DimensionsInput = DimensionsInput.DimensionsInput;
138
+ exports.DimensionsInput = index$1.DimensionsInput;
139
139
  exports.Dropdown = Dropdown.Dropdown;
140
140
  exports.FilterTag = FilterTag.FilterTag;
141
- exports.Grid = index$1.Grid;
141
+ exports.Grid = index$2.Grid;
142
142
  exports.Image = Image.Image;
143
- exports.InputGroup = index$2.InputGroup;
143
+ exports.InputGroup = index$3.InputGroup;
144
144
  exports.LegacyDataTable = LegacyDataTable.LegacyDataTable;
145
145
  exports.Loader = Loader.Loader;
146
146
  exports.LoginWithAmazonButton = LoginWithAmazonButton.LoginWithAmazonButton;
@@ -162,7 +162,7 @@ exports.Stack = Stack.Stack;
162
162
  exports.Stepper = Stepper.Stepper;
163
163
  exports.Tag = Tag.Tag;
164
164
  exports.Text = Text.Text;
165
- exports.TextField = index$3.TextField;
165
+ exports.TextField = index$4.TextField;
166
166
  exports.ToastsLayout = ToastsLayout.ToastsLayout;
167
167
  exports.Toggle = Toggle.Toggle;
168
168
  exports.ToggleButton = ToggleButton.ToggleButton;
@@ -181,7 +181,7 @@ exports.Popup = Popup.Popup;
181
181
  exports.View = View.View;
182
182
  exports.ViewTab = ViewTab.ViewTab;
183
183
  exports.ViewsContainer = ViewsContainer.ViewsContainer;
184
- exports.WeightInput = WeightInput.WeightInput;
184
+ exports.WeightInput = index$5.WeightInput;
185
185
  exports.Indicator = Indicator.Indicator;
186
186
  exports.useClickOutside = useClickOutside.useClickOutside;
187
187
  exports.useDebounce = useDebounce.useDebounce;
@@ -199,6 +199,6 @@ exports.getOpaqueHexColor = color.getOpaqueHexColor;
199
199
  exports.hexToRgb = color.hexToRgb;
200
200
  exports.generateId = generateId.generateId;
201
201
  exports.isExternalLink = isExternalLink.isExternalLink;
202
- exports.theme = index$4.theme;
202
+ exports.theme = index$6.theme;
203
203
  exports.getTextStyles = utils.getTextStyles;
204
204
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ export { useScrollPosition } from './components/DataTable/hooks/useScrollPositio
32
32
  export { useSelection } from './components/DataTable/hooks/useSelection.js';
33
33
  export { DescriptionList } from './components/DescriptionList/DescriptionList.js';
34
34
  export { DetailPage } from './components/DetailPage/DetailPage.js';
35
- export { DimensionsInput } from './components/DimensionsInput/DimensionsInput.js';
35
+ export { DimensionsInput } from './components/DimensionsInput/index.js';
36
36
  export { Dropdown } from './components/Dropdown/Dropdown.js';
37
37
  export { FilterTag } from './components/FilterTag/FilterTag.js';
38
38
  export { Grid } from './components/Grid/index.js';
@@ -71,7 +71,7 @@ export { Popup } from './components/VideoModal/components/Popup.js';
71
71
  export { View } from './components/View/View.js';
72
72
  export { ViewTab } from './components/ViewTab/ViewTab.js';
73
73
  export { ViewsContainer } from './components/ViewsContainer/ViewsContainer.js';
74
- export { WeightInput } from './components/WeightInput/WeightInput.js';
74
+ export { WeightInput } from './components/WeightInput/index.js';
75
75
  export { Indicator } from './components/Indicator/Indicator.js';
76
76
  export { useClickOutside } from './hooks/useClickOutside.js';
77
77
  export { useDebounce } from './hooks/useDebounce.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -137,4 +137,4 @@
137
137
  "react": "$react"
138
138
  }
139
139
  }
140
- }
140
+ }