@wistia/ui 0.7.1-beta.dd072345.612ae5b → 0.8.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 +7 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -38
- package/dist/index.d.ts +2 -38
- package/dist/index.mjs +60 -143
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.
|
|
3
|
+
* @license @wistia/ui v0.8.0
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -76,7 +76,6 @@ __export(index_exports, {
|
|
|
76
76
|
Image: () => Image,
|
|
77
77
|
ImageDimensionsValidator: () => import_validators.ImageDimensionsValidator,
|
|
78
78
|
Input: () => Input,
|
|
79
|
-
InputClickToCopy: () => InputClickToCopy,
|
|
80
79
|
Label: () => Label,
|
|
81
80
|
Link: () => Link,
|
|
82
81
|
Menu: () => Menu,
|
|
@@ -9040,26 +9039,17 @@ var import_react29 = require("react");
|
|
|
9040
9039
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
9041
9040
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
9042
9041
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9043
|
-
var CompactTooltipStyles = import_styled_components44.css`
|
|
9044
|
-
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
9045
|
-
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
9046
|
-
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
9047
|
-
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
9048
|
-
--tooltip-vertical-padding: var(--wui-space-03);
|
|
9049
|
-
`;
|
|
9050
9042
|
var StyledContent = (0, import_styled_components44.default)(import_react_tooltip2.Content)`
|
|
9051
9043
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
9052
9044
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
9053
9045
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
9054
9046
|
--tooltip-color: var(--wui-color-text-on-fill);
|
|
9055
|
-
--tooltip-font-size: var(--wui-typography-label-
|
|
9056
|
-
--tooltip-line-height: var(--wui-typography-label-
|
|
9057
|
-
--tooltip-font-weight: var(--wui-typography-label-
|
|
9058
|
-
--tooltip-horizontal-padding: var(--wui-space-
|
|
9047
|
+
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
9048
|
+
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
9049
|
+
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
9050
|
+
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
9059
9051
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
9060
9052
|
|
|
9061
|
-
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
9062
|
-
|
|
9063
9053
|
font-family: var(--tooltip-font-family);
|
|
9064
9054
|
font-size: var(--tooltip-font-size);
|
|
9065
9055
|
border-radius: var(--tooltip-border-radius);
|
|
@@ -9091,12 +9081,11 @@ var StyledContent = (0, import_styled_components44.default)(import_react_tooltip
|
|
|
9091
9081
|
`;
|
|
9092
9082
|
var VISUAL_OFFSET = 6;
|
|
9093
9083
|
var Tooltip = ({
|
|
9094
|
-
delay =
|
|
9084
|
+
delay = 500,
|
|
9095
9085
|
direction = "top",
|
|
9096
9086
|
content,
|
|
9097
9087
|
children,
|
|
9098
9088
|
forceOpen,
|
|
9099
|
-
compact = false,
|
|
9100
9089
|
hideArrow = false
|
|
9101
9090
|
}) => {
|
|
9102
9091
|
const rootProps = {};
|
|
@@ -9116,7 +9105,6 @@ var Tooltip = ({
|
|
|
9116
9105
|
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
9117
9106
|
StyledContent,
|
|
9118
9107
|
{
|
|
9119
|
-
$compact: compact,
|
|
9120
9108
|
side: direction,
|
|
9121
9109
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
9122
9110
|
children: [
|
|
@@ -9462,14 +9450,7 @@ var EditableHeading = ({
|
|
|
9462
9450
|
);
|
|
9463
9451
|
}
|
|
9464
9452
|
return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
|
|
9465
|
-
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9466
|
-
Tooltip,
|
|
9467
|
-
{
|
|
9468
|
-
compact: true,
|
|
9469
|
-
content: tooltipText,
|
|
9470
|
-
children: HeadingComponent2
|
|
9471
|
-
}
|
|
9472
|
-
),
|
|
9453
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
|
|
9473
9454
|
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9474
9455
|
"button",
|
|
9475
9456
|
{
|
|
@@ -12712,70 +12693,6 @@ var Thumbnail = (0, import_react66.forwardRef)(
|
|
|
12712
12693
|
}
|
|
12713
12694
|
);
|
|
12714
12695
|
Thumbnail.displayName = "Thumbnail";
|
|
12715
|
-
|
|
12716
|
-
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
12717
|
-
var import_styled_components90 = __toESM(require("styled-components"));
|
|
12718
|
-
var import_react67 = require("react");
|
|
12719
|
-
var import_type_guards54 = require("@wistia/type-guards");
|
|
12720
|
-
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
12721
|
-
var StyledInput2 = (0, import_styled_components90.default)(Input)`
|
|
12722
|
-
&:not([aria-disabled='true']) {
|
|
12723
|
-
cursor: pointer;
|
|
12724
|
-
}
|
|
12725
|
-
|
|
12726
|
-
&::selection {
|
|
12727
|
-
background-color: transparent;
|
|
12728
|
-
}
|
|
12729
|
-
`;
|
|
12730
|
-
var COPY_SUCCESS_DURATION = 2e3;
|
|
12731
|
-
var InputClickToCopy = (0, import_react67.forwardRef)(
|
|
12732
|
-
({ value, onCopy, ...props }, ref) => {
|
|
12733
|
-
const [isCopied, setIsCopied] = (0, import_react67.useState)(false);
|
|
12734
|
-
(0, import_react67.useEffect)(() => {
|
|
12735
|
-
if (isCopied) {
|
|
12736
|
-
const timeout = setTimeout(() => {
|
|
12737
|
-
setIsCopied(false);
|
|
12738
|
-
}, COPY_SUCCESS_DURATION);
|
|
12739
|
-
return () => {
|
|
12740
|
-
clearTimeout(timeout);
|
|
12741
|
-
};
|
|
12742
|
-
}
|
|
12743
|
-
return () => null;
|
|
12744
|
-
}, [isCopied]);
|
|
12745
|
-
const handleClick = (event) => {
|
|
12746
|
-
event.preventDefault();
|
|
12747
|
-
if ((0, import_type_guards54.isFunction)(props.onClick)) {
|
|
12748
|
-
props.onClick(event);
|
|
12749
|
-
}
|
|
12750
|
-
void copyToClipboard(value).then(() => {
|
|
12751
|
-
setIsCopied(true);
|
|
12752
|
-
if ((0, import_type_guards54.isFunction)(onCopy)) {
|
|
12753
|
-
onCopy(value);
|
|
12754
|
-
}
|
|
12755
|
-
return value;
|
|
12756
|
-
});
|
|
12757
|
-
};
|
|
12758
|
-
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
12759
|
-
StyledInput2,
|
|
12760
|
-
{
|
|
12761
|
-
"aria-label": "Click to Copy",
|
|
12762
|
-
...props,
|
|
12763
|
-
ref,
|
|
12764
|
-
onClick: handleClick,
|
|
12765
|
-
readOnly: true,
|
|
12766
|
-
rightIcon: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
12767
|
-
Icon,
|
|
12768
|
-
{
|
|
12769
|
-
colorScheme: "success",
|
|
12770
|
-
type: "checkmark-circle"
|
|
12771
|
-
}
|
|
12772
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Icon, { type: "save-as-copy" }),
|
|
12773
|
-
value
|
|
12774
|
-
}
|
|
12775
|
-
);
|
|
12776
|
-
}
|
|
12777
|
-
);
|
|
12778
|
-
InputClickToCopy.displayName = "InputClickToCopy";
|
|
12779
12696
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12780
12697
|
0 && (module.exports = {
|
|
12781
12698
|
ActionButton,
|
|
@@ -12815,7 +12732,6 @@ InputClickToCopy.displayName = "InputClickToCopy";
|
|
|
12815
12732
|
Image,
|
|
12816
12733
|
ImageDimensionsValidator,
|
|
12817
12734
|
Input,
|
|
12818
|
-
InputClickToCopy,
|
|
12819
12735
|
Label,
|
|
12820
12736
|
Link,
|
|
12821
12737
|
Menu,
|