@spark-web/field 5.2.0 → 5.3.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
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @spark-web/field
|
|
2
2
|
|
|
3
|
+
## 5.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#667](https://github.com/brighte-labs/spark-web/pull/667)
|
|
8
|
+
[`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)
|
|
9
|
+
Thanks [@Leo704099](https://github.com/Leo704099)! - Support react 17 to 19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
[[`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)]:
|
|
15
|
+
- @spark-web/stack@5.1.0
|
|
16
|
+
- @spark-web/theme@5.13.0
|
|
17
|
+
- @spark-web/utils@5.1.0
|
|
18
|
+
- @spark-web/a11y@5.3.0
|
|
19
|
+
- @spark-web/icon@5.1.0
|
|
20
|
+
- @spark-web/text@5.3.0
|
|
21
|
+
- @spark-web/box@6.0.0
|
|
22
|
+
|
|
3
23
|
## 5.2.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type FieldState = {
|
|
1
|
+
export type FieldState = {
|
|
3
2
|
disabled: boolean;
|
|
4
3
|
invalid: boolean;
|
|
5
4
|
readOnly?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export
|
|
6
|
+
export type InputPropsDerivedFromField = {
|
|
8
7
|
'aria-describedby'?: string;
|
|
9
8
|
'aria-invalid': true | undefined;
|
|
10
9
|
id: string;
|
|
11
10
|
};
|
|
12
|
-
export
|
|
11
|
+
export type FieldContextType = [FieldState, InputPropsDerivedFromField];
|
|
13
12
|
export declare const FieldContext: import("react").Context<FieldContextType | null>;
|
|
14
13
|
export declare const FieldContextProvider: import("react").Provider<FieldContextType | null>;
|
|
15
14
|
export declare const FIELD_CONTEXT_ERROR_MESSAGE = "Input components must be inside a `Field`.";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DataAttributeMap } from '@spark-web/utils/internal';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type Tone = keyof typeof messageToneMap;
|
|
4
|
+
export type FieldProps = {
|
|
5
5
|
/** Sets a unique identifier for the component. */
|
|
6
6
|
id?: string;
|
|
7
7
|
/** Sets data attributes on the component. */
|
|
@@ -48,6 +48,6 @@ declare const messageToneMap: {
|
|
|
48
48
|
readonly neutral: "muted";
|
|
49
49
|
readonly positive: "positive";
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
type FieldMessageProps = Required<Pick<FieldProps, 'message' | 'id' | 'tone'>>;
|
|
52
52
|
export declare const FieldMessage: ({ message, id, tone }: FieldMessageProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
53
53
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
2
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLWZpZWxkLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/field",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.25.0",
|
|
19
19
|
"@emotion/react": "^11.14.0",
|
|
20
|
-
"@spark-web/a11y": "^5.
|
|
21
|
-
"@spark-web/box": "^
|
|
22
|
-
"@spark-web/icon": "^5.
|
|
23
|
-
"@spark-web/stack": "^5.0
|
|
24
|
-
"@spark-web/text": "^5.
|
|
25
|
-
"@spark-web/theme": "^5.
|
|
26
|
-
"@spark-web/utils": "^5.
|
|
20
|
+
"@spark-web/a11y": "^5.3.0",
|
|
21
|
+
"@spark-web/box": "^6.0.0",
|
|
22
|
+
"@spark-web/icon": "^5.1.0",
|
|
23
|
+
"@spark-web/stack": "^5.1.0",
|
|
24
|
+
"@spark-web/text": "^5.3.0",
|
|
25
|
+
"@spark-web/theme": "^5.13.0",
|
|
26
|
+
"@spark-web/utils": "^5.1.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/react": "^
|
|
30
|
-
"react": "^
|
|
29
|
+
"@types/react": "^19.1.0",
|
|
30
|
+
"react": "^19.1.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"react": "
|
|
33
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=14"
|