@wistia/ui 1.4.2 → 1.4.3-beta.26f7cf0c.ad5bc61

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v1.4.2
3
+ * @license @wistia/ui v1.4.3-beta.26f7cf0c.ad5bc61
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -103,6 +103,10 @@ const GlobalStyle = createGlobalStyle`
103
103
  * 1. Without this fonts are too heavy weight in OS X Firefox
104
104
  * 2. Design decision
105
105
  3. See: https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/
106
+ 4. Avoid typographic orphans and awkward line breaks. 'text-wrap' is inherited,
107
+ so this becomes the default for all text. Guarded by '@supports' because
108
+ 'pretty' is not Baseline yet; browsers without it keep the initial
109
+ 'text-wrap: wrap' behavior, so no polyfill is needed.
106
110
  */
107
111
  body {
108
112
  -moz-osx-font-smoothing: grayscale; /* 1 */
@@ -110,6 +114,10 @@ const GlobalStyle = createGlobalStyle`
110
114
  line-height: 1.5; /* 2 */
111
115
  min-height: 100vh; /* 3 */
112
116
  min-height: -webkit-fill-available; /* 3 */
117
+
118
+ @supports (text-wrap: pretty) {
119
+ text-wrap: pretty; /* 4 */
120
+ }
113
121
  }
114
122
 
115
123
  /* Remove default margin in favour of better control in authored CSS */
@@ -5736,6 +5744,7 @@ const Button = ({ children, forceState, className, leftIcon, rightIcon, colorSch
5736
5744
  const responsiveFullWidth = useResponsiveProp(fullWidth);
5737
5745
  const responsiveSize = useResponsiveProp(size);
5738
5746
  const isAriaDisabled = () => isLoading || disabled;
5747
+ const buttonRef = ref;
5739
5748
  const commonProps = {
5740
5749
  "aria-disabled": isAriaDisabled() || void 0,
5741
5750
  $colorScheme: colorScheme,
@@ -5747,7 +5756,7 @@ const Button = ({ children, forceState, className, leftIcon, rightIcon, colorSch
5747
5756
  };
5748
5757
  if (forceState) commonProps.className = `${className ?? ""} force-state-${forceState}`;
5749
5758
  if (isLink(props)) return /* @__PURE__ */ jsx(StyledButton$2, {
5750
- ref,
5759
+ ref: buttonRef,
5751
5760
  as: Link,
5752
5761
  disabled: isAriaDisabled(),
5753
5762
  ...props,