@atlaskit/form 15.4.2 → 15.5.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 +11 -0
- package/character-counter/package.json +17 -0
- package/character-counter-field/package.json +17 -0
- package/checkbox-field/package.json +17 -0
- package/dist/cjs/entry-points/character-counter-field.js +13 -0
- package/dist/cjs/entry-points/character-counter.js +13 -0
- package/dist/cjs/entry-points/required-asterisk.js +13 -0
- package/dist/cjs/entry-points/use-form-state.js +12 -0
- package/dist/es2019/entry-points/character-counter-field.js +1 -0
- package/dist/es2019/entry-points/character-counter.js +1 -0
- package/dist/es2019/entry-points/required-asterisk.js +1 -0
- package/dist/es2019/entry-points/use-form-state.js +1 -0
- package/dist/esm/entry-points/character-counter-field.js +1 -0
- package/dist/esm/entry-points/character-counter.js +1 -0
- package/dist/esm/entry-points/required-asterisk.js +1 -0
- package/dist/esm/entry-points/use-form-state.js +1 -0
- package/dist/types/entry-points/character-counter-field.d.ts +2 -0
- package/dist/types/entry-points/character-counter.d.ts +2 -0
- package/dist/types/entry-points/form.d.ts +1 -0
- package/dist/types/entry-points/required-asterisk.d.ts +1 -0
- package/dist/types/entry-points/use-form-state.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/character-counter-field.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/character-counter.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/form.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/required-asterisk.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/use-form-state.d.ts +1 -0
- package/field/package.json +17 -0
- package/fieldset/package.json +17 -0
- package/form/package.json +17 -0
- package/form-footer/package.json +17 -0
- package/form-header/package.json +17 -0
- package/form-section/package.json +17 -0
- package/form.docs.tsx +442 -0
- package/label/package.json +17 -0
- package/messages/package.json +17 -0
- package/package.json +3 -3
- package/range-field/package.json +17 -0
- package/required-asterisk/package.json +17 -0
- package/types/package.json +17 -0
- package/use-form-state/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 15.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b9829b6cd7780`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b9829b6cd7780) -
|
|
8
|
+
Autofix: add explicit package exports (barrel removal)
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 15.4.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/character-counter",
|
|
3
|
+
"main": "../dist/cjs/entry-points/character-counter.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/character-counter.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/character-counter.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/character-counter.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/character-counter.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/character-counter-field",
|
|
3
|
+
"main": "../dist/cjs/entry-points/character-counter-field.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/character-counter-field.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/character-counter-field.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/character-counter-field.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/character-counter-field.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/checkbox-field",
|
|
3
|
+
"main": "../dist/cjs/entry-points/checkbox-field.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/checkbox-field.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/checkbox-field.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/checkbox-field.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/checkbox-field.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "CharacterCounterField", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _characterCounterField.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _characterCounterField = _interopRequireDefault(require("../character-counter-field"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "CharacterCounter", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _characterCounter.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _characterCounter = _interopRequireDefault(require("../character-counter"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "RequiredAsterisk", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _requiredAsterisk.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _requiredAsterisk = _interopRequireDefault(require("../required-asterisk"));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useFormState", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _useFormState.useFormState;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _useFormState = require("../use-form-state");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CharacterCounterField } from '../character-counter-field';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CharacterCounter } from '../character-counter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RequiredAsterisk } from '../required-asterisk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormState } from '../use-form-state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CharacterCounterField } from '../character-counter-field';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CharacterCounter } from '../character-counter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RequiredAsterisk } from '../required-asterisk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormState } from '../use-form-state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RequiredAsterisk } from '../required-asterisk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormState } from '../use-form-state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RequiredAsterisk } from '../required-asterisk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormState } from '../use-form-state';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/field",
|
|
3
|
+
"main": "../dist/cjs/entry-points/field.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/field.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/field.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/field.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/field.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/fieldset",
|
|
3
|
+
"main": "../dist/cjs/entry-points/fieldset.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/fieldset.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/fieldset.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/fieldset.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/fieldset.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/form",
|
|
3
|
+
"main": "../dist/cjs/entry-points/form.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/form.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/form.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/form.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/form.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/form-footer",
|
|
3
|
+
"main": "../dist/cjs/entry-points/form-footer.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/form-footer.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/form-footer.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/form-footer.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/form-footer.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/form-header",
|
|
3
|
+
"main": "../dist/cjs/entry-points/form-header.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/form-header.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/form-header.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/form-header.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/form-header.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/form-section",
|
|
3
|
+
"main": "../dist/cjs/entry-points/form-section.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/form-section.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/form-section.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/form-section.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/form-section.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/form.docs.tsx
CHANGED
|
@@ -50,6 +50,448 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
50
50
|
keywords: ['form', 'validation', 'field', 'input', 'submit', 'state'],
|
|
51
51
|
categories: ['form'],
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
name: 'FormHeader',
|
|
55
|
+
description:
|
|
56
|
+
'The header section of a form, typically containing the title and optional description.',
|
|
57
|
+
status: 'general-availability',
|
|
58
|
+
import: {
|
|
59
|
+
name: 'FormHeader',
|
|
60
|
+
package: '@atlaskit/form',
|
|
61
|
+
type: 'named',
|
|
62
|
+
packagePath: path.resolve(__dirname),
|
|
63
|
+
packageJson: require('./package.json'),
|
|
64
|
+
},
|
|
65
|
+
usageGuidelines: [
|
|
66
|
+
'Use at the top of a form to provide context',
|
|
67
|
+
'Include title and optional description or hint text',
|
|
68
|
+
'Use RequiredAsterisk legend for required field indication',
|
|
69
|
+
],
|
|
70
|
+
contentGuidelines: ['Use clear, descriptive form titles', 'Keep descriptions concise'],
|
|
71
|
+
examples: [
|
|
72
|
+
{
|
|
73
|
+
name: 'Form Header',
|
|
74
|
+
description: 'FormHeader example',
|
|
75
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
keywords: ['form', 'header', 'title', 'description'],
|
|
79
|
+
categories: ['form'],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'FormFooter',
|
|
83
|
+
description: 'The footer section of a form, typically containing submit and cancel buttons.',
|
|
84
|
+
status: 'general-availability',
|
|
85
|
+
import: {
|
|
86
|
+
name: 'FormFooter',
|
|
87
|
+
package: '@atlaskit/form',
|
|
88
|
+
type: 'named',
|
|
89
|
+
packagePath: path.resolve(__dirname),
|
|
90
|
+
packageJson: require('./package.json'),
|
|
91
|
+
},
|
|
92
|
+
usageGuidelines: [
|
|
93
|
+
'Use for primary and secondary actions',
|
|
94
|
+
'Primary button on the right; include Cancel for dismissal',
|
|
95
|
+
'Use align prop for left or right alignment',
|
|
96
|
+
],
|
|
97
|
+
contentGuidelines: [
|
|
98
|
+
'Use action verbs in button labels',
|
|
99
|
+
'Primary button reflects the form action',
|
|
100
|
+
],
|
|
101
|
+
examples: [
|
|
102
|
+
{
|
|
103
|
+
name: 'Form Footer',
|
|
104
|
+
description: 'FormFooter example',
|
|
105
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
keywords: ['form', 'footer', 'actions', 'buttons'],
|
|
109
|
+
categories: ['form'],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'FormSection',
|
|
113
|
+
description: 'A section within a form that groups related fields together.',
|
|
114
|
+
status: 'general-availability',
|
|
115
|
+
import: {
|
|
116
|
+
name: 'FormSection',
|
|
117
|
+
package: '@atlaskit/form',
|
|
118
|
+
type: 'named',
|
|
119
|
+
packagePath: path.resolve(__dirname),
|
|
120
|
+
packageJson: require('./package.json'),
|
|
121
|
+
},
|
|
122
|
+
usageGuidelines: [
|
|
123
|
+
'Use to group related fields logically',
|
|
124
|
+
'Optional title for section heading',
|
|
125
|
+
'Improves form scannability',
|
|
126
|
+
],
|
|
127
|
+
contentGuidelines: ['Use clear section titles when provided', 'Group related fields together'],
|
|
128
|
+
examples: [
|
|
129
|
+
{
|
|
130
|
+
name: 'Form Section',
|
|
131
|
+
description: 'FormSection example',
|
|
132
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
keywords: ['form', 'section', 'group', 'fields'],
|
|
136
|
+
categories: ['form'],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'Field',
|
|
140
|
+
description:
|
|
141
|
+
'A form field wrapper that provides label, validation, and error handling. Used with any form control via the component prop.',
|
|
142
|
+
status: 'general-availability',
|
|
143
|
+
import: {
|
|
144
|
+
name: 'Field',
|
|
145
|
+
package: '@atlaskit/form',
|
|
146
|
+
type: 'named',
|
|
147
|
+
packagePath: path.resolve(__dirname),
|
|
148
|
+
packageJson: require('./package.json'),
|
|
149
|
+
},
|
|
150
|
+
usageGuidelines: [
|
|
151
|
+
'Use for each form input; provide name, label, and component',
|
|
152
|
+
'Use isRequired for required fields',
|
|
153
|
+
'Use validate for validation logic; use helperMessage for instructions',
|
|
154
|
+
'Wrap messages in MessageWrapper with HelperMessage, ErrorMessage, ValidMessage',
|
|
155
|
+
],
|
|
156
|
+
contentGuidelines: [
|
|
157
|
+
'Use clear, descriptive labels',
|
|
158
|
+
'Provide specific error messages',
|
|
159
|
+
'Use helper text for complex fields',
|
|
160
|
+
],
|
|
161
|
+
examples: [
|
|
162
|
+
{
|
|
163
|
+
name: 'Field',
|
|
164
|
+
description: 'Field example',
|
|
165
|
+
source: path.resolve(__dirname, './examples/constellation/form-field-simple.tsx'),
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
keywords: ['form', 'field', 'input', 'validation'],
|
|
169
|
+
categories: ['form'],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'Label',
|
|
173
|
+
description:
|
|
174
|
+
'A label component for form fields. Usually used internally by Field, but can be used standalone.',
|
|
175
|
+
status: 'general-availability',
|
|
176
|
+
import: {
|
|
177
|
+
name: 'Label',
|
|
178
|
+
package: '@atlaskit/form',
|
|
179
|
+
type: 'named',
|
|
180
|
+
packagePath: path.resolve(__dirname),
|
|
181
|
+
packageJson: require('./package.json'),
|
|
182
|
+
},
|
|
183
|
+
usageGuidelines: [
|
|
184
|
+
'Use with Field for field labels',
|
|
185
|
+
'Associate with form controls via htmlFor',
|
|
186
|
+
],
|
|
187
|
+
contentGuidelines: ['Use clear, descriptive labels'],
|
|
188
|
+
examples: [
|
|
189
|
+
{
|
|
190
|
+
name: 'Label',
|
|
191
|
+
description: 'Standalone label associated with a text field via htmlFor / id',
|
|
192
|
+
source: path.resolve(__dirname, './examples/ai/label-standalone.tsx'),
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
keywords: ['form', 'label'],
|
|
196
|
+
categories: ['form'],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'Legend',
|
|
200
|
+
description:
|
|
201
|
+
'A legend component for fieldset groups. Used with Fieldset for grouping related fields.',
|
|
202
|
+
status: 'general-availability',
|
|
203
|
+
import: {
|
|
204
|
+
name: 'Legend',
|
|
205
|
+
package: '@atlaskit/form',
|
|
206
|
+
type: 'named',
|
|
207
|
+
packagePath: path.resolve(__dirname),
|
|
208
|
+
packageJson: require('./package.json'),
|
|
209
|
+
},
|
|
210
|
+
usageGuidelines: [
|
|
211
|
+
'Use with Fieldset to describe a group of fields',
|
|
212
|
+
'Required for accessibility',
|
|
213
|
+
],
|
|
214
|
+
contentGuidelines: ['Use clear, descriptive legend text'],
|
|
215
|
+
examples: [
|
|
216
|
+
{
|
|
217
|
+
name: 'Legend',
|
|
218
|
+
description: 'Legend example',
|
|
219
|
+
source: path.resolve(__dirname, './examples/constellation/form-fieldset.tsx'),
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
keywords: ['form', 'legend', 'fieldset'],
|
|
223
|
+
categories: ['form'],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'HelperMessage',
|
|
227
|
+
description: 'Displays helper or hint text for a form field.',
|
|
228
|
+
status: 'general-availability',
|
|
229
|
+
import: {
|
|
230
|
+
name: 'HelperMessage',
|
|
231
|
+
package: '@atlaskit/form',
|
|
232
|
+
type: 'named',
|
|
233
|
+
packagePath: path.resolve(__dirname),
|
|
234
|
+
packageJson: require('./package.json'),
|
|
235
|
+
},
|
|
236
|
+
usageGuidelines: [
|
|
237
|
+
'Use within MessageWrapper to show instructions or hints',
|
|
238
|
+
'Place below the form control',
|
|
239
|
+
'Use for critical info—not placeholder alone',
|
|
240
|
+
],
|
|
241
|
+
contentGuidelines: ['Provide clear, actionable instructions', 'Keep helper text concise'],
|
|
242
|
+
examples: [
|
|
243
|
+
{
|
|
244
|
+
name: 'Helper Message',
|
|
245
|
+
description: 'HelperMessage example',
|
|
246
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
keywords: ['form', 'helper', 'message', 'hint'],
|
|
250
|
+
categories: ['form'],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'ErrorMessage',
|
|
254
|
+
description: 'Displays validation error text for a form field.',
|
|
255
|
+
status: 'general-availability',
|
|
256
|
+
import: {
|
|
257
|
+
name: 'ErrorMessage',
|
|
258
|
+
package: '@atlaskit/form',
|
|
259
|
+
type: 'named',
|
|
260
|
+
packagePath: path.resolve(__dirname),
|
|
261
|
+
packageJson: require('./package.json'),
|
|
262
|
+
},
|
|
263
|
+
usageGuidelines: [
|
|
264
|
+
'Use within MessageWrapper when field validation fails',
|
|
265
|
+
'Show specific, actionable error messages',
|
|
266
|
+
'Place below the form control',
|
|
267
|
+
],
|
|
268
|
+
contentGuidelines: ['Provide specific error messages', 'Explain how to fix the error'],
|
|
269
|
+
examples: [
|
|
270
|
+
{
|
|
271
|
+
name: 'Error Message',
|
|
272
|
+
description: 'ErrorMessage example',
|
|
273
|
+
source: path.resolve(__dirname, './examples/constellation/form-field-level-validation.tsx'),
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
keywords: ['form', 'error', 'message', 'validation'],
|
|
277
|
+
categories: ['form'],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'ValidMessage',
|
|
281
|
+
description: 'Displays success or valid state feedback for a form field.',
|
|
282
|
+
status: 'general-availability',
|
|
283
|
+
import: {
|
|
284
|
+
name: 'ValidMessage',
|
|
285
|
+
package: '@atlaskit/form',
|
|
286
|
+
type: 'named',
|
|
287
|
+
packagePath: path.resolve(__dirname),
|
|
288
|
+
packageJson: require('./package.json'),
|
|
289
|
+
},
|
|
290
|
+
usageGuidelines: [
|
|
291
|
+
'Use within MessageWrapper when field passes validation',
|
|
292
|
+
'Show positive feedback (e.g. "Username is available")',
|
|
293
|
+
'Use sparingly to avoid clutter',
|
|
294
|
+
],
|
|
295
|
+
contentGuidelines: ['Keep valid messages concise'],
|
|
296
|
+
examples: [
|
|
297
|
+
{
|
|
298
|
+
name: 'Valid Message',
|
|
299
|
+
description: 'ValidMessage example',
|
|
300
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
keywords: ['form', 'valid', 'message', 'success'],
|
|
304
|
+
categories: ['form'],
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'MessageWrapper',
|
|
308
|
+
description:
|
|
309
|
+
'A wrapper for form field messages (HelperMessage, ErrorMessage, ValidMessage). Manages layout and visibility.',
|
|
310
|
+
status: 'general-availability',
|
|
311
|
+
import: {
|
|
312
|
+
name: 'MessageWrapper',
|
|
313
|
+
package: '@atlaskit/form',
|
|
314
|
+
type: 'named',
|
|
315
|
+
packagePath: path.resolve(__dirname),
|
|
316
|
+
packageJson: require('./package.json'),
|
|
317
|
+
},
|
|
318
|
+
usageGuidelines: [
|
|
319
|
+
'Wrap HelperMessage, ErrorMessage, and ValidMessage in MessageWrapper',
|
|
320
|
+
'Place below the form control within Field',
|
|
321
|
+
],
|
|
322
|
+
examples: [
|
|
323
|
+
{
|
|
324
|
+
name: 'Message wrapper',
|
|
325
|
+
description: 'MessageWrapper grouping helper, error, and valid messages',
|
|
326
|
+
source: path.resolve(__dirname, './examples/21-messages.tsx'),
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
keywords: ['form', 'message', 'wrapper'],
|
|
330
|
+
categories: ['form'],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'CheckboxField',
|
|
334
|
+
description: 'A form field for checkbox inputs. Wraps Checkbox with form field behavior.',
|
|
335
|
+
status: 'general-availability',
|
|
336
|
+
import: {
|
|
337
|
+
name: 'CheckboxField',
|
|
338
|
+
package: '@atlaskit/form',
|
|
339
|
+
type: 'named',
|
|
340
|
+
packagePath: path.resolve(__dirname),
|
|
341
|
+
packageJson: require('./package.json'),
|
|
342
|
+
},
|
|
343
|
+
usageGuidelines: [
|
|
344
|
+
'Use for single or grouped checkbox options',
|
|
345
|
+
'Provide name and value props',
|
|
346
|
+
'Works with Checkbox from @atlaskit/checkbox',
|
|
347
|
+
],
|
|
348
|
+
examples: [
|
|
349
|
+
{
|
|
350
|
+
name: 'Checkbox Field',
|
|
351
|
+
description: 'CheckboxField example',
|
|
352
|
+
source: path.resolve(__dirname, './examples/constellation/form-checkbox-field.tsx'),
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
keywords: ['form', 'checkbox', 'field'],
|
|
356
|
+
categories: ['form'],
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'RangeField',
|
|
360
|
+
description: 'A form field for range/slider inputs. Wraps Range with form field behavior.',
|
|
361
|
+
status: 'general-availability',
|
|
362
|
+
import: {
|
|
363
|
+
name: 'RangeField',
|
|
364
|
+
package: '@atlaskit/form',
|
|
365
|
+
type: 'named',
|
|
366
|
+
packagePath: path.resolve(__dirname),
|
|
367
|
+
packageJson: require('./package.json'),
|
|
368
|
+
},
|
|
369
|
+
usageGuidelines: [
|
|
370
|
+
'Use for numeric range selection',
|
|
371
|
+
'Provide min, max, and step when needed',
|
|
372
|
+
'Works with Range from @atlaskit/range',
|
|
373
|
+
],
|
|
374
|
+
examples: [
|
|
375
|
+
{
|
|
376
|
+
name: 'Range Field',
|
|
377
|
+
description: 'RangeField example',
|
|
378
|
+
source: path.resolve(__dirname, './examples/constellation/form-range-field.tsx'),
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
keywords: ['form', 'range', 'field', 'slider'],
|
|
382
|
+
categories: ['form'],
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: 'Fieldset',
|
|
386
|
+
description:
|
|
387
|
+
'Groups related form fields with a legend. Use for radio groups or logical groupings.',
|
|
388
|
+
status: 'general-availability',
|
|
389
|
+
import: {
|
|
390
|
+
name: 'Fieldset',
|
|
391
|
+
package: '@atlaskit/form',
|
|
392
|
+
type: 'named',
|
|
393
|
+
packagePath: path.resolve(__dirname),
|
|
394
|
+
packageJson: require('./package.json'),
|
|
395
|
+
},
|
|
396
|
+
usageGuidelines: [
|
|
397
|
+
'Use with Legend to describe the group',
|
|
398
|
+
'Use for radio groups and logical field groupings',
|
|
399
|
+
'Improves accessibility',
|
|
400
|
+
],
|
|
401
|
+
examples: [
|
|
402
|
+
{
|
|
403
|
+
name: 'Fieldset',
|
|
404
|
+
description: 'Fieldset example',
|
|
405
|
+
source: path.resolve(__dirname, './examples/constellation/form-fieldset.tsx'),
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
keywords: ['form', 'fieldset', 'group'],
|
|
409
|
+
categories: ['form'],
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: 'RequiredAsterisk',
|
|
413
|
+
description:
|
|
414
|
+
'Visual indicator for required fields. Renders an asterisk (*) for form accessibility.',
|
|
415
|
+
status: 'general-availability',
|
|
416
|
+
import: {
|
|
417
|
+
name: 'RequiredAsterisk',
|
|
418
|
+
package: '@atlaskit/form',
|
|
419
|
+
type: 'named',
|
|
420
|
+
packagePath: path.resolve(__dirname),
|
|
421
|
+
packageJson: require('./package.json'),
|
|
422
|
+
},
|
|
423
|
+
usageGuidelines: [
|
|
424
|
+
'Use in FormHeader to indicate required fields legend',
|
|
425
|
+
'Or use Field isRequired which handles asterisk automatically',
|
|
426
|
+
],
|
|
427
|
+
contentGuidelines: ['Pair with "Required fields are marked with an asterisk" text'],
|
|
428
|
+
examples: [
|
|
429
|
+
{
|
|
430
|
+
name: 'Required Asterisk',
|
|
431
|
+
description: 'RequiredAsterisk example',
|
|
432
|
+
source: path.resolve(__dirname, './examples/constellation/form-default-complex.tsx'),
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
keywords: ['form', 'required', 'asterisk'],
|
|
436
|
+
categories: ['form'],
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: 'CharacterCounterField',
|
|
440
|
+
description:
|
|
441
|
+
'A form field that includes character count display. Combines Field with CharacterCounter.',
|
|
442
|
+
status: 'general-availability',
|
|
443
|
+
import: {
|
|
444
|
+
name: 'CharacterCounterField',
|
|
445
|
+
package: '@atlaskit/form',
|
|
446
|
+
type: 'named',
|
|
447
|
+
packagePath: path.resolve(__dirname),
|
|
448
|
+
packageJson: require('./package.json'),
|
|
449
|
+
},
|
|
450
|
+
usageGuidelines: [
|
|
451
|
+
'Use when character limits matter (e.g. descriptions, summaries)',
|
|
452
|
+
'Provide maxLength for the limit',
|
|
453
|
+
'Shows current count and limit',
|
|
454
|
+
],
|
|
455
|
+
examples: [
|
|
456
|
+
{
|
|
457
|
+
name: 'Character Counter Field',
|
|
458
|
+
description: 'CharacterCounterField example',
|
|
459
|
+
source: path.resolve(__dirname, './examples/constellation/form-character-counter.tsx'),
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
keywords: ['form', 'character', 'counter', 'field'],
|
|
463
|
+
categories: ['form'],
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: 'CharacterCounter',
|
|
467
|
+
description:
|
|
468
|
+
'Displays character count for text inputs. Can be used standalone or with CharacterCounterField.',
|
|
469
|
+
status: 'general-availability',
|
|
470
|
+
import: {
|
|
471
|
+
name: 'CharacterCounter',
|
|
472
|
+
package: '@atlaskit/form',
|
|
473
|
+
type: 'named',
|
|
474
|
+
packagePath: path.resolve(__dirname),
|
|
475
|
+
packageJson: require('./package.json'),
|
|
476
|
+
},
|
|
477
|
+
usageGuidelines: [
|
|
478
|
+
'Use when displaying character count for text inputs',
|
|
479
|
+
'Provide current length and max length',
|
|
480
|
+
'Use CharacterCounterField for integrated form field experience',
|
|
481
|
+
],
|
|
482
|
+
examples: [
|
|
483
|
+
{
|
|
484
|
+
name: 'Character Counter',
|
|
485
|
+
description: 'CharacterCounter example',
|
|
486
|
+
source: path.resolve(
|
|
487
|
+
__dirname,
|
|
488
|
+
'./examples/constellation/form-character-counter-standalone.tsx',
|
|
489
|
+
),
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
keywords: ['form', 'character', 'counter'],
|
|
493
|
+
categories: ['form'],
|
|
494
|
+
},
|
|
53
495
|
];
|
|
54
496
|
|
|
55
497
|
export default documentation;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/label",
|
|
3
|
+
"main": "../dist/cjs/entry-points/label.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/label.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/label.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/label.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/label.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/messages",
|
|
3
|
+
"main": "../dist/cjs/entry-points/messages.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/messages.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/messages.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/messages.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/messages.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.5.0",
|
|
4
4
|
"description": "A form allows people to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/icon": "^33.0.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
33
33
|
"@atlaskit/primitives": "^18.0.0",
|
|
34
|
-
"@atlaskit/tokens": "^11.
|
|
34
|
+
"@atlaskit/tokens": "^11.2.0",
|
|
35
35
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@compiled/react": "^0.20.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/docs": "^11.7.0",
|
|
56
56
|
"@atlaskit/link": "^3.3.0",
|
|
57
57
|
"@atlaskit/lozenge": "^13.5.0",
|
|
58
|
-
"@atlaskit/modal-dialog": "^14.
|
|
58
|
+
"@atlaskit/modal-dialog": "^14.12.0",
|
|
59
59
|
"@atlaskit/radio": "^8.4.0",
|
|
60
60
|
"@atlaskit/range": "^10.0.0",
|
|
61
61
|
"@atlaskit/section-message": "^8.12.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/range-field",
|
|
3
|
+
"main": "../dist/cjs/entry-points/range-field.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/range-field.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/range-field.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/range-field.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/range-field.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/required-asterisk",
|
|
3
|
+
"main": "../dist/cjs/entry-points/required-asterisk.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/required-asterisk.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/required-asterisk.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/required-asterisk.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/required-asterisk.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/types",
|
|
3
|
+
"main": "../dist/cjs/types.js",
|
|
4
|
+
"module": "../dist/esm/types.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/types.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/types.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/types.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/form/use-form-state",
|
|
3
|
+
"main": "../dist/cjs/entry-points/use-form-state.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/use-form-state.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/use-form-state.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/use-form-state.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/use-form-state.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|