@spark-web/text-input 5.1.0 → 5.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @spark-web/text-input
2
2
 
3
+ ## 5.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#621](https://github.com/brighte-labs/spark-web/pull/621)
8
+ [`bc2f972`](https://github.com/brighte-labs/spark-web/commit/bc2f97209f7207bb993aee971e9407d6fdd83751)
9
+ Thanks [@mkt-brighte](https://github.com/mkt-brighte)! - Update form field
10
+ border to meet minimum contrast requirement
11
+
12
+ - Updated dependencies
13
+ [[`bc2f972`](https://github.com/brighte-labs/spark-web/commit/bc2f97209f7207bb993aee971e9407d6fdd83751)]:
14
+ - @spark-web/theme@5.10.5
15
+
3
16
  ## 5.1.0
4
17
 
5
18
  ### Minor Changes
@@ -45,7 +45,7 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<{
45
45
  */
46
46
  children?: AdornmentsAsChildren;
47
47
  /** Manage how text behaves with regard to overflow. */
48
- overflowStrategy?: "truncate" | "nowrap" | "breakword" | undefined;
48
+ overflowStrategy?: "nowrap" | "truncate" | "breakword" | undefined;
49
49
  } & NativeInputProps & import("react").RefAttributes<HTMLInputElement>>;
50
50
  export declare type UseInputStylesProps = FieldState & {
51
51
  startAdornment?: boolean;
@@ -62,8 +62,8 @@ export declare const useInputStyles: ({ disabled, startAdornment, endAdornment,
62
62
  readonly flex: 1;
63
63
  readonly position: "relative";
64
64
  readonly height: "medium";
65
- readonly paddingLeft: "none" | "medium";
66
- readonly paddingRight: "none" | "medium";
65
+ readonly paddingLeft: "medium" | "none";
66
+ readonly paddingRight: "medium" | "none";
67
67
  readonly width: "full";
68
68
  }, {
69
69
  readonly ':enabled': {
@@ -127,6 +127,7 @@ var InputContainer = function InputContainer(_ref) {
127
127
  };
128
128
  var FocusIndicator = function FocusIndicator(_ref2) {
129
129
  var invalid = _ref2.invalid;
130
+ var theme$1 = theme.useTheme();
130
131
  return jsxRuntime.jsx(box.Box, {
131
132
  "aria-hidden": "true",
132
133
  as: "span",
@@ -135,7 +136,7 @@ var FocusIndicator = function FocusIndicator(_ref2) {
135
136
  }
136
137
  // Styles
137
138
  ,
138
- border: invalid ? 'critical' : 'field',
139
+ border: invalid ? 'critical' : theme$1.components.textInput.borderColor,
139
140
  borderRadius: "small",
140
141
  position: "absolute",
141
142
  bottom: 0,
@@ -127,6 +127,7 @@ var InputContainer = function InputContainer(_ref) {
127
127
  };
128
128
  var FocusIndicator = function FocusIndicator(_ref2) {
129
129
  var invalid = _ref2.invalid;
130
+ var theme$1 = theme.useTheme();
130
131
  return jsxRuntime.jsx(box.Box, {
131
132
  "aria-hidden": "true",
132
133
  as: "span",
@@ -135,7 +136,7 @@ var FocusIndicator = function FocusIndicator(_ref2) {
135
136
  }
136
137
  // Styles
137
138
  ,
138
- border: invalid ? 'critical' : 'field',
139
+ border: invalid ? 'critical' : theme$1.components.textInput.borderColor,
139
140
  borderRadius: "small",
140
141
  position: "absolute",
141
142
  bottom: 0,
@@ -123,6 +123,7 @@ var InputContainer = function InputContainer(_ref) {
123
123
  };
124
124
  var FocusIndicator = function FocusIndicator(_ref2) {
125
125
  var invalid = _ref2.invalid;
126
+ var theme = useTheme();
126
127
  return jsx(Box, {
127
128
  "aria-hidden": "true",
128
129
  as: "span",
@@ -131,7 +132,7 @@ var FocusIndicator = function FocusIndicator(_ref2) {
131
132
  }
132
133
  // Styles
133
134
  ,
134
- border: invalid ? 'critical' : 'field',
135
+ border: invalid ? 'critical' : theme.components.textInput.borderColor,
135
136
  borderRadius: "small",
136
137
  position: "absolute",
137
138
  bottom: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/text-input",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "@spark-web/a11y": "^5.0.0",
21
21
  "@spark-web/box": "^5.0.0",
22
22
  "@spark-web/text": "^5.0.0",
23
- "@spark-web/theme": "^5.0.0",
23
+ "@spark-web/theme": "^5.10.5",
24
24
  "@spark-web/utils": "^5.0.0"
25
25
  },
26
26
  "devDependencies": {