@tensor_1/react 2.31.0 → 2.33.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 (117) hide show
  1. package/README.md +367 -0
  2. package/dist/SchedulingCalendar-C4XVbqZr.d.ts +339 -0
  3. package/dist/attachment-labels.d.ts +16 -0
  4. package/dist/attachment-labels.js +9 -0
  5. package/dist/calendar-model.d.ts +141 -1
  6. package/dist/calendar-model.js +200 -11
  7. package/dist/chart-preset.cjs +127 -7
  8. package/dist/chart-preset.d.cts +2 -2
  9. package/dist/chart-preset.d.ts +1 -0
  10. package/dist/chart-preset.js +6 -1
  11. package/dist/chart-theme-Cl0IrkKQ.d.cts +112 -0
  12. package/dist/chart-theme.d.ts +51 -0
  13. package/dist/chart-theme.js +99 -0
  14. package/dist/chart.cjs +127 -7
  15. package/dist/chart.d.cts +2 -2
  16. package/dist/chart.d.ts +1 -0
  17. package/dist/chart.js +6 -2
  18. package/dist/components/Alert.d.ts +17 -1
  19. package/dist/components/Alert.js +9 -4
  20. package/dist/components/AlertDismiss.d.ts +14 -0
  21. package/dist/components/AlertDismiss.js +11 -0
  22. package/dist/components/Attachment.d.ts +15 -12
  23. package/dist/components/Attachment.js +17 -17
  24. package/dist/components/AttachmentParts.d.ts +24 -0
  25. package/dist/components/AttachmentParts.js +20 -0
  26. package/dist/components/Chart.d.ts +1 -0
  27. package/dist/components/Chart.js +6 -1
  28. package/dist/components/ChartCore.d.ts +6 -1
  29. package/dist/components/ChartCore.js +23 -5
  30. package/dist/components/Chip.d.ts +17 -2
  31. package/dist/components/Chip.js +35 -11
  32. package/dist/components/ChipRemove.d.ts +17 -0
  33. package/dist/components/ChipRemove.js +13 -0
  34. package/dist/components/CollapsibleParts.d.ts +29 -0
  35. package/dist/components/CollapsibleParts.js +20 -0
  36. package/dist/components/CollapsibleSection.d.ts +30 -3
  37. package/dist/components/CollapsibleSection.js +7 -11
  38. package/dist/components/CollapsibleSectionState.d.ts +1 -1
  39. package/dist/components/CollapsibleSectionState.js +54 -27
  40. package/dist/components/DashboardGrid.d.ts +60 -0
  41. package/dist/components/DashboardGrid.js +40 -0
  42. package/dist/components/DateRangePicker.d.ts +7 -1
  43. package/dist/components/DateRangePicker.js +5 -1
  44. package/dist/components/DescriptionList.d.ts +12 -1
  45. package/dist/components/DescriptionList.js +5 -5
  46. package/dist/components/Dialogs.d.ts +24 -3
  47. package/dist/components/Dialogs.js +74 -16
  48. package/dist/components/FileUpload.d.ts +10 -2
  49. package/dist/components/FileUpload.js +10 -4
  50. package/dist/components/FilterEditor.d.ts +4 -0
  51. package/dist/components/FilterEditor.js +13 -2
  52. package/dist/components/Heartbeat.d.ts +31 -0
  53. package/dist/components/Heartbeat.js +28 -0
  54. package/dist/components/Menu.d.ts +53 -5
  55. package/dist/components/Menu.js +104 -4
  56. package/dist/components/Meter.d.ts +7 -3
  57. package/dist/components/Meter.js +2 -1
  58. package/dist/components/Popover.d.ts +21 -2
  59. package/dist/components/Popover.js +94 -17
  60. package/dist/components/Prose.d.ts +6 -2
  61. package/dist/components/Prose.js +1 -1
  62. package/dist/components/RuleBuilder.d.ts +52 -4
  63. package/dist/components/RuleBuilder.js +109 -24
  64. package/dist/components/SchedulingCalendar.d.ts +4 -110
  65. package/dist/components/SchedulingCalendar.js +299 -63
  66. package/dist/components/SchedulingTimeGrid.d.ts +4 -0
  67. package/dist/components/SchedulingTimeGrid.js +521 -0
  68. package/dist/components/SchedulingTimeline.d.ts +2 -1
  69. package/dist/components/Segmented.d.ts +17 -3
  70. package/dist/components/Segmented.js +59 -5
  71. package/dist/components/Select.d.ts +66 -2
  72. package/dist/components/Select.js +800 -10
  73. package/dist/components/Spinner.d.ts +2 -1
  74. package/dist/components/Spinner.js +1 -1
  75. package/dist/components/StatusPill.d.ts +8 -2
  76. package/dist/components/StatusPill.js +2 -2
  77. package/dist/components/Steps.d.ts +28 -4
  78. package/dist/components/Steps.js +46 -16
  79. package/dist/components/TableControls.js +4 -3
  80. package/dist/components/Tabs.d.ts +7 -2
  81. package/dist/components/Tabs.js +14 -1
  82. package/dist/components/TextDiff.d.ts +49 -0
  83. package/dist/components/TextDiff.js +124 -0
  84. package/dist/{emoji-image-6mPZ15Zy.d.cts → emoji-image-DjCKpdwE.d.cts} +1 -1
  85. package/dist/emoji.cjs +169 -27
  86. package/dist/emoji.d.cts +3 -3
  87. package/dist/file-model.d.ts +22 -3
  88. package/dist/file-model.js +6 -4
  89. package/dist/filter-model.d.ts +26 -2
  90. package/dist/filter-model.js +13 -1
  91. package/dist/hooks/useAnchoredPosition.d.ts +24 -1
  92. package/dist/hooks/useAnchoredPosition.js +58 -8
  93. package/dist/hooks/useVirtualRows.d.ts +17 -2
  94. package/dist/hooks/useVirtualRows.js +6 -5
  95. package/dist/icons/Icon.d.ts +14 -14
  96. package/dist/index.cjs +4888 -1714
  97. package/dist/index.d.cts +1871 -658
  98. package/dist/index.d.ts +16 -9
  99. package/dist/index.js +67 -4
  100. package/dist/labels-context.d.ts +29 -1
  101. package/dist/{overlay-position-Cjv5E7mn.d.cts → overlay-position-2Afke51l.d.cts} +20 -0
  102. package/dist/overlay-position.d.ts +20 -0
  103. package/dist/overlay-position.js +17 -2
  104. package/dist/rich-text.cjs +169 -27
  105. package/dist/rich-text.d.cts +3 -3
  106. package/dist/rule-builder-model.d.ts +34 -2
  107. package/dist/rule-builder-model.js +48 -12
  108. package/dist/scheduling-calendar-model.d.ts +169 -0
  109. package/dist/scheduling-calendar-model.js +176 -0
  110. package/dist/select-model.d.ts +80 -0
  111. package/dist/select-model.js +109 -0
  112. package/dist/table-engine.d.ts +7 -0
  113. package/dist/table-engine.js +2 -1
  114. package/dist/text-diff-model.d.ts +71 -0
  115. package/dist/text-diff-model.js +261 -0
  116. package/package.json +1 -1
  117. package/dist/ChartCore-DzWe10bN.d.cts +0 -59
@@ -1,9 +1,73 @@
1
1
  import * as react from 'react';
2
- import { SelectHTMLAttributes } from 'react';
2
+ import { SelectHTMLAttributes, ReactNode } from 'react';
3
+ import { Placement } from '../overlay-position.js';
4
+ import { SelectOption, SelectGroup } from '../select-model.js';
3
5
 
6
+ /** Chrome strings of `Select`; `{count}` is replaced where noted. */
7
+ interface SelectLabels {
8
+ /** Accessible name of the filter field when the Select has no label of its own. */
9
+ search: string;
10
+ /** Placeholder of the filter field. */
11
+ searchPlaceholder: string;
12
+ loading: string;
13
+ /** No options at all. */
14
+ empty: string;
15
+ /** A filter matched nothing. */
16
+ noMatches: string;
17
+ /** Async `loadOptions` failed. */
18
+ error: string;
19
+ retry: string;
20
+ /** Multi-select: clears every value. */
21
+ clear: string;
22
+ /** Multi-select on a phone: closes the sheet. */
23
+ done: string;
24
+ /** Multi-select trigger, spoken after the "+N". `{count}` = how many are selected. */
25
+ selectedCount: string;
26
+ /** Announced after filtering. `{count}`. */
27
+ results: string;
28
+ }
4
29
  interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
5
30
  size?: 'sm' | 'md';
31
+ /** The options as data, instead of `<option>` / `<optgroup>` children. */
32
+ options?: readonly (SelectOption | SelectGroup)[];
33
+ /**
34
+ * Called with the new value: a string, or every selected value with `multiple`. `option` is the
35
+ * option that was chosen or toggled. `onChange(e)` still fires as on a native select.
36
+ */
37
+ onValueChange?: (value: string | string[], option?: SelectOption) => void;
38
+ /** Shown while nothing is selected. Also makes "nothing" the starting value (and `required` checks it). */
39
+ placeholder?: string;
40
+ /** Marks the control invalid (`aria-invalid`), e.g. from your own validation. */
41
+ invalid?: boolean;
42
+ /** Shows and submits the value, but does not open. */
43
+ readOnly?: boolean;
44
+ /** A filter field at the top of the list. `'auto'` adds it for more than 12 options. Default `false`. */
45
+ searchable?: boolean | 'auto';
46
+ /**
47
+ * Load the options when the list opens (and, when `searchable`, as the filter changes). The
48
+ * previous request's `signal` is aborted when a newer one starts or the list closes. Pass the
49
+ * selected option in `options` so its label shows before the first load.
50
+ */
51
+ loadOptions?: (query: string, signal: AbortSignal) => Promise<readonly (SelectOption | SelectGroup)[]>;
52
+ /** Draw an option's content (the check mark for the selected state is drawn for you). */
53
+ renderOption?: (option: SelectOption, state: {
54
+ selected: boolean;
55
+ active: boolean;
56
+ }) => ReactNode;
57
+ /** Draw the trigger's content for the selected option(s). */
58
+ renderValue?: (selected: readonly SelectOption[]) => ReactNode;
59
+ /** Preferred side of the list. Default `'bottom-start'`; it flips when there is no room. */
60
+ placement?: Placement;
61
+ labels?: Partial<SelectLabels>;
6
62
  }
63
+ /**
64
+ * A select that draws its own list (HAR-1572): the WAI-ARIA APG select-only combobox — focus
65
+ * stays on the trigger, `aria-activedescendant` marks the active option — in a top-layer popover
66
+ * placed with `useAnchoredPosition`, or a bottom sheet on a phone. A visually hidden native
67
+ * `<select>` carries `name`, `required`, `form`, `multiple` and the value, so `<option>` children,
68
+ * `onChange(e)` with `e.target.value`, FormData, `form.reset()`, `ref` and react-hook-form keep
69
+ * working; `ref` points at that select.
70
+ */
7
71
  declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
8
72
 
9
- export { Select, type SelectProps };
73
+ export { Select, SelectGroup, type SelectLabels, SelectOption, type SelectProps };