@wistia/ui 0.7.0-beta.09ed20f2.84f70f9 → 0.7.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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.7.0-beta.09ed20f2.84f70f9
3
+ * @license @wistia/ui v0.7.0
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7032,7 +7032,7 @@ var Link = (0, import_react15.forwardRef)(
7032
7032
  }, ref) => {
7033
7033
  const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
7034
7034
  const to = generateHref(props.href, type, disabled);
7035
- const handleClick = async (event) => {
7035
+ const handleClick = async (event, routingCallback = null) => {
7036
7036
  if (disabled) {
7037
7037
  event.preventDefault();
7038
7038
  } else if (beforeAction) {
@@ -7044,9 +7044,11 @@ var Link = (0, import_react15.forwardRef)(
7044
7044
  } finally {
7045
7045
  if ((0, import_type_guards14.isFunction)(props.onClick)) {
7046
7046
  props.onClick(event);
7047
- }
7048
- if (!inRouterContext && (0, import_type_guards14.isNotNil)(to)) {
7047
+ } else if (routingCallback !== null) {
7048
+ routingCallback();
7049
+ } else if ((0, import_type_guards14.isNotNil)(to)) {
7049
7050
  window.location.assign(to);
7051
+ } else {
7050
7052
  }
7051
7053
  }
7052
7054
  } else if ((0, import_type_guards14.isFunction)(props.onClick)) {