@wistia/ui 0.4.6-beta.c8781aca.f327beb → 0.4.6
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 +42 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +8 -51
- package/dist/index.d.ts +8 -51
- package/dist/index.mjs +42 -149
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -4
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,6 @@ import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, Com
|
|
|
4
4
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
|
|
7
|
-
import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
|
|
8
7
|
|
|
9
8
|
type UIProviderProps = {
|
|
10
9
|
children: ReactNode;
|
|
@@ -281,7 +280,7 @@ declare const useWindowSize: (interval?: number) => {
|
|
|
281
280
|
|
|
282
281
|
type ActionButtonProps = {
|
|
283
282
|
/**
|
|
284
|
-
* The
|
|
283
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
285
284
|
*/
|
|
286
285
|
icon: JSX.Element;
|
|
287
286
|
/**
|
|
@@ -302,7 +301,7 @@ type ActionButtonProps = {
|
|
|
302
301
|
*/
|
|
303
302
|
declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
304
303
|
/**
|
|
305
|
-
* The
|
|
304
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
306
305
|
*/
|
|
307
306
|
icon: JSX.Element;
|
|
308
307
|
/**
|
|
@@ -319,7 +318,7 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
319
318
|
variant?: "default" | "gated" | "menu-down" | "menu-up";
|
|
320
319
|
} & Omit<ButtonAsButtonProps, "size" | "isLoading" | "leftIcon" | "fullWidth" | "unstyled" | "rightIcon" | "variant">, "ref"> | Omit<{
|
|
321
320
|
/**
|
|
322
|
-
* The
|
|
321
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
323
322
|
*/
|
|
324
323
|
icon: JSX.Element;
|
|
325
324
|
/**
|
|
@@ -692,7 +691,7 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
|
|
|
692
691
|
*/
|
|
693
692
|
name?: string | undefined;
|
|
694
693
|
/**
|
|
695
|
-
* Callback function invoked when the value changes
|
|
694
|
+
* Callback function invoked when the checkbox value changes
|
|
696
695
|
*/
|
|
697
696
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
698
697
|
/**
|
|
@@ -1238,7 +1237,7 @@ type IconButtonProps = {
|
|
|
1238
1237
|
*/
|
|
1239
1238
|
label: string;
|
|
1240
1239
|
/**
|
|
1241
|
-
* The
|
|
1240
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1242
1241
|
*/
|
|
1243
1242
|
children: JSX.Element;
|
|
1244
1243
|
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
@@ -1252,7 +1251,7 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1252
1251
|
*/
|
|
1253
1252
|
label: string;
|
|
1254
1253
|
/**
|
|
1255
|
-
* The
|
|
1254
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1256
1255
|
*/
|
|
1257
1256
|
children: JSX.Element;
|
|
1258
1257
|
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
@@ -1261,7 +1260,7 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1261
1260
|
*/
|
|
1262
1261
|
label: string;
|
|
1263
1262
|
/**
|
|
1264
|
-
* The
|
|
1263
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1265
1264
|
*/
|
|
1266
1265
|
children: JSX.Element;
|
|
1267
1266
|
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
@@ -2008,48 +2007,6 @@ declare const ScreenReaderOnly: {
|
|
|
2008
2007
|
displayName: string;
|
|
2009
2008
|
};
|
|
2010
2009
|
|
|
2011
|
-
type SegmentedControlProps = Omit<ToggleGroupSingleProps, 'type'> & {
|
|
2012
|
-
/**
|
|
2013
|
-
* `SegmentedControlItem`s that will be rendered in grouping
|
|
2014
|
-
*/
|
|
2015
|
-
children?: ReactNode;
|
|
2016
|
-
/**
|
|
2017
|
-
* Force `SegmentedControl` to fill the width of it's container
|
|
2018
|
-
*/
|
|
2019
|
-
fullWidth?: boolean | undefined;
|
|
2020
|
-
/**
|
|
2021
|
-
* Callback function invoked when the value changes
|
|
2022
|
-
*/
|
|
2023
|
-
onSelectedValueChange: (value: string) => void;
|
|
2024
|
-
/**
|
|
2025
|
-
* The value of the `SegmentedControlItem` which should be selected
|
|
2026
|
-
*/
|
|
2027
|
-
selectedValue: string;
|
|
2028
|
-
};
|
|
2029
|
-
/**
|
|
2030
|
-
* Provides a horizontal set of segments for switching between different values
|
|
2031
|
-
*/
|
|
2032
|
-
declare const SegmentedControl: {
|
|
2033
|
-
({ children, fullWidth, selectedValue, onSelectedValueChange, ...props }: SegmentedControlProps): JSX.Element | null;
|
|
2034
|
-
displayName: string;
|
|
2035
|
-
};
|
|
2036
|
-
|
|
2037
|
-
type SegmentedControlItemProps = {
|
|
2038
|
-
/**
|
|
2039
|
-
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
2040
|
-
*/
|
|
2041
|
-
icon?: JSX.Element;
|
|
2042
|
-
/**
|
|
2043
|
-
* The label of the item
|
|
2044
|
-
*/
|
|
2045
|
-
label?: string | undefined;
|
|
2046
|
-
/**
|
|
2047
|
-
* The value of the item
|
|
2048
|
-
*/
|
|
2049
|
-
value: string;
|
|
2050
|
-
};
|
|
2051
|
-
declare const SegmentedControlItem: ({ icon, label, value, }: SegmentedControlItemProps) => JSX.Element;
|
|
2052
|
-
|
|
2053
2010
|
type StackProps = {
|
|
2054
2011
|
/**
|
|
2055
2012
|
* Optional children
|
|
@@ -2206,4 +2163,4 @@ declare const WistiaLogo: {
|
|
|
2206
2163
|
displayName: string;
|
|
2207
2164
|
};
|
|
2208
2165
|
|
|
2209
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb,
|
|
2166
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, Com
|
|
|
4
4
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
|
|
7
|
-
import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
|
|
8
7
|
|
|
9
8
|
type UIProviderProps = {
|
|
10
9
|
children: ReactNode;
|
|
@@ -281,7 +280,7 @@ declare const useWindowSize: (interval?: number) => {
|
|
|
281
280
|
|
|
282
281
|
type ActionButtonProps = {
|
|
283
282
|
/**
|
|
284
|
-
* The
|
|
283
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
285
284
|
*/
|
|
286
285
|
icon: JSX.Element;
|
|
287
286
|
/**
|
|
@@ -302,7 +301,7 @@ type ActionButtonProps = {
|
|
|
302
301
|
*/
|
|
303
302
|
declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
304
303
|
/**
|
|
305
|
-
* The
|
|
304
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
306
305
|
*/
|
|
307
306
|
icon: JSX.Element;
|
|
308
307
|
/**
|
|
@@ -319,7 +318,7 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
319
318
|
variant?: "default" | "gated" | "menu-down" | "menu-up";
|
|
320
319
|
} & Omit<ButtonAsButtonProps, "size" | "isLoading" | "leftIcon" | "fullWidth" | "unstyled" | "rightIcon" | "variant">, "ref"> | Omit<{
|
|
321
320
|
/**
|
|
322
|
-
* The
|
|
321
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
323
322
|
*/
|
|
324
323
|
icon: JSX.Element;
|
|
325
324
|
/**
|
|
@@ -692,7 +691,7 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
|
|
|
692
691
|
*/
|
|
693
692
|
name?: string | undefined;
|
|
694
693
|
/**
|
|
695
|
-
* Callback function invoked when the value changes
|
|
694
|
+
* Callback function invoked when the checkbox value changes
|
|
696
695
|
*/
|
|
697
696
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
698
697
|
/**
|
|
@@ -1238,7 +1237,7 @@ type IconButtonProps = {
|
|
|
1238
1237
|
*/
|
|
1239
1238
|
label: string;
|
|
1240
1239
|
/**
|
|
1241
|
-
* The
|
|
1240
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1242
1241
|
*/
|
|
1243
1242
|
children: JSX.Element;
|
|
1244
1243
|
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
@@ -1252,7 +1251,7 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1252
1251
|
*/
|
|
1253
1252
|
label: string;
|
|
1254
1253
|
/**
|
|
1255
|
-
* The
|
|
1254
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1256
1255
|
*/
|
|
1257
1256
|
children: JSX.Element;
|
|
1258
1257
|
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
@@ -1261,7 +1260,7 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1261
1260
|
*/
|
|
1262
1261
|
label: string;
|
|
1263
1262
|
/**
|
|
1264
|
-
* The
|
|
1263
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
1265
1264
|
*/
|
|
1266
1265
|
children: JSX.Element;
|
|
1267
1266
|
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
@@ -2008,48 +2007,6 @@ declare const ScreenReaderOnly: {
|
|
|
2008
2007
|
displayName: string;
|
|
2009
2008
|
};
|
|
2010
2009
|
|
|
2011
|
-
type SegmentedControlProps = Omit<ToggleGroupSingleProps, 'type'> & {
|
|
2012
|
-
/**
|
|
2013
|
-
* `SegmentedControlItem`s that will be rendered in grouping
|
|
2014
|
-
*/
|
|
2015
|
-
children?: ReactNode;
|
|
2016
|
-
/**
|
|
2017
|
-
* Force `SegmentedControl` to fill the width of it's container
|
|
2018
|
-
*/
|
|
2019
|
-
fullWidth?: boolean | undefined;
|
|
2020
|
-
/**
|
|
2021
|
-
* Callback function invoked when the value changes
|
|
2022
|
-
*/
|
|
2023
|
-
onSelectedValueChange: (value: string) => void;
|
|
2024
|
-
/**
|
|
2025
|
-
* The value of the `SegmentedControlItem` which should be selected
|
|
2026
|
-
*/
|
|
2027
|
-
selectedValue: string;
|
|
2028
|
-
};
|
|
2029
|
-
/**
|
|
2030
|
-
* Provides a horizontal set of segments for switching between different values
|
|
2031
|
-
*/
|
|
2032
|
-
declare const SegmentedControl: {
|
|
2033
|
-
({ children, fullWidth, selectedValue, onSelectedValueChange, ...props }: SegmentedControlProps): JSX.Element | null;
|
|
2034
|
-
displayName: string;
|
|
2035
|
-
};
|
|
2036
|
-
|
|
2037
|
-
type SegmentedControlItemProps = {
|
|
2038
|
-
/**
|
|
2039
|
-
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
2040
|
-
*/
|
|
2041
|
-
icon?: JSX.Element;
|
|
2042
|
-
/**
|
|
2043
|
-
* The label of the item
|
|
2044
|
-
*/
|
|
2045
|
-
label?: string | undefined;
|
|
2046
|
-
/**
|
|
2047
|
-
* The value of the item
|
|
2048
|
-
*/
|
|
2049
|
-
value: string;
|
|
2050
|
-
};
|
|
2051
|
-
declare const SegmentedControlItem: ({ icon, label, value, }: SegmentedControlItemProps) => JSX.Element;
|
|
2052
|
-
|
|
2053
2010
|
type StackProps = {
|
|
2054
2011
|
/**
|
|
2055
2012
|
* Optional children
|
|
@@ -2206,4 +2163,4 @@ declare const WistiaLogo: {
|
|
|
2206
2163
|
displayName: string;
|
|
2207
2164
|
};
|
|
2208
2165
|
|
|
2209
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb,
|
|
2166
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.4.6
|
|
3
|
+
* @license @wistia/ui v0.4.6
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -5929,7 +5929,7 @@ var StyledBadge = styled9.div`
|
|
|
5929
5929
|
padding: var(--wui-space-01) var(--wui-space-02);
|
|
5930
5930
|
width: fit-content;
|
|
5931
5931
|
|
|
5932
|
-
/*
|
|
5932
|
+
/* TODO should these be a token? */
|
|
5933
5933
|
svg {
|
|
5934
5934
|
height: 12px;
|
|
5935
5935
|
width: 12px;
|
|
@@ -8352,117 +8352,12 @@ var Radio = forwardRef17(
|
|
|
8352
8352
|
);
|
|
8353
8353
|
Radio.displayName = "Radio";
|
|
8354
8354
|
|
|
8355
|
-
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
8356
|
-
import styled38 from "styled-components";
|
|
8357
|
-
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
8358
|
-
import { isNil as isNil11 } from "@wistia/type-guards";
|
|
8359
|
-
import { jsx as jsx203 } from "react/jsx-runtime";
|
|
8360
|
-
var StyledSegmentedControl = styled38(ToggleGroupRoot)`
|
|
8361
|
-
display: inline-flex;
|
|
8362
|
-
background-color: var(--wui-color-bg-surface-secondary);
|
|
8363
|
-
border-radius: var(--wui-border-radius-rounded);
|
|
8364
|
-
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
8365
|
-
gap: var(--wui-space-01);
|
|
8366
|
-
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
8367
|
-
`;
|
|
8368
|
-
var SegmentedControl = ({
|
|
8369
|
-
children,
|
|
8370
|
-
fullWidth = false,
|
|
8371
|
-
selectedValue,
|
|
8372
|
-
onSelectedValueChange,
|
|
8373
|
-
...props
|
|
8374
|
-
}) => {
|
|
8375
|
-
if (isNil11(children)) {
|
|
8376
|
-
return null;
|
|
8377
|
-
}
|
|
8378
|
-
return /* @__PURE__ */ jsx203(
|
|
8379
|
-
StyledSegmentedControl,
|
|
8380
|
-
{
|
|
8381
|
-
$fullWidth: fullWidth,
|
|
8382
|
-
loop: true,
|
|
8383
|
-
onValueChange: onSelectedValueChange,
|
|
8384
|
-
rovingFocus: true,
|
|
8385
|
-
type: "single",
|
|
8386
|
-
value: selectedValue,
|
|
8387
|
-
...props,
|
|
8388
|
-
children
|
|
8389
|
-
}
|
|
8390
|
-
);
|
|
8391
|
-
};
|
|
8392
|
-
SegmentedControl.displayName = "SegmentedControl";
|
|
8393
|
-
|
|
8394
|
-
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
8395
|
-
import styled39 from "styled-components";
|
|
8396
|
-
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
8397
|
-
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
8398
|
-
import { jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8399
|
-
var StyledSegmentedControlItem = styled39(ToggleGroupItem)`
|
|
8400
|
-
all: unset; /* ToggleGroupItem is a button element */
|
|
8401
|
-
align-items: center;
|
|
8402
|
-
border-radius: var(--wui-border-radius-rounded);
|
|
8403
|
-
color: var(--wui-color-text-secondary);
|
|
8404
|
-
cursor: pointer;
|
|
8405
|
-
display: flex;
|
|
8406
|
-
flex-grow: 1;
|
|
8407
|
-
flex-shrink: 1;
|
|
8408
|
-
font-size: var(--wui-typography-label-3-size);
|
|
8409
|
-
justify-content: center;
|
|
8410
|
-
padding: 6px 8px;
|
|
8411
|
-
user-select: none;
|
|
8412
|
-
|
|
8413
|
-
/* Icon component */
|
|
8414
|
-
svg {
|
|
8415
|
-
height: 16px;
|
|
8416
|
-
width: 16px;
|
|
8417
|
-
|
|
8418
|
-
/* add right margin if there's a label and an icon */
|
|
8419
|
-
${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
|
|
8420
|
-
}
|
|
8421
|
-
|
|
8422
|
-
&:hover {
|
|
8423
|
-
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8424
|
-
}
|
|
8425
|
-
|
|
8426
|
-
&:focus-visible {
|
|
8427
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
8428
|
-
}
|
|
8429
|
-
|
|
8430
|
-
&[data-state='on'] {
|
|
8431
|
-
background-color: var(--wui-color-bg-fill-white);
|
|
8432
|
-
color: var(--wui-color-text-selected);
|
|
8433
|
-
}
|
|
8434
|
-
|
|
8435
|
-
&:focus-visible,
|
|
8436
|
-
&[data-state='on'] {
|
|
8437
|
-
svg path {
|
|
8438
|
-
fill: var(--wui-color-focus-ring);
|
|
8439
|
-
}
|
|
8440
|
-
}
|
|
8441
|
-
`;
|
|
8442
|
-
var SegmentedControlItem = ({
|
|
8443
|
-
icon,
|
|
8444
|
-
label,
|
|
8445
|
-
value
|
|
8446
|
-
}) => {
|
|
8447
|
-
return /* @__PURE__ */ jsxs22(
|
|
8448
|
-
StyledSegmentedControlItem,
|
|
8449
|
-
{
|
|
8450
|
-
$hasLabel: isNotNil16(label),
|
|
8451
|
-
value,
|
|
8452
|
-
children: [
|
|
8453
|
-
icon,
|
|
8454
|
-
label
|
|
8455
|
-
]
|
|
8456
|
-
}
|
|
8457
|
-
);
|
|
8458
|
-
};
|
|
8459
|
-
|
|
8460
8355
|
// src/components/Tag/Tag.tsx
|
|
8461
8356
|
import { forwardRef as forwardRef18 } from "react";
|
|
8462
|
-
import
|
|
8463
|
-
import { isNil as
|
|
8464
|
-
import { Fragment as Fragment3, jsx as
|
|
8465
|
-
var TagLabel =
|
|
8357
|
+
import styled38 from "styled-components";
|
|
8358
|
+
import { isNil as isNil11, isNotNil as isNotNil16, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
8359
|
+
import { Fragment as Fragment3, jsx as jsx203, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8360
|
+
var TagLabel = styled38.a`
|
|
8466
8361
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8467
8362
|
font-size: var(--wui-typography-label-4-size);
|
|
8468
8363
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8490,14 +8385,14 @@ var TagLabel = styled40.a`
|
|
|
8490
8385
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8491
8386
|
}
|
|
8492
8387
|
`;
|
|
8493
|
-
var TagDivider =
|
|
8388
|
+
var TagDivider = styled38.div`
|
|
8494
8389
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8495
8390
|
border-left: 1px solid var(--wui-color-border);
|
|
8496
8391
|
display: flex;
|
|
8497
8392
|
height: 14px;
|
|
8498
8393
|
width: 1px;
|
|
8499
8394
|
`;
|
|
8500
|
-
var StyledRemoveButton =
|
|
8395
|
+
var StyledRemoveButton = styled38.button`
|
|
8501
8396
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8502
8397
|
all: unset;
|
|
8503
8398
|
cursor: pointer;
|
|
@@ -8525,7 +8420,7 @@ var StyledRemoveButton = styled40.button`
|
|
|
8525
8420
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8526
8421
|
}
|
|
8527
8422
|
`;
|
|
8528
|
-
var StyledTag =
|
|
8423
|
+
var StyledTag = styled38.div`
|
|
8529
8424
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8530
8425
|
align-items: center;
|
|
8531
8426
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8534,31 +8429,31 @@ var StyledTag = styled40.div`
|
|
|
8534
8429
|
overflow: hidden;
|
|
8535
8430
|
`;
|
|
8536
8431
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8537
|
-
if (
|
|
8432
|
+
if (isNil11(onClickRemove)) {
|
|
8538
8433
|
return null;
|
|
8539
8434
|
}
|
|
8540
|
-
if (
|
|
8435
|
+
if (isNil11(onClickRemoveLabel)) {
|
|
8541
8436
|
throw new Error(
|
|
8542
8437
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8543
8438
|
);
|
|
8544
8439
|
}
|
|
8545
|
-
return /* @__PURE__ */
|
|
8546
|
-
/* @__PURE__ */
|
|
8547
|
-
/* @__PURE__ */
|
|
8440
|
+
return /* @__PURE__ */ jsxs22(Fragment3, { children: [
|
|
8441
|
+
/* @__PURE__ */ jsx203(TagDivider, { $colorScheme: colorScheme }),
|
|
8442
|
+
/* @__PURE__ */ jsxs22(
|
|
8548
8443
|
StyledRemoveButton,
|
|
8549
8444
|
{
|
|
8550
8445
|
$colorScheme: colorScheme,
|
|
8551
8446
|
onClick: onClickRemove,
|
|
8552
8447
|
type: "button",
|
|
8553
8448
|
children: [
|
|
8554
|
-
/* @__PURE__ */
|
|
8449
|
+
/* @__PURE__ */ jsx203(
|
|
8555
8450
|
Icon,
|
|
8556
8451
|
{
|
|
8557
8452
|
size: "sm",
|
|
8558
8453
|
type: "close"
|
|
8559
8454
|
}
|
|
8560
8455
|
),
|
|
8561
|
-
/* @__PURE__ */
|
|
8456
|
+
/* @__PURE__ */ jsx203(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8562
8457
|
]
|
|
8563
8458
|
}
|
|
8564
8459
|
)
|
|
@@ -8566,15 +8461,15 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
8566
8461
|
};
|
|
8567
8462
|
var Tag = forwardRef18(
|
|
8568
8463
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8569
|
-
const labelProps =
|
|
8570
|
-
return /* @__PURE__ */
|
|
8464
|
+
const labelProps = isNotNil16(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
8465
|
+
return /* @__PURE__ */ jsxs22(
|
|
8571
8466
|
StyledTag,
|
|
8572
8467
|
{
|
|
8573
8468
|
ref,
|
|
8574
8469
|
$colorScheme: colorScheme,
|
|
8575
8470
|
...otherProps,
|
|
8576
8471
|
children: [
|
|
8577
|
-
/* @__PURE__ */
|
|
8472
|
+
/* @__PURE__ */ jsx203(
|
|
8578
8473
|
TagLabel,
|
|
8579
8474
|
{
|
|
8580
8475
|
...labelProps,
|
|
@@ -8582,7 +8477,7 @@ var Tag = forwardRef18(
|
|
|
8582
8477
|
children: label
|
|
8583
8478
|
}
|
|
8584
8479
|
),
|
|
8585
|
-
/* @__PURE__ */
|
|
8480
|
+
/* @__PURE__ */ jsx203(
|
|
8586
8481
|
RemoveButton,
|
|
8587
8482
|
{
|
|
8588
8483
|
colorScheme,
|
|
@@ -8605,8 +8500,8 @@ import {
|
|
|
8605
8500
|
Portal,
|
|
8606
8501
|
Arrow
|
|
8607
8502
|
} from "@radix-ui/react-tooltip";
|
|
8608
|
-
import
|
|
8609
|
-
import { jsx as
|
|
8503
|
+
import styled39, { css as css22 } from "styled-components";
|
|
8504
|
+
import { jsx as jsx204, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8610
8505
|
var CompactTooltipStyles = css22`
|
|
8611
8506
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8612
8507
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
@@ -8614,7 +8509,7 @@ var CompactTooltipStyles = css22`
|
|
|
8614
8509
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8615
8510
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8616
8511
|
`;
|
|
8617
|
-
var StyledContent =
|
|
8512
|
+
var StyledContent = styled39(Content)`
|
|
8618
8513
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8619
8514
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8620
8515
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8672,14 +8567,14 @@ var Tooltip = ({
|
|
|
8672
8567
|
if (forceOpen === true) {
|
|
8673
8568
|
rootProps.open = true;
|
|
8674
8569
|
}
|
|
8675
|
-
return /* @__PURE__ */
|
|
8570
|
+
return /* @__PURE__ */ jsxs23(
|
|
8676
8571
|
Root,
|
|
8677
8572
|
{
|
|
8678
8573
|
delayDuration: delay,
|
|
8679
8574
|
...rootProps,
|
|
8680
8575
|
children: [
|
|
8681
|
-
/* @__PURE__ */
|
|
8682
|
-
/* @__PURE__ */
|
|
8576
|
+
/* @__PURE__ */ jsx204(Trigger, { asChild: true, children }),
|
|
8577
|
+
/* @__PURE__ */ jsx204(Portal, { children: /* @__PURE__ */ jsxs23(
|
|
8683
8578
|
StyledContent,
|
|
8684
8579
|
{
|
|
8685
8580
|
$compact: compact,
|
|
@@ -8687,7 +8582,7 @@ var Tooltip = ({
|
|
|
8687
8582
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8688
8583
|
children: [
|
|
8689
8584
|
content,
|
|
8690
|
-
!hideArrow ? /* @__PURE__ */
|
|
8585
|
+
!hideArrow ? /* @__PURE__ */ jsx204(Arrow, { asChild: true, children: /* @__PURE__ */ jsx204(
|
|
8691
8586
|
"svg",
|
|
8692
8587
|
{
|
|
8693
8588
|
fill: "var(--tooltip-bg)",
|
|
@@ -8696,7 +8591,7 @@ var Tooltip = ({
|
|
|
8696
8591
|
viewBox: "0 0 12 8",
|
|
8697
8592
|
width: "12",
|
|
8698
8593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8699
|
-
children: /* @__PURE__ */
|
|
8594
|
+
children: /* @__PURE__ */ jsx204("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8700
8595
|
}
|
|
8701
8596
|
) }) : null
|
|
8702
8597
|
]
|
|
@@ -8709,26 +8604,26 @@ var Tooltip = ({
|
|
|
8709
8604
|
Tooltip.displayName = "Tooltip";
|
|
8710
8605
|
|
|
8711
8606
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8712
|
-
import
|
|
8713
|
-
import { isNotNil as
|
|
8714
|
-
import { jsx as
|
|
8607
|
+
import styled40 from "styled-components";
|
|
8608
|
+
import { isNotNil as isNotNil17 } from "@wistia/type-guards";
|
|
8609
|
+
import { jsx as jsx205, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8715
8610
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8716
8611
|
if (iconOnly) {
|
|
8717
|
-
return /* @__PURE__ */
|
|
8612
|
+
return /* @__PURE__ */ jsx205(
|
|
8718
8613
|
"g",
|
|
8719
8614
|
{
|
|
8720
8615
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8721
8616
|
fill: brandmarkColor,
|
|
8722
|
-
children: /* @__PURE__ */
|
|
8617
|
+
children: /* @__PURE__ */ jsx205("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8723
8618
|
}
|
|
8724
8619
|
);
|
|
8725
8620
|
}
|
|
8726
|
-
return /* @__PURE__ */
|
|
8621
|
+
return /* @__PURE__ */ jsx205(
|
|
8727
8622
|
"g",
|
|
8728
8623
|
{
|
|
8729
8624
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8730
8625
|
fill: brandmarkColor,
|
|
8731
|
-
children: /* @__PURE__ */
|
|
8626
|
+
children: /* @__PURE__ */ jsx205("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8732
8627
|
}
|
|
8733
8628
|
);
|
|
8734
8629
|
};
|
|
@@ -8736,12 +8631,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8736
8631
|
if (iconOnly) {
|
|
8737
8632
|
return null;
|
|
8738
8633
|
}
|
|
8739
|
-
return /* @__PURE__ */
|
|
8634
|
+
return /* @__PURE__ */ jsx205(
|
|
8740
8635
|
"g",
|
|
8741
8636
|
{
|
|
8742
8637
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8743
8638
|
fill: logotypeColor,
|
|
8744
|
-
children: /* @__PURE__ */
|
|
8639
|
+
children: /* @__PURE__ */ jsx205("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
8745
8640
|
}
|
|
8746
8641
|
);
|
|
8747
8642
|
};
|
|
@@ -8751,7 +8646,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8751
8646
|
}
|
|
8752
8647
|
return "0 0 144 31.47";
|
|
8753
8648
|
};
|
|
8754
|
-
var WistiaLogoComponent =
|
|
8649
|
+
var WistiaLogoComponent = styled40.svg`
|
|
8755
8650
|
height: ${({ height }) => `${height}px`};
|
|
8756
8651
|
|
|
8757
8652
|
/* ensure it will always fit on mobile */
|
|
@@ -8793,7 +8688,7 @@ var WistiaLogo = ({
|
|
|
8793
8688
|
};
|
|
8794
8689
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8795
8690
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8796
|
-
const Logo = /* @__PURE__ */
|
|
8691
|
+
const Logo = /* @__PURE__ */ jsxs24(
|
|
8797
8692
|
WistiaLogoComponent,
|
|
8798
8693
|
{
|
|
8799
8694
|
$hoverColor: hoverColor,
|
|
@@ -8803,14 +8698,14 @@ var WistiaLogo = ({
|
|
|
8803
8698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8804
8699
|
...otherProps,
|
|
8805
8700
|
children: [
|
|
8806
|
-
/* @__PURE__ */
|
|
8807
|
-
|
|
8701
|
+
/* @__PURE__ */ jsx205("title", { children: title }),
|
|
8702
|
+
isNotNil17(description) ? /* @__PURE__ */ jsx205("desc", { children: description }) : null,
|
|
8808
8703
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8809
8704
|
renderLogotype(logotypeColor, iconOnly)
|
|
8810
8705
|
]
|
|
8811
8706
|
}
|
|
8812
8707
|
);
|
|
8813
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
8708
|
+
return href !== void 0 ? /* @__PURE__ */ jsx205("a", { href, children: Logo }) : Logo;
|
|
8814
8709
|
};
|
|
8815
8710
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8816
8711
|
export {
|
|
@@ -8850,8 +8745,6 @@ export {
|
|
|
8850
8745
|
RadioGroup,
|
|
8851
8746
|
RadioMenuItem,
|
|
8852
8747
|
ScreenReaderOnly,
|
|
8853
|
-
SegmentedControl,
|
|
8854
|
-
SegmentedControlItem,
|
|
8855
8748
|
Stack,
|
|
8856
8749
|
SubMenu,
|
|
8857
8750
|
Tag,
|