@atlaskit/form 8.10.0 → 8.11.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,21 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 8.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 8.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 8.10.0
4
20
 
5
21
  ### Minor Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/checkbox-field.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/checkbox-field.d.ts"
11
+ "../dist/types-ts4.5/entry-points/checkbox-field.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/field.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/field.d.ts"
11
+ "../dist/types-ts4.5/entry-points/field.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/fieldset.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/fieldset.d.ts"
11
+ "../dist/types-ts4.5/entry-points/fieldset.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/Form/package.json CHANGED
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/form.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/form.d.ts"
11
+ "../dist/types-ts4.5/entry-points/form.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/form-footer.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/form-footer.d.ts"
11
+ "../dist/types-ts4.5/entry-points/form-footer.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/form-header.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/form-header.d.ts"
11
+ "../dist/types-ts4.5/entry-points/form-header.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/form-section.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/form-section.d.ts"
11
+ "../dist/types-ts4.5/entry-points/form-section.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/label.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/label.d.ts"
11
+ "../dist/types-ts4.5/entry-points/label.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/messages.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/messages.d.ts"
11
+ "../dist/types-ts4.5/entry-points/messages.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/range-field.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/range-field.d.ts"
11
+ "../dist/types-ts4.5/entry-points/range-field.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/dist/cjs/field.js CHANGED
@@ -175,7 +175,6 @@ function Field(props) {
175
175
  if (isEvent(eventOrValue)) {
176
176
  var currentTarget = eventOrValue.currentTarget;
177
177
  if (currentTarget.type === 'checkbox') {
178
- //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
179
178
  if (currentTarget.checked) {
180
179
  return currentTarget.value || true;
181
180
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.10.0",
3
+ "version": "8.11.1",
4
4
  "sideEffects": false
5
5
  }
@@ -161,7 +161,6 @@ export default function Field(props) {
161
161
  currentTarget
162
162
  } = eventOrValue;
163
163
  if (currentTarget.type === 'checkbox') {
164
- //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
165
164
  if (currentTarget.checked) {
166
165
  return currentTarget.value || true;
167
166
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.10.0",
3
+ "version": "8.11.1",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/field.js CHANGED
@@ -167,7 +167,6 @@ export default function Field(props) {
167
167
  if (isEvent(eventOrValue)) {
168
168
  var currentTarget = eventOrValue.currentTarget;
169
169
  if (currentTarget.type === 'checkbox') {
170
- //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
171
170
  if (currentTarget.checked) {
172
171
  return currentTarget.value || true;
173
172
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.10.0",
3
+ "version": "8.11.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { FormEvent, ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- declare type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
4
+ type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
5
5
  export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
6
6
  id: string;
7
7
  isRequired: boolean;
@@ -1,9 +1,9 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { FieldConfig, FieldSubscriber, FieldSubscription, FormState, Unsubscribe } from 'final-form';
3
3
  import { OnSubmitHandler } from './types';
4
- declare type DefaultValue<FieldValue> = (value?: FieldValue) => FieldValue;
5
- declare type RegisterField = <FieldValue>(name: string, defaultValue: FieldValue | DefaultValue<FieldValue>, subscriber: FieldSubscriber<FieldValue>, subscription: FieldSubscription, config: FieldConfig<FieldValue>) => Unsubscribe;
6
- declare type GetCurrentValue = <FormValues>(name: string) => FormValues[keyof FormValues] | undefined;
4
+ type DefaultValue<FieldValue> = (value?: FieldValue) => FieldValue;
5
+ type RegisterField = <FieldValue>(name: string, defaultValue: FieldValue | DefaultValue<FieldValue>, subscriber: FieldSubscriber<FieldValue>, subscription: FieldSubscription, config: FieldConfig<FieldValue>) => Unsubscribe;
6
+ type GetCurrentValue = <FormValues>(name: string) => FormValues[keyof FormValues] | undefined;
7
7
  /**
8
8
  * __Form context__
9
9
  *
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { ReactNode } from 'react';
3
- declare type MessageAppearance = 'default' | 'error' | 'valid';
3
+ type MessageAppearance = 'default' | 'error' | 'valid';
4
4
  /**
5
5
  * API for the internal `<Message />` component. This is not public API.
6
6
  */
@@ -24,7 +24,7 @@ interface InternalMessageProps {
24
24
  /**
25
25
  * Public API of the various message components.
26
26
  */
27
- declare type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
27
+ type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
28
28
  /**
29
29
  * __Helper message__
30
30
  *
@@ -1,6 +1,6 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
2
  import { FieldProps, Meta } from './field';
3
- declare type RangeProps = Omit<FieldProps<number>, 'isInvalid' | 'isRequired'>;
3
+ type RangeProps = Omit<FieldProps<number>, 'isInvalid' | 'isRequired'>;
4
4
  export interface RangeFieldProps {
5
5
  children: (args: {
6
6
  fieldProps: RangeProps;
@@ -1,4 +1,4 @@
1
1
  import { FormApi as FinalFormAPI } from 'final-form';
2
- export declare type Align = 'start' | 'end';
3
- export declare type FormApi<FormData> = FinalFormAPI<FormData>;
4
- export declare type OnSubmitHandler<FormData> = (values: FormData, form: FormApi<FormData>, callback?: (errors?: Record<string, string>) => void) => void | Object | Promise<Object | void>;
2
+ export type Align = 'start' | 'end';
3
+ export type FormApi<FormData> = FinalFormAPI<FormData>;
4
+ export type OnSubmitHandler<FormData> = (values: FormData, form: FormApi<FormData>, callback?: (errors?: Record<string, string>) => void) => void | Object | Promise<Object | void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.10.0",
3
+ "version": "8.11.1",
4
4
  "description": "A form allows users to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.tsx",
17
25
  "atlaskit:designLink": "https://atlassian.design/guidelines/product/patterns/forms",
@@ -38,9 +46,9 @@
38
46
  },
39
47
  "homepage": "https://atlassian.design/components/form/",
40
48
  "dependencies": {
41
- "@atlaskit/icon": "^21.11.0",
42
- "@atlaskit/theme": "^12.4.0",
43
- "@atlaskit/tokens": "^1.2.0",
49
+ "@atlaskit/icon": "^21.12.0",
50
+ "@atlaskit/theme": "^12.5.0",
51
+ "@atlaskit/tokens": "^1.4.0",
44
52
  "@babel/runtime": "^7.0.0",
45
53
  "@emotion/react": "^11.7.1",
46
54
  "final-form": "^4.20.1",
@@ -53,24 +61,24 @@
53
61
  "react": "^16.8.0"
54
62
  },
55
63
  "devDependencies": {
56
- "@atlaskit/button": "^16.6.0",
57
- "@atlaskit/calendar": "^13.0.0",
58
- "@atlaskit/checkbox": "^12.4.0",
59
- "@atlaskit/datetime-picker": "^12.3.0",
60
- "@atlaskit/docs": "^9.0.0",
61
- "@atlaskit/dropdown-menu": "^11.7.0",
62
- "@atlaskit/ds-lib": "^2.1.1",
63
- "@atlaskit/lozenge": "^11.2.4",
64
- "@atlaskit/modal-dialog": "^12.4.0",
65
- "@atlaskit/radio": "^5.4.0",
66
- "@atlaskit/range": "^7.0.0",
67
- "@atlaskit/section-message": "^6.3.0",
68
- "@atlaskit/select": "^16.1.0",
64
+ "@atlaskit/button": "^16.7.0",
65
+ "@atlaskit/calendar": "^13.1.0",
66
+ "@atlaskit/checkbox": "^12.6.0",
67
+ "@atlaskit/datetime-picker": "^12.5.0",
68
+ "@atlaskit/docs": "^9.1.0",
69
+ "@atlaskit/dropdown-menu": "^11.8.0",
70
+ "@atlaskit/ds-lib": "^2.2.0",
71
+ "@atlaskit/lozenge": "^11.4.0",
72
+ "@atlaskit/modal-dialog": "^12.5.0",
73
+ "@atlaskit/radio": "^5.5.0",
74
+ "@atlaskit/range": "^7.1.0",
75
+ "@atlaskit/section-message": "^6.4.0",
76
+ "@atlaskit/select": "^16.2.0",
69
77
  "@atlaskit/ssr": "*",
70
- "@atlaskit/textarea": "^4.5.0",
71
- "@atlaskit/textfield": "^5.3.0",
72
- "@atlaskit/toggle": "^12.5.0",
73
- "@atlaskit/tooltip": "^17.7.0",
78
+ "@atlaskit/textarea": "^4.6.0",
79
+ "@atlaskit/textfield": "^5.4.0",
80
+ "@atlaskit/toggle": "^12.6.0",
81
+ "@atlaskit/tooltip": "^17.8.0",
74
82
  "@atlaskit/visual-regression": "*",
75
83
  "@atlaskit/webdriver-runner": "*",
76
84
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -81,7 +89,7 @@
81
89
  "react-router": "^4.2.0",
82
90
  "react-router-dom": "^4.2.2",
83
91
  "react-test-renderer": "^16.8.0",
84
- "typescript": "4.5.5",
92
+ "typescript": "~4.9.5",
85
93
  "validator": "^9.4.1",
86
94
  "wait-for-expect": "^1.2.0"
87
95
  },