@spark-web/text-input 4.0.0-rc.0 → 4.0.0-rc.10
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 +160 -0
- package/dist/declarations/src/children-to-adornments.d.ts +12 -0
- package/dist/declarations/src/index.d.ts +6 -0
- package/dist/declarations/src/input-adornment.d.ts +46 -0
- package/dist/declarations/src/input-container.d.ts +10 -0
- package/dist/declarations/src/text-input.d.ts +2984 -0
- package/dist/spark-web-text-input.cjs.d.ts +2 -2
- package/dist/spark-web-text-input.cjs.dev.js +270 -0
- package/dist/spark-web-text-input.cjs.js +6 -15
- package/dist/spark-web-text-input.cjs.prod.js +270 -0
- package/dist/spark-web-text-input.esm.js +263 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,165 @@
|
|
|
1
1
|
# @spark-web/text-input
|
|
2
2
|
|
|
3
|
+
## 4.0.0-rc.10
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- test
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @spark-web/field@4.0.0-rc.10
|
|
13
|
+
- @spark-web/theme@4.0.0-rc.10
|
|
14
|
+
- @spark-web/utils@2.0.0-rc.10
|
|
15
|
+
- @spark-web/a11y@2.0.0-rc.10
|
|
16
|
+
- @spark-web/text@2.0.0-rc.10
|
|
17
|
+
- @spark-web/box@2.0.0-rc.10
|
|
18
|
+
|
|
19
|
+
## 4.0.0-rc.9
|
|
20
|
+
|
|
21
|
+
### Major Changes
|
|
22
|
+
|
|
23
|
+
- test
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies []:
|
|
28
|
+
- @spark-web/field@4.0.0-rc.9
|
|
29
|
+
- @spark-web/theme@4.0.0-rc.9
|
|
30
|
+
- @spark-web/utils@2.0.0-rc.9
|
|
31
|
+
- @spark-web/a11y@2.0.0-rc.9
|
|
32
|
+
- @spark-web/text@2.0.0-rc.9
|
|
33
|
+
- @spark-web/box@2.0.0-rc.9
|
|
34
|
+
|
|
35
|
+
## 4.0.0-rc.8
|
|
36
|
+
|
|
37
|
+
### Major Changes
|
|
38
|
+
|
|
39
|
+
- test
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies []:
|
|
44
|
+
- @spark-web/field@4.0.0-rc.8
|
|
45
|
+
- @spark-web/theme@4.0.0-rc.8
|
|
46
|
+
- @spark-web/utils@2.0.0-rc.8
|
|
47
|
+
- @spark-web/a11y@2.0.0-rc.8
|
|
48
|
+
- @spark-web/text@2.0.0-rc.8
|
|
49
|
+
- @spark-web/box@2.0.0-rc.8
|
|
50
|
+
|
|
51
|
+
## 4.0.0-rc.7
|
|
52
|
+
|
|
53
|
+
### Major Changes
|
|
54
|
+
|
|
55
|
+
- test
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Updated dependencies []:
|
|
60
|
+
- @spark-web/field@4.0.0-rc.7
|
|
61
|
+
- @spark-web/theme@4.0.0-rc.7
|
|
62
|
+
- @spark-web/utils@2.0.0-rc.7
|
|
63
|
+
- @spark-web/a11y@2.0.0-rc.7
|
|
64
|
+
- @spark-web/text@2.0.0-rc.7
|
|
65
|
+
- @spark-web/box@2.0.0-rc.7
|
|
66
|
+
|
|
67
|
+
## 4.0.0-rc.6
|
|
68
|
+
|
|
69
|
+
### Major Changes
|
|
70
|
+
|
|
71
|
+
- test
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies []:
|
|
76
|
+
- @spark-web/field@4.0.0-rc.6
|
|
77
|
+
- @spark-web/theme@4.0.0-rc.6
|
|
78
|
+
- @spark-web/utils@2.0.0-rc.6
|
|
79
|
+
- @spark-web/a11y@2.0.0-rc.6
|
|
80
|
+
- @spark-web/text@2.0.0-rc.6
|
|
81
|
+
- @spark-web/box@2.0.0-rc.6
|
|
82
|
+
|
|
83
|
+
## 4.0.0-rc.5
|
|
84
|
+
|
|
85
|
+
### Major Changes
|
|
86
|
+
|
|
87
|
+
- test
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- Updated dependencies []:
|
|
92
|
+
- @spark-web/field@4.0.0-rc.5
|
|
93
|
+
- @spark-web/theme@4.0.0-rc.5
|
|
94
|
+
- @spark-web/utils@2.0.0-rc.5
|
|
95
|
+
- @spark-web/a11y@2.0.0-rc.5
|
|
96
|
+
- @spark-web/text@2.0.0-rc.5
|
|
97
|
+
- @spark-web/box@2.0.0-rc.5
|
|
98
|
+
|
|
99
|
+
## 4.0.0-rc.4
|
|
100
|
+
|
|
101
|
+
### Major Changes
|
|
102
|
+
|
|
103
|
+
- bug
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Updated dependencies []:
|
|
108
|
+
- @spark-web/field@4.0.0-rc.4
|
|
109
|
+
- @spark-web/theme@4.0.0-rc.4
|
|
110
|
+
- @spark-web/utils@2.0.0-rc.4
|
|
111
|
+
- @spark-web/a11y@2.0.0-rc.4
|
|
112
|
+
- @spark-web/text@2.0.0-rc.4
|
|
113
|
+
- @spark-web/box@2.0.0-rc.4
|
|
114
|
+
|
|
115
|
+
## 4.0.0-rc.3
|
|
116
|
+
|
|
117
|
+
### Major Changes
|
|
118
|
+
|
|
119
|
+
- upgrade package
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- Updated dependencies []:
|
|
124
|
+
- @spark-web/field@4.0.0-rc.3
|
|
125
|
+
- @spark-web/theme@4.0.0-rc.3
|
|
126
|
+
- @spark-web/utils@2.0.0-rc.3
|
|
127
|
+
- @spark-web/a11y@2.0.0-rc.3
|
|
128
|
+
- @spark-web/text@2.0.0-rc.3
|
|
129
|
+
- @spark-web/box@2.0.0-rc.3
|
|
130
|
+
|
|
131
|
+
## 4.0.0-rc.2
|
|
132
|
+
|
|
133
|
+
### Major Changes
|
|
134
|
+
|
|
135
|
+
- add parser
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- Updated dependencies []:
|
|
140
|
+
- @spark-web/field@4.0.0-rc.2
|
|
141
|
+
- @spark-web/theme@4.0.0-rc.2
|
|
142
|
+
- @spark-web/utils@2.0.0-rc.2
|
|
143
|
+
- @spark-web/a11y@2.0.0-rc.2
|
|
144
|
+
- @spark-web/text@2.0.0-rc.2
|
|
145
|
+
- @spark-web/box@2.0.0-rc.2
|
|
146
|
+
|
|
147
|
+
## 4.0.0-rc.1
|
|
148
|
+
|
|
149
|
+
### Major Changes
|
|
150
|
+
|
|
151
|
+
- rc
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies []:
|
|
156
|
+
- @spark-web/field@4.0.0-rc.1
|
|
157
|
+
- @spark-web/theme@4.0.0-rc.1
|
|
158
|
+
- @spark-web/utils@2.0.0-rc.1
|
|
159
|
+
- @spark-web/a11y@2.0.0-rc.1
|
|
160
|
+
- @spark-web/text@2.0.0-rc.1
|
|
161
|
+
- @spark-web/box@2.0.0-rc.1
|
|
162
|
+
|
|
3
163
|
## 4.0.0-rc.0
|
|
4
164
|
|
|
5
165
|
### Major Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { InputAdornmentProps } from "./input-adornment.js";
|
|
3
|
+
export declare type AdornmentChild = ReactElement<InputAdornmentProps> | null | undefined;
|
|
4
|
+
export declare type AdornmentsAsChildren = AdornmentChild | [AdornmentChild, AdornmentChild];
|
|
5
|
+
/**
|
|
6
|
+
* Map children for placement within the `TextInput` flex container. Ensures that
|
|
7
|
+
* placeholders are provided for unused placements.
|
|
8
|
+
*/
|
|
9
|
+
export declare const childrenToAdornments: (children?: AdornmentsAsChildren) => {
|
|
10
|
+
startAdornment: ReactElement<InputAdornmentProps> | null;
|
|
11
|
+
endAdornment: ReactElement<InputAdornmentProps> | null;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { InputAdornment } from "./input-adornment.js";
|
|
2
|
+
export { InputContainer } from "./input-container.js";
|
|
3
|
+
export { TextInput, useInputStyles } from "./text-input.js";
|
|
4
|
+
export type { AdornmentChild } from "./children-to-adornments.js";
|
|
5
|
+
export type { InputContainerProps } from "./input-container.js";
|
|
6
|
+
export type { TextInputProps, UseInputStylesProps } from "./text-input.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
declare type InputAdornmentContextType = {
|
|
3
|
+
placement: PlacementType;
|
|
4
|
+
};
|
|
5
|
+
export declare const useInputAdornmentContext: () => InputAdornmentContextType | null;
|
|
6
|
+
declare const placementToPadding: {
|
|
7
|
+
readonly start: {
|
|
8
|
+
readonly paddingLeft: "medium";
|
|
9
|
+
readonly paddingRight: "xsmall";
|
|
10
|
+
};
|
|
11
|
+
readonly end: {
|
|
12
|
+
readonly paddingLeft: "xsmall";
|
|
13
|
+
readonly paddingRight: "medium";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare type PlacementType = keyof typeof placementToPadding;
|
|
17
|
+
export declare type InputAdornmentProps = {
|
|
18
|
+
children: ReactElement;
|
|
19
|
+
/**
|
|
20
|
+
* When using another input component as an adornment, you may optionally
|
|
21
|
+
* override the parent field label.
|
|
22
|
+
*/
|
|
23
|
+
fieldLabel?: string;
|
|
24
|
+
/** Where to place the adornment. */
|
|
25
|
+
placement: PlacementType;
|
|
26
|
+
/**
|
|
27
|
+
* By default, the adornment element will be wrapped to provide alignment and
|
|
28
|
+
* spacing, use the "raw" property to opt-out of this behaviour.
|
|
29
|
+
*/
|
|
30
|
+
raw?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Places an element at the "start" or "end" of the input, only one adornment
|
|
34
|
+
* may be provided for each placement. By default, the adornment element will be
|
|
35
|
+
* wrapped to provide alignment and spacing, use the "raw" property to opt-out
|
|
36
|
+
* of this behaviour.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <TextInput>
|
|
40
|
+
* <InputAdornment placement="start">
|
|
41
|
+
* <Text tone="placeholder">$</Text>
|
|
42
|
+
* </InputAdornment>
|
|
43
|
+
* </TextInput>
|
|
44
|
+
*/
|
|
45
|
+
export declare const InputAdornment: ({ children, fieldLabel, placement, raw, }: InputAdornmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BoxProps } from '@spark-web/box';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { InputAdornmentProps } from "./input-adornment.js";
|
|
4
|
+
export declare type InputContainerProps = {
|
|
5
|
+
/** Slot to start render adornment. */
|
|
6
|
+
startAdornment?: ReactElement<InputAdornmentProps> | null;
|
|
7
|
+
/** Slot to end render adornment. */
|
|
8
|
+
endAdornment?: ReactElement<InputAdornmentProps> | null;
|
|
9
|
+
} & Omit<BoxProps, 'background' | 'position'>;
|
|
10
|
+
export declare const InputContainer: ({ children, startAdornment, endAdornment, ...boxProps }: InputContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|