@kenos-ui/react-select 0.2.2 → 0.2.3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @kenos-ui/react-select
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9c9de3d]
8
+ - Updated dependencies [f2ea00f]
9
+ - @kenos-ui/utils@1.0.0
10
+
3
11
  ## 0.2.2
4
12
 
5
13
  ### Minor Changes
@@ -9,11 +17,13 @@
9
17
  Headless, accessible, composable Select primitive for React 19+, fully unstyled.
10
18
 
11
19
  **Compound API**
20
+
12
21
  - Parts: `Root`, `Label`, `Trigger`, `Value`, `Icon`, `Content`, `List`, `Item`, `ItemText`, `ItemIndicator`
13
22
  - `Group`, `GroupLabel`, `HiddenSelect`, `Portal`, `Positioner`, `Backdrop`, `ClearTrigger`
14
23
  - `ScrollUpButton`, `ScrollDownButton` for long lists
15
24
 
16
25
  **Selection & forms**
26
+
17
27
  - Single and multiple selection (`multiple` on Root)
18
28
  - `items` prop for value→label maps without mounting every `Item`
19
29
  - `isItemEqualToValue` for custom equality
@@ -21,6 +31,7 @@
21
31
  - `onValueChange`, `onOpenChange`, `onOpenChangeComplete`
22
32
 
23
33
  **Popup policy (interop-first)**
34
+
24
35
  - Defaults: `modal={false}`, `portal={false}` — safe inside Dialogs
25
36
  - Opt-in `modal={true}` with `Backdrop` + focus trap
26
37
  - `portal` + `container` on Content; Floating UI positioning (`side`, `align`, `sameWidth`)
@@ -28,11 +39,13 @@
28
39
  - Escape `stopPropagation` — dismisses Select without closing parent Dialog
29
40
 
30
41
  **Keyboard & a11y**
42
+
31
43
  - List navigation (↑↓, Home, End), typeahead, Enter/Space select
32
44
  - Store-based item registry; `role="combobox"` / `role="listbox"` / `role="option"`
33
45
  - Test suite: ARIA, keyboard nav, forms, portal, presence, dialog interop, axe
34
46
 
35
47
  **Packaging**
48
+
36
49
  - Add `license: MIT` to `package.json` (fixes npm registry showing "no license")
37
50
 
38
51
  ## 0.2.1
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React, { HTMLAttributes, ReactNode, RefObject, ButtonHTMLAttributes } from 'react';
3
2
 
4
3
  interface SelectItemRecord {
@@ -151,10 +150,10 @@ interface SelectContentProps {
151
150
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
152
151
  }
153
152
 
154
- declare function Root(props: SelectRootProps): react_jsx_runtime.JSX.Element;
153
+ declare function Root(props: SelectRootProps): React.JSX.Element;
155
154
 
156
155
  type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement>;
157
- declare function Label({ children, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
156
+ declare function Label({ children, ...props }: LabelProps): React.JSX.Element;
158
157
 
159
158
  type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-haspopup" | "aria-expanded" | "aria-controls"> & {
160
159
  /**
@@ -163,26 +162,26 @@ type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-ha
163
162
  */
164
163
  openOnFocus?: boolean | undefined;
165
164
  };
166
- declare function Trigger({ children, onClick, onFocus, disabled, openOnFocus: openOnFocusProp, ...props }: TriggerProps): react_jsx_runtime.JSX.Element;
165
+ declare function Trigger({ children, onClick, onFocus, disabled, openOnFocus: openOnFocusProp, ...props }: TriggerProps): React.JSX.Element;
167
166
 
168
167
  interface ValueProps extends React.HTMLAttributes<HTMLSpanElement> {
169
168
  placeholder?: string | undefined;
170
169
  }
171
- declare function Value({ placeholder, ...props }: ValueProps): react_jsx_runtime.JSX.Element;
170
+ declare function Value({ placeholder, ...props }: ValueProps): React.JSX.Element;
172
171
 
173
172
  type IconProps = React.HTMLAttributes<HTMLSpanElement>;
174
173
  /** Chevron/arrow slot — render your own icon as children. */
175
- declare function Icon({ children, ...props }: IconProps): react_jsx_runtime.JSX.Element;
174
+ declare function Icon({ children, ...props }: IconProps): React.JSX.Element;
176
175
 
177
- declare function Content({ children, forceMount, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, portal, container, sameWidth, alignItemWithTrigger, lazyMount, unmountOnExit, onOpenChangeComplete: onOpenChangeCompleteProp, style, onKeyDown, ...props }: SelectContentProps & React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element | null;
176
+ declare function Content({ children, forceMount, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, portal, container, sameWidth, alignItemWithTrigger, lazyMount, unmountOnExit, onOpenChangeComplete: onOpenChangeCompleteProp, style, onKeyDown, ...props }: SelectContentProps & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element | null;
178
177
 
179
- declare function Portal({ children, container }: SelectPortalProps): react_jsx_runtime.JSX.Element | null;
178
+ declare function Portal({ children, container }: SelectPortalProps): React.JSX.Element | null;
180
179
 
181
- declare function Positioner({ children, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, sameWidth, alignItemWithTrigger, }: SelectPositionerProps): react_jsx_runtime.JSX.Element;
180
+ declare function Positioner({ children, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, sameWidth, alignItemWithTrigger, }: SelectPositionerProps): React.JSX.Element;
182
181
 
183
- declare function Backdrop({ style, ...props }: SelectBackdropProps): react_jsx_runtime.JSX.Element | null;
182
+ declare function Backdrop({ style, ...props }: SelectBackdropProps): React.JSX.Element | null;
184
183
 
185
- declare function ClearTrigger({ onClick, ...props }: SelectClearTriggerProps): react_jsx_runtime.JSX.Element | null;
184
+ declare function ClearTrigger({ onClick, ...props }: SelectClearTriggerProps): React.JSX.Element | null;
186
185
 
187
186
  type ListProps = React.HTMLAttributes<HTMLUListElement> & {
188
187
  /**
@@ -191,21 +190,21 @@ type ListProps = React.HTMLAttributes<HTMLUListElement> & {
191
190
  */
192
191
  scrollToIndex?: number | undefined;
193
192
  };
194
- declare function List({ children, scrollToIndex, ...props }: ListProps): react_jsx_runtime.JSX.Element;
193
+ declare function List({ children, scrollToIndex, ...props }: ListProps): React.JSX.Element;
195
194
 
196
195
  interface ItemProps extends React.HTMLAttributes<HTMLLIElement> {
197
196
  value: string;
198
197
  disabled?: boolean | undefined;
199
198
  textValue?: string | undefined;
200
199
  }
201
- declare function Item({ value, disabled, textValue, children, onClick, onPointerMove, ...props }: ItemProps): react_jsx_runtime.JSX.Element;
200
+ declare function Item({ value, disabled, textValue, children, onClick, onPointerMove, ...props }: ItemProps): React.JSX.Element;
202
201
  declare namespace Item {
203
202
  var displayName: string;
204
203
  }
205
204
 
206
205
  type ItemTextProps = React.HTMLAttributes<HTMLSpanElement>;
207
206
  /** Text label for a Select.Item — also used by Select.Value to display the selected label. */
208
- declare function ItemText({ children, ...props }: ItemTextProps): react_jsx_runtime.JSX.Element;
207
+ declare function ItemText({ children, ...props }: ItemTextProps): React.JSX.Element;
209
208
 
210
209
  interface ItemIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
211
210
  /** The item value to check — reads from the nearest Item when not provided. */
@@ -215,21 +214,21 @@ interface ItemIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
215
214
  * Renders only when the parent item is selected.
216
215
  * Wrap a checkmark or any indicator icon as children.
217
216
  */
218
- declare function ItemIndicator({ value, children, style, ...props }: ItemIndicatorProps): react_jsx_runtime.JSX.Element;
217
+ declare function ItemIndicator({ value, children, style, ...props }: ItemIndicatorProps): React.JSX.Element;
219
218
 
220
219
  type GroupProps = React.HTMLAttributes<HTMLDivElement>;
221
- declare function Group({ children, ...props }: GroupProps): react_jsx_runtime.JSX.Element;
220
+ declare function Group({ children, ...props }: GroupProps): React.JSX.Element;
222
221
 
223
222
  type GroupLabelProps = React.HTMLAttributes<HTMLDivElement>;
224
- declare function GroupLabel({ children, ...props }: GroupLabelProps): react_jsx_runtime.JSX.Element;
223
+ declare function GroupLabel({ children, ...props }: GroupLabelProps): React.JSX.Element;
225
224
 
226
- declare function HiddenSelect(): react_jsx_runtime.JSX.Element | null;
225
+ declare function HiddenSelect(): React.JSX.Element | null;
227
226
 
228
227
  type ScrollUpButtonProps = Omit<SelectScrollButtonProps, "direction">;
229
- declare function ScrollUpButton(props: ScrollUpButtonProps): react_jsx_runtime.JSX.Element;
228
+ declare function ScrollUpButton(props: ScrollUpButtonProps): React.JSX.Element;
230
229
 
231
230
  type ScrollDownButtonProps = Omit<SelectScrollButtonProps, "direction">;
232
- declare function ScrollDownButton(props: ScrollDownButtonProps): react_jsx_runtime.JSX.Element;
231
+ declare function ScrollDownButton(props: ScrollDownButtonProps): React.JSX.Element;
233
232
 
234
233
  declare const index_parts_Backdrop: typeof Backdrop;
235
234
  declare const index_parts_ClearTrigger: typeof ClearTrigger;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React, { HTMLAttributes, ReactNode, RefObject, ButtonHTMLAttributes } from 'react';
3
2
 
4
3
  interface SelectItemRecord {
@@ -151,10 +150,10 @@ interface SelectContentProps {
151
150
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
152
151
  }
153
152
 
154
- declare function Root(props: SelectRootProps): react_jsx_runtime.JSX.Element;
153
+ declare function Root(props: SelectRootProps): React.JSX.Element;
155
154
 
156
155
  type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement>;
157
- declare function Label({ children, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
156
+ declare function Label({ children, ...props }: LabelProps): React.JSX.Element;
158
157
 
159
158
  type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-haspopup" | "aria-expanded" | "aria-controls"> & {
160
159
  /**
@@ -163,26 +162,26 @@ type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-ha
163
162
  */
164
163
  openOnFocus?: boolean | undefined;
165
164
  };
166
- declare function Trigger({ children, onClick, onFocus, disabled, openOnFocus: openOnFocusProp, ...props }: TriggerProps): react_jsx_runtime.JSX.Element;
165
+ declare function Trigger({ children, onClick, onFocus, disabled, openOnFocus: openOnFocusProp, ...props }: TriggerProps): React.JSX.Element;
167
166
 
168
167
  interface ValueProps extends React.HTMLAttributes<HTMLSpanElement> {
169
168
  placeholder?: string | undefined;
170
169
  }
171
- declare function Value({ placeholder, ...props }: ValueProps): react_jsx_runtime.JSX.Element;
170
+ declare function Value({ placeholder, ...props }: ValueProps): React.JSX.Element;
172
171
 
173
172
  type IconProps = React.HTMLAttributes<HTMLSpanElement>;
174
173
  /** Chevron/arrow slot — render your own icon as children. */
175
- declare function Icon({ children, ...props }: IconProps): react_jsx_runtime.JSX.Element;
174
+ declare function Icon({ children, ...props }: IconProps): React.JSX.Element;
176
175
 
177
- declare function Content({ children, forceMount, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, portal, container, sameWidth, alignItemWithTrigger, lazyMount, unmountOnExit, onOpenChangeComplete: onOpenChangeCompleteProp, style, onKeyDown, ...props }: SelectContentProps & React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element | null;
176
+ declare function Content({ children, forceMount, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, portal, container, sameWidth, alignItemWithTrigger, lazyMount, unmountOnExit, onOpenChangeComplete: onOpenChangeCompleteProp, style, onKeyDown, ...props }: SelectContentProps & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element | null;
178
177
 
179
- declare function Portal({ children, container }: SelectPortalProps): react_jsx_runtime.JSX.Element | null;
178
+ declare function Portal({ children, container }: SelectPortalProps): React.JSX.Element | null;
180
179
 
181
- declare function Positioner({ children, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, sameWidth, alignItemWithTrigger, }: SelectPositionerProps): react_jsx_runtime.JSX.Element;
180
+ declare function Positioner({ children, side, align, sideOffset, alignOffset, avoidCollisions, collisionPadding, sameWidth, alignItemWithTrigger, }: SelectPositionerProps): React.JSX.Element;
182
181
 
183
- declare function Backdrop({ style, ...props }: SelectBackdropProps): react_jsx_runtime.JSX.Element | null;
182
+ declare function Backdrop({ style, ...props }: SelectBackdropProps): React.JSX.Element | null;
184
183
 
185
- declare function ClearTrigger({ onClick, ...props }: SelectClearTriggerProps): react_jsx_runtime.JSX.Element | null;
184
+ declare function ClearTrigger({ onClick, ...props }: SelectClearTriggerProps): React.JSX.Element | null;
186
185
 
187
186
  type ListProps = React.HTMLAttributes<HTMLUListElement> & {
188
187
  /**
@@ -191,21 +190,21 @@ type ListProps = React.HTMLAttributes<HTMLUListElement> & {
191
190
  */
192
191
  scrollToIndex?: number | undefined;
193
192
  };
194
- declare function List({ children, scrollToIndex, ...props }: ListProps): react_jsx_runtime.JSX.Element;
193
+ declare function List({ children, scrollToIndex, ...props }: ListProps): React.JSX.Element;
195
194
 
196
195
  interface ItemProps extends React.HTMLAttributes<HTMLLIElement> {
197
196
  value: string;
198
197
  disabled?: boolean | undefined;
199
198
  textValue?: string | undefined;
200
199
  }
201
- declare function Item({ value, disabled, textValue, children, onClick, onPointerMove, ...props }: ItemProps): react_jsx_runtime.JSX.Element;
200
+ declare function Item({ value, disabled, textValue, children, onClick, onPointerMove, ...props }: ItemProps): React.JSX.Element;
202
201
  declare namespace Item {
203
202
  var displayName: string;
204
203
  }
205
204
 
206
205
  type ItemTextProps = React.HTMLAttributes<HTMLSpanElement>;
207
206
  /** Text label for a Select.Item — also used by Select.Value to display the selected label. */
208
- declare function ItemText({ children, ...props }: ItemTextProps): react_jsx_runtime.JSX.Element;
207
+ declare function ItemText({ children, ...props }: ItemTextProps): React.JSX.Element;
209
208
 
210
209
  interface ItemIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
211
210
  /** The item value to check — reads from the nearest Item when not provided. */
@@ -215,21 +214,21 @@ interface ItemIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
215
214
  * Renders only when the parent item is selected.
216
215
  * Wrap a checkmark or any indicator icon as children.
217
216
  */
218
- declare function ItemIndicator({ value, children, style, ...props }: ItemIndicatorProps): react_jsx_runtime.JSX.Element;
217
+ declare function ItemIndicator({ value, children, style, ...props }: ItemIndicatorProps): React.JSX.Element;
219
218
 
220
219
  type GroupProps = React.HTMLAttributes<HTMLDivElement>;
221
- declare function Group({ children, ...props }: GroupProps): react_jsx_runtime.JSX.Element;
220
+ declare function Group({ children, ...props }: GroupProps): React.JSX.Element;
222
221
 
223
222
  type GroupLabelProps = React.HTMLAttributes<HTMLDivElement>;
224
- declare function GroupLabel({ children, ...props }: GroupLabelProps): react_jsx_runtime.JSX.Element;
223
+ declare function GroupLabel({ children, ...props }: GroupLabelProps): React.JSX.Element;
225
224
 
226
- declare function HiddenSelect(): react_jsx_runtime.JSX.Element | null;
225
+ declare function HiddenSelect(): React.JSX.Element | null;
227
226
 
228
227
  type ScrollUpButtonProps = Omit<SelectScrollButtonProps, "direction">;
229
- declare function ScrollUpButton(props: ScrollUpButtonProps): react_jsx_runtime.JSX.Element;
228
+ declare function ScrollUpButton(props: ScrollUpButtonProps): React.JSX.Element;
230
229
 
231
230
  type ScrollDownButtonProps = Omit<SelectScrollButtonProps, "direction">;
232
- declare function ScrollDownButton(props: ScrollDownButtonProps): react_jsx_runtime.JSX.Element;
231
+ declare function ScrollDownButton(props: ScrollDownButtonProps): React.JSX.Element;
233
232
 
234
233
  declare const index_parts_Backdrop: typeof Backdrop;
235
234
  declare const index_parts_ClearTrigger: typeof ClearTrigger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenos-ui/react-select",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Headless Select primitive for React — Kenos UI",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@kenos-ui/utils": "0.0.2"
32
+ "@kenos-ui/utils": "1.0.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@testing-library/jest-dom": "^6.4.0",