@linzjs/lui 26.2.0 → 27.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@
5
5
 
6
6
  * **LuiComboSelect:** restore interface to support styling of the input element. ([#1270](https://github.com/linz/lui/issues/1270)) ([7ce6a13](https://github.com/linz/lui/commit/7ce6a137c7f16ffa3acbe4357569a6eb59ef47db))
7
7
 
8
+ ## [27.0.0](https://github.com/linz/Lui/compare/lui-v26.2.0...lui-v27.0.0) (2026-09-10)
9
+
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ * Toast updated to disconnect dismissing action from auto dismiss… ([#1413](https://github.com/linz/Lui/issues/1413))
14
+
15
+ ### Bug Fixes
16
+
17
+ * Toast updated to disconnect dismissing action from auto dismiss… ([#1413](https://github.com/linz/Lui/issues/1413)) ([4cc40ab](https://github.com/linz/Lui/commit/4cc40abea7bf4cbc79fd8fc5fa4039f7ef6ee078))
18
+
8
19
  ## [26.2.0](https://github.com/linz/Lui/compare/lui-v26.1.0...lui-v26.2.0) (2026-09-10)
9
20
 
10
21
 
@@ -10,11 +10,18 @@ export type ToastOptions = {
10
10
  position?: ToastPosition;
11
11
  onLeave?: (id: number) => void;
12
12
  /**
13
- * If true, the toast will require a user to dismiss it. This will set timeout to Infinity and override any provided timeout value.
14
- * If false, the toast will not have a dismiss button and will automatically dismiss based on the timeout value (default 5s).
15
- * If not provided, the toast will require dismissal if timeout is Infinity, and auto-dismiss otherwise, while still showing a dismiss button.
13
+ * If true, the toast will persist until dismissed by setting an unspecified timeout to Infinity.
14
+ * If false or not provided, the toast will use the provided timeout or the ToastProvider default.
15
+ * This option does not control whether the dismiss button is shown.
16
16
  */
17
17
  requireDismiss?: boolean;
18
+ /**
19
+ * If false, banner toasts will not have a close button. Defaults to true.
20
+ * Use this instead of `requireDismiss: false` when hiding the close button.
21
+ * This has no effect on custom content passed to `toast`, which controls its own dismiss UI.
22
+ * When combined with `requireDismiss: true`, dismiss the toast programmatically using its id.
23
+ */
24
+ closeable?: boolean;
18
25
  };
19
26
  export type ToastAction = {
20
27
  type: 'add';
package/dist/index.js CHANGED
@@ -42993,15 +42993,15 @@ const toastFunctions = (dispatch) => {
42993
42993
  const banner = (level, defaults = {}) => (children, config = {}) => {
42994
42994
  const options = { ...defaults, ...config };
42995
42995
  return toast(({ close: onDismissFn }) => {
42996
- const onDismiss = options.requireDismiss === false ? undefined : onDismissFn;
42996
+ const onDismiss = options.closeable === false ? undefined : onDismissFn;
42997
42997
  return React__namespace.createElement(ToastBanner, { level, children, onDismiss });
42998
42998
  }, options);
42999
42999
  };
43000
43000
  return {
43001
43001
  toast,
43002
43002
  dismiss: (id) => dispatch === null || dispatch === void 0 ? void 0 : dispatch({ type: 'remove', id }),
43003
- info: banner('info', { requireDismiss: false }),
43004
- success: banner('success', { requireDismiss: false }),
43003
+ info: banner('info'),
43004
+ success: banner('success'),
43005
43005
  error: banner('error', { requireDismiss: true }),
43006
43006
  warning: banner('warning', { requireDismiss: true }),
43007
43007
  plain: banner(),