@wistia/ui 0.1.2 → 0.2.0
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 +162 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -7
- package/dist/index.d.ts +5 -7
- package/dist/index.mjs +174 -164
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.
|
|
3
|
+
* @license @wistia/ui v0.2.0
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -6485,29 +6485,40 @@ Checkbox.displayName = "Checkbox";
|
|
|
6485
6485
|
// src/components/Divider/Divider.tsx
|
|
6486
6486
|
var import_styled_components29 = __toESM(require("styled-components"));
|
|
6487
6487
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
6488
|
-
var
|
|
6489
|
-
lg: 4,
|
|
6490
|
-
sm: 1
|
|
6491
|
-
};
|
|
6492
|
-
var DividerComponent = import_styled_components29.default.hr`
|
|
6493
|
-
background: none;
|
|
6494
|
-
border-bottom: none;
|
|
6495
|
-
border-left: none;
|
|
6496
|
-
border-right: none;
|
|
6488
|
+
var horizontalBorderCss = import_styled_components29.css`
|
|
6497
6489
|
border-top-color: var(--wui-color-border);
|
|
6498
6490
|
border-top-style: solid;
|
|
6499
|
-
border-top-width:
|
|
6500
|
-
clear: both;
|
|
6491
|
+
border-top-width: 1px;
|
|
6492
|
+
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
6501
6493
|
height: 0;
|
|
6502
|
-
line-height: 0;
|
|
6503
|
-
margin: 0;
|
|
6504
6494
|
`;
|
|
6505
|
-
var
|
|
6506
|
-
|
|
6495
|
+
var verticalBorderCss = import_styled_components29.css`
|
|
6496
|
+
background-color: var(--wui-color-border);
|
|
6497
|
+
max-width: 1px;
|
|
6498
|
+
min-height: 100%;
|
|
6499
|
+
width: 1px;
|
|
6500
|
+
`;
|
|
6501
|
+
var DividerComponent = import_styled_components29.default.div`
|
|
6502
|
+
${({ $orientation }) => {
|
|
6503
|
+
switch ($orientation) {
|
|
6504
|
+
case "vertical":
|
|
6505
|
+
return verticalBorderCss;
|
|
6506
|
+
case "horizontal":
|
|
6507
|
+
default:
|
|
6508
|
+
return horizontalBorderCss;
|
|
6509
|
+
}
|
|
6510
|
+
}}
|
|
6511
|
+
`;
|
|
6512
|
+
var Divider = ({
|
|
6513
|
+
orientation = "horizontal",
|
|
6514
|
+
...otherProps
|
|
6515
|
+
}) => {
|
|
6507
6516
|
return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
6508
6517
|
DividerComponent,
|
|
6509
6518
|
{
|
|
6510
|
-
$
|
|
6519
|
+
$orientation: orientation,
|
|
6520
|
+
"aria-orientation": orientation,
|
|
6521
|
+
role: "separator",
|
|
6511
6522
|
...otherProps
|
|
6512
6523
|
}
|
|
6513
6524
|
);
|
|
@@ -6528,10 +6539,6 @@ var StyledStack = import_styled_components30.default.div`
|
|
|
6528
6539
|
display: flex;
|
|
6529
6540
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6530
6541
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
6531
|
-
|
|
6532
|
-
> * {
|
|
6533
|
-
flex: 1;
|
|
6534
|
-
}
|
|
6535
6542
|
`;
|
|
6536
6543
|
var StackComponent = (0, import_react16.forwardRef)(
|
|
6537
6544
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
@@ -7720,9 +7727,9 @@ var CheckboxMenuItem = ({
|
|
|
7720
7727
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
7721
7728
|
|
|
7722
7729
|
// src/components/Modal/Modal.tsx
|
|
7723
|
-
var
|
|
7724
|
-
var
|
|
7725
|
-
var
|
|
7730
|
+
var import_react33 = require("react");
|
|
7731
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
7732
|
+
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
7726
7733
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
7727
7734
|
|
|
7728
7735
|
// src/components/Modal/ModalHeader.tsx
|
|
@@ -7802,68 +7809,20 @@ var ModalHeader = ({
|
|
|
7802
7809
|
] });
|
|
7803
7810
|
};
|
|
7804
7811
|
|
|
7805
|
-
// src/
|
|
7806
|
-
var
|
|
7812
|
+
// src/components/Modal/ModalContent.tsx
|
|
7813
|
+
var import_react31 = require("react");
|
|
7807
7814
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
7808
|
-
var
|
|
7809
|
-
var backdropAnimationDuration = 150;
|
|
7810
|
-
var alignVerticalMap = {
|
|
7811
|
-
stretch: "normal",
|
|
7812
|
-
top: "start",
|
|
7813
|
-
center: "center",
|
|
7814
|
-
bottom: "end"
|
|
7815
|
-
};
|
|
7816
|
-
var alignHorizontalMap = {
|
|
7817
|
-
left: "start",
|
|
7818
|
-
center: "center",
|
|
7819
|
-
right: "end"
|
|
7820
|
-
};
|
|
7821
|
-
var BackdropComponent = import_styled_components45.default.div`
|
|
7822
|
-
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
7823
|
-
animation-name: backdropShow;
|
|
7824
|
-
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
7825
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7826
|
-
background: var(--wui-color-backdrop);
|
|
7827
|
-
display: flex;
|
|
7828
|
-
inset: 0;
|
|
7829
|
-
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
7830
|
-
overflow-y: auto;
|
|
7831
|
-
position: fixed;
|
|
7832
|
-
z-index: var(--wui-zindex-backdrop);
|
|
7833
|
-
|
|
7834
|
-
@keyframes backdropShow {
|
|
7835
|
-
from {
|
|
7836
|
-
opacity: 0;
|
|
7837
|
-
}
|
|
7838
|
-
|
|
7839
|
-
to {
|
|
7840
|
-
opacity: 1;
|
|
7841
|
-
}
|
|
7842
|
-
}
|
|
7843
|
-
`;
|
|
7844
|
-
var Backdrop = (0, import_react30.forwardRef)(
|
|
7845
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7846
|
-
BackdropComponent,
|
|
7847
|
-
{
|
|
7848
|
-
ref,
|
|
7849
|
-
$alignHorizontal: alignHorizontal,
|
|
7850
|
-
$alignVertical: alignVertical,
|
|
7851
|
-
...otherProps,
|
|
7852
|
-
children
|
|
7853
|
-
}
|
|
7854
|
-
)
|
|
7855
|
-
);
|
|
7856
|
-
Backdrop.displayName = "Backdrop";
|
|
7815
|
+
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
7857
7816
|
|
|
7858
7817
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
7859
|
-
var
|
|
7818
|
+
var import_react30 = require("react");
|
|
7860
7819
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
7861
7820
|
var useFocusRestore = () => {
|
|
7862
|
-
const previouslyFocusedRef = (0,
|
|
7863
|
-
(0,
|
|
7821
|
+
const previouslyFocusedRef = (0, import_react30.useRef)(null);
|
|
7822
|
+
(0, import_react30.useEffect)(() => {
|
|
7864
7823
|
previouslyFocusedRef.current = document.activeElement;
|
|
7865
7824
|
}, []);
|
|
7866
|
-
(0,
|
|
7825
|
+
(0, import_react30.useEffect)(() => {
|
|
7867
7826
|
return () => {
|
|
7868
7827
|
if ((0, import_type_guards25.isNotNil)(previouslyFocusedRef.current)) {
|
|
7869
7828
|
setTimeout(() => {
|
|
@@ -7874,9 +7833,9 @@ var useFocusRestore = () => {
|
|
|
7874
7833
|
}, []);
|
|
7875
7834
|
};
|
|
7876
7835
|
|
|
7877
|
-
// src/components/Modal/
|
|
7878
|
-
var
|
|
7879
|
-
var StyledModalContent = (0,
|
|
7836
|
+
// src/components/Modal/ModalContent.tsx
|
|
7837
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7838
|
+
var StyledModalContent = (0, import_styled_components45.default)(import_react_dialog3.Content)`
|
|
7880
7839
|
background-color: var(--wui-color-bg-app);
|
|
7881
7840
|
box-sizing: border-box;
|
|
7882
7841
|
display: flex;
|
|
@@ -7916,10 +7875,10 @@ var StyledModalContent = (0, import_styled_components46.default)(import_react_di
|
|
|
7916
7875
|
}
|
|
7917
7876
|
}
|
|
7918
7877
|
`;
|
|
7919
|
-
var ModalContent = (0,
|
|
7878
|
+
var ModalContent = (0, import_react31.forwardRef)(
|
|
7920
7879
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
7921
7880
|
useFocusRestore();
|
|
7922
|
-
return /* @__PURE__ */ (0,
|
|
7881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7923
7882
|
StyledModalContent,
|
|
7924
7883
|
{
|
|
7925
7884
|
ref,
|
|
@@ -7931,13 +7890,68 @@ var ModalContent = (0, import_react32.forwardRef)(
|
|
|
7931
7890
|
);
|
|
7932
7891
|
}
|
|
7933
7892
|
);
|
|
7934
|
-
|
|
7935
|
-
|
|
7893
|
+
|
|
7894
|
+
// src/private/components/Backdrop/Backdrop.tsx
|
|
7895
|
+
var import_react32 = require("react");
|
|
7896
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
7897
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7898
|
+
var backdropAnimationDuration = 150;
|
|
7899
|
+
var alignVerticalMap = {
|
|
7900
|
+
stretch: "normal",
|
|
7901
|
+
top: "start",
|
|
7902
|
+
center: "center",
|
|
7903
|
+
bottom: "end"
|
|
7904
|
+
};
|
|
7905
|
+
var alignHorizontalMap = {
|
|
7906
|
+
left: "start",
|
|
7907
|
+
center: "center",
|
|
7908
|
+
right: "end"
|
|
7909
|
+
};
|
|
7910
|
+
var BackdropComponent = import_styled_components46.default.div`
|
|
7911
|
+
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
7912
|
+
animation-name: backdropShow;
|
|
7913
|
+
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
7914
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7915
|
+
background: var(--wui-color-backdrop);
|
|
7916
|
+
display: flex;
|
|
7917
|
+
inset: 0;
|
|
7918
|
+
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
7919
|
+
overflow-y: auto;
|
|
7920
|
+
position: fixed;
|
|
7921
|
+
z-index: var(--wui-zindex-backdrop);
|
|
7922
|
+
|
|
7923
|
+
@keyframes backdropShow {
|
|
7924
|
+
from {
|
|
7925
|
+
opacity: 0;
|
|
7926
|
+
}
|
|
7927
|
+
|
|
7928
|
+
to {
|
|
7929
|
+
opacity: 1;
|
|
7930
|
+
}
|
|
7931
|
+
}
|
|
7932
|
+
`;
|
|
7933
|
+
var Backdrop = (0, import_react32.forwardRef)(
|
|
7934
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7935
|
+
BackdropComponent,
|
|
7936
|
+
{
|
|
7937
|
+
ref,
|
|
7938
|
+
$alignHorizontal: alignHorizontal,
|
|
7939
|
+
$alignVertical: alignVertical,
|
|
7940
|
+
...otherProps,
|
|
7941
|
+
children
|
|
7942
|
+
}
|
|
7943
|
+
)
|
|
7944
|
+
);
|
|
7945
|
+
Backdrop.displayName = "Backdrop";
|
|
7946
|
+
|
|
7947
|
+
// src/components/Modal/Modal.tsx
|
|
7948
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7949
|
+
var ModalBody = import_styled_components47.default.div`
|
|
7936
7950
|
flex-direction: column;
|
|
7937
7951
|
display: flex;
|
|
7938
7952
|
order: 2;
|
|
7939
7953
|
`;
|
|
7940
|
-
var Modal = (0,
|
|
7954
|
+
var Modal = (0, import_react33.forwardRef)(
|
|
7941
7955
|
({
|
|
7942
7956
|
children,
|
|
7943
7957
|
fullHeight = false,
|
|
@@ -7950,8 +7964,8 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7950
7964
|
width,
|
|
7951
7965
|
...props
|
|
7952
7966
|
}, ref) => {
|
|
7953
|
-
return /* @__PURE__ */ (0,
|
|
7954
|
-
|
|
7967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
7968
|
+
import_react_dialog4.Root,
|
|
7955
7969
|
{
|
|
7956
7970
|
onOpenChange: (open2) => {
|
|
7957
7971
|
if (!open2 && (0, import_type_guards26.isNotNil)(onRequestClose)) {
|
|
@@ -7959,9 +7973,9 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7959
7973
|
}
|
|
7960
7974
|
},
|
|
7961
7975
|
open: isOpen,
|
|
7962
|
-
children: /* @__PURE__ */ (0,
|
|
7963
|
-
/* @__PURE__ */ (0,
|
|
7964
|
-
/* @__PURE__ */ (0,
|
|
7976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_react_dialog4.Portal, { children: [
|
|
7977
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Backdrop, {}),
|
|
7978
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
7965
7979
|
ModalContent,
|
|
7966
7980
|
{
|
|
7967
7981
|
ref,
|
|
@@ -7978,8 +7992,8 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7978
7992
|
width,
|
|
7979
7993
|
...props,
|
|
7980
7994
|
children: [
|
|
7981
|
-
/* @__PURE__ */ (0,
|
|
7982
|
-
/* @__PURE__ */ (0,
|
|
7995
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ModalBody, { children }),
|
|
7996
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
7983
7997
|
ModalHeader,
|
|
7984
7998
|
{
|
|
7985
7999
|
hideCloseButton,
|
|
@@ -7998,16 +8012,16 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7998
8012
|
Modal.displayName = "Modal";
|
|
7999
8013
|
|
|
8000
8014
|
// src/components/Radio/Radio.tsx
|
|
8001
|
-
var
|
|
8002
|
-
var
|
|
8015
|
+
var import_react34 = require("react");
|
|
8016
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8003
8017
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8004
|
-
var
|
|
8005
|
-
var StyledLabelWrapper2 =
|
|
8018
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
8019
|
+
var StyledLabelWrapper2 = import_styled_components48.default.div`
|
|
8006
8020
|
display: flex;
|
|
8007
8021
|
flex-direction: column;
|
|
8008
8022
|
padding-left: var(--wui-space-02);
|
|
8009
8023
|
`;
|
|
8010
|
-
var StyledRadio =
|
|
8024
|
+
var StyledRadio = import_styled_components48.default.input`
|
|
8011
8025
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
8012
8026
|
appearance: none;
|
|
8013
8027
|
margin: 0;
|
|
@@ -8033,11 +8047,11 @@ var StyledRadio = import_styled_components47.default.input`
|
|
|
8033
8047
|
transform: scale(1);
|
|
8034
8048
|
}
|
|
8035
8049
|
`;
|
|
8036
|
-
var disabledStyle2 =
|
|
8050
|
+
var disabledStyle2 = import_styled_components48.css`
|
|
8037
8051
|
cursor: not-allowed;
|
|
8038
8052
|
opacity: 0.5;
|
|
8039
8053
|
`;
|
|
8040
|
-
var errorStyle =
|
|
8054
|
+
var errorStyle = import_styled_components48.css`
|
|
8041
8055
|
/* TODO Lamp to design error state */
|
|
8042
8056
|
&:hover,
|
|
8043
8057
|
&:focus,
|
|
@@ -8045,11 +8059,11 @@ var errorStyle = import_styled_components47.css`
|
|
|
8045
8059
|
border-color: transparent !important;
|
|
8046
8060
|
}
|
|
8047
8061
|
`;
|
|
8048
|
-
var defaultHoverStyle =
|
|
8062
|
+
var defaultHoverStyle = import_styled_components48.css`
|
|
8049
8063
|
/* TODO Lamp to design hover state */
|
|
8050
8064
|
cursor: pointer;
|
|
8051
8065
|
`;
|
|
8052
|
-
var StyledRadioWrapper =
|
|
8066
|
+
var StyledRadioWrapper = import_styled_components48.default.div`
|
|
8053
8067
|
align-items: baseline;
|
|
8054
8068
|
border: 1px solid transparent;
|
|
8055
8069
|
border-radius: 4px;
|
|
@@ -8072,7 +8086,7 @@ var StyledRadioWrapper = import_styled_components47.default.div`
|
|
|
8072
8086
|
|
|
8073
8087
|
${({ disabled }) => disabled && disabledStyle2};
|
|
8074
8088
|
`;
|
|
8075
|
-
var Radio = (0,
|
|
8089
|
+
var Radio = (0, import_react34.forwardRef)(
|
|
8076
8090
|
({
|
|
8077
8091
|
checked,
|
|
8078
8092
|
disabled = false,
|
|
@@ -8085,15 +8099,15 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8085
8099
|
value = "false",
|
|
8086
8100
|
...otherProps
|
|
8087
8101
|
}, ref) => {
|
|
8088
|
-
const generatedId = (0,
|
|
8102
|
+
const generatedId = (0, import_react34.useId)();
|
|
8089
8103
|
const computedId = (0, import_type_guards27.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
8090
|
-
return /* @__PURE__ */ (0,
|
|
8104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(
|
|
8091
8105
|
StyledRadioWrapper,
|
|
8092
8106
|
{
|
|
8093
8107
|
"aria-invalid": otherProps["aria-invalid"],
|
|
8094
8108
|
disabled,
|
|
8095
8109
|
children: [
|
|
8096
|
-
/* @__PURE__ */ (0,
|
|
8110
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
8097
8111
|
StyledRadio,
|
|
8098
8112
|
{
|
|
8099
8113
|
ref,
|
|
@@ -8108,8 +8122,8 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8108
8122
|
...otherProps
|
|
8109
8123
|
}
|
|
8110
8124
|
),
|
|
8111
|
-
/* @__PURE__ */ (0,
|
|
8112
|
-
/* @__PURE__ */ (0,
|
|
8125
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(StyledLabelWrapper2, { children: [
|
|
8126
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
8113
8127
|
Label,
|
|
8114
8128
|
{
|
|
8115
8129
|
disabled,
|
|
@@ -8118,7 +8132,7 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8118
8132
|
children: label
|
|
8119
8133
|
}
|
|
8120
8134
|
),
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8135
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(LabelDescription, { children: description })
|
|
8122
8136
|
] })
|
|
8123
8137
|
]
|
|
8124
8138
|
}
|
|
@@ -8128,11 +8142,11 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8128
8142
|
Radio.displayName = "Radio";
|
|
8129
8143
|
|
|
8130
8144
|
// src/components/Tag/Tag.tsx
|
|
8131
|
-
var
|
|
8132
|
-
var
|
|
8145
|
+
var import_react35 = require("react");
|
|
8146
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
8133
8147
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
8134
|
-
var
|
|
8135
|
-
var TagLabel =
|
|
8148
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
8149
|
+
var TagLabel = import_styled_components49.default.a`
|
|
8136
8150
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8137
8151
|
font-size: var(--wui-typography-label-4-size);
|
|
8138
8152
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8160,14 +8174,14 @@ var TagLabel = import_styled_components48.default.a`
|
|
|
8160
8174
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8161
8175
|
}
|
|
8162
8176
|
`;
|
|
8163
|
-
var TagDivider =
|
|
8177
|
+
var TagDivider = import_styled_components49.default.div`
|
|
8164
8178
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8165
8179
|
border-left: 1px solid var(--wui-color-border);
|
|
8166
8180
|
display: flex;
|
|
8167
8181
|
height: 14px;
|
|
8168
8182
|
width: 1px;
|
|
8169
8183
|
`;
|
|
8170
|
-
var StyledRemoveButton =
|
|
8184
|
+
var StyledRemoveButton = import_styled_components49.default.button`
|
|
8171
8185
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8172
8186
|
all: unset;
|
|
8173
8187
|
cursor: pointer;
|
|
@@ -8195,7 +8209,7 @@ var StyledRemoveButton = import_styled_components48.default.button`
|
|
|
8195
8209
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8196
8210
|
}
|
|
8197
8211
|
`;
|
|
8198
|
-
var StyledTag =
|
|
8212
|
+
var StyledTag = import_styled_components49.default.div`
|
|
8199
8213
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8200
8214
|
align-items: center;
|
|
8201
8215
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8212,39 +8226,39 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
8212
8226
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8213
8227
|
);
|
|
8214
8228
|
}
|
|
8215
|
-
return /* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8217
|
-
/* @__PURE__ */ (0,
|
|
8229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
8230
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
8231
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8218
8232
|
StyledRemoveButton,
|
|
8219
8233
|
{
|
|
8220
8234
|
$colorScheme: colorScheme,
|
|
8221
8235
|
onClick: onClickRemove,
|
|
8222
8236
|
type: "button",
|
|
8223
8237
|
children: [
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8238
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8225
8239
|
Icon,
|
|
8226
8240
|
{
|
|
8227
8241
|
size: "sm",
|
|
8228
8242
|
type: "close"
|
|
8229
8243
|
}
|
|
8230
8244
|
),
|
|
8231
|
-
/* @__PURE__ */ (0,
|
|
8245
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8232
8246
|
]
|
|
8233
8247
|
}
|
|
8234
8248
|
)
|
|
8235
8249
|
] });
|
|
8236
8250
|
};
|
|
8237
|
-
var Tag = (0,
|
|
8251
|
+
var Tag = (0, import_react35.forwardRef)(
|
|
8238
8252
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8239
8253
|
const labelProps = (0, import_type_guards28.isNotNil)(href) && (0, import_type_guards28.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
8240
|
-
return /* @__PURE__ */ (0,
|
|
8254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8241
8255
|
StyledTag,
|
|
8242
8256
|
{
|
|
8243
8257
|
ref,
|
|
8244
8258
|
$colorScheme: colorScheme,
|
|
8245
8259
|
...otherProps,
|
|
8246
8260
|
children: [
|
|
8247
|
-
/* @__PURE__ */ (0,
|
|
8261
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8248
8262
|
TagLabel,
|
|
8249
8263
|
{
|
|
8250
8264
|
...labelProps,
|
|
@@ -8252,7 +8266,7 @@ var Tag = (0, import_react34.forwardRef)(
|
|
|
8252
8266
|
children: label
|
|
8253
8267
|
}
|
|
8254
8268
|
),
|
|
8255
|
-
/* @__PURE__ */ (0,
|
|
8269
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8256
8270
|
RemoveButton,
|
|
8257
8271
|
{
|
|
8258
8272
|
colorScheme,
|
|
@@ -8269,16 +8283,16 @@ Tag.displayName = "Tag";
|
|
|
8269
8283
|
|
|
8270
8284
|
// src/components/Tooltip/Tooltip.tsx
|
|
8271
8285
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8272
|
-
var
|
|
8273
|
-
var
|
|
8274
|
-
var CompactTooltipStyles =
|
|
8286
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
8287
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
8288
|
+
var CompactTooltipStyles = import_styled_components50.css`
|
|
8275
8289
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8276
8290
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8277
8291
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8278
8292
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8279
8293
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8280
8294
|
`;
|
|
8281
|
-
var StyledContent = (0,
|
|
8295
|
+
var StyledContent = (0, import_styled_components50.default)(import_react_tooltip2.Content)`
|
|
8282
8296
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8283
8297
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8284
8298
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8336,14 +8350,14 @@ var Tooltip = ({
|
|
|
8336
8350
|
if (forceOpen === true) {
|
|
8337
8351
|
rootProps.open = true;
|
|
8338
8352
|
}
|
|
8339
|
-
return /* @__PURE__ */ (0,
|
|
8353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
8340
8354
|
import_react_tooltip2.Root,
|
|
8341
8355
|
{
|
|
8342
8356
|
delayDuration: delay,
|
|
8343
8357
|
...rootProps,
|
|
8344
8358
|
children: [
|
|
8345
|
-
/* @__PURE__ */ (0,
|
|
8346
|
-
/* @__PURE__ */ (0,
|
|
8359
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
8347
8361
|
StyledContent,
|
|
8348
8362
|
{
|
|
8349
8363
|
$compact: compact,
|
|
@@ -8351,7 +8365,7 @@ var Tooltip = ({
|
|
|
8351
8365
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8352
8366
|
children: [
|
|
8353
8367
|
content,
|
|
8354
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8368
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8355
8369
|
"svg",
|
|
8356
8370
|
{
|
|
8357
8371
|
fill: "var(--tooltip-bg)",
|
|
@@ -8360,7 +8374,7 @@ var Tooltip = ({
|
|
|
8360
8374
|
viewBox: "0 0 12 8",
|
|
8361
8375
|
width: "12",
|
|
8362
8376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8363
|
-
children: /* @__PURE__ */ (0,
|
|
8377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("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" })
|
|
8364
8378
|
}
|
|
8365
8379
|
) }) : null
|
|
8366
8380
|
]
|
|
@@ -8373,26 +8387,26 @@ var Tooltip = ({
|
|
|
8373
8387
|
Tooltip.displayName = "Tooltip";
|
|
8374
8388
|
|
|
8375
8389
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8376
|
-
var
|
|
8390
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8377
8391
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
8378
|
-
var
|
|
8392
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
8379
8393
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8380
8394
|
if (iconOnly) {
|
|
8381
|
-
return /* @__PURE__ */ (0,
|
|
8395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8382
8396
|
"g",
|
|
8383
8397
|
{
|
|
8384
8398
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8385
8399
|
fill: brandmarkColor,
|
|
8386
|
-
children: /* @__PURE__ */ (0,
|
|
8400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("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" })
|
|
8387
8401
|
}
|
|
8388
8402
|
);
|
|
8389
8403
|
}
|
|
8390
|
-
return /* @__PURE__ */ (0,
|
|
8404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8391
8405
|
"g",
|
|
8392
8406
|
{
|
|
8393
8407
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8394
8408
|
fill: brandmarkColor,
|
|
8395
|
-
children: /* @__PURE__ */ (0,
|
|
8409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("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" })
|
|
8396
8410
|
}
|
|
8397
8411
|
);
|
|
8398
8412
|
};
|
|
@@ -8400,12 +8414,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8400
8414
|
if (iconOnly) {
|
|
8401
8415
|
return null;
|
|
8402
8416
|
}
|
|
8403
|
-
return /* @__PURE__ */ (0,
|
|
8417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8404
8418
|
"g",
|
|
8405
8419
|
{
|
|
8406
8420
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8407
8421
|
fill: logotypeColor,
|
|
8408
|
-
children: /* @__PURE__ */ (0,
|
|
8422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("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" })
|
|
8409
8423
|
}
|
|
8410
8424
|
);
|
|
8411
8425
|
};
|
|
@@ -8415,7 +8429,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8415
8429
|
}
|
|
8416
8430
|
return "0 0 144 31.47";
|
|
8417
8431
|
};
|
|
8418
|
-
var WistiaLogoComponent =
|
|
8432
|
+
var WistiaLogoComponent = import_styled_components51.default.svg`
|
|
8419
8433
|
height: ${({ height }) => `${height}px`};
|
|
8420
8434
|
|
|
8421
8435
|
/* ensure it will always fit on mobile */
|
|
@@ -8457,7 +8471,7 @@ var WistiaLogo = ({
|
|
|
8457
8471
|
};
|
|
8458
8472
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8459
8473
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8460
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8474
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
|
|
8461
8475
|
WistiaLogoComponent,
|
|
8462
8476
|
{
|
|
8463
8477
|
$hoverColor: hoverColor,
|
|
@@ -8467,14 +8481,14 @@ var WistiaLogo = ({
|
|
|
8467
8481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8468
8482
|
...otherProps,
|
|
8469
8483
|
children: [
|
|
8470
|
-
/* @__PURE__ */ (0,
|
|
8471
|
-
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
8484
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("title", { children: title }),
|
|
8485
|
+
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("desc", { children: description }) : null,
|
|
8472
8486
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8473
8487
|
renderLogotype(logotypeColor, iconOnly)
|
|
8474
8488
|
]
|
|
8475
8489
|
}
|
|
8476
8490
|
);
|
|
8477
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8491
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("a", { href, children: Logo }) : Logo;
|
|
8478
8492
|
};
|
|
8479
8493
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8480
8494
|
// Annotate the CommonJS export names for ESM import in node:
|