@wistia/ui 0.6.17 → 0.6.18-beta.2c44fe90.527fc6c
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 +35 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.mjs +50 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.18-beta.2c44fe90.527fc6c
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2233,6 +2233,7 @@ var ellipsisStyle = import_styled_components14.css`
|
|
|
2233
2233
|
overflow: hidden;
|
|
2234
2234
|
text-overflow: ellipsis;
|
|
2235
2235
|
white-space: nowrap;
|
|
2236
|
+
display: block;
|
|
2236
2237
|
|
|
2237
2238
|
/*
|
|
2238
2239
|
Using feature detection (i.e., -webkit-named-image) we only target Safari browsers
|
|
@@ -2255,7 +2256,7 @@ var ellipsisStyle = import_styled_components14.css`
|
|
|
2255
2256
|
var ellipsisFlexParentStyle = import_styled_components14.css`
|
|
2256
2257
|
min-width: 0;
|
|
2257
2258
|
`;
|
|
2258
|
-
var EllipsisComponent = import_styled_components14.default.
|
|
2259
|
+
var EllipsisComponent = import_styled_components14.default.span`
|
|
2259
2260
|
${ellipsisStyle};
|
|
2260
2261
|
${({ $lines }) => {
|
|
2261
2262
|
if ((0, import_type_guards8.isNotNil)($lines)) {
|
|
@@ -7224,6 +7225,8 @@ var StyledBoxComponent = import_styled_components26.default.div`
|
|
|
7224
7225
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7225
7226
|
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
7226
7227
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
7228
|
+
height: ${({ $height }) => $height ?? null};
|
|
7229
|
+
width: ${({ $width }) => $width ?? null};
|
|
7227
7230
|
|
|
7228
7231
|
/* Box children styles */
|
|
7229
7232
|
flex-grow: ${({ $grow }) => (0, import_type_guards17.isNotNil)($grow) ? $grow : null};
|
|
@@ -7264,14 +7267,36 @@ var BoxComponent = (0, import_react16.forwardRef)(
|
|
|
7264
7267
|
grow,
|
|
7265
7268
|
hasBoxParent = false,
|
|
7266
7269
|
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
7270
|
+
height,
|
|
7267
7271
|
inline = false,
|
|
7268
7272
|
justifyContent = "flex-start",
|
|
7269
7273
|
order,
|
|
7270
7274
|
renderAs,
|
|
7271
7275
|
shrink,
|
|
7276
|
+
width,
|
|
7272
7277
|
wrapItems = false,
|
|
7273
7278
|
...otherProps
|
|
7274
7279
|
}, ref) => {
|
|
7280
|
+
if ((0, import_type_guards17.isNotUndefined)(height)) {
|
|
7281
|
+
if ((0, import_type_guards17.isTruthy)(fill) || fill === "vertical") {
|
|
7282
|
+
throw new Error('Cannot use height prop with fill="vertical" or fill={true}');
|
|
7283
|
+
}
|
|
7284
|
+
if ((0, import_type_guards17.isTruthy)(fillViewport) || fillViewport === "vertical") {
|
|
7285
|
+
throw new Error(
|
|
7286
|
+
'Cannot use height prop with fillViewport="vertical" or fillViewport={true}'
|
|
7287
|
+
);
|
|
7288
|
+
}
|
|
7289
|
+
}
|
|
7290
|
+
if ((0, import_type_guards17.isNotUndefined)(width)) {
|
|
7291
|
+
if ((0, import_type_guards17.isTruthy)(fill) || fill === "horizontal") {
|
|
7292
|
+
throw new Error('Cannot use width prop with fill="horizontal" or fill={true}');
|
|
7293
|
+
}
|
|
7294
|
+
if ((0, import_type_guards17.isTruthy)(fillViewport) || fillViewport === "horizontal") {
|
|
7295
|
+
throw new Error(
|
|
7296
|
+
'Cannot use width prop with fillViewport="horizontal" or fillViewport={true}'
|
|
7297
|
+
);
|
|
7298
|
+
}
|
|
7299
|
+
}
|
|
7275
7300
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
|
|
7276
7301
|
StyledBoxComponent,
|
|
7277
7302
|
{
|
|
@@ -7285,10 +7310,12 @@ var BoxComponent = (0, import_react16.forwardRef)(
|
|
|
7285
7310
|
$flexDirection: direction,
|
|
7286
7311
|
$gap: gap,
|
|
7287
7312
|
$grow: grow,
|
|
7313
|
+
$height: height,
|
|
7288
7314
|
$inline: inline,
|
|
7289
7315
|
$justifyContent: justifyContent,
|
|
7290
7316
|
$order: order,
|
|
7291
7317
|
$shrink: shrink,
|
|
7318
|
+
$width: width,
|
|
7292
7319
|
$wrapItems: wrapItems,
|
|
7293
7320
|
as: renderAs ?? DEFAULT_ELEMENT,
|
|
7294
7321
|
...otherProps,
|
|
@@ -7458,6 +7485,8 @@ var StyledCard = (0, import_styled_components30.default)(Box)`
|
|
|
7458
7485
|
outline-offset: -2px;
|
|
7459
7486
|
border-radius: var(--wui-border-radius-02);
|
|
7460
7487
|
display: flex;
|
|
7488
|
+
height: ${({ $height }) => $height};
|
|
7489
|
+
width: ${({ $width }) => $width};
|
|
7461
7490
|
`;
|
|
7462
7491
|
var prominenceMap = {
|
|
7463
7492
|
default: {
|
|
@@ -7481,6 +7510,8 @@ var Card = ({
|
|
|
7481
7510
|
colorScheme = "inherit",
|
|
7482
7511
|
prominence = "secondary",
|
|
7483
7512
|
border = false,
|
|
7513
|
+
height,
|
|
7514
|
+
width,
|
|
7484
7515
|
...props
|
|
7485
7516
|
}) => /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
7486
7517
|
StyledCard,
|
|
@@ -7488,7 +7519,9 @@ var Card = ({
|
|
|
7488
7519
|
$backgroundColor: prominenceMap[prominence].backgroundColor,
|
|
7489
7520
|
$borderColor: border ? prominenceMap[prominence].borderColor : "transparent",
|
|
7490
7521
|
$colorScheme: colorScheme,
|
|
7522
|
+
$height: height,
|
|
7491
7523
|
$paddingSize: paddingSize,
|
|
7524
|
+
$width: width,
|
|
7492
7525
|
direction,
|
|
7493
7526
|
gap,
|
|
7494
7527
|
...props,
|