@kenos-ui/react-select 0.2.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 ADDED
@@ -0,0 +1,19 @@
1
+ # @kenos-ui/react-select
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 03f6e47: Add `@kenos-ui/react-select@0.1.0` — headless single select with interop-first popup defaults (`modal={false}`, `portal={false}`), store-based item registry, forms via `Select.HiddenSelect`, and dialog-interop keyboard behavior.
8
+ - Add `@kenos-ui/react-select@0.2.0` Tier 2 — multiple selection, `items` prop for label maps, `portal` + `container` on Content, `Select.ClearTrigger`, `isItemEqualToValue`, `onOpenChangeComplete`, and `Select.Backdrop` when `modal={true}`.
9
+
10
+ ## 0.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - Initial release — headless single select with interop-first popup defaults (`modal={false}`, `portal={false}`).
15
+ - Store-based item registry with `Select.Item` mount/unmount registration.
16
+ - Keyboard navigation (↑↓, Home, End), typeahead, Enter/Space select, Escape dismiss with `stopPropagation`.
17
+ - `Select.HiddenSelect` for native form submission; `name`, `required`, `disabled`, `readOnly` on Root.
18
+ - `useFloating` positioning (`side`, `align`, `sameWidth`); `lazyMount` / `unmountOnExit` on Content.
19
+ - Re-exported from `@kenos-ui/react` as `Select` namespace.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Allyson Soares
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @kenos-ui/react-select
2
+
3
+ Headless, accessible, composable Select primitive for React.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @kenos-ui/react-select
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Select } from '@kenos-ui/react-select';
15
+
16
+ <Select.Root name="framework" onValueChange={setValue}>
17
+ <Select.Label>Framework</Select.Label>
18
+ <Select.Trigger>
19
+ <Select.Value placeholder="Choose..." />
20
+ <Select.Icon />
21
+ </Select.Trigger>
22
+ <Select.Content>
23
+ <Select.List>
24
+ <Select.Item value="react">
25
+ <Select.ItemText>React</Select.ItemText>
26
+ <Select.ItemIndicator>✓</Select.ItemIndicator>
27
+ </Select.Item>
28
+ <Select.Item value="vue">
29
+ <Select.ItemText>Vue</Select.ItemText>
30
+ <Select.ItemIndicator>✓</Select.ItemIndicator>
31
+ </Select.Item>
32
+ </Select.List>
33
+ </Select.Content>
34
+ <Select.HiddenSelect />
35
+ </Select.Root>
36
+ ```
37
+
38
+ ## API
39
+
40
+ | Part | Description |
41
+ |------|-------------|
42
+ | `Root` | Context + state provider |
43
+ | `Label` | Associated `<label>` |
44
+ | `Trigger` | Button that opens the listbox |
45
+ | `Value` | Displays the selected label or placeholder |
46
+ | `Icon` | Chevron slot |
47
+ | `Content` | Listbox container (floating, lazyMount) |
48
+ | `List` | `role="listbox"` wrapper |
49
+ | `Item` | `role="option"` — registers value/label |
50
+ | `ItemText` | Option label slot |
51
+ | `ItemIndicator` | Shown when the option is selected |
52
+ | `Group` | Groups options (`role="group"`) |
53
+ | `GroupLabel` | Label for a group |
54
+ | `HiddenSelect` | Native `<select>` for form submission |
55
+
56
+ ## Popup defaults (interop-first)
57
+
58
+ - `modal={false}` — no inert/aria-modal on document
59
+ - `portal={false}` — listbox renders inline (safe inside any Dialog)
60
+ - `lazyMount` — content is not in the DOM until first opened
61
+ - Escape `stopPropagation` — closes Select without closing a parent Dialog
62
+
63
+ See [popup-policy.md](../../docs/popup-policy.md).