@wistia/ui 0.14.32 → 0.14.33
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 +36 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +35 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4110,6 +4110,12 @@ type TooltipProps = {
|
|
|
4110
4110
|
* Hides the arrow
|
|
4111
4111
|
*/
|
|
4112
4112
|
hideArrow?: boolean;
|
|
4113
|
+
/**
|
|
4114
|
+
* Specify a container element to portal the tooltip into.
|
|
4115
|
+
* Useful for rendering tooltips in contexts like pip windows.
|
|
4116
|
+
* @default document.body
|
|
4117
|
+
*/
|
|
4118
|
+
container?: Element | null;
|
|
4113
4119
|
};
|
|
4114
4120
|
/**
|
|
4115
4121
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
@@ -4117,7 +4123,7 @@ type TooltipProps = {
|
|
|
4117
4123
|
*
|
|
4118
4124
|
*/
|
|
4119
4125
|
declare const Tooltip: {
|
|
4120
|
-
({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
|
|
4126
|
+
({ delay, direction, content, children, forceOpen, hideArrow, container, }: TooltipProps): JSX.Element;
|
|
4121
4127
|
displayName: string;
|
|
4122
4128
|
};
|
|
4123
4129
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4110,6 +4110,12 @@ type TooltipProps = {
|
|
|
4110
4110
|
* Hides the arrow
|
|
4111
4111
|
*/
|
|
4112
4112
|
hideArrow?: boolean;
|
|
4113
|
+
/**
|
|
4114
|
+
* Specify a container element to portal the tooltip into.
|
|
4115
|
+
* Useful for rendering tooltips in contexts like pip windows.
|
|
4116
|
+
* @default document.body
|
|
4117
|
+
*/
|
|
4118
|
+
container?: Element | null;
|
|
4113
4119
|
};
|
|
4114
4120
|
/**
|
|
4115
4121
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
@@ -4117,7 +4123,7 @@ type TooltipProps = {
|
|
|
4117
4123
|
*
|
|
4118
4124
|
*/
|
|
4119
4125
|
declare const Tooltip: {
|
|
4120
|
-
({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
|
|
4126
|
+
({ delay, direction, content, children, forceOpen, hideArrow, container, }: TooltipProps): JSX.Element;
|
|
4121
4127
|
displayName: string;
|
|
4122
4128
|
};
|
|
4123
4129
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.33
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8852,22 +8852,44 @@ var Center = forwardRef9(
|
|
|
8852
8852
|
Center.displayName = "Center_UI";
|
|
8853
8853
|
|
|
8854
8854
|
// src/components/Checkbox/Checkbox.tsx
|
|
8855
|
+
import { isNonEmptyString as isNonEmptyString3, isNotUndefined as isNotUndefined7 } from "@wistia/type-guards";
|
|
8855
8856
|
import { forwardRef as forwardRef12, useId as useId2 } from "react";
|
|
8856
8857
|
import styled27, { css as css25 } from "styled-components";
|
|
8857
|
-
import { isNonEmptyString as isNonEmptyString3, isNotUndefined as isNotUndefined7 } from "@wistia/type-guards";
|
|
8858
8858
|
|
|
8859
8859
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8860
|
-
import styled23, { css as css24 } from "styled-components";
|
|
8861
8860
|
import { isNil as isNil12, isNotNil as isNotNil15 } from "@wistia/type-guards";
|
|
8861
|
+
import styled23, { css as css24 } from "styled-components";
|
|
8862
|
+
|
|
8863
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8864
|
+
import styled21 from "styled-components";
|
|
8865
|
+
import { isNotNil as isNotNil14 } from "@wistia/type-guards";
|
|
8866
|
+
import { jsx as jsx214 } from "react/jsx-runtime";
|
|
8867
|
+
var VisuallyHidden = styled21.div({ ...visuallyHiddenStyle });
|
|
8868
|
+
var VisuallyHiddenButFocusable = styled21.div({
|
|
8869
|
+
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8870
|
+
});
|
|
8871
|
+
var ScreenReaderOnly = ({
|
|
8872
|
+
text,
|
|
8873
|
+
children,
|
|
8874
|
+
focusable = false,
|
|
8875
|
+
...props
|
|
8876
|
+
}) => {
|
|
8877
|
+
const accessibleText = isNotNil14(text) ? text : children;
|
|
8878
|
+
if (focusable) {
|
|
8879
|
+
return /* @__PURE__ */ jsx214(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
|
|
8880
|
+
}
|
|
8881
|
+
return /* @__PURE__ */ jsx214(VisuallyHidden, { ...props, children: accessibleText });
|
|
8882
|
+
};
|
|
8883
|
+
ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
|
|
8862
8884
|
|
|
8863
8885
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
8864
|
-
import
|
|
8886
|
+
import styled22, { css as css23 } from "styled-components";
|
|
8865
8887
|
import { isNil as isNil11 } from "@wistia/type-guards";
|
|
8866
|
-
import { jsx as
|
|
8888
|
+
import { jsx as jsx215 } from "react/jsx-runtime";
|
|
8867
8889
|
var disabledStyle = css23`
|
|
8868
8890
|
color: var(--wui-color-text-disabled);
|
|
8869
8891
|
`;
|
|
8870
|
-
var StyledFormControlLabelDescription =
|
|
8892
|
+
var StyledFormControlLabelDescription = styled22.div`
|
|
8871
8893
|
color: var(--wui-color-text-secondary);
|
|
8872
8894
|
display: block;
|
|
8873
8895
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -8884,7 +8906,7 @@ var FormControlLabelDescription = ({
|
|
|
8884
8906
|
if (isNil11(children)) {
|
|
8885
8907
|
return null;
|
|
8886
8908
|
}
|
|
8887
|
-
return /* @__PURE__ */
|
|
8909
|
+
return /* @__PURE__ */ jsx215(
|
|
8888
8910
|
StyledFormControlLabelDescription,
|
|
8889
8911
|
{
|
|
8890
8912
|
...props,
|
|
@@ -8895,28 +8917,6 @@ var FormControlLabelDescription = ({
|
|
|
8895
8917
|
};
|
|
8896
8918
|
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
8897
8919
|
|
|
8898
|
-
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8899
|
-
import styled22 from "styled-components";
|
|
8900
|
-
import { isNotNil as isNotNil14 } from "@wistia/type-guards";
|
|
8901
|
-
import { jsx as jsx215 } from "react/jsx-runtime";
|
|
8902
|
-
var VisuallyHidden = styled22.div({ ...visuallyHiddenStyle });
|
|
8903
|
-
var VisuallyHiddenButFocusable = styled22.div({
|
|
8904
|
-
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8905
|
-
});
|
|
8906
|
-
var ScreenReaderOnly = ({
|
|
8907
|
-
text,
|
|
8908
|
-
children,
|
|
8909
|
-
focusable = false,
|
|
8910
|
-
...props
|
|
8911
|
-
}) => {
|
|
8912
|
-
const accessibleText = isNotNil14(text) ? text : children;
|
|
8913
|
-
if (focusable) {
|
|
8914
|
-
return /* @__PURE__ */ jsx215(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
|
|
8915
|
-
}
|
|
8916
|
-
return /* @__PURE__ */ jsx215(VisuallyHidden, { ...props, children: accessibleText });
|
|
8917
|
-
};
|
|
8918
|
-
ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
|
|
8919
|
-
|
|
8920
8920
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8921
8921
|
import { jsx as jsx216, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8922
8922
|
var disabledStyle2 = css24`
|
|
@@ -8930,7 +8930,7 @@ var StyledLabelWrapper = styled23.div`
|
|
|
8930
8930
|
var StyledFormControlLabel = styled23.label`
|
|
8931
8931
|
cursor: pointer;
|
|
8932
8932
|
display: flex;
|
|
8933
|
-
align-items:
|
|
8933
|
+
align-items: flex-start;
|
|
8934
8934
|
gap: var(--wui-space-02);
|
|
8935
8935
|
width: 100%;
|
|
8936
8936
|
color: var(--wui-color-tex);
|
|
@@ -9299,7 +9299,6 @@ var StyledCheckboxInput = styled27.div`
|
|
|
9299
9299
|
border-radius: var(--wui-border-radius-01);
|
|
9300
9300
|
display: grid;
|
|
9301
9301
|
place-content: center;
|
|
9302
|
-
align-self: flex-start;
|
|
9303
9302
|
border-width: 1px;
|
|
9304
9303
|
border-style: solid;
|
|
9305
9304
|
border-color: var(--wui-checkbox-border-color);
|
|
@@ -10361,7 +10360,8 @@ var Tooltip = ({
|
|
|
10361
10360
|
content,
|
|
10362
10361
|
children,
|
|
10363
10362
|
forceOpen,
|
|
10364
|
-
hideArrow = false
|
|
10363
|
+
hideArrow = false,
|
|
10364
|
+
container = null
|
|
10365
10365
|
}) => {
|
|
10366
10366
|
const rootProps = {};
|
|
10367
10367
|
if (content === "" || content === null) {
|
|
@@ -10377,7 +10377,7 @@ var Tooltip = ({
|
|
|
10377
10377
|
...rootProps,
|
|
10378
10378
|
children: [
|
|
10379
10379
|
/* @__PURE__ */ jsx230(TooltipTrigger, { asChild: true, children }),
|
|
10380
|
-
/* @__PURE__ */ jsx230(TooltipPortal, { children: /* @__PURE__ */ jsxs22(
|
|
10380
|
+
/* @__PURE__ */ jsx230(TooltipPortal, { container, children: /* @__PURE__ */ jsxs22(
|
|
10381
10381
|
StyledContent,
|
|
10382
10382
|
{
|
|
10383
10383
|
side: direction,
|
|
@@ -10963,7 +10963,7 @@ var ContrastEnforcerSwitch = () => {
|
|
|
10963
10963
|
{
|
|
10964
10964
|
align: "right",
|
|
10965
10965
|
checked: shouldEnforceMinContrast,
|
|
10966
|
-
label:
|
|
10966
|
+
label: "Limit to high-contrast colors",
|
|
10967
10967
|
onChange: onChangeContrastLimitedSwitch
|
|
10968
10968
|
}
|
|
10969
10969
|
);
|
|
@@ -15402,9 +15402,9 @@ var ProgressBar = ({
|
|
|
15402
15402
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
15403
15403
|
|
|
15404
15404
|
// src/components/Radio/Radio.tsx
|
|
15405
|
+
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined13 } from "@wistia/type-guards";
|
|
15405
15406
|
import { forwardRef as forwardRef27, useId as useId5 } from "react";
|
|
15406
15407
|
import styled82, { css as css40 } from "styled-components";
|
|
15407
|
-
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined13 } from "@wistia/type-guards";
|
|
15408
15408
|
import { jsx as jsx297, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
15409
15409
|
var sizeSmall2 = css40`
|
|
15410
15410
|
--wui-radio-size: 14px;
|
|
@@ -15459,7 +15459,6 @@ var StyledRadioWrapper = styled82.div`
|
|
|
15459
15459
|
`;
|
|
15460
15460
|
var StyledRadioInput = styled82.div`
|
|
15461
15461
|
${({ $size }) => getSizeCss3($size)}
|
|
15462
|
-
align-self: flex-start;
|
|
15463
15462
|
width: var(--wui-radio-size);
|
|
15464
15463
|
height: var(--wui-radio-size);
|
|
15465
15464
|
min-width: var(--wui-radio-size);
|