@atlaskit/form 15.4.0 → 15.4.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 15.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 15.4.0
4
16
 
5
17
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- /* character-counter-field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter-field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* character-counter.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
package/dist/cjs/field.js CHANGED
@@ -1,4 +1,4 @@
1
- /* field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* fieldset.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* fieldset.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* form-footer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* form-header.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-header.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  /* eslint-disable @atlaskit/design-system/use-primitives */
3
3
  "use strict";
4
4
 
@@ -1,4 +1,4 @@
1
- /* form-section.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-section.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
package/dist/cjs/label.js CHANGED
@@ -1,4 +1,4 @@
1
- /* label.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* label.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* messages.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* messages.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* required-asterisk.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* required-asterisk.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* character-counter-field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter-field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./character-counter-field.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* character-counter.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./character-counter.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./field.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* fieldset.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* fieldset.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./fieldset.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* form-footer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./form-footer.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* form-header.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-header.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  /* eslint-disable @atlaskit/design-system/use-primitives */
3
3
  import "./form-header.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* form-section.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-section.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./form-section.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* label.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* label.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./label.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* messages.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* messages.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./messages.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* required-asterisk.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* required-asterisk.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./required-asterisk.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* character-counter-field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter-field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./character-counter-field.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* character-counter.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* character-counter.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./character-counter.compiled.css";
4
4
  import * as React from 'react';
package/dist/esm/field.js CHANGED
@@ -1,4 +1,4 @@
1
- /* field.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* field.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _typeof from "@babel/runtime/helpers/typeof";
@@ -1,4 +1,4 @@
1
- /* fieldset.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* fieldset.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./fieldset.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* form-footer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./form-footer.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* form-header.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-header.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  /* eslint-disable @atlaskit/design-system/use-primitives */
3
3
  import "./form-header.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* form-section.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* form-section.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./form-section.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
package/dist/esm/label.js CHANGED
@@ -1,4 +1,4 @@
1
- /* label.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* label.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./label.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* messages.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* messages.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./messages.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* required-asterisk.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* required-asterisk.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./required-asterisk.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
package/form.docs.tsx ADDED
@@ -0,0 +1,55 @@
1
+ import path from 'path';
2
+
3
+ import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
4
+
5
+ const documentation: ComponentStructuredContentSource[] = [
6
+ {
7
+ name: 'Form',
8
+ description: 'A component for building forms with validation and state management.',
9
+ status: 'general-availability',
10
+ import: {
11
+ name: 'Form',
12
+ package: '@atlaskit/form',
13
+ type: 'default',
14
+ packagePath: path.resolve(__dirname),
15
+ packageJson: require('./package.json'),
16
+ },
17
+ usageGuidelines: [
18
+ 'Use when users need to provide and submit information (settings, create work item)',
19
+ 'Use with textfield, select, radio, checkbox and other form controls',
20
+ 'Structure: title, description, required legend, asterisk, helper text, labels above fields, character counter where needed, sections, footer with primary/secondary actions',
21
+ 'Provide clear field labels and instructions',
22
+ 'Mark required fields with asterisk (*)',
23
+ 'Provide specific error messages',
24
+ ],
25
+ contentGuidelines: [
26
+ 'Use clear, concise labels',
27
+ 'Use labels and helper text for critical info—not placeholder alone (exception: search with icon + label)',
28
+ 'Provide specific error messages',
29
+ 'Use consistent terminology',
30
+ 'Always include a visible label (exception: search fields)',
31
+ 'Match field length to intended content length',
32
+ ],
33
+ accessibilityGuidelines: [
34
+ 'Autofocus the first field when appropriate',
35
+ 'Use visible labels for all fields (search is the exception)',
36
+ 'Never disable the submit button—use validation and instructions so users know how to proceed',
37
+ 'Support autofill tokens and persist form state on refresh where appropriate',
38
+ 'Use inline validation with clear instructions',
39
+ 'Provide clear labels for all form fields',
40
+ 'Ensure keyboard navigation between fields',
41
+ 'Mark required fields clearly',
42
+ ],
43
+ examples: [
44
+ {
45
+ name: 'Form',
46
+ description: 'Form example',
47
+ source: path.resolve(__dirname, './examples/ai/form.tsx'),
48
+ },
49
+ ],
50
+ keywords: ['form', 'validation', 'field', 'input', 'submit', 'state'],
51
+ categories: ['form'],
52
+ },
53
+ ];
54
+
55
+ export default documentation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "15.4.0",
3
+ "version": "15.4.2",
4
4
  "description": "A form allows people to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@atlaskit/css": "^0.19.0",
29
- "@atlaskit/ds-lib": "^5.3.0",
29
+ "@atlaskit/ds-lib": "^6.0.0",
30
30
  "@atlaskit/heading": "^5.3.0",
31
- "@atlaskit/icon": "^32.0.0",
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.0.0",
34
+ "@atlaskit/tokens": "^11.1.0",
35
35
  "@atlaskit/visually-hidden": "^3.0.0",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "@compiled/react": "^0.20.0",
@@ -52,19 +52,20 @@
52
52
  "@atlaskit/checkbox": "^17.3.0",
53
53
  "@atlaskit/codemod-utils": "^4.2.0",
54
54
  "@atlaskit/datetime-picker": "^17.5.0",
55
- "@atlaskit/docs": "^11.6.0",
55
+ "@atlaskit/docs": "^11.7.0",
56
56
  "@atlaskit/link": "^3.3.0",
57
- "@atlaskit/lozenge": "^13.4.0",
57
+ "@atlaskit/lozenge": "^13.5.0",
58
58
  "@atlaskit/modal-dialog": "^14.11.0",
59
59
  "@atlaskit/radio": "^8.4.0",
60
- "@atlaskit/range": "^9.3.0",
60
+ "@atlaskit/range": "^10.0.0",
61
61
  "@atlaskit/section-message": "^8.12.0",
62
- "@atlaskit/select": "^21.7.0",
62
+ "@atlaskit/select": "^21.8.0",
63
63
  "@atlaskit/textarea": "^8.2.0",
64
64
  "@atlaskit/textfield": "^8.2.0",
65
65
  "@atlaskit/toggle": "^15.2.0",
66
66
  "@atlassian/feature-flags-test-utils": "^1.0.0",
67
67
  "@atlassian/ssr-tests": "workspace:^",
68
+ "@atlassian/structured-docs-types": "workspace:^",
68
69
  "@atlassian/testing-library": "^0.4.0",
69
70
  "@testing-library/react": "^16.3.0",
70
71
  "@testing-library/user-event": "^14.4.3",