@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.cjs 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
  *
@@ -2141,7 +2141,7 @@ var useClipboard = (textToCopy, timeout = 1500) => {
2141
2141
  return [onCopy, hasCopied, failedToCopy];
2142
2142
  };
2143
2143
 
2144
- // src/hooks/useFilePicker/index.ts
2144
+ // src/hooks/useFilePicker/useFilePicker.tsx
2145
2145
  var import_use_file_picker = require("use-file-picker");
2146
2146
  var import_validators = require("use-file-picker/validators");
2147
2147
 
@@ -7219,7 +7219,7 @@ var StyledButtonContent = import_styled_components21.default.div`
7219
7219
  ${({ $hasRightIcon }) => $hasRightIcon && "padding-right: 0;"}
7220
7220
  `;
7221
7221
  var StyledButtonContentLabel = import_styled_components21.default.span`
7222
- flex: 1;
7222
+ flex: ${({ $fullWidth }) => $fullWidth ? "initial" : "1"};
7223
7223
  `;
7224
7224
  var StyledButtonLoading = import_styled_components21.default.div`
7225
7225
  position: absolute;
@@ -7229,7 +7229,8 @@ var ButtonContent = ({
7229
7229
  isLoading = false,
7230
7230
  leftIcon,
7231
7231
  rightIcon,
7232
- children
7232
+ children,
7233
+ fullWidth = false
7233
7234
  }) => {
7234
7235
  return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_jsx_runtime193.Fragment, { children: [
7235
7236
  isLoading ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledButtonLoading, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Icon, { type: "spinner" }) }) : null,
@@ -7241,7 +7242,7 @@ var ButtonContent = ({
7241
7242
  $isLoading: isLoading,
7242
7243
  children: [
7243
7244
  leftIcon ?? null,
7244
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledButtonContentLabel, { children }),
7245
+ /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledButtonContentLabel, { $fullWidth: fullWidth, children }),
7245
7246
  rightIcon ?? null
7246
7247
  ]
7247
7248
  }
@@ -7291,6 +7292,7 @@ var Button = (0, import_react22.forwardRef)(
7291
7292
  children: unstyled ? children : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
7292
7293
  ButtonContent,
7293
7294
  {
7295
+ fullWidth: responsiveFullWidth,
7294
7296
  isLoading,
7295
7297
  leftIcon,
7296
7298
  rightIcon,
@@ -7320,6 +7322,7 @@ var Button = (0, import_react22.forwardRef)(
7320
7322
  children: unstyled ? children : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
7321
7323
  ButtonContent,
7322
7324
  {
7325
+ fullWidth: responsiveFullWidth,
7323
7326
  isLoading,
7324
7327
  leftIcon,
7325
7328
  rightIcon,
@@ -9129,6 +9132,54 @@ var import_react35 = require("react");
9129
9132
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
9130
9133
  var import_styled_components45 = __toESM(require("styled-components"));
9131
9134
  var import_jsx_runtime218 = require("react/jsx-runtime");
9135
+ var hide = import_styled_components45.keyframes`
9136
+ from {
9137
+ opacity: 1;
9138
+ }
9139
+ to {
9140
+ opacity: 0;
9141
+ }
9142
+ `;
9143
+ var slideDownAndFade = import_styled_components45.keyframes`
9144
+ from {
9145
+ opacity: 0;
9146
+ transform: translateY(-6px);
9147
+ }
9148
+ to {
9149
+ opacity: 1;
9150
+ transform: translateY(0);
9151
+ }
9152
+ `;
9153
+ var slideLeftAndFade = import_styled_components45.keyframes`
9154
+ from {
9155
+ opacity: 0;
9156
+ transform: translateX(6px);
9157
+ }
9158
+ to {
9159
+ opacity: 1;
9160
+ transform: translateX(0);
9161
+ }
9162
+ `;
9163
+ var slideUpAndFade = import_styled_components45.keyframes`
9164
+ from {
9165
+ opacity: 0;
9166
+ transform: translateY(6px);
9167
+ }
9168
+ to {
9169
+ opacity: 1;
9170
+ transform: translateY(0);
9171
+ }
9172
+ `;
9173
+ var slideRightAndFade = import_styled_components45.keyframes`
9174
+ from {
9175
+ opacity: 0;
9176
+ transform: translateX(-6px);
9177
+ }
9178
+ to {
9179
+ opacity: 1;
9180
+ transform: translateX(0);
9181
+ }
9182
+ `;
9132
9183
  var StyledContent = (0, import_styled_components45.default)(import_react_tooltip2.Content)`
9133
9184
  --tooltip-font-family: var(--wui-typography-family-default);
9134
9185
  --tooltip-border-radius: var(--wui-border-radius-05);
@@ -9139,6 +9190,8 @@ var StyledContent = (0, import_styled_components45.default)(import_react_tooltip
9139
9190
  --tooltip-font-weight: var(--wui-typography-label-4-weight);
9140
9191
  --tooltip-horizontal-padding: var(--wui-space-02);
9141
9192
  --tooltip-vertical-padding: var(--wui-space-03);
9193
+ --tooltip-animation-duration: var(--wui-motion-duration-04);
9194
+ --tooltip-animation-timing-function: var(--wui-motion-ease-out);
9142
9195
 
9143
9196
  font-family: var(--tooltip-font-family);
9144
9197
  font-size: var(--tooltip-font-size);
@@ -9147,26 +9200,30 @@ var StyledContent = (0, import_styled_components45.default)(import_react_tooltip
9147
9200
  background-color: var(--tooltip-bg);
9148
9201
  color: var(--tooltip-color);
9149
9202
  user-select: none;
9150
- animation-duration: 400ms;
9151
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
9203
+ animation-duration: var(--tooltip-animation-duration);
9204
+ animation-timing-function: var(--tooltip-animation-timing-function);
9152
9205
  will-change: transform, opacity;
9153
9206
  max-width: 30em;
9154
9207
  z-index: var(--wui-zindex-tooltip);
9155
9208
 
9209
+ &[data-state='closed'] {
9210
+ animation-name: ${hide};
9211
+ }
9212
+
9156
9213
  &[data-state='delayed-open'][data-side='top'] {
9157
- animation-name: slideDownAndFade;
9214
+ animation-name: ${slideUpAndFade};
9158
9215
  }
9159
9216
 
9160
9217
  &[data-state='delayed-open'][data-side='right'] {
9161
- animation-name: slideLeftAndFade;
9218
+ animation-name: ${slideRightAndFade};
9162
9219
  }
9163
9220
 
9164
9221
  &[data-state='delayed-open'][data-side='bottom'] {
9165
- animation-name: slideUpAndFade;
9222
+ animation-name: ${slideDownAndFade};
9166
9223
  }
9167
9224
 
9168
9225
  &[data-state='delayed-open'][data-side='left'] {
9169
- animation-name: slideRightAndFade;
9226
+ animation-name: ${slideLeftAndFade};
9170
9227
  }
9171
9228
  `;
9172
9229
  var VISUAL_OFFSET = 6;