@spark-web/text-input 1.0.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 +20 -0
- package/README.md +29 -0
- package/dist/declarations/src/TextInput.d.ts +964 -0
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/spark-web-text-input.cjs.d.ts +1 -0
- package/dist/spark-web-text-input.cjs.dev.js +90 -0
- package/dist/spark-web-text-input.cjs.js +7 -0
- package/dist/spark-web-text-input.cjs.prod.js +90 -0
- package/dist/spark-web-text-input.esm.js +81 -0
- package/package.json +24 -0
- package/src/TextInput.stories.tsx +35 -0
- package/src/TextInput.tsx +95 -0
- package/src/index.ts +5 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @spark-web/text-input
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#27](https://github.com/brighte-labs/spark-web/pull/27)
|
|
8
|
+
[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)
|
|
9
|
+
Thanks [@JedWatson](https://github.com/JedWatson)! - Initial Version
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
[[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)]:
|
|
15
|
+
- @spark-web/a11y@1.0.0
|
|
16
|
+
- @spark-web/box@1.0.0
|
|
17
|
+
- @spark-web/field@1.0.0
|
|
18
|
+
- @spark-web/text@1.0.0
|
|
19
|
+
- @spark-web/theme@1.0.0
|
|
20
|
+
- @spark-web/utils@1.0.0
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Text Input
|
|
3
|
+
storybookPath: forms-textinput--default
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Text input provides a way for inputting text. The component must be nested
|
|
7
|
+
within a [`Field`](/package/field). See [`Field`](/package/field) for more
|
|
8
|
+
details.
|
|
9
|
+
|
|
10
|
+
```jsx live
|
|
11
|
+
<Field label="Label">
|
|
12
|
+
<TextInput />
|
|
13
|
+
</Field>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Description |
|
|
19
|
+
| ------------ | ------------------------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------- |
|
|
20
|
+
| data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes for the component. |
|
|
21
|
+
| type? | 'text' \| 'password' \| 'email' \| 'search' \| 'number' \| 'tel' \| 'url' | 'text' | Sets the type attribute for the component. |
|
|
22
|
+
| onBlur? | React.FocusEventHandler<HTMLInputElement\> | | Callback function when input field component loses focuses. |
|
|
23
|
+
| onFocus? | React.FocusEventHandler<HTMLInputElement\> | | Callback function when the input field component is in focus. |
|
|
24
|
+
| onChange? | React.FormEventHandler<HTMLInputElement\> | | Callback function when value of the input field has been changed. |
|
|
25
|
+
| placeholder? | string | | Specifies a short hint that describes the expected value (type of value) of the input field. |
|
|
26
|
+
| value? | string \| number \| readonly string[] | | Specifies the value of the input field. |
|
|
27
|
+
|
|
28
|
+
[data-attribute-map]:
|
|
29
|
+
https://bitbucket.org/brighte-energy/energy/src/14a694872cc43bb454981bada65f5f12b56f77c9/spark-web/packages/utils-spark/src/buildDataAttributes.ts#spark-web/packages/utils-spark/src/buildDataAttributes.ts-1
|