@atlaskit/textfield 5.5.1 → 5.5.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/CHANGELOG.md +6 -0
- package/dist/cjs/component-tokens.js +2 -2
- package/dist/cjs/styles.js +5 -5
- package/dist/cjs/text-field.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/component-tokens.js +2 -2
- package/dist/es2019/styles.js +5 -5
- package/dist/es2019/text-field.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/component-tokens.js +2 -2
- package/dist/esm/styles.js +5 -5
- package/dist/esm/text-field.js +3 -3
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +166 -0
package/CHANGELOG.md
CHANGED
|
@@ -27,8 +27,8 @@ var defaultBackgroundColorHover = {
|
|
|
27
27
|
};
|
|
28
28
|
exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
|
|
29
29
|
var defaultBorderColor = {
|
|
30
|
-
light: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
31
|
-
dark: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
30
|
+
light: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? _colors.N100 : _colors.N40, ")"),
|
|
31
|
+
dark: "var(--ds-border-input, ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? _colors.DN200 : _colors.DN40, ")")
|
|
32
32
|
};
|
|
33
33
|
exports.defaultBorderColor = defaultBorderColor;
|
|
34
34
|
var defaultBorderColorFocus = {
|
package/dist/cjs/styles.js
CHANGED
|
@@ -94,7 +94,7 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
94
94
|
'&:focus-within:not([data-disabled])': {
|
|
95
95
|
backgroundColor: backgroundColorFocus[appearance][mode],
|
|
96
96
|
borderColor: borderColorFocus[appearance][mode],
|
|
97
|
-
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
97
|
+
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(borderColorFocus[appearance][mode]) : undefined
|
|
98
98
|
},
|
|
99
99
|
'&[data-disabled]': _objectSpread({
|
|
100
100
|
color: disabledRules[mode].textColor,
|
|
@@ -105,12 +105,12 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
105
105
|
}),
|
|
106
106
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
107
107
|
borderColor: invalidRules[mode].borderColor,
|
|
108
|
-
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
108
|
+
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(invalidRules[mode].borderColor) : undefined
|
|
109
109
|
},
|
|
110
110
|
'&[data-invalid]:focus-within': {
|
|
111
111
|
backgroundColor: invalidRules[mode].backgroundColorFocus,
|
|
112
112
|
borderColor: invalidRules[mode].borderColorFocus,
|
|
113
|
-
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
113
|
+
boxShadow: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(invalidRules[mode].borderColorFocus) : undefined
|
|
114
114
|
},
|
|
115
115
|
'@media screen and (-ms-high-contrast: active)': {
|
|
116
116
|
'&[data-invalid]:focus-within': {
|
|
@@ -140,8 +140,8 @@ var containerStyles = function containerStyles(appearance, mode, width) {
|
|
|
140
140
|
alignItems: 'center'
|
|
141
141
|
}, getContainerTextBgAndBorderColor(appearance, mode)), {}, {
|
|
142
142
|
borderRadius: 3,
|
|
143
|
-
borderWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
144
|
-
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.
|
|
143
|
+
borderWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? 1 : 2
|
|
144
|
+
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
145
145
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
146
146
|
{
|
|
147
147
|
padding: '1px 0'
|
package/dist/cjs/text-field.js
CHANGED
|
@@ -24,7 +24,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
24
24
|
var analyticsParams = {
|
|
25
25
|
componentName: 'textField',
|
|
26
26
|
packageName: "@atlaskit/textfield",
|
|
27
|
-
packageVersion: "5.5.
|
|
27
|
+
packageVersion: "5.5.2"
|
|
28
28
|
};
|
|
29
29
|
var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
30
30
|
var _props$appearance = props.appearance,
|
|
@@ -109,7 +109,7 @@ var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
109
109
|
"data-testid": testId && "".concat(testId, "-container"),
|
|
110
110
|
onMouseDown: handleOnMouseDown
|
|
111
111
|
// TODO: When removing legacy theming fix this.
|
|
112
|
-
// eslint-disable-next-line @
|
|
112
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
113
113
|
,
|
|
114
114
|
css: containerStyles,
|
|
115
115
|
className: className
|
|
@@ -126,7 +126,7 @@ var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
126
126
|
onFocus: handleOnFocus,
|
|
127
127
|
ref: setInputRef
|
|
128
128
|
// TODO: When removing legacy theming fix this.
|
|
129
|
-
// eslint-disable-next-line @
|
|
129
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
130
130
|
,
|
|
131
131
|
css: inputStyle
|
|
132
132
|
})), elemAfterInput)
|
package/dist/cjs/version.json
CHANGED
|
@@ -17,8 +17,8 @@ export const defaultBackgroundColorHover = {
|
|
|
17
17
|
dark: `var(--ds-background-input-hovered, ${DN30})`
|
|
18
18
|
};
|
|
19
19
|
export const defaultBorderColor = {
|
|
20
|
-
light: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.
|
|
21
|
-
dark: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.
|
|
20
|
+
light: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40})`,
|
|
21
|
+
dark: `var(--ds-border-input, ${getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? DN200 : DN40})`
|
|
22
22
|
};
|
|
23
23
|
export const defaultBorderColorFocus = {
|
|
24
24
|
light: `var(--ds-border-focused, ${B100})`,
|
package/dist/es2019/styles.js
CHANGED
|
@@ -82,7 +82,7 @@ const getContainerTextBgAndBorderColor = (appearance, mode) => ({
|
|
|
82
82
|
'&:focus-within:not([data-disabled])': {
|
|
83
83
|
backgroundColor: backgroundColorFocus[appearance][mode],
|
|
84
84
|
borderColor: borderColorFocus[appearance][mode],
|
|
85
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
85
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? `inset 0 0 0 1px ${borderColorFocus[appearance][mode]}` : undefined
|
|
86
86
|
},
|
|
87
87
|
'&[data-disabled]': {
|
|
88
88
|
color: disabledRules[mode].textColor,
|
|
@@ -96,12 +96,12 @@ const getContainerTextBgAndBorderColor = (appearance, mode) => ({
|
|
|
96
96
|
},
|
|
97
97
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
98
98
|
borderColor: invalidRules[mode].borderColor,
|
|
99
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
99
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? `inset 0 0 0 1px ${invalidRules[mode].borderColor}` : undefined
|
|
100
100
|
},
|
|
101
101
|
'&[data-invalid]:focus-within': {
|
|
102
102
|
backgroundColor: invalidRules[mode].backgroundColorFocus,
|
|
103
103
|
borderColor: invalidRules[mode].borderColorFocus,
|
|
104
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
104
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? `inset 0 0 0 1px ${invalidRules[mode].borderColorFocus}` : undefined
|
|
105
105
|
},
|
|
106
106
|
'@media screen and (-ms-high-contrast: active)': {
|
|
107
107
|
'&[data-invalid]:focus-within': {
|
|
@@ -127,9 +127,9 @@ export const containerStyles = (appearance, mode, width) => ({
|
|
|
127
127
|
alignItems: 'center',
|
|
128
128
|
...getContainerTextBgAndBorderColor(appearance, mode),
|
|
129
129
|
borderRadius: 3,
|
|
130
|
-
borderWidth: getBooleanFF('platform.design-system-team.
|
|
130
|
+
borderWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? 1 : 2,
|
|
131
131
|
// add 1px padding on both top and bottom to keep the same overall height after border reduced from 2px to 1px under feature flag
|
|
132
|
-
...(getBooleanFF('platform.design-system-team.
|
|
132
|
+
...(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
133
133
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
134
134
|
{
|
|
135
135
|
padding: '1px 0'
|
|
@@ -8,7 +8,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
8
8
|
const analyticsParams = {
|
|
9
9
|
componentName: 'textField',
|
|
10
10
|
packageName: "@atlaskit/textfield",
|
|
11
|
-
packageVersion: "5.5.
|
|
11
|
+
packageVersion: "5.5.2"
|
|
12
12
|
};
|
|
13
13
|
const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
14
|
const {
|
|
@@ -87,7 +87,7 @@ const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
87
87
|
"data-testid": testId && `${testId}-container`,
|
|
88
88
|
onMouseDown: handleOnMouseDown
|
|
89
89
|
// TODO: When removing legacy theming fix this.
|
|
90
|
-
// eslint-disable-next-line @
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
91
91
|
,
|
|
92
92
|
css: containerStyles,
|
|
93
93
|
className: className
|
|
@@ -104,7 +104,7 @@ const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
104
104
|
onFocus: handleOnFocus,
|
|
105
105
|
ref: setInputRef
|
|
106
106
|
// TODO: When removing legacy theming fix this.
|
|
107
|
-
// eslint-disable-next-line @
|
|
107
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
108
108
|
,
|
|
109
109
|
css: inputStyle
|
|
110
110
|
})), elemAfterInput)
|
package/dist/es2019/version.json
CHANGED
|
@@ -17,8 +17,8 @@ export var defaultBackgroundColorHover = {
|
|
|
17
17
|
dark: "var(--ds-background-input-hovered, ".concat(DN30, ")")
|
|
18
18
|
};
|
|
19
19
|
export var defaultBorderColor = {
|
|
20
|
-
light: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.
|
|
21
|
-
dark: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.
|
|
20
|
+
light: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? N100 : N40, ")"),
|
|
21
|
+
dark: "var(--ds-border-input, ".concat(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? DN200 : DN40, ")")
|
|
22
22
|
};
|
|
23
23
|
export var defaultBorderColorFocus = {
|
|
24
24
|
light: "var(--ds-border-focused, ".concat(B100, ")"),
|
package/dist/esm/styles.js
CHANGED
|
@@ -86,7 +86,7 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
86
86
|
'&:focus-within:not([data-disabled])': {
|
|
87
87
|
backgroundColor: backgroundColorFocus[appearance][mode],
|
|
88
88
|
borderColor: borderColorFocus[appearance][mode],
|
|
89
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
89
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(borderColorFocus[appearance][mode]) : undefined
|
|
90
90
|
},
|
|
91
91
|
'&[data-disabled]': _objectSpread({
|
|
92
92
|
color: disabledRules[mode].textColor,
|
|
@@ -97,12 +97,12 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
97
97
|
}),
|
|
98
98
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
99
99
|
borderColor: invalidRules[mode].borderColor,
|
|
100
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
100
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(invalidRules[mode].borderColor) : undefined
|
|
101
101
|
},
|
|
102
102
|
'&[data-invalid]:focus-within': {
|
|
103
103
|
backgroundColor: invalidRules[mode].backgroundColorFocus,
|
|
104
104
|
borderColor: invalidRules[mode].borderColorFocus,
|
|
105
|
-
boxShadow: getBooleanFF('platform.design-system-team.
|
|
105
|
+
boxShadow: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "inset 0 0 0 1px ".concat(invalidRules[mode].borderColorFocus) : undefined
|
|
106
106
|
},
|
|
107
107
|
'@media screen and (-ms-high-contrast: active)': {
|
|
108
108
|
'&[data-invalid]:focus-within': {
|
|
@@ -132,8 +132,8 @@ export var containerStyles = function containerStyles(appearance, mode, width) {
|
|
|
132
132
|
alignItems: 'center'
|
|
133
133
|
}, getContainerTextBgAndBorderColor(appearance, mode)), {}, {
|
|
134
134
|
borderRadius: 3,
|
|
135
|
-
borderWidth: getBooleanFF('platform.design-system-team.
|
|
136
|
-
}, getBooleanFF('platform.design-system-team.
|
|
135
|
+
borderWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? 1 : 2
|
|
136
|
+
}, getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
137
137
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
138
138
|
{
|
|
139
139
|
padding: '1px 0'
|
package/dist/esm/text-field.js
CHANGED
|
@@ -14,7 +14,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
14
14
|
var analyticsParams = {
|
|
15
15
|
componentName: 'textField',
|
|
16
16
|
packageName: "@atlaskit/textfield",
|
|
17
|
-
packageVersion: "5.5.
|
|
17
|
+
packageVersion: "5.5.2"
|
|
18
18
|
};
|
|
19
19
|
var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
20
|
var _props$appearance = props.appearance,
|
|
@@ -99,7 +99,7 @@ var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
99
99
|
"data-testid": testId && "".concat(testId, "-container"),
|
|
100
100
|
onMouseDown: handleOnMouseDown
|
|
101
101
|
// TODO: When removing legacy theming fix this.
|
|
102
|
-
// eslint-disable-next-line @
|
|
102
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
103
103
|
,
|
|
104
104
|
css: containerStyles,
|
|
105
105
|
className: className
|
|
@@ -116,7 +116,7 @@ var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
116
116
|
onFocus: handleOnFocus,
|
|
117
117
|
ref: setInputRef
|
|
118
118
|
// TODO: When removing legacy theming fix this.
|
|
119
|
-
// eslint-disable-next-line @
|
|
119
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
120
120
|
,
|
|
121
121
|
css: inputStyle
|
|
122
122
|
})), elemAfterInput)
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textfield",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "A text field is an input that allows a user to write or edit text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Design System Team",
|
|
27
|
-
"releaseModel": "
|
|
27
|
+
"releaseModel": "continuous",
|
|
28
28
|
"website": {
|
|
29
29
|
"name": "Text field",
|
|
30
30
|
"category": "Components"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
39
39
|
"@atlaskit/theme": "^12.5.0",
|
|
40
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.8.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1"
|
|
43
43
|
},
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"platform-feature-flags": {
|
|
95
|
-
"platform.design-system-team.
|
|
95
|
+
"platform.design-system-team.border-checkbox_nyoiu": {
|
|
96
96
|
"type": "boolean"
|
|
97
97
|
}
|
|
98
98
|
},
|
package/report.api.md
CHANGED
|
@@ -22,7 +22,7 @@ import { default as React_2 } from 'react';
|
|
|
22
22
|
// @public (undocumented)
|
|
23
23
|
export type Appearance = 'none' | 'standard' | 'subtle';
|
|
24
24
|
|
|
25
|
-
// @public
|
|
25
|
+
// @public
|
|
26
26
|
const _default: React_2.NamedExoticComponent<
|
|
27
27
|
TextFieldProps & React_2.RefAttributes<unknown>
|
|
28
28
|
>;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/textfield"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { AllHTMLAttributes } from 'react';
|
|
8
|
+
import { FormEventHandler } from 'react';
|
|
9
|
+
import { default as React_2 } from 'react';
|
|
10
|
+
|
|
11
|
+
// @public (undocumented)
|
|
12
|
+
export type Appearance = 'none' | 'standard' | 'subtle';
|
|
13
|
+
|
|
14
|
+
// @public
|
|
15
|
+
const _default: React_2.NamedExoticComponent<TextFieldProps & React_2.RefAttributes<unknown>>;
|
|
16
|
+
export default _default;
|
|
17
|
+
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
export const TextFieldColors: {
|
|
20
|
+
backgroundColor: {
|
|
21
|
+
standard: {
|
|
22
|
+
light: "var(--ds-background-input)";
|
|
23
|
+
dark: "var(--ds-background-input)";
|
|
24
|
+
};
|
|
25
|
+
subtle: {
|
|
26
|
+
light: string;
|
|
27
|
+
dark: string;
|
|
28
|
+
};
|
|
29
|
+
none: {
|
|
30
|
+
light: string;
|
|
31
|
+
dark: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
backgroundColorFocus: {
|
|
35
|
+
standard: {
|
|
36
|
+
light: "var(--ds-background-input-pressed)";
|
|
37
|
+
dark: "var(--ds-background-input-pressed)";
|
|
38
|
+
};
|
|
39
|
+
subtle: {
|
|
40
|
+
light: "var(--ds-background-input-pressed)";
|
|
41
|
+
dark: "var(--ds-background-input-pressed)";
|
|
42
|
+
};
|
|
43
|
+
none: {
|
|
44
|
+
light: string;
|
|
45
|
+
dark: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
backgroundColorHover: {
|
|
49
|
+
standard: {
|
|
50
|
+
light: "var(--ds-background-input-hovered)";
|
|
51
|
+
dark: "var(--ds-background-input-hovered)";
|
|
52
|
+
};
|
|
53
|
+
subtle: {
|
|
54
|
+
light: "var(--ds-background-input-hovered)";
|
|
55
|
+
dark: "var(--ds-background-input-hovered)";
|
|
56
|
+
};
|
|
57
|
+
none: {
|
|
58
|
+
light: string;
|
|
59
|
+
dark: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
borderColor: {
|
|
63
|
+
standard: {
|
|
64
|
+
light: "var(--ds-border-input)";
|
|
65
|
+
dark: "var(--ds-border-input)";
|
|
66
|
+
};
|
|
67
|
+
subtle: {
|
|
68
|
+
light: string;
|
|
69
|
+
dark: string;
|
|
70
|
+
};
|
|
71
|
+
none: {
|
|
72
|
+
light: string;
|
|
73
|
+
dark: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
borderColorFocus: {
|
|
77
|
+
standard: {
|
|
78
|
+
light: "var(--ds-border-focused)";
|
|
79
|
+
dark: "var(--ds-border-focused)";
|
|
80
|
+
};
|
|
81
|
+
subtle: {
|
|
82
|
+
light: "var(--ds-border-focused)";
|
|
83
|
+
dark: "var(--ds-border-focused)";
|
|
84
|
+
};
|
|
85
|
+
none: {
|
|
86
|
+
light: string;
|
|
87
|
+
dark: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
borderColorHover: {
|
|
91
|
+
standard: {
|
|
92
|
+
light: "var(--ds-border-input)";
|
|
93
|
+
dark: "var(--ds-border-input)";
|
|
94
|
+
};
|
|
95
|
+
subtle: {
|
|
96
|
+
light: "var(--ds-border-input)";
|
|
97
|
+
dark: "var(--ds-border-input)";
|
|
98
|
+
};
|
|
99
|
+
none: {
|
|
100
|
+
light: string;
|
|
101
|
+
dark: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
placeholderTextColor: {
|
|
105
|
+
light: "var(--ds-text-subtlest)";
|
|
106
|
+
dark: "var(--ds-text-subtlest)";
|
|
107
|
+
};
|
|
108
|
+
textColor: {
|
|
109
|
+
light: "var(--ds-text)";
|
|
110
|
+
dark: "var(--ds-text)";
|
|
111
|
+
};
|
|
112
|
+
invalidRules: {
|
|
113
|
+
light: {
|
|
114
|
+
backgroundColor: "var(--ds-background-input)";
|
|
115
|
+
backgroundColorHover: "var(--ds-background-input-hovered)";
|
|
116
|
+
backgroundColorFocus: "var(--ds-background-input-pressed)";
|
|
117
|
+
borderColor: "var(--ds-border-danger)";
|
|
118
|
+
borderColorFocus: "var(--ds-border-focused)";
|
|
119
|
+
};
|
|
120
|
+
dark: {
|
|
121
|
+
backgroundColor: "var(--ds-background-input)";
|
|
122
|
+
backgroundColorHover: "var(--ds-background-input-hovered)";
|
|
123
|
+
backgroundColorFocus: "var(--ds-background-input-pressed)";
|
|
124
|
+
borderColor: "var(--ds-border-danger)";
|
|
125
|
+
borderColorFocus: "var(--ds-border-focused)";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
disabledRules: {
|
|
129
|
+
light: {
|
|
130
|
+
backgroundColor: "var(--ds-background-disabled)";
|
|
131
|
+
backgroundColorHover: "var(--ds-background-disabled)";
|
|
132
|
+
borderColor: "var(--ds-background-disabled)";
|
|
133
|
+
textColor: "var(--ds-text-disabled)";
|
|
134
|
+
};
|
|
135
|
+
dark: {
|
|
136
|
+
backgroundColor: "var(--ds-background-disabled)";
|
|
137
|
+
backgroundColorHover: "var(--ds-background-disabled)";
|
|
138
|
+
borderColor: "var(--ds-background-disabled)";
|
|
139
|
+
textColor: "var(--ds-text-disabled)";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// @public (undocumented)
|
|
145
|
+
export interface TextFieldProps extends AllHTMLAttributes<HTMLInputElement> {
|
|
146
|
+
appearance?: Appearance;
|
|
147
|
+
className?: string;
|
|
148
|
+
elemAfterInput?: React_2.ReactNode;
|
|
149
|
+
elemBeforeInput?: React_2.ReactNode;
|
|
150
|
+
isCompact?: boolean;
|
|
151
|
+
isDisabled?: boolean;
|
|
152
|
+
isInvalid?: boolean;
|
|
153
|
+
isMonospaced?: boolean;
|
|
154
|
+
isReadOnly?: boolean;
|
|
155
|
+
isRequired?: boolean;
|
|
156
|
+
name?: string;
|
|
157
|
+
onChange?: FormEventHandler<HTMLInputElement>;
|
|
158
|
+
onMouseDown?: React_2.MouseEventHandler<HTMLElement>;
|
|
159
|
+
placeholder?: string;
|
|
160
|
+
testId?: string;
|
|
161
|
+
width?: number | string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// (No @packageDocumentation comment for this package)
|
|
165
|
+
|
|
166
|
+
```
|