@xaui/native 0.9.1-beta.98 → 0.9.1-beta.99

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 (41) hide show
  1. package/dist/{chunk-XCEDD7PE.cjs → chunk-GEWYOB25.cjs} +34 -25
  2. package/dist/{chunk-EXONAJUX.js → chunk-IYUT2IKZ.js} +26 -17
  3. package/dist/{chunk-WH7MFY3H.cjs → chunk-JMHB7K53.cjs} +140 -29
  4. package/dist/{chunk-VQG7K5QE.js → chunk-XJEG4Q2R.js} +175 -61
  5. package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
  6. package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
  7. package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
  8. package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
  9. package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
  10. package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
  11. package/dist/components/autocomplete/autocomplete.d.cts +50 -7
  12. package/dist/components/autocomplete/autocomplete.d.ts +50 -7
  13. package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
  14. package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
  15. package/dist/components/autocomplete/index.cjs +9 -2
  16. package/dist/components/autocomplete/index.d.cts +50 -3
  17. package/dist/components/autocomplete/index.d.ts +50 -3
  18. package/dist/components/autocomplete/index.js +8 -1
  19. package/dist/components/color-picker/index.cjs +1 -1
  20. package/dist/components/color-picker/index.js +1 -1
  21. package/dist/components/combobox/combobox.type.d.cts +5 -1
  22. package/dist/components/combobox/combobox.type.d.ts +5 -1
  23. package/dist/components/combobox/index.cjs +4 -3
  24. package/dist/components/combobox/index.d.cts +15 -1
  25. package/dist/components/combobox/index.d.ts +15 -1
  26. package/dist/components/combobox/index.js +3 -2
  27. package/dist/components/date-picker/index.cjs +3 -3
  28. package/dist/components/date-picker/index.js +2 -2
  29. package/dist/components/mask-field/index.cjs +1 -1
  30. package/dist/components/mask-field/index.js +1 -1
  31. package/dist/components/phone-number-field/index.cjs +1 -1
  32. package/dist/components/phone-number-field/index.js +1 -1
  33. package/dist/components/search-field/index.cjs +3 -3
  34. package/dist/components/search-field/index.js +2 -2
  35. package/dist/index.cjs +9 -9
  36. package/dist/index.js +8 -8
  37. package/package.json +1 -1
  38. package/dist/{chunk-L6EWRWTE.js → chunk-ESP2X6PN.js} +3 -3
  39. package/dist/{chunk-3CI4JGY4.cjs → chunk-FLKTJ46K.cjs} +2 -2
  40. package/dist/{chunk-ES7RME6G.js → chunk-M352N6PQ.js} +3 -3
  41. package/dist/{chunk-7CGF3Z5S.cjs → chunk-VQIQ3ERR.cjs} +3 -3
@@ -1,5 +1,6 @@
1
1
  import { collectItemLabels, readItemLabel, useLabelRegistry } from "./chunk-4WCBZFAK.js";
2
2
  import { useAnchoredPosition } from "./chunk-Z6FRP4EV.js";
3
+ import { textFieldRecipe } from "./chunk-NTVPLDJC.js";
3
4
  import { selectRecipe } from "./chunk-AMFGATFY.js";
4
5
  import { Portal } from "./chunk-2PMXMKS5.js";
5
6
  import { INDICATOR_ROTATION, INDICATOR_SPRING, anchoredEntering, anchoredExiting, overlayEntering, overlayExiting } from "./chunk-64MXEVT3.js";
@@ -10,13 +11,13 @@ import { usePressState } from "./chunk-423RQBOX.js";
10
11
  import { ChevronDownIcon, Icon, IconContext } from "./chunk-JN6IRT2M.js";
11
12
  import { childrenToString } from "./chunk-WFZDAXDI.js";
12
13
  import { createRecipe } from "./chunk-DKVXTMIJ.js";
13
- import { createSlotContext } from "./chunk-TTZOIXKE.js";
14
+ import { Slot, createSlotContext } from "./chunk-TTZOIXKE.js";
14
15
  import { useXAUITheme } from "./chunk-Z6JBWRPL.js";
15
16
  import { useStyleProps } from "./chunk-M63GFNKV.js";
16
17
 
17
18
  // src/components/autocomplete/autocomplete.tsx
18
- import { useCallback, useMemo, useState } from "react";
19
- import { StyleSheet } from "react-native";
19
+ import { forwardRef, useCallback, useId, useMemo, useState } from "react";
20
+ import { StyleSheet, View } from "react-native";
20
21
 
21
22
  // src/components/autocomplete/autocomplete.context.ts
22
23
  var [AutocompleteProvider, useAutocomplete] = createSlotContext("Autocomplete");
@@ -101,7 +102,7 @@ var autocompleteRecipe = createRecipe({
101
102
 
102
103
  // src/components/autocomplete/autocomplete.tsx
103
104
  import { jsx } from "react/jsx-runtime";
104
- function Autocomplete({
105
+ var Autocomplete = forwardRef(function Autocomplete2({
105
106
  children,
106
107
  variant,
107
108
  size,
@@ -117,14 +118,21 @@ function Autocomplete({
117
118
  defaultQuery = "",
118
119
  onQueryChange,
119
120
  isDisabled = false,
120
- isInvalid = false
121
- }) {
121
+ isInvalid = false,
122
+ asChild = false,
123
+ style,
124
+ ...props
125
+ }, ref) {
122
126
  const theme = useXAUITheme();
127
+ const [styleProps, rest] = useStyleProps(props);
123
128
  const {
124
129
  labelFor,
125
130
  registerLabel
126
131
  } = useLabelRegistry();
127
132
  const [anchor, setAnchor] = useState(null);
133
+ const id = useId();
134
+ const labelId = `${id}-label`;
135
+ const descriptionId = `${id}-description`;
128
136
  const [value, setValue] = useControllableState({
129
137
  value: controlledValue,
130
138
  defaultValue,
@@ -149,10 +157,7 @@ function Autocomplete({
149
157
  };
150
158
  const styles = selectRecipe.resolve({
151
159
  theme,
152
- selection,
153
- states: {
154
- disabled: isDisabled
155
- }
160
+ selection
156
161
  });
157
162
  const pressed = selectRecipe.resolve({
158
163
  theme,
@@ -166,6 +171,16 @@ function Autocomplete({
166
171
  color,
167
172
  selection
168
173
  }) : void 0;
174
+ const labelled = textFieldRecipe.resolve({
175
+ theme,
176
+ selection: {
177
+ size,
178
+ isInvalid: isInvalid ? "true" : void 0
179
+ },
180
+ states: {
181
+ disabled: isDisabled
182
+ }
183
+ });
169
184
  const own = autocompleteRecipe.resolve({
170
185
  theme,
171
186
  selection: {
@@ -208,6 +223,9 @@ function Autocomplete({
208
223
  itemStyle: styles.item,
209
224
  itemPressedStyle: pressed.item,
210
225
  itemLabelStyle: styles.itemLabel,
226
+ labelStyle: labelled.label,
227
+ descriptionStyle: labelled.description,
228
+ errorStyle: labelled.error,
211
229
  glyph: {
212
230
  size: indicator.fontSize,
213
231
  color: typeof indicator.color === "string" ? indicator.color : void 0
@@ -226,18 +244,35 @@ function Autocomplete({
226
244
  anchor,
227
245
  setAnchor,
228
246
  labelFor,
229
- registerLabel
247
+ registerLabel,
248
+ labelId,
249
+ descriptionId
230
250
  };
231
- }, [styles, pressed, tint, own, ownTint, value, query, setQueryState, isOpen, isDisabled, isInvalid, open, close, toggle, select, anchor, labelFor, registerLabel]);
251
+ }, [styles, pressed, tint, own, ownTint, labelled, labelId, descriptionId, value, query, setQueryState, isOpen, isDisabled, isInvalid, open, close, toggle, select, anchor, labelFor, registerLabel]);
252
+ const columnStyle = [labelled.root, styleProps, style];
253
+ const column = asChild ?
254
+ // R12 — the caller's element is the column.
255
+ /* @__PURE__ */
256
+ jsx(Slot, {
257
+ ref,
258
+ ...rest,
259
+ style: columnStyle,
260
+ children
261
+ }) : /* @__PURE__ */jsx(View, {
262
+ ref,
263
+ ...rest,
264
+ style: columnStyle,
265
+ children
266
+ });
232
267
  return /* @__PURE__ */jsx(AutocompleteProvider, {
233
268
  value: context,
234
- children
269
+ children: column
235
270
  });
236
- }
271
+ });
237
272
  Autocomplete.displayName = "XAUI.Autocomplete.Root";
238
273
 
239
274
  // src/components/autocomplete/autocomplete-content.tsx
240
- import { Children as Children2, forwardRef as forwardRef5, isValidElement as isValidElement2, useEffect, useMemo as useMemo3 } from "react";
275
+ import { Children as Children2, forwardRef as forwardRef6, isValidElement as isValidElement2, useEffect, useMemo as useMemo3 } from "react";
241
276
  import { ScrollView } from "react-native";
242
277
  import Animated from "react-native-reanimated";
243
278
 
@@ -270,10 +305,10 @@ function filterItems(children, query, isItem2) {
270
305
  }
271
306
 
272
307
  // src/components/autocomplete/autocomplete-empty.tsx
273
- import { forwardRef } from "react";
308
+ import { forwardRef as forwardRef2 } from "react";
274
309
  import { Text } from "react-native";
275
310
  import { jsx as jsx2 } from "react/jsx-runtime";
276
- var AutocompleteEmpty = forwardRef(function AutocompleteEmpty2({
311
+ var AutocompleteEmpty = forwardRef2(function AutocompleteEmpty2({
277
312
  children,
278
313
  style,
279
314
  ...props
@@ -292,13 +327,13 @@ var AutocompleteEmpty = forwardRef(function AutocompleteEmpty2({
292
327
  AutocompleteEmpty.displayName = "XAUI.Autocomplete.Empty";
293
328
 
294
329
  // src/components/autocomplete/autocomplete-item.tsx
295
- import { forwardRef as forwardRef3, useCallback as useCallback2, useMemo as useMemo2 } from "react";
330
+ import { forwardRef as forwardRef4, useCallback as useCallback2, useMemo as useMemo2 } from "react";
296
331
 
297
332
  // src/components/autocomplete/autocomplete-item-label.tsx
298
- import { forwardRef as forwardRef2 } from "react";
333
+ import { forwardRef as forwardRef3 } from "react";
299
334
  import { Text as Text2 } from "react-native";
300
335
  import { jsx as jsx3 } from "react/jsx-runtime";
301
- var AutocompleteItemLabel = forwardRef2(function AutocompleteItemLabel2({
336
+ var AutocompleteItemLabel = forwardRef3(function AutocompleteItemLabel2({
302
337
  children,
303
338
  style,
304
339
  ...props
@@ -318,7 +353,7 @@ AutocompleteItemLabel.displayName = "XAUI.Autocomplete.ItemLabel";
318
353
 
319
354
  // src/components/autocomplete/autocomplete-item.tsx
320
355
  import { jsx as jsx4 } from "react/jsx-runtime";
321
- var AutocompleteItem = forwardRef3(function AutocompleteItem2({
356
+ var AutocompleteItem = forwardRef4(function AutocompleteItem2({
322
357
  value,
323
358
  label,
324
359
  children,
@@ -385,10 +420,10 @@ var AutocompleteItem = forwardRef3(function AutocompleteItem2({
385
420
  AutocompleteItem.displayName = "XAUI.Autocomplete.Item";
386
421
 
387
422
  // src/components/autocomplete/autocomplete-search.tsx
388
- import { forwardRef as forwardRef4 } from "react";
423
+ import { forwardRef as forwardRef5 } from "react";
389
424
  import { TextInput } from "react-native";
390
425
  import { jsx as jsx5 } from "react/jsx-runtime";
391
- var AutocompleteSearch = forwardRef4(function AutocompleteSearch2({
426
+ var AutocompleteSearch = forwardRef5(function AutocompleteSearch2({
392
427
  autoFocus = true,
393
428
  style,
394
429
  ...props
@@ -429,7 +464,7 @@ var DEFAULT_INSETS = {
429
464
  var isItem = type => type === AutocompleteItem;
430
465
  var isSearch = type => type === AutocompleteSearch;
431
466
  var isEmpty = type => type === AutocompleteEmpty;
432
- var AutocompleteContent = forwardRef5(function AutocompleteContent2({
467
+ var AutocompleteContent = forwardRef6(function AutocompleteContent2({
433
468
  children,
434
469
  placement = "bottom",
435
470
  align = "center",
@@ -533,14 +568,61 @@ function partition(children) {
533
568
  };
534
569
  }
535
570
 
571
+ // src/components/autocomplete/autocomplete-description.tsx
572
+ import { forwardRef as forwardRef7 } from "react";
573
+ import { Text as Text3 } from "react-native";
574
+ import { jsx as jsx7 } from "react/jsx-runtime";
575
+ var AutocompleteDescription = forwardRef7(function AutocompleteDescription2({
576
+ children,
577
+ style,
578
+ nativeID,
579
+ ...props
580
+ }, ref) {
581
+ const {
582
+ descriptionStyle,
583
+ descriptionId
584
+ } = useAutocomplete();
585
+ const [styleProps, rest] = useStyleProps(props);
586
+ return /* @__PURE__ */jsx7(Text3, {
587
+ ref,
588
+ nativeID: nativeID ?? descriptionId,
589
+ style: [descriptionStyle, styleProps, style],
590
+ ...rest,
591
+ children
592
+ });
593
+ });
594
+ AutocompleteDescription.displayName = "XAUI.Autocomplete.Description";
595
+
596
+ // src/components/autocomplete/autocomplete-error.tsx
597
+ import { forwardRef as forwardRef8 } from "react";
598
+ import { Text as Text4 } from "react-native";
599
+ import { jsx as jsx8 } from "react/jsx-runtime";
600
+ var AutocompleteError = forwardRef8(function AutocompleteError2({
601
+ children,
602
+ style,
603
+ ...props
604
+ }, ref) {
605
+ const {
606
+ errorStyle
607
+ } = useAutocomplete();
608
+ const [styleProps, rest] = useStyleProps(props);
609
+ return /* @__PURE__ */jsx8(Text4, {
610
+ ref,
611
+ style: [errorStyle, styleProps, style],
612
+ ...rest,
613
+ children
614
+ });
615
+ });
616
+ AutocompleteError.displayName = "XAUI.Autocomplete.Error";
617
+
536
618
  // src/components/autocomplete/autocomplete-indicator.tsx
537
619
  import { useEffect as useEffect2 } from "react";
538
620
  import Animated2, { interpolate, useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
539
- import { jsx as jsx7 } from "react/jsx-runtime";
540
- const _worklet_2784553697165_init_data = {
541
- code: "function chunkVQG7K5QEJs1(){const{interpolate,progress,INDICATOR_ROTATION}=this.__closure;return{transform:[{rotate:interpolate(progress.get(),[0,1],[INDICATOR_ROTATION[0],INDICATOR_ROTATION[1]])+\"deg\"}]};}",
542
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-VQG7K5QE.js",
543
- sourceMap: "{\"version\":3,\"names\":[\"chunkVQG7K5QEJs1\",\"interpolate\",\"progress\",\"INDICATOR_ROTATION\",\"__closure\",\"transform\",\"rotate\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-VQG7K5QE.js\"],\"mappings\":\"AA4hBoC,SAAAA,gBAAMA,CAAA,QAAAC,WAAA,CAAAC,QAAA,CAAAC,kBAAA,OAAAC,SAAA,CAEtC,MAAO,CACLC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,WAAW,CAACC,QAAQ,CAACK,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACJ,kBAAkB,CAAC,CAAC,CAAC,CAAEA,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MAChG,CAAC,CAEL,CAAC,CACH\",\"ignoreList\":[]}"
621
+ import { jsx as jsx9 } from "react/jsx-runtime";
622
+ const _worklet_6900067877253_init_data = {
623
+ code: "function chunkXJEG4Q2RJs1(){const{interpolate,progress,INDICATOR_ROTATION}=this.__closure;return{transform:[{rotate:interpolate(progress.get(),[0,1],[INDICATOR_ROTATION[0],INDICATOR_ROTATION[1]])+\"deg\"}]};}",
624
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-XJEG4Q2R.js",
625
+ sourceMap: "{\"version\":3,\"names\":[\"chunkXJEG4Q2RJs1\",\"interpolate\",\"progress\",\"INDICATOR_ROTATION\",\"__closure\",\"transform\",\"rotate\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-XJEG4Q2R.js\"],\"mappings\":\"AAwlBoC,SAAAA,gBAAMA,CAAA,QAAAC,WAAA,CAAAC,QAAA,CAAAC,kBAAA,OAAAC,SAAA,CAEtC,MAAO,CACLC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,WAAW,CAACC,QAAQ,CAACK,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACJ,kBAAkB,CAAC,CAAC,CAAC,CAAEA,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MAChG,CAAC,CAEL,CAAC,CACH\",\"ignoreList\":[]}"
544
626
  };
545
627
  function AutocompleteIndicator(props) {
546
628
  const {
@@ -554,52 +636,77 @@ function AutocompleteIndicator(props) {
554
636
  useEffect2(() => {
555
637
  progress.set(withSpring(isOpen ? 1 : 0, INDICATOR_SPRING));
556
638
  }, [isOpen, progress]);
557
- const rotation = useAnimatedStyle(function chunkVQG7K5QEJs1Factory({
558
- _worklet_2784553697165_init_data,
639
+ const rotation = useAnimatedStyle(function chunkXJEG4Q2RJs1Factory({
640
+ _worklet_6900067877253_init_data,
559
641
  interpolate,
560
642
  progress,
561
643
  INDICATOR_ROTATION
562
644
  }) {
563
645
  const _e = [new global.Error(), -4, -27];
564
- const chunkVQG7K5QEJs1 = function () {
646
+ const chunkXJEG4Q2RJs1 = function () {
565
647
  return {
566
648
  transform: [{
567
649
  rotate: `${interpolate(progress.get(), [0, 1], [INDICATOR_ROTATION[0], INDICATOR_ROTATION[1]])}deg`
568
650
  }]
569
651
  };
570
652
  };
571
- chunkVQG7K5QEJs1.__closure = {
653
+ chunkXJEG4Q2RJs1.__closure = {
572
654
  interpolate,
573
655
  progress,
574
656
  INDICATOR_ROTATION
575
657
  };
576
- chunkVQG7K5QEJs1.__workletHash = 2784553697165;
577
- chunkVQG7K5QEJs1.__pluginVersion = "0.7.4";
578
- chunkVQG7K5QEJs1.__initData = _worklet_2784553697165_init_data;
579
- chunkVQG7K5QEJs1.__stackDetails = _e;
580
- return chunkVQG7K5QEJs1;
658
+ chunkXJEG4Q2RJs1.__workletHash = 6900067877253;
659
+ chunkXJEG4Q2RJs1.__pluginVersion = "0.7.4";
660
+ chunkXJEG4Q2RJs1.__initData = _worklet_6900067877253_init_data;
661
+ chunkXJEG4Q2RJs1.__stackDetails = _e;
662
+ return chunkXJEG4Q2RJs1;
581
663
  }({
582
- _worklet_2784553697165_init_data,
664
+ _worklet_6900067877253_init_data,
583
665
  interpolate,
584
666
  progress,
585
667
  INDICATOR_ROTATION
586
668
  }), [progress]);
587
- return /* @__PURE__ */jsx7(Animated2.View, {
669
+ return /* @__PURE__ */jsx9(Animated2.View, {
588
670
  style: [indicatorStyle, rotation],
589
- children: /* @__PURE__ */jsx7(Icon, {
671
+ children: /* @__PURE__ */jsx9(Icon, {
590
672
  as
591
673
  })
592
674
  });
593
675
  }
594
676
  AutocompleteIndicator.displayName = "XAUI.Autocomplete.Indicator";
595
677
 
678
+ // src/components/autocomplete/autocomplete-label.tsx
679
+ import { forwardRef as forwardRef9 } from "react";
680
+ import { Text as Text5 } from "react-native";
681
+ import { jsx as jsx10 } from "react/jsx-runtime";
682
+ var AutocompleteLabel = forwardRef9(function AutocompleteLabel2({
683
+ children,
684
+ style,
685
+ nativeID,
686
+ ...props
687
+ }, ref) {
688
+ const {
689
+ labelStyle,
690
+ labelId
691
+ } = useAutocomplete();
692
+ const [styleProps, rest] = useStyleProps(props);
693
+ return /* @__PURE__ */jsx10(Text5, {
694
+ ref,
695
+ nativeID: nativeID ?? labelId,
696
+ style: [labelStyle, styleProps, style],
697
+ ...rest,
698
+ children
699
+ });
700
+ });
701
+ AutocompleteLabel.displayName = "XAUI.Autocomplete.Label";
702
+
596
703
  // src/components/autocomplete/autocomplete-overlay.tsx
597
- import { forwardRef as forwardRef6 } from "react";
704
+ import { forwardRef as forwardRef10 } from "react";
598
705
  import { Pressable } from "react-native";
599
706
  import Animated3 from "react-native-reanimated";
600
- import { jsx as jsx8 } from "react/jsx-runtime";
707
+ import { jsx as jsx11 } from "react/jsx-runtime";
601
708
  var AnimatedPressable = Animated3.createAnimatedComponent(Pressable);
602
- var AutocompleteOverlay = forwardRef6(function AutocompleteOverlay2({
709
+ var AutocompleteOverlay = forwardRef10(function AutocompleteOverlay2({
603
710
  children,
604
711
  style,
605
712
  ...props
@@ -612,10 +719,10 @@ var AutocompleteOverlay = forwardRef6(function AutocompleteOverlay2({
612
719
  } = context;
613
720
  const [styleProps, rest] = useStyleProps(props);
614
721
  if (!isOpen) return null;
615
- return /* @__PURE__ */jsx8(Portal, {
616
- children: /* @__PURE__ */jsx8(AutocompleteProvider, {
722
+ return /* @__PURE__ */jsx11(Portal, {
723
+ children: /* @__PURE__ */jsx11(AutocompleteProvider, {
617
724
  value: context,
618
- children: /* @__PURE__ */jsx8(AnimatedPressable, {
725
+ children: /* @__PURE__ */jsx11(AnimatedPressable, {
619
726
  ref,
620
727
  entering: overlayEntering,
621
728
  exiting: overlayExiting,
@@ -632,9 +739,9 @@ var AutocompleteOverlay = forwardRef6(function AutocompleteOverlay2({
632
739
  AutocompleteOverlay.displayName = "XAUI.Autocomplete.Overlay";
633
740
 
634
741
  // src/components/autocomplete/autocomplete-trigger.tsx
635
- import { forwardRef as forwardRef7, useCallback as useCallback3, useEffect as useEffect3, useRef } from "react";
636
- import { jsx as jsx9 } from "react/jsx-runtime";
637
- var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
742
+ import { forwardRef as forwardRef11, useCallback as useCallback3, useEffect as useEffect3, useRef } from "react";
743
+ import { jsx as jsx12 } from "react/jsx-runtime";
744
+ var AutocompleteTrigger = forwardRef11(function AutocompleteTrigger2({
638
745
  children,
639
746
  asChild = false,
640
747
  accessibilityRole = "combobox",
@@ -654,7 +761,9 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
654
761
  isDisabled,
655
762
  isInvalid,
656
763
  toggle,
657
- setAnchor
764
+ setAnchor,
765
+ labelId,
766
+ descriptionId
658
767
  } = useAutocomplete();
659
768
  const [styleProps, rest] = useStyleProps(props);
660
769
  const [isPressed, press] = usePressState({
@@ -685,9 +794,9 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
685
794
  measure();
686
795
  toggle();
687
796
  }, [measure, onPress, toggle]);
688
- return /* @__PURE__ */jsx9(IconContext.Provider, {
797
+ return /* @__PURE__ */jsx12(IconContext.Provider, {
689
798
  value: glyph,
690
- children: /* @__PURE__ */jsx9(PressableFeedback, {
799
+ children: /* @__PURE__ */jsx12(PressableFeedback, {
691
800
  ref: refs,
692
801
  isPressed,
693
802
  isDisabled,
@@ -699,6 +808,8 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
699
808
  ...accessibilityState
700
809
  },
701
810
  "aria-invalid": isInvalid || void 0,
811
+ "aria-labelledby": labelId,
812
+ "aria-describedby": descriptionId,
702
813
  ...rest,
703
814
  onLayout: handleLayout,
704
815
  style: [triggerStyle, isPressed && triggerPressedStyle, styleProps, typeof style === "function" ? style({
@@ -714,10 +825,10 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
714
825
  AutocompleteTrigger.displayName = "XAUI.Autocomplete.Trigger";
715
826
 
716
827
  // src/components/autocomplete/autocomplete-value.tsx
717
- import { forwardRef as forwardRef8 } from "react";
718
- import { Text as Text3 } from "react-native";
719
- import { jsx as jsx10 } from "react/jsx-runtime";
720
- var AutocompleteValue = forwardRef8(function AutocompleteValue2({
828
+ import { forwardRef as forwardRef12 } from "react";
829
+ import { Text as Text6 } from "react-native";
830
+ import { jsx as jsx13 } from "react/jsx-runtime";
831
+ var AutocompleteValue = forwardRef12(function AutocompleteValue2({
721
832
  children,
722
833
  placeholder,
723
834
  style,
@@ -732,7 +843,7 @@ var AutocompleteValue = forwardRef8(function AutocompleteValue2({
732
843
  const [styleProps, rest] = useStyleProps(props);
733
844
  const label = children ?? (value === void 0 ? void 0 : labelFor(value));
734
845
  const isEmpty2 = label === void 0 || label === null;
735
- return /* @__PURE__ */jsx10(Text3, {
846
+ return /* @__PURE__ */jsx13(Text6, {
736
847
  ref,
737
848
  numberOfLines: 1,
738
849
  ...rest,
@@ -743,7 +854,8 @@ var AutocompleteValue = forwardRef8(function AutocompleteValue2({
743
854
  AutocompleteValue.displayName = "XAUI.Autocomplete.Value";
744
855
 
745
856
  // src/components/autocomplete/index.ts
746
- var Autocomplete2 = Object.assign(Autocomplete, {
857
+ var Autocomplete3 = Object.assign(Autocomplete, {
858
+ Label: AutocompleteLabel,
747
859
  Trigger: AutocompleteTrigger,
748
860
  Value: AutocompleteValue,
749
861
  Indicator: AutocompleteIndicator,
@@ -752,6 +864,8 @@ var Autocomplete2 = Object.assign(Autocomplete, {
752
864
  Search: AutocompleteSearch,
753
865
  Item: AutocompleteItem,
754
866
  ItemLabel: AutocompleteItemLabel,
755
- Empty: AutocompleteEmpty
867
+ Empty: AutocompleteEmpty,
868
+ Description: AutocompleteDescription,
869
+ Error: AutocompleteError
756
870
  });
757
- export { useAutocomplete, useAutocompleteItem, autocompleteRecipe, Autocomplete, AutocompleteEmpty, AutocompleteItemLabel, AutocompleteItem, AutocompleteSearch, AutocompleteContent, AutocompleteIndicator, AutocompleteOverlay, AutocompleteTrigger, AutocompleteValue, Autocomplete2 };
871
+ export { useAutocomplete, useAutocompleteItem, autocompleteRecipe, Autocomplete, AutocompleteEmpty, AutocompleteItemLabel, AutocompleteItem, AutocompleteSearch, AutocompleteContent, AutocompleteDescription, AutocompleteError, AutocompleteIndicator, AutocompleteLabel, AutocompleteOverlay, AutocompleteTrigger, AutocompleteValue, Autocomplete3 as Autocomplete2 };
@@ -0,0 +1,14 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * The hint under the field — what the list holds, how much of it there is. The
4
+ * `TextField.Description`, on a field that opens a list.
5
+ *
6
+ * It turns `danger` with `isInvalid`, like the label, and sits inset by half the field's
7
+ * padding so the column reads as one block rather than a label, a box and a stray line.
8
+ *
9
+ * It carries the id the trigger points at, so a screen reader reads the hint after the
10
+ * value rather than leaving it on screen for the sighted alone.
11
+ */
12
+ export declare const AutocompleteDescription: import("react").ForwardRefExoticComponent<{
13
+ children?: import("react").ReactNode;
14
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -0,0 +1,14 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * The hint under the field — what the list holds, how much of it there is. The
4
+ * `TextField.Description`, on a field that opens a list.
5
+ *
6
+ * It turns `danger` with `isInvalid`, like the label, and sits inset by half the field's
7
+ * padding so the column reads as one block rather than a label, a box and a stray line.
8
+ *
9
+ * It carries the id the trigger points at, so a screen reader reads the hint after the
10
+ * value rather than leaving it on screen for the sighted alone.
11
+ */
12
+ export declare const AutocompleteDescription: import("react").ForwardRefExoticComponent<{
13
+ children?: import("react").ReactNode;
14
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -0,0 +1,12 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * What is wrong with the chosen row, in `danger` — the `TextField.Error`, on a field that
4
+ * opens a list.
5
+ *
6
+ * **It always renders what it is given.** `isInvalid` paints the trigger's border and turns
7
+ * the label and the description, but it does not mount or unmount this slot: a slot that
8
+ * silently renders nothing is one you cannot debug, so you write the condition yourself.
9
+ */
10
+ export declare const AutocompleteError: import("react").ForwardRefExoticComponent<{
11
+ children?: import("react").ReactNode;
12
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -0,0 +1,12 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * What is wrong with the chosen row, in `danger` — the `TextField.Error`, on a field that
4
+ * opens a list.
5
+ *
6
+ * **It always renders what it is given.** `isInvalid` paints the trigger's border and turns
7
+ * the label and the description, but it does not mount or unmount this slot: a slot that
8
+ * silently renders nothing is one you cannot debug, so you write the condition yourself.
9
+ */
10
+ export declare const AutocompleteError: import("react").ForwardRefExoticComponent<{
11
+ children?: import("react").ReactNode;
12
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -0,0 +1,15 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * What the field is for — the `TextField.Label`, on a field that opens a list.
4
+ *
5
+ * It turns `danger` with `isInvalid`, so the field that is wrong is findable on a long form
6
+ * without reading every message. Its colour is the theme's `foreground` rather than the
7
+ * variant's: the label sits outside the box, on the screen behind it, so a tinted field
8
+ * does not tint it.
9
+ *
10
+ * It carries the id the trigger points at, which is what makes a screen reader announce
11
+ * "État, liste déroulante" instead of reading the placeholder and hoping.
12
+ */
13
+ export declare const AutocompleteLabel: import("react").ForwardRefExoticComponent<{
14
+ children?: import("react").ReactNode;
15
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -0,0 +1,15 @@
1
+ import { Text } from 'react-native';
2
+ /**
3
+ * What the field is for — the `TextField.Label`, on a field that opens a list.
4
+ *
5
+ * It turns `danger` with `isInvalid`, so the field that is wrong is findable on a long form
6
+ * without reading every message. Its colour is the theme's `foreground` rather than the
7
+ * variant's: the label sits outside the box, on the screen behind it, so a tinted field
8
+ * does not tint it.
9
+ *
10
+ * It carries the id the trigger points at, which is what makes a screen reader announce
11
+ * "État, liste déroulante" instead of reading the placeholder and hoping.
12
+ */
13
+ export declare const AutocompleteLabel: import("react").ForwardRefExoticComponent<{
14
+ children?: import("react").ReactNode;
15
+ } & Omit<import("react-native").TextProps, "children"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & import("react").RefAttributes<Text>>;
@@ -1,9 +1,10 @@
1
- import type { AutocompleteProps } from './autocomplete.type';
1
+ import { View } from 'react-native';
2
2
  /**
3
3
  * A field that opens a list you search.
4
4
  *
5
5
  * ```tsx
6
6
  * <Autocomplete onValueChange={setState}>
7
+ * <Autocomplete.Label>État</Autocomplete.Label>
7
8
  * <Autocomplete.Trigger>
8
9
  * <Autocomplete.Value placeholder="Choisir un état" />
9
10
  * <Autocomplete.Indicator />
@@ -15,6 +16,7 @@ import type { AutocompleteProps } from './autocomplete.type';
15
16
  * <Autocomplete.Item value="tx">Texas</Autocomplete.Item>
16
17
  * <Autocomplete.Empty>Aucun résultat</Autocomplete.Empty>
17
18
  * </Autocomplete.Content>
19
+ * <Autocomplete.Description>Cinquante États, une seule ligne.</Autocomplete.Description>
18
20
  * </Autocomplete>
19
21
  * ```
20
22
  *
@@ -30,10 +32,51 @@ import type { AutocompleteProps } from './autocomplete.type';
30
32
  * the drift would show as a select and an autocomplete side by side in a form with fields
31
33
  * half a shade apart.
32
34
  *
33
- * **The root renders no node.** It is state and resolved style around a trigger and a
34
- * panel, so `ref`, `style` and the a11y props live on `Autocomplete.Trigger`.
35
+ * **The root is the column, not the field** — the `TextField`'s shape, and the
36
+ * `DatePicker`'s: a `View` that stacks `Autocomplete.Label`, the trigger and
37
+ * `Autocomplete.Description` / `.Error` with one `gap`, so JSX order is screen order. It is
38
+ * the column and the help lines that make this a field on a form rather than a button that
39
+ * opens a list, and they are the `TextField`'s token for token — a text field and an
40
+ * autocomplete on the same form read as one control.
41
+ *
42
+ * `Autocomplete.Trigger` is the field, and it keeps its own `ref` — it is the node the
43
+ * panel measures. `Autocomplete.Overlay` and `Autocomplete.Content` portal out, so they add
44
+ * nothing to the column.
35
45
  */
36
- export declare function Autocomplete({ children, variant, size, radius, color, value: controlledValue, defaultValue, onValueChange, isOpen: controlledOpen, defaultOpen, onOpenChange, query: controlledQuery, defaultQuery, onQueryChange, isDisabled, isInvalid, }: AutocompleteProps): import("react").JSX.Element;
37
- export declare namespace Autocomplete {
38
- var displayName: string;
39
- }
46
+ export declare const Autocomplete: import("react").ForwardRefExoticComponent<{
47
+ children?: import("react").ReactNode;
48
+ variant?: import("./autocomplete.type").AutocompleteVariant;
49
+ size?: import("./autocomplete.type").AutocompleteSize;
50
+ radius?: import("../..").RadiusKey;
51
+ color?: string;
52
+ value?: string;
53
+ defaultValue?: string;
54
+ onValueChange?: (value: string) => void;
55
+ isOpen?: boolean;
56
+ defaultOpen?: boolean;
57
+ onOpenChange?: (isOpen: boolean) => void;
58
+ query?: string;
59
+ defaultQuery?: string;
60
+ onQueryChange?: (query: string) => void;
61
+ isDisabled?: boolean;
62
+ isInvalid?: boolean;
63
+ asChild?: boolean;
64
+ } & Omit<import("react-native").ViewProps, keyof {
65
+ children?: import("react").ReactNode;
66
+ variant?: import("./autocomplete.type").AutocompleteVariant;
67
+ size?: import("./autocomplete.type").AutocompleteSize;
68
+ radius?: import("../..").RadiusKey;
69
+ color?: string;
70
+ value?: string;
71
+ defaultValue?: string;
72
+ onValueChange?: (value: string) => void;
73
+ isOpen?: boolean;
74
+ defaultOpen?: boolean;
75
+ onOpenChange?: (isOpen: boolean) => void;
76
+ query?: string;
77
+ defaultQuery?: string;
78
+ onQueryChange?: (query: string) => void;
79
+ isDisabled?: boolean;
80
+ isInvalid?: boolean;
81
+ asChild?: boolean;
82
+ }> & Omit<import("../..").ViewStyleProps, "color" | "value" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "asChild" | "radius" | "size" | "variant" | "defaultValue" | "onValueChange" | "isOpen" | "defaultOpen" | "onOpenChange" | "isInvalid" | "query" | "defaultQuery" | "onQueryChange"> & import("react").RefAttributes<View>>;