@thecb/components 11.1.15-beta.0 → 11.1.15-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "11.1.15-beta.0",
3
+ "version": "11.1.15-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import { equals } from "ramda";
3
3
  import { FormInput } from "../../atoms/form-layouts";
4
- import { displayCurrency } from "../../../util/general";
5
- import { Stack, Detail, Text } from "../../atoms";
4
+ import { createIdFromString, displayCurrency } from "../../../util/general";
5
+ import { Stack, Detail, Text, Box } from "../../atoms";
6
6
  import { themeComponent } from "../../../util/themeUtils";
7
7
  import { fallbackValues } from "./PartialAmountField.theme";
8
8
  const PartialAmountField = ({
@@ -15,23 +15,23 @@ const PartialAmountField = ({
15
15
  themeValues
16
16
  }) => (
17
17
  <FormInput
18
- labelTextWhenNoError={lineItem.description}
18
+ labelTextWhenNoError={createIdFromString(
19
+ `${lineItem.description}-${lineItem.subDescription}`
20
+ )}
19
21
  labelDisplayOverride={
20
22
  <Stack childGap="0px">
21
23
  <Detail
22
24
  as="label"
25
+ for={createIdFromString(
26
+ `${lineItem.description}-${lineItem.subDescription}`
27
+ )}
23
28
  variant={themeValues.detailVariant}
24
29
  weight={themeValues.weightTitle}
25
30
  >
26
- <span>{lineItem.description}</span>
27
- </Detail>
28
- <Detail
29
- id={lineItem.subDescription}
30
- as="label"
31
- variant={themeValues.detailVariant}
32
- weight="400"
33
- >
34
- {lineItem.subDescription}
31
+ <Detail as="span" variant={themeValues.detailVariant} weight="400">
32
+ {lineItem.subDescription}
33
+ </Detail>
34
+ <Box padding="0">{lineItem.description}</Box>
35
35
  </Detail>
36
36
  </Stack>
37
37
  }