@wistia/ui 0.18.14-beta.3d78b4cc.f1b5721 → 0.18.14-beta.68be1bd5.aa62ddb
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 +13 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +12 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.14-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.14-beta.68be1bd5.aa62ddb
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -208,8 +208,6 @@ var import_styled_components13 = require("styled-components");
|
|
|
208
208
|
// src/css/globalStyleAdjustmentsCss.tsx
|
|
209
209
|
var import_styled_components = require("styled-components");
|
|
210
210
|
var globalStyleAdjustmentsCss = import_styled_components.css`
|
|
211
|
-
/* stylelint-disable property-no-vendor-prefix */
|
|
212
|
-
|
|
213
211
|
/**
|
|
214
212
|
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
215
213
|
See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
@@ -7943,19 +7941,9 @@ Icon.displayName = "Icon_UI";
|
|
|
7943
7941
|
// src/components/Link/Link.tsx
|
|
7944
7942
|
var import_react22 = require("react");
|
|
7945
7943
|
var import_styled_components22 = require("styled-components");
|
|
7944
|
+
var import_react_router = require("react-router");
|
|
7946
7945
|
var import_type_guards14 = require("@wistia/type-guards");
|
|
7947
7946
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
7948
|
-
var RouterLink = null;
|
|
7949
|
-
var useInRouterContext = () => false;
|
|
7950
|
-
var isRouterEnabled = false;
|
|
7951
|
-
import("react-router").then((module2) => {
|
|
7952
|
-
RouterLink = module2.Link;
|
|
7953
|
-
useInRouterContext = module2.useInRouterContext;
|
|
7954
|
-
isRouterEnabled = true;
|
|
7955
|
-
return module2;
|
|
7956
|
-
}).catch(() => {
|
|
7957
|
-
isRouterEnabled = false;
|
|
7958
|
-
});
|
|
7959
7947
|
var generateHref = (href, type, disabled) => {
|
|
7960
7948
|
if (disabled || (0, import_type_guards14.isNil)(href)) {
|
|
7961
7949
|
return void 0;
|
|
@@ -8014,9 +8002,9 @@ var Link = (0, import_react22.forwardRef)(
|
|
|
8014
8002
|
role,
|
|
8015
8003
|
...props
|
|
8016
8004
|
}, ref) => {
|
|
8017
|
-
const
|
|
8005
|
+
const inRouterContext = (0, import_react_router.useInRouterContext)();
|
|
8018
8006
|
const to = generateHref(props.href, type, disabled);
|
|
8019
|
-
const shouldUseReactRouterLink =
|
|
8007
|
+
const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
|
|
8020
8008
|
const handleClick = async (event) => {
|
|
8021
8009
|
if (disabled) {
|
|
8022
8010
|
event.preventDefault();
|
|
@@ -8065,7 +8053,8 @@ var Link = (0, import_react22.forwardRef)(
|
|
|
8065
8053
|
const externalLinkProps = type === "external" ? { target: "_blank", rel: "noopener noreferrer" } : null;
|
|
8066
8054
|
const routerSpecificProps = shouldUseReactRouterLink ? {
|
|
8067
8055
|
// TODO: Using 'any' here due to styled-components typing limitations with RouterLink
|
|
8068
|
-
|
|
8056
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
8057
|
+
as: import_react_router.Link,
|
|
8069
8058
|
to: to ?? ""
|
|
8070
8059
|
} : {
|
|
8071
8060
|
as: "a",
|
|
@@ -8251,7 +8240,7 @@ var StyledActionButton = (0, import_styled_components24.styled)(Button)`
|
|
|
8251
8240
|
min-width: 96px;
|
|
8252
8241
|
padding: var(--wui-space-03);
|
|
8253
8242
|
background: var(--wui-color-bg-surface-secondary);
|
|
8254
|
-
|
|
8243
|
+
row-gap: var(--wui-space-02);
|
|
8255
8244
|
border-radius: var(--wui-border-radius-03);
|
|
8256
8245
|
flex: 0 0 auto;
|
|
8257
8246
|
transition: background-color var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
@@ -10374,9 +10363,9 @@ var isClickableElement = (element) => {
|
|
|
10374
10363
|
};
|
|
10375
10364
|
var ClickRegion = ({ children, targetRef }) => {
|
|
10376
10365
|
(0, import_react39.useEffect)(() => {
|
|
10377
|
-
if (targetRef.current
|
|
10366
|
+
if (targetRef.current?.tagName === "A") {
|
|
10378
10367
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
10379
|
-
} else if (targetRef.current
|
|
10368
|
+
} else if (targetRef.current?.tagName === "BUTTON") {
|
|
10380
10369
|
targetRef.current.setAttribute("data-click-region-target-button", "");
|
|
10381
10370
|
} else {
|
|
10382
10371
|
}
|
|
@@ -14825,7 +14814,10 @@ var StyledEditableTextDisplay = import_styled_components85.styled.div`
|
|
|
14825
14814
|
${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components85.css`
|
|
14826
14815
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14827
14816
|
`}
|
|
14828
|
-
|
|
14817
|
+
/* overflow-wrap: break-word;
|
|
14818
|
+
word-break: break-word; */
|
|
14819
|
+
word-break: normal;
|
|
14820
|
+
overflow-wrap: anywhere;
|
|
14829
14821
|
|
|
14830
14822
|
&[data-wui-editable-text-display='placeholder'] {
|
|
14831
14823
|
color: var(--wui-color-text-secondary);
|