@iress-oss/ids-components 0.0.1-dev.2 → 0.0.1-dev.20

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 (239) hide show
  1. package/README.md +1 -1
  2. package/dist/{AutocompleteNoResults-ImNh0dmJ.js → AutocompleteNoResults-CogA3XZs.js} +1 -1
  3. package/dist/{ComboboxHiddenInput-BVhoQtv3.js → ComboboxHiddenInput-gTOjjF3f.js} +5 -5
  4. package/dist/{FieldAppendToLabel-CY2e0YuF.js → FieldAppendToLabel-DCv5E5th.js} +13 -11
  5. package/dist/{InputBase-LsLk3nX1.js → InputBase-BFK9n82f.js} +1 -1
  6. package/dist/Loading.module-g2pe-Gfx.js +13 -0
  7. package/dist/LoadingSuspense-BwlrIicY.js +5773 -0
  8. package/dist/LogoFromSrc-BnImWqt6.js +59 -0
  9. package/dist/MenuItem.module-BxcFZeSh.js +24 -0
  10. package/dist/Popover.module-BKrF_xRW.js +11 -0
  11. package/dist/PopoverProvider-d3hhpW2k.js +142 -0
  12. package/dist/{SelectControl-BJo08wJN.js → SelectControl-D1SJlplM.js} +1 -1
  13. package/dist/SlideoutProvider-CQh140HM.js +200 -0
  14. package/dist/{SliderTicks-MkaJGb9A.js → SliderTicks-DQN0Ka4d.js} +1 -1
  15. package/dist/TabSet.module-FRUnHgA1.js +13 -0
  16. package/dist/Table.module-r-RfIeLI.js +32 -0
  17. package/dist/components/Alert/Alert.js +1 -1
  18. package/dist/components/Alert/index.js +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.js +8 -6
  20. package/dist/components/Autocomplete/components/AutocompleteInstructions.js +12 -0
  21. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
  22. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +160 -95
  23. package/dist/components/Autocomplete/index.js +1 -1
  24. package/dist/components/Badge/Badge.js +4 -4
  25. package/dist/components/Button/Button.js +2 -2
  26. package/dist/components/Button/CloseButton/CloseButton.js +1 -1
  27. package/dist/components/Button/index.js +1 -1
  28. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  29. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
  30. package/dist/components/ButtonGroup/index.js +1 -1
  31. package/dist/components/Checkbox/Checkbox.js +1 -1
  32. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
  33. package/dist/components/Checkbox/index.js +1 -1
  34. package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
  35. package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
  36. package/dist/components/Combobox/Combobox.js +7 -5
  37. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +7 -5
  38. package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
  39. package/dist/components/Combobox/components/ComboboxResults.js +8 -6
  40. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +6 -4
  41. package/dist/components/Combobox/index.js +1 -1
  42. package/dist/components/Expander/Expander.js +1 -1
  43. package/dist/components/Field/Field.js +1 -1
  44. package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
  45. package/dist/components/Field/components/FieldAppendToLabel.js +7 -5
  46. package/dist/components/Filter/Filter.js +7 -5
  47. package/dist/components/Filter/components/FilterResetButton.js +6 -4
  48. package/dist/components/Filter/components/FilterSearch.js +6 -4
  49. package/dist/components/Filter/index.js +1 -1
  50. package/dist/components/Form/Form.js +1 -1
  51. package/dist/components/Form/FormField/FormField.js +45 -39
  52. package/dist/components/Form/FormField/FormFieldset.js +13 -11
  53. package/dist/components/Form/HookForm/HookForm.js +1 -1
  54. package/dist/components/Form/index.js +1 -1
  55. package/dist/components/Hide/Hide.js +1 -1
  56. package/dist/components/Hide/helpers/composeHideClasses.js +7 -5
  57. package/dist/components/Hide/index.js +1 -1
  58. package/dist/components/Icon/Icon.js +6 -4
  59. package/dist/components/Icon/index.js +1 -1
  60. package/dist/components/Inline/Inline.js +6 -4
  61. package/dist/components/Inline/index.js +1 -1
  62. package/dist/components/Input/ClearButton/ClearButton.js +1 -1
  63. package/dist/components/Input/Input.js +2 -2
  64. package/dist/components/Input/InputBase/InputBase.js +1 -1
  65. package/dist/components/Input/index.js +1 -1
  66. package/dist/components/InputCurrency/InputCurrency.js +1 -1
  67. package/dist/components/InputCurrency/index.js +1 -1
  68. package/dist/components/Label/LabelBase/LabelBase.js +1 -1
  69. package/dist/components/Menu/Menu.js +1 -1
  70. package/dist/components/Menu/MenuDivider/MenuDivider.js +6 -4
  71. package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
  72. package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
  73. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
  74. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
  75. package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +41 -41
  76. package/dist/components/Menu/MenuText/MenuText.js +7 -5
  77. package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
  78. package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
  79. package/dist/components/Menu/index.js +1 -1
  80. package/dist/components/Modal/Modal.js +2 -2
  81. package/dist/components/Modal/hooks/useModal.js +17 -14
  82. package/dist/components/Modal/index.js +1 -1
  83. package/dist/components/Navbar/Navbar.js +2 -2
  84. package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
  85. package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
  86. package/dist/components/Navbar/components/NavbarLogo.js +2 -2
  87. package/dist/components/Navbar/index.js +1 -1
  88. package/dist/components/Placeholder/Placeholder.js +1 -1
  89. package/dist/components/Popover/InputPopover/InputPopover.js +36 -34
  90. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
  91. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +72 -66
  92. package/dist/components/Popover/Popover.js +32 -30
  93. package/dist/components/Popover/PopoverProvider.js +13 -111
  94. package/dist/components/Popover/components/NestedPopoverActivator.js +9 -0
  95. package/dist/components/Popover/components/PopoverActivator.js +40 -41
  96. package/dist/components/Popover/components/PopoverContent.js +15 -15
  97. package/dist/components/Popover/helpers/composeFloatingProps.js +26 -22
  98. package/dist/components/Popover/helpers/handlePopoverTabKey.js +16 -13
  99. package/dist/components/Popover/helpers/waitUntilTrue.js +12 -0
  100. package/dist/components/Popover/hooks/usePopover.js +1 -1
  101. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +25 -17
  102. package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
  103. package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
  104. package/dist/components/Progress/Progress.js +1 -1
  105. package/dist/components/Provider/Provider.js +38 -0
  106. package/dist/components/Provider/index.js +4 -0
  107. package/dist/components/Radio/Radio.js +1 -1
  108. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
  109. package/dist/components/Radio/index.js +1 -1
  110. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  111. package/dist/components/Readonly/Readonly.js +7 -5
  112. package/dist/components/Readonly/index.js +1 -1
  113. package/dist/components/RichSelect/RichSelect.js +6 -4
  114. package/dist/components/RichSelect/SelectBody/SelectBody.js +7 -5
  115. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +11 -9
  116. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +6 -4
  117. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
  118. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +6 -4
  119. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +6 -4
  120. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +5 -3
  121. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
  122. package/dist/components/RichSelect/SelectTags/SelectTags.js +5 -3
  123. package/dist/components/RichSelect/components/SelectActivator.js +1 -1
  124. package/dist/components/RichSelect/components/SelectOptions.js +6 -4
  125. package/dist/components/RichSelect/index.js +1 -1
  126. package/dist/components/Row/Row.js +6 -4
  127. package/dist/components/Row/index.js +1 -1
  128. package/dist/components/Select/Select.js +2 -2
  129. package/dist/components/Select/components/SelectControl.js +1 -1
  130. package/dist/components/Select/components/SelectReadonly.js +6 -4
  131. package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
  132. package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
  133. package/dist/components/Select/index.js +1 -1
  134. package/dist/components/Skeleton/Skeleton.js +2 -2
  135. package/dist/components/SkipLink/SkipLink.js +1 -1
  136. package/dist/components/Slideout/Slideout.js +5 -3
  137. package/dist/components/Slideout/SlideoutProvider.js +6 -89
  138. package/dist/components/Slideout/components/SlideoutInner.js +3 -2
  139. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +1 -1
  140. package/dist/components/Slideout/hooks/useSlideout.js +17 -14
  141. package/dist/components/Slideout/index.js +7 -7
  142. package/dist/components/Slider/Slider.js +2 -2
  143. package/dist/components/Slider/components/SliderTicks.js +1 -1
  144. package/dist/components/Slider/index.js +1 -1
  145. package/dist/components/Spinner/Spinner.js +1 -1
  146. package/dist/components/Spinner/index.js +1 -1
  147. package/dist/components/TabSet/Tab/Tab.js +74 -62
  148. package/dist/components/TabSet/TabSet.js +2 -2
  149. package/dist/components/TabSet/components/TabSetItem.js +2 -2
  150. package/dist/components/Table/Table.js +4 -3
  151. package/dist/components/Table/TableBody/TableBody.js +2 -2
  152. package/dist/components/Table/TableProvider.js +29 -25
  153. package/dist/components/Table/components/TableEmpty.js +1 -1
  154. package/dist/components/Table/components/TableHeader.js +2 -2
  155. package/dist/components/Table/components/TableHeaderCell.js +2 -2
  156. package/dist/components/Table/components/TableRows.js +1 -1
  157. package/dist/components/Table/components/TableSortButton.js +2 -2
  158. package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +5 -5
  159. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
  160. package/dist/components/Table/index.js +1 -1
  161. package/dist/components/Tag/Tag.js +1 -1
  162. package/dist/components/Tag/TagInput/TagInput.js +1 -1
  163. package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
  164. package/dist/components/Tag/index.js +1 -1
  165. package/dist/components/Toaster/Toast/Toast.js +1 -1
  166. package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
  167. package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
  168. package/dist/components/Toaster/Toaster.js +3 -3
  169. package/dist/components/Toaster/ToasterProvider.js +1 -1
  170. package/dist/components/Toaster/hooks/useToaster.js +24 -3
  171. package/dist/components/Toaster/index.js +11 -10
  172. package/dist/components/Toggle/Toggle.js +3 -3
  173. package/dist/components/Tooltip/Tooltip.js +18 -18
  174. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
  175. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
  176. package/dist/constants.js +11 -11
  177. package/dist/{floating-ui.react-D_ysmiM3.js → floating-ui.react-nmA48tb2.js} +1055 -1034
  178. package/dist/helpers/dom/closestCrossShadow.js +26 -0
  179. package/dist/helpers/dom/domUtils.js +12 -0
  180. package/dist/helpers/formatting/formatDateTime.js +21 -16
  181. package/dist/helpers/label-value/highlightQueryInLabelValue.js +6 -5
  182. package/dist/{index-CmsyHM_3.js → index-BQfnxwrU.js} +2 -2
  183. package/dist/{index-CtOScEKX.js → index-Dms7F5NM.js} +8 -8
  184. package/dist/main.js +185 -181
  185. package/dist/patterns/Loading/Loading.js +1 -1
  186. package/dist/patterns/Loading/LoadingSuspense.js +5 -49
  187. package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
  188. package/dist/patterns/Loading/components/DefaultLoading.js +2 -2
  189. package/dist/patterns/Loading/components/LongLoading.js +2 -2
  190. package/dist/patterns/Loading/components/PageLoading.js +2 -2
  191. package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
  192. package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
  193. package/dist/patterns/Loading/index.js +3 -2
  194. package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +38 -0
  195. package/dist/src/components/Autocomplete/components/AutocompleteInstructions.d.ts +2 -0
  196. package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +5 -1
  197. package/dist/src/components/Form/Form.types.d.ts +10 -1
  198. package/dist/src/components/Form/FormField/FormField.d.ts +1 -1
  199. package/dist/src/components/Form/FormField/FormField.types.d.ts +8 -2
  200. package/dist/src/components/Modal/Modal.types.d.ts +4 -0
  201. package/dist/src/components/Popover/Popover.types.d.ts +3 -1
  202. package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +5 -0
  203. package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +1 -1
  204. package/dist/src/components/Popover/helpers/waitUntilTrue.d.ts +1 -0
  205. package/dist/src/components/Provider/Provider.d.ts +20 -0
  206. package/dist/src/components/Provider/index.d.ts +1 -0
  207. package/dist/src/components/RichSelect/RichSelect.types.d.ts +27 -1
  208. package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
  209. package/dist/src/components/RichSelect/components/SelectOptions.d.ts +4 -2
  210. package/dist/src/components/Slideout/Slideout.types.d.ts +5 -1
  211. package/dist/src/components/Table/Table.d.ts +7 -6
  212. package/dist/src/components/Table/Table.types.d.ts +10 -1
  213. package/dist/src/components/Table/TableProvider.d.ts +5 -2
  214. package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
  215. package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
  216. package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
  217. package/dist/src/constants.d.ts +7 -7
  218. package/dist/src/helpers/dom/closestCrossShadow.d.ts +9 -0
  219. package/dist/src/helpers/dom/domUtils.d.ts +5 -0
  220. package/dist/src/interfaces.d.ts +1 -0
  221. package/dist/src/main.d.ts +1 -0
  222. package/dist/src/patterns/Loading/LoadingSuspense.d.ts +1 -2
  223. package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
  224. package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +1 -0
  225. package/dist/src/patterns/Loading/index.d.ts +1 -0
  226. package/dist/style.css +1 -1
  227. package/dist/{useIDSButtonGroupItem-Y0ZSkNW8.js → useIDSButtonGroupItem-VfKx4O-O.js} +1 -1
  228. package/dist/vitest.config.d.ts +2 -0
  229. package/package.json +16 -28
  230. package/dist/Loading-rKDsRTjZ.js +0 -5638
  231. package/dist/Loading.module-C58kTwE4.js +0 -13
  232. package/dist/LogoFromSrc-KxC2Gztm.js +0 -59
  233. package/dist/MenuItem.module-3aqP1ZMw.js +0 -24
  234. package/dist/Popover.module-CLIdWyZD.js +0 -11
  235. package/dist/TabSet.module-DGDICWMf.js +0 -13
  236. package/dist/Table.module-Co33h7CZ.js +0 -32
  237. package/dist/components/Autocomplete/hooks/useAutocompleteFlags.js +0 -16
  238. package/dist/src/components/Autocomplete/hooks/useAutocompleteFlags.d.ts +0 -5
  239. /package/dist/{setupTests.d.ts → vitest.setup.d.ts} +0 -0
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
- import { af as d } from "../../../Loading-rKDsRTjZ.js";
2
+ import { af as d } from "../../../LoadingSuspense-BwlrIicY.js";
3
3
  import "../../../index-2QXL0WYc.js";
4
4
  import "react";
5
5
  import "../../../components/Text/Text.js";
6
- import "../../../Loading.module-C58kTwE4.js";
6
+ import "../../../Loading.module-g2pe-Gfx.js";
7
7
  export {
8
8
  d as ValidateLoading
9
9
  };
@@ -1,4 +1,5 @@
1
- import { Q as s } from "../../Loading-rKDsRTjZ.js";
1
+ import { P as a, Q as o } from "../../LoadingSuspense-BwlrIicY.js";
2
2
  export {
3
- s as IressLoading
3
+ a as IressLoading,
4
+ o as IressLoadingSuspense
4
5
  };
@@ -56,6 +56,12 @@ export interface AutocompleteSearchHookProps {
56
56
  * Initial options data set, shown when the input is empty.
57
57
  */
58
58
  initialOptions?: LabelValueMeta[];
59
+ /**
60
+ * Minimum number of characters required before triggering async search. Only applies to searchable options (function).
61
+ * Below this threshold, no search will be triggered and no loading state will be shown.
62
+ * @default 1
63
+ */
64
+ minSearchLength?: number;
59
65
  /**
60
66
  * Options data set, shown when the input is not empty.
61
67
  */
@@ -91,6 +97,26 @@ export interface AutocompleteSearchHookReturn {
91
97
  * Stop the search.
92
98
  */
93
99
  stopSearch: () => void;
100
+ /**
101
+ * Whether to show "Type at least X characters to search" instruction.
102
+ * True when the query length is below the minimum search length.
103
+ */
104
+ shouldShowInstructions: boolean;
105
+ /**
106
+ * Whether to show nothing (clean, minimal) during debounce waiting period.
107
+ * True when user has typed enough characters but search hasn't started yet.
108
+ */
109
+ shouldShowDebounceWaiting: boolean;
110
+ /**
111
+ * Whether to show "No results found" message.
112
+ * True only after a legitimate search has been performed and returned empty results.
113
+ */
114
+ shouldShowNoResults: boolean;
115
+ /**
116
+ * Smart result calculation that handles all display scenarios.
117
+ * Returns the appropriate results based on current state.
118
+ */
119
+ displayResults: FormattedLabelValueMeta[];
94
120
  }
95
121
  export interface AutocompletePopoverProps extends Pick<IressInputPopoverProps, 'autoHighlight' | 'align' | 'className' | 'container' | 'contentClassName' | 'displayMode' | 'style'> {
96
122
  append?: ReactNode;
@@ -104,3 +130,15 @@ export interface AutocompleteNoResultsProps extends Pick<IressAutocompleteProps,
104
130
  noResults?: string;
105
131
  };
106
132
  }
133
+ export interface AutocompleteInstructionsProps {
134
+ /**
135
+ * The minimum number of characters required to search.
136
+ */
137
+ minSearchLength: number;
138
+ /**
139
+ * Pass a CSS module object to override styles.
140
+ */
141
+ styles?: {
142
+ instructions?: string;
143
+ };
144
+ }
@@ -0,0 +1,2 @@
1
+ import { AutocompleteInstructionsProps } from '../Autocomplete.types';
2
+ export declare const AutocompleteInstructions: ({ minSearchLength, styles, }: AutocompleteInstructionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,6 @@
1
1
  import { AutocompleteSearchHookProps, AutocompleteSearchHookReturn } from '../Autocomplete.types';
2
- export declare const useAutocompleteSearch: ({ debounceThreshold, initialOptions, options, query, }: AutocompleteSearchHookProps) => AutocompleteSearchHookReturn;
2
+ /**
3
+ * Advanced autocomplete search hook with debouncing and race condition protection
4
+ * Supports both sync array search and async function search
5
+ */
6
+ export declare const useAutocompleteSearch: ({ debounceThreshold, initialOptions, minSearchLength, options, query, }: AutocompleteSearchHookProps) => AutocompleteSearchHookReturn;
@@ -73,6 +73,12 @@ export interface IressHookFormProps<T extends FieldValues, TContext = object> ex
73
73
  * [Learn more](https://react-hook-form.com/docs/useform/formstate)
74
74
  */
75
75
  onValidChange?: (isValid: boolean) => void;
76
+ /**
77
+ * If set to `true`, the summary will only update when the form is submitted, not on every field change.
78
+ * This is useful for performance reasons, especially in large forms.
79
+ * @default false
80
+ */
81
+ updateErrorSummaryOnSubmit?: boolean;
76
82
  }
77
83
  export interface IressFormProps<T extends FieldValues, TContext = object> extends Partial<Omit<UseFormProps<T, TContext>, 'disabled' | 'errors'>>, Omit<IressHookFormProps<T, TContext>, 'form'> {
78
84
  /**
@@ -139,7 +145,10 @@ export interface IressFormProps<T extends FieldValues, TContext = object> extend
139
145
  */
140
146
  reValidateMode?: UseFormProps<T, TContext>['reValidateMode'];
141
147
  /**
142
- * When set to true (default), and the user submits a form that fails validation, focus is set on the first field with an error.
148
+ * When set to true, and the user submits a form that fails validation, focus is set on the first field with an error.
149
+ * By default, it is set based on the `hiddenErrorSummary` prop.
150
+ * - If hiddenErrorSummary is true, it will focus on the first field with an error.
151
+ * - If hiddenErrorSummary is false, it will focus on the error summary.
143
152
  *
144
153
  * [Learn more](https://react-hook-form.com/docs/useform#shouldFocusError)
145
154
  */
@@ -4,4 +4,4 @@ import { IressFormFieldProps } from './FormField.types';
4
4
  * A `IressField` wrapper that can show error message and label automatically inside an `IressForm`.
5
5
  * It uses the `useController` hook from `react-hook-form` for form management.
6
6
  */
7
- export declare const IressFormField: <TFieldValues extends FieldValues>({ control, defaultValue, name, render, rules: withCustomRules, shouldUnregister, readOnly, ...fieldProps }: IressFormFieldProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const IressFormField: <TFieldValues extends FieldValues>({ control: controlProp, defaultValue, name, render, rules: withCustomRules, shouldUnregister, readOnly, ...fieldProps }: IressFormFieldProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ export type CustomRules<T extends FieldValues = FieldValues> = UseControllerProp
11
11
  minDate?: Date | CustomRuleWithMessage<Date>;
12
12
  maxDate?: Date | CustomRuleWithMessage<Date>;
13
13
  };
14
- export interface IressFormFieldProps<T extends FieldValues = FieldValues, TName extends FieldPath<T> = FieldPath<T>> extends Omit<IressFieldProps, OmittedFieldProps>, Omit<UseControllerProps<T, FieldPath<T>>, 'disabled'> {
14
+ export interface IressFormFieldProps<T extends FieldValues = FieldValues, TName extends FieldPath<T> = FieldPath<T>> extends Omit<IressFieldProps, OmittedFieldProps>, Omit<UseControllerProps<T, FieldPath<T>>, 'disabled' | 'shouldUnregister'> {
15
15
  /**
16
16
  * React Hook Form control object. It is used to register the field with the form.
17
17
  * It is automatically provided when used inside an `IressForm`, but it can be overridden if you are using a custom form control.
@@ -41,10 +41,16 @@ export interface IressFormFieldProps<T extends FieldValues = FieldValues, TName
41
41
  rules?: CustomRules<T>;
42
42
  /**
43
43
  * Input will be unregistered after unmount and defaultValues will be removed as well (it will not be stored in the form state).
44
+ * You can pass an object to keep some form state available after unregistering, such as dirty fields.
44
45
  *
45
46
  * [Learn more](https://react-hook-form.com/docs/usecontroller)
46
47
  */
47
- shouldUnregister?: boolean;
48
+ shouldUnregister?: boolean | {
49
+ keepDirty?: boolean;
50
+ keepTouched?: boolean;
51
+ keepIsValid?: boolean;
52
+ keepError?: boolean;
53
+ };
48
54
  /**
49
55
  * Text to be displayed instead of input field.
50
56
  */
@@ -50,6 +50,10 @@ export interface IressModalProps extends IressHTMLAttributes {
50
50
  * Emitted when the modal has opened or closed internally. Use for controlled modals.
51
51
  */
52
52
  onShowChange?: (show: boolean) => void;
53
+ /**
54
+ * Emitted when the modal has mounted, unmounted, opened or closed. Open and close occur before animation begins.
55
+ */
56
+ onStatus?: (status: 'unmounted' | 'initial' | 'open' | 'close') => void;
53
57
  /**
54
58
  * Emitted when the modal has opened.
55
59
  */
@@ -142,6 +142,8 @@ export interface PopoverContextValue extends PopoverStateHookReturn, PopoverAria
142
142
  interactions: ReturnType<typeof useInteractions>;
143
143
  list: MutableRefObject<(HTMLElement | null)[]>;
144
144
  type?: PopoverTypes;
145
+ resetActiveIndex: () => void;
146
+ setActiveIndex: (value: number | null) => void;
145
147
  setShowWithReason: (flag: boolean, e?: Event, reason?: OpenChangeReason) => void;
146
148
  setVirtualFocus?: (node: PopoverVirtualNode | null) => void;
147
149
  }
@@ -152,7 +154,7 @@ export interface PopoverRef extends Pick<PopoverContextValue, 'setShow' | 'show'
152
154
  }
153
155
  export interface PopoverVirtualNode {
154
156
  onBlur?: React.KeyboardEventHandler<HTMLElement>;
155
- onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
157
+ onKeyDown?: (e: React.KeyboardEvent<HTMLElement>, popover?: PopoverContextValue) => void;
156
158
  }
157
159
  /** @deprecated PopoverType enum is now deprecated and will be removed in a future version. Please use the PopoverTypes type instead. **/
158
160
  export declare enum PopoverType {
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { PopoverContextValue } from '../Popover.types';
3
+ export declare const NestedPopoverActivator: ({ children, parentPopover, }: PropsWithChildren & {
4
+ parentPopover?: PopoverContextValue;
5
+ }) => string | number | boolean | Iterable<import('react').ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -5,4 +5,4 @@ import { KeyboardEvent } from 'react';
5
5
  * @param popover {PopoverContextValue} The popover context value, usually retrieved from the usePopover hook.
6
6
  * @param e {KeyboardEvent} The keyboard event object that triggered the tab key press.
7
7
  */
8
- export declare const handlePopoverTabKey: (popover: PopoverContextValue, e: KeyboardEvent) => void;
8
+ export declare const handlePopoverTabKey: (popover: PopoverContextValue, e: KeyboardEvent) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const waitUntilTrue: (condition: () => boolean, timeout?: number, interval?: number) => Promise<void>;
@@ -0,0 +1,20 @@
1
+ import { FloatingUIContainer } from '../../types';
2
+ import { ReactNode } from 'react';
3
+ import { IressToasterProviderProps } from '../Toaster';
4
+ import { IressSlideoutProviderProps } from '../Slideout';
5
+ export interface IressProviderProps extends Pick<IressSlideoutProviderProps, 'injectPushStyles'>, Pick<IressToasterProviderProps, 'position'> {
6
+ /**
7
+ * The contents of your application, and/or the components which will be calling slideouts, modals and toasts.
8
+ */
9
+ children?: ReactNode;
10
+ /**
11
+ * Container to render modal, slideouts and toasts into.
12
+ * If not provided, will render into the body of the document.
13
+ */
14
+ container?: FloatingUIContainer;
15
+ /**
16
+ * If you don't want to load the Iress Icon CSS from the CDN, set this to true.
17
+ */
18
+ noIcons?: boolean;
19
+ }
20
+ export declare const IressProvider: ({ children, container, injectPushStyles, noIcons, position, ...restProps }: IressProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Provider';
@@ -1,12 +1,18 @@
1
1
  import { AutocompleteSearchHookProps } from '../Autocomplete';
2
2
  import { FloatingUIAligns, FocusableElementRef, FormattedLabelValueMeta, FormElementWidths, IressPopoverProps, LabelValueMeta, PopoverRef, PopoverTypes } from '../../main';
3
3
  import { ChangeEvent, ForwardedRef, ReactElement, ReactNode } from 'react';
4
- export interface IressRichSelectProps extends Omit<AutocompleteSearchHookProps, 'query'>, Omit<IressPopoverProps, 'activator' | 'children' | 'contentClassName' | 'defaultShow' | 'defaultValue' | 'disabledAutoToggle' | 'onChange' | 'matchActivatorWidth' | 'show'> {
4
+ export interface IressRichSelectProps extends Omit<AutocompleteSearchHookProps, 'query'>, Omit<IressPopoverProps, 'activator' | 'children' | 'contentClassName' | 'defaultShow' | 'defaultValue' | 'disabledAutoToggle' | 'onChange' | 'show'> {
5
5
  /**
6
6
  * Sets the alignment of the dropdown relative to the activator element.
7
7
  * @default bottom-start
8
8
  */
9
9
  align?: FloatingUIAligns;
10
+ /**
11
+ * By default, the RichSelect will automatically highlight the first option in the list when it is opened.
12
+ * Set this to false to disable that behaviour.
13
+ * @default true
14
+ */
15
+ autoHighlight?: boolean;
10
16
  /**
11
17
  * Value of selected option for uncontrolled select.
12
18
  */
@@ -15,6 +21,13 @@ export interface IressRichSelectProps extends Omit<AutocompleteSearchHookProps,
15
21
  * Set to true if the user can select multiple options.
16
22
  */
17
23
  multiSelect?: boolean;
24
+ /**
25
+ * Whether the popover should match the width of the activator element.
26
+ * When true, the dropdown will have the same width as the select input.
27
+ * When false, the dropdown will size based on its content.
28
+ * @default true
29
+ */
30
+ matchActivatorWidth?: boolean;
18
31
  /**
19
32
  * Name of the select. Used to pass data when submitted within a form.
20
33
  */
@@ -59,6 +72,11 @@ export interface IressRichSelectProps extends Omit<AutocompleteSearchHookProps,
59
72
  * Completely customise the rendering of the select options.
60
73
  */
61
74
  renderOptions?: (props: SelectOptionsRenderProps) => ReactNode;
75
+ /**
76
+ * Render a custom footer below the default options display.
77
+ * If using `renderOptions`, this render prop will not be called.
78
+ */
79
+ renderOptionsFooter?: (props: SelectOptionsRenderProps) => ReactNode;
62
80
  /**
63
81
  * Whether its required. Will be passed to the hidden input.
64
82
  */
@@ -74,6 +92,14 @@ export interface IressRichSelectProps extends Omit<AutocompleteSearchHookProps,
74
92
  */
75
93
  width?: FormElementWidths;
76
94
  virtualFocus?: boolean;
95
+ /**
96
+ * Header showed in option panel when expanded.
97
+ */
98
+ header?: ReactNode;
99
+ /**
100
+ * Footer showed in option panel when expanded.
101
+ */
102
+ footer?: ReactNode;
77
103
  }
78
104
  export interface IressSelectActivatorProps {
79
105
  /**
@@ -1,2 +1,2 @@
1
1
  import { IressSelectMenuItemProps } from './SelectMenu.types';
2
- export declare const IressSelectMenuItem: ({ className, divider, formattedLabel, hiddenOnMobile, label, meta, value, ...restProps }: IressSelectMenuItemProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const IressSelectMenuItem: ({ className, divider, formattedLabel, formattedMeta, hiddenOnMobile, label, meta, value, append, canToggle, onClick, onKeyDown, prepend, role, selected, "data-testid": dataTestId, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id, }: IressSelectMenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  import { IressRichSelectProps, SelectOptionsRenderProps } from '../RichSelect.types';
2
- interface SelectOptionsProps extends Pick<IressRichSelectProps, 'multiSelect' | 'onChange' | 'options' | 'renderOptions' | 'value' | 'initialOptions'>, Omit<SelectOptionsRenderProps, 'close'> {
2
+ interface SelectOptionsProps extends Pick<IressRichSelectProps, 'autoHighlight' | 'minSearchLength' | 'multiSelect' | 'onChange' | 'options' | 'renderOptions' | 'renderOptionsFooter' | 'value' | 'initialOptions'>, Omit<SelectOptionsRenderProps, 'close'> {
3
3
  setShow: (show: boolean) => void;
4
+ shouldShowInstructions?: boolean;
5
+ shouldShowNoResults?: boolean;
4
6
  }
5
- export declare const SelectOptions: ({ debouncedQuery, error, initialOptions: initialOptionsProp, loading, multiSelect, onChange, options, query, renderOptions, results, setQuery, setShow, setValue, show, value, }: SelectOptionsProps) => string | number | boolean | Iterable<import('react').ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
7
+ export declare const SelectOptions: ({ autoHighlight, debouncedQuery, error, initialOptions: initialOptionsProp, loading, minSearchLength, multiSelect, onChange, options, query, renderOptions, renderOptionsFooter, results, setQuery, setShow, setValue, show, value, shouldShowInstructions, shouldShowNoResults, }: SelectOptionsProps) => string | number | boolean | Iterable<import('react').ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
6
8
  export {};
@@ -58,6 +58,10 @@ export interface IressSlideoutProps extends IressHTMLAttributes {
58
58
  * Use for controlled slideouts.
59
59
  */
60
60
  onShowChange?: (show: boolean, reason?: OpenChangeReason) => void;
61
+ /**
62
+ * Emitted when the slideout has mounted, unmounted, opened or closed. Open and close occur before animation begins.
63
+ */
64
+ onStatus?: (status: 'unmounted' | 'initial' | 'open' | 'close') => void;
61
65
  /**
62
66
  * Emitted when the slideout has opened.
63
67
  */
@@ -97,7 +101,7 @@ export interface IressSlideoutProviderProps extends PropsWithChildren {
97
101
  * If you are rendering a slideout inside a micro-frontend, using `push` mode and `eleToPush` is targetting an element in the parent app, you will need to set this to `true` to ensure the styles are injected into the parent app.
98
102
  * This will ensure the slideout is positioned correctly and the element is pushed correctly.
99
103
  */
100
- injectPushStyles?: boolean;
104
+ injectPushStyles?: boolean | string;
101
105
  }
102
106
  export interface IressSlideoutContextValue {
103
107
  container?: FloatingUIContainer;
@@ -1,6 +1,7 @@
1
- import { IressTableProps, TableScope } from './Table.types';
2
- export declare const IressTable: {
3
- <TRow extends object = never, TVal = never>({ caption, children, columns, compact, className, "data-testid": dataTestId, empty, hiddenCaption, hiddenHeader, hover, rowProps, rows, scope, ...restProps }: IressTableProps<TRow, TVal>): import("react/jsx-runtime").JSX.Element;
4
- /** @deprecated IressTable.Scope enum is now deprecated and will be removed in a future version. Please use the value directly instead. **/
5
- Scope: typeof TableScope;
6
- };
1
+ import { IressTableProps, TableEnums, TableExports, TableRef } from './Table.types';
2
+ import { ReactElement, Ref } from 'react';
3
+ declare const ForwardedTable: <TRow extends object = never, TVal = never>(props: IressTableProps<TRow, TVal> & {
4
+ ref?: Ref<TableRef<TRow>>;
5
+ }) => ReactElement;
6
+ export declare const IressTable: typeof ForwardedTable & TableEnums & TableExports;
7
+ export {};
@@ -168,7 +168,16 @@ export interface TableColumnStylesHook {
168
168
  className: string;
169
169
  style: React.CSSProperties;
170
170
  }
171
- export interface TableWithEnums<TRow extends object, TVal = unknown> extends React.FC<IressTableProps<TRow, TVal>> {
171
+ export interface TableRef<TRow extends object> {
172
+ api: Table<TRow>;
173
+ }
174
+ export interface TableExports {
175
+ /**
176
+ * Allows you to access the table context within a child of the `IressTable`.
177
+ */
178
+ useTable: <TRow extends object, TVal = never>() => TableContextValue<TRow, TVal>;
179
+ }
180
+ export interface TableEnums {
172
181
  /** @deprecated IressTable.Scope enum is now deprecated and will be removed in a future version. Please use the value directly instead. **/
173
182
  Scope: typeof TableScope;
174
183
  }
@@ -1,2 +1,5 @@
1
- import { IressTableProviderProps } from './Table.types';
2
- export declare const IressTableProvider: <TRow extends object, TVal = unknown>({ children, columns, rows, }: IressTableProviderProps<TRow, TVal>) => import("react/jsx-runtime").JSX.Element;
1
+ import { ReactElement, Ref } from 'react';
2
+ import { IressTableProviderProps, TableRef } from './Table.types';
3
+ export declare const IressTableProvider: <TRow extends object = never, TVal = never>(props: IressTableProviderProps<TRow, TVal> & {
4
+ ref?: Ref<TableRef<TRow>>;
5
+ }) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { IressHTMLAttributes } from '../../../interfaces';
3
3
  import { HeadingLevel } from '../../../enums';
4
+ import { ButtonRef } from '../../Button';
4
5
  interface ToastHeadingProps<T = HTMLDivElement> extends IressHTMLAttributes<T> {
5
6
  /**
6
7
  * The heading area of the toast. You can pass react component such as `<IressText>Error</IressText>`.
@@ -17,7 +18,7 @@ interface ToastCloseButtonProps<T = HTMLDivElement> extends IressHTMLAttributes<
17
18
  /**
18
19
  * Click event on the close button of the toast.
19
20
  */
20
- onClose?: React.MouseEventHandler<HTMLButtonElement>;
21
+ onClose?: (e?: React.MouseEvent<ButtonRef>) => void;
21
22
  }
22
23
  interface ToastActionProps<T = HTMLDivElement> extends IressHTMLAttributes<T> {
23
24
  /**
@@ -1,8 +1,11 @@
1
+ import { MouseEvent } from 'react';
1
2
  import { IressToasterOptions, IressToasterProviderProps } from './Toaster.types';
2
3
  import { IressToastProps } from './Toast/Toast.types';
4
+ import { ButtonRef } from '../Button';
3
5
  interface ToasterContextValue {
4
- show: (toast: IressToastProps) => void;
5
- close: (id: string) => void;
6
+ animateOut: (id: string) => void;
7
+ show: (toast: IressToastProps) => string;
8
+ close: (id: string, e?: MouseEvent<ButtonRef>) => void;
6
9
  options: IressToasterOptions;
7
10
  setOptions: (options: IressToasterOptions) => void;
8
11
  }
@@ -1,9 +1,9 @@
1
1
  import { NewToast } from '../Toast/Toast.types';
2
2
  import { ToasterPositions } from '../Toaster.types';
3
3
  export declare const useToaster: (position?: ToasterPositions) => {
4
- success: (toast: NewToast) => void;
5
- error: (toast: NewToast) => void;
6
- info: (toast: NewToast) => void;
4
+ success: (toast: NewToast) => string;
5
+ error: (toast: NewToast) => string;
6
+ info: (toast: NewToast) => string;
7
7
  close: (id: string) => void;
8
8
  options: import('../Toaster.types').IressToasterOptions;
9
9
  };
@@ -95,29 +95,29 @@ export declare const Z_INDEX: {
95
95
  /**
96
96
  * The default z-index used for most elements. Can be combined with raised and floating elevations.
97
97
  */
98
- '000': number;
98
+ DEFAULT: number;
99
99
  /**
100
100
  * Used for IressNavbar. Can be combined with overflow elevation.
101
101
  */
102
- 100: number;
102
+ NAVBAR: number;
103
103
  /**
104
104
  * Used for IressPopover. Can be combined with floating elevation.
105
105
  */
106
- 200: number;
106
+ POPOVER: number;
107
107
  /**
108
108
  * Used for IressSlideout. Can be combined with floating elevation.
109
109
  */
110
- 300: number;
110
+ SLIDEOUT: number;
111
111
  /**
112
112
  * Used for IressModal. Can be combined with floating elevation.
113
113
  */
114
- 400: number;
114
+ MODAL: number;
115
115
  /**
116
116
  * Used for IressToast. Can be combined with floating elevation.
117
117
  */
118
- 500: number;
118
+ TOAST: number;
119
119
  /**
120
120
  * Used for IressTooltip. Can be combined with floating elevation.
121
121
  */
122
- 600: number;
122
+ TOOLTIP: number;
123
123
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Finds the closest ancestor element that matches the selector, traversing across shadow DOM boundaries.
3
+ * Similar to native Element.closest() but works across shadow DOM.
4
+ *
5
+ * @param element - The starting element
6
+ * @param selector - CSS selector to match against
7
+ * @returns The closest ancestor element matching the selector, or null if not found
8
+ */
9
+ export declare const closestCrossShadow: (element: Element | null, selector: string) => Element | null;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Safely calls the closest method on an element, handling cases where the element
3
+ * might not have the closest method (e.g., in jsdom environments)
4
+ */
5
+ export declare const safeClosest: (element: Element | null, selector: string) => Element | null;
@@ -55,6 +55,7 @@ export interface LabelValueMeta extends LabelValue {
55
55
  }
56
56
  export interface FormattedLabelValueMeta extends LabelValueMeta {
57
57
  formattedLabel?: React.ReactNode;
58
+ formattedMeta?: React.ReactNode;
58
59
  }
59
60
  export interface BreakpointDetail {
60
61
  mediaQuery: string;
@@ -27,6 +27,7 @@ export * from './components/Panel';
27
27
  export * from './components/Placeholder';
28
28
  export * from './components/Popover';
29
29
  export * from './components/Progress';
30
+ export * from './components/Provider';
30
31
  export * from './components/Radio';
31
32
  export * from './components/RadioGroup';
32
33
  export * from './components/Readonly';
@@ -5,7 +5,7 @@ import { PageLoadingProps } from './components/PageLoading';
5
5
  import { ComponentLoadingProps } from './components/ComponentLoading';
6
6
  import { LongLoadingProps } from './components/LongLoading';
7
7
  import { DefaultLoadingProps } from './components/DefaultLoading';
8
- type IressLoadingSuspenseProps = (Omit<StartUpLoadingProps, 'loaded'> | ValidateLoadingProps | Omit<PageLoadingProps, 'loaded'> | Omit<ComponentLoadingProps, 'loaded'> | Omit<LongLoadingProps, 'loaded'> | DefaultLoadingProps) & {
8
+ export type IressLoadingSuspenseProps = (Omit<StartUpLoadingProps, 'loaded'> | ValidateLoadingProps | Omit<PageLoadingProps, 'loaded'> | Omit<ComponentLoadingProps, 'loaded'> | Omit<LongLoadingProps, 'loaded'> | DefaultLoadingProps) & {
9
9
  /**
10
10
  * The content that will be rendered inside the Suspense boundary.
11
11
  * Typically includes lazy-loaded components and components that use the `use` or `IressLoadingSuspense.use` hook.
@@ -71,4 +71,3 @@ export declare const IressLoadingSuspense: {
71
71
  */
72
72
  uncache: (fetcher: () => Promise<unknown>, timeout?: number) => void;
73
73
  };
74
- export {};
@@ -1,9 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { IressHTMLAttributes } from '../../../interfaces';
3
3
  declare const templates: {
4
- page: import("react/jsx-runtime").JSX.Element;
5
- form: import("react/jsx-runtime").JSX.Element;
6
- dashboard: import("react/jsx-runtime").JSX.Element;
4
+ page: () => import("react/jsx-runtime").JSX.Element;
5
+ form: () => import("react/jsx-runtime").JSX.Element;
6
+ dashboard: () => import("react/jsx-runtime").JSX.Element;
7
7
  };
8
8
  export interface PageLoadingProps extends Omit<IressHTMLAttributes, 'children'> {
9
9
  /**
@@ -4,6 +4,7 @@
4
4
  * @param isLoaded - A boolean value that determines if the component waiting to be loaded has finished loading.
5
5
  * @param delay - Once a component has loaded, how long should the loading indicator be displayed for. This is useful to allow the loading indicator to animate out.
6
6
  * @param startFrom - If a component is still loading after this time in milliseconds, you should show the loading message. Default is 500ms, meaning a user will not even see the loading indicator if the page loads before this time.
7
+ * @param avoidDelayTimeout - If the component has a start up animation, this is the time in milliseconds that we will avoid the delay timeout for. This is useful to speed up the loading indicator removal if the component loaded before the first half of an animation finishes.
7
8
  * @returns A boolean value that determines whether the `IressLoading` component should be rendered.
8
9
  */
9
10
  export declare const useShouldRenderLoading: (isLoaded: boolean, delay?: number, startFrom?: number, avoidDelayTimeout?: number) => boolean;
@@ -1 +1,2 @@
1
1
  export * from './Loading';
2
+ export * from './LoadingSuspense';