@veeqo/ui 10.0.0-beta.3 → 10.0.0-beta.4

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 (192) hide show
  1. package/dist/components/Accordion/Accordion.cjs +4 -4
  2. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +4 -4
  4. package/dist/components/Accordion/Accordion.js.map +1 -1
  5. package/dist/components/Alerts/Alert/Alert.cjs +1 -0
  6. package/dist/components/Alerts/Alert/Alert.cjs.map +1 -1
  7. package/dist/components/Alerts/Alert/Alert.js +1 -0
  8. package/dist/components/Alerts/Alert/Alert.js.map +1 -1
  9. package/dist/components/Alerts/Alert/styled.cjs +1 -0
  10. package/dist/components/Alerts/Alert/styled.cjs.map +1 -1
  11. package/dist/components/Alerts/Alert/styled.d.ts +1 -1
  12. package/dist/components/Alerts/Alert/styled.js +1 -0
  13. package/dist/components/Alerts/Alert/styled.js.map +1 -1
  14. package/dist/components/AnimatedDropdown/AnimatedDropdown.cjs +4 -0
  15. package/dist/components/AnimatedDropdown/AnimatedDropdown.cjs.map +1 -1
  16. package/dist/components/AnimatedDropdown/AnimatedDropdown.d.ts +4 -0
  17. package/dist/components/AnimatedDropdown/AnimatedDropdown.js +4 -0
  18. package/dist/components/AnimatedDropdown/AnimatedDropdown.js.map +1 -1
  19. package/dist/components/Calendars/components/subcomponents/CalendarHeader.cjs +1 -0
  20. package/dist/components/Calendars/components/subcomponents/CalendarHeader.cjs.map +1 -1
  21. package/dist/components/Calendars/components/subcomponents/CalendarHeader.js +1 -0
  22. package/dist/components/Calendars/components/subcomponents/CalendarHeader.js.map +1 -1
  23. package/dist/components/Choice/Choice.cjs +1 -0
  24. package/dist/components/Choice/Choice.cjs.map +1 -1
  25. package/dist/components/Choice/Choice.js +1 -0
  26. package/dist/components/Choice/Choice.js.map +1 -1
  27. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs +1 -0
  28. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs.map +1 -1
  29. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js +1 -0
  30. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js.map +1 -1
  31. package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs +1 -0
  32. package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs.map +1 -1
  33. package/dist/components/DataGrid/components/GridContainer/GridContainer.js +1 -0
  34. package/dist/components/DataGrid/components/GridContainer/GridContainer.js.map +1 -1
  35. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs +1 -0
  36. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs.map +1 -1
  37. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js +1 -0
  38. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js.map +1 -1
  39. package/dist/components/DataTable/DataTable.cjs +1 -0
  40. package/dist/components/DataTable/DataTable.cjs.map +1 -1
  41. package/dist/components/DataTable/DataTable.js +1 -0
  42. package/dist/components/DataTable/DataTable.js.map +1 -1
  43. package/dist/components/DataTable/components/ColumnMenu.cjs +1 -0
  44. package/dist/components/DataTable/components/ColumnMenu.cjs.map +1 -1
  45. package/dist/components/DataTable/components/ColumnMenu.js +1 -0
  46. package/dist/components/DataTable/components/ColumnMenu.js.map +1 -1
  47. package/dist/components/DateInputField/DateInputField.cjs +1 -0
  48. package/dist/components/DateInputField/DateInputField.cjs.map +1 -1
  49. package/dist/components/DateInputField/DateInputField.js +1 -0
  50. package/dist/components/DateInputField/DateInputField.js.map +1 -1
  51. package/dist/components/DatePicker/DatePicker.cjs +1 -0
  52. package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
  53. package/dist/components/DatePicker/DatePicker.js +1 -0
  54. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  55. package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -0
  56. package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
  57. package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
  58. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  59. package/dist/components/DimensionsInput/DimensionsInput.cjs +52 -13
  60. package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
  61. package/dist/components/DimensionsInput/DimensionsInput.d.ts +1 -1
  62. package/dist/components/DimensionsInput/DimensionsInput.js +52 -13
  63. package/dist/components/DimensionsInput/DimensionsInput.js.map +1 -1
  64. package/dist/components/Dropdown/styled.cjs +1 -1
  65. package/dist/components/Dropdown/styled.cjs.map +1 -1
  66. package/dist/components/Dropdown/styled.js +1 -1
  67. package/dist/components/Dropdown/styled.js.map +1 -1
  68. package/dist/components/Flex/FlexSpacer/FlexSpacer.cjs +15 -0
  69. package/dist/components/Flex/FlexSpacer/FlexSpacer.cjs.map +1 -0
  70. package/dist/components/Flex/FlexSpacer/FlexSpacer.d.ts +2 -0
  71. package/dist/components/Flex/FlexSpacer/FlexSpacer.js +9 -0
  72. package/dist/components/Flex/FlexSpacer/FlexSpacer.js.map +1 -0
  73. package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.cjs +9 -0
  74. package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.cjs.map +1 -0
  75. package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.js +7 -0
  76. package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.js.map +1 -0
  77. package/dist/components/Flex/FlexSpacer/index.d.ts +1 -0
  78. package/dist/components/InputAffix/InputAffix.cjs.map +1 -1
  79. package/dist/components/InputAffix/InputAffix.d.ts +1 -2
  80. package/dist/components/InputAffix/InputAffix.js.map +1 -1
  81. package/dist/components/InputGroup/index.cjs.map +1 -1
  82. package/dist/components/InputGroup/index.d.ts +3 -1
  83. package/dist/components/InputGroup/index.js.map +1 -1
  84. package/dist/components/Modal/Modal.cjs +1 -0
  85. package/dist/components/Modal/Modal.cjs.map +1 -1
  86. package/dist/components/Modal/Modal.js +1 -0
  87. package/dist/components/Modal/Modal.js.map +1 -1
  88. package/dist/components/Pagination/Pagination.cjs +1 -0
  89. package/dist/components/Pagination/Pagination.cjs.map +1 -1
  90. package/dist/components/Pagination/Pagination.js +1 -0
  91. package/dist/components/Pagination/Pagination.js.map +1 -1
  92. package/dist/components/Pagination/styled.cjs +1 -0
  93. package/dist/components/Pagination/styled.cjs.map +1 -1
  94. package/dist/components/Pagination/styled.d.ts +2 -2
  95. package/dist/components/Pagination/styled.js +1 -0
  96. package/dist/components/Pagination/styled.js.map +1 -1
  97. package/dist/components/PriceInput/PriceInput.cjs +4 -3
  98. package/dist/components/PriceInput/PriceInput.cjs.map +1 -1
  99. package/dist/components/PriceInput/PriceInput.js +4 -3
  100. package/dist/components/PriceInput/PriceInput.js.map +1 -1
  101. package/dist/components/Search/Search.cjs +11 -7
  102. package/dist/components/Search/Search.cjs.map +1 -1
  103. package/dist/components/Search/Search.d.ts +307 -2
  104. package/dist/components/Search/Search.js +11 -7
  105. package/dist/components/Search/Search.js.map +1 -1
  106. package/dist/components/Search/styled.d.ts +1 -1
  107. package/dist/components/Search/types.d.ts +0 -2
  108. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs +1 -0
  109. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs.map +1 -1
  110. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js +1 -0
  111. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js.map +1 -1
  112. package/dist/components/SelectDropdown/ListItem/styled.cjs +1 -0
  113. package/dist/components/SelectDropdown/ListItem/styled.cjs.map +1 -1
  114. package/dist/components/SelectDropdown/ListItem/styled.d.ts +2 -2
  115. package/dist/components/SelectDropdown/ListItem/styled.js +1 -0
  116. package/dist/components/SelectDropdown/ListItem/styled.js.map +1 -1
  117. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs +1 -0
  118. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs.map +1 -1
  119. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js +1 -0
  120. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js.map +1 -1
  121. package/dist/components/SelectDropdown/styled.d.ts +307 -1
  122. package/dist/components/Stack/index.d.ts +1 -0
  123. package/dist/components/Stack/types.cjs +38 -0
  124. package/dist/components/Stack/types.cjs.map +1 -0
  125. package/dist/components/Stack/types.js +36 -0
  126. package/dist/components/Stack/types.js.map +1 -0
  127. package/dist/components/Stepper/styled.cjs +3 -2
  128. package/dist/components/Stepper/styled.cjs.map +1 -1
  129. package/dist/components/Stepper/styled.d.ts +2 -2
  130. package/dist/components/Stepper/styled.js +3 -2
  131. package/dist/components/Stepper/styled.js.map +1 -1
  132. package/dist/components/TextField/index.cjs.map +1 -1
  133. package/dist/components/TextField/index.d.ts +1 -0
  134. package/dist/components/TextField/index.js.map +1 -1
  135. package/dist/components/ToastsLayout/components/styled.cjs +1 -0
  136. package/dist/components/ToastsLayout/components/styled.cjs.map +1 -1
  137. package/dist/components/ToastsLayout/components/styled.d.ts +3 -3
  138. package/dist/components/ToastsLayout/components/styled.js +1 -0
  139. package/dist/components/ToastsLayout/components/styled.js.map +1 -1
  140. package/dist/components/UploadFile/UploadFile.cjs +1 -0
  141. package/dist/components/UploadFile/UploadFile.cjs.map +1 -1
  142. package/dist/components/UploadFile/UploadFile.js +1 -0
  143. package/dist/components/UploadFile/UploadFile.js.map +1 -1
  144. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs +1 -0
  145. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs.map +1 -1
  146. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js +1 -0
  147. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js.map +1 -1
  148. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs +1 -0
  149. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs.map +1 -1
  150. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js +1 -0
  151. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js.map +1 -1
  152. package/dist/components/UploadFile/components/UploadedFile/styled.cjs +1 -0
  153. package/dist/components/UploadFile/components/UploadedFile/styled.cjs.map +1 -1
  154. package/dist/components/UploadFile/components/UploadedFile/styled.d.ts +1 -1
  155. package/dist/components/UploadFile/components/UploadedFile/styled.js +1 -0
  156. package/dist/components/UploadFile/components/UploadedFile/styled.js.map +1 -1
  157. package/dist/components/ViewsContainer/styled.cjs +1 -0
  158. package/dist/components/ViewsContainer/styled.cjs.map +1 -1
  159. package/dist/components/ViewsContainer/styled.d.ts +3 -3
  160. package/dist/components/ViewsContainer/styled.js +1 -0
  161. package/dist/components/ViewsContainer/styled.js.map +1 -1
  162. package/dist/components/WeightInput/WeightInput.cjs +53 -16
  163. package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
  164. package/dist/components/WeightInput/WeightInput.js +53 -16
  165. package/dist/components/WeightInput/WeightInput.js.map +1 -1
  166. package/dist/components/WeightInput/types.cjs.map +1 -1
  167. package/dist/components/WeightInput/types.d.ts +1 -0
  168. package/dist/components/WeightInput/types.js.map +1 -1
  169. package/dist/hoc/withLabels/styled.cjs +5 -3
  170. package/dist/hoc/withLabels/styled.cjs.map +1 -1
  171. package/dist/hoc/withLabels/styled.d.ts +1 -1
  172. package/dist/hoc/withLabels/styled.js +5 -3
  173. package/dist/hoc/withLabels/styled.js.map +1 -1
  174. package/dist/hoc/withLabels/withLabels.cjs +1 -0
  175. package/dist/hoc/withLabels/withLabels.cjs.map +1 -1
  176. package/dist/hoc/withLabels/withLabels.js +1 -0
  177. package/dist/hoc/withLabels/withLabels.js.map +1 -1
  178. package/dist/index.cjs +1 -0
  179. package/dist/index.cjs.map +1 -1
  180. package/dist/index.js +1 -0
  181. package/dist/index.js.map +1 -1
  182. package/package.json +1 -1
  183. package/dist/components/DimensionsInput/styled.cjs +0 -21
  184. package/dist/components/DimensionsInput/styled.cjs.map +0 -1
  185. package/dist/components/DimensionsInput/styled.d.ts +0 -308
  186. package/dist/components/DimensionsInput/styled.js +0 -13
  187. package/dist/components/DimensionsInput/styled.js.map +0 -1
  188. package/dist/components/WeightInput/styled.cjs +0 -24
  189. package/dist/components/WeightInput/styled.cjs.map +0 -1
  190. package/dist/components/WeightInput/styled.d.ts +0 -317
  191. package/dist/components/WeightInput/styled.js +0 -16
  192. package/dist/components/WeightInput/styled.js.map +0 -1
@@ -1,29 +1,66 @@
1
1
  import React__default from 'react';
2
2
  import { withLabels } from '../../hoc/withLabels/withLabels.js';
3
- import { isWeightMetric, isWeightImperial } from './types.js';
4
- import { InputGroup } from '../InputGroup/index.js';
5
- import { Container, Row, TextField as StyledTextField } from './styled.js';
6
3
  import { blockInvalidCharacters } from '../../utils/blockInvalidCharacters.js';
7
4
  import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
8
5
  import { Stack } from '../Stack/Stack.js';
6
+ import '../Stack/types.js';
7
+ import { FlexSpacer } from '../Flex/FlexSpacer/FlexSpacer.js';
8
+ import { InputGroup } from '../InputGroup/index.js';
9
9
  import { InputAffix } from '../InputAffix/InputAffix.js';
10
+ import { TextField } from '../TextField/index.js';
11
+ import { isWeightMetric, isWeightImperial } from './types.js';
10
12
 
13
+ const flexStyle = { flex: 1 };
11
14
  const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
12
15
  const WeightInput = withLabels((props) => {
13
- const { size = 'base', hasError, disabled, className } = props;
16
+ const { size = 'base', fullWidth = false, hasError, disabled, className } = props;
14
17
  const compact = size === 'sm';
15
- return (React__default.createElement(Container, { className: className, role: "group", "aria-label": "Weight" },
16
- React__default.createElement(Row, null,
17
- isWeightMetric(props) && (React__default.createElement(InputGroup, null,
18
- React__default.createElement(StyledTextField, { name: "gram", type: "number", value: props.gram, "aria-label": "Grams", placeholder: "0", min: "0", step: "any", size: size, disabled: disabled, hasError: hasError, onChange: props.handleChangeGram, onKeyDown: blockInvalidChars }),
19
- React__default.createElement(InputAffix, { compact: compact, hasError: hasError }, "g"))),
20
- isWeightImperial(props) && (React__default.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: 3 },
21
- React__default.createElement(InputGroup, null,
22
- React__default.createElement(StyledTextField, { name: "pound", type: "number", value: props.pound, "aria-label": "Pounds", placeholder: "0", min: "0", step: "any", size: size, disabled: disabled, hasError: hasError, onChange: props.handleChangePound, onKeyDown: blockInvalidChars }),
23
- React__default.createElement(InputAffix, { compact: compact, hasError: hasError }, "lb")),
24
- React__default.createElement(InputGroup, null,
25
- React__default.createElement(StyledTextField, { name: "ounce", type: "number", value: props.ounce, "aria-label": "Ounces", placeholder: "0", min: "0", step: "any", size: size, disabled: disabled, hasError: hasError, onChange: props.handleChangeOunce, onKeyDown: blockInvalidChars }),
26
- React__default.createElement(InputAffix, { compact: compact, hasError: hasError }, "oz")))))));
18
+ const childProps = {
19
+ stack: {
20
+ direction: 'horizontal',
21
+ alignY: 'center',
22
+ spacing: 3,
23
+ className,
24
+ },
25
+ inputGroup: {
26
+ style: flexStyle,
27
+ },
28
+ textField: {
29
+ type: 'number',
30
+ placeholder: '0',
31
+ min: '0',
32
+ step: 'any',
33
+ size,
34
+ disabled,
35
+ hasError,
36
+ onKeyDown: blockInvalidChars,
37
+ style: flexStyle,
38
+ },
39
+ inputAffix: {
40
+ compact,
41
+ hasError,
42
+ },
43
+ };
44
+ // If the weight is metric, render grams
45
+ if (isWeightMetric(props)) {
46
+ return (React__default.createElement(Stack, { ...childProps.stack },
47
+ React__default.createElement(InputGroup, { ...childProps.inputGroup },
48
+ React__default.createElement(TextField, { ...childProps.textField, name: "gram", value: props.gram, "aria-label": "Grams", onChange: props.handleChangeGram }),
49
+ React__default.createElement(InputAffix, { ...childProps.inputAffix }, "g")),
50
+ !fullWidth && React__default.createElement(FlexSpacer, null)));
51
+ }
52
+ // If the weight is imperial, render pounds and ounces
53
+ if (isWeightImperial(props)) {
54
+ return (React__default.createElement(Stack, { ...childProps.stack },
55
+ React__default.createElement(InputGroup, { ...childProps.inputGroup },
56
+ React__default.createElement(TextField, { ...childProps.textField, name: "pound", value: props.pound, "aria-label": "Pounds", onChange: props.handleChangePound }),
57
+ React__default.createElement(InputAffix, { ...childProps.inputAffix }, "lb")),
58
+ React__default.createElement(InputGroup, { ...childProps.inputGroup },
59
+ React__default.createElement(TextField, { ...childProps.textField, name: "ounce", value: props.ounce, "aria-label": "Ounces", onChange: props.handleChangeOunce }),
60
+ React__default.createElement(InputAffix, { ...childProps.inputAffix }, "oz"))));
61
+ }
62
+ // If neither metric nor imperial, return null or handle as needed
63
+ return null;
27
64
  });
28
65
  WeightInput.displayName = 'WeightInput';
29
66
  WeightInput.defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React from 'react';\nimport { withLabels } from '../../hoc';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { InputGroup } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\nimport { Stack } from '../Stack';\nimport { InputAffix } from '../InputAffix';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput = withLabels<WeightProps>((props) => {\n const { size = 'base', hasError, disabled, className } = props;\n\n const compact = size === 'sm';\n\n return (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(props) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={props.gram}\n aria-label=\"Grams\"\n placeholder=\"0\"\n min=\"0\"\n step=\"any\"\n size={size}\n disabled={disabled}\n hasError={hasError}\n onChange={props.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputAffix compact={compact} hasError={hasError}>\n g\n </InputAffix>\n </InputGroup>\n )}\n\n {isWeightImperial(props) && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing={3}>\n <InputGroup>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={props.pound}\n aria-label=\"Pounds\"\n placeholder=\"0\"\n min=\"0\"\n step=\"any\"\n size={size}\n disabled={disabled}\n hasError={hasError}\n onChange={props.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputAffix compact={compact} hasError={hasError}>\n lb\n </InputAffix>\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={props.ounce}\n aria-label=\"Ounces\"\n placeholder=\"0\"\n min=\"0\"\n step=\"any\"\n size={size}\n disabled={disabled}\n hasError={hasError}\n onChange={props.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputAffix compact={compact} hasError={hasError}>\n oz\n </InputAffix>\n </InputGroup>\n </Stack>\n )}\n </Row>\n </Container>\n );\n});\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["React","TextField"],"mappings":";;;;;;;;;;AAYA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;MAEpF,WAAW,GAAG,UAAU,CAAc,CAAC,KAAK,KAAI;AAC3D,IAAA,MAAM,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK;AAE9D,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,IAAI;AAE7B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,EAAA,YAAA,EAAY,QAAQ,EAAA;AAC/D,QAAAA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,IAAA;AACD,YAAA,cAAc,CAAC,KAAK,CAAC,KACpBA,6BAAC,UAAU,EAAA,IAAA;gBACTA,cAAC,CAAA,aAAA,CAAAC,eAAS,IACR,IAAI,EAAC,MAAM,EACX,IAAI,E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IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,CAAC,KAAK,EAAA,YAAA,EACP,QAAQ,EACnB,WAAW,EAAC,GAAG,EACf,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,EACjC,SAAS,EAAE,iBAAiB,EAC5B,CAAA;AACF,oBAAAD,cAAA,CAAA,aAAA,CAAC,UAAU,EAAC,EAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAA,EAAA,IAAA,CAEnC,CACF,CACP,CACT,CACG,CACI;AAEhB,CAAC;AAED,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 from 'react';\n\nimport { withLabels } from '../../hoc';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nimport { Stack, StackProps } from '../Stack';\nimport { FlexSpacer } from '../Flex/FlexSpacer';\nimport { InputGroup, InputGroupProps } from '../InputGroup';\nimport { InputAffix, InputAffixProps } from '../InputAffix';\nimport { TextField, TextFieldProps } from '../TextField';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\n\ntype ChildComponentProps = {\n stack: Partial<StackProps>;\n inputGroup: Partial<InputGroupProps>;\n textField: Partial<TextFieldProps>;\n inputAffix: Partial<InputAffixProps>;\n};\n\nconst flexStyle = { flex: 1 };\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput = withLabels<WeightProps>((props) => {\n const { size = 'base', fullWidth = false, hasError, disabled, className } = props;\n\n const compact = size === 'sm';\n\n const childProps: ChildComponentProps = {\n stack: {\n direction: 'horizontal',\n alignY: 'center',\n spacing: 3,\n className,\n },\n inputGroup: {\n style: flexStyle,\n },\n textField: {\n type: 'number',\n placeholder: '0',\n min: '0',\n step: 'any',\n size,\n disabled,\n hasError,\n onKeyDown: blockInvalidChars,\n style: flexStyle,\n },\n inputAffix: {\n compact,\n hasError,\n },\n };\n\n // If the weight is metric, render grams\n if (isWeightMetric(props)) {\n return (\n <Stack {...childProps.stack}>\n <InputGroup {...childProps.inputGroup}>\n <TextField\n {...childProps.textField}\n name=\"gram\"\n value={props.gram}\n aria-label=\"Grams\"\n onChange={props.handleChangeGram}\n />\n <InputAffix {...childProps.inputAffix}>g</InputAffix>\n </InputGroup>\n {!fullWidth && <FlexSpacer />}\n </Stack>\n );\n }\n\n // If the weight is imperial, render pounds and ounces\n if (isWeightImperial(props)) {\n return (\n <Stack {...childProps.stack}>\n <InputGroup {...childProps.inputGroup}>\n <TextField\n {...childProps.textField}\n name=\"pound\"\n value={props.pound}\n aria-label=\"Pounds\"\n onChange={props.handleChangePound}\n />\n <InputAffix {...childProps.inputAffix}>lb</InputAffix>\n </InputGroup>\n <InputGroup {...childProps.inputGroup}>\n <TextField\n {...childProps.textField}\n name=\"ounce\"\n value={props.ounce}\n aria-label=\"Ounces\"\n onChange={props.handleChangeOunce}\n />\n <InputAffix {...childProps.inputAffix}>oz</InputAffix>\n </InputGroup>\n </Stack>\n );\n }\n\n // If neither metric nor imperial, return null or handle as needed\n return null;\n});\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;AAqBA,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE;AAE7B,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;MAEpF,WAAW,GAAG,UA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types.ts"],"sourcesContent":["import { ComponentSize, ImperialWeight, InputProps, MetricWeight } from '../types';\n\nexport type BaseWeightProps = InputProps & {\n size?: ComponentSize;\n className?: string;\n};\n\nexport type GramWeightProps = BaseWeightProps & {\n weightUnit: MetricWeight;\n gram: string;\n handleChangeGram: (value: string) => void;\n};\n\nexport type LbWeightProps = BaseWeightProps & {\n weightUnit: ImperialWeight;\n ounce: string;\n pound: string;\n handleChangeOunce: (value: string) => void;\n handleChangePound: (value: string) => void;\n};\n\nexport type WeightProps = GramWeightProps | LbWeightProps;\n\nexport const isWeightMetric = (props: WeightProps): props is GramWeightProps => {\n return props.weightUnit === 'g';\n};\n\nexport const isWeightImperial = (props: WeightProps): props is LbWeightProps => {\n return props.weightUnit === 'lb' || props.weightUnit === 'oz';\n};\n"],"names":[],"mappings":";;AAuBa,MAAA,cAAc,GAAG,CAAC,KAAkB,KAA8B;AAC7E,IAAA,OAAO,KAAK,CAAC,UAAU,KAAK,GAAG;AACjC;AAEa,MAAA,gBAAgB,GAAG,CAAC,KAAkB,KAA4B;IAC7E,OAAO,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAC/D;;;;;"}
1
+ {"version":3,"file":"types.cjs","sources":["../../../src/components/WeightInput/types.ts"],"sourcesContent":["import { ComponentSize, ImperialWeight, InputProps, MetricWeight } from '../types';\n\nexport type BaseWeightProps = InputProps & {\n size?: ComponentSize;\n className?: string;\n fullWidth?: boolean;\n};\n\nexport type GramWeightProps = BaseWeightProps & {\n weightUnit: MetricWeight;\n gram: string;\n handleChangeGram: (value: string) => void;\n};\n\nexport type LbWeightProps = BaseWeightProps & {\n weightUnit: ImperialWeight;\n ounce: string;\n pound: string;\n handleChangeOunce: (value: string) => void;\n handleChangePound: (value: string) => void;\n};\n\nexport type WeightProps = GramWeightProps | LbWeightProps;\n\nexport const isWeightMetric = (props: WeightProps): props is GramWeightProps => {\n return props.weightUnit === 'g';\n};\n\nexport const isWeightImperial = (props: WeightProps): props is LbWeightProps => {\n return props.weightUnit === 'lb' || props.weightUnit === 'oz';\n};\n"],"names":[],"mappings":";;AAwBa,MAAA,cAAc,GAAG,CAAC,KAAkB,KAA8B;AAC7E,IAAA,OAAO,KAAK,CAAC,UAAU,KAAK,GAAG;AACjC;AAEa,MAAA,gBAAgB,GAAG,CAAC,KAAkB,KAA4B;IAC7E,OAAO,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAC/D;;;;;"}
@@ -2,6 +2,7 @@ import { ComponentSize, ImperialWeight, InputProps, MetricWeight } from '../type
2
2
  export type BaseWeightProps = InputProps & {
3
3
  size?: ComponentSize;
4
4
  className?: string;
5
+ fullWidth?: boolean;
5
6
  };
6
7
  export type GramWeightProps = BaseWeightProps & {
7
8
  weightUnit: MetricWeight;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../src/components/WeightInput/types.ts"],"sourcesContent":["import { ComponentSize, ImperialWeight, InputProps, MetricWeight } from '../types';\n\nexport type BaseWeightProps = InputProps & {\n size?: ComponentSize;\n className?: string;\n};\n\nexport type GramWeightProps = BaseWeightProps & {\n weightUnit: MetricWeight;\n gram: string;\n handleChangeGram: (value: string) => void;\n};\n\nexport type LbWeightProps = BaseWeightProps & {\n weightUnit: ImperialWeight;\n ounce: string;\n pound: string;\n handleChangeOunce: (value: string) => void;\n handleChangePound: (value: string) => void;\n};\n\nexport type WeightProps = GramWeightProps | LbWeightProps;\n\nexport const isWeightMetric = (props: WeightProps): props is GramWeightProps => {\n return props.weightUnit === 'g';\n};\n\nexport const isWeightImperial = (props: WeightProps): props is LbWeightProps => {\n return props.weightUnit === 'lb' || props.weightUnit === 'oz';\n};\n"],"names":[],"mappings":"AAuBa,MAAA,cAAc,GAAG,CAAC,KAAkB,KAA8B;AAC7E,IAAA,OAAO,KAAK,CAAC,UAAU,KAAK,GAAG;AACjC;AAEa,MAAA,gBAAgB,GAAG,CAAC,KAAkB,KAA4B;IAC7E,OAAO,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAC/D;;;;"}
1
+ {"version":3,"file":"types.js","sources":["../../../src/components/WeightInput/types.ts"],"sourcesContent":["import { ComponentSize, ImperialWeight, InputProps, MetricWeight } from '../types';\n\nexport type BaseWeightProps = InputProps & {\n size?: ComponentSize;\n className?: string;\n fullWidth?: boolean;\n};\n\nexport type GramWeightProps = BaseWeightProps & {\n weightUnit: MetricWeight;\n gram: string;\n handleChangeGram: (value: string) => void;\n};\n\nexport type LbWeightProps = BaseWeightProps & {\n weightUnit: ImperialWeight;\n ounce: string;\n pound: string;\n handleChangeOunce: (value: string) => void;\n handleChangePound: (value: string) => void;\n};\n\nexport type WeightProps = GramWeightProps | LbWeightProps;\n\nexport const isWeightMetric = (props: WeightProps): props is GramWeightProps => {\n return props.weightUnit === 'g';\n};\n\nexport const isWeightImperial = (props: WeightProps): props is LbWeightProps => {\n return props.weightUnit === 'lb' || props.weightUnit === 'oz';\n};\n"],"names":[],"mappings":"AAwBa,MAAA,cAAc,GAAG,CAAC,KAAkB,KAA8B;AAC7E,IAAA,OAAO,KAAK,CAAC,UAAU,KAAK,GAAG;AACjC;AAEa,MAAA,gBAAgB,GAAG,CAAC,KAAkB,KAA4B;IAC7E,OAAO,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAC/D;;;;"}
@@ -2,17 +2,19 @@
2
2
 
3
3
  var styled = require('styled-components');
4
4
  var Stack = require('../../components/Stack/Stack.cjs');
5
+ require('../../components/Stack/types.cjs');
5
6
  var Tooltip = require('../../components/Tooltip/Tooltip.cjs');
6
7
  var index = require('../../theme/index.cjs');
8
+ var utils = require('../../theme/utils.cjs');
7
9
 
8
10
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
11
 
10
12
  var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
11
13
 
12
14
  const RootStack = styled__default.default(Stack.Stack).withConfig({ displayName: "vui--RootStack", componentId: "vui--8t7kme" }) `position:relative;& > * + *{margin-top:${index.theme.sizes.sm};}`;
13
- const Label = styled__default.default.label.withConfig({ displayName: "vui--Label", componentId: "vui--17v8nzf" }) `display:block;font-family:${index.theme.text.inputLabel.fontFamily};font-weight:${index.theme.text.inputLabel.fontWeight};font-size:${index.theme.sizes[4]};line-height:${index.theme.sizes[5]};color:${index.theme.text.inputLabel.color};`;
14
- const Hint = styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--zb608e" }) `margin-top:${index.theme.sizes.xs};display:block;font-family:${index.theme.fontFamily};font-size:0.875rem;line-height:${index.theme.sizes[5]};color:${index.theme.colors.neutral.ink.light};`;
15
- const Error = styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1u9n7dv" }) `display:block;font-family:${index.theme.text.error.fontFamily};font-size:${index.theme.text.error.fontSize};/*${index.theme.text.error.fontWeight}*/line-height:${index.theme.text.error.lineHeight};color:${index.theme.text.error.color};`;
15
+ const Label = styled__default.default.label.withConfig({ displayName: "vui--Label", componentId: "vui--17v8nzf" }) `${utils.getTextStyles(index.theme.text.inputLabel)} display:block;`;
16
+ const Hint = styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--zb608e" }) `${utils.getTextStyles(index.theme.text.hintText)} display:block;margin-top:${index.theme.sizes.xs};font-size:0.875rem;line-height:${index.theme.sizes[5]};`;
17
+ const Error = styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1u9n7dv" }) `${utils.getTextStyles(index.theme.text.error)} display:block;font-weight:normal;`;
16
18
  const BlockTooltip = styled__default.default(Tooltip.Tooltip).withConfig({ displayName: "vui--BlockTooltip", componentId: "vui--1w0ilq2" }) `display:block;&-hoverable{display:flex;}`;
17
19
 
18
20
  exports.BlockTooltip = BlockTooltip;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../src/hoc/withLabels/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../components/Stack';\nimport { Tooltip } from '../../components/Tooltip';\nimport { theme } from '../../theme';\n\nexport const RootStack = styled(Stack)`\n position: relative;\n\n & > * + * {\n margin-top: ${theme.sizes.sm};\n }\n`;\n\nexport const Label = styled.label`\n display: block;\n font-family: ${theme.text.inputLabel.fontFamily};\n font-weight: ${theme.text.inputLabel.fontWeight};\n font-size: ${theme.sizes[4]};\n line-height: ${theme.sizes[5]};\n color: ${theme.text.inputLabel.color};\n`;\n\nexport const Hint = styled.span`\n margin-top: ${theme.sizes.xs};\n display: block;\n font-family: ${theme.fontFamily};\n font-size: 0.875rem;\n line-height: ${theme.sizes[5]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport const 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\nexport const BlockTooltip = styled(Tooltip)`\n /* Tooltip uses inline-block containers which add more height when\n the child component is an inline element (e.g. Glyph or an SVG),\n so we need to set to block to preserve the height and fix alignment. */\n display: block;\n &-hoverable {\n display: flex;\n }\n`;\n"],"names":["styled","Stack","theme","Tooltip"],"mappings":";;;;;;;;;;;AAKO,MAAM,SAAS,GAAGA,uBAAM,CAACC,WAAK,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,uCAAA,EAIpBC,WAAK,CAAC,KAAK,CAAC,EAAE;MAInB,KAAK,GAAGF,uBAAM,CAAC,KAAK,qGAEhBE,WAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAA,aAAA,EAChCA,WAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,cAClCA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,aAAA,EAAAA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,OAAA,EACpBA,WAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAA,CAAA;AAG/B,MAAM,IAAI,GAAGF,uBAAM,CAAC,IAAI,CACf,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,WAAA,EAAAE,WAAK,CAAC,KAAK,CAAC,EAAE,CAAA,2BAAA,EAEbA,WAAK,CAAC,UAAU,CAEhB,gCAAA,EAAAA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpBA,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;MAG5B,KAAK,GAAGF,uBAAM,CAAC,IAAI,CAEf,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAAE,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC7B,WAAA,EAAAA,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,GAAA,EACpBA,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC9B,cAAA,EAAAA,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,OAAA,EACjCA,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA,CAAA;MAGpB,YAAY,GAAGF,uBAAM,CAACG,eAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,wCAAA;;;;;;;;"}
1
+ {"version":3,"file":"styled.cjs","sources":["../../../src/hoc/withLabels/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../components/Stack';\nimport { Tooltip } from '../../components/Tooltip';\nimport { getTextStyles, theme } from '../../theme';\n\nexport const RootStack = styled(Stack)`\n position: relative;\n\n & > * + * {\n margin-top: ${theme.sizes.sm};\n }\n`;\n\nexport const Label = styled.label`\n ${getTextStyles(theme.text.inputLabel)}\n display: block;\n`;\n\nexport const Hint = styled.span`\n ${getTextStyles(theme.text.hintText)}\n display: block;\n margin-top: ${theme.sizes.xs};\n font-size: 0.875rem;\n line-height: ${theme.sizes[5]};\n`;\n\nexport const Error = styled.span`\n ${getTextStyles(theme.text.error)}\n display: block;\n font-weight: normal;\n`;\n\nexport const BlockTooltip = styled(Tooltip)`\n /* Tooltip uses inline-block containers which add more height when\n the child component is an inline element (e.g. Glyph or an SVG),\n so we need to set to block to preserve the height and fix alignment. */\n display: block;\n &-hoverable {\n display: flex;\n }\n`;\n"],"names":["styled","Stack","theme","getTextStyles","Tooltip"],"mappings":";;;;;;;;;;;;;AAKO,MAAM,SAAS,GAAGA,uBAAM,CAACC,WAAK,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,uCAAA,EAIpBC,WAAK,CAAC,KAAK,CAAC,EAAE;AAInB,MAAA,KAAK,GAAGF,uBAAM,CAAC,KAAK,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,EAC7BG,mBAAa,CAACD,WAAK,CAAC,IAAI,CAAC,UAAU,CAAC;AAIjC,MAAM,IAAI,GAAGF,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,EAC3BG,mBAAa,CAACD,WAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,0BAAA,EAEtBA,WAAK,CAAC,KAAK,CAAC,EAAE,CAAA,gCAAA,EAEbA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAGlB,MAAA,KAAK,GAAGF,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,EAC5BG,mBAAa,CAACD,WAAK,CAAC,IAAI,CAAC,KAAK,CAAC;MAKtB,YAAY,GAAGF,uBAAM,CAACI,eAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,wCAAA;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export declare const RootStack: import("styled-components").StyledComponent<"div", any, import("../../components/Stack/types").StackProps, never>;
1
+ export declare const RootStack: import("styled-components").StyledComponent<"div", any, import("../../components/Stack").StackProps, never>;
2
2
  export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
3
3
  export declare const Hint: import("styled-components").StyledComponent<"span", any, {}, never>;
4
4
  export declare const Error: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,12 +1,14 @@
1
1
  import styled from 'styled-components';
2
2
  import { Stack } from '../../components/Stack/Stack.js';
3
+ import '../../components/Stack/types.js';
3
4
  import { Tooltip } from '../../components/Tooltip/Tooltip.js';
4
5
  import { theme } from '../../theme/index.js';
6
+ import { getTextStyles } from '../../theme/utils.js';
5
7
 
6
8
  const RootStack = styled(Stack).withConfig({ displayName: "vui--RootStack", componentId: "vui--8t7kme" }) `position:relative;& > * + *{margin-top:${theme.sizes.sm};}`;
7
- const Label = styled.label.withConfig({ displayName: "vui--Label", componentId: "vui--17v8nzf" }) `display:block;font-family:${theme.text.inputLabel.fontFamily};font-weight:${theme.text.inputLabel.fontWeight};font-size:${theme.sizes[4]};line-height:${theme.sizes[5]};color:${theme.text.inputLabel.color};`;
8
- const Hint = styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--zb608e" }) `margin-top:${theme.sizes.xs};display:block;font-family:${theme.fontFamily};font-size:0.875rem;line-height:${theme.sizes[5]};color:${theme.colors.neutral.ink.light};`;
9
- const Error = styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1u9n7dv" }) `display:block;font-family:${theme.text.error.fontFamily};font-size:${theme.text.error.fontSize};/*${theme.text.error.fontWeight}*/line-height:${theme.text.error.lineHeight};color:${theme.text.error.color};`;
9
+ const Label = styled.label.withConfig({ displayName: "vui--Label", componentId: "vui--17v8nzf" }) `${getTextStyles(theme.text.inputLabel)} display:block;`;
10
+ const Hint = styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--zb608e" }) `${getTextStyles(theme.text.hintText)} display:block;margin-top:${theme.sizes.xs};font-size:0.875rem;line-height:${theme.sizes[5]};`;
11
+ const Error = styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1u9n7dv" }) `${getTextStyles(theme.text.error)} display:block;font-weight:normal;`;
10
12
  const BlockTooltip = styled(Tooltip).withConfig({ displayName: "vui--BlockTooltip", componentId: "vui--1w0ilq2" }) `display:block;&-hoverable{display:flex;}`;
11
13
 
12
14
  export { BlockTooltip, Error, Hint, Label, RootStack };
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../src/hoc/withLabels/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../components/Stack';\nimport { Tooltip } from '../../components/Tooltip';\nimport { theme } from '../../theme';\n\nexport const RootStack = styled(Stack)`\n position: relative;\n\n & > * + * {\n margin-top: ${theme.sizes.sm};\n }\n`;\n\nexport const Label = styled.label`\n display: block;\n font-family: ${theme.text.inputLabel.fontFamily};\n font-weight: ${theme.text.inputLabel.fontWeight};\n font-size: ${theme.sizes[4]};\n line-height: ${theme.sizes[5]};\n color: ${theme.text.inputLabel.color};\n`;\n\nexport const Hint = styled.span`\n margin-top: ${theme.sizes.xs};\n display: block;\n font-family: ${theme.fontFamily};\n font-size: 0.875rem;\n line-height: ${theme.sizes[5]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport const 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\nexport const BlockTooltip = styled(Tooltip)`\n /* Tooltip uses inline-block containers which add more height when\n the child component is an inline element (e.g. Glyph or an SVG),\n so we need to set to block to preserve the height and fix alignment. */\n display: block;\n &-hoverable {\n display: flex;\n }\n`;\n"],"names":[],"mappings":";;;;;AAKO,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,uCAAA,EAIpB,KAAK,CAAC,KAAK,CAAC,EAAE;MAInB,KAAK,GAAG,MAAM,CAAC,KAAK,qGAEhB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAA,aAAA,EAChC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,cAClC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,aAAA,EAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,OAAA,EACpB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAA,CAAA;AAG/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CACf,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,WAAA,EAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAA,2BAAA,EAEb,KAAK,CAAC,UAAU,CAEhB,gCAAA,EAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;MAG5B,KAAK,GAAG,MAAM,CAAC,IAAI,CAEf,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC7B,WAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,GAAA,EACpB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC9B,cAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,OAAA,EACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA,CAAA;MAGpB,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,wCAAA;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../src/hoc/withLabels/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../components/Stack';\nimport { Tooltip } from '../../components/Tooltip';\nimport { getTextStyles, theme } from '../../theme';\n\nexport const RootStack = styled(Stack)`\n position: relative;\n\n & > * + * {\n margin-top: ${theme.sizes.sm};\n }\n`;\n\nexport const Label = styled.label`\n ${getTextStyles(theme.text.inputLabel)}\n display: block;\n`;\n\nexport const Hint = styled.span`\n ${getTextStyles(theme.text.hintText)}\n display: block;\n margin-top: ${theme.sizes.xs};\n font-size: 0.875rem;\n line-height: ${theme.sizes[5]};\n`;\n\nexport const Error = styled.span`\n ${getTextStyles(theme.text.error)}\n display: block;\n font-weight: normal;\n`;\n\nexport const BlockTooltip = styled(Tooltip)`\n /* Tooltip uses inline-block containers which add more height when\n the child component is an inline element (e.g. Glyph or an SVG),\n so we need to set to block to preserve the height and fix alignment. */\n display: block;\n &-hoverable {\n display: flex;\n }\n`;\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,uCAAA,EAIpB,KAAK,CAAC,KAAK,CAAC,EAAE;AAInB,MAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,EAC7B,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;AAIjC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,EAC3B,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,0BAAA,EAEtB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAA,gCAAA,EAEb,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAGlB,MAAA,KAAK,GAAG,MAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,EAC5B,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;MAKtB,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,wCAAA;;;;"}
@@ -4,6 +4,7 @@ var React = require('react');
4
4
  var CriticalIcon = require('../../tempIcons/CriticalIcon.cjs');
5
5
  var index = require('../../theme/index.cjs');
6
6
  var Stack = require('../../components/Stack/Stack.cjs');
7
+ require('../../components/Stack/types.cjs');
7
8
  var styled = require('./styled.cjs');
8
9
  var HelpIcon = require('../../tempIcons/HelpIcon.cjs');
9
10
  var useId = require('../../hooks/useId.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { CriticalIcon } from '../../tempIcons/CriticalIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport function withLabels<P>(Component: ComponentType<P>): FC<P & WithLabelsProps> {\n return ({ label, hint, error, tooltip, tooltipContent, id, ...otherProps }) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label) return <Component id={componentId} hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n}\n"],"names":["useId","React","RootStack","Stack","Label","BlockTooltip","HelpIcon","theme","Hint","CriticalIcon","Error"],"mappings":";;;;;;;;;;;;;;AAkBM,SAAU,UAAU,CAAI,SAA2B,EAAA;AACvD,IAAA,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,KAAI;AAC5E,QAAA,MAAM,WAAW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AC,SAAS,EAAA,EAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAA,GAAO,UAAgB,EAAI,CAAA;AACvE,YAAA,KAAK,KACJA,sBAAC,CAAA,aAAA,CAAAE,WAAK,IAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAA;gBACxDF,sBAAC,CAAA,aAAA,CAAAQ,yBAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAEF,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;gBAC/EN,sBAAC,CAAA,aAAA,CAAAS,YAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB,KAAC;AACH;;;;"}
1
+ {"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { CriticalIcon } from '../../tempIcons/CriticalIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport function withLabels<P>(Component: ComponentType<P>): FC<P & WithLabelsProps> {\n return ({ label, hint, error, tooltip, tooltipContent, id, ...otherProps }) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label) return <Component id={componentId} hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n}\n"],"names":["useId","React","RootStack","Stack","Label","BlockTooltip","HelpIcon","theme","Hint","CriticalIcon","Error"],"mappings":";;;;;;;;;;;;;;;AAkBM,SAAU,UAAU,CAAI,SAA2B,EAAA;AACvD,IAAA,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,KAAI;AAC5E,QAAA,MAAM,WAAW,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAOC,sBAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAO,GAAA,UAAgB,GAAI;QAE3F,QACEA,sBAAC,CAAA,aAAA,CAAAC,gBAAS,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,SAAS,EAAA;AACtC,YAAAD,sBAAA,CAAA,aAAA,CAACE,WAAK,EAAA,EAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAA;AACxD,gBAAAF,sBAAA,CAAA,aAAA,CAACG,YAAK,EAAA,EAAC,EAAE,EAAE,CAAG,EAAA,WAAW,CAA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CriticalIcon.js';
3
3
  import { theme } from '../../theme/index.js';
4
4
  import { Stack } from '../../components/Stack/Stack.js';
5
+ import '../../components/Stack/types.js';
5
6
  import { RootStack, Label, BlockTooltip, Hint, Error } from './styled.js';
6
7
  import { HelpIcon } from '../../tempIcons/HelpIcon.js';
7
8
  import { useId } from '../../hooks/useId.js';
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { CriticalIcon } from '../../tempIcons/CriticalIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport function withLabels<P>(Component: ComponentType<P>): FC<P & WithLabelsProps> {\n return ({ label, hint, error, tooltip, tooltipContent, id, ...otherProps }) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label) return <Component id={componentId} hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <CriticalIcon width={16} height={16} color={theme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KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EACrC,CAAA,CACW,CAChB,CACK;YACP,IAAI,IAAIA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,KAAA,CAAO,EAAG,EAAA,IAAI,CAAQ;AACvD,YAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAA,GAAO,UAAgB,EAAI,CAAA;AACvE,YAAA,KAAK,KACJA,cAAC,CAAA,aAAA,CAAA,KAAK,IAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAA;gBACxDA,cAAC,CAAA,aAAA,CAAA,YAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;gBAC/EA,cAAC,CAAA,aAAA,CAAA,KAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB,KAAC;AACH;;;;"}
1
+ {"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { CriticalIcon } from '../../tempIcons/CriticalIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport function withLabels<P>(Component: ComponentType<P>): FC<P & WithLabelsProps> {\n return ({ label, hint, error, tooltip, tooltipContent, id, ...otherProps }) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label) return <Component id={componentId} hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n}\n"],"names":["React"],"mappings":";;;;;;;;;AAkBM,SAAU,UAAU,CAAI,SAA2B,EAAA;AACvD,IAAA,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,KAAI;AAC5E,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAO,GAAA,UAAgB,GAAI;QAE3F,QACEA,cAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,SAAS,EAAA;AACtC,YAAAA,cAAA,CAAA,aAAA,CAAC,KAAK,E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cAAC,CAAA,aAAA,CAAA,KAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB,KAAC;AACH;;;;"}
package/dist/index.cjs CHANGED
@@ -59,6 +59,7 @@ var SimpleTable = require('./components/SimpleTable/SimpleTable.cjs');
59
59
  var Skeleton = require('./components/Skeleton/Skeleton.cjs');
60
60
  var Slider = require('./components/Slider/Slider.cjs');
61
61
  var Stack = require('./components/Stack/Stack.cjs');
62
+ require('./components/Stack/types.cjs');
62
63
  var Stepper = require('./components/Stepper/Stepper.cjs');
63
64
  var Tag = require('./components/Tag/Tag.cjs');
64
65
  var Text = require('./components/Text/Text.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -57,6 +57,7 @@ export { SimpleTable } from './components/SimpleTable/SimpleTable.js';
57
57
  export { Skeleton } from './components/Skeleton/Skeleton.js';
58
58
  export { Slider } from './components/Slider/Slider.js';
59
59
  export { Stack } from './components/Stack/Stack.js';
60
+ import './components/Stack/types.js';
60
61
  export { Stepper } from './components/Stepper/Stepper.js';
61
62
  export { Tag } from './components/Tag/Tag.js';
62
63
  export { Text } from './components/Text/Text.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "10.0.0-beta.3",
3
+ "version": "10.0.0-beta.4",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- var styled = require('styled-components');
4
- var index = require('../TextField/index.cjs');
5
- var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
6
- var index$1 = require('../../theme/index.cjs');
7
-
8
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
-
10
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
11
-
12
- const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--1iyvinq" }) `display:flex;flex-direction:column;position:relative;`;
13
- const Row = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--jcpqas" }) `display:flex;align-items:center;gap:8px;`;
14
- const StyledTextField = styled__default.default(index.TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--lm37xj" }) `width:52px;`;
15
- styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1qmlxje" }) `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--1xy2ika" }) `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};`;
17
-
18
- exports.Container = Container;
19
- exports.Row = Row;
20
- exports.TextField = StyledTextField;
21
- //# sourceMappingURL=styled.cjs.map
@@ -1 +0,0 @@
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\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\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;AAOjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC;AAI3BF,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,cAAA,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;;;;;;"}