@solidrt/components 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/README.md +19 -25
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -8,6 +8,10 @@ A collection of components for [SolidRT](https://github.com/wellawaretech/solidr
8
8
  bun add @solidrt/components
9
9
  ```
10
10
 
11
+ ## Theming
12
+
13
+ Appearance (colors, spacing, border, font size) is controlled via the shared theme. Call `setTheme` from `@solidrt/components` to override defaults.
14
+
11
15
  ## Components
12
16
 
13
17
  ### SafeArea
@@ -19,7 +23,7 @@ import { SafeArea } from "@solidrt/components"
19
23
 
20
24
  function App() {
21
25
  return (
22
- <window flexDirection="column">
26
+ <window>
23
27
  <SafeArea>
24
28
  <text>Content clear of system UI</text>
25
29
  </SafeArea>
@@ -38,7 +42,7 @@ function App() {
38
42
 
39
43
  ### TextInput
40
44
 
41
- Single-line text input. Tapping/clicking the field focuses it; the OS-level text input (and on-screen keyboard, where applicable) is activated automatically while focused. Printable text arrives via the platform `textInput` event (post-IME commit). V1 supports caret-at-end editing only: no selection, no mid-string cursor movement.
45
+ Single-line text input.
42
46
 
43
47
  ```jsx
44
48
  import { TextInput } from "@solidrt/components"
@@ -60,29 +64,19 @@ function NameField() {
60
64
 
61
65
  **Props**
62
66
 
63
- | Prop | Type | Default | Description |
64
- | ------------------ | -------------------------- | ------------------ | ------------------------------------------------------------ |
65
- | `value` | `string` | - | Controlled value. If omitted, the component is uncontrolled. |
66
- | `defaultValue` | `string` | `""` | Initial value for uncontrolled use |
67
- | `onInput` | `(value: string) => void` | - | Fires on every change |
68
- | `onSubmit` | `(value: string) => void` | - | Fires on Enter |
69
- | `onFocus` | `() => void` | - | Fires when the field gains focus |
70
- | `onBlur` | `() => void` | - | Fires when the field loses focus |
71
- | `placeholder` | `string` | - | Shown when value is empty and the field is not focused |
72
- | `maxLength` | `number` | - | Truncates input to this length |
73
- | `disabled` | `boolean` | `false` | Ignores pointer and key events when true |
74
- | `autoFocus` | `boolean` | `false` | Focuses on mount |
75
- | `fontSize` | `number` | `14` | Text size |
76
- | `color` | `string` | `"black"` | Text color |
77
- | `placeholderColor` | `string` | `"rgba(0,0,0,.4)"` | Placeholder color |
78
- | `background` | `string` | `"white"` | Background fill color |
79
- | `borderColor` | `string` | `"rgba(0,0,0,.2)"` | Border stroke color |
80
- | `borderWidth` | `number` | `1` | Border stroke width |
81
- | `borderRadius` | `number` | `4` | Corner radius |
82
- | `caretColor` | `string` | same as `color` | Caret color |
83
- | `padding` | `number` | `8` | Horizontal padding |
84
- | `width` | `number \| "auto" \| "N%"` | - | Field width |
85
- | `height` | `number` | `32` | Field height |
67
+ | Prop | Type | Default | Description |
68
+ | -------------- | -------------------------- | ------- | ------------------------------------------------------------ |
69
+ | `value` | `string` | - | Controlled value. If omitted, the component is uncontrolled. |
70
+ | `defaultValue` | `string` | `""` | Initial value for uncontrolled use |
71
+ | `onInput` | `(value: string) => void` | - | Fires on every change |
72
+ | `onSubmit` | `(value: string) => void` | - | Fires on Enter |
73
+ | `onFocus` | `() => void` | - | Fires when the field gains focus |
74
+ | `onBlur` | `() => void` | - | Fires when the field loses focus |
75
+ | `placeholder` | `string` | - | Shown when value is empty and the field is not focused |
76
+ | `maxLength` | `number` | - | Truncates input to this length |
77
+ | `disabled` | `boolean` | `false` | Ignores pointer and key events when true |
78
+ | `autoFocus` | `boolean` | `false` | Focuses on mount |
79
+ | `width` | `number \| "auto" \| "N%"` | - | Field width |
86
80
 
87
81
  ## License
88
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidrt/components",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "author": "Antoine van Wel",
6
6
  "type": "module",
@@ -15,6 +15,6 @@
15
15
  ],
16
16
  "peerDependencies": {
17
17
  "@solidjs/signals": "2.0.0-beta.13",
18
- "@solidrt/core": "0.0.3"
18
+ "@solidrt/core": "0.0.4"
19
19
  }
20
20
  }