@wistia/ui 0.8.2-beta.16b605aa.d0ead36 → 0.8.2
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 +12 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +12 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1160,9 +1160,9 @@ type EditableHeadingProps = {
|
|
|
1160
1160
|
ariaLabel?: string;
|
|
1161
1161
|
/**
|
|
1162
1162
|
* Force editing state for testing purposes
|
|
1163
|
-
*
|
|
1163
|
+
*
|
|
1164
1164
|
*/
|
|
1165
|
-
|
|
1165
|
+
forceEditing?: boolean;
|
|
1166
1166
|
/**
|
|
1167
1167
|
* When true, prevents the heading from entering edit mode
|
|
1168
1168
|
* @default false
|
|
@@ -1175,7 +1175,7 @@ type EditableHeadingProps = {
|
|
|
1175
1175
|
* an accessible button that enables editing mode. The component handles empty values, keyboard
|
|
1176
1176
|
* navigation (Enter to save, Escape to cancel), and provides callbacks for value and state changes.
|
|
1177
1177
|
*/
|
|
1178
|
-
declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel,
|
|
1178
|
+
declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel, forceEditing, editingDisabled, }: EditableHeadingProps) => JSX.Element;
|
|
1179
1179
|
|
|
1180
1180
|
type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
|
|
1181
1181
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1160,9 +1160,9 @@ type EditableHeadingProps = {
|
|
|
1160
1160
|
ariaLabel?: string;
|
|
1161
1161
|
/**
|
|
1162
1162
|
* Force editing state for testing purposes
|
|
1163
|
-
*
|
|
1163
|
+
*
|
|
1164
1164
|
*/
|
|
1165
|
-
|
|
1165
|
+
forceEditing?: boolean;
|
|
1166
1166
|
/**
|
|
1167
1167
|
* When true, prevents the heading from entering edit mode
|
|
1168
1168
|
* @default false
|
|
@@ -1175,7 +1175,7 @@ type EditableHeadingProps = {
|
|
|
1175
1175
|
* an accessible button that enables editing mode. The component handles empty values, keyboard
|
|
1176
1176
|
* navigation (Enter to save, Escape to cancel), and provides callbacks for value and state changes.
|
|
1177
1177
|
*/
|
|
1178
|
-
declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel,
|
|
1178
|
+
declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel, forceEditing, editingDisabled, }: EditableHeadingProps) => JSX.Element;
|
|
1179
1179
|
|
|
1180
1180
|
type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
|
|
1181
1181
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.8.2
|
|
3
|
+
* @license @wistia/ui v0.8.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9022,7 +9022,6 @@ import { isNil as isNil13, isNotNil as isNotNil16, isRecord as isRecord4 } from
|
|
|
9022
9022
|
// src/css/sharedStyles/inputCssVariables.ts
|
|
9023
9023
|
import { css as css24 } from "styled-components";
|
|
9024
9024
|
var inputCssVariables = css24`
|
|
9025
|
-
/* Colors */
|
|
9026
9025
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
9027
9026
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
9028
9027
|
--wui-input-color-border: var(--wui-color-border-secondary);
|
|
@@ -9030,20 +9029,13 @@ var inputCssVariables = css24`
|
|
|
9030
9029
|
--wui-input-color-border-error: var(--wui-color-invalid-indicator);
|
|
9031
9030
|
--wui-input-color-border-disabled: var(--wui-color-border-disabled);
|
|
9032
9031
|
--wui-input-color-text: var(--wui-color-text);
|
|
9033
|
-
|
|
9034
|
-
/* Border */
|
|
9035
9032
|
--wui-input-border-radius: var(--wui-border-radius-03);
|
|
9036
9033
|
--wui-input-multiline-border-radius: var(--wui-border-radius-02);
|
|
9037
|
-
|
|
9038
|
-
/* Padding */
|
|
9039
9034
|
--wui-input-vertical-padding: var(--wui-space-02);
|
|
9040
9035
|
--wui-input-horizontal-padding: var(--wui-space-03);
|
|
9041
|
-
|
|
9042
|
-
/* Typography */
|
|
9043
9036
|
--wui-input-placeholder: var(--wui-gray-10);
|
|
9044
9037
|
--wui-input-font-size: var(--wui-typography-body-3-size);
|
|
9045
9038
|
--wui-input-line-height: 16px;
|
|
9046
|
-
--wui-input-font-weight: var(--wui-typography-weight-body);
|
|
9047
9039
|
`;
|
|
9048
9040
|
|
|
9049
9041
|
// src/components/Input/Input.tsx
|
|
@@ -9060,7 +9052,7 @@ var inputStyles = css25`
|
|
|
9060
9052
|
border-radius: var(--wui-input-border-radius);
|
|
9061
9053
|
font-size: var(--wui-input-font-size);
|
|
9062
9054
|
line-height: var(--wui-input-line-height);
|
|
9063
|
-
font-weight: var(--wui-
|
|
9055
|
+
font-weight: var(--wui-typography-weight-body);
|
|
9064
9056
|
color: var(--wui-input-color-text);
|
|
9065
9057
|
|
|
9066
9058
|
&::placeholder {
|
|
@@ -9230,11 +9222,15 @@ var StyledInput = styled31(Input)`
|
|
|
9230
9222
|
min-height: unset;
|
|
9231
9223
|
}
|
|
9232
9224
|
|
|
9225
|
+
resize: vertical;
|
|
9226
|
+
font-size: var(--wui-typography-heading-1-size);
|
|
9227
|
+
font-weight: var(--wui-typography-heading-1-weight);
|
|
9228
|
+
line-height: var(--wui-typography-heading-1-line-height);
|
|
9229
|
+
font-family: var(--wui-typography-heading-1-family);
|
|
9230
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
9231
|
+
outline-offset: -2px;
|
|
9232
|
+
|
|
9233
9233
|
&& {
|
|
9234
|
-
--wui-input-font-size: var(--wui-typography-heading-1-size);
|
|
9235
|
-
--wui-input-font-weight: var(--wui-typography-heading-1-weight);
|
|
9236
|
-
--wui-input-line-height: var(--wui-typography-heading-1-line-height);
|
|
9237
|
-
font-family: var(--wui-typography-heading-1-family);
|
|
9238
9234
|
width: 100%;
|
|
9239
9235
|
padding: var(--wui-space-02);
|
|
9240
9236
|
border: none;
|
|
@@ -9265,7 +9261,7 @@ var EditableHeading = ({
|
|
|
9265
9261
|
onEditingChange,
|
|
9266
9262
|
tooltipText = "Click to edit title",
|
|
9267
9263
|
ariaLabel = "Edit title",
|
|
9268
|
-
|
|
9264
|
+
forceEditing = false,
|
|
9269
9265
|
editingDisabled = false
|
|
9270
9266
|
}) => {
|
|
9271
9267
|
const [isEditing, setIsEditing] = useState6(false);
|
|
@@ -9318,7 +9314,7 @@ var EditableHeading = ({
|
|
|
9318
9314
|
if (editingDisabled) {
|
|
9319
9315
|
return HeadingComponent2;
|
|
9320
9316
|
}
|
|
9321
|
-
if (isEditing ||
|
|
9317
|
+
if (isEditing || forceEditing) {
|
|
9322
9318
|
return /* @__PURE__ */ jsx220(
|
|
9323
9319
|
StyledInput,
|
|
9324
9320
|
{
|