@wistia/ui 0.6.38-beta.e013f95e.b698402 → 0.6.39

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.38-beta.e013f95e.b698402
3
+ * @license @wistia/ui v0.6.39
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -110,8 +110,6 @@ __export(index_exports, {
110
110
  Tabs: () => Tabs,
111
111
  Tag: () => Tag,
112
112
  Text: () => Text,
113
- Thumbnail: () => Thumbnail,
114
- ThumbnailOverlay: () => ThumbnailOverlay,
115
113
  Tooltip: () => Tooltip,
116
114
  UIProvider: () => UIProvider,
117
115
  WistiaLogo: () => WistiaLogo,
@@ -12140,256 +12138,6 @@ var WistiaLogo = ({
12140
12138
  return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
12141
12139
  };
12142
12140
  WistiaLogo.displayName = "WistiaLogo";
12143
-
12144
- // src/components/Thumbnail/Thumbnail.tsx
12145
- var import_react65 = require("react");
12146
- var import_styled_components87 = __toESM(require("styled-components"));
12147
- var import_type_guards48 = require("@wistia/type-guards");
12148
-
12149
- // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
12150
- var import_type_guards47 = require("@wistia/type-guards");
12151
- var import_styled_components86 = require("styled-components");
12152
- var gradients = {
12153
- defaultDarkOne: import_styled_components86.css`
12154
- background-color: #222d66;
12155
- background-image:
12156
- radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
12157
- radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
12158
- radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
12159
- radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
12160
- `,
12161
- defaultDarkTwo: import_styled_components86.css`
12162
- background-color: #222d66;
12163
- background-image:
12164
- radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
12165
- radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),
12166
- radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
12167
- radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
12168
- `,
12169
- defaultLightOne: import_styled_components86.css`
12170
- background-color: #ccd5ff;
12171
- background-image:
12172
- radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
12173
- radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),
12174
- radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
12175
- radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
12176
- `,
12177
- defaultLightTwo: import_styled_components86.css`
12178
- background-color: #ccd5ff;
12179
- background-image:
12180
- radial-gradient(ellipse at top, #ccd5ff, transparent),
12181
- radial-gradient(ellipse at bottom, #6b84ff, transparent);
12182
- `,
12183
- defaultMidOne: import_styled_components86.css`
12184
- background-color: #6b84ff;
12185
- background-image:
12186
- radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
12187
- radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
12188
- radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
12189
- radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
12190
- `,
12191
- defaultMidTwo: import_styled_components86.css`
12192
- background-color: #6b84ff;
12193
- background-image:
12194
- radial-gradient(ellipse at top, #2949e5, transparent),
12195
- radial-gradient(ellipse at bottom, #ccd5ff, transparent);
12196
- `,
12197
- green: import_styled_components86.css`
12198
- background-color: #fafffa;
12199
- background-image:
12200
- radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
12201
- radial-gradient(farthest-corner at top right, #268713, transparent 50%),
12202
- radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
12203
- radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
12204
- `,
12205
- greenWithPop: import_styled_components86.css`
12206
- background-color: #fafffa;
12207
- background-image:
12208
- radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
12209
- radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),
12210
- radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
12211
- radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
12212
- `,
12213
- pink: import_styled_components86.css`
12214
- background-color: #fffff0;
12215
- background-image:
12216
- radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
12217
- radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
12218
- radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
12219
- radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
12220
- `,
12221
- pinkWithPop: import_styled_components86.css`
12222
- background-color: #fffff0;
12223
- background-image:
12224
- radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
12225
- radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
12226
- radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
12227
- radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
12228
- `,
12229
- playfulGradientOne: import_styled_components86.css`
12230
- background-color: #f7f8ff;
12231
- background-image:
12232
- radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
12233
- radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
12234
- radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
12235
- radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
12236
- `,
12237
- playfulGradientTwo: import_styled_components86.css`
12238
- background-color: #f7f8ff;
12239
- background-image:
12240
- radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
12241
- radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),
12242
- radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
12243
- radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
12244
- `,
12245
- purple: import_styled_components86.css`
12246
- background-color: #f2caff;
12247
- background-image:
12248
- radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
12249
- radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
12250
- `,
12251
- purpleWithPop: import_styled_components86.css`
12252
- background-color: #f2caff;
12253
- background-image:
12254
- radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
12255
- radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),
12256
- radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
12257
- radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
12258
- `,
12259
- yellow: import_styled_components86.css`
12260
- background-color: #fffff0;
12261
- background-image:
12262
- radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
12263
- radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
12264
- radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
12265
- radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
12266
- `,
12267
- yellowWithPop: import_styled_components86.css`
12268
- background-color: #fffff0;
12269
- background-image:
12270
- radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
12271
- radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
12272
- radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
12273
- radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);
12274
- `
12275
- };
12276
- var gradientMap = Object.keys(gradients);
12277
- var getBackgroundGradient = (gradientName = void 0) => {
12278
- return (0, import_type_guards47.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12279
- };
12280
-
12281
- // src/components/Thumbnail/Thumbnail.tsx
12282
- var import_jsx_runtime269 = require("react/jsx-runtime");
12283
- var WideThumbnailImage = import_styled_components87.default.img`
12284
- height: 100%;
12285
- object-fit: cover;
12286
- width: 100%;
12287
- `;
12288
- var SquareThumbnailImage = import_styled_components87.default.img`
12289
- backdrop-filter: blur(8px);
12290
- object-fit: contain;
12291
- width: 100%;
12292
- `;
12293
- var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
12294
- if (thumbnailImageType === "wide") {
12295
- return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
12296
- WideThumbnailImage,
12297
- {
12298
- alt: "",
12299
- src: thumbnailUrl
12300
- }
12301
- );
12302
- }
12303
- if (thumbnailImageType === "square") {
12304
- return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
12305
- SquareThumbnailImage,
12306
- {
12307
- alt: "",
12308
- src: thumbnailUrl
12309
- }
12310
- );
12311
- }
12312
- return null;
12313
- };
12314
- var StyledThumbnail = import_styled_components87.default.div`
12315
- ${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};
12316
- aspect-ratio: 16 / 9;
12317
- background: ${({ $backgroundUrl }) => (0, import_type_guards48.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}') center / cover` : void 0};
12318
- border-radius: 4px;
12319
- display: flex;
12320
- overflow: hidden;
12321
- position: relative;
12322
- width: ${({ $width }) => $width};
12323
- `;
12324
- var Thumbnail = (0, import_react65.forwardRef)(
12325
- ({
12326
- gradientBackground = "defaultMidOne",
12327
- thumbnailImageType = "square",
12328
- thumbnailUrl,
12329
- width = "auto",
12330
- children,
12331
- ...otherProps
12332
- }, ref) => {
12333
- const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards48.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
12334
- return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
12335
- StyledThumbnail,
12336
- {
12337
- ref,
12338
- $backgroundUrl: backgroundUrl,
12339
- $gradientBackground: gradientBackground,
12340
- $width: width,
12341
- ...otherProps,
12342
- children: [
12343
- (0, import_type_guards48.isNotNil)(children) && children,
12344
- (0, import_type_guards48.isNotNil)(thumbnailUrl) && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
12345
- ThumbnailImage,
12346
- {
12347
- thumbnailImageType,
12348
- thumbnailUrl
12349
- }
12350
- )
12351
- ]
12352
- }
12353
- );
12354
- }
12355
- );
12356
- Thumbnail.displayName = "Thumbnail";
12357
-
12358
- // src/components/Thumbnail/ThumbnailOverlay.tsx
12359
- var import_styled_components88 = __toESM(require("styled-components"));
12360
- var import_type_guards49 = require("@wistia/type-guards");
12361
- var import_jsx_runtime270 = require("react/jsx-runtime");
12362
- var StyledThumbnailOverlay = import_styled_components88.default.div`
12363
- align-items: center;
12364
- background-color: rgb(0 0 0 / 50%);
12365
- border-radius: var(--wui-border-radius-01);
12366
- bottom: var(--wui-space-01);
12367
- color: var(--wui-color-text-on-fill);
12368
- display: flex;
12369
- font-size: var(--wui-typography-body-4-size);
12370
- font-weight: var(--wui-typography-weight-body-bold);
12371
- gap: var(--wui-space-01);
12372
- padding: 0 var(--wui-space-01);
12373
- position: absolute;
12374
- right: var(--wui-space-01);
12375
- z-index: 1;
12376
-
12377
- svg {
12378
- height: 12px;
12379
- width: 12px;
12380
-
12381
- path {
12382
- color: var(--wui-color-icon-on-fill);
12383
- }
12384
- }
12385
- `;
12386
- var ThumbnailOverlay = ({ icon, label }) => {
12387
- return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(StyledThumbnailOverlay, { children: [
12388
- (0, import_type_guards49.isNotNil)(icon) && icon,
12389
- /* @__PURE__ */ (0, import_jsx_runtime270.jsx)("span", { children: label })
12390
- ] });
12391
- };
12392
- ThumbnailOverlay.displayName = "ThumbnailOverlay";
12393
12141
  // Annotate the CommonJS export names for ESM import in node:
12394
12142
  0 && (module.exports = {
12395
12143
  ActionButton,
@@ -12463,8 +12211,6 @@ ThumbnailOverlay.displayName = "ThumbnailOverlay";
12463
12211
  Tabs,
12464
12212
  Tag,
12465
12213
  Text,
12466
- Thumbnail,
12467
- ThumbnailOverlay,
12468
12214
  Tooltip,
12469
12215
  UIProvider,
12470
12216
  WistiaLogo,