@godxjp/ui 22.0.0 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +4 -4
  2. package/dist/components/data-display/scroll-area.d.ts +24 -4
  3. package/dist/components/data-display/scroll-area.js +34 -72
  4. package/dist/components/data-entry/cascader.js +8 -6
  5. package/dist/components/data-entry/checkbox.js +2 -0
  6. package/dist/components/data-entry/choice-hit-target.d.ts +24 -0
  7. package/dist/components/data-entry/choice-hit-target.js +12 -0
  8. package/dist/components/data-entry/control-surface.d.ts +8 -0
  9. package/dist/components/data-entry/control-surface.js +10 -1
  10. package/dist/components/data-entry/form-field.js +3 -2
  11. package/dist/components/data-entry/radio.js +3 -2
  12. package/dist/components/data-entry/search-select.js +225 -95
  13. package/dist/components/data-entry/select.d.ts +76 -14
  14. package/dist/components/data-entry/select.js +495 -163
  15. package/dist/components/data-entry/slider.d.ts +3 -11
  16. package/dist/components/data-entry/slider.js +582 -93
  17. package/dist/components/data-entry/switch.js +2 -0
  18. package/dist/components/navigation/dropdown-menu.d.ts +11 -3
  19. package/dist/components/navigation/dropdown-menu.js +190 -15
  20. package/dist/components/navigation/index.d.ts +0 -3
  21. package/dist/components/navigation/index.js +0 -78
  22. package/dist/components/ui/index.d.ts +0 -3
  23. package/dist/components/ui/index.js +0 -3
  24. package/dist/components/ui/input-otp.d.ts +1 -1
  25. package/dist/components/ui/segmented.js +3 -1
  26. package/dist/components/ui/tag-input.js +3 -5
  27. package/dist/lib/select-options.d.ts +21 -0
  28. package/dist/lib/select-options.js +46 -0
  29. package/dist/props/components/data-display.prop.d.ts +9 -6
  30. package/dist/props/components/data-entry.prop.d.ts +323 -30
  31. package/dist/props/components/index.d.ts +1 -1
  32. package/dist/props/components/navigation.prop.d.ts +17 -0
  33. package/dist/props/registry.d.ts +63 -0
  34. package/dist/props/registry.js +69 -0
  35. package/dist/styles/control.css +205 -23
  36. package/dist/styles/data-display-layout.css +18 -10
  37. package/dist/styles/focus-ring.css +2 -2
  38. package/dist/styles/fonts.css +88 -4
  39. package/dist/styles/navigation-layout.css +11 -236
  40. package/dist/styles/shell-layout.css +144 -139
  41. package/dist/styles/table-layout.css +7 -3
  42. package/dist/tokens/components/control.css +4 -0
  43. package/dist/tokens/components/data-display.css +0 -5
  44. package/dist/tokens/components/navigation.css +3 -5
  45. package/dist/tokens/components/scroll-area.css +7 -0
  46. package/docs/CUSTOMER-THEMING.md +7 -1
  47. package/docs/FRAME-COVERAGE-REPORT.md +4 -7
  48. package/docs/data-display/data-table/index.tsx +27 -1
  49. package/docs/data-display/popover.tsx +4 -6
  50. package/docs/data-display/scroll-area.tsx +51 -45
  51. package/docs/data-entry/date-picker.tsx +2 -3
  52. package/docs/data-entry/input-otp.tsx +5 -2
  53. package/docs/data-entry/segmented.tsx +40 -1
  54. package/docs/data-entry/select-matrix.tsx +1 -2
  55. package/docs/data-entry/select.tsx +108 -3
  56. package/docs/data-entry/slider.tsx +125 -47
  57. package/docs/feedback/dialog.tsx +1 -2
  58. package/docs/feedback/sheet.tsx +1 -2
  59. package/docs/layout/app-shell-states.tsx +143 -0
  60. package/docs/navigation/dropdown-menu.tsx +75 -4
  61. package/docs/roadmap/parity-audit-data-entry.md +44 -33
  62. package/docs/roadmap/parity-audit-layout-navigation-general.md +304 -310
  63. package/docs/roadmap/parity-backlog.md +2 -3
  64. package/package.json +20 -44
  65. package/scripts/ui-audit.mjs +1 -1
  66. package/scripts/visual-audit-rules.mjs +0 -7
  67. package/scripts/visual-audit.mjs +6 -27
  68. package/dist/components/navigation/context-menu.d.ts +0 -21
  69. package/dist/components/navigation/context-menu.js +0 -149
  70. package/dist/components/navigation/menubar.d.ts +0 -28
  71. package/dist/components/navigation/menubar.js +0 -136
  72. package/dist/components/navigation/navigation-menu.d.ts +0 -10
  73. package/dist/components/navigation/navigation-menu.js +0 -91
  74. package/dist/components/ui/context-menu.d.ts +0 -1
  75. package/dist/components/ui/context-menu.js +0 -2
  76. package/dist/components/ui/menubar.d.ts +0 -1
  77. package/dist/components/ui/menubar.js +0 -2
  78. package/dist/components/ui/navigation-menu.d.ts +0 -1
  79. package/dist/components/ui/navigation-menu.js +0 -2
  80. package/docs/FRAME-A11Y-CI.md +0 -349
  81. package/docs/navigation/context-menu.tsx +0 -128
  82. package/docs/navigation/menubar.tsx +0 -141
  83. package/docs/navigation/navigation-menu.tsx +0 -158
@@ -1,5 +1,4 @@
1
1
  /** Data Entry component prop types — @see docs/COMPONENTS.md#data-entry */
2
- import type * as SliderPrimitive from "@radix-ui/react-slider";
3
2
  import type { RenderProps as InputOTPRenderProps } from "input-otp";
4
3
  import type { DayPickerProps } from "react-day-picker";
5
4
  import type { DateRange } from "react-day-picker";
@@ -36,8 +35,15 @@ export type InputOTPMaskProp = boolean | string;
36
35
  * The value is ALWAYS driven from here (`value` controlled, or `defaultValue` + internal state), so
37
36
  * `formatter` and `readOnly` hold for typing AND for paste — `input-otp` writes its own internal
38
37
  * state on paste, which a wrapper that only intercepted `onChange` could not undo.
38
+ *
39
+ * `style` is OMITTED because it cannot be honoured: `input-otp` owns both elements it could land
40
+ * on and writes their geometry itself — the field's own style object replaces anything passed in
41
+ * (measured: `style={{ color: "red" }}` left the input at the library's `color: transparent`) and
42
+ * the container's is hard-coded too. A type that accepts a prop the render can never deliver is
43
+ * the defect gh#477 reported for `id`; `id` is real and forwarded, this one was not. The paint of
44
+ * the field is reached through `className` / `containerClassName` and the `--otp-*` tokens.
39
45
  */
40
- export type InputOTPProp = Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size" | "children"> & {
46
+ export type InputOTPProp = Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size" | "children" | "style"> & {
41
47
  /** Number of slots — antd `length`. Required by `input-otp`. */
42
48
  maxLength: number;
43
49
  value?: string;
@@ -528,43 +534,157 @@ export type FieldProp = {
528
534
  children: React.ReactNode;
529
535
  };
530
536
  /**
531
- * Tick marks on a slider rail — antd `SliderMarks`. Keyed by the value the mark sits on; the
532
- * value is the label. `null` renders the tick with no label.
537
+ * One tick on a slider rail — antd's two spellings: the label itself, or `{ label, style }` where
538
+ * the object also carries a per-mark inline style. `null` renders the tick with no label.
539
+ */
540
+ export type SliderMarkProp = React.ReactNode | {
541
+ label?: React.ReactNode;
542
+ /** antd's per-mark style. Prefer styling the `label` node — it is already a ReactNode. */
543
+ style?: React.CSSProperties;
544
+ };
545
+ /**
546
+ * Tick marks on a slider rail — antd `SliderMarks`. Keyed by the value the mark sits on. With
547
+ * `step={null}` the marks (plus `min` and `max`) are the ONLY values the slider can take.
533
548
  */
534
- export type SliderMarksProp = Record<number, React.ReactNode>;
549
+ export type SliderMarksProp = Record<number, SliderMarkProp>;
535
550
  /**
536
- * antd `tooltip` — the value bubble over a dragging thumb. `false` switches it off, `true` uses
537
- * the raw value, and the object form formats it (a unit, a currency, a 全角 label).
551
+ * antd `tooltip` — the value bubble over a thumb. `false` switches it off, `true` uses the raw
552
+ * value, and the object form formats and places it.
538
553
  */
539
554
  export type SliderTooltipProp = boolean | {
540
- /** Force the bubble on/off instead of following hover/drag. */
555
+ /**
556
+ * `true` keeps the bubble visible; `false` keeps it hidden even while dragging or hovering —
557
+ * both exactly as antd. Unset, it follows hover, keyboard focus and drag.
558
+ */
541
559
  open?: boolean;
542
- /** Render the bubble's content. `null` switches the bubble off, exactly as antd's does. */
560
+ /**
561
+ * Which side of the thumb. `left` / `right` are the INLINE sides and mirror under RTL like
562
+ * the rest of the slider. Defaults to `top`, or `right` on a vertical slider (antd's default).
563
+ */
564
+ placement?: "top" | "bottom" | "left" | "right";
565
+ /** Flip to the opposite side when the bubble would leave the viewport. Default `true`. */
566
+ autoAdjustOverflow?: boolean;
567
+ /**
568
+ * Render the bubble's content. `null` switches the bubble off, exactly as antd's does. A
569
+ * string or number result is ALSO the thumb's `aria-valuetext`, so a `¥50,000` slider is
570
+ * announced as ¥50,000 and not as a bare 50000.
571
+ */
543
572
  formatter?: ((value: number) => React.ReactNode) | null;
544
573
  };
545
- /** @see Slider — numeric range (Radix Slider). */
546
- export type SliderProp = React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> & {
574
+ /**
575
+ * antd's range object — `range={{ editable, minCount, maxCount, draggableTrack }}`. Any object is
576
+ * a range, exactly like `range={true}`.
577
+ */
578
+ export type SliderRangeConfigProp = {
579
+ /**
580
+ * Thumbs can be added and removed: a press on the rail ADDS one there, and Delete / Backspace on
581
+ * a focused thumb removes it. Ignored while any thumb is disabled, and wins over `draggableTrack`
582
+ * — both exactly as antd.
583
+ */
584
+ editable?: boolean;
585
+ /** Fewest thumbs `editable` may leave. Default 0. */
586
+ minCount?: number;
587
+ /** Most thumbs `editable` may create. Default unlimited. */
588
+ maxCount?: number;
589
+ /** Drag the painted span to move every thumb at once, keeping their distance. */
590
+ draggableTrack?: boolean;
591
+ };
592
+ /**
593
+ * @see Slider — numeric slider on react-aria-components, antd 6 `Slider` API.
594
+ *
595
+ * Written out rather than derived from the primitive, so what is public is exactly what is listed
596
+ * here: the Radix-era spelling (`number[]` values, `onValueChange`, `onValueCommit`, `inverted`,
597
+ * `dir`, `minStepsBetweenThumbs`) keeps compiling beside antd's (`number` values, `onChange`,
598
+ * `onChangeComplete`, `reverse`, `vertical`, `range` objects, `step={null}`).
599
+ *
600
+ * The union is on `range`, as in antd: without it `onChange` reports a `number`, with a literal
601
+ * `range` (or a range object) it reports `number[]`. A `range` held in a boolean variable cannot
602
+ * say which, so that spelling takes `onValueChange` — which always reports every thumb.
603
+ */
604
+ export type SliderProp = Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "dir" | "children"> & {
605
+ /** The low end of the scale. Default 0. */
606
+ min?: number;
607
+ /** The high end of the scale. Default 100. */
608
+ max?: number;
609
+ /**
610
+ * Granularity. `null` is antd's marks-only mode: the thumbs can only rest on a mark, `min` or
611
+ * `max`. Default 1.
612
+ */
613
+ step?: number | null;
547
614
  /**
548
- * antd `range` two thumbs bounding a span rather than one thumb over a point. It is a
549
- * DECLARATION, not an inference: a single-thumb slider whose `defaultValue` happens to be a
550
- * two-element array used to become a range by accident, and a range whose value arrived
551
- * asynchronously used to render as a point.
615
+ * Disable the whole slider, or antd's array form one thumb each: `[true, false]` locks the
616
+ * first thumb of a range. A disabled thumb leaves the tab order and does not submit.
552
617
  */
553
- range?: boolean;
618
+ disabled?: boolean | boolean[];
619
+ /** Layout axis. Default `horizontal`. Wins over `vertical`, as in antd 6. */
620
+ orientation?: "horizontal" | "vertical";
621
+ /** antd's boolean spelling of `orientation="vertical"`. */
622
+ vertical?: boolean;
623
+ /**
624
+ * Reading direction of a horizontal slider — which end is `min` and which arrow increases.
625
+ * Defaults to the locale's direction (the `I18nProvider` that `AppProvider` sets).
626
+ */
627
+ dir?: "ltr" | "rtl";
628
+ /** antd `reverse` — run the scale the other way (`min` at the inline end, or at the top). */
629
+ reverse?: boolean;
630
+ /** The Radix-era name for `reverse`. When both are given, `inverted` wins. */
631
+ inverted?: boolean;
632
+ /** Radix-era: the fewest steps two neighbouring thumbs may be apart. Default 0. */
633
+ minStepsBetweenThumbs?: number;
634
+ /** Every change, with EVERY thumb — the Radix-era callback, valid in every spelling. */
635
+ onValueChange?: (value: number[]) => void;
636
+ /** Once per finished gesture (pointer release, key press), with every thumb. */
637
+ onValueCommit?: (value: number[]) => void;
638
+ /**
639
+ * Native form field name. One thumb submits `name`; several submit `name[]`, once each.
640
+ */
641
+ name?: string;
642
+ /** Associate the thumbs' inputs with a form elsewhere in the document, by id. */
643
+ form?: string;
554
644
  /** antd `marks` — labelled ticks along the rail. */
555
645
  marks?: SliderMarksProp;
556
- /** antd `dots` — a tick at every `step`. Requires a `step`. */
646
+ /** antd `dots` — a tick at every `step` (at every mark when `step={null}`). */
557
647
  dots?: boolean;
558
648
  /**
559
- * antd `included` — whether the painted range is the span from the start to the thumb
560
- * (`true`, the default) or nothing at all (`false`, for a rail that only holds marks).
649
+ * antd `included` — whether the painted span runs from the start to the thumb (`true`, the
650
+ * default) or nothing is painted at all (`false`, for a rail that only holds marks).
561
651
  */
562
652
  included?: boolean;
563
- /** antd `reverse` — run the scale the other way. Radix spells the same thing `inverted`. */
564
- reverse?: boolean;
565
- /** antd `tooltip` — the value bubble over a dragging thumb. Off by default. */
653
+ /** antd `tooltip` — the value bubble over a thumb. Off by default. */
566
654
  tooltip?: SliderTooltipProp;
567
- };
655
+ } & ({
656
+ /**
657
+ * One thumb. An array `value` with no `range` still draws a thumb per entry — the
658
+ * Radix-era inference — but `onChange` then reports only the first; use `onValueChange`
659
+ * for all of them, or declare `range`.
660
+ */
661
+ range?: false;
662
+ /** Controlled value — a number, or the Radix-era `number[]`. */
663
+ value?: number | number[];
664
+ /** Uncontrolled initial value. With nothing given the thumb starts at `min`. */
665
+ defaultValue?: number | number[];
666
+ /** antd `onChange` — every change, as a number. */
667
+ onChange?: (value: number) => void;
668
+ /** antd `onChangeComplete` — pointer release / key press, as a number. */
669
+ onChangeComplete?: (value: number) => void;
670
+ } | {
671
+ /**
672
+ * antd `range` — two or more thumbs bounding spans. A DECLARATION: a range whose value is
673
+ * still loading does not render as a point, and without a value it spans `[min, max]`.
674
+ */
675
+ range: true | SliderRangeConfigProp;
676
+ value?: number[];
677
+ defaultValue?: number[];
678
+ onChange?: (value: number[]) => void;
679
+ onChangeComplete?: (value: number[]) => void;
680
+ } | {
681
+ /** A `range` known only at run time (a boolean variable) — report through `onValueChange`. */
682
+ range: boolean;
683
+ value?: number | number[];
684
+ defaultValue?: number | number[];
685
+ onChange?: never;
686
+ onChangeComplete?: never;
687
+ });
568
688
  /** @see Calendar — react-day-picker DayPicker plus an opt-in footer. */
569
689
  /**
570
690
  * Decorate one day cell — antd's `cellRender`, in the shape the Japanese market actually needs it:
@@ -910,13 +1030,77 @@ export type SearchSelectLoadResultProp = {
910
1030
  /** True if another page is available (drives infinite scroll). */
911
1031
  hasMore?: boolean;
912
1032
  };
1033
+ /**
1034
+ * antd `fieldNames` — read rows in a FOREIGN shape (`{id, name}`, `{code, title}`) without mapping
1035
+ * them first. The spelling matches the `fieldNames` Cascader and TreeSelect already take.
1036
+ */
1037
+ export type SelectFieldNamesProp = {
1038
+ label?: string;
1039
+ value?: string;
1040
+ /** Key holding a group's child rows — antd nests a group's options under the group. */
1041
+ options?: string;
1042
+ /** Key holding a group's heading; defaults to `label`, as in antd. */
1043
+ groupLabel?: string;
1044
+ disabled?: string;
1045
+ };
1046
+ /**
1047
+ * A GROUP in antd's nested `options` shape — a heading plus its own rows. The flat
1048
+ * `option.group` spelling this library already had keeps working; both arrive at the same list.
1049
+ */
1050
+ export type SelectOptionGroupProp = {
1051
+ label: string;
1052
+ options: SearchSelectOptionProp[];
1053
+ disabled?: boolean;
1054
+ };
1055
+ /** What `<Select options>` accepts: a row, a group of rows, or (with `fieldNames`) a foreign row. */
1056
+ export type SelectOptionInputProp = SearchSelectOptionProp | SelectOptionGroupProp | Record<string, unknown>;
1057
+ /**
1058
+ * antd `labelInValue` — the value carries its own label, so a screen that only ever sees
1059
+ * `{ value, label }` never has to keep the option list around to render what was picked (an async
1060
+ * edit form whose page has not loaded yet is the case that needs it).
1061
+ */
1062
+ export type SelectLabeledValueProp = {
1063
+ value: string;
1064
+ label: React.ReactNode;
1065
+ };
1066
+ /**
1067
+ * antd `placement`, spelled on the LOGICAL inline axis — the same vocabulary
1068
+ * `DropdownMenuPlacementProp` publishes, and for the same reason: antd's `bottomLeft` / `topRight`
1069
+ * cannot mirror for an Arabic or Hebrew layout.
1070
+ */
1071
+ export type SelectPlacementProp = "bottomStart" | "bottomEnd" | "topStart" | "topEnd";
1072
+ /**
1073
+ * antd `showSearch`'s OBJECT form. Every field is the antd one, including
1074
+ * `filterOption(input, option)` — note the argument order is antd's here, while the long-standing
1075
+ * top-level `filterOption(option, query)` keeps this library's. Pass whichever you prefer; the
1076
+ * object form wins when both are given.
1077
+ */
1078
+ export type SelectShowSearchProp = {
1079
+ /** `false` keeps every row (a server-filtered list); a function decides per row. */
1080
+ filterOption?: boolean | ((input: string, option: SearchSelectOptionProp) => boolean);
1081
+ /** Which field the default filter matches. antd's default is `value`; `label` is the common one. */
1082
+ optionFilterProp?: "label" | "value" | "sublabel";
1083
+ filterSort?: (a: SearchSelectOptionProp, b: SearchSelectOptionProp, info: {
1084
+ searchValue: string;
1085
+ }) => number;
1086
+ searchValue?: string;
1087
+ onSearch?: (value: string) => void;
1088
+ autoClearSearchValue?: boolean;
1089
+ };
913
1090
  /**
914
1091
  * @see Select — the data-driven entry point (`<Select options|loadOptions showSearch …/>`).
915
1092
  * This is the shape of its internal engine (`SelectDataProp` extends it); use `Select` directly.
916
1093
  */
917
1094
  export type SearchSelectBaseProp = {
918
- /** Static option list (client-side filtered). Provide this OR `loadOptions`, not both. */
919
- options?: SearchSelectOptionProp[];
1095
+ /**
1096
+ * Static option list (client-side filtered). Provide this OR `loadOptions`, not both.
1097
+ *
1098
+ * A row, or one of antd's nested GROUPS (`{ label, options }`) — both land in the same list, the
1099
+ * group's heading becoming the `group` this library's flat rows already carry. Rows in a foreign
1100
+ * shape go through `fieldNames` and need a cast at the call site, exactly as Cascader's and
1101
+ * TreeSelect's do.
1102
+ */
1103
+ options?: (SearchSelectOptionProp | SelectOptionGroupProp)[];
920
1104
  /** Remote fetcher — debounced search + infinite-scroll pagination call into this. Provide this
921
1105
  * OR `options`. */
922
1106
  loadOptions?: (params: SearchSelectLoadParamsProp) => Promise<SearchSelectLoadResultProp>;
@@ -1068,6 +1252,45 @@ export type SearchSelectBaseProp = {
1068
1252
  "data-testid"?: string;
1069
1253
  /** Normally injected by `FormField`. */
1070
1254
  "data-field"?: string;
1255
+ /**
1256
+ * antd `fieldNames` — map `{label, value, options, groupLabel, disabled}` onto foreign rows, so a
1257
+ * server payload can be passed straight through instead of being copied into a second array.
1258
+ */
1259
+ fieldNames?: SelectFieldNamesProp;
1260
+ /**
1261
+ * antd `prefix` — a node pinned BEFORE the value on the trigger (a currency mark, an icon, a
1262
+ * "To:" label). Decorative: it is not part of the control's accessible name.
1263
+ */
1264
+ prefix?: React.ReactNode;
1265
+ /**
1266
+ * antd `suffixIcon` — replaces the trailing chevron. `null` removes the indicator entirely (antd
1267
+ * spells that `showArrow={false}`, which it deprecated in favour of exactly this).
1268
+ */
1269
+ suffixIcon?: React.ReactNode;
1270
+ /**
1271
+ * antd `placement`, on the logical inline axis. Absent = `bottomStart` with collision flipping,
1272
+ * which is what a picker wants; set it only when the popup must open a specific way.
1273
+ */
1274
+ placement?: SelectPlacementProp;
1275
+ /**
1276
+ * antd `popupRender` — wrap the popup's own node (add a footer, a "create" action, a hint line).
1277
+ * Receives the list and must render it: dropping `originNode` leaves a popup with no options.
1278
+ */
1279
+ popupRender?: (originNode: React.ReactNode) => React.ReactNode;
1280
+ /**
1281
+ * antd `listHeight` — the option list's maximum height in px. It overrides
1282
+ * `--select-content-max-height` for this one control; the token stays the default everywhere
1283
+ * else, so this is a per-instance override of a knob, not a new hard-coded height.
1284
+ */
1285
+ listHeight?: number;
1286
+ /** antd `onPopupScroll` — fires on the option list's own scroll (an infinite-scroll hook). */
1287
+ onPopupScroll?: (event: React.UIEvent<HTMLElement>) => void;
1288
+ /**
1289
+ * antd `optionFilterProp` — which field the default filter matches while searching. antd's
1290
+ * default is `value`; this library keeps matching BOTH label and value when it is unset, because
1291
+ * every call site that has ever relied on the default expects a label search.
1292
+ */
1293
+ optionFilterProp?: "label" | "value" | "sublabel";
1071
1294
  };
1072
1295
  /**
1073
1296
  * Single-select (the default): one `string` in, one `string` out — `""` means nothing selected.
@@ -1075,6 +1298,8 @@ export type SearchSelectBaseProp = {
1075
1298
  */
1076
1299
  export type SearchSelectSingleProp = {
1077
1300
  mode?: undefined;
1301
+ /** @see SelectLabelInValueSingleProp for the `{value,label}` dialect. */
1302
+ labelInValue?: false;
1078
1303
  value?: ValueProp;
1079
1304
  /** Uncontrolled initial value — the trigger shows its option's label at rest (controlled-triad). */
1080
1305
  defaultValue?: DefaultValueProp;
@@ -1092,7 +1317,13 @@ export type SearchSelectSingleProp = {
1092
1317
  * per-chip remove button inside it would be a button nested in a button.
1093
1318
  */
1094
1319
  export type SearchSelectMultipleProp = {
1095
- mode: "multiple";
1320
+ /**
1321
+ * `multiple` picks from the list; `tags` also ACCEPTS what was typed, so a value that is not in
1322
+ * the list can still be committed (antd's own distinction between the two).
1323
+ */
1324
+ mode: "multiple" | "tags";
1325
+ /** @see SelectLabelInValueMultipleProp for the `{value,label}` dialect. */
1326
+ labelInValue?: false;
1096
1327
  value?: ValueProp<string[]>;
1097
1328
  /** Uncontrolled initial selection (controlled-triad). */
1098
1329
  defaultValue?: DefaultValueProp<string[]>;
@@ -1111,6 +1342,64 @@ export type SearchSelectMultipleProp = {
1111
1342
  maxTagCount?: MaxTagCountProp;
1112
1343
  /** The node standing in for what `maxTagCount` hid (antd `maxTagPlaceholder`). */
1113
1344
  maxTagPlaceholder?: MaxTagPlaceholderProp;
1345
+ /**
1346
+ * antd `maxTagTextLength` — cut each chip's text to this many characters (an ellipsis marks the
1347
+ * cut). It trims what the TRIGGER shows only; the value keeps its whole label.
1348
+ */
1349
+ maxTagTextLength?: number;
1350
+ /**
1351
+ * antd `tagRender` — render one chip yourself. Exactly the shape `TagInput`'s `tagRender` takes,
1352
+ * so the two chip surfaces in this library are configured the same way. The `onClose` handed in
1353
+ * is the same remover the built-in ✕ calls, so a custom chip cannot end up unremovable.
1354
+ */
1355
+ tagRender?: (props: {
1356
+ value: string;
1357
+ label: React.ReactNode;
1358
+ onClose: () => void;
1359
+ index: number;
1360
+ disabled: boolean;
1361
+ }) => React.ReactNode;
1362
+ /**
1363
+ * antd `tokenSeparators` — characters that commit what has been typed. Typing or PASTING
1364
+ * "a,b,c" with `[","]` commits three values in one change, which is the point: a run pasted out
1365
+ * of a spreadsheet becomes a selection instead of one long nonsense token. In `mode="multiple"`
1366
+ * a token only counts when it matches a row; in `mode="tags"` it is accepted as it stands.
1367
+ */
1368
+ tokenSeparators?: string[];
1369
+ };
1370
+ /**
1371
+ * antd `labelInValue`, single. The value carries its own label, so a screen that never sees the
1372
+ * option list can still render what was picked.
1373
+ */
1374
+ export type SelectLabelInValueSingleProp = {
1375
+ labelInValue: true;
1376
+ mode?: undefined;
1377
+ value?: SelectLabeledValueProp | null;
1378
+ defaultValue?: SelectLabeledValueProp | null;
1379
+ onValueChange?: (value: SelectLabeledValueProp | undefined, option?: SearchSelectOptionProp) => void;
1380
+ onSelect?: (value: SelectLabeledValueProp, option: SearchSelectOptionProp) => void;
1381
+ };
1382
+ /** antd `labelInValue`, multiple/tags. */
1383
+ export type SelectLabelInValueMultipleProp = {
1384
+ labelInValue: true;
1385
+ mode: "multiple" | "tags";
1386
+ value?: SelectLabeledValueProp[];
1387
+ defaultValue?: SelectLabeledValueProp[];
1388
+ onValueChange?: (value: SelectLabeledValueProp[], options?: SearchSelectOptionProp[]) => void;
1389
+ onSelect?: (value: SelectLabeledValueProp, option: SearchSelectOptionProp) => void;
1390
+ onDeselect?: (value: SelectLabeledValueProp, option: SearchSelectOptionProp) => void;
1391
+ maxCount?: number;
1392
+ maxTagCount?: MaxTagCountProp;
1393
+ maxTagPlaceholder?: MaxTagPlaceholderProp;
1394
+ maxTagTextLength?: number;
1395
+ tokenSeparators?: string[];
1396
+ tagRender?: (props: {
1397
+ value: string;
1398
+ label: React.ReactNode;
1399
+ onClose: () => void;
1400
+ index: number;
1401
+ disabled: boolean;
1402
+ }) => React.ReactNode;
1114
1403
  };
1115
1404
  /** @see Select — the searchable engine. Single by default; `mode="multiple"` switches the shape. */
1116
1405
  export type SearchSelectProp = SearchSelectBaseProp & (SearchSelectSingleProp | SearchSelectMultipleProp);
@@ -1121,11 +1410,15 @@ export type SearchSelectProp = SearchSelectBaseProp & (SearchSelectSingleProp |
1121
1410
  */
1122
1411
  export type SelectDataProp = SearchSelectBaseProp & {
1123
1412
  /**
1124
- * Show the search box (combobox). Defaults to true when `loadOptions` is set or
1125
- * `mode="multiple"` is in force (antd's own defaults), otherwise false.
1413
+ * Show the search box (combobox). Defaults to true when `loadOptions` is set or a multi-value
1414
+ * `mode` is in force (antd's own defaults), otherwise false.
1415
+ *
1416
+ * The OBJECT form is antd's, and configures the search in one place —
1417
+ * `{ filterOption, optionFilterProp, filterSort, searchValue, onSearch, autoClearSearchValue }`.
1418
+ * Passing it also turns the search on.
1126
1419
  */
1127
- showSearch?: boolean;
1128
- } & (SearchSelectSingleProp | SearchSelectMultipleProp);
1420
+ showSearch?: boolean | SelectShowSearchProp;
1421
+ } & (SearchSelectSingleProp | SearchSelectMultipleProp | SelectLabelInValueSingleProp | SelectLabelInValueMultipleProp);
1129
1422
  /** @see UploadFileItem */
1130
1423
  export type UploadFileItemProp = UploadFileItem;
1131
1424
  /** @see Upload */
@@ -5,6 +5,6 @@ export type { AvatarProp, EmptyStateProp, DescriptionsProp, DescriptionsItemProp
5
5
  export type { ChartDatum, ChartSeriesProp, LineChartProp, BarChartProp, AreaChartProp, PieChartProp, } from "./charts.prop.js";
6
6
  export type { AlertQueryErrorProp, AlertProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SheetResponsiveProp, SkeletonRowsProp, } from "./feedback.prop.js";
7
7
  export type { DataStateProp, InfiniteQueryStateProp, InfiniteQueryHelpers, PrefetchLinkProp, } from "./query.prop.js";
8
- export type { DropdownMenuPlacementProp, PaginationProp, PaginationSizeProp, PaginationAlignProp, StepsProp, StepItemProp, StepStatusProp, StepsTypeProp, TabsProp, TabItemProp, TabsVariantProp, TabsPlacementProp, TabsExtraProp, TabsOnEditProp, } from "./navigation.prop.js";
8
+ export type { DropdownMenuPlacementProp, DropdownMenuTriggerActionProp, PaginationProp, PaginationSizeProp, PaginationAlignProp, StepsProp, StepItemProp, StepStatusProp, StepsTypeProp, TabsProp, TabItemProp, TabsVariantProp, TabsPlacementProp, TabsExtraProp, TabsOnEditProp, } from "./navigation.prop.js";
9
9
  export type { AppProviderProp, AppContextValue, AppSettingKind, AppSettingPickerProp, AppSettingToggleKind, AppSettingToggleProp, } from "./app.prop.js";
10
10
  export type { ZodSchemaProp, UseZodFormOptionsProp, UseZodFormReturnProp, FormRootProp, FormFieldControlProp, FieldErrorMessageProp, } from "./form.prop.js";
@@ -172,6 +172,23 @@ export type PaginationAlignProp = "start" | "center" | "end";
172
172
  * inline-side ones (antd `left*` / `right*`) stay on Radix's own physical `side`.
173
173
  */
174
174
  export type DropdownMenuPlacementProp = "top" | "topStart" | "topEnd" | "bottom" | "bottomStart" | "bottomEnd";
175
+ /**
176
+ * @see DropdownMenu — Ant Design `trigger`: the gestures that open the menu, as an array because
177
+ * more than one may be live at once (`['click', 'contextMenu']` is a row that opens from its kebab
178
+ * AND from a right click anywhere on it).
179
+ *
180
+ * Default `['click']`, NOT antd's `['hover']`: a menu button that opens on hover is a pointer-only
181
+ * affordance by default, and every consumer of this library today opens on click.
182
+ *
183
+ * `contextMenu` opens at the pointer and suppresses the browser's own menu. It is what replaced the
184
+ * deleted `ContextMenu` component (v23) — antd has no such component either, and expresses the
185
+ * whole idea as this value.
186
+ *
187
+ * Whatever the array says, the KEYBOARD opener stays wired: Enter / Space / ArrowDown on the
188
+ * trigger for `click` and `hover`, and Shift+F10 / the ContextMenu key for `contextMenu`. A gesture
189
+ * list can therefore never produce a menu that only a mouse can reach (WCAG 2.1.1).
190
+ */
191
+ export type DropdownMenuTriggerActionProp = "click" | "hover" | "contextMenu";
175
192
  export type StepStatusProp = "wait" | "process" | "finish" | "error";
176
193
  /** @see StepItem */
177
194
  export type StepItemProp = {
@@ -1259,6 +1259,16 @@ export declare const COMPONENT_PROP_REGISTRY: {
1259
1259
  readonly file: "components/data-entry.prop.ts";
1260
1260
  readonly vocabulary: readonly [];
1261
1261
  };
1262
+ readonly SliderMarkProp: {
1263
+ readonly group: "data-entry";
1264
+ readonly file: "components/data-entry.prop.ts";
1265
+ readonly vocabulary: readonly [];
1266
+ };
1267
+ readonly SliderRangeConfigProp: {
1268
+ readonly group: "data-entry";
1269
+ readonly file: "components/data-entry.prop.ts";
1270
+ readonly vocabulary: readonly [];
1271
+ };
1262
1272
  readonly ControlCountProp: {
1263
1273
  readonly group: "data-entry";
1264
1274
  readonly file: "components/data-entry.prop.ts";
@@ -1353,6 +1363,54 @@ export declare const COMPONENT_PROP_REGISTRY: {
1353
1363
  readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "EmptyMessageProp", "DisabledProp", "NameProp", "IdProp", "ClassNameProp", "OpenProp", "OnOpenChangeProp", "SizeProp", "DefaultOpenProp", "ControlStatusProp", "ControlVariantProp", "AllowClearProp", "NotFoundContentProp", "PopupMatchWidthProp", "PendingProp"];
1354
1364
  readonly note: "Internal — the searchable engine behind `<Select options showSearch>` (not public API); use Select.";
1355
1365
  };
1366
+ readonly SelectFieldNamesProp: {
1367
+ readonly group: "data-entry";
1368
+ readonly file: "components/data-entry.prop.ts";
1369
+ readonly vocabulary: readonly ["LabelProp", "ValueProp", "DisabledProp"];
1370
+ readonly note: "antd `fieldNames` for `<Select options>` — the spelling Cascader and TreeSelect already take.";
1371
+ };
1372
+ readonly SelectOptionGroupProp: {
1373
+ readonly group: "data-entry";
1374
+ readonly file: "components/data-entry.prop.ts";
1375
+ readonly vocabulary: readonly ["LabelProp", "DisabledProp"];
1376
+ readonly note: "antd's nested option GROUP (`{ label, options }`); flattens to the `group` a flat row carries.";
1377
+ };
1378
+ readonly SelectOptionInputProp: {
1379
+ readonly group: "data-entry";
1380
+ readonly file: "components/data-entry.prop.ts";
1381
+ readonly vocabulary: readonly [];
1382
+ readonly note: "What `<Select options>` accepts: a row, a group, or a foreign row read through `fieldNames`.";
1383
+ };
1384
+ readonly SelectLabeledValueProp: {
1385
+ readonly group: "data-entry";
1386
+ readonly file: "components/data-entry.prop.ts";
1387
+ readonly vocabulary: readonly ["ValueProp", "LabelProp"];
1388
+ readonly note: "antd `labelInValue` — the value carries its own label for a screen with no option list yet.";
1389
+ };
1390
+ readonly SelectPlacementProp: {
1391
+ readonly group: "data-entry";
1392
+ readonly file: "components/data-entry.prop.ts";
1393
+ readonly vocabulary: readonly [];
1394
+ readonly note: "antd `placement` on the LOGICAL inline axis, as DropdownMenuPlacementProp already spells it.";
1395
+ };
1396
+ readonly SelectShowSearchProp: {
1397
+ readonly group: "data-entry";
1398
+ readonly file: "components/data-entry.prop.ts";
1399
+ readonly vocabulary: readonly ["OnSearchChangeProp"];
1400
+ readonly note: "antd `showSearch`'s object form. `filterOption(input, option)` here takes antd's argument order.";
1401
+ };
1402
+ readonly SelectLabelInValueSingleProp: {
1403
+ readonly group: "data-entry";
1404
+ readonly file: "components/data-entry.prop.ts";
1405
+ readonly vocabulary: readonly ["ValueProp", "DefaultValueProp", "OnValueChangeProp"];
1406
+ readonly note: "Internal — the `labelInValue` single shape of `<Select options>`; use Select.";
1407
+ };
1408
+ readonly SelectLabelInValueMultipleProp: {
1409
+ readonly group: "data-entry";
1410
+ readonly file: "components/data-entry.prop.ts";
1411
+ readonly vocabulary: readonly ["ValueProp", "DefaultValueProp", "OnValueChangeProp", "MaxTagCountProp", "MaxTagPlaceholderProp"];
1412
+ readonly note: "Internal — the `labelInValue` multiple/tags shape of `<Select options>`; use Select.";
1413
+ };
1356
1414
  readonly SelectDataProp: {
1357
1415
  readonly group: "data-entry";
1358
1416
  readonly file: "components/data-entry.prop.ts";
@@ -1922,6 +1980,11 @@ export declare const COMPONENT_PROP_REGISTRY: {
1922
1980
  readonly file: "components/navigation.prop.ts";
1923
1981
  readonly vocabulary: readonly [];
1924
1982
  };
1983
+ readonly DropdownMenuTriggerActionProp: {
1984
+ readonly group: "navigation";
1985
+ readonly file: "components/navigation.prop.ts";
1986
+ readonly vocabulary: readonly [];
1987
+ };
1925
1988
  readonly PaginationAlignProp: {
1926
1989
  readonly group: "navigation";
1927
1990
  readonly file: "components/navigation.prop.ts";
@@ -1420,6 +1420,16 @@ const COMPONENT_PROP_REGISTRY = {
1420
1420
  file: "components/data-entry.prop.ts",
1421
1421
  vocabulary: []
1422
1422
  },
1423
+ SliderMarkProp: {
1424
+ group: "data-entry",
1425
+ file: "components/data-entry.prop.ts",
1426
+ vocabulary: []
1427
+ },
1428
+ SliderRangeConfigProp: {
1429
+ group: "data-entry",
1430
+ file: "components/data-entry.prop.ts",
1431
+ vocabulary: []
1432
+ },
1423
1433
  ControlCountProp: {
1424
1434
  group: "data-entry",
1425
1435
  file: "components/data-entry.prop.ts",
@@ -1564,6 +1574,60 @@ const COMPONENT_PROP_REGISTRY = {
1564
1574
  ],
1565
1575
  note: "Internal \u2014 the searchable engine behind `<Select options showSearch>` (not public API); use Select."
1566
1576
  },
1577
+ SelectFieldNamesProp: {
1578
+ group: "data-entry",
1579
+ file: "components/data-entry.prop.ts",
1580
+ vocabulary: ["LabelProp", "ValueProp", "DisabledProp"],
1581
+ note: "antd `fieldNames` for `<Select options>` \u2014 the spelling Cascader and TreeSelect already take."
1582
+ },
1583
+ SelectOptionGroupProp: {
1584
+ group: "data-entry",
1585
+ file: "components/data-entry.prop.ts",
1586
+ vocabulary: ["LabelProp", "DisabledProp"],
1587
+ note: "antd's nested option GROUP (`{ label, options }`); flattens to the `group` a flat row carries."
1588
+ },
1589
+ SelectOptionInputProp: {
1590
+ group: "data-entry",
1591
+ file: "components/data-entry.prop.ts",
1592
+ vocabulary: [],
1593
+ note: "What `<Select options>` accepts: a row, a group, or a foreign row read through `fieldNames`."
1594
+ },
1595
+ SelectLabeledValueProp: {
1596
+ group: "data-entry",
1597
+ file: "components/data-entry.prop.ts",
1598
+ vocabulary: ["ValueProp", "LabelProp"],
1599
+ note: "antd `labelInValue` \u2014 the value carries its own label for a screen with no option list yet."
1600
+ },
1601
+ SelectPlacementProp: {
1602
+ group: "data-entry",
1603
+ file: "components/data-entry.prop.ts",
1604
+ vocabulary: [],
1605
+ note: "antd `placement` on the LOGICAL inline axis, as DropdownMenuPlacementProp already spells it."
1606
+ },
1607
+ SelectShowSearchProp: {
1608
+ group: "data-entry",
1609
+ file: "components/data-entry.prop.ts",
1610
+ vocabulary: ["OnSearchChangeProp"],
1611
+ note: "antd `showSearch`'s object form. `filterOption(input, option)` here takes antd's argument order."
1612
+ },
1613
+ SelectLabelInValueSingleProp: {
1614
+ group: "data-entry",
1615
+ file: "components/data-entry.prop.ts",
1616
+ vocabulary: ["ValueProp", "DefaultValueProp", "OnValueChangeProp"],
1617
+ note: "Internal \u2014 the `labelInValue` single shape of `<Select options>`; use Select."
1618
+ },
1619
+ SelectLabelInValueMultipleProp: {
1620
+ group: "data-entry",
1621
+ file: "components/data-entry.prop.ts",
1622
+ vocabulary: [
1623
+ "ValueProp",
1624
+ "DefaultValueProp",
1625
+ "OnValueChangeProp",
1626
+ "MaxTagCountProp",
1627
+ "MaxTagPlaceholderProp"
1628
+ ],
1629
+ note: "Internal \u2014 the `labelInValue` multiple/tags shape of `<Select options>`; use Select."
1630
+ },
1567
1631
  SelectDataProp: {
1568
1632
  group: "data-entry",
1569
1633
  file: "components/data-entry.prop.ts",
@@ -2224,6 +2288,11 @@ const COMPONENT_PROP_REGISTRY = {
2224
2288
  file: "components/navigation.prop.ts",
2225
2289
  vocabulary: []
2226
2290
  },
2291
+ DropdownMenuTriggerActionProp: {
2292
+ group: "navigation",
2293
+ file: "components/navigation.prop.ts",
2294
+ vocabulary: []
2295
+ },
2227
2296
  PaginationAlignProp: {
2228
2297
  group: "navigation",
2229
2298
  file: "components/navigation.prop.ts",