@wistia/vhs 5.0.1 → 5.0.2-beta.b97af75d.ef7f4d2
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.d.ts +10 -60
- package/dist/index.js +260 -85
- package/dist/index.js.map +1 -1
- package/package.json +25 -32
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as styled_components from 'styled-components';
|
|
2
|
-
import { css, DefaultTheme } from 'styled-components';
|
|
2
|
+
import { css, DefaultTheme, IStyledComponent } from 'styled-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
|
|
@@ -10,7 +10,6 @@ import { ReactEditor } from 'slate-react';
|
|
|
10
10
|
import { HistoryEditor } from 'slate-history';
|
|
11
11
|
import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps } from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
export { DropdownMenuRadioGroup as MenuRadioGroup } from '@radix-ui/react-dropdown-menu';
|
|
13
|
-
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
14
13
|
|
|
15
14
|
interface VHSTheme {
|
|
16
15
|
readonly breakpoint: {
|
|
@@ -2245,7 +2244,7 @@ declare const KeyboardShortcut: {
|
|
|
2245
2244
|
displayName: string;
|
|
2246
2245
|
};
|
|
2247
2246
|
|
|
2248
|
-
type LabelProps =
|
|
2247
|
+
type LabelProps = {
|
|
2249
2248
|
/**
|
|
2250
2249
|
* Pass an arbitrary child node
|
|
2251
2250
|
*/
|
|
@@ -2271,9 +2270,9 @@ type LabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
|
2271
2270
|
* but otherwise hidden on screen.
|
|
2272
2271
|
*/
|
|
2273
2272
|
screenReaderOnly?: boolean;
|
|
2274
|
-
}
|
|
2273
|
+
} & Omit<ComponentPropsWithoutRef<'label'>, 'children'>;
|
|
2275
2274
|
declare const Label: {
|
|
2276
|
-
({ renderAs, children, disabled, htmlFor, required, screenReaderOnly, ...otherProps }: LabelProps): JSX.Element;
|
|
2275
|
+
({ renderAs, children, disabled, htmlFor, required, screenReaderOnly, className, style, id, ...otherProps }: LabelProps): JSX.Element;
|
|
2277
2276
|
displayName: string;
|
|
2278
2277
|
};
|
|
2279
2278
|
|
|
@@ -2596,9 +2595,9 @@ declare const Modal: {
|
|
|
2596
2595
|
displayName: string;
|
|
2597
2596
|
};
|
|
2598
2597
|
|
|
2599
|
-
declare const ModalHeader:
|
|
2600
|
-
declare const ModalBody:
|
|
2601
|
-
declare const ModalFooter:
|
|
2598
|
+
declare const ModalHeader: IStyledComponent<'web', ComponentPropsWithRef<'div'>>;
|
|
2599
|
+
declare const ModalBody: IStyledComponent<'web', ComponentPropsWithRef<'div'>>;
|
|
2600
|
+
declare const ModalFooter: IStyledComponent<'web', ComponentPropsWithRef<'div'>>;
|
|
2602
2601
|
type ModalCloseButtonProps = {
|
|
2603
2602
|
/**
|
|
2604
2603
|
* Callback invoked when the button is clicked
|
|
@@ -3141,57 +3140,7 @@ declare const variantStyleMap: {
|
|
|
3141
3140
|
subtitle2: styled_components.RuleSet<object>;
|
|
3142
3141
|
monospace: styled_components.RuleSet<object>;
|
|
3143
3142
|
};
|
|
3144
|
-
type TextProps =
|
|
3145
|
-
/**
|
|
3146
|
-
* The horizontal alignment
|
|
3147
|
-
* <br />
|
|
3148
|
-
* _Note: this only affects block elements_
|
|
3149
|
-
*/
|
|
3150
|
-
align?: keyof typeof alignMap;
|
|
3151
|
-
/**
|
|
3152
|
-
* Displays text as bold type
|
|
3153
|
-
*/
|
|
3154
|
-
bold?: boolean;
|
|
3155
|
-
/**
|
|
3156
|
-
* Pass an arbitrary child node
|
|
3157
|
-
*/
|
|
3158
|
-
children?: ReactNode | undefined;
|
|
3159
|
-
/**
|
|
3160
|
-
* Allows user to override default button colors
|
|
3161
|
-
*/
|
|
3162
|
-
colorOverride?: string;
|
|
3163
|
-
/**
|
|
3164
|
-
* Used to indicate text is part of a "disabled" UI
|
|
3165
|
-
*/
|
|
3166
|
-
disabled?: boolean;
|
|
3167
|
-
/**
|
|
3168
|
-
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
3169
|
-
* <br />
|
|
3170
|
-
* _Note: this only affects block elements_
|
|
3171
|
-
*/
|
|
3172
|
-
ellipsis?: boolean;
|
|
3173
|
-
/**
|
|
3174
|
-
* Display the text as inline content
|
|
3175
|
-
*/
|
|
3176
|
-
inline?: boolean;
|
|
3177
|
-
/**
|
|
3178
|
-
* Displays text as italic type
|
|
3179
|
-
*/
|
|
3180
|
-
italic?: boolean;
|
|
3181
|
-
/**
|
|
3182
|
-
* Prevents text from being highlighted and copied
|
|
3183
|
-
*/
|
|
3184
|
-
preventUserSelect?: boolean;
|
|
3185
|
-
/**
|
|
3186
|
-
* The type of html element to render as
|
|
3187
|
-
*/
|
|
3188
|
-
renderAs?: keyof typeof renderMap;
|
|
3189
|
-
/**
|
|
3190
|
-
* The text style to display
|
|
3191
|
-
*/
|
|
3192
|
-
variant?: keyof typeof variantStyleMap;
|
|
3193
|
-
};
|
|
3194
|
-
declare const Text: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3143
|
+
type TextProps = {
|
|
3195
3144
|
/**
|
|
3196
3145
|
* The horizontal alignment
|
|
3197
3146
|
* <br />
|
|
@@ -3240,7 +3189,8 @@ declare const Text: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps
|
|
|
3240
3189
|
* The text style to display
|
|
3241
3190
|
*/
|
|
3242
3191
|
variant?: keyof typeof variantStyleMap;
|
|
3243
|
-
} &
|
|
3192
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
3193
|
+
declare const Text: react.ForwardRefExoticComponent<Omit<TextProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
3244
3194
|
|
|
3245
3195
|
type IconThumbnailProps = {
|
|
3246
3196
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/vhs v5.0.
|
|
3
|
+
* @license @wistia/vhs v5.0.2-beta.b97af75d.ef7f4d2
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c) 2021-
|
|
5
|
+
* Copyright (c) 2021-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is unlicensed, all rights reserved.
|
|
8
8
|
*/
|
|
@@ -3114,8 +3114,8 @@ var buttonStyle = css2`
|
|
|
3114
3114
|
}}
|
|
3115
3115
|
`;
|
|
3116
3116
|
var ButtonStyledComponent = styled2.button`
|
|
3117
|
-
|
|
3118
|
-
`;
|
|
3117
|
+
${({ $noStyle }) => $noStyle ? buttonResetStyle : buttonStyle}
|
|
3118
|
+
`;
|
|
3119
3119
|
|
|
3120
3120
|
// src/components/Button/getButtonColor.ts
|
|
3121
3121
|
import { isNonEmptyString } from "@wistia/type-guards";
|
|
@@ -4310,7 +4310,7 @@ var createKeyPredicate = (keyFilter) => {
|
|
|
4310
4310
|
if (typeof keyFilter === "string") {
|
|
4311
4311
|
return (event) => event.key === keyFilter;
|
|
4312
4312
|
}
|
|
4313
|
-
if (keyFilter !== null && keyFilter !== void 0 &&
|
|
4313
|
+
if (keyFilter !== null && keyFilter !== void 0 && keyFilter) {
|
|
4314
4314
|
return () => true;
|
|
4315
4315
|
}
|
|
4316
4316
|
return () => false;
|
|
@@ -4855,7 +4855,7 @@ var variantStyleMap = {
|
|
|
4855
4855
|
subtitle2: subtitle2TextStyle,
|
|
4856
4856
|
monospace: monospaceTextStyle
|
|
4857
4857
|
};
|
|
4858
|
-
var
|
|
4858
|
+
var sharedTextStyles = css6`
|
|
4859
4859
|
color: ${({ theme: theme2, $colorOverride }) => $colorOverride ?? theme2.color.grey900};
|
|
4860
4860
|
font-style: normal;
|
|
4861
4861
|
margin: 0;
|
|
@@ -4879,10 +4879,44 @@ var TextComponent = styled6.div`
|
|
|
4879
4879
|
${({ $align }) => css6`
|
|
4880
4880
|
text-align: ${alignMap[$align]};
|
|
4881
4881
|
`}
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4882
|
+
`;
|
|
4883
|
+
var pStyles = css6`
|
|
4884
|
+
${sharedTextStyles}
|
|
4885
|
+
display: block;
|
|
4886
|
+
margin-bottom: ${({ theme: theme2 }) => theme2.spacing.space05};
|
|
4887
|
+
`;
|
|
4888
|
+
var StyledH1 = styled6.h1`
|
|
4889
|
+
${sharedTextStyles}
|
|
4890
|
+
`;
|
|
4891
|
+
var StyledH2 = styled6.h2`
|
|
4892
|
+
${sharedTextStyles}
|
|
4893
|
+
`;
|
|
4894
|
+
var StyledH3 = styled6.h3`
|
|
4895
|
+
${sharedTextStyles}
|
|
4896
|
+
`;
|
|
4897
|
+
var StyledH4 = styled6.h4`
|
|
4898
|
+
${sharedTextStyles}
|
|
4899
|
+
`;
|
|
4900
|
+
var StyledH5 = styled6.h5`
|
|
4901
|
+
${sharedTextStyles}
|
|
4902
|
+
`;
|
|
4903
|
+
var StyledH6 = styled6.h6`
|
|
4904
|
+
${sharedTextStyles}
|
|
4905
|
+
`;
|
|
4906
|
+
var StyledDiv = styled6.div`
|
|
4907
|
+
${sharedTextStyles}
|
|
4908
|
+
`;
|
|
4909
|
+
var StyledLabel = styled6.label`
|
|
4910
|
+
${sharedTextStyles}
|
|
4911
|
+
`;
|
|
4912
|
+
var StyledP = styled6.p`
|
|
4913
|
+
${pStyles}
|
|
4914
|
+
`;
|
|
4915
|
+
var StyledPre = styled6.pre`
|
|
4916
|
+
${sharedTextStyles}
|
|
4917
|
+
`;
|
|
4918
|
+
var StyledSpan = styled6.span`
|
|
4919
|
+
${sharedTextStyles}
|
|
4886
4920
|
`;
|
|
4887
4921
|
var Text = forwardRef2(
|
|
4888
4922
|
({
|
|
@@ -4897,11 +4931,12 @@ var Text = forwardRef2(
|
|
|
4897
4931
|
preventUserSelect = false,
|
|
4898
4932
|
renderAs = "div",
|
|
4899
4933
|
variant = "body1",
|
|
4934
|
+
className,
|
|
4935
|
+
style,
|
|
4936
|
+
id,
|
|
4900
4937
|
...otherProps
|
|
4901
|
-
}, ref) =>
|
|
4902
|
-
|
|
4903
|
-
{
|
|
4904
|
-
ref,
|
|
4938
|
+
}, ref) => {
|
|
4939
|
+
const sharedProps = {
|
|
4905
4940
|
$align: align,
|
|
4906
4941
|
$bold: bold,
|
|
4907
4942
|
$colorOverride: colorOverride,
|
|
@@ -4911,11 +4946,114 @@ var Text = forwardRef2(
|
|
|
4911
4946
|
$italic: italic,
|
|
4912
4947
|
$preventUserSelect: preventUserSelect,
|
|
4913
4948
|
$variant: variant,
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4949
|
+
className,
|
|
4950
|
+
style,
|
|
4951
|
+
id
|
|
4952
|
+
};
|
|
4953
|
+
switch (renderAs) {
|
|
4954
|
+
case "h1":
|
|
4955
|
+
return /* @__PURE__ */ jsx124(
|
|
4956
|
+
StyledH1,
|
|
4957
|
+
{
|
|
4958
|
+
...sharedProps,
|
|
4959
|
+
ref,
|
|
4960
|
+
children
|
|
4961
|
+
}
|
|
4962
|
+
);
|
|
4963
|
+
case "h2":
|
|
4964
|
+
return /* @__PURE__ */ jsx124(
|
|
4965
|
+
StyledH2,
|
|
4966
|
+
{
|
|
4967
|
+
...sharedProps,
|
|
4968
|
+
ref,
|
|
4969
|
+
children
|
|
4970
|
+
}
|
|
4971
|
+
);
|
|
4972
|
+
case "h3":
|
|
4973
|
+
return /* @__PURE__ */ jsx124(
|
|
4974
|
+
StyledH3,
|
|
4975
|
+
{
|
|
4976
|
+
...sharedProps,
|
|
4977
|
+
ref,
|
|
4978
|
+
children
|
|
4979
|
+
}
|
|
4980
|
+
);
|
|
4981
|
+
case "h4":
|
|
4982
|
+
return /* @__PURE__ */ jsx124(
|
|
4983
|
+
StyledH4,
|
|
4984
|
+
{
|
|
4985
|
+
...sharedProps,
|
|
4986
|
+
ref,
|
|
4987
|
+
children
|
|
4988
|
+
}
|
|
4989
|
+
);
|
|
4990
|
+
case "h5":
|
|
4991
|
+
return /* @__PURE__ */ jsx124(
|
|
4992
|
+
StyledH5,
|
|
4993
|
+
{
|
|
4994
|
+
...sharedProps,
|
|
4995
|
+
ref,
|
|
4996
|
+
children
|
|
4997
|
+
}
|
|
4998
|
+
);
|
|
4999
|
+
case "h6":
|
|
5000
|
+
return /* @__PURE__ */ jsx124(
|
|
5001
|
+
StyledH6,
|
|
5002
|
+
{
|
|
5003
|
+
...sharedProps,
|
|
5004
|
+
ref,
|
|
5005
|
+
children
|
|
5006
|
+
}
|
|
5007
|
+
);
|
|
5008
|
+
case "label":
|
|
5009
|
+
return /* @__PURE__ */ jsx124(
|
|
5010
|
+
StyledLabel,
|
|
5011
|
+
{
|
|
5012
|
+
...sharedProps,
|
|
5013
|
+
ref,
|
|
5014
|
+
children
|
|
5015
|
+
}
|
|
5016
|
+
);
|
|
5017
|
+
case "p":
|
|
5018
|
+
return /* @__PURE__ */ jsx124(
|
|
5019
|
+
StyledP,
|
|
5020
|
+
{
|
|
5021
|
+
...sharedProps,
|
|
5022
|
+
ref,
|
|
5023
|
+
children
|
|
5024
|
+
}
|
|
5025
|
+
);
|
|
5026
|
+
case "pre":
|
|
5027
|
+
return /* @__PURE__ */ jsx124(
|
|
5028
|
+
StyledPre,
|
|
5029
|
+
{
|
|
5030
|
+
...sharedProps,
|
|
5031
|
+
ref,
|
|
5032
|
+
children
|
|
5033
|
+
}
|
|
5034
|
+
);
|
|
5035
|
+
case "span":
|
|
5036
|
+
return /* @__PURE__ */ jsx124(
|
|
5037
|
+
StyledSpan,
|
|
5038
|
+
{
|
|
5039
|
+
...sharedProps,
|
|
5040
|
+
ref,
|
|
5041
|
+
children
|
|
5042
|
+
}
|
|
5043
|
+
);
|
|
5044
|
+
case "div":
|
|
5045
|
+
default:
|
|
5046
|
+
return /* @__PURE__ */ jsx124(
|
|
5047
|
+
StyledDiv,
|
|
5048
|
+
{
|
|
5049
|
+
...sharedProps,
|
|
5050
|
+
ref,
|
|
5051
|
+
...otherProps,
|
|
5052
|
+
children
|
|
5053
|
+
}
|
|
5054
|
+
);
|
|
4917
5055
|
}
|
|
4918
|
-
|
|
5056
|
+
}
|
|
4919
5057
|
);
|
|
4920
5058
|
Text.displayName = "Text_VHS";
|
|
4921
5059
|
|
|
@@ -6747,7 +6885,7 @@ var disabledStyle4 = css14`
|
|
|
6747
6885
|
color: ${({ theme: theme2 }) => theme2.color.grey500};
|
|
6748
6886
|
`;
|
|
6749
6887
|
var SPACE_BETWEEN_LABEL_AND_INPUT = "8px";
|
|
6750
|
-
var
|
|
6888
|
+
var sharedLabelStyles = css14`
|
|
6751
6889
|
color: ${({ theme: theme2 }) => theme2.color.grey900};
|
|
6752
6890
|
display: block;
|
|
6753
6891
|
font-size: 14px;
|
|
@@ -6771,6 +6909,21 @@ var LabelComponent = styled22.label`
|
|
|
6771
6909
|
${({ $disabled }) => $disabled && disabledStyle4}
|
|
6772
6910
|
${({ $required }) => $required && requiredStyle}
|
|
6773
6911
|
`;
|
|
6912
|
+
var StyledLabel2 = styled22.label`
|
|
6913
|
+
${sharedLabelStyles}
|
|
6914
|
+
`;
|
|
6915
|
+
var StyledLegend = styled22.legend`
|
|
6916
|
+
${sharedLabelStyles}
|
|
6917
|
+
`;
|
|
6918
|
+
var StyledDiv2 = styled22.div`
|
|
6919
|
+
${sharedLabelStyles}
|
|
6920
|
+
`;
|
|
6921
|
+
var StyledP2 = styled22.p`
|
|
6922
|
+
${sharedLabelStyles}
|
|
6923
|
+
`;
|
|
6924
|
+
var StyledSpan2 = styled22.span`
|
|
6925
|
+
${sharedLabelStyles}
|
|
6926
|
+
`;
|
|
6774
6927
|
var Label = ({
|
|
6775
6928
|
renderAs = "label",
|
|
6776
6929
|
children,
|
|
@@ -6778,20 +6931,41 @@ var Label = ({
|
|
|
6778
6931
|
htmlFor,
|
|
6779
6932
|
required = false,
|
|
6780
6933
|
screenReaderOnly = false,
|
|
6934
|
+
className,
|
|
6935
|
+
style,
|
|
6936
|
+
id,
|
|
6781
6937
|
...otherProps
|
|
6782
|
-
}) =>
|
|
6783
|
-
|
|
6784
|
-
{
|
|
6938
|
+
}) => {
|
|
6939
|
+
const sharedProps = {
|
|
6785
6940
|
$disabled: disabled,
|
|
6786
|
-
$renderAs: renderAs,
|
|
6787
6941
|
$required: required,
|
|
6788
6942
|
$screenReaderOnly: screenReaderOnly,
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6943
|
+
className,
|
|
6944
|
+
style,
|
|
6945
|
+
id
|
|
6946
|
+
};
|
|
6947
|
+
switch (renderAs) {
|
|
6948
|
+
case "legend":
|
|
6949
|
+
return /* @__PURE__ */ jsx142(StyledLegend, { ...sharedProps, children });
|
|
6950
|
+
case "div":
|
|
6951
|
+
return /* @__PURE__ */ jsx142(StyledDiv2, { ...sharedProps, children });
|
|
6952
|
+
case "p":
|
|
6953
|
+
return /* @__PURE__ */ jsx142(StyledP2, { ...sharedProps, children });
|
|
6954
|
+
case "span":
|
|
6955
|
+
return /* @__PURE__ */ jsx142(StyledSpan2, { ...sharedProps, children });
|
|
6956
|
+
case "label":
|
|
6957
|
+
default:
|
|
6958
|
+
return /* @__PURE__ */ jsx142(
|
|
6959
|
+
StyledLabel2,
|
|
6960
|
+
{
|
|
6961
|
+
...sharedProps,
|
|
6962
|
+
htmlFor,
|
|
6963
|
+
...otherProps,
|
|
6964
|
+
children
|
|
6965
|
+
}
|
|
6966
|
+
);
|
|
6793
6967
|
}
|
|
6794
|
-
|
|
6968
|
+
};
|
|
6795
6969
|
Label.displayName = "Label_VHS";
|
|
6796
6970
|
|
|
6797
6971
|
// src/components/FormFieldError/FormFieldError.tsx
|
|
@@ -7141,7 +7315,7 @@ var showOnHoverStyles = () => css16`
|
|
|
7141
7315
|
opacity: 1;
|
|
7142
7316
|
}
|
|
7143
7317
|
`;
|
|
7144
|
-
var
|
|
7318
|
+
var StyledLabel3 = styled29(Text)`
|
|
7145
7319
|
/*
|
|
7146
7320
|
* This should be able to support an input field when used to rename itself
|
|
7147
7321
|
*/
|
|
@@ -7297,7 +7471,7 @@ var CollapsibleGroup = ({
|
|
|
7297
7471
|
onClick,
|
|
7298
7472
|
children: [
|
|
7299
7473
|
/* @__PURE__ */ jsx150(
|
|
7300
|
-
|
|
7474
|
+
StyledLabel3,
|
|
7301
7475
|
{
|
|
7302
7476
|
$open: open2,
|
|
7303
7477
|
$styleVariant: variant,
|
|
@@ -8072,15 +8246,15 @@ var inputStyle = css17`
|
|
|
8072
8246
|
}
|
|
8073
8247
|
`;
|
|
8074
8248
|
var InputStyledComponent = styled33.input`
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
`;
|
|
8249
|
+
${inputStyle}
|
|
8250
|
+
${({ as }) => as === "textarea" && textareaStyle};
|
|
8251
|
+
${({ as }) => as !== "textarea" && ellipsisStyle};
|
|
8252
|
+
${({ $clickToCopy }) => $clickToCopy && clickToCopyStyle};
|
|
8253
|
+
${({ disabled }) => disabled && disabledStyle6};
|
|
8254
|
+
${({ $forceState }) => $forceState === "focus" && focusStyle};
|
|
8255
|
+
${({ $hasError }) => $hasError && errorStyle2};
|
|
8256
|
+
${({ readOnly }) => readOnly && readOnlyStyle};
|
|
8257
|
+
`;
|
|
8084
8258
|
|
|
8085
8259
|
// src/components/Input/ClickToCopy.tsx
|
|
8086
8260
|
import { useState as useState17, useEffect as useEffect15 } from "react";
|
|
@@ -8641,46 +8815,46 @@ var errorStyle3 = css19`
|
|
|
8641
8815
|
border: 1px solid ${({ theme: theme2 }) => theme2.color.error500};
|
|
8642
8816
|
`;
|
|
8643
8817
|
var SelectStyledComponent = styled37.select`
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8818
|
+
${ellipsisStyle}
|
|
8819
|
+
appearance: none;
|
|
8820
|
+
background-color: white;
|
|
8821
|
+
border: 1px solid ${({ theme: theme2 }) => theme2.color.grey400};
|
|
8822
|
+
border-radius: 4px;
|
|
8823
|
+
color: ${({ theme: theme2 }) => theme2.color.grey900};
|
|
8824
|
+
cursor: pointer;
|
|
8825
|
+
display: block;
|
|
8826
|
+
font-size: 14px;
|
|
8827
|
+
height: ${({ multiple }) => multiple ? "66px" : "auto"};
|
|
8828
|
+
line-height: 20px;
|
|
8829
|
+
margin: 0;
|
|
8830
|
+
outline: none;
|
|
8657
8831
|
|
|
8658
|
-
|
|
8659
|
-
|
|
8832
|
+
/* selects w/ multiple need to be able to scroll */
|
|
8833
|
+
overflow-y: ${({ multiple }) => multiple ? "scroll" : "hidden"};
|
|
8660
8834
|
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8835
|
+
/* right padding is to prevent text collision with caret icon */
|
|
8836
|
+
padding: ${({ theme: theme2 }) => `7px ${theme2.spacing.space06} 7px ${theme2.spacing.space02}`};
|
|
8837
|
+
width: 100%;
|
|
8664
8838
|
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8839
|
+
&:focus {
|
|
8840
|
+
${focusStyle2}
|
|
8841
|
+
}
|
|
8668
8842
|
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8843
|
+
/* this removes a dotted border around select text when focusing in Firefox */
|
|
8844
|
+
&:-moz-focusring {
|
|
8845
|
+
color: transparent;
|
|
8846
|
+
text-shadow: 0 0 0 #000000;
|
|
8847
|
+
}
|
|
8674
8848
|
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8849
|
+
/* remove drop-down arrow in IE */
|
|
8850
|
+
&::-ms-expand {
|
|
8851
|
+
display: none;
|
|
8852
|
+
}
|
|
8679
8853
|
|
|
8680
|
-
|
|
8681
|
-
|
|
8854
|
+
${({ disabled }) => disabled && disabledStyle7}
|
|
8855
|
+
${({ $hasError }) => $hasError && errorStyle3}
|
|
8682
8856
|
${({ $forceState }) => $forceState === "focus" && focusStyle2};
|
|
8683
|
-
`;
|
|
8857
|
+
`;
|
|
8684
8858
|
|
|
8685
8859
|
// src/components/Select/Select.tsx
|
|
8686
8860
|
import { jsx as jsx165, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
@@ -9460,7 +9634,7 @@ import { Transforms as Transforms3, Element as Element5, Node, Editor, Range, Pa
|
|
|
9460
9634
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
9461
9635
|
var isHashUrl = (urlString) => {
|
|
9462
9636
|
const urlPattern = /^#.+$/i;
|
|
9463
|
-
return
|
|
9637
|
+
return urlPattern.test(urlString);
|
|
9464
9638
|
};
|
|
9465
9639
|
var isLinkActive = (editor) => {
|
|
9466
9640
|
const [link] = Editor.nodes(editor, {
|
|
@@ -10651,11 +10825,11 @@ var ListComponent = styled49.ul`
|
|
|
10651
10825
|
list-style-position: outside;
|
|
10652
10826
|
margin: ${({ theme: theme2 }) => `0 0 ${theme2.spacing.space01}`};
|
|
10653
10827
|
padding: ${({ theme: theme2 }) => `0 0 0 ${theme2.spacing.space04}`};
|
|
10654
|
-
${({ variant }) => variant === "unbulleted" && unbulletedStyle};
|
|
10655
|
-
${({ variant }) => variant === "spaces" && spacesStyle};
|
|
10656
|
-
${({ variant }) => variant === "commas" && commasStyle};
|
|
10657
|
-
${({ variant }) => variant === "slashes" && slashesStyle};
|
|
10658
|
-
${({ variant }) => variant === "breadcrumbs" && breadcrumbsStyle};
|
|
10828
|
+
${({ $variant }) => $variant === "unbulleted" && unbulletedStyle};
|
|
10829
|
+
${({ $variant }) => $variant === "spaces" && spacesStyle};
|
|
10830
|
+
${({ $variant }) => $variant === "commas" && commasStyle};
|
|
10831
|
+
${({ $variant }) => $variant === "slashes" && slashesStyle};
|
|
10832
|
+
${({ $variant }) => $variant === "breadcrumbs" && breadcrumbsStyle};
|
|
10659
10833
|
|
|
10660
10834
|
> li:last-child {
|
|
10661
10835
|
margin-bottom: 0;
|
|
@@ -10677,8 +10851,8 @@ var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
|
10677
10851
|
return /* @__PURE__ */ jsx192(
|
|
10678
10852
|
ListComponent,
|
|
10679
10853
|
{
|
|
10854
|
+
$variant: variant,
|
|
10680
10855
|
as: elementType,
|
|
10681
|
-
variant,
|
|
10682
10856
|
...otherProps,
|
|
10683
10857
|
children: listItems
|
|
10684
10858
|
}
|
|
@@ -11217,7 +11391,6 @@ var MenuComponent = styled54.div`
|
|
|
11217
11391
|
}
|
|
11218
11392
|
`;
|
|
11219
11393
|
var dangerousMenuItemStyles2 = css25`
|
|
11220
|
-
/* stylelint-disable no-descending-specificity */
|
|
11221
11394
|
button,
|
|
11222
11395
|
a {
|
|
11223
11396
|
&:hover {
|
|
@@ -12331,7 +12504,7 @@ var RangeSelectorCalendar = ({
|
|
|
12331
12504
|
}, [internalRange, onIsValidChangeDebounced]);
|
|
12332
12505
|
useEffect22(() => {
|
|
12333
12506
|
if (isValidRange(range)) {
|
|
12334
|
-
let date;
|
|
12507
|
+
let date = void 0;
|
|
12335
12508
|
if (priorInternalRange && !isEqual3(range.start, priorInternalRange.start)) {
|
|
12336
12509
|
date = range.start;
|
|
12337
12510
|
}
|
|
@@ -12557,7 +12730,7 @@ import isEqual4 from "react-fast-compare";
|
|
|
12557
12730
|
// src/private/components/RangeSelectorInput/utils.ts
|
|
12558
12731
|
import { isValid as isValid2, getDaysInMonth, getYear, isBefore as isBefore3, isSameDay as isSameDay2, compareAsc as compareAsc2 } from "date-fns";
|
|
12559
12732
|
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
12560
|
-
var timeout;
|
|
12733
|
+
var timeout = void 0;
|
|
12561
12734
|
var preventDoubleClick = (event) => {
|
|
12562
12735
|
const delay = 200;
|
|
12563
12736
|
if (isNotNil39(timeout)) {
|
|
@@ -12802,7 +12975,7 @@ var getNextValue = ({
|
|
|
12802
12975
|
return { nextValue, nextKeyCount, shouldApply };
|
|
12803
12976
|
};
|
|
12804
12977
|
var getNextSelection = ({ event, currentSelection }) => {
|
|
12805
|
-
let nextSelection;
|
|
12978
|
+
let nextSelection = void 0;
|
|
12806
12979
|
if (isMoveRightChar(event)) {
|
|
12807
12980
|
nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);
|
|
12808
12981
|
if (!isEqual4(nextSelection, currentSelection)) {
|
|
@@ -13398,10 +13571,11 @@ var Slider = ({
|
|
|
13398
13571
|
);
|
|
13399
13572
|
},
|
|
13400
13573
|
renderThumb: (thumbProps, thumbState) => {
|
|
13401
|
-
const { key, as, ...restProps } = thumbProps;
|
|
13574
|
+
const { key, as, ref, ...restProps } = thumbProps;
|
|
13402
13575
|
return /* @__PURE__ */ jsx209(
|
|
13403
13576
|
StyledThumb,
|
|
13404
13577
|
{
|
|
13578
|
+
ref,
|
|
13405
13579
|
...restProps,
|
|
13406
13580
|
"data-testid": `${dataTestId}-thumb-${thumbState.index}`
|
|
13407
13581
|
},
|
|
@@ -13409,10 +13583,11 @@ var Slider = ({
|
|
|
13409
13583
|
);
|
|
13410
13584
|
},
|
|
13411
13585
|
renderTrack: (trackProps, trackState) => {
|
|
13412
|
-
const { key, as, ...restProps } = trackProps;
|
|
13586
|
+
const { key, as, ref, ...restProps } = trackProps;
|
|
13413
13587
|
return /* @__PURE__ */ jsx209(
|
|
13414
13588
|
StyledTrack,
|
|
13415
13589
|
{
|
|
13590
|
+
ref,
|
|
13416
13591
|
...restProps,
|
|
13417
13592
|
$isFilledTrack: checkIfFilledTrack(trackState),
|
|
13418
13593
|
"data-testid": `${dataTestId}-track-${trackState.index}`
|