@wistia/ui 0.8.1 → 0.8.2-beta.16b605aa.d0ead36
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 +20 -14
- 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 +20 -14
- 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.8.
|
|
3
|
+
* @license @wistia/ui v0.8.2-beta.16b605aa.d0ead36
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7033,11 +7033,14 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7033
7033
|
}, ref) => {
|
|
7034
7034
|
const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
|
|
7035
7035
|
const to = generateHref(props.href, type, disabled);
|
|
7036
|
+
const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
|
|
7036
7037
|
const handleClick = async (event) => {
|
|
7037
7038
|
if (disabled) {
|
|
7038
7039
|
event.preventDefault();
|
|
7039
7040
|
} else if (beforeAction) {
|
|
7040
|
-
|
|
7041
|
+
if (!shouldUseReactRouterLink) {
|
|
7042
|
+
event.preventDefault();
|
|
7043
|
+
}
|
|
7041
7044
|
try {
|
|
7042
7045
|
await beforeAction();
|
|
7043
7046
|
} catch (error) {
|
|
@@ -7081,7 +7084,6 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7081
7084
|
...commonProps,
|
|
7082
7085
|
...externalLinkProps
|
|
7083
7086
|
};
|
|
7084
|
-
const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
|
|
7085
7087
|
return shouldUseReactRouterLink ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7086
7088
|
StyledLink,
|
|
7087
7089
|
{
|
|
@@ -9139,6 +9141,7 @@ var import_type_guards31 = require("@wistia/type-guards");
|
|
|
9139
9141
|
// src/css/sharedStyles/inputCssVariables.ts
|
|
9140
9142
|
var import_styled_components45 = require("styled-components");
|
|
9141
9143
|
var inputCssVariables = import_styled_components45.css`
|
|
9144
|
+
/* Colors */
|
|
9142
9145
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
9143
9146
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
9144
9147
|
--wui-input-color-border: var(--wui-color-border-secondary);
|
|
@@ -9146,13 +9149,20 @@ var inputCssVariables = import_styled_components45.css`
|
|
|
9146
9149
|
--wui-input-color-border-error: var(--wui-color-invalid-indicator);
|
|
9147
9150
|
--wui-input-color-border-disabled: var(--wui-color-border-disabled);
|
|
9148
9151
|
--wui-input-color-text: var(--wui-color-text);
|
|
9152
|
+
|
|
9153
|
+
/* Border */
|
|
9149
9154
|
--wui-input-border-radius: var(--wui-border-radius-03);
|
|
9150
9155
|
--wui-input-multiline-border-radius: var(--wui-border-radius-02);
|
|
9156
|
+
|
|
9157
|
+
/* Padding */
|
|
9151
9158
|
--wui-input-vertical-padding: var(--wui-space-02);
|
|
9152
9159
|
--wui-input-horizontal-padding: var(--wui-space-03);
|
|
9160
|
+
|
|
9161
|
+
/* Typography */
|
|
9153
9162
|
--wui-input-placeholder: var(--wui-gray-10);
|
|
9154
9163
|
--wui-input-font-size: var(--wui-typography-body-3-size);
|
|
9155
9164
|
--wui-input-line-height: 16px;
|
|
9165
|
+
--wui-input-font-weight: var(--wui-typography-weight-body);
|
|
9156
9166
|
`;
|
|
9157
9167
|
|
|
9158
9168
|
// src/components/Input/Input.tsx
|
|
@@ -9169,7 +9179,7 @@ var inputStyles = import_styled_components46.css`
|
|
|
9169
9179
|
border-radius: var(--wui-input-border-radius);
|
|
9170
9180
|
font-size: var(--wui-input-font-size);
|
|
9171
9181
|
line-height: var(--wui-input-line-height);
|
|
9172
|
-
font-weight: var(--wui-
|
|
9182
|
+
font-weight: var(--wui-input-font-weight);
|
|
9173
9183
|
color: var(--wui-input-color-text);
|
|
9174
9184
|
|
|
9175
9185
|
&::placeholder {
|
|
@@ -9339,15 +9349,11 @@ var StyledInput = (0, import_styled_components47.default)(Input)`
|
|
|
9339
9349
|
min-height: unset;
|
|
9340
9350
|
}
|
|
9341
9351
|
|
|
9342
|
-
resize: vertical;
|
|
9343
|
-
font-size: var(--wui-typography-heading-1-size);
|
|
9344
|
-
font-weight: var(--wui-typography-heading-1-weight);
|
|
9345
|
-
line-height: var(--wui-typography-heading-1-line-height);
|
|
9346
|
-
font-family: var(--wui-typography-heading-1-family);
|
|
9347
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
9348
|
-
outline-offset: -2px;
|
|
9349
|
-
|
|
9350
9352
|
&& {
|
|
9353
|
+
--wui-input-font-size: var(--wui-typography-heading-1-size);
|
|
9354
|
+
--wui-input-font-weight: var(--wui-typography-heading-1-weight);
|
|
9355
|
+
--wui-input-line-height: var(--wui-typography-heading-1-line-height);
|
|
9356
|
+
font-family: var(--wui-typography-heading-1-family);
|
|
9351
9357
|
width: 100%;
|
|
9352
9358
|
padding: var(--wui-space-02);
|
|
9353
9359
|
border: none;
|
|
@@ -9378,7 +9384,7 @@ var EditableHeading = ({
|
|
|
9378
9384
|
onEditingChange,
|
|
9379
9385
|
tooltipText = "Click to edit title",
|
|
9380
9386
|
ariaLabel = "Edit title",
|
|
9381
|
-
|
|
9387
|
+
__forceEditing = false,
|
|
9382
9388
|
editingDisabled = false
|
|
9383
9389
|
}) => {
|
|
9384
9390
|
const [isEditing, setIsEditing] = (0, import_react29.useState)(false);
|
|
@@ -9431,7 +9437,7 @@ var EditableHeading = ({
|
|
|
9431
9437
|
if (editingDisabled) {
|
|
9432
9438
|
return HeadingComponent2;
|
|
9433
9439
|
}
|
|
9434
|
-
if (isEditing ||
|
|
9440
|
+
if (isEditing || __forceEditing) {
|
|
9435
9441
|
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9436
9442
|
StyledInput,
|
|
9437
9443
|
{
|