@wistia/ui 0.6.0 → 0.6.1

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.6.0
3
+ * @license @wistia/ui v0.6.1
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -68,6 +68,7 @@ __export(index_exports, {
68
68
  Heading: () => Heading,
69
69
  Icon: () => Icon,
70
70
  IconButton: () => IconButton,
71
+ Image: () => Image,
71
72
  Input: () => Input,
72
73
  Label: () => Label,
73
74
  Link: () => Link,
@@ -10525,6 +10526,55 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
10525
10526
  children
10526
10527
  ] });
10527
10528
  };
10529
+
10530
+ // src/components/Image/Image.tsx
10531
+ var import_styled_components74 = __toESM(require("styled-components"));
10532
+ var import_type_guards43 = require("@wistia/type-guards");
10533
+ var import_jsx_runtime227 = require("react/jsx-runtime");
10534
+ var getFillStyle2 = (fillContainer) => {
10535
+ if (fillContainer === "horizontal") {
10536
+ return "width: 100%;";
10537
+ }
10538
+ if (fillContainer === "vertical") {
10539
+ return "height: 100%;";
10540
+ }
10541
+ if (fillContainer === true) {
10542
+ return `
10543
+ width: 100%;
10544
+ height: 100%;
10545
+ `;
10546
+ }
10547
+ return void 0;
10548
+ };
10549
+ var StyledImage = import_styled_components74.default.img`
10550
+ border-radius: ${({ $borderRadius }) => (0, import_type_guards43.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
10551
+ ${({ $fillContainer }) => getFillStyle2($fillContainer)};
10552
+ object-fit: ${({ $objFit }) => $objFit};
10553
+ object-position: ${({ $objPosition }) => $objPosition};
10554
+ `;
10555
+ var Image = ({
10556
+ src,
10557
+ alt,
10558
+ borderRadius,
10559
+ fill: fillContainer = false,
10560
+ fit: objFit,
10561
+ loading = "lazy",
10562
+ position: objPosition,
10563
+ ...otherProps
10564
+ }) => /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
10565
+ StyledImage,
10566
+ {
10567
+ $borderRadius: borderRadius,
10568
+ $fillContainer: fillContainer,
10569
+ $objFit: objFit,
10570
+ $objPosition: objPosition,
10571
+ alt,
10572
+ loading,
10573
+ src,
10574
+ ...otherProps
10575
+ }
10576
+ );
10577
+ Image.displayName = "Image";
10528
10578
  // Annotate the CommonJS export names for ESM import in node:
10529
10579
  0 && (module.exports = {
10530
10580
  ActionButton,
@@ -10556,6 +10606,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
10556
10606
  Heading,
10557
10607
  Icon,
10558
10608
  IconButton,
10609
+ Image,
10559
10610
  Input,
10560
10611
  Label,
10561
10612
  Link,