@wistia/ui 0.15.14-beta.701deb7c.dd1faf8 → 0.15.14-beta.859db709.362cab6
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.14-beta.
|
|
3
|
+
* @license @wistia/ui v0.15.14-beta.859db709.362cab6
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8255,7 +8255,7 @@ Avatar.displayName = "Avatar_UI";
|
|
|
8255
8255
|
// src/components/Badge/Badge.tsx
|
|
8256
8256
|
import { forwardRef as forwardRef4 } from "react";
|
|
8257
8257
|
import styled10 from "styled-components";
|
|
8258
|
-
import {
|
|
8258
|
+
import { isNotNil as isNotNil9 } from "@wistia/type-guards";
|
|
8259
8259
|
import { jsx as jsx205, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
8260
8260
|
var StyledBadge = styled10.div`
|
|
8261
8261
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -8296,7 +8296,7 @@ var Badge = forwardRef4(
|
|
|
8296
8296
|
$variant: variant,
|
|
8297
8297
|
children: [
|
|
8298
8298
|
hasIcon ? icon : null,
|
|
8299
|
-
|
|
8299
|
+
isNotNil9(label) ? /* @__PURE__ */ jsx205("span", { children: label }) : null
|
|
8300
8300
|
]
|
|
8301
8301
|
}
|
|
8302
8302
|
);
|
|
@@ -9361,7 +9361,7 @@ var Center = forwardRef9(
|
|
|
9361
9361
|
Center.displayName = "Center_UI";
|
|
9362
9362
|
|
|
9363
9363
|
// src/components/Checkbox/Checkbox.tsx
|
|
9364
|
-
import { isNonEmptyString as
|
|
9364
|
+
import { isNonEmptyString as isNonEmptyString3, isNotUndefined as isNotUndefined7 } from "@wistia/type-guards";
|
|
9365
9365
|
import { forwardRef as forwardRef12, useId as useId2 } from "react";
|
|
9366
9366
|
import styled27, { css as css26 } from "styled-components";
|
|
9367
9367
|
|
|
@@ -9491,7 +9491,7 @@ import { isArray } from "@wistia/type-guards";
|
|
|
9491
9491
|
// src/components/FormGroup/FormGroup.tsx
|
|
9492
9492
|
import styled25 from "styled-components";
|
|
9493
9493
|
import { useRef as useRef7 } from "react";
|
|
9494
|
-
import { isNonEmptyString as
|
|
9494
|
+
import { isNonEmptyString as isNonEmptyString2, isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
9495
9495
|
|
|
9496
9496
|
// src/components/Stack/Stack.tsx
|
|
9497
9497
|
import { forwardRef as forwardRef10 } from "react";
|
|
@@ -9546,8 +9546,8 @@ var FormGroup = ({
|
|
|
9546
9546
|
...props
|
|
9547
9547
|
}) => {
|
|
9548
9548
|
const ref = useRef7(null);
|
|
9549
|
-
const hasLabel = isNotNil16(label) &&
|
|
9550
|
-
const hasDescription = isNotNil16(description) &&
|
|
9549
|
+
const hasLabel = isNotNil16(label) && isNonEmptyString2(label);
|
|
9550
|
+
const hasDescription = isNotNil16(description) && isNonEmptyString2(description);
|
|
9551
9551
|
return /* @__PURE__ */ jsxs17(
|
|
9552
9552
|
Stack,
|
|
9553
9553
|
{
|
|
@@ -9849,7 +9849,7 @@ var Checkbox = forwardRef12(
|
|
|
9849
9849
|
...props
|
|
9850
9850
|
}, ref) => {
|
|
9851
9851
|
const generatedId = useId2();
|
|
9852
|
-
const computedId =
|
|
9852
|
+
const computedId = isNonEmptyString3(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
9853
9853
|
const checkboxGroupContext = useCheckboxGroup();
|
|
9854
9854
|
const contextName = checkboxGroupContext?.name;
|
|
9855
9855
|
const contextOnChange = checkboxGroupContext?.onChange;
|
|
@@ -11318,7 +11318,7 @@ import { useCallback as useCallback12 } from "react";
|
|
|
11318
11318
|
// src/components/Switch/Switch.tsx
|
|
11319
11319
|
import { forwardRef as forwardRef14, useId as useId3 } from "react";
|
|
11320
11320
|
import styled43, { css as css28 } from "styled-components";
|
|
11321
|
-
import { isNonEmptyString as
|
|
11321
|
+
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11322
11322
|
import { jsx as jsx245, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
11323
11323
|
var switchHeightMap = {
|
|
11324
11324
|
sm: 16,
|
|
@@ -11410,7 +11410,7 @@ var Switch = forwardRef14(
|
|
|
11410
11410
|
...props
|
|
11411
11411
|
}, ref) => {
|
|
11412
11412
|
const generatedId = useId3();
|
|
11413
|
-
const computedId =
|
|
11413
|
+
const computedId = isNonEmptyString4(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11414
11414
|
return /* @__PURE__ */ jsxs28(
|
|
11415
11415
|
StyledSwitchWrapper,
|
|
11416
11416
|
{
|
|
@@ -12433,7 +12433,7 @@ import { isArray as isArray2, isString as isString3 } from "@wistia/type-guards"
|
|
|
12433
12433
|
// src/components/Tag/Tag.tsx
|
|
12434
12434
|
import { forwardRef as forwardRef16 } from "react";
|
|
12435
12435
|
import styled49 from "styled-components";
|
|
12436
|
-
import { isNil as isNil15, isNotNil as isNotNil19, isNonEmptyString as
|
|
12436
|
+
import { isNil as isNil15, isNotNil as isNotNil19, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
12437
12437
|
import { Fragment as Fragment7, jsx as jsx255, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
12438
12438
|
var TagLabel = styled49.a`
|
|
12439
12439
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -12552,7 +12552,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12552
12552
|
var Tag = forwardRef16(
|
|
12553
12553
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12554
12554
|
const hasIcon = isNotNil19(icon);
|
|
12555
|
-
const labelProps = isNotNil19(href) &&
|
|
12555
|
+
const labelProps = isNotNil19(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
|
|
12556
12556
|
return /* @__PURE__ */ jsxs33(
|
|
12557
12557
|
StyledTag,
|
|
12558
12558
|
{
|
|
@@ -14175,7 +14175,7 @@ import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
|
14175
14175
|
|
|
14176
14176
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
14177
14177
|
import { createContext as createContext7, useMemo as useMemo13, useState as useState19, useCallback as useCallback16, useId as useId4 } from "react";
|
|
14178
|
-
import { isNonEmptyString as
|
|
14178
|
+
import { isNonEmptyString as isNonEmptyString6 } from "@wistia/type-guards";
|
|
14179
14179
|
import styled63 from "styled-components";
|
|
14180
14180
|
import { jsx as jsx277 } from "react/jsx-runtime";
|
|
14181
14181
|
var StyledEditableTextRoot = styled63.div`
|
|
@@ -14210,7 +14210,7 @@ var EditableTextRoot = ({
|
|
|
14210
14210
|
const [isEditing, setIsEditing] = useState19(false);
|
|
14211
14211
|
const value = isControlled ? controlledValue : internalValue;
|
|
14212
14212
|
const generatedId = useId4();
|
|
14213
|
-
const computedId =
|
|
14213
|
+
const computedId = isNonEmptyString6(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
14214
14214
|
const handleSetIsEditing = useCallback16(
|
|
14215
14215
|
(editing) => {
|
|
14216
14216
|
if (editing && !isEditing) {
|
|
@@ -15991,7 +15991,7 @@ var ProgressBar = ({
|
|
|
15991
15991
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
15992
15992
|
|
|
15993
15993
|
// src/components/Radio/Radio.tsx
|
|
15994
|
-
import { isNonEmptyString as
|
|
15994
|
+
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined13 } from "@wistia/type-guards";
|
|
15995
15995
|
import { forwardRef as forwardRef27, useId as useId5 } from "react";
|
|
15996
15996
|
import styled82, { css as css41 } from "styled-components";
|
|
15997
15997
|
import { jsx as jsx300, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -16091,7 +16091,7 @@ var Radio = forwardRef27(
|
|
|
16091
16091
|
...props
|
|
16092
16092
|
}, ref) => {
|
|
16093
16093
|
const generatedId = useId5();
|
|
16094
|
-
const computedId =
|
|
16094
|
+
const computedId = isNonEmptyString7(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16095
16095
|
const radioGroupContext = useRadioGroup();
|
|
16096
16096
|
const contextName = radioGroupContext?.name;
|
|
16097
16097
|
const contextOnChange = radioGroupContext?.onChange;
|
|
@@ -16145,7 +16145,7 @@ import { forwardRef as forwardRef29 } from "react";
|
|
|
16145
16145
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16146
16146
|
import { forwardRef as forwardRef28, useId as useId6 } from "react";
|
|
16147
16147
|
import styled83, { css as css42 } from "styled-components";
|
|
16148
|
-
import { isNonEmptyString as
|
|
16148
|
+
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
16149
16149
|
import { jsx as jsx301, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
16150
16150
|
var checkedStyles = css42`
|
|
16151
16151
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
@@ -16267,7 +16267,7 @@ var RadioCardRoot = forwardRef28(
|
|
|
16267
16267
|
...props
|
|
16268
16268
|
}, ref) => {
|
|
16269
16269
|
const generatedId = useId6();
|
|
16270
|
-
const computedId =
|
|
16270
|
+
const computedId = isNonEmptyString8(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16271
16271
|
const radioGroupContext = useRadioGroup();
|
|
16272
16272
|
const contextName = radioGroupContext?.name;
|
|
16273
16273
|
const contextOnChange = radioGroupContext?.onChange;
|
|
@@ -17085,7 +17085,7 @@ import {
|
|
|
17085
17085
|
Thumb as RadixSliderThumb
|
|
17086
17086
|
} from "@radix-ui/react-slider";
|
|
17087
17087
|
import styled94 from "styled-components";
|
|
17088
|
-
import { isNonEmptyString as
|
|
17088
|
+
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
17089
17089
|
import { jsx as jsx312, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
17090
17090
|
var SliderContainer = styled94.div`
|
|
17091
17091
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
@@ -17164,7 +17164,7 @@ var Slider = ({
|
|
|
17164
17164
|
"data-testid": dataTestId = "ui-slider",
|
|
17165
17165
|
...otherProps
|
|
17166
17166
|
}) => {
|
|
17167
|
-
if (!(
|
|
17167
|
+
if (!(isNonEmptyString9(ariaLabel) || isNonEmptyString9(ariaLabelledby))) {
|
|
17168
17168
|
throw new Error(
|
|
17169
17169
|
"UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
|
|
17170
17170
|
);
|