@wistia/ui 0.18.0-beta.6d32b1a6.7a80f3d → 0.18.0-beta.782f3b36.e196b15
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 +7 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.mjs +7 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.0-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.0-beta.782f3b36.e196b15
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8600,7 +8600,7 @@ var DEFAULT_ELEMENT = "div";
|
|
|
8600
8600
|
var BoxComponent = (0, import_react27.forwardRef)(
|
|
8601
8601
|
({
|
|
8602
8602
|
alignContent = "stretch",
|
|
8603
|
-
alignItems = "
|
|
8603
|
+
alignItems = "stretch",
|
|
8604
8604
|
alignSelf,
|
|
8605
8605
|
basis,
|
|
8606
8606
|
children,
|
|
@@ -9481,6 +9481,7 @@ var prominenceMap = {
|
|
|
9481
9481
|
};
|
|
9482
9482
|
var Card = ({
|
|
9483
9483
|
children,
|
|
9484
|
+
alignItems = "flex-start",
|
|
9484
9485
|
border = false,
|
|
9485
9486
|
borderRadius = "border-radius-04",
|
|
9486
9487
|
colorScheme = "inherit",
|
|
@@ -9494,6 +9495,7 @@ var Card = ({
|
|
|
9494
9495
|
}) => /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
9495
9496
|
StyledCard,
|
|
9496
9497
|
{
|
|
9498
|
+
$alignItems: alignItems,
|
|
9497
9499
|
$backgroundColor: prominenceMap[prominence].backgroundColor,
|
|
9498
9500
|
$borderColor: border ? prominenceMap[prominence].borderColor : "transparent",
|
|
9499
9501
|
$borderRadius: borderRadius,
|
|
@@ -14380,7 +14382,6 @@ var EditableTextRoot = ({
|
|
|
14380
14382
|
typographicVariant = "body2",
|
|
14381
14383
|
submitMode = "both",
|
|
14382
14384
|
readOnly = false,
|
|
14383
|
-
disabled = false,
|
|
14384
14385
|
id,
|
|
14385
14386
|
label,
|
|
14386
14387
|
placeholder = "Click to edit this text",
|
|
@@ -14398,14 +14399,13 @@ var EditableTextRoot = ({
|
|
|
14398
14399
|
const computedId = (0, import_type_guards45.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
14399
14400
|
const handleSetIsEditing = (0, import_react64.useCallback)(
|
|
14400
14401
|
(editing) => {
|
|
14401
|
-
if (disabled) return;
|
|
14402
14402
|
if (editing && !isEditing) {
|
|
14403
14403
|
setOriginalValue(value);
|
|
14404
14404
|
}
|
|
14405
14405
|
setIsEditing(editing);
|
|
14406
14406
|
onEditingChange?.(editing);
|
|
14407
14407
|
},
|
|
14408
|
-
[
|
|
14408
|
+
[isEditing, value, onEditingChange]
|
|
14409
14409
|
);
|
|
14410
14410
|
const setValue = (0, import_react64.useCallback)(
|
|
14411
14411
|
(newValue) => {
|
|
@@ -14428,7 +14428,6 @@ var EditableTextRoot = ({
|
|
|
14428
14428
|
typographicVariant,
|
|
14429
14429
|
submitMode,
|
|
14430
14430
|
readOnly,
|
|
14431
|
-
disabled,
|
|
14432
14431
|
id: computedId,
|
|
14433
14432
|
label,
|
|
14434
14433
|
placeholder,
|
|
@@ -14447,7 +14446,6 @@ var EditableTextRoot = ({
|
|
|
14447
14446
|
typographicVariant,
|
|
14448
14447
|
submitMode,
|
|
14449
14448
|
readOnly,
|
|
14450
|
-
disabled,
|
|
14451
14449
|
computedId,
|
|
14452
14450
|
label,
|
|
14453
14451
|
placeholder,
|
|
@@ -14459,9 +14457,6 @@ var EditableTextRoot = ({
|
|
|
14459
14457
|
if (readOnly) {
|
|
14460
14458
|
return "read-only";
|
|
14461
14459
|
}
|
|
14462
|
-
if (disabled) {
|
|
14463
|
-
return "disabled";
|
|
14464
|
-
}
|
|
14465
14460
|
if (isEditing) {
|
|
14466
14461
|
return "editing";
|
|
14467
14462
|
}
|
|
@@ -14522,16 +14517,7 @@ var EditableTextDisplayComponent = (0, import_react65.forwardRef)(
|
|
|
14522
14517
|
if (!context) {
|
|
14523
14518
|
throw new Error("EditableTextDisplay must be used within an EditableTextRoot context");
|
|
14524
14519
|
}
|
|
14525
|
-
const {
|
|
14526
|
-
value,
|
|
14527
|
-
typographicVariant,
|
|
14528
|
-
setIsEditing,
|
|
14529
|
-
placeholder,
|
|
14530
|
-
maxLines,
|
|
14531
|
-
isEditing,
|
|
14532
|
-
minLines,
|
|
14533
|
-
disabled
|
|
14534
|
-
} = context;
|
|
14520
|
+
const { value, typographicVariant, setIsEditing, placeholder, maxLines, isEditing, minLines } = context;
|
|
14535
14521
|
const triggerButtonRef = (0, import_react65.useRef)(null);
|
|
14536
14522
|
const handleTriggerClick = () => {
|
|
14537
14523
|
setIsEditing(true);
|
|
@@ -14542,7 +14528,7 @@ var EditableTextDisplayComponent = (0, import_react65.forwardRef)(
|
|
|
14542
14528
|
if (isEditing) {
|
|
14543
14529
|
return null;
|
|
14544
14530
|
}
|
|
14545
|
-
if (asTrigger && !context.readOnly
|
|
14531
|
+
if (asTrigger && !context.readOnly) {
|
|
14546
14532
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(ClickRegion, { targetRef: triggerButtonRef, children: /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
|
|
14547
14533
|
StyledEditableTextDisplay,
|
|
14548
14534
|
{
|