@wistia/ui 0.8.20 → 0.8.21

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.8.20
3
+ * @license @wistia/ui v0.8.21
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2005,7 +2005,7 @@ var useClipboard = (textToCopy, timeout = 1500) => {
2005
2005
  return [onCopy, hasCopied, failedToCopy];
2006
2006
  };
2007
2007
 
2008
- // src/hooks/useFilePicker/index.ts
2008
+ // src/hooks/useFilePicker/useFilePicker.tsx
2009
2009
  import { useFilePicker, useImperativeFilePicker } from "use-file-picker";
2010
2010
  import {
2011
2011
  FileAmountLimitValidator,
@@ -7089,7 +7089,7 @@ var StyledButtonContent = styled5.div`
7089
7089
  ${({ $hasRightIcon }) => $hasRightIcon && "padding-right: 0;"}
7090
7090
  `;
7091
7091
  var StyledButtonContentLabel = styled5.span`
7092
- flex: 1;
7092
+ flex: ${({ $fullWidth }) => $fullWidth ? "initial" : "1"};
7093
7093
  `;
7094
7094
  var StyledButtonLoading = styled5.div`
7095
7095
  position: absolute;
@@ -7099,7 +7099,8 @@ var ButtonContent = ({
7099
7099
  isLoading = false,
7100
7100
  leftIcon,
7101
7101
  rightIcon,
7102
- children
7102
+ children,
7103
+ fullWidth = false
7103
7104
  }) => {
7104
7105
  return /* @__PURE__ */ jsxs8(Fragment, { children: [
7105
7106
  isLoading ? /* @__PURE__ */ jsx193(StyledButtonLoading, { children: /* @__PURE__ */ jsx193(Icon, { type: "spinner" }) }) : null,
@@ -7111,7 +7112,7 @@ var ButtonContent = ({
7111
7112
  $isLoading: isLoading,
7112
7113
  children: [
7113
7114
  leftIcon ?? null,
7114
- /* @__PURE__ */ jsx193(StyledButtonContentLabel, { children }),
7115
+ /* @__PURE__ */ jsx193(StyledButtonContentLabel, { $fullWidth: fullWidth, children }),
7115
7116
  rightIcon ?? null
7116
7117
  ]
7117
7118
  }
@@ -7161,6 +7162,7 @@ var Button = forwardRef2(
7161
7162
  children: unstyled ? children : /* @__PURE__ */ jsx193(
7162
7163
  ButtonContent,
7163
7164
  {
7165
+ fullWidth: responsiveFullWidth,
7164
7166
  isLoading,
7165
7167
  leftIcon,
7166
7168
  rightIcon,
@@ -7190,6 +7192,7 @@ var Button = forwardRef2(
7190
7192
  children: unstyled ? children : /* @__PURE__ */ jsx193(
7191
7193
  ButtonContent,
7192
7194
  {
7195
+ fullWidth: responsiveFullWidth,
7193
7196
  isLoading,
7194
7197
  leftIcon,
7195
7198
  rightIcon,
@@ -9003,8 +9006,56 @@ import {
9003
9006
  Portal as TooltipPortal,
9004
9007
  Arrow as TooltipArrow
9005
9008
  } from "@radix-ui/react-tooltip";
9006
- import styled29 from "styled-components";
9009
+ import styled29, { keyframes as keyframes2 } from "styled-components";
9007
9010
  import { jsx as jsx218, jsxs as jsxs19 } from "react/jsx-runtime";
9011
+ var hide = keyframes2`
9012
+ from {
9013
+ opacity: 1;
9014
+ }
9015
+ to {
9016
+ opacity: 0;
9017
+ }
9018
+ `;
9019
+ var slideDownAndFade = keyframes2`
9020
+ from {
9021
+ opacity: 0;
9022
+ transform: translateY(-6px);
9023
+ }
9024
+ to {
9025
+ opacity: 1;
9026
+ transform: translateY(0);
9027
+ }
9028
+ `;
9029
+ var slideLeftAndFade = keyframes2`
9030
+ from {
9031
+ opacity: 0;
9032
+ transform: translateX(6px);
9033
+ }
9034
+ to {
9035
+ opacity: 1;
9036
+ transform: translateX(0);
9037
+ }
9038
+ `;
9039
+ var slideUpAndFade = keyframes2`
9040
+ from {
9041
+ opacity: 0;
9042
+ transform: translateY(6px);
9043
+ }
9044
+ to {
9045
+ opacity: 1;
9046
+ transform: translateY(0);
9047
+ }
9048
+ `;
9049
+ var slideRightAndFade = keyframes2`
9050
+ from {
9051
+ opacity: 0;
9052
+ transform: translateX(-6px);
9053
+ }
9054
+ to {
9055
+ opacity: 1;
9056
+ transform: translateX(0);
9057
+ }
9058
+ `;
9008
9059
  var StyledContent = styled29(TooltipContent)`
9009
9060
  --tooltip-font-family: var(--wui-typography-family-default);
9010
9061
  --tooltip-border-radius: var(--wui-border-radius-05);
@@ -9015,6 +9066,8 @@ var StyledContent = styled29(TooltipContent)`
9015
9066
  --tooltip-font-weight: var(--wui-typography-label-4-weight);
9016
9067
  --tooltip-horizontal-padding: var(--wui-space-02);
9017
9068
  --tooltip-vertical-padding: var(--wui-space-03);
9069
+ --tooltip-animation-duration: var(--wui-motion-duration-04);
9070
+ --tooltip-animation-timing-function: var(--wui-motion-ease-out);
9018
9071
 
9019
9072
  font-family: var(--tooltip-font-family);
9020
9073
  font-size: var(--tooltip-font-size);
@@ -9023,26 +9076,30 @@ var StyledContent = styled29(TooltipContent)`
9023
9076
  background-color: var(--tooltip-bg);
9024
9077
  color: var(--tooltip-color);
9025
9078
  user-select: none;
9026
- animation-duration: 400ms;
9027
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
9079
+ animation-duration: var(--tooltip-animation-duration);
9080
+ animation-timing-function: var(--tooltip-animation-timing-function);
9028
9081
  will-change: transform, opacity;
9029
9082
  max-width: 30em;
9030
9083
  z-index: var(--wui-zindex-tooltip);
9031
9084
 
9085
+ &[data-state='closed'] {
9086
+ animation-name: ${hide};
9087
+ }
9088
+
9032
9089
  &[data-state='delayed-open'][data-side='top'] {
9033
- animation-name: slideDownAndFade;
9090
+ animation-name: ${slideUpAndFade};
9034
9091
  }
9035
9092
 
9036
9093
  &[data-state='delayed-open'][data-side='right'] {
9037
- animation-name: slideLeftAndFade;
9094
+ animation-name: ${slideRightAndFade};
9038
9095
  }
9039
9096
 
9040
9097
  &[data-state='delayed-open'][data-side='bottom'] {
9041
- animation-name: slideUpAndFade;
9098
+ animation-name: ${slideDownAndFade};
9042
9099
  }
9043
9100
 
9044
9101
  &[data-state='delayed-open'][data-side='left'] {
9045
- animation-name: slideRightAndFade;
9102
+ animation-name: ${slideLeftAndFade};
9046
9103
  }
9047
9104
  `;
9048
9105
  var VISUAL_OFFSET = 6;
@@ -10031,7 +10088,7 @@ var InputClickToCopy = forwardRef14(
10031
10088
  InputClickToCopy.displayName = "InputClickToCopy";
10032
10089
 
10033
10090
  // src/components/Menu/Menu.tsx
10034
- import styled39, { css as css29, keyframes as keyframes2 } from "styled-components";
10091
+ import styled39, { css as css29, keyframes as keyframes3 } from "styled-components";
10035
10092
  import {
10036
10093
  DropdownMenu,
10037
10094
  DropdownMenuTrigger,
@@ -10048,7 +10105,7 @@ var useMenuContext = () => useContext5(MenuContext);
10048
10105
 
10049
10106
  // src/components/Menu/Menu.tsx
10050
10107
  import { jsx as jsx231, jsxs as jsxs25 } from "react/jsx-runtime";
10051
- var open = keyframes2`
10108
+ var open = keyframes3`
10052
10109
  from {
10053
10110
  opacity: 0;
10054
10111
  transform: scale(.97) translateY(-8px);
@@ -10058,7 +10115,7 @@ var open = keyframes2`
10058
10115
  transform: scale(1);
10059
10116
  }
10060
10117
  `;
10061
- var close = keyframes2`
10118
+ var close = keyframes3`
10062
10119
  from {
10063
10120
  opacity: 1;
10064
10121
  transform: scale(1);