@wistia/ui 0.0.15 → 0.0.17
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 +805 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +367 -40
- package/dist/index.d.ts +367 -40
- package/dist/index.mjs +813 -188
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -18
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.0.
|
|
3
|
+
* @license @wistia/ui v0.0.17
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2024, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2019,7 +2019,6 @@ var outlineButtonVariant = css11`
|
|
|
2019
2019
|
${ghostButtonVariant};
|
|
2020
2020
|
--button-color-border: var(--color-border);
|
|
2021
2021
|
|
|
2022
|
-
border: 1px solid var(--button-color-border);
|
|
2023
2022
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2024
2023
|
`;
|
|
2025
2024
|
var softButtonVariant = css11`
|
|
@@ -5477,6 +5476,7 @@ var StyledButton = styled7.button`
|
|
|
5477
5476
|
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
5478
5477
|
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
5479
5478
|
position: relative;
|
|
5479
|
+
text-align: center;
|
|
5480
5480
|
`;
|
|
5481
5481
|
var StyledButtonContent = styled7.div`
|
|
5482
5482
|
align-items: center;
|
|
@@ -5492,7 +5492,6 @@ var StyledButtonContent = styled7.div`
|
|
|
5492
5492
|
`;
|
|
5493
5493
|
var StyledButtonContentLabel = styled7.span`
|
|
5494
5494
|
flex: 1;
|
|
5495
|
-
text-align: center;
|
|
5496
5495
|
`;
|
|
5497
5496
|
var StyledButtonLoading = styled7.div`
|
|
5498
5497
|
position: absolute;
|
|
@@ -5664,14 +5663,237 @@ var ButtonGroup = ({
|
|
|
5664
5663
|
};
|
|
5665
5664
|
ButtonGroup.displayName = "ButtonGroup";
|
|
5666
5665
|
|
|
5667
|
-
// src/components/
|
|
5668
|
-
import
|
|
5666
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
5667
|
+
import { forwardRef as forwardRef4, useId } from "react";
|
|
5668
|
+
import { Root as CheckboxRoot, Indicator as CheckboxIndicator } from "@radix-ui/react-checkbox";
|
|
5669
|
+
import styled11 from "styled-components";
|
|
5670
|
+
import { isNonEmptyString as isNonEmptyString2 } from "@wistia/type-guards";
|
|
5671
|
+
|
|
5672
|
+
// src/components/Label/Label.tsx
|
|
5673
|
+
import styled9, { css as css12 } from "styled-components";
|
|
5669
5674
|
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
5675
|
+
var requiredStyle = css12`
|
|
5676
|
+
&::after {
|
|
5677
|
+
color: var(--color-text-error);
|
|
5678
|
+
display: inline;
|
|
5679
|
+
padding-left: var(--space-01);
|
|
5680
|
+
content: '*';
|
|
5681
|
+
}
|
|
5682
|
+
`;
|
|
5683
|
+
var disabledStyle = css12`
|
|
5684
|
+
color: var(--color-text-disabled);
|
|
5685
|
+
`;
|
|
5686
|
+
var SPACE_BETWEEN_LABEL_AND_INPUT = "var(--space-02)";
|
|
5687
|
+
var StyledLabel = styled9.label`
|
|
5688
|
+
display: inline-block;
|
|
5689
|
+
font-size: var(--typography-label-1-size);
|
|
5690
|
+
font-weight: var(--typography-label-1-weight);
|
|
5691
|
+
line-height: var(--typography-label-1-line-height);
|
|
5692
|
+
cursor: inherit;
|
|
5693
|
+
width: 100%;
|
|
5694
|
+
|
|
5695
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
5696
|
+
> input,
|
|
5697
|
+
> textarea,
|
|
5698
|
+
> select {
|
|
5699
|
+
display: block;
|
|
5700
|
+
margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5703
|
+
> label {
|
|
5704
|
+
font-weight: normal;
|
|
5705
|
+
}
|
|
5706
|
+
|
|
5707
|
+
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
5708
|
+
${({ disabled }) => disabled && disabledStyle}
|
|
5709
|
+
${({ required }) => required && requiredStyle}
|
|
5710
|
+
`;
|
|
5711
|
+
var Label = ({
|
|
5712
|
+
children,
|
|
5713
|
+
disabled = false,
|
|
5714
|
+
htmlFor,
|
|
5715
|
+
required = false,
|
|
5716
|
+
screenReaderOnly = false,
|
|
5717
|
+
...otherProps
|
|
5718
|
+
}) => /* @__PURE__ */ jsx164(
|
|
5719
|
+
StyledLabel,
|
|
5720
|
+
{
|
|
5721
|
+
$screenReaderOnly: screenReaderOnly,
|
|
5722
|
+
disabled,
|
|
5723
|
+
htmlFor,
|
|
5724
|
+
required,
|
|
5725
|
+
...otherProps,
|
|
5726
|
+
children
|
|
5727
|
+
}
|
|
5728
|
+
);
|
|
5729
|
+
Label.displayName = "Label";
|
|
5730
|
+
|
|
5731
|
+
// src/components/Label/LabelDescription.tsx
|
|
5732
|
+
import styled10 from "styled-components";
|
|
5733
|
+
import { isNil as isNil9 } from "@wistia/type-guards";
|
|
5734
|
+
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
5735
|
+
var StyledLabelDescription = styled10.div`
|
|
5736
|
+
color: var(--color-text-secondary);
|
|
5737
|
+
font-size: var(--typography-body-4-size);
|
|
5738
|
+
font-weight: var(--typography-body-4-weight);
|
|
5739
|
+
line-height: var(--typography-body-4-line-height);
|
|
5740
|
+
`;
|
|
5741
|
+
var LabelDescription = ({
|
|
5742
|
+
children,
|
|
5743
|
+
...props
|
|
5744
|
+
}) => {
|
|
5745
|
+
if (isNil9(children)) {
|
|
5746
|
+
return null;
|
|
5747
|
+
}
|
|
5748
|
+
return /* @__PURE__ */ jsx165(StyledLabelDescription, { ...props, children });
|
|
5749
|
+
};
|
|
5750
|
+
LabelDescription.displayName = "LabelDescription";
|
|
5751
|
+
|
|
5752
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
5753
|
+
import { jsx as jsx166, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5754
|
+
var CheckIcon = () => /* @__PURE__ */ jsx166(
|
|
5755
|
+
"svg",
|
|
5756
|
+
{
|
|
5757
|
+
fill: "inherit",
|
|
5758
|
+
height: "8",
|
|
5759
|
+
viewBox: "0 0 10 8",
|
|
5760
|
+
width: "10",
|
|
5761
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5762
|
+
children: /* @__PURE__ */ jsx166(
|
|
5763
|
+
"path",
|
|
5764
|
+
{
|
|
5765
|
+
d: "M3.47281 7.19303L0.377565 4.07999C0.191609 3.89297 0.191609 3.58973 0.377565 3.40268L1.05098 2.72537C1.23694 2.53833 1.53847 2.53833 1.72442 2.72537L3.80953 4.82245L8.27558 0.330729C8.46154 0.143704 8.76306 0.143704 8.94902 0.330729L9.62244 1.00804C9.8084 1.19506 9.8084 1.49831 9.62244 1.68535L4.14624 7.19305C3.96027 7.38008 3.65876 7.38008 3.47281 7.19303Z",
|
|
5766
|
+
fill: "white"
|
|
5767
|
+
}
|
|
5768
|
+
)
|
|
5769
|
+
}
|
|
5770
|
+
);
|
|
5771
|
+
var StyledCheckboxWrapper = styled11.div`
|
|
5772
|
+
display: flex;
|
|
5773
|
+
align-items: center;
|
|
5774
|
+
cursor: pointer;
|
|
5775
|
+
padding: var(--space-02);
|
|
5776
|
+
|
|
5777
|
+
&:hover {
|
|
5778
|
+
/* TODO Lamp to design hover state */
|
|
5779
|
+
}
|
|
5780
|
+
|
|
5781
|
+
&:focus-within {
|
|
5782
|
+
/* TODO Lamp to design focus state */
|
|
5783
|
+
background-color: #efefef;
|
|
5784
|
+
}
|
|
5785
|
+
`;
|
|
5786
|
+
var StyledCheckboxRoot = styled11(CheckboxRoot)`
|
|
5787
|
+
all: unset; /* CheckboxRoot renders as a button element, so we need to reset all styles */
|
|
5788
|
+
background-color: var(--color-bg-fill-white);
|
|
5789
|
+
min-width: 16px;
|
|
5790
|
+
min-height: 16px;
|
|
5791
|
+
border-radius: var(--border-radius-01);
|
|
5792
|
+
border-width: 1px;
|
|
5793
|
+
border-style: solid;
|
|
5794
|
+
border-color: var(--color-border);
|
|
5795
|
+
display: flex;
|
|
5796
|
+
align-items: center;
|
|
5797
|
+
justify-content: center;
|
|
5798
|
+
align-self: start; /* align to the top to handle label descriptions */
|
|
5799
|
+
margin-top: 3px; /* bump down slightly to mimic "align-self: center" */
|
|
5800
|
+
|
|
5801
|
+
&[data-state='checked'] {
|
|
5802
|
+
background-color: var(--color-bg-fill);
|
|
5803
|
+
}
|
|
5804
|
+
|
|
5805
|
+
&[disabled] {
|
|
5806
|
+
background-color: var(--color-bg-surface-disabled);
|
|
5807
|
+
|
|
5808
|
+
svg path {
|
|
5809
|
+
fill: var(--color-icon-disabled);
|
|
5810
|
+
}
|
|
5811
|
+
}
|
|
5812
|
+
|
|
5813
|
+
&:hover {
|
|
5814
|
+
/* TODO Lamp to design hover state */
|
|
5815
|
+
}
|
|
5816
|
+
|
|
5817
|
+
&:focus {
|
|
5818
|
+
/* TODO Lamp to design focus state */
|
|
5819
|
+
}
|
|
5820
|
+
`;
|
|
5821
|
+
var StyledCheckboxIndicator = styled11(CheckboxIndicator)`
|
|
5822
|
+
display: flex;
|
|
5823
|
+
`;
|
|
5824
|
+
var StyledLabelWrapper = styled11.div`
|
|
5825
|
+
display: flex;
|
|
5826
|
+
flex-direction: column;
|
|
5827
|
+
padding-left: var(--space-02);
|
|
5828
|
+
`;
|
|
5829
|
+
var Checkbox = forwardRef4(
|
|
5830
|
+
({
|
|
5831
|
+
checked,
|
|
5832
|
+
disabled = false,
|
|
5833
|
+
forceState,
|
|
5834
|
+
id,
|
|
5835
|
+
label = "default",
|
|
5836
|
+
description,
|
|
5837
|
+
name,
|
|
5838
|
+
onChange,
|
|
5839
|
+
required = false,
|
|
5840
|
+
value = "false",
|
|
5841
|
+
...otherProps
|
|
5842
|
+
}, ref) => {
|
|
5843
|
+
const generatedId = useId();
|
|
5844
|
+
const computedId = isNonEmptyString2(id) ? id : `vhs-collapsible-group-${generatedId}`;
|
|
5845
|
+
return /* @__PURE__ */ jsxs6(StyledCheckboxWrapper, { children: [
|
|
5846
|
+
/* @__PURE__ */ jsx166(
|
|
5847
|
+
StyledCheckboxRoot,
|
|
5848
|
+
{
|
|
5849
|
+
ref,
|
|
5850
|
+
checked: checked ?? void 0,
|
|
5851
|
+
defaultChecked: checked === void 0 ? false : void 0,
|
|
5852
|
+
disabled,
|
|
5853
|
+
id: computedId,
|
|
5854
|
+
name,
|
|
5855
|
+
onCheckedChange: (state) => {
|
|
5856
|
+
if (onChange) {
|
|
5857
|
+
const syntheticEvent = {
|
|
5858
|
+
target: {
|
|
5859
|
+
id: computedId,
|
|
5860
|
+
checked: state === true
|
|
5861
|
+
}
|
|
5862
|
+
};
|
|
5863
|
+
onChange(syntheticEvent);
|
|
5864
|
+
}
|
|
5865
|
+
},
|
|
5866
|
+
required,
|
|
5867
|
+
value,
|
|
5868
|
+
...otherProps,
|
|
5869
|
+
children: /* @__PURE__ */ jsx166(StyledCheckboxIndicator, { children: /* @__PURE__ */ jsx166(CheckIcon, {}) })
|
|
5870
|
+
}
|
|
5871
|
+
),
|
|
5872
|
+
/* @__PURE__ */ jsxs6(StyledLabelWrapper, { children: [
|
|
5873
|
+
/* @__PURE__ */ jsx166(
|
|
5874
|
+
Label,
|
|
5875
|
+
{
|
|
5876
|
+
disabled,
|
|
5877
|
+
htmlFor: computedId,
|
|
5878
|
+
required,
|
|
5879
|
+
children: label
|
|
5880
|
+
}
|
|
5881
|
+
),
|
|
5882
|
+
/* @__PURE__ */ jsx166(LabelDescription, { children: description })
|
|
5883
|
+
] })
|
|
5884
|
+
] });
|
|
5885
|
+
}
|
|
5886
|
+
);
|
|
5887
|
+
Checkbox.displayName = "Checkbox";
|
|
5888
|
+
|
|
5889
|
+
// src/components/Divider/Divider.tsx
|
|
5890
|
+
import styled12 from "styled-components";
|
|
5891
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
5670
5892
|
var sizeToPixelMap = {
|
|
5671
5893
|
lg: 4,
|
|
5672
5894
|
sm: 1
|
|
5673
5895
|
};
|
|
5674
|
-
var DividerComponent =
|
|
5896
|
+
var DividerComponent = styled12.hr`
|
|
5675
5897
|
background: none;
|
|
5676
5898
|
border-bottom: none;
|
|
5677
5899
|
border-left: none;
|
|
@@ -5686,7 +5908,7 @@ var DividerComponent = styled9.hr`
|
|
|
5686
5908
|
`;
|
|
5687
5909
|
var Divider = ({ size = "sm", ...otherProps }) => {
|
|
5688
5910
|
const responsiveSize = useResponsiveProp(size);
|
|
5689
|
-
return /* @__PURE__ */
|
|
5911
|
+
return /* @__PURE__ */ jsx167(
|
|
5690
5912
|
DividerComponent,
|
|
5691
5913
|
{
|
|
5692
5914
|
$borderHeight: sizeToPixelMap[responsiveSize],
|
|
@@ -5698,9 +5920,9 @@ Divider.displayName = "Divider";
|
|
|
5698
5920
|
|
|
5699
5921
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
5700
5922
|
import { isNotNil as isNotNil5 } from "@wistia/type-guards";
|
|
5701
|
-
import
|
|
5702
|
-
import { jsx as
|
|
5703
|
-
var ellipsisStyle =
|
|
5923
|
+
import styled13, { css as css13 } from "styled-components";
|
|
5924
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
5925
|
+
var ellipsisStyle = css13`
|
|
5704
5926
|
overflow: hidden;
|
|
5705
5927
|
text-overflow: ellipsis;
|
|
5706
5928
|
white-space: nowrap;
|
|
@@ -5723,14 +5945,14 @@ var ellipsisStyle = css12`
|
|
|
5723
5945
|
}
|
|
5724
5946
|
}
|
|
5725
5947
|
`;
|
|
5726
|
-
var ellipsisFlexParentStyle =
|
|
5948
|
+
var ellipsisFlexParentStyle = css13`
|
|
5727
5949
|
min-width: 0;
|
|
5728
5950
|
`;
|
|
5729
|
-
var EllipsisComponent =
|
|
5951
|
+
var EllipsisComponent = styled13.div`
|
|
5730
5952
|
${ellipsisStyle};
|
|
5731
5953
|
${({ $lines }) => {
|
|
5732
5954
|
if (isNotNil5($lines)) {
|
|
5733
|
-
return
|
|
5955
|
+
return css13`
|
|
5734
5956
|
-webkit-box-orient: vertical;
|
|
5735
5957
|
-webkit-line-clamp: ${$lines};
|
|
5736
5958
|
display: -webkit-box;
|
|
@@ -5740,7 +5962,7 @@ var EllipsisComponent = styled10.div`
|
|
|
5740
5962
|
return void 0;
|
|
5741
5963
|
}}
|
|
5742
5964
|
`;
|
|
5743
|
-
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */
|
|
5965
|
+
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ jsx168(
|
|
5744
5966
|
EllipsisComponent,
|
|
5745
5967
|
{
|
|
5746
5968
|
$lines: lines,
|
|
@@ -5751,8 +5973,8 @@ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ jsx165(
|
|
|
5751
5973
|
Ellipsis.displayName = "Ellipsis";
|
|
5752
5974
|
|
|
5753
5975
|
// src/components/Heading/Heading.tsx
|
|
5754
|
-
import { forwardRef as
|
|
5755
|
-
import
|
|
5976
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
5977
|
+
import styled14, { css as css14 } from "styled-components";
|
|
5756
5978
|
|
|
5757
5979
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
5758
5980
|
var makePolymorphic = (component) => {
|
|
@@ -5760,44 +5982,44 @@ var makePolymorphic = (component) => {
|
|
|
5760
5982
|
};
|
|
5761
5983
|
|
|
5762
5984
|
// src/components/Heading/Heading.tsx
|
|
5763
|
-
import { jsx as
|
|
5764
|
-
var heroStyle =
|
|
5985
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
5986
|
+
var heroStyle = css14`
|
|
5765
5987
|
--font-family: var(--typography-heading-hero-family);
|
|
5766
5988
|
--font-size: var(--typography-heading-hero-size);
|
|
5767
5989
|
--font-weight: var(--typography-heading-hero-weight);
|
|
5768
5990
|
--line-height: var(--typography-heading-hero-line-height);
|
|
5769
5991
|
`;
|
|
5770
|
-
var heading1TextStyle =
|
|
5992
|
+
var heading1TextStyle = css14`
|
|
5771
5993
|
--font-family: var(--typography-heading-1-family);
|
|
5772
5994
|
--font-size: var(--typography-heading-1-size);
|
|
5773
5995
|
--font-weight: var(--typography-heading-1-weight);
|
|
5774
5996
|
--line-height: var(--typography-heading-1-line-height);
|
|
5775
5997
|
`;
|
|
5776
|
-
var heading2TextStyle =
|
|
5998
|
+
var heading2TextStyle = css14`
|
|
5777
5999
|
--font-family: var(--typography-heading-2-family);
|
|
5778
6000
|
--font-size: var(--typography-heading-2-size);
|
|
5779
6001
|
--font-weight: var(--typography-heading-2-weight);
|
|
5780
6002
|
--line-height: var(--typography-heading-2-line-height);
|
|
5781
6003
|
`;
|
|
5782
|
-
var heading3TextStyle =
|
|
6004
|
+
var heading3TextStyle = css14`
|
|
5783
6005
|
--font-family: var(--typography-heading-3-family);
|
|
5784
6006
|
--font-size: var(--typography-heading-3-size);
|
|
5785
6007
|
--font-weight: var(--typography-heading-3-weight);
|
|
5786
6008
|
--line-height: var(--typography-heading-3-line-height);
|
|
5787
6009
|
`;
|
|
5788
|
-
var heading4TextStyle =
|
|
6010
|
+
var heading4TextStyle = css14`
|
|
5789
6011
|
--font-family: var(--typography-heading-4-family);
|
|
5790
6012
|
--font-size: var(--typography-heading-4-size);
|
|
5791
6013
|
--font-weight: var(--typography-heading-4-weight);
|
|
5792
6014
|
--line-height: var(--typography-heading-4-line-height);
|
|
5793
6015
|
`;
|
|
5794
|
-
var heading5TextStyle =
|
|
6016
|
+
var heading5TextStyle = css14`
|
|
5795
6017
|
--font-family: var(--typography-heading-5-family);
|
|
5796
6018
|
--font-size: var(--typography-heading-5-size);
|
|
5797
6019
|
--font-weight: var(--typography-heading-5-weight);
|
|
5798
6020
|
--line-height: var(--typography-heading-5-line-height);
|
|
5799
6021
|
`;
|
|
5800
|
-
var heading6TextStyle =
|
|
6022
|
+
var heading6TextStyle = css14`
|
|
5801
6023
|
--font-family: var(--typography-heading-6-family);
|
|
5802
6024
|
--font-size: var(--typography-heading-6-size);
|
|
5803
6025
|
--font-weight: var(--typography-heading-6-weight);
|
|
@@ -5813,7 +6035,7 @@ var variantStyleMap = {
|
|
|
5813
6035
|
heading6: heading6TextStyle
|
|
5814
6036
|
};
|
|
5815
6037
|
var DEFAULT_ELEMENT = "h1";
|
|
5816
|
-
var StyledHeading =
|
|
6038
|
+
var StyledHeading = styled14.div`
|
|
5817
6039
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5818
6040
|
font-family: var(--font-family);
|
|
5819
6041
|
font-size: var(--font-size);
|
|
@@ -5822,16 +6044,16 @@ var StyledHeading = styled11.div`
|
|
|
5822
6044
|
color: var(--color-text);
|
|
5823
6045
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
5824
6046
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
5825
|
-
${({ $inline }) => $inline &&
|
|
6047
|
+
${({ $inline }) => $inline && css14`
|
|
5826
6048
|
display: inline-block;
|
|
5827
6049
|
`}
|
|
5828
|
-
${({ $disabled }) => $disabled &&
|
|
6050
|
+
${({ $disabled }) => $disabled && css14`
|
|
5829
6051
|
color: var(--color-text-disabled);
|
|
5830
6052
|
`}
|
|
5831
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6053
|
+
${({ $preventUserSelect }) => $preventUserSelect && css14`
|
|
5832
6054
|
user-select: none;
|
|
5833
6055
|
`}
|
|
5834
|
-
${({ $align }) =>
|
|
6056
|
+
${({ $align }) => css14`
|
|
5835
6057
|
text-align: ${$align};
|
|
5836
6058
|
`}
|
|
5837
6059
|
margin: 0;
|
|
@@ -5845,7 +6067,7 @@ var variantElementMap = {
|
|
|
5845
6067
|
heading5: "h5",
|
|
5846
6068
|
heading6: "h6"
|
|
5847
6069
|
};
|
|
5848
|
-
var HeadingComponent =
|
|
6070
|
+
var HeadingComponent = forwardRef5(
|
|
5849
6071
|
({
|
|
5850
6072
|
align = "left",
|
|
5851
6073
|
colorScheme = "inherit",
|
|
@@ -5856,7 +6078,7 @@ var HeadingComponent = forwardRef4(
|
|
|
5856
6078
|
variant = "heading1",
|
|
5857
6079
|
renderAs,
|
|
5858
6080
|
...otherProps
|
|
5859
|
-
}, ref) => /* @__PURE__ */
|
|
6081
|
+
}, ref) => /* @__PURE__ */ jsx169(
|
|
5860
6082
|
StyledHeading,
|
|
5861
6083
|
{
|
|
5862
6084
|
ref,
|
|
@@ -5876,8 +6098,8 @@ HeadingComponent.displayName = "Heading";
|
|
|
5876
6098
|
var Heading = makePolymorphic(HeadingComponent);
|
|
5877
6099
|
|
|
5878
6100
|
// src/components/IconButton/IconButton.tsx
|
|
5879
|
-
import { Children as Children2, cloneElement as cloneElement2, forwardRef as
|
|
5880
|
-
import
|
|
6101
|
+
import { Children as Children2, cloneElement as cloneElement2, forwardRef as forwardRef6 } from "react";
|
|
6102
|
+
import styled16 from "styled-components";
|
|
5881
6103
|
|
|
5882
6104
|
// src/components/Tooltip/Tooltip.tsx
|
|
5883
6105
|
import {
|
|
@@ -5887,16 +6109,16 @@ import {
|
|
|
5887
6109
|
Portal,
|
|
5888
6110
|
Arrow
|
|
5889
6111
|
} from "@radix-ui/react-tooltip";
|
|
5890
|
-
import
|
|
5891
|
-
import { jsx as
|
|
5892
|
-
var CompactTooltipStyles =
|
|
6112
|
+
import styled15, { css as css15 } from "styled-components";
|
|
6113
|
+
import { jsx as jsx170, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6114
|
+
var CompactTooltipStyles = css15`
|
|
5893
6115
|
--tooltip-font-size: var(--typography-label-4-size);
|
|
5894
6116
|
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
5895
6117
|
--tooltip-font-weight: var(--typography-label-4-weight);
|
|
5896
6118
|
--tooltip-horizontal-padding: var(--space-02);
|
|
5897
6119
|
--tooltip-vertical-padding: var(--space-03);
|
|
5898
6120
|
`;
|
|
5899
|
-
var StyledContent =
|
|
6121
|
+
var StyledContent = styled15(Content)`
|
|
5900
6122
|
--tooltip-font-family: var(--typography-family-default);
|
|
5901
6123
|
--tooltip-border-radius: var(--border-radius-05);
|
|
5902
6124
|
--tooltip-bg: var(--color-bg-tooltip);
|
|
@@ -5954,14 +6176,14 @@ var Tooltip = ({
|
|
|
5954
6176
|
if (forceOpen === true) {
|
|
5955
6177
|
rootProps.open = true;
|
|
5956
6178
|
}
|
|
5957
|
-
return /* @__PURE__ */
|
|
6179
|
+
return /* @__PURE__ */ jsxs7(
|
|
5958
6180
|
Root,
|
|
5959
6181
|
{
|
|
5960
6182
|
delayDuration: delay,
|
|
5961
6183
|
...rootProps,
|
|
5962
6184
|
children: [
|
|
5963
|
-
/* @__PURE__ */
|
|
5964
|
-
/* @__PURE__ */
|
|
6185
|
+
/* @__PURE__ */ jsx170(Trigger, { asChild: true, children }),
|
|
6186
|
+
/* @__PURE__ */ jsx170(Portal, { children: /* @__PURE__ */ jsxs7(
|
|
5965
6187
|
StyledContent,
|
|
5966
6188
|
{
|
|
5967
6189
|
$compact: compact,
|
|
@@ -5969,7 +6191,7 @@ var Tooltip = ({
|
|
|
5969
6191
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5970
6192
|
children: [
|
|
5971
6193
|
content,
|
|
5972
|
-
!hideArrow ? /* @__PURE__ */
|
|
6194
|
+
!hideArrow ? /* @__PURE__ */ jsx170(Arrow, { asChild: true, children: /* @__PURE__ */ jsx170(
|
|
5973
6195
|
"svg",
|
|
5974
6196
|
{
|
|
5975
6197
|
fill: "var(--tooltip-bg)",
|
|
@@ -5978,7 +6200,7 @@ var Tooltip = ({
|
|
|
5978
6200
|
viewBox: "0 0 12 8",
|
|
5979
6201
|
width: "12",
|
|
5980
6202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5981
|
-
children: /* @__PURE__ */
|
|
6203
|
+
children: /* @__PURE__ */ jsx170("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" })
|
|
5982
6204
|
}
|
|
5983
6205
|
) }) : null
|
|
5984
6206
|
]
|
|
@@ -5991,8 +6213,8 @@ var Tooltip = ({
|
|
|
5991
6213
|
Tooltip.displayName = "Tooltip";
|
|
5992
6214
|
|
|
5993
6215
|
// src/components/IconButton/IconButton.tsx
|
|
5994
|
-
import { jsx as
|
|
5995
|
-
var StyledButton2 =
|
|
6216
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
6217
|
+
var StyledButton2 = styled16(Button)`
|
|
5996
6218
|
--icon-button-size-sm: 24px;
|
|
5997
6219
|
--icon-button-size-md: 32px;
|
|
5998
6220
|
--icon-button-size-lg: 40px;
|
|
@@ -6006,10 +6228,10 @@ var StyledButton2 = styled13(Button)`
|
|
|
6006
6228
|
align-items: center;
|
|
6007
6229
|
line-height: 1;
|
|
6008
6230
|
`;
|
|
6009
|
-
var IconButton =
|
|
6231
|
+
var IconButton = forwardRef6(
|
|
6010
6232
|
({ children, label, disableTooltip = false, size = "md", ...props }, ref) => {
|
|
6011
6233
|
const responsiveSize = useResponsiveProp(size);
|
|
6012
|
-
const button = /* @__PURE__ */
|
|
6234
|
+
const button = /* @__PURE__ */ jsx171(
|
|
6013
6235
|
StyledButton2,
|
|
6014
6236
|
{
|
|
6015
6237
|
...props,
|
|
@@ -6025,211 +6247,217 @@ var IconButton = forwardRef5(
|
|
|
6025
6247
|
if (disableTooltip) {
|
|
6026
6248
|
return button;
|
|
6027
6249
|
}
|
|
6028
|
-
return /* @__PURE__ */
|
|
6250
|
+
return /* @__PURE__ */ jsx171(Tooltip, { content: label, children: button });
|
|
6029
6251
|
}
|
|
6030
6252
|
);
|
|
6031
6253
|
IconButton.displayName = "IconButton";
|
|
6032
6254
|
|
|
6033
|
-
// src/components/
|
|
6034
|
-
import
|
|
6035
|
-
import {
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6255
|
+
// src/components/Menu/Menu.tsx
|
|
6256
|
+
import styled17, { css as css16, keyframes } from "styled-components";
|
|
6257
|
+
import {
|
|
6258
|
+
DropdownMenu,
|
|
6259
|
+
DropdownMenuTrigger,
|
|
6260
|
+
DropdownMenuPortal,
|
|
6261
|
+
DropdownMenuContent
|
|
6262
|
+
} from "@radix-ui/react-dropdown-menu";
|
|
6263
|
+
import { isNotNil as isNotNil6, isNotUndefined as isNotUndefined4 } from "@wistia/type-guards";
|
|
6264
|
+
import { jsx as jsx172, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6265
|
+
var open = keyframes`
|
|
6266
|
+
from {
|
|
6267
|
+
opacity: 0;
|
|
6268
|
+
transform: scale(.97) translateY(-8px);
|
|
6269
|
+
}
|
|
6270
|
+
to {
|
|
6271
|
+
opacity: 1;
|
|
6272
|
+
transform: scale(1);
|
|
6042
6273
|
}
|
|
6043
6274
|
`;
|
|
6044
|
-
var
|
|
6045
|
-
|
|
6275
|
+
var close = keyframes`
|
|
6276
|
+
from {
|
|
6277
|
+
opacity: 1;
|
|
6278
|
+
transform: scale(1);
|
|
6279
|
+
}
|
|
6280
|
+
to {
|
|
6281
|
+
opacity: 0;
|
|
6282
|
+
transform: scale(.97) translateY(-8px);
|
|
6283
|
+
}
|
|
6046
6284
|
`;
|
|
6047
|
-
var
|
|
6048
|
-
var
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6285
|
+
var menuContentCss = css16`
|
|
6286
|
+
--menu-font-family: var(--typography-family-default);
|
|
6287
|
+
--menu-bg: var(--color-bg-fill-white); /* TODO - Not sure what token to use for this */
|
|
6288
|
+
--menu-shadow: 0 0 64px 0 rgba(0 0 0 / 8%); /* TODO - Need a box-shadow token */
|
|
6289
|
+
--menu-border-radius: var(--border-radius-01);
|
|
6290
|
+
--menu-padding: var(--space-03);
|
|
6291
|
+
--menu-min-width: 120px;
|
|
6292
|
+
--menu-max-width: 284px;
|
|
6293
|
+
--menu-zindex: 500; /* TODO - need z-index token */
|
|
6294
|
+
|
|
6295
|
+
animation: ${open}; /* TODO - need easing tokens */
|
|
6296
|
+
font-family: var(--menu-font-family);
|
|
6297
|
+
background: var(--menu-bg);
|
|
6298
|
+
border-radius: var(--menu-border-radius);
|
|
6299
|
+
box-shadow: var(--menu-shadow); /* TODO - Need a box-shadow token */
|
|
6300
|
+
max-height: var(--radix-dropdown-menu-content-available-height);
|
|
6301
|
+
min-width: var(--menu-min-width);
|
|
6302
|
+
max-width: var(--menu-max-width);
|
|
6303
|
+
overflow: auto;
|
|
6304
|
+
padding: var(--menu-padding);
|
|
6305
|
+
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
6306
|
+
z-index: var(--menu-zindex);
|
|
6307
|
+
|
|
6308
|
+
&[data-state='closed'] {
|
|
6309
|
+
animation: ${close}; /* TODO - need easing tokens */
|
|
6063
6310
|
}
|
|
6064
6311
|
|
|
6065
|
-
|
|
6066
|
-
|
|
6312
|
+
${mq.smAndUp} {
|
|
6313
|
+
bottom: 0;
|
|
6314
|
+
padding: var(--menu-padding);
|
|
6315
|
+
right: 0;
|
|
6316
|
+
top: 0;
|
|
6317
|
+
transform: initial;
|
|
6067
6318
|
}
|
|
6068
6319
|
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
${({ required }) => required && requiredStyle}
|
|
6072
|
-
`;
|
|
6073
|
-
var Label = ({
|
|
6074
|
-
children,
|
|
6075
|
-
disabled = false,
|
|
6076
|
-
htmlFor,
|
|
6077
|
-
required = false,
|
|
6078
|
-
screenReaderOnly = false,
|
|
6079
|
-
...otherProps
|
|
6080
|
-
}) => /* @__PURE__ */ jsx169(
|
|
6081
|
-
StyledLabel,
|
|
6082
|
-
{
|
|
6083
|
-
disabled,
|
|
6084
|
-
htmlFor,
|
|
6085
|
-
required,
|
|
6086
|
-
screenReaderOnly,
|
|
6087
|
-
...otherProps,
|
|
6088
|
-
children
|
|
6320
|
+
hr {
|
|
6321
|
+
margin: var(--space-02) 0;
|
|
6089
6322
|
}
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
6097
|
-
var VisuallyHidden = styled15.div({ ...visuallyHiddenStyle });
|
|
6098
|
-
var VisuallyHiddenButFocusable = styled15.div({
|
|
6099
|
-
"&:not(:focus-within)": visuallyHiddenStyle
|
|
6100
|
-
});
|
|
6101
|
-
var ScreenReaderOnly = ({
|
|
6102
|
-
text,
|
|
6323
|
+
`;
|
|
6324
|
+
var MenuContent = styled17(DropdownMenuContent)`
|
|
6325
|
+
${menuContentCss}
|
|
6326
|
+
`;
|
|
6327
|
+
var Menu = ({
|
|
6328
|
+
align = "start",
|
|
6103
6329
|
children,
|
|
6104
|
-
|
|
6105
|
-
|
|
6330
|
+
trigger,
|
|
6331
|
+
label,
|
|
6332
|
+
isOpen,
|
|
6333
|
+
triggerProps = {},
|
|
6334
|
+
onOpenChange,
|
|
6335
|
+
onInteractOutside,
|
|
6336
|
+
...props
|
|
6106
6337
|
}) => {
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6338
|
+
return /* @__PURE__ */ jsxs8(
|
|
6339
|
+
DropdownMenu,
|
|
6340
|
+
{
|
|
6341
|
+
modal: false,
|
|
6342
|
+
...isNotNil6(onOpenChange) && isNotNil6(isOpen) ? { open: isOpen, onOpenChange } : {},
|
|
6343
|
+
children: [
|
|
6344
|
+
/* @__PURE__ */ jsx172(DropdownMenuTrigger, { asChild: true, children: isNotUndefined4(trigger) ? trigger : /* @__PURE__ */ jsx172(
|
|
6345
|
+
Button,
|
|
6346
|
+
{
|
|
6347
|
+
"aria-expanded": isOpen,
|
|
6348
|
+
forceState: isOpen ? "active" : void 0,
|
|
6349
|
+
rightIcon: /* @__PURE__ */ jsx172(Icon, { type: "caret-down" }),
|
|
6350
|
+
...triggerProps,
|
|
6351
|
+
children: label
|
|
6352
|
+
}
|
|
6353
|
+
) }),
|
|
6354
|
+
/* @__PURE__ */ jsx172(DropdownMenuPortal, { children: /* @__PURE__ */ jsx172(
|
|
6355
|
+
MenuContent,
|
|
6356
|
+
{
|
|
6357
|
+
...props,
|
|
6358
|
+
align,
|
|
6359
|
+
onFocusOutside: (event) => {
|
|
6360
|
+
event.preventDefault();
|
|
6361
|
+
},
|
|
6362
|
+
sideOffset: 6,
|
|
6363
|
+
children
|
|
6364
|
+
}
|
|
6365
|
+
) })
|
|
6366
|
+
]
|
|
6367
|
+
}
|
|
6368
|
+
);
|
|
6112
6369
|
};
|
|
6113
|
-
|
|
6370
|
+
Menu.displayName = "Menu";
|
|
6114
6371
|
|
|
6115
|
-
// src/components/
|
|
6116
|
-
import
|
|
6117
|
-
import
|
|
6118
|
-
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
6119
|
-
var DEFAULT_ELEMENT2 = "div";
|
|
6120
|
-
var StyledStack = styled16.div`
|
|
6121
|
-
display: flex;
|
|
6122
|
-
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6123
|
-
gap: ${({ $gap }) => `var(--${$gap})`};
|
|
6124
|
-
|
|
6125
|
-
> * {
|
|
6126
|
-
flex: 1;
|
|
6127
|
-
}
|
|
6128
|
-
`;
|
|
6129
|
-
var StackComponent = forwardRef6(
|
|
6130
|
-
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
6131
|
-
const responsiveGap = useResponsiveProp(gap);
|
|
6132
|
-
const responsiveDirection = useResponsiveProp(direction);
|
|
6133
|
-
return /* @__PURE__ */ jsx171(
|
|
6134
|
-
StyledStack,
|
|
6135
|
-
{
|
|
6136
|
-
ref,
|
|
6137
|
-
$direction: responsiveDirection,
|
|
6138
|
-
$gap: responsiveGap,
|
|
6139
|
-
as: renderAs ?? DEFAULT_ELEMENT2,
|
|
6140
|
-
...props
|
|
6141
|
-
}
|
|
6142
|
-
);
|
|
6143
|
-
}
|
|
6144
|
-
);
|
|
6145
|
-
StackComponent.displayName = "Stack";
|
|
6146
|
-
var Stack = makePolymorphic(StackComponent);
|
|
6372
|
+
// src/components/Menu/MenuLabel.tsx
|
|
6373
|
+
import styled19 from "styled-components";
|
|
6374
|
+
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
6147
6375
|
|
|
6148
6376
|
// src/components/Text/Text.tsx
|
|
6149
6377
|
import { forwardRef as forwardRef7 } from "react";
|
|
6150
|
-
import
|
|
6151
|
-
import { jsx as
|
|
6152
|
-
var bodyBoldStyles =
|
|
6378
|
+
import styled18, { css as css17 } from "styled-components";
|
|
6379
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
6380
|
+
var bodyBoldStyles = css17`
|
|
6153
6381
|
> strong,
|
|
6154
6382
|
b {
|
|
6155
6383
|
font-weight: var(--typography-weight-body-bold);
|
|
6156
6384
|
}
|
|
6157
6385
|
`;
|
|
6158
|
-
var labelBoldStyles =
|
|
6386
|
+
var labelBoldStyles = css17`
|
|
6159
6387
|
> strong,
|
|
6160
6388
|
b {
|
|
6161
6389
|
font-weight: var(--typography-weight-label-bold);
|
|
6162
6390
|
}
|
|
6163
6391
|
`;
|
|
6164
|
-
var body1TextStyle =
|
|
6392
|
+
var body1TextStyle = css17`
|
|
6165
6393
|
--font-family: var(--typography-body-1-family);
|
|
6166
6394
|
--font-size: var(--typography-body-1-size);
|
|
6167
6395
|
--font-weight: var(--typography-body-1-weight);
|
|
6168
6396
|
--line-height: var(--typography-body-1-line-height);
|
|
6169
6397
|
${bodyBoldStyles}
|
|
6170
6398
|
`;
|
|
6171
|
-
var body2TextStyle =
|
|
6399
|
+
var body2TextStyle = css17`
|
|
6172
6400
|
--font-family: var(--typography-body-2-family);
|
|
6173
6401
|
--font-size: var(--typography-body-2-size);
|
|
6174
6402
|
--font-weight: var(--typography-body-2-weight);
|
|
6175
6403
|
--line-height: var(--typography-body-2-line-height);
|
|
6176
6404
|
${bodyBoldStyles}
|
|
6177
6405
|
`;
|
|
6178
|
-
var body3TextStyle =
|
|
6406
|
+
var body3TextStyle = css17`
|
|
6179
6407
|
--font-family: var(--typography-body-3-family);
|
|
6180
6408
|
--font-size: var(--typography-body-3-size);
|
|
6181
6409
|
--font-weight: var(--typography-body-3-weight);
|
|
6182
6410
|
--line-height: var(--typography-body-3-line-height);
|
|
6183
6411
|
${bodyBoldStyles}
|
|
6184
6412
|
`;
|
|
6185
|
-
var body4TextStyle =
|
|
6413
|
+
var body4TextStyle = css17`
|
|
6186
6414
|
--font-family: var(--typography-body-4-family);
|
|
6187
6415
|
--font-size: var(--typography-body-4-size);
|
|
6188
6416
|
--font-weight: var(--typography-body-4-weight);
|
|
6189
6417
|
--line-height: var(--typography-body-4-line-height);
|
|
6190
6418
|
${bodyBoldStyles}
|
|
6191
6419
|
`;
|
|
6192
|
-
var label1TextStyle =
|
|
6420
|
+
var label1TextStyle = css17`
|
|
6193
6421
|
--font-family: var(--typography-label-1-family);
|
|
6194
6422
|
--font-size: var(--typography-label-1-size);
|
|
6195
6423
|
--font-weight: var(--typography-label-1-weight);
|
|
6196
6424
|
--line-height: var(--typography-label-1-line-height);
|
|
6197
6425
|
${labelBoldStyles}
|
|
6198
6426
|
`;
|
|
6199
|
-
var label2TextStyle =
|
|
6427
|
+
var label2TextStyle = css17`
|
|
6200
6428
|
--font-family: var(--typography-label-2-family);
|
|
6201
6429
|
--font-size: var(--typography-label-2-size);
|
|
6202
6430
|
--font-weight: var(--typography-label-2-weight);
|
|
6203
6431
|
--line-height: var(--typography-label-2-line-height);
|
|
6204
6432
|
${labelBoldStyles}
|
|
6205
6433
|
`;
|
|
6206
|
-
var label3TextStyle =
|
|
6434
|
+
var label3TextStyle = css17`
|
|
6207
6435
|
--font-family: var(--typography-label-3-family);
|
|
6208
6436
|
--font-size: var(--typography-label-3-size);
|
|
6209
6437
|
--font-weight: var(--typography-label-3-weight);
|
|
6210
6438
|
--line-height: var(--typography-label-3-line-height);
|
|
6211
6439
|
${labelBoldStyles}
|
|
6212
6440
|
`;
|
|
6213
|
-
var label4TextStyle =
|
|
6441
|
+
var label4TextStyle = css17`
|
|
6214
6442
|
--font-family: var(--typography-label-4-family);
|
|
6215
6443
|
--font-size: var(--typography-label-4-size);
|
|
6216
6444
|
--font-weight: var(--typography-label-4-weight);
|
|
6217
6445
|
--line-height: var(--typography-label-4-line-height);
|
|
6218
6446
|
${labelBoldStyles}
|
|
6219
6447
|
`;
|
|
6220
|
-
var body1MonoTextStyle =
|
|
6448
|
+
var body1MonoTextStyle = css17`
|
|
6221
6449
|
${body1TextStyle};
|
|
6222
6450
|
--font-family: var(--typography-family-mono);
|
|
6223
6451
|
`;
|
|
6224
|
-
var body2MonoTextStyle =
|
|
6452
|
+
var body2MonoTextStyle = css17`
|
|
6225
6453
|
${body2TextStyle};
|
|
6226
6454
|
--font-family: var(--typography-family-mono);
|
|
6227
6455
|
`;
|
|
6228
|
-
var body3MonoTextStyle =
|
|
6456
|
+
var body3MonoTextStyle = css17`
|
|
6229
6457
|
${body3TextStyle};
|
|
6230
6458
|
--font-family: var(--typography-family-mono);
|
|
6231
6459
|
`;
|
|
6232
|
-
var body4MonoTextStyle =
|
|
6460
|
+
var body4MonoTextStyle = css17`
|
|
6233
6461
|
${body4TextStyle};
|
|
6234
6462
|
--font-family: var(--typography-family-mono);
|
|
6235
6463
|
`;
|
|
@@ -6247,13 +6475,13 @@ var variantStyleMap2 = {
|
|
|
6247
6475
|
label3: label3TextStyle,
|
|
6248
6476
|
label4: label4TextStyle
|
|
6249
6477
|
};
|
|
6250
|
-
var highContrastProminenceStyle =
|
|
6478
|
+
var highContrastProminenceStyle = css17`
|
|
6251
6479
|
--text-color: var(--color-text-high-contrast);
|
|
6252
6480
|
`;
|
|
6253
|
-
var vibrantProminenceStyle =
|
|
6481
|
+
var vibrantProminenceStyle = css17`
|
|
6254
6482
|
--text-color: var(--color-text);
|
|
6255
6483
|
`;
|
|
6256
|
-
var secondaryProminenceStyle =
|
|
6484
|
+
var secondaryProminenceStyle = css17`
|
|
6257
6485
|
--text-color: var(--color-text-secondary);
|
|
6258
6486
|
`;
|
|
6259
6487
|
var prominenceMap = {
|
|
@@ -6261,7 +6489,7 @@ var prominenceMap = {
|
|
|
6261
6489
|
vibrant: vibrantProminenceStyle,
|
|
6262
6490
|
secondary: secondaryProminenceStyle
|
|
6263
6491
|
};
|
|
6264
|
-
var StyledText =
|
|
6492
|
+
var StyledText = styled18.div`
|
|
6265
6493
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6266
6494
|
font-family: var(--font-family);
|
|
6267
6495
|
font-size: var(--font-size);
|
|
@@ -6273,23 +6501,23 @@ var StyledText = styled17.div`
|
|
|
6273
6501
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
6274
6502
|
${({ $prominence }) => prominenceMap[$prominence]}
|
|
6275
6503
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6276
|
-
${({ $inline }) => $inline &&
|
|
6504
|
+
${({ $inline }) => $inline && css17`
|
|
6277
6505
|
display: inline-block;
|
|
6278
6506
|
`}
|
|
6279
|
-
${({ $disabled }) => $disabled &&
|
|
6507
|
+
${({ $disabled }) => $disabled && css17`
|
|
6280
6508
|
--text-color: var(--color-text-disabled);
|
|
6281
6509
|
`}
|
|
6282
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6510
|
+
${({ $preventUserSelect }) => $preventUserSelect && css17`
|
|
6283
6511
|
user-select: none;
|
|
6284
6512
|
`}
|
|
6285
|
-
${({ $align }) =>
|
|
6513
|
+
${({ $align }) => css17`
|
|
6286
6514
|
text-align: ${$align};
|
|
6287
6515
|
`}
|
|
6288
|
-
${({ as }) => as === "p" &&
|
|
6516
|
+
${({ as }) => as === "p" && css17`
|
|
6289
6517
|
display: block;
|
|
6290
6518
|
`}
|
|
6291
6519
|
`;
|
|
6292
|
-
var
|
|
6520
|
+
var DEFAULT_ELEMENT2 = "div";
|
|
6293
6521
|
var TextComponent = forwardRef7(
|
|
6294
6522
|
({
|
|
6295
6523
|
align = "left",
|
|
@@ -6303,7 +6531,7 @@ var TextComponent = forwardRef7(
|
|
|
6303
6531
|
renderAs,
|
|
6304
6532
|
...otherProps
|
|
6305
6533
|
}, ref) => {
|
|
6306
|
-
return /* @__PURE__ */
|
|
6534
|
+
return /* @__PURE__ */ jsx173(
|
|
6307
6535
|
StyledText,
|
|
6308
6536
|
{
|
|
6309
6537
|
ref,
|
|
@@ -6315,7 +6543,7 @@ var TextComponent = forwardRef7(
|
|
|
6315
6543
|
$preventUserSelect: preventUserSelect,
|
|
6316
6544
|
$prominence: prominence,
|
|
6317
6545
|
$variant: variant,
|
|
6318
|
-
as: renderAs ??
|
|
6546
|
+
as: renderAs ?? DEFAULT_ELEMENT2,
|
|
6319
6547
|
...otherProps
|
|
6320
6548
|
}
|
|
6321
6549
|
);
|
|
@@ -6324,21 +6552,408 @@ var TextComponent = forwardRef7(
|
|
|
6324
6552
|
TextComponent.displayName = "Text";
|
|
6325
6553
|
var Text = makePolymorphic(TextComponent);
|
|
6326
6554
|
|
|
6555
|
+
// src/components/Menu/MenuLabel.tsx
|
|
6556
|
+
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
6557
|
+
var StyledMenuLabel = styled19(DropdownMenuLabel)`
|
|
6558
|
+
padding: var(--space-02);
|
|
6559
|
+
`;
|
|
6560
|
+
var MenuLabel = ({ children, ...props }) => {
|
|
6561
|
+
return /* @__PURE__ */ jsx174(
|
|
6562
|
+
StyledMenuLabel,
|
|
6563
|
+
{
|
|
6564
|
+
asChild: true,
|
|
6565
|
+
...props,
|
|
6566
|
+
children: /* @__PURE__ */ jsx174(
|
|
6567
|
+
Text,
|
|
6568
|
+
{
|
|
6569
|
+
variant: "label3",
|
|
6570
|
+
...props,
|
|
6571
|
+
children
|
|
6572
|
+
}
|
|
6573
|
+
)
|
|
6574
|
+
}
|
|
6575
|
+
);
|
|
6576
|
+
};
|
|
6577
|
+
MenuLabel.displayName = "MenuLabel";
|
|
6578
|
+
|
|
6579
|
+
// src/components/Menu/SubMenu.tsx
|
|
6580
|
+
import { useState as useState4 } from "react";
|
|
6581
|
+
import styled22 from "styled-components";
|
|
6582
|
+
import {
|
|
6583
|
+
DropdownMenuPortal as DropdownMenuPortal2,
|
|
6584
|
+
DropdownMenuSub,
|
|
6585
|
+
DropdownMenuGroup,
|
|
6586
|
+
DropdownMenuSubContent,
|
|
6587
|
+
DropdownMenuSubTrigger,
|
|
6588
|
+
DropdownMenuItem
|
|
6589
|
+
} from "@radix-ui/react-dropdown-menu";
|
|
6590
|
+
|
|
6591
|
+
// src/components/Menu/MenuItemButton.tsx
|
|
6592
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
6593
|
+
import styled20 from "styled-components";
|
|
6594
|
+
import { isNotNil as isNotNil7, isNotUndefined as isNotUndefined5 } from "@wistia/type-guards";
|
|
6595
|
+
import { jsx as jsx175, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6596
|
+
var StyledButton3 = styled20(Button)`
|
|
6597
|
+
--menu-item-border-radius: var(--border-radius-01);
|
|
6598
|
+
--menu-item-gap: var(--space-01);
|
|
6599
|
+
--menu-item-inner-gap: var(--space-04);
|
|
6600
|
+
--menu-item-disabled-bg: var(--color-white);
|
|
6601
|
+
|
|
6602
|
+
text-align: left;
|
|
6603
|
+
align-items: left;
|
|
6604
|
+
border-radius: var(--menu-item-border-radius);
|
|
6605
|
+
display: flex;
|
|
6606
|
+
|
|
6607
|
+
&[aria-disabled='true'] {
|
|
6608
|
+
background-color: var(--menu-item-disabled-bg);
|
|
6609
|
+
}
|
|
6610
|
+
|
|
6611
|
+
${({ $isGated }) => isNotUndefined5($isGated) && $isGated ? `color: var(--color-text);` : ""}
|
|
6612
|
+
`;
|
|
6613
|
+
var StyledMenuContent = styled20.div`
|
|
6614
|
+
display: grid;
|
|
6615
|
+
grid-template-areas:
|
|
6616
|
+
'label badge'
|
|
6617
|
+
'description badge';
|
|
6618
|
+
grid-template-columns: 1fr auto;
|
|
6619
|
+
position: relative;
|
|
6620
|
+
align-content: center;
|
|
6621
|
+
`;
|
|
6622
|
+
var StyledBadgeContainer = styled20.div`
|
|
6623
|
+
grid-area: badge;
|
|
6624
|
+
align-self: start;
|
|
6625
|
+
justify-self: end;
|
|
6626
|
+
margin-left: var(--menu-item-inner-gap);
|
|
6627
|
+
`;
|
|
6628
|
+
var MenuItemButton = forwardRef8(({ children, appearance, command, ...props }, ref) => {
|
|
6629
|
+
let { colorScheme, badge } = props;
|
|
6630
|
+
if (appearance === "dangerous") {
|
|
6631
|
+
if (isNotUndefined5(colorScheme)) {
|
|
6632
|
+
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
6633
|
+
}
|
|
6634
|
+
colorScheme = "error";
|
|
6635
|
+
}
|
|
6636
|
+
if (appearance === "gated") {
|
|
6637
|
+
if (isNotUndefined5(colorScheme)) {
|
|
6638
|
+
console.warn("colorScheme prop is ignored when appearance is gated");
|
|
6639
|
+
}
|
|
6640
|
+
colorScheme = "purple";
|
|
6641
|
+
badge = /* @__PURE__ */ jsx175(Icon, { type: "sparkle" });
|
|
6642
|
+
}
|
|
6643
|
+
return /* @__PURE__ */ jsx175(
|
|
6644
|
+
StyledButton3,
|
|
6645
|
+
{
|
|
6646
|
+
...props,
|
|
6647
|
+
ref,
|
|
6648
|
+
$isGated: appearance === "gated",
|
|
6649
|
+
colorScheme: colorScheme ?? "default",
|
|
6650
|
+
fullWidth: true,
|
|
6651
|
+
variant: "ghost",
|
|
6652
|
+
children: /* @__PURE__ */ jsxs9(StyledMenuContent, { children: [
|
|
6653
|
+
children,
|
|
6654
|
+
isNotNil7(badge) || isNotNil7(command) ? /* @__PURE__ */ jsx175(StyledBadgeContainer, { children: badge ?? command }) : null
|
|
6655
|
+
] })
|
|
6656
|
+
}
|
|
6657
|
+
);
|
|
6658
|
+
});
|
|
6659
|
+
MenuItemButton.displayName = "MenuItemButton";
|
|
6660
|
+
|
|
6661
|
+
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
6662
|
+
import styled21 from "styled-components";
|
|
6663
|
+
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
6664
|
+
var StyledMenuItemLabel = styled21(Text).attrs({ variant: "label3" })`
|
|
6665
|
+
grid-area: label;
|
|
6666
|
+
`;
|
|
6667
|
+
var StyledMenuItemDescription = styled21(Text).attrs({
|
|
6668
|
+
variant: "label4",
|
|
6669
|
+
prominence: "secondary"
|
|
6670
|
+
})`
|
|
6671
|
+
margin-top: var(--menu-item-gap);
|
|
6672
|
+
grid-area: description;
|
|
6673
|
+
`;
|
|
6674
|
+
var MenuItemLabel = ({ children }) => {
|
|
6675
|
+
return /* @__PURE__ */ jsx176(StyledMenuItemLabel, { children });
|
|
6676
|
+
};
|
|
6677
|
+
var MenuItemDescription = ({ children }) => {
|
|
6678
|
+
return /* @__PURE__ */ jsx176(StyledMenuItemDescription, { children });
|
|
6679
|
+
};
|
|
6680
|
+
|
|
6681
|
+
// src/components/Menu/SubMenu.tsx
|
|
6682
|
+
import { jsx as jsx177, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6683
|
+
var SubMenuContent = styled22(DropdownMenuSubContent)`
|
|
6684
|
+
${menuContentCss}
|
|
6685
|
+
width: 298px;
|
|
6686
|
+
|
|
6687
|
+
${mq.smAndDown} {
|
|
6688
|
+
transform: translateX(-100%) !important;
|
|
6689
|
+
}
|
|
6690
|
+
`;
|
|
6691
|
+
var StyledMobileSubMenuItems = styled22.div`
|
|
6692
|
+
margin-left: var(--space-04);
|
|
6693
|
+
`;
|
|
6694
|
+
var StyledSubTrigger = styled22(DropdownMenuSubTrigger)`
|
|
6695
|
+
outline: none;
|
|
6696
|
+
|
|
6697
|
+
&[data-state='open'],
|
|
6698
|
+
&[data-highlighted] {
|
|
6699
|
+
background-color: var(--button-color-bg-hover);
|
|
6700
|
+
}
|
|
6701
|
+
`;
|
|
6702
|
+
var SubMenuTrigger = (props) => {
|
|
6703
|
+
const { isSmAndUp } = useMq();
|
|
6704
|
+
const Trigger2 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
6705
|
+
return /* @__PURE__ */ jsx177(Trigger2, { asChild: true, children: /* @__PURE__ */ jsx177(
|
|
6706
|
+
MenuItemButton,
|
|
6707
|
+
{
|
|
6708
|
+
...props,
|
|
6709
|
+
rightIcon: /* @__PURE__ */ jsx177(Icon, { type: "caret-right" })
|
|
6710
|
+
}
|
|
6711
|
+
) });
|
|
6712
|
+
};
|
|
6713
|
+
var SubMenu = ({
|
|
6714
|
+
label,
|
|
6715
|
+
description,
|
|
6716
|
+
children,
|
|
6717
|
+
onOpenChange = () => null,
|
|
6718
|
+
...props
|
|
6719
|
+
}) => {
|
|
6720
|
+
const { isSmAndUp } = useMq();
|
|
6721
|
+
const [isExpanded, setIsExpanded] = useState4(false);
|
|
6722
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs10(DropdownMenuSub, { onOpenChange, children: [
|
|
6723
|
+
/* @__PURE__ */ jsxs10(SubMenuTrigger, { ...props, children: [
|
|
6724
|
+
/* @__PURE__ */ jsx177(MenuItemLabel, { children: label }),
|
|
6725
|
+
/* @__PURE__ */ jsx177(MenuItemDescription, { children: description })
|
|
6726
|
+
] }),
|
|
6727
|
+
/* @__PURE__ */ jsx177(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx177(SubMenuContent, { children }) })
|
|
6728
|
+
] }) : /* @__PURE__ */ jsxs10(DropdownMenuGroup, { children: [
|
|
6729
|
+
/* @__PURE__ */ jsxs10(
|
|
6730
|
+
SubMenuTrigger,
|
|
6731
|
+
{
|
|
6732
|
+
...props,
|
|
6733
|
+
onClick: (event) => {
|
|
6734
|
+
event.preventDefault();
|
|
6735
|
+
setIsExpanded((prev) => !prev);
|
|
6736
|
+
},
|
|
6737
|
+
children: [
|
|
6738
|
+
/* @__PURE__ */ jsx177(MenuItemLabel, { children: label }),
|
|
6739
|
+
/* @__PURE__ */ jsx177(MenuItemDescription, { children: description })
|
|
6740
|
+
]
|
|
6741
|
+
}
|
|
6742
|
+
),
|
|
6743
|
+
/* @__PURE__ */ jsx177(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
6744
|
+
] });
|
|
6745
|
+
};
|
|
6746
|
+
SubMenu.displayName = "SubMenu";
|
|
6747
|
+
|
|
6748
|
+
// src/components/Menu/MenuItem.tsx
|
|
6749
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
6750
|
+
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
6751
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
6752
|
+
var MenuItem = forwardRef9(
|
|
6753
|
+
({ onSelect = () => null, ...props }, ref) => {
|
|
6754
|
+
return /* @__PURE__ */ jsx178(
|
|
6755
|
+
DropdownMenuItem2,
|
|
6756
|
+
{
|
|
6757
|
+
asChild: true,
|
|
6758
|
+
onSelect,
|
|
6759
|
+
children: /* @__PURE__ */ jsx178(
|
|
6760
|
+
MenuItemButton,
|
|
6761
|
+
{
|
|
6762
|
+
...props,
|
|
6763
|
+
ref,
|
|
6764
|
+
leftIcon: props.icon
|
|
6765
|
+
}
|
|
6766
|
+
)
|
|
6767
|
+
}
|
|
6768
|
+
);
|
|
6769
|
+
}
|
|
6770
|
+
);
|
|
6771
|
+
MenuItem.displayName = "MenuItem";
|
|
6772
|
+
|
|
6773
|
+
// src/components/Menu/MenuRadioGroup.tsx
|
|
6774
|
+
import {
|
|
6775
|
+
DropdownMenuRadioGroup
|
|
6776
|
+
} from "@radix-ui/react-dropdown-menu";
|
|
6777
|
+
import { jsx as jsx179, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6778
|
+
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
6779
|
+
return /* @__PURE__ */ jsxs11(DropdownMenuRadioGroup, { ...props, children: [
|
|
6780
|
+
/* @__PURE__ */ jsx179(MenuLabel, { children: label }),
|
|
6781
|
+
children
|
|
6782
|
+
] });
|
|
6783
|
+
};
|
|
6784
|
+
MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
6785
|
+
|
|
6786
|
+
// src/components/Menu/RadioMenuItem.tsx
|
|
6787
|
+
import {
|
|
6788
|
+
DropdownMenuItemIndicator,
|
|
6789
|
+
DropdownMenuRadioItem
|
|
6790
|
+
} from "@radix-ui/react-dropdown-menu";
|
|
6791
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
6792
|
+
var RadioMenuItem = ({
|
|
6793
|
+
onSelect,
|
|
6794
|
+
value,
|
|
6795
|
+
indicator = /* @__PURE__ */ jsx180(
|
|
6796
|
+
Icon,
|
|
6797
|
+
{
|
|
6798
|
+
size: "sm",
|
|
6799
|
+
type: "checkmark"
|
|
6800
|
+
}
|
|
6801
|
+
),
|
|
6802
|
+
...props
|
|
6803
|
+
}) => {
|
|
6804
|
+
const extraProps = onSelect ? { onSelect } : {};
|
|
6805
|
+
return /* @__PURE__ */ jsx180(
|
|
6806
|
+
DropdownMenuRadioItem,
|
|
6807
|
+
{
|
|
6808
|
+
...extraProps,
|
|
6809
|
+
value,
|
|
6810
|
+
children: /* @__PURE__ */ jsx180(
|
|
6811
|
+
MenuItemButton,
|
|
6812
|
+
{
|
|
6813
|
+
...props,
|
|
6814
|
+
rightIcon: /* @__PURE__ */ jsx180(DropdownMenuItemIndicator, { children: indicator })
|
|
6815
|
+
}
|
|
6816
|
+
)
|
|
6817
|
+
}
|
|
6818
|
+
);
|
|
6819
|
+
};
|
|
6820
|
+
RadioMenuItem.displayName = "RadioMenuItem";
|
|
6821
|
+
|
|
6822
|
+
// src/components/Menu/CheckboxMenuItem.tsx
|
|
6823
|
+
import {
|
|
6824
|
+
DropdownMenuItemIndicator as DropdownMenuItemIndicator2,
|
|
6825
|
+
DropdownMenuCheckboxItem
|
|
6826
|
+
} from "@radix-ui/react-dropdown-menu";
|
|
6827
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
6828
|
+
var CheckboxMenuItem = ({
|
|
6829
|
+
onSelect,
|
|
6830
|
+
checked,
|
|
6831
|
+
onCheckedChange,
|
|
6832
|
+
indicator = /* @__PURE__ */ jsx181(
|
|
6833
|
+
Icon,
|
|
6834
|
+
{
|
|
6835
|
+
size: "sm",
|
|
6836
|
+
type: "checkmark"
|
|
6837
|
+
}
|
|
6838
|
+
),
|
|
6839
|
+
...props
|
|
6840
|
+
}) => {
|
|
6841
|
+
let extraProps = {};
|
|
6842
|
+
if (onSelect) {
|
|
6843
|
+
extraProps = {
|
|
6844
|
+
...extraProps,
|
|
6845
|
+
onCheckedChange,
|
|
6846
|
+
onSelect
|
|
6847
|
+
};
|
|
6848
|
+
}
|
|
6849
|
+
return /* @__PURE__ */ jsx181(
|
|
6850
|
+
DropdownMenuCheckboxItem,
|
|
6851
|
+
{
|
|
6852
|
+
...extraProps,
|
|
6853
|
+
checked,
|
|
6854
|
+
children: /* @__PURE__ */ jsx181(
|
|
6855
|
+
MenuItemButton,
|
|
6856
|
+
{
|
|
6857
|
+
...props,
|
|
6858
|
+
rightIcon: /* @__PURE__ */ jsx181(DropdownMenuItemIndicator2, { children: indicator })
|
|
6859
|
+
}
|
|
6860
|
+
)
|
|
6861
|
+
}
|
|
6862
|
+
);
|
|
6863
|
+
};
|
|
6864
|
+
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
6865
|
+
|
|
6866
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
6867
|
+
import styled23 from "styled-components";
|
|
6868
|
+
import { isNotNil as isNotNil8 } from "@wistia/type-guards";
|
|
6869
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
6870
|
+
var VisuallyHidden = styled23.div({ ...visuallyHiddenStyle });
|
|
6871
|
+
var VisuallyHiddenButFocusable = styled23.div({
|
|
6872
|
+
"&:not(:focus-within)": visuallyHiddenStyle
|
|
6873
|
+
});
|
|
6874
|
+
var ScreenReaderOnly = ({
|
|
6875
|
+
text,
|
|
6876
|
+
children,
|
|
6877
|
+
focusable = false,
|
|
6878
|
+
...otherProps
|
|
6879
|
+
}) => {
|
|
6880
|
+
const accessibleText = isNotNil8(text) ? text : children;
|
|
6881
|
+
if (focusable) {
|
|
6882
|
+
return /* @__PURE__ */ jsx182(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
6883
|
+
}
|
|
6884
|
+
return /* @__PURE__ */ jsx182(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
6885
|
+
};
|
|
6886
|
+
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
6887
|
+
|
|
6888
|
+
// src/components/Stack/Stack.tsx
|
|
6889
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
6890
|
+
import styled24 from "styled-components";
|
|
6891
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
6892
|
+
var DEFAULT_ELEMENT3 = "div";
|
|
6893
|
+
var StyledStack = styled24.div`
|
|
6894
|
+
display: flex;
|
|
6895
|
+
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6896
|
+
gap: ${({ $gap }) => `var(--${$gap})`};
|
|
6897
|
+
|
|
6898
|
+
> * {
|
|
6899
|
+
flex: 1;
|
|
6900
|
+
}
|
|
6901
|
+
`;
|
|
6902
|
+
var StackComponent = forwardRef10(
|
|
6903
|
+
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
6904
|
+
const responsiveGap = useResponsiveProp(gap);
|
|
6905
|
+
const responsiveDirection = useResponsiveProp(direction);
|
|
6906
|
+
return /* @__PURE__ */ jsx183(
|
|
6907
|
+
StyledStack,
|
|
6908
|
+
{
|
|
6909
|
+
ref,
|
|
6910
|
+
$direction: responsiveDirection,
|
|
6911
|
+
$gap: responsiveGap,
|
|
6912
|
+
as: renderAs ?? DEFAULT_ELEMENT3,
|
|
6913
|
+
...props
|
|
6914
|
+
}
|
|
6915
|
+
);
|
|
6916
|
+
}
|
|
6917
|
+
);
|
|
6918
|
+
StackComponent.displayName = "Stack";
|
|
6919
|
+
var Stack = makePolymorphic(StackComponent);
|
|
6920
|
+
|
|
6327
6921
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
6328
|
-
import
|
|
6329
|
-
import { isNotNil as
|
|
6330
|
-
import { jsx as
|
|
6922
|
+
import styled25 from "styled-components";
|
|
6923
|
+
import { isNotNil as isNotNil9 } from "@wistia/type-guards";
|
|
6924
|
+
import { jsx as jsx184, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6331
6925
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
6332
6926
|
if (iconOnly) {
|
|
6333
|
-
return /* @__PURE__ */
|
|
6927
|
+
return /* @__PURE__ */ jsx184(
|
|
6928
|
+
"g",
|
|
6929
|
+
{
|
|
6930
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
6931
|
+
fill: brandmarkColor,
|
|
6932
|
+
children: /* @__PURE__ */ jsx184("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" })
|
|
6933
|
+
}
|
|
6934
|
+
);
|
|
6334
6935
|
}
|
|
6335
|
-
return /* @__PURE__ */
|
|
6936
|
+
return /* @__PURE__ */ jsx184(
|
|
6937
|
+
"g",
|
|
6938
|
+
{
|
|
6939
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
6940
|
+
fill: brandmarkColor,
|
|
6941
|
+
children: /* @__PURE__ */ jsx184("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" })
|
|
6942
|
+
}
|
|
6943
|
+
);
|
|
6336
6944
|
};
|
|
6337
6945
|
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
6338
6946
|
if (iconOnly) {
|
|
6339
6947
|
return null;
|
|
6340
6948
|
}
|
|
6341
|
-
return /* @__PURE__ */
|
|
6949
|
+
return /* @__PURE__ */ jsx184(
|
|
6950
|
+
"g",
|
|
6951
|
+
{
|
|
6952
|
+
"data-testid": "ui-wistia-logo-logotype",
|
|
6953
|
+
fill: logotypeColor,
|
|
6954
|
+
children: /* @__PURE__ */ jsx184("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" })
|
|
6955
|
+
}
|
|
6956
|
+
);
|
|
6342
6957
|
};
|
|
6343
6958
|
var computedViewBox = (iconOnly) => {
|
|
6344
6959
|
if (iconOnly) {
|
|
@@ -6346,7 +6961,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
6346
6961
|
}
|
|
6347
6962
|
return "0 0 144 31.47";
|
|
6348
6963
|
};
|
|
6349
|
-
var WistiaLogoComponent =
|
|
6964
|
+
var WistiaLogoComponent = styled25.svg`
|
|
6350
6965
|
height: ${({ height }) => `${height}px`};
|
|
6351
6966
|
|
|
6352
6967
|
/* ensure it will always fit on mobile */
|
|
@@ -6388,7 +7003,7 @@ var WistiaLogo = ({
|
|
|
6388
7003
|
};
|
|
6389
7004
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
6390
7005
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
6391
|
-
const Logo = /* @__PURE__ */
|
|
7006
|
+
const Logo = /* @__PURE__ */ jsxs12(
|
|
6392
7007
|
WistiaLogoComponent,
|
|
6393
7008
|
{
|
|
6394
7009
|
$hoverColor: hoverColor,
|
|
@@ -6398,14 +7013,14 @@ var WistiaLogo = ({
|
|
|
6398
7013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6399
7014
|
...otherProps,
|
|
6400
7015
|
children: [
|
|
6401
|
-
/* @__PURE__ */
|
|
6402
|
-
|
|
7016
|
+
/* @__PURE__ */ jsx184("title", { children: title }),
|
|
7017
|
+
isNotNil9(description) ? /* @__PURE__ */ jsx184("desc", { children: description }) : null,
|
|
6403
7018
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
6404
7019
|
renderLogotype(logotypeColor, iconOnly)
|
|
6405
7020
|
]
|
|
6406
7021
|
}
|
|
6407
7022
|
);
|
|
6408
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
7023
|
+
return href !== void 0 ? /* @__PURE__ */ jsx184("a", { href, children: Logo }) : Logo;
|
|
6409
7024
|
};
|
|
6410
7025
|
WistiaLogo.displayName = "WistiaLogo";
|
|
6411
7026
|
export {
|
|
@@ -6414,6 +7029,8 @@ export {
|
|
|
6414
7029
|
Box,
|
|
6415
7030
|
Button,
|
|
6416
7031
|
ButtonGroup,
|
|
7032
|
+
Checkbox,
|
|
7033
|
+
CheckboxMenuItem,
|
|
6417
7034
|
ColorSchemeWrapper,
|
|
6418
7035
|
Divider,
|
|
6419
7036
|
Ellipsis,
|
|
@@ -6422,8 +7039,16 @@ export {
|
|
|
6422
7039
|
IconButton,
|
|
6423
7040
|
Label,
|
|
6424
7041
|
Link,
|
|
7042
|
+
Menu,
|
|
7043
|
+
MenuItem,
|
|
7044
|
+
MenuItemDescription,
|
|
7045
|
+
MenuItemLabel,
|
|
7046
|
+
MenuLabel,
|
|
7047
|
+
MenuRadioGroup,
|
|
7048
|
+
RadioMenuItem,
|
|
6425
7049
|
ScreenReaderOnly,
|
|
6426
7050
|
Stack,
|
|
7051
|
+
SubMenu,
|
|
6427
7052
|
Text,
|
|
6428
7053
|
Tooltip,
|
|
6429
7054
|
UIProvider,
|