@wistia/ui 0.13.2-beta.daefada2.65ffee6 → 0.13.2-beta.e183b96c.a550c23

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.13.2-beta.daefada2.65ffee6
3
+ * @license @wistia/ui v0.13.2-beta.e183b96c.a550c23
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7166,26 +7166,10 @@ var iconSizeMap = {
7166
7166
  xl: "32",
7167
7167
  xxl: "48"
7168
7168
  };
7169
- var iconInlineStyle = import_styled_components19.css`
7170
- [data-wui-icon-inline] {
7171
- --wui-icon-inline-size: 0.8em;
7172
- --wui-icon-inline-offset: 0.05em;
7173
- --wui-icon-vertical-align: none;
7174
-
7175
- top: var(--wui-icon-inline-offset);
7176
- position: relative;
7177
- }
7178
- `;
7179
7169
  var StyledIcon = import_styled_components19.default.svg`
7180
7170
  ${({ $colorScheme }) => getColorScheme($colorScheme ?? "inherit")}
7181
- --wui-icon-size: var(--wui-icon-inline-size, ${({ $height }) => $height}px);
7182
- --wui-icon-vertical-align: middle;
7183
-
7184
- height: var(--wui-icon-size);
7185
- width: var(--wui-icon-size);
7186
7171
  `;
7187
7172
  var Icon = ({
7188
- useInlineStyles = true,
7189
7173
  invertColor,
7190
7174
  colorScheme = "inherit",
7191
7175
  size = "lg",
@@ -7207,7 +7191,7 @@ var Icon = ({
7207
7191
  }
7208
7192
  const IconElement = iconMap[type];
7209
7193
  const defaultStyle = {
7210
- verticalAlign: "var(--wui-icon-vertical-align)",
7194
+ verticalAlign: "middle",
7211
7195
  ...style
7212
7196
  };
7213
7197
  const iconColor = invertColor ? "var(--wui-color-icon-on-fill)" : "var(--wui-color-icon)";
@@ -7215,14 +7199,13 @@ var Icon = ({
7215
7199
  StyledIcon,
7216
7200
  {
7217
7201
  $colorScheme: colorScheme,
7218
- $height: iconSizeMap[responsiveSize],
7219
- $width: iconSizeMap[responsiveSize],
7220
7202
  "aria-hidden": "true",
7221
7203
  as: IconElement,
7222
- "data-wui-icon-inline": useInlineStyles ? true : void 0,
7204
+ height: `${iconSizeMap[responsiveSize]}px`,
7223
7205
  role: "presentation",
7224
7206
  style: defaultStyle,
7225
7207
  viewBox: "0 0 24 24",
7208
+ width: `${iconSizeMap[responsiveSize]}px`,
7226
7209
  xmlns: "http://www.w3.org/2000/svg",
7227
7210
  ...props,
7228
7211
  color: iconColor
@@ -8236,8 +8219,6 @@ var StyledHeading = import_styled_components28.default.div`
8236
8219
  text-align: ${$align};
8237
8220
  `}
8238
8221
  margin: 0;
8239
-
8240
- ${iconInlineStyle}
8241
8222
  `;
8242
8223
  var variantElementMap = {
8243
8224
  hero: DEFAULT_ELEMENT2,
@@ -8417,7 +8398,6 @@ var StyledText = import_styled_components29.default.div`
8417
8398
  return "var(--wui-color-text)";
8418
8399
  }};
8419
8400
 
8420
- ${iconInlineStyle}
8421
8401
  color: var(--text-color);
8422
8402
  font-family: var(--font-family);
8423
8403
  font-size: var(--font-size);
@@ -8644,6 +8624,21 @@ var StyledBanner = import_styled_components32.default.div`
8644
8624
 
8645
8625
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
8646
8626
  `;
8627
+ var IconWrapper = (0, import_styled_components32.default)(Box)`
8628
+ --wui-banner-icon-size: var(--font-size, 24px);
8629
+
8630
+ ${({ $iconPosition }) => $iconPosition === "inline" && import_styled_components32.css`
8631
+ display: inline-block;
8632
+ vertical-align: text-bottom;
8633
+ margin-right: calc(var(--wui-banner-icon-size) / 3);
8634
+ `}
8635
+
8636
+ svg {
8637
+ color: var(--wui-color-icon);
8638
+ width: var(--wui-banner-icon-size);
8639
+ height: var(--wui-banner-icon-size);
8640
+ }
8641
+ `;
8647
8642
  var Banner = ({
8648
8643
  bodyText,
8649
8644
  colorScheme = "inherit",
@@ -8706,8 +8701,9 @@ var Banner = ({
8706
8701
  style: { padding: "var(--wui-banner-padding)" },
8707
8702
  children: [
8708
8703
  iconPosition === "above" && /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
8709
- Box,
8704
+ IconWrapper,
8710
8705
  {
8706
+ $iconPosition: "above",
8711
8707
  alignSelf: "stretch",
8712
8708
  direction: "column",
8713
8709
  justifyContent: "center",
@@ -8723,10 +8719,7 @@ var Banner = ({
8723
8719
  justifyContent: "center",
8724
8720
  children: [
8725
8721
  (0, import_type_guards24.isNotNil)(headingText) ? /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(Heading, { variant: headingVariant, children: [
8726
- iconPosition === "inline" && /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(import_jsx_runtime208.Fragment, { children: [
8727
- icon,
8728
- " "
8729
- ] }),
8722
+ iconPosition === "inline" && /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(IconWrapper, { $iconPosition: "inline", children: icon }),
8730
8723
  headingText
8731
8724
  ] }) : null,
8732
8725
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Text, { variant: textVariant, children: bodyText })
@@ -10617,7 +10610,10 @@ var Input = (0, import_react44.forwardRef)(
10617
10610
  ...props
10618
10611
  }, externalRef) => {
10619
10612
  const internalRef = (0, import_react44.useRef)();
10620
- const ref = (0, import_type_guards36.isNotNil)(externalRef) && (0, import_type_guards36.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
10613
+ const ref = (
10614
+ // eslint-disable-next-line react-compiler/react-compiler
10615
+ (0, import_type_guards36.isNotNil)(externalRef) && (0, import_type_guards36.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
10616
+ );
10621
10617
  let leftIconToDisplay = leftIcon;
10622
10618
  if ((0, import_type_guards36.isNil)(leftIcon) && type === "search") {
10623
10619
  leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(Icon, { type: "search" });