@wistia/ui 0.15.13-beta.e65c0481.a780530 → 0.15.14-beta.0ddf5142.0352c4f

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.15.13-beta.e65c0481.a780530
3
+ * @license @wistia/ui v0.15.14-beta.0ddf5142.0352c4f
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: var(--wui-space-01);
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(),
@@ -14937,6 +14972,7 @@ var FormField = ({
14937
14972
  label,
14938
14973
  labelPosition,
14939
14974
  name,
14975
+ required = false,
14940
14976
  value,
14941
14977
  ...props
14942
14978
  }) => {
@@ -14986,7 +15022,14 @@ var FormField = ({
14986
15022
  ...props,
14987
15023
  "data-label-position": labelPosition ?? formState.labelPosition,
14988
15024
  children: [
14989
- !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, children: label }),
15025
+ !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
15026
+ Label,
15027
+ {
15028
+ htmlFor: computedId,
15029
+ required,
15030
+ children: label
15031
+ }
15032
+ ),
14990
15033
  (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14991
15034
  (0, import_react73.cloneElement)(children, childProps),
14992
15035
  (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [