@thecb/components 6.0.0 → 6.0.3-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "6.0.0",
3
+ "version": "6.0.3-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,7 +1,11 @@
1
1
  import React, { useEffect, Fragment, useState, useRef, createRef } from "react";
2
2
  import { Box, Stack } from "../layouts";
3
3
  import Text from "../text";
4
- import { noop } from "../../../util/general";
4
+ import {
5
+ noop,
6
+ inputDisabledStyle,
7
+ inputPlaceholderTextStyle
8
+ } from "../../../util/general";
5
9
  import DropdownIcon from "./DropdownIcon";
6
10
  import styled from "styled-components";
7
11
  // support for Array.prototype.at() in older browsers
@@ -12,7 +16,8 @@ import {
12
16
  GREY_CHATEAU,
13
17
  STORM_GREY,
14
18
  MINESHAFT_GREY,
15
- ERROR_COLOR
19
+ ERROR_COLOR,
20
+ CHARADE_GREY
16
21
  } from "../../../constants/colors";
17
22
  import { fallbackValues } from "./Dropdown.theme";
18
23
  import { themeComponent } from "../../../util/themeUtils";
@@ -300,10 +305,9 @@ const Dropdown = ({
300
305
  : GREY_CHATEAU
301
306
  }
302
307
  extraStyles={
303
- disabled &&
304
- `color: #6e727e;
305
- background-color: #f7f7f7;
306
- pointer-events: none;`
308
+ disabled
309
+ ? `${inputPlaceholderTextStyle}${inputDisabledStyle}`
310
+ : inputPlaceholderTextStyle
307
311
  }
308
312
  hoverStyles={`background-color: ${themeValues.hoverColor};`}
309
313
  isOpen={isOpen}
@@ -35,6 +35,9 @@ const HighlightTabRow = ({
35
35
  role="region"
36
36
  aria-label="Payment step"
37
37
  >
38
+ <Box srOnly padding="0">
39
+ <Text>{`Current step: ${tabs[highlightIndex]}`}</Text>
40
+ </Box>
38
41
  <Center maxWidth="76.5rem">
39
42
  <Reel
40
43
  padding="0"
@@ -28,7 +28,9 @@ const TermsAndConditionsModal = ({
28
28
  borderRadius="3px"
29
29
  extraStyles="overflow: scroll; max-height: 20rem;"
30
30
  >
31
- <Text variant="p">{terms}</Text>
31
+ <Text variant="p" extraStyles={`& a { text-decoration: underline; }`}>
32
+ {terms}
33
+ </Text>
32
34
  </Box>
33
35
  }
34
36
  defaultWrapper={false}
@@ -1,5 +1,6 @@
1
1
  import React, { Fragment } from "react";
2
2
  import numeral from "numeral";
3
+ import { CHARADE_GREY } from "../constants/colors";
3
4
 
4
5
  export const noop = () => {};
5
6
 
@@ -96,3 +97,23 @@ export const screenReaderOnlyStyle = `
96
97
  height: 1px;
97
98
  overflow: hidden;
98
99
  `;
100
+
101
+ export const inputPlaceholderTextStyle = `
102
+ ::-webkit-input-placeholder {
103
+ color: ${CHARADE_GREY};
104
+ }
105
+ ::-moz-placeholder {
106
+ color: ${CHARADE_GREY};
107
+ }
108
+ ::-ms-placeholder {
109
+ color: ${CHARADE_GREY};
110
+ }
111
+ ::placeholder {
112
+ color: ${CHARADE_GREY};
113
+ }
114
+ `;
115
+ export const inputDisabledStyle = `
116
+ color: #6e727e;
117
+ background-color: #f7f7f7;
118
+ pointer-events: none;
119
+ `;