@wistia/ui 0.15.14-beta.e265d8c2.8a1d576 → 0.15.14-beta.ffa23602.f498000
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 +37 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +37 -2
- 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.15.14-beta.
|
|
3
|
+
* @license @wistia/ui v0.15.14-beta.ffa23602.f498000
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -14328,10 +14328,44 @@ var import_react64 = require("react");
|
|
|
14328
14328
|
var import_type_guards45 = require("@wistia/type-guards");
|
|
14329
14329
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
14330
14330
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
14331
|
+
var LARGE_PADDING = "var(--wui-space-02)";
|
|
14332
|
+
var SMALL_PADDING = "var(--wui-space-01)";
|
|
14333
|
+
var getPaddingForVariant = (variant) => {
|
|
14334
|
+
const largePaddingVariants = [
|
|
14335
|
+
"hero",
|
|
14336
|
+
"heading1",
|
|
14337
|
+
"heading2",
|
|
14338
|
+
"heading3",
|
|
14339
|
+
"body1",
|
|
14340
|
+
"label1",
|
|
14341
|
+
"body1Mono"
|
|
14342
|
+
];
|
|
14343
|
+
const smallPaddingVariants = [
|
|
14344
|
+
"heading4",
|
|
14345
|
+
"heading5",
|
|
14346
|
+
"heading6",
|
|
14347
|
+
"body2",
|
|
14348
|
+
"body3",
|
|
14349
|
+
"body4",
|
|
14350
|
+
"label2",
|
|
14351
|
+
"label3",
|
|
14352
|
+
"label4",
|
|
14353
|
+
"body2Mono",
|
|
14354
|
+
"body3Mono",
|
|
14355
|
+
"body4Mono"
|
|
14356
|
+
];
|
|
14357
|
+
if (largePaddingVariants.includes(variant)) {
|
|
14358
|
+
return LARGE_PADDING;
|
|
14359
|
+
}
|
|
14360
|
+
if (smallPaddingVariants.includes(variant)) {
|
|
14361
|
+
return SMALL_PADDING;
|
|
14362
|
+
}
|
|
14363
|
+
return SMALL_PADDING;
|
|
14364
|
+
};
|
|
14331
14365
|
var StyledEditableTextRoot = import_styled_components82.default.div`
|
|
14332
14366
|
display: contents;
|
|
14333
14367
|
|
|
14334
|
-
--wui-editable-text-padding:
|
|
14368
|
+
--wui-editable-text-padding: ${({ $typographicVariant }) => getPaddingForVariant($typographicVariant)};
|
|
14335
14369
|
--wui-editable-text-border-radius: var(--wui-border-radius-01);
|
|
14336
14370
|
`;
|
|
14337
14371
|
var EditableTextContext = (0, import_react64.createContext)(null);
|
|
@@ -14429,6 +14463,7 @@ var EditableTextRoot = ({
|
|
|
14429
14463
|
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
14430
14464
|
StyledEditableTextRoot,
|
|
14431
14465
|
{
|
|
14466
|
+
$typographicVariant: typographicVariant,
|
|
14432
14467
|
"data-testid": "editable-text-root",
|
|
14433
14468
|
"data-wui-editable-text-root": true,
|
|
14434
14469
|
"data-wui-editable-text-state": getState(),
|