@behivetech/atoms.select 0.4.2 → 0.4.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.
- package/README.md +2 -13
- package/docs.json +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A bare select control (built on Radix's `Select`) — the Radix trigger button is this component's own root element. It has no built-in label/hint/error; wrap it in `FormField` for that chrome.
|
|
4
4
|
|
|
5
|
+
Docs: https://bht-galaxy.vercel.app/behivetech/atoms/select
|
|
6
|
+
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
7
9
|
```jsx
|
|
@@ -31,16 +33,3 @@ const roleOptions = [
|
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
Pass `aria-invalid="true"` to visually mark the field as invalid (pair with `FormField`'s `error` prop for the message).
|
|
34
|
-
|
|
35
|
-
## Props
|
|
36
|
-
|
|
37
|
-
| Prop | Type | Default | Description |
|
|
38
|
-
| --------------- | ------------------------- | ------- | ------------------------------------------------- |
|
|
39
|
-
| `options` | `SelectOption[]` | — | Array of `{ label, value, disabled? }` (required) |
|
|
40
|
-
| `value` | `string` | — | Controlled selected value |
|
|
41
|
-
| `defaultValue` | `string` | — | Uncontrolled initial value |
|
|
42
|
-
| `onValueChange` | `(value: string) => void` | — | Called when the selection changes |
|
|
43
|
-
| `placeholder` | `string` | — | Placeholder shown when nothing is selected |
|
|
44
|
-
| `disabled` | `boolean` | `false` | Disables the field |
|
|
45
|
-
| `required` | `boolean` | `false` | Marks field as required |
|
|
46
|
-
| `className` | `string` | — | Additional class names |
|
package/docs.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behivetech/atoms.select",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"description": "A bare select control (built on Radix's `Select`) — the Radix trigger button is this component's own root element. It has no built-in label/hint/error; wrap it in `FormField` for that chrome.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"private": false,
|
|
7
8
|
"exports": {
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
"tsup": "^8.5.1",
|
|
39
40
|
"typescript": "^6.0.3",
|
|
40
41
|
"vitest": "^4.1.10",
|
|
41
|
-
"@behivetech/forms.form-field": "0.3.
|
|
42
|
+
"@behivetech/forms.form-field": "0.3.4",
|
|
42
43
|
"@bht-component-registry/class-names": "0.0.6",
|
|
43
44
|
"@bht-component-registry/env": "0.1.0"
|
|
44
45
|
},
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"url": "https://github.com/behivetech/bht-galaxy.git",
|
|
48
49
|
"directory": "registry/behivetech/atoms/select"
|
|
49
50
|
},
|
|
51
|
+
"homepage": "https://bht-galaxy.vercel.app/behivetech/atoms/select",
|
|
50
52
|
"publishConfig": {
|
|
51
53
|
"registry": "https://registry.npmjs.org",
|
|
52
54
|
"access": "public",
|