@wistia/ui 0.13.11-beta.e83846c4.6d00a8f → 0.13.11

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.11-beta.e83846c4.6d00a8f
3
+ * @license @wistia/ui v0.13.11
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7184,26 +7184,10 @@ var iconSizeMap = {
7184
7184
  xl: "32",
7185
7185
  xxl: "48"
7186
7186
  };
7187
- var iconInlineStyle = import_styled_components19.css`
7188
- [data-wui-icon-inline] {
7189
- --wui-icon-inline-size: 0.8em;
7190
- --wui-icon-inline-offset: 0.05em;
7191
- --wui-icon-vertical-align: none;
7192
-
7193
- top: var(--wui-icon-inline-offset);
7194
- position: relative;
7195
- }
7196
- `;
7197
7187
  var StyledIcon = import_styled_components19.default.svg`
7198
7188
  ${({ $colorScheme }) => getColorScheme($colorScheme ?? "inherit")}
7199
- --wui-icon-size: var(--wui-icon-inline-size, ${({ $height }) => $height}px);
7200
- --wui-icon-vertical-align: middle;
7201
-
7202
- height: var(--wui-icon-size);
7203
- width: var(--wui-icon-size);
7204
7189
  `;
7205
7190
  var Icon = ({
7206
- useInlineStyles = true,
7207
7191
  invertColor,
7208
7192
  colorScheme = "inherit",
7209
7193
  size = "lg",
@@ -7225,7 +7209,7 @@ var Icon = ({
7225
7209
  }
7226
7210
  const IconElement = iconMap[type];
7227
7211
  const defaultStyle = {
7228
- verticalAlign: "var(--wui-icon-vertical-align)",
7212
+ verticalAlign: "middle",
7229
7213
  ...style
7230
7214
  };
7231
7215
  const iconColor = invertColor ? "var(--wui-color-icon-on-fill)" : "var(--wui-color-icon)";
@@ -7233,14 +7217,13 @@ var Icon = ({
7233
7217
  StyledIcon,
7234
7218
  {
7235
7219
  $colorScheme: colorScheme,
7236
- $height: iconSizeMap[responsiveSize],
7237
- $width: iconSizeMap[responsiveSize],
7238
7220
  "aria-hidden": "true",
7239
7221
  as: IconElement,
7240
- "data-wui-icon-inline": useInlineStyles ? true : void 0,
7222
+ height: `${iconSizeMap[responsiveSize]}px`,
7241
7223
  role: "presentation",
7242
7224
  style: defaultStyle,
7243
7225
  viewBox: "0 0 24 24",
7226
+ width: `${iconSizeMap[responsiveSize]}px`,
7244
7227
  xmlns: "http://www.w3.org/2000/svg",
7245
7228
  ...props,
7246
7229
  color: iconColor
@@ -8264,8 +8247,6 @@ var StyledHeading = import_styled_components28.default.div`
8264
8247
  text-align: ${$align};
8265
8248
  `}
8266
8249
  margin: 0;
8267
-
8268
- ${iconInlineStyle}
8269
8250
  `;
8270
8251
  var variantElementMap = {
8271
8252
  hero: DEFAULT_ELEMENT2,
@@ -8447,7 +8428,6 @@ var StyledText = import_styled_components29.default.div`
8447
8428
  return "var(--wui-color-text)";
8448
8429
  }};
8449
8430
 
8450
- ${iconInlineStyle}
8451
8431
  color: var(--text-color);
8452
8432
  font-family: var(--font-family);
8453
8433
  font-size: var(--font-size);
@@ -8674,6 +8654,21 @@ var StyledBanner = import_styled_components32.default.div`
8674
8654
 
8675
8655
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
8676
8656
  `;
8657
+ var IconWrapper = (0, import_styled_components32.default)(Box)`
8658
+ --wui-banner-icon-size: var(--font-size, 24px);
8659
+
8660
+ ${({ $iconPosition }) => $iconPosition === "inline" && import_styled_components32.css`
8661
+ display: inline-block;
8662
+ vertical-align: text-bottom;
8663
+ margin-right: calc(var(--wui-banner-icon-size) / 3);
8664
+ `}
8665
+
8666
+ svg {
8667
+ color: var(--wui-color-icon);
8668
+ width: var(--wui-banner-icon-size);
8669
+ height: var(--wui-banner-icon-size);
8670
+ }
8671
+ `;
8677
8672
  var Banner = ({
8678
8673
  bodyText,
8679
8674
  colorScheme = "inherit",
@@ -8736,8 +8731,9 @@ var Banner = ({
8736
8731
  style: { padding: "var(--wui-banner-padding)" },
8737
8732
  children: [
8738
8733
  iconPosition === "above" && /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
8739
- Box,
8734
+ IconWrapper,
8740
8735
  {
8736
+ $iconPosition: "above",
8741
8737
  alignSelf: "stretch",
8742
8738
  direction: "column",
8743
8739
  justifyContent: "center",
@@ -8753,10 +8749,7 @@ var Banner = ({
8753
8749
  justifyContent: "center",
8754
8750
  children: [
8755
8751
  (0, import_type_guards24.isNotNil)(headingText) ? /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(Heading, { variant: headingVariant, children: [
8756
- iconPosition === "inline" && /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(import_jsx_runtime208.Fragment, { children: [
8757
- icon,
8758
- " "
8759
- ] }),
8752
+ iconPosition === "inline" && /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(IconWrapper, { $iconPosition: "inline", children: icon }),
8760
8753
  headingText
8761
8754
  ] }) : null,
8762
8755
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Text, { variant: textVariant, children: bodyText })