@cdx-ui/primitives 0.3.2 → 0.3.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 (188) hide show
  1. package/lib/commonjs/index.js +12 -0
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/insight/InsightRoot.js +159 -0
  4. package/lib/commonjs/insight/InsightRoot.js.map +1 -0
  5. package/lib/commonjs/insight/context.js +11 -0
  6. package/lib/commonjs/insight/context.js.map +1 -0
  7. package/lib/commonjs/insight/index.js +26 -0
  8. package/lib/commonjs/insight/index.js.map +1 -0
  9. package/lib/commonjs/insight/types.js +6 -0
  10. package/lib/commonjs/insight/types.js.map +1 -0
  11. package/lib/commonjs/list-item/ListItemRoot.js +2 -18
  12. package/lib/commonjs/list-item/ListItemRoot.js.map +1 -1
  13. package/lib/commonjs/select/SelectContent.js +89 -45
  14. package/lib/commonjs/select/SelectContent.js.map +1 -1
  15. package/lib/commonjs/select/SelectDismissButton.js +14 -0
  16. package/lib/commonjs/select/SelectDismissButton.js.map +1 -0
  17. package/lib/commonjs/select/SelectDismissButton.web.js +28 -0
  18. package/lib/commonjs/select/SelectDismissButton.web.js.map +1 -0
  19. package/lib/commonjs/select/SelectEmpty.js +53 -0
  20. package/lib/commonjs/select/SelectEmpty.js.map +1 -0
  21. package/lib/commonjs/select/SelectItem.js +30 -9
  22. package/lib/commonjs/select/SelectItem.js.map +1 -1
  23. package/lib/commonjs/select/SelectListbox.js +47 -0
  24. package/lib/commonjs/select/SelectListbox.js.map +1 -0
  25. package/lib/commonjs/select/SelectRoot.js +110 -21
  26. package/lib/commonjs/select/SelectRoot.js.map +1 -1
  27. package/lib/commonjs/select/SelectSearch.js +81 -0
  28. package/lib/commonjs/select/SelectSearch.js.map +1 -0
  29. package/lib/commonjs/select/SelectSearchStatus.js +14 -0
  30. package/lib/commonjs/select/SelectSearchStatus.js.map +1 -0
  31. package/lib/commonjs/select/SelectSearchStatus.web.js +24 -0
  32. package/lib/commonjs/select/SelectSearchStatus.web.js.map +1 -0
  33. package/lib/commonjs/select/SelectSheetContent.js +67 -0
  34. package/lib/commonjs/select/SelectSheetContent.js.map +1 -0
  35. package/lib/commonjs/select/context.js +5 -1
  36. package/lib/commonjs/select/context.js.map +1 -1
  37. package/lib/commonjs/select/filter.js +16 -0
  38. package/lib/commonjs/select/filter.js.map +1 -0
  39. package/lib/commonjs/select/index.js +34 -0
  40. package/lib/commonjs/select/index.js.map +1 -1
  41. package/lib/commonjs/select/popupRole.js +27 -0
  42. package/lib/commonjs/select/popupRole.js.map +1 -0
  43. package/lib/commonjs/select/useContentFocus.js +10 -21
  44. package/lib/commonjs/select/useContentFocus.js.map +1 -1
  45. package/lib/commonjs/select/useListboxNavigation.js +21 -8
  46. package/lib/commonjs/select/useListboxNavigation.js.map +1 -1
  47. package/lib/commonjs/select/useQueryHighlight.js +50 -0
  48. package/lib/commonjs/select/useQueryHighlight.js.map +1 -0
  49. package/lib/commonjs/select/useSelectTrigger.js +4 -1
  50. package/lib/commonjs/select/useSelectTrigger.js.map +1 -1
  51. package/lib/commonjs/select/useSelectTrigger.web.js +4 -1
  52. package/lib/commonjs/select/useSelectTrigger.web.js.map +1 -1
  53. package/lib/commonjs/utils/splitContainerProps.js +26 -0
  54. package/lib/commonjs/utils/splitContainerProps.js.map +1 -0
  55. package/lib/module/index.js +1 -0
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/insight/InsightRoot.js +154 -0
  58. package/lib/module/insight/InsightRoot.js.map +1 -0
  59. package/lib/module/insight/context.js +5 -0
  60. package/lib/module/insight/context.js.map +1 -0
  61. package/lib/module/insight/index.js +5 -0
  62. package/lib/module/insight/index.js.map +1 -0
  63. package/lib/module/insight/types.js +4 -0
  64. package/lib/module/insight/types.js.map +1 -0
  65. package/lib/module/list-item/ListItemRoot.js +1 -17
  66. package/lib/module/list-item/ListItemRoot.js.map +1 -1
  67. package/lib/module/select/SelectContent.js +94 -48
  68. package/lib/module/select/SelectContent.js.map +1 -1
  69. package/lib/module/select/SelectDismissButton.js +10 -0
  70. package/lib/module/select/SelectDismissButton.js.map +1 -0
  71. package/lib/module/select/SelectDismissButton.web.js +24 -0
  72. package/lib/module/select/SelectDismissButton.web.js.map +1 -0
  73. package/lib/module/select/SelectEmpty.js +49 -0
  74. package/lib/module/select/SelectEmpty.js.map +1 -0
  75. package/lib/module/select/SelectItem.js +32 -11
  76. package/lib/module/select/SelectItem.js.map +1 -1
  77. package/lib/module/select/SelectListbox.js +43 -0
  78. package/lib/module/select/SelectListbox.js.map +1 -0
  79. package/lib/module/select/SelectRoot.js +111 -22
  80. package/lib/module/select/SelectRoot.js.map +1 -1
  81. package/lib/module/select/SelectSearch.js +77 -0
  82. package/lib/module/select/SelectSearch.js.map +1 -0
  83. package/lib/module/select/SelectSearchStatus.js +10 -0
  84. package/lib/module/select/SelectSearchStatus.js.map +1 -0
  85. package/lib/module/select/SelectSearchStatus.web.js +20 -0
  86. package/lib/module/select/SelectSearchStatus.web.js.map +1 -0
  87. package/lib/module/select/SelectSheetContent.js +63 -0
  88. package/lib/module/select/SelectSheetContent.js.map +1 -0
  89. package/lib/module/select/context.js +2 -0
  90. package/lib/module/select/context.js.map +1 -1
  91. package/lib/module/select/filter.js +11 -0
  92. package/lib/module/select/filter.js.map +1 -0
  93. package/lib/module/select/index.js +5 -1
  94. package/lib/module/select/index.js.map +1 -1
  95. package/lib/module/select/popupRole.js +23 -0
  96. package/lib/module/select/popupRole.js.map +1 -0
  97. package/lib/module/select/useContentFocus.js +11 -22
  98. package/lib/module/select/useContentFocus.js.map +1 -1
  99. package/lib/module/select/useListboxNavigation.js +21 -8
  100. package/lib/module/select/useListboxNavigation.js.map +1 -1
  101. package/lib/module/select/useQueryHighlight.js +46 -0
  102. package/lib/module/select/useQueryHighlight.js.map +1 -0
  103. package/lib/module/select/useSelectTrigger.js +4 -1
  104. package/lib/module/select/useSelectTrigger.js.map +1 -1
  105. package/lib/module/select/useSelectTrigger.web.js +4 -1
  106. package/lib/module/select/useSelectTrigger.web.js.map +1 -1
  107. package/lib/module/utils/splitContainerProps.js +22 -0
  108. package/lib/module/utils/splitContainerProps.js.map +1 -0
  109. package/lib/typescript/index.d.ts +1 -0
  110. package/lib/typescript/index.d.ts.map +1 -1
  111. package/lib/typescript/insight/InsightRoot.d.ts +6 -0
  112. package/lib/typescript/insight/InsightRoot.d.ts.map +1 -0
  113. package/lib/typescript/insight/context.d.ts +6 -0
  114. package/lib/typescript/insight/context.d.ts.map +1 -0
  115. package/lib/typescript/insight/index.d.ts +4 -0
  116. package/lib/typescript/insight/index.d.ts.map +1 -0
  117. package/lib/typescript/insight/types.d.ts +44 -0
  118. package/lib/typescript/insight/types.d.ts.map +1 -0
  119. package/lib/typescript/list-item/ListItemRoot.d.ts.map +1 -1
  120. package/lib/typescript/select/SelectContent.d.ts.map +1 -1
  121. package/lib/typescript/select/SelectDismissButton.d.ts +10 -0
  122. package/lib/typescript/select/SelectDismissButton.d.ts.map +1 -0
  123. package/lib/typescript/select/SelectDismissButton.web.d.ts +9 -0
  124. package/lib/typescript/select/SelectDismissButton.web.d.ts.map +1 -0
  125. package/lib/typescript/select/SelectEmpty.d.ts +12 -0
  126. package/lib/typescript/select/SelectEmpty.d.ts.map +1 -0
  127. package/lib/typescript/select/SelectItem.d.ts.map +1 -1
  128. package/lib/typescript/select/SelectListbox.d.ts +12 -0
  129. package/lib/typescript/select/SelectListbox.d.ts.map +1 -0
  130. package/lib/typescript/select/SelectRoot.d.ts +2 -2
  131. package/lib/typescript/select/SelectRoot.d.ts.map +1 -1
  132. package/lib/typescript/select/SelectSearch.d.ts +18 -0
  133. package/lib/typescript/select/SelectSearch.d.ts.map +1 -0
  134. package/lib/typescript/select/SelectSearchStatus.d.ts +9 -0
  135. package/lib/typescript/select/SelectSearchStatus.d.ts.map +1 -0
  136. package/lib/typescript/select/SelectSearchStatus.web.d.ts +8 -0
  137. package/lib/typescript/select/SelectSearchStatus.web.d.ts.map +1 -0
  138. package/lib/typescript/select/SelectSheetContent.d.ts +14 -0
  139. package/lib/typescript/select/SelectSheetContent.d.ts.map +1 -0
  140. package/lib/typescript/select/context.d.ts +9 -0
  141. package/lib/typescript/select/context.d.ts.map +1 -1
  142. package/lib/typescript/select/filter.d.ts +4 -0
  143. package/lib/typescript/select/filter.d.ts.map +1 -0
  144. package/lib/typescript/select/index.d.ts +6 -2
  145. package/lib/typescript/select/index.d.ts.map +1 -1
  146. package/lib/typescript/select/popupRole.d.ts +18 -0
  147. package/lib/typescript/select/popupRole.d.ts.map +1 -0
  148. package/lib/typescript/select/types.d.ts +129 -8
  149. package/lib/typescript/select/types.d.ts.map +1 -1
  150. package/lib/typescript/select/useContentFocus.d.ts +4 -7
  151. package/lib/typescript/select/useContentFocus.d.ts.map +1 -1
  152. package/lib/typescript/select/useListboxNavigation.d.ts +16 -3
  153. package/lib/typescript/select/useListboxNavigation.d.ts.map +1 -1
  154. package/lib/typescript/select/useQueryHighlight.d.ts +21 -0
  155. package/lib/typescript/select/useQueryHighlight.d.ts.map +1 -0
  156. package/lib/typescript/select/useSelectTrigger.d.ts.map +1 -1
  157. package/lib/typescript/select/useSelectTrigger.web.d.ts.map +1 -1
  158. package/lib/typescript/utils/splitContainerProps.d.ts +9 -0
  159. package/lib/typescript/utils/splitContainerProps.d.ts.map +1 -0
  160. package/package.json +3 -3
  161. package/src/index.ts +1 -0
  162. package/src/insight/InsightRoot.tsx +162 -0
  163. package/src/insight/context.tsx +5 -0
  164. package/src/insight/index.ts +11 -0
  165. package/src/insight/types.ts +51 -0
  166. package/src/list-item/ListItemRoot.tsx +1 -14
  167. package/src/select/SelectContent.tsx +89 -54
  168. package/src/select/SelectDismissButton.tsx +14 -0
  169. package/src/select/SelectDismissButton.web.tsx +26 -0
  170. package/src/select/SelectEmpty.tsx +61 -0
  171. package/src/select/SelectItem.tsx +42 -10
  172. package/src/select/SelectListbox.tsx +43 -0
  173. package/src/select/SelectRoot.tsx +184 -12
  174. package/src/select/SelectSearch.tsx +98 -0
  175. package/src/select/SelectSearchStatus.tsx +11 -0
  176. package/src/select/SelectSearchStatus.web.tsx +18 -0
  177. package/src/select/SelectSheetContent.tsx +54 -0
  178. package/src/select/context.tsx +9 -0
  179. package/src/select/filter.ts +12 -0
  180. package/src/select/index.ts +14 -1
  181. package/src/select/popupRole.ts +26 -0
  182. package/src/select/types.ts +142 -9
  183. package/src/select/useContentFocus.ts +12 -31
  184. package/src/select/useListboxNavigation.ts +41 -9
  185. package/src/select/useQueryHighlight.ts +61 -0
  186. package/src/select/useSelectTrigger.ts +5 -1
  187. package/src/select/useSelectTrigger.web.ts +5 -1
  188. package/src/utils/splitContainerProps.ts +16 -0
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ import { TextInput } from 'react-native';
3
+ import type { ISelectSearchProps } from './types';
4
+ export interface SelectSearchProps extends ISelectSearchProps {
5
+ /** Merge the search wiring onto the single child text input instead of rendering one. */
6
+ asChild?: boolean;
7
+ className?: string;
8
+ children?: ReactNode;
9
+ }
10
+ /**
11
+ * Search input for `Select.Content`. Its query filters the options through the root `filter`.
12
+ * Mounting it turns the popup into a dialog that contains this searchbox and the listbox.
13
+ *
14
+ * Web uses virtual focus: DOM focus stays here, arrow keys move the highlight, and
15
+ * `aria-activedescendant` points at it. Native renders the input without virtual focus.
16
+ */
17
+ export declare const SelectSearch: import("react").ForwardRefExoticComponent<SelectSearchProps & import("react").RefAttributes<TextInput>>;
18
+ //# sourceMappingURL=SelectSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectSearch.d.ts","sourceRoot":"","sources":["../../../src/select/SelectSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAKD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,yGAsExB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface SelectSearchStatusProps {
2
+ message: string;
3
+ }
4
+ /**
5
+ * Web-only. On native, screen readers move through the rows directly, in the anchored popover
6
+ * or in `Select.BottomSheet`, instead of following an input-driven live region.
7
+ */
8
+ export declare function SelectSearchStatus(_props: SelectSearchStatusProps): null;
9
+ //# sourceMappingURL=SelectSearchStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectSearchStatus.d.ts","sourceRoot":"","sources":["../../../src/select/SelectSearchStatus.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,QAEjE"}
@@ -0,0 +1,8 @@
1
+ import type { SelectSearchStatusProps } from './SelectSearchStatus';
2
+ export type { SelectSearchStatusProps };
3
+ /**
4
+ * Polite live region for the search results. It stays mounted while the search is, so each
5
+ * change to the count (or to the empty-state text) is announced.
6
+ */
7
+ export declare function SelectSearchStatus({ message }: SelectSearchStatusProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=SelectSearchStatus.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectSearchStatus.web.d.ts","sourceRoot":"","sources":["../../../src/select/SelectSearchStatus.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAExC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,2CAQtE"}
@@ -0,0 +1,14 @@
1
+ import { View } from 'react-native';
2
+ import type { ISelectSheetContentProps } from './types';
3
+ export interface SelectSheetContentProps extends ISelectSheetContentProps {
4
+ asChild?: boolean;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * Body of a native sheet surface that presents the options in place of `SelectContent`. The
9
+ * styled layer owns presentation (open, swipe, backdrop, back) and renders this inside it.
10
+ * It carries the popup role and name, and closes on the VoiceOver escape gesture without
11
+ * changing the value.
12
+ */
13
+ export declare const SelectSheetContent: import("react").ForwardRefExoticComponent<SelectSheetContentProps & import("react").RefAttributes<View>>;
14
+ //# sourceMappingURL=SelectSheetContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectSheetContent.d.ts","sourceRoot":"","sources":["../../../src/select/SelectSheetContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAMpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,uBAAwB,SAAQ,wBAAwB;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0GAyB9B,CAAC"}
@@ -11,4 +11,13 @@ export declare const SelectItemProvider: import("react").FunctionComponent<{
11
11
  children: import("react").ReactNode;
12
12
  value: SelectItemInteractionState;
13
13
  }>, useSelectItemContext: () => SelectItemInteractionState;
14
+ export interface SelectContentContextValue {
15
+ /** Listbox keyboard handling, wired to the `Select.Search` input on web. */
16
+ handleKeyDown: (e: any) => void;
17
+ }
18
+ /** Internal: lets `Select.Search` drive the listbox from its input. */
19
+ export declare const SelectContentProvider: import("react").FunctionComponent<{
20
+ children: import("react").ReactNode;
21
+ value: SelectContentContextValue;
22
+ }>, useSelectContentContext: () => SelectContentContextValue;
14
23
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/select/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE9E,eAAO,MAAO,cAAc;;;IAAE,gBAAgB,0BACM,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAO,kBAAkB;;;IAAE,oBAAoB,kCACU,CAAC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/select/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE9E,eAAO,MAAO,cAAc;;;IAAE,gBAAgB,0BACM,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAO,kBAAkB;;;IAAE,oBAAoB,kCACU,CAAC;AAEjE,MAAM,WAAW,yBAAyB;IACxC,4EAA4E;IAC5E,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAED,uEAAuE;AACvE,eAAO,MAAO,qBAAqB;;;IAAE,uBAAuB,iCACM,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SelectFilter } from './types';
2
+ /** Case- and accent-insensitive `contains`: "cafe" matches "Café". */
3
+ export declare const defaultSelectFilter: SelectFilter;
4
+ //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/select/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAS5C,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,EAAE,YACoB,CAAC"}
@@ -1,7 +1,11 @@
1
- export type { ISelectContentProps, ISelectItemLabelProps, ISelectItemProps, ISelectProps, ISelectTriggerProps, ISelectValueProps, SelectContextValue, SelectItemData, SelectItemInteractionState, } from './types';
2
- export { useSelectContext, useSelectItemContext } from './context';
1
+ export type { ISelectContentProps, ISelectEmptyProps, ISelectItemLabelProps, ISelectItemProps, ISelectListboxProps, ISelectMultipleProps, ISelectProps, ISelectSearchProps, ISelectSheetContentProps, ISelectSingleProps, ISelectTriggerProps, ISelectValueProps, SelectContextValue, SelectFilter, SelectItemData, SelectItemInteractionState, SelectType, SelectValueRenderProps, } from './types';
2
+ export { SelectProvider, useSelectContext, useSelectItemContext } from './context';
3
3
  export { SelectRoot, type SelectRootProps } from './SelectRoot';
4
4
  export { SelectTrigger, type SelectTriggerProps } from './SelectTrigger';
5
5
  export { SelectContent, type SelectContentProps } from './SelectContent';
6
+ export { SelectSheetContent, type SelectSheetContentProps } from './SelectSheetContent';
7
+ export { SelectSearch, type SelectSearchProps } from './SelectSearch';
8
+ export { SelectListbox, type SelectListboxProps } from './SelectListbox';
9
+ export { SelectEmpty, type SelectEmptyProps } from './SelectEmpty';
6
10
  export { SelectItem, type SelectItemProps } from './SelectItem';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,0BAA0B,EAC1B,UAAU,EACV,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { SelectContextValue } from './types';
2
+ type PopupRoleSource = Pick<SelectContextValue, 'hasSearch' | 'labelId' | 'accessibilityLabel' | 'triggerId'>;
3
+ /**
4
+ * Role and name of the popup surface. With `Select.Search` the popup is a dialog holding a
5
+ * searchbox and a listbox (a listbox may only own options), named by the field label, then
6
+ * `accessibilityLabel`. Without it the popup is the listbox.
7
+ */
8
+ export declare function getPopupRoleProps({ hasSearch, labelId, accessibilityLabel, triggerId, }: PopupRoleSource): {
9
+ role: "dialog";
10
+ 'aria-labelledby': string | undefined;
11
+ 'aria-label': string | undefined;
12
+ } | {
13
+ role: "listbox";
14
+ 'aria-labelledby': string;
15
+ readonly 'aria-label'?: undefined;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=popupRole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popupRole.d.ts","sourceRoot":"","sources":["../../../src/select/popupRole.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,eAAe,GAAG,IAAI,CACzB,kBAAkB,EAClB,WAAW,GAAG,SAAS,GAAG,oBAAoB,GAAG,WAAW,CAC7D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,SAAS,GACV,EAAE,eAAe;;;;;;;;EAQjB"}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode, RefObject } from 'react';
2
- import type { PressableProps, ViewProps } from 'react-native';
2
+ import type { PressableProps, TextInputProps, ViewProps } from 'react-native';
3
3
  import type { EntryOrExitLayoutType } from 'react-native-reanimated';
4
4
  import type { OverlayPlacement } from '../overlay';
5
5
  import type { InteractionState } from '../types';
@@ -7,15 +7,19 @@ export interface SelectItemInteractionState extends InteractionState {
7
7
  highlighted: boolean;
8
8
  checked: boolean;
9
9
  }
10
- export interface ISelectProps {
10
+ /** Selection mode for `Select`. */
11
+ export type SelectType = 'single' | 'multiple';
12
+ /**
13
+ * Decides whether an option stays visible for the current search query. Receives the option's
14
+ * `label` from `items` and the query.
15
+ */
16
+ export type SelectFilter = (textValue: string, inputValue: string) => boolean;
17
+ interface ISelectBaseProps {
11
18
  /**
12
19
  * Options used to resolve `Select.Value` labels and drive keyboard navigation.
13
20
  * Render matching `Select.Item` elements inside `Select.Content`.
14
21
  */
15
22
  items: SelectItemData[];
16
- value?: string;
17
- defaultValue?: string;
18
- onValueChange?: (value: string) => void;
19
23
  /** Controlled open state. Use `defaultOpen` for the uncontrolled variant. */
20
24
  isOpen?: boolean;
21
25
  defaultOpen?: boolean;
@@ -27,8 +31,54 @@ export interface ISelectProps {
27
31
  /** Prevents `Select.Content` from rendering. Reserved for native picker integration. */
28
32
  native?: boolean;
29
33
  accessibilityLabel?: string;
34
+ /** Controlled search query typed into `Select.Search`. */
35
+ inputValue?: string;
36
+ /** Uncontrolled initial search query. */
37
+ defaultInputValue?: string;
38
+ /**
39
+ * Called when the search query changes, including the reset to `''` when the popup closes.
40
+ * Pair with `inputValue` to replace `items` with server results.
41
+ */
42
+ onInputChange?: (inputValue: string) => void;
43
+ /**
44
+ * Decides which options stay visible for a non-empty query. Every option is visible while the
45
+ * query is empty.
46
+ * @default case- and accent-insensitive `contains`
47
+ */
48
+ filter?: SelectFilter;
30
49
  children?: ReactNode;
31
50
  }
51
+ export interface ISelectSingleProps extends ISelectBaseProps {
52
+ /**
53
+ * Selection mode. `single` selects one option and closes the popup.
54
+ * @default 'single'
55
+ */
56
+ type?: 'single';
57
+ /** Controlled selected value. */
58
+ value?: string;
59
+ /** Uncontrolled initial value. */
60
+ defaultValue?: string;
61
+ /** Called with the newly selected value. */
62
+ onValueChange?: (value: string) => void;
63
+ }
64
+ export interface ISelectMultipleProps extends ISelectBaseProps {
65
+ /**
66
+ * Selection mode. `multiple` toggles options on press and keeps the popup open.
67
+ * Each toggle commits immediately.
68
+ */
69
+ type: 'multiple';
70
+ /** Controlled selected values. An empty array means no selection. */
71
+ value?: string[];
72
+ /** Uncontrolled initial values. */
73
+ defaultValue?: string[];
74
+ /** Called with the full array of selected values after each toggle. */
75
+ onValueChange?: (value: string[]) => void;
76
+ }
77
+ /**
78
+ * Discriminated union: `type` narrows `value` / `defaultValue` / `onValueChange` to `string`
79
+ * (single, the default) or `string[]` (multiple).
80
+ */
81
+ export type ISelectProps = ISelectSingleProps | ISelectMultipleProps;
32
82
  export interface ISelectTriggerProps extends PressableProps {
33
83
  isHovered?: boolean;
34
84
  isActive?: boolean;
@@ -38,9 +88,22 @@ export interface ISelectTriggerProps extends PressableProps {
38
88
  /** @platform web — merged with form field helper/error ids */
39
89
  'aria-describedby'?: string;
40
90
  }
91
+ /** State passed to a `Select.Value` function child. */
92
+ export interface SelectValueRenderProps {
93
+ /** `true` when nothing is selected. */
94
+ isPlaceholder: boolean;
95
+ /** Selected options, in `items` order. Values missing from `items` are omitted. */
96
+ selectedItems: SelectItemData[];
97
+ /** Labels of `selectedItems` joined with `', '`. Empty when nothing is selected. */
98
+ selectedText: string;
99
+ }
41
100
  export interface ISelectValueProps {
42
101
  placeholder?: string;
43
- children?: ReactNode;
102
+ /**
103
+ * Replaces the default display. A function child receives the selection state; return
104
+ * `null` or `undefined` to fall back to the default (placeholder or `selectedText`).
105
+ */
106
+ children?: ReactNode | ((state: SelectValueRenderProps) => ReactNode);
44
107
  }
45
108
  export interface ISelectContentProps extends ViewProps {
46
109
  /** Preferred dropdown placement relative to the trigger. Defaults to `bottom-start`. */
@@ -53,6 +116,31 @@ export interface ISelectContentProps extends ViewProps {
53
116
  enteringAnimation?: EntryOrExitLayoutType;
54
117
  /** Exit animation for the dropdown. Defaults to a 100ms fade. */
55
118
  exitingAnimation?: EntryOrExitLayoutType;
119
+ /**
120
+ * Accessible name of the visually hidden button that lets screen-reader users close the
121
+ * popup on web.
122
+ * @default 'Dismiss'
123
+ */
124
+ dismissAccessibilityLabel?: string;
125
+ children?: ReactNode;
126
+ }
127
+ export interface ISelectSheetContentProps extends ViewProps {
128
+ children?: ReactNode;
129
+ }
130
+ export interface ISelectSearchProps extends Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'children'> {
131
+ /** Accessible name of the search input. Recommended, because a placeholder is not a label. */
132
+ accessibilityLabel?: string;
133
+ /**
134
+ * Text the polite live region announces when the result count changes, such as
135
+ * `"3 results"` (the English default). When nothing matches, the `Select.Empty` text is
136
+ * announced instead.
137
+ */
138
+ getResultCountLabel?: (count: number) => string;
139
+ }
140
+ export interface ISelectListboxProps extends ViewProps {
141
+ children?: ReactNode;
142
+ }
143
+ export interface ISelectEmptyProps extends ViewProps {
56
144
  children?: ReactNode;
57
145
  }
58
146
  export interface ISelectItemProps extends PressableProps {
@@ -70,6 +158,7 @@ export interface ISelectItemLabelProps {
70
158
  export interface SelectItemData {
71
159
  value: string;
72
160
  label: string;
161
+ /** Prevents the option from being selected or highlighted by keyboard. */
73
162
  disabled?: boolean;
74
163
  }
75
164
  export interface SelectItemCollectionContextValue {
@@ -81,8 +170,22 @@ export interface SelectContextValue {
81
170
  open: boolean;
82
171
  items: SelectItemData[];
83
172
  setOpen: (open: boolean) => void;
84
- value: string | undefined;
85
- onValueChange: (value: string) => void;
173
+ type: SelectType;
174
+ /** Raw selection: `string` in single mode, `string[]` in multiple mode. */
175
+ value: string | string[] | undefined;
176
+ /** Selection normalized to an array for both modes. */
177
+ selectedValues: string[];
178
+ isSelected: (value: string) => boolean;
179
+ /** Adds or removes `value` from the selection without closing. */
180
+ toggleValue: (value: string) => void;
181
+ /** Replaces the selection with `value` and closes the popup. */
182
+ selectValueAndClose: (value: string) => void;
183
+ /** Commits an option press: `toggleValue` in multiple mode, `selectValueAndClose` in single. */
184
+ commitValue: (value: string) => void;
185
+ /** Disabled via the root, `SelectItemData.disabled`, or a mounted `Select.Item disabled`. */
186
+ isItemDisabled: (value: string) => boolean;
187
+ /** Called by `Select.Item` so item-level `disabled` reaches keyboard navigation. */
188
+ registerDisabledItem: (value: string) => () => void;
86
189
  disabled: boolean;
87
190
  required: boolean;
88
191
  invalid: boolean;
@@ -91,6 +194,23 @@ export interface SelectContextValue {
91
194
  triggerRef: RefObject<any>;
92
195
  contentId: string;
93
196
  triggerId: string;
197
+ /** Current search query. Reset to `''` when the popup closes. */
198
+ inputValue: string;
199
+ setInputValue: (inputValue: string) => void;
200
+ /** `items` that pass `filter` for the current query, in `items` order. */
201
+ visibleItems: SelectItemData[];
202
+ isItemVisible: (value: string) => boolean;
203
+ /** `true` while a `Select.Search` is mounted: the popup becomes a dialog around the listbox. */
204
+ hasSearch: boolean;
205
+ /** Called by `Select.Search` on mount. Returns the unregister function. */
206
+ registerSearch: () => () => void;
207
+ /** Plain text of `Select.Empty`, announced when nothing matches. */
208
+ emptyText: string | undefined;
209
+ setEmptyText: (text: string | undefined) => void;
210
+ /** Id of the listbox inside the dialog when `hasSearch` is `true`. */
211
+ listboxId: string;
212
+ /** `Field.Label` id when the select is inside a `Field`. */
213
+ labelId?: string;
94
214
  /** Currently highlighted value during keyboard navigation */
95
215
  activeValue: string | undefined;
96
216
  setActiveValue: (value: string | undefined) => void;
@@ -98,4 +218,5 @@ export interface SelectContextValue {
98
218
  /** From `Form.Field` via `useFormControl` on the select root (helper/error `aria-describedby`). */
99
219
  ariaDescribedBy?: string;
100
220
  }
221
+ export {};
101
222
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EA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AS,KAAK,IAAI,CAAC;IACpD,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -1,19 +1,16 @@
1
1
  import type { RefObject } from 'react';
2
- import type { SelectItemData } from './types';
3
2
  export interface UseContentFocusOptions {
4
3
  open: boolean;
5
4
  triggerRef: RefObject<any>;
6
- items: SelectItemData[];
7
- value: string | undefined;
8
5
  setActiveValue: (value: string | undefined) => void;
9
6
  }
10
7
  /**
11
8
  * Manages focus lifecycle for overlay content:
9
+ * - Clears `activeValue` when the overlay closes
12
10
  * - Restores focus to the trigger when the overlay closes (web)
13
- * - Initializes `activeValue` to the current value or first enabled item
14
11
  *
15
- * Initial focus on open is handled via a ref callback in SelectContent
16
- * to avoid timing issues with deferred portal rendering.
12
+ * Initial focus on open is handled by `FocusScope autoFocus` in SelectContent, and the
13
+ * highlight while open by `useQueryHighlight`.
17
14
  */
18
- export declare function useContentFocus({ open, triggerRef, items, value, setActiveValue, }: UseContentFocusOptions): void;
15
+ export declare function useContentFocus({ open, triggerRef, setActiveValue }: UseContentFocusOptions): void;
19
16
  //# sourceMappingURL=useContentFocus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useContentFocus.d.ts","sourceRoot":"","sources":["../../../src/select/useContentFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,KAAK,EACL,cAAc,GACf,EAAE,sBAAsB,QAwBxB"}
1
+ {"version":3,"file":"useContentFocus.d.ts","sourceRoot":"","sources":["../../../src/select/useContentFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,sBAAsB,QAc3F"}
@@ -1,12 +1,25 @@
1
- import type { SelectItemData } from './types';
1
+ import type { SelectItemData, SelectType } from './types';
2
2
  export interface UseListboxNavigationOptions {
3
+ /** Options to navigate, in display order. Pass the filtered list when a search is present. */
3
4
  items: SelectItemData[];
4
5
  activeValue: string | undefined;
5
6
  setActiveValue: (value: string | undefined) => void;
6
- onSelect: (value: string) => void;
7
+ type: SelectType;
8
+ /** Commit for `type="multiple"`: toggles the highlighted option and keeps the listbox open. */
9
+ onToggle: (value: string) => void;
10
+ /** Commit for `type="single"`: selects the highlighted option and closes the listbox. */
11
+ onSelectAndClose: (value: string) => void;
12
+ /** Excludes options from keyboard highlight and commit. */
13
+ isItemDisabled: (value: string) => boolean;
7
14
  onDismiss: () => void;
15
+ /**
16
+ * Keys arrive from the `Select.Search` input (virtual focus). Space types instead of
17
+ * committing, Home/End move the caret, and Enter is always consumed so the input neither
18
+ * blurs nor submits an enclosing form.
19
+ */
20
+ isSearch?: boolean;
8
21
  }
9
- export declare function useListboxNavigation({ items, activeValue, setActiveValue, onSelect, onDismiss, }: UseListboxNavigationOptions): {
22
+ export declare function useListboxNavigation({ items, activeValue, setActiveValue, type, onToggle, onSelectAndClose, isItemDisabled, onDismiss, isSearch, }: UseListboxNavigationOptions): {
10
23
  handleKeyDown: (e: any) => void;
11
24
  getEnabledItems: () => SelectItemData[];
12
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useListboxNavigation.d.ts","sourceRoot":"","sources":["../../../src/select/useListboxNavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,GACV,EAAE,2BAA2B;uBAUtB,GAAG;;EA0DV"}
1
+ {"version":3,"file":"useListboxNavigation.d.ts","sourceRoot":"","sources":["../../../src/select/useListboxNavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1D,MAAM,WAAW,2BAA2B;IAC1C,8FAA8F;IAC9F,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,IAAI,EAAE,UAAU,CAAC;IACjB,+FAA+F;IAC/F,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,yFAAyF;IACzF,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,2DAA2D;IAC3D,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAKD,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,WAAW,EACX,cAAc,EACd,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,QAAgB,GACjB,EAAE,2BAA2B;uBAatB,GAAG;;EAmEV"}
@@ -0,0 +1,21 @@
1
+ import type { SelectItemData } from './types';
2
+ export interface UseQueryHighlightOptions {
3
+ open: boolean;
4
+ inputValue: string;
5
+ visibleItems: SelectItemData[];
6
+ selectedValues: string[];
7
+ isItemDisabled: (value: string) => boolean;
8
+ activeValue: string | undefined;
9
+ setActiveValue: (value: string | undefined) => void;
10
+ }
11
+ /**
12
+ * Owns the highlight while open:
13
+ * - Unset (on open, or once async `items` arrive): the first enabled selected item, or the
14
+ * first enabled item.
15
+ * - Query change: the first enabled match.
16
+ * - Hidden by the filter or a swapped `items` list: the first enabled item.
17
+ *
18
+ * Otherwise the highlight stays put, so a multiple-mode toggle does not move it.
19
+ */
20
+ export declare function useQueryHighlight({ open, inputValue, visibleItems, selectedValues, isItemDisabled, activeValue, setActiveValue, }: UseQueryHighlightOptions): void;
21
+ //# sourceMappingURL=useQueryHighlight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueryHighlight.d.ts","sourceRoot":"","sources":["../../../src/select/useQueryHighlight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAA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AO,CAAC,EACnC,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CA6PxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectTrigger.web.d.ts","sourceRoot":"","sources":["../../../src/select/useSelectTrigger.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAS5B;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CA6NxB;AAED,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,GACvB,CAAC"}
1
+ {"version":3,"file":"useSelectTrigger.web.d.ts","sourceRoot":"","sources":["../../../src/select/useSelectTrigger.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAS5B;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CAiOxB;AAED,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Splits the props a split root's container keeps (`className`, data attributes) from the ones
3
+ * its press region receives.
4
+ */
5
+ export declare function splitContainerProps(props: Record<string, unknown>): {
6
+ container: Record<string, unknown>;
7
+ region: Record<string, unknown>;
8
+ };
9
+ //# sourceMappingURL=splitContainerProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitContainerProps.d.ts","sourceRoot":"","sources":["../../../src/utils/splitContainerProps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;EAWjE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/primitives",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -69,8 +69,8 @@
69
69
  "@react-stately/disclosure": "3.1.1",
70
70
  "@react-stately/radio": "3.12.0",
71
71
  "@react-stately/toggle": "3.9.4",
72
- "@cdx-ui/formatters": "0.3.2",
73
- "@cdx-ui/utils": "0.3.2"
72
+ "@cdx-ui/formatters": "0.3.4",
73
+ "@cdx-ui/utils": "0.3.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/react": "19.2.14",
package/src/index.ts CHANGED
@@ -15,6 +15,7 @@ export * from './field';
15
15
  export * from './form';
16
16
  export * from './full-window-overlay';
17
17
  export * from './input';
18
+ export * from './insight';
18
19
  export * from './otp-input';
19
20
  export * from './date-field';
20
21
  export * from './calendar';