@atlaskit/textfield 8.3.1 → 9.0.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/CHANGELOG.md +32 -0
- package/dist/cjs/text-field.compiled.css +2 -2
- package/dist/cjs/text-field.js +2 -2
- package/dist/es2019/text-field.compiled.css +2 -2
- package/dist/es2019/text-field.js +2 -2
- package/dist/esm/text-field.compiled.css +2 -2
- package/dist/esm/text-field.js +2 -2
- package/package.json +14 -21
- package/text-field/package.json +1 -8
- package/textfield.docs.tsx +45 -43
- package/types/package.json +1 -8
- package/dist/types-ts4.5/entry-points/text-field.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/text-field.d.ts +0 -17
- package/dist/types-ts4.5/types.d.ts +0 -74
- package/offerings.json +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/textfield
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 8.3.2
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 8.3.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
8
|
._1dqoglyw{border-style:none}
|
|
9
9
|
._1dqonqa1{border-style:solid}
|
|
10
|
+
._1h6d187o{border-color:var(--ds-background-disabled,#0515240f)}
|
|
10
11
|
._1h6d1bqt{border-color:var(--ds-border-danger,#e2483d)}
|
|
11
12
|
._1h6d1j28{border-color:transparent}
|
|
12
|
-
._1h6dby5v{border-color:var(--ds-background-disabled,#17171708)}
|
|
13
13
|
._1h6drsbi{border-color:var(--ds-border-input,#8c8f97)}
|
|
14
14
|
._1p9x1j28._1p9x1j28:has(input:focus){border-color:transparent}
|
|
15
15
|
._1p9x1v1w._1p9x1v1w:has(input:focus){border-color:var(--ds-border-focused,#4688ec)}
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
._80om1kdv{cursor:text}
|
|
46
46
|
._80om1kw7{cursor:inherit}
|
|
47
47
|
._85i5e4h9{padding-block-end:var(--ds-border-width,1px)}
|
|
48
|
+
._bfhk187o{background-color:var(--ds-background-disabled,#0515240f)}
|
|
48
49
|
._bfhk1j28{background-color:transparent}
|
|
49
50
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
50
|
-
._bfhkby5v{background-color:var(--ds-background-disabled,#17171708)}
|
|
51
51
|
._bozgidpf{padding-inline-start:0}
|
|
52
52
|
._daj712x7[data-compact]{padding-inline-end:var(--ds-space-075,6px)}
|
|
53
53
|
._ect4zzfg{font-family:var(--ds-font-family-code,"Atlassian Mono",ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
|
package/dist/cjs/text-field.js
CHANGED
|
@@ -28,10 +28,10 @@ var inputMediaDisabled = null;
|
|
|
28
28
|
var analyticsParams = {
|
|
29
29
|
componentName: 'textField',
|
|
30
30
|
packageName: "@atlaskit/textfield",
|
|
31
|
-
packageVersion: "8.3.
|
|
31
|
+
packageVersion: "8.3.2"
|
|
32
32
|
};
|
|
33
33
|
var disabledStyle = {
|
|
34
|
-
standard: "
|
|
34
|
+
standard: "_1h6d187o _bfhk187o _syaz1gmx _80om13gf",
|
|
35
35
|
subtle: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf",
|
|
36
36
|
none: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf"
|
|
37
37
|
};
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
8
|
._1dqoglyw{border-style:none}
|
|
9
9
|
._1dqonqa1{border-style:solid}
|
|
10
|
+
._1h6d187o{border-color:var(--ds-background-disabled,#0515240f)}
|
|
10
11
|
._1h6d1bqt{border-color:var(--ds-border-danger,#e2483d)}
|
|
11
12
|
._1h6d1j28{border-color:transparent}
|
|
12
|
-
._1h6dby5v{border-color:var(--ds-background-disabled,#17171708)}
|
|
13
13
|
._1h6drsbi{border-color:var(--ds-border-input,#8c8f97)}
|
|
14
14
|
._1p9x1j28._1p9x1j28:has(input:focus){border-color:transparent}
|
|
15
15
|
._1p9x1v1w._1p9x1v1w:has(input:focus){border-color:var(--ds-border-focused,#4688ec)}
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
._80om1kdv{cursor:text}
|
|
46
46
|
._80om1kw7{cursor:inherit}
|
|
47
47
|
._85i5e4h9{padding-block-end:var(--ds-border-width,1px)}
|
|
48
|
+
._bfhk187o{background-color:var(--ds-background-disabled,#0515240f)}
|
|
48
49
|
._bfhk1j28{background-color:transparent}
|
|
49
50
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
50
|
-
._bfhkby5v{background-color:var(--ds-background-disabled,#17171708)}
|
|
51
51
|
._bozgidpf{padding-inline-start:0}
|
|
52
52
|
._daj712x7[data-compact]{padding-inline-end:var(--ds-space-075,6px)}
|
|
53
53
|
._ect4zzfg{font-family:var(--ds-font-family-code,"Atlassian Mono",ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
|
|
@@ -13,10 +13,10 @@ const inputMediaDisabled = null;
|
|
|
13
13
|
const analyticsParams = {
|
|
14
14
|
componentName: 'textField',
|
|
15
15
|
packageName: "@atlaskit/textfield",
|
|
16
|
-
packageVersion: "8.3.
|
|
16
|
+
packageVersion: "8.3.2"
|
|
17
17
|
};
|
|
18
18
|
const disabledStyle = {
|
|
19
|
-
standard: "
|
|
19
|
+
standard: "_1h6d187o _bfhk187o _syaz1gmx _80om13gf",
|
|
20
20
|
subtle: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf",
|
|
21
21
|
none: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf"
|
|
22
22
|
};
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
8
|
._1dqoglyw{border-style:none}
|
|
9
9
|
._1dqonqa1{border-style:solid}
|
|
10
|
+
._1h6d187o{border-color:var(--ds-background-disabled,#0515240f)}
|
|
10
11
|
._1h6d1bqt{border-color:var(--ds-border-danger,#e2483d)}
|
|
11
12
|
._1h6d1j28{border-color:transparent}
|
|
12
|
-
._1h6dby5v{border-color:var(--ds-background-disabled,#17171708)}
|
|
13
13
|
._1h6drsbi{border-color:var(--ds-border-input,#8c8f97)}
|
|
14
14
|
._1p9x1j28._1p9x1j28:has(input:focus){border-color:transparent}
|
|
15
15
|
._1p9x1v1w._1p9x1v1w:has(input:focus){border-color:var(--ds-border-focused,#4688ec)}
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
._80om1kdv{cursor:text}
|
|
46
46
|
._80om1kw7{cursor:inherit}
|
|
47
47
|
._85i5e4h9{padding-block-end:var(--ds-border-width,1px)}
|
|
48
|
+
._bfhk187o{background-color:var(--ds-background-disabled,#0515240f)}
|
|
48
49
|
._bfhk1j28{background-color:transparent}
|
|
49
50
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
50
|
-
._bfhkby5v{background-color:var(--ds-background-disabled,#17171708)}
|
|
51
51
|
._bozgidpf{padding-inline-start:0}
|
|
52
52
|
._daj712x7[data-compact]{padding-inline-end:var(--ds-space-075,6px)}
|
|
53
53
|
._ect4zzfg{font-family:var(--ds-font-family-code,"Atlassian Mono",ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
|
package/dist/esm/text-field.js
CHANGED
|
@@ -19,10 +19,10 @@ var inputMediaDisabled = null;
|
|
|
19
19
|
var analyticsParams = {
|
|
20
20
|
componentName: 'textField',
|
|
21
21
|
packageName: "@atlaskit/textfield",
|
|
22
|
-
packageVersion: "8.3.
|
|
22
|
+
packageVersion: "8.3.2"
|
|
23
23
|
};
|
|
24
24
|
var disabledStyle = {
|
|
25
|
-
standard: "
|
|
25
|
+
standard: "_1h6d187o _bfhk187o _syaz1gmx _80om13gf",
|
|
26
26
|
subtle: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf",
|
|
27
27
|
none: "_1h6d1j28 _bfhk1j28 _syaz1gmx _80om13gf"
|
|
28
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textfield",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
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/"
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/analytics-next": "^
|
|
35
|
-
"@atlaskit/platform-feature-flags": "^
|
|
36
|
-
"@atlaskit/tokens": "^
|
|
34
|
+
"@atlaskit/analytics-next": "^12.0.0",
|
|
35
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
36
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
38
|
"@compiled/react": "^0.20.0"
|
|
39
39
|
},
|
|
@@ -44,20 +44,21 @@
|
|
|
44
44
|
"@af/accessibility-testing": "workspace:^",
|
|
45
45
|
"@af/integration-testing": "workspace:^",
|
|
46
46
|
"@af/visual-regression": "workspace:^",
|
|
47
|
-
"@atlaskit/avatar": "^
|
|
48
|
-
"@atlaskit/button": "^
|
|
49
|
-
"@atlaskit/docs": "^
|
|
50
|
-
"@atlaskit/ds-lib": "^
|
|
51
|
-
"@atlaskit/form": "^
|
|
52
|
-
"@atlaskit/icon": "^
|
|
53
|
-
"@atlaskit/link": "^
|
|
54
|
-
"@atlaskit/primitives": "^
|
|
55
|
-
"@atlaskit/section-message": "^
|
|
47
|
+
"@atlaskit/avatar": "^26.0.0",
|
|
48
|
+
"@atlaskit/button": "^24.0.0",
|
|
49
|
+
"@atlaskit/docs": "^12.0.0",
|
|
50
|
+
"@atlaskit/ds-lib": "^8.0.0",
|
|
51
|
+
"@atlaskit/form": "^16.0.0",
|
|
52
|
+
"@atlaskit/icon": "^36.0.0",
|
|
53
|
+
"@atlaskit/link": "^4.0.0",
|
|
54
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
55
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
56
56
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
57
57
|
"@atlassian/ssr-tests": "workspace:^",
|
|
58
58
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
59
59
|
"@testing-library/react": "^16.3.0",
|
|
60
60
|
"@testing-library/user-event": "^14.4.3",
|
|
61
|
+
"react": "^18.2.0",
|
|
61
62
|
"react-dom": "^18.2.0"
|
|
62
63
|
},
|
|
63
64
|
"keywords": [
|
|
@@ -85,14 +86,6 @@
|
|
|
85
86
|
"deprecation": "no-deprecated-imports"
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
|
-
"typesVersions": {
|
|
89
|
-
">=4.5 <4.9": {
|
|
90
|
-
"*": [
|
|
91
|
-
"dist/types-ts4.5/*",
|
|
92
|
-
"dist/types-ts4.5/index.d.ts"
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
89
|
"platform-feature-flags": {
|
|
97
90
|
"platform-dst-shape-theme-default": {
|
|
98
91
|
"type": "boolean"
|
package/text-field/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/text-field.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/text-field.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/text-field.d.ts"
|
|
17
10
|
}
|
package/textfield.docs.tsx
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
4
4
|
|
|
5
|
-
const documentation:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: 'A single-line text input component.',
|
|
9
|
-
status: 'general-availability',
|
|
10
|
-
import: {
|
|
5
|
+
const documentation: StructuredContentSource = {
|
|
6
|
+
components: [
|
|
7
|
+
{
|
|
11
8
|
name: 'TextField',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'Do not use placeholder for critical info—use label or helper text (search exception: search icon + accessible label)',
|
|
21
|
-
'Consider character limits and validation',
|
|
22
|
-
],
|
|
23
|
-
contentGuidelines: [
|
|
24
|
-
'Write clear, short labels',
|
|
25
|
-
'Use helper text for examples/formatting; keep helper visible after input',
|
|
26
|
-
'Provide appropriate error messages',
|
|
27
|
-
'Consider content length and formatting',
|
|
28
|
-
],
|
|
29
|
-
accessibilityGuidelines: [
|
|
30
|
-
'Use visible label or proper association; do not use placeholder for critical info—use label or helper (search is exception with icon + accessible label)',
|
|
31
|
-
'Do not nest interactive elements (causes focus issues)',
|
|
32
|
-
'Custom validation: validate onBlur; use error container with aria-live="polite" and aria-relevant/aria-atomic for dynamic announcements',
|
|
33
|
-
'Provide clear labels for all textfields',
|
|
34
|
-
'Provide keyboard navigation support',
|
|
35
|
-
'Indicate required fields clearly',
|
|
36
|
-
'Use appropriate error states and messaging',
|
|
37
|
-
],
|
|
38
|
-
examples: [
|
|
39
|
-
{
|
|
40
|
-
name: 'Textfield',
|
|
41
|
-
description: 'Textfield example',
|
|
42
|
-
source: path.resolve(__dirname, './examples/ai/textfield.tsx'),
|
|
9
|
+
description: 'A single-line text input component.',
|
|
10
|
+
status: 'general-availability',
|
|
11
|
+
import: {
|
|
12
|
+
name: 'TextField',
|
|
13
|
+
package: '@atlaskit/textfield',
|
|
14
|
+
type: 'default',
|
|
15
|
+
packagePath: path.resolve(__dirname),
|
|
16
|
+
packageJson: require('./package.json'),
|
|
43
17
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
usageGuidelines: [
|
|
19
|
+
'Use for single-line text in forms, modals, search, cards',
|
|
20
|
+
'Label is required (above input); helper text optional',
|
|
21
|
+
'Do not use placeholder for critical info—use label or helper text (search exception: search icon + accessible label)',
|
|
22
|
+
'Consider character limits and validation',
|
|
23
|
+
],
|
|
24
|
+
contentGuidelines: [
|
|
25
|
+
'Write clear, short labels',
|
|
26
|
+
'Use helper text for examples/formatting; keep helper visible after input',
|
|
27
|
+
'Provide appropriate error messages',
|
|
28
|
+
'Consider content length and formatting',
|
|
29
|
+
],
|
|
30
|
+
accessibilityGuidelines: [
|
|
31
|
+
'Use visible label or proper association; do not use placeholder for critical info—use label or helper (search is exception with icon + accessible label)',
|
|
32
|
+
'Do not nest interactive elements (causes focus issues)',
|
|
33
|
+
'Custom validation: validate onBlur; use error container with aria-live="polite" and aria-relevant/aria-atomic for dynamic announcements',
|
|
34
|
+
'Provide clear labels for all textfields',
|
|
35
|
+
'Provide keyboard navigation support',
|
|
36
|
+
'Indicate required fields clearly',
|
|
37
|
+
'Use appropriate error states and messaging',
|
|
38
|
+
],
|
|
39
|
+
examples: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Textfield',
|
|
42
|
+
description: 'Textfield example',
|
|
43
|
+
source: path.resolve(__dirname, './examples/ai/textfield.tsx'),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
keywords: ['textfield', 'input', 'form', 'text', 'field', 'single-line'],
|
|
47
|
+
categories: ['form'],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
49
51
|
|
|
50
52
|
export default documentation;
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../text-field';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Appearance, TextfieldProps } from '../types';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { type TextfieldProps } from './types';
|
|
7
|
-
/**
|
|
8
|
-
* __Textfield__
|
|
9
|
-
*
|
|
10
|
-
* A text field is an input that allows a user to write or edit text.
|
|
11
|
-
*
|
|
12
|
-
* - [Examples](https://atlassian.design/components/textfield/examples)
|
|
13
|
-
* - [Code](https://atlassian.design/components/textfield/code)
|
|
14
|
-
* - [Usage](https://atlassian.design/components/textfield/usage)
|
|
15
|
-
*/
|
|
16
|
-
declare const Textfield: React.ForwardRefExoticComponent<React.PropsWithoutRef<TextfieldProps> & React.RefAttributes<unknown>>;
|
|
17
|
-
export default Textfield;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { type AllHTMLAttributes, type FormEventHandler, type default as React } from 'react';
|
|
2
|
-
export interface TextfieldProps extends Omit<AllHTMLAttributes<HTMLInputElement>, 'disabled'> {
|
|
3
|
-
/**
|
|
4
|
-
* Controls the appearance of the field.
|
|
5
|
-
* Subtle shows styling on hover.
|
|
6
|
-
* None prevents all field styling. Take care when using the none appearance as this doesn't include accessible interactions.
|
|
7
|
-
*/
|
|
8
|
-
appearance?: Appearance;
|
|
9
|
-
/**
|
|
10
|
-
* Applies compact styling, making the field smaller.
|
|
11
|
-
*/
|
|
12
|
-
isCompact?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Sets the field as to appear disabled,
|
|
15
|
-
* people will not be able to interact with the text field and it won't appear in the focus order.
|
|
16
|
-
* Wherever possible, prefer using validation and error messaging over disabled fields for a more accessible experience.
|
|
17
|
-
*/
|
|
18
|
-
isDisabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Changes the text field to have a border indicating that its value is invalid.
|
|
21
|
-
*/
|
|
22
|
-
isInvalid?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Sets content text value to appear monospaced.
|
|
25
|
-
*/
|
|
26
|
-
isMonospaced?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* If true, prevents the value of the input from being edited.
|
|
29
|
-
*/
|
|
30
|
-
isReadOnly?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Set required for form that the field is part of.
|
|
33
|
-
*/
|
|
34
|
-
isRequired?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Element after input in text field.
|
|
37
|
-
*/
|
|
38
|
-
elemAfterInput?: React.ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Element before input in text field.
|
|
41
|
-
*/
|
|
42
|
-
elemBeforeInput?: React.ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Sets maximum width of input.
|
|
45
|
-
*/
|
|
46
|
-
width?: string | number;
|
|
47
|
-
/**
|
|
48
|
-
* Handler called when the mouse down event is triggered on the input element.
|
|
49
|
-
*/
|
|
50
|
-
onMouseDown?: React.MouseEventHandler<HTMLElement>;
|
|
51
|
-
/**
|
|
52
|
-
* A `testId` prop is provided for specified elements, which is a unique
|
|
53
|
-
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
54
|
-
* serving as a hook for automated tests.
|
|
55
|
-
*/
|
|
56
|
-
testId?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Name of the input element.
|
|
59
|
-
*/
|
|
60
|
-
name?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Class name to apply to the input element.
|
|
63
|
-
*/
|
|
64
|
-
className?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Placeholder text to display in the text field whenever it is empty.
|
|
67
|
-
*/
|
|
68
|
-
placeholder?: string;
|
|
69
|
-
/**
|
|
70
|
-
* Handler called when the inputs value changes.
|
|
71
|
-
*/
|
|
72
|
-
onChange?: FormEventHandler<HTMLInputElement>;
|
|
73
|
-
}
|
|
74
|
-
export type Appearance = 'subtle' | 'standard' | 'none';
|
package/offerings.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "TextField",
|
|
4
|
-
"package": "@atlaskit/textfield",
|
|
5
|
-
"import": {
|
|
6
|
-
"name": "TextField",
|
|
7
|
-
"package": "@atlaskit/textfield",
|
|
8
|
-
"type": "default"
|
|
9
|
-
},
|
|
10
|
-
"keywords": ["textfield", "input", "form", "text", "field", "single-line"],
|
|
11
|
-
"categories": ["form"],
|
|
12
|
-
"shortDescription": "A single-line text input component.",
|
|
13
|
-
"status": "general-availability",
|
|
14
|
-
"accessibilityGuidelines": [
|
|
15
|
-
"Provide clear labels for all textfields",
|
|
16
|
-
"Use appropriate placeholder text that doesn't replace labels",
|
|
17
|
-
"Provide keyboard navigation support",
|
|
18
|
-
"Indicate required fields clearly",
|
|
19
|
-
"Use appropriate error states and messaging"
|
|
20
|
-
],
|
|
21
|
-
"usageGuidelines": [
|
|
22
|
-
"Use for single-line text input needs",
|
|
23
|
-
"Provide appropriate sizing for content type",
|
|
24
|
-
"Use clear, descriptive labels",
|
|
25
|
-
"Consider character limits and validation",
|
|
26
|
-
"Use appropriate placeholder text"
|
|
27
|
-
],
|
|
28
|
-
"contentGuidelines": [
|
|
29
|
-
"Write clear, descriptive labels",
|
|
30
|
-
"Use helpful placeholder text",
|
|
31
|
-
"Provide appropriate error messages",
|
|
32
|
-
"Consider content length and formatting"
|
|
33
|
-
],
|
|
34
|
-
"generativeInstructions": "./docs/ai/textfield-instructions.md",
|
|
35
|
-
"examples": ["./examples/ai/textfield.tsx"]
|
|
36
|
-
}
|
|
37
|
-
]
|