@wistia/ui 0.8.20 → 0.8.21-beta.332e4674.e66612c

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-beta.332e4674.e66612c
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -1445,13 +1445,13 @@ var motionTokens = import_styled_components9.css`
1445
1445
  --wui-motion-duration-05: 400ms;
1446
1446
  --wui-motion-duration-06: 700ms;
1447
1447
 
1448
- @media (prefers-reduced-motion) {
1449
- --wui-motion-duration-01: 0ms;
1450
- --wui-motion-duration-02: 0ms;
1451
- --wui-motion-duration-03: 0ms;
1452
- --wui-motion-duration-04: 0ms;
1453
- --wui-motion-duration-05: 0ms;
1454
- --wui-motion-duration-06: 0ms;
1448
+ @media (prefers-reduced-motion: reduce) {
1449
+ --wui-motion-duration-01: 0.01ms;
1450
+ --wui-motion-duration-02: 0.01ms;
1451
+ --wui-motion-duration-03: 0.01ms;
1452
+ --wui-motion-duration-04: 0.01ms;
1453
+ --wui-motion-duration-05: 0.01ms;
1454
+ --wui-motion-duration-06: 0.01ms;
1455
1455
  }
1456
1456
 
1457
1457
  /* Easings */
@@ -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,
@@ -8557,12 +8560,19 @@ var import_styled_components38 = __toESM(require("styled-components"));
8557
8560
  var import_react_collapsible3 = require("@radix-ui/react-collapsible");
8558
8561
  var import_type_guards27 = require("@wistia/type-guards");
8559
8562
  var import_jsx_runtime211 = require("react/jsx-runtime");
8560
- var ClampedContent = import_styled_components38.default.div.attrs({ "data-wui-collapsible-content": true })`
8563
+ var ClampedContent = import_styled_components38.default.div`
8561
8564
  --wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
8562
8565
  `;
8563
8566
  var CollapsibleContent = ({ clamp, children }) => {
8564
8567
  if ((0, import_type_guards27.isNotUndefined)(clamp)) {
8565
- return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(ClampedContent, { $clamp: clamp, children });
8568
+ return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
8569
+ ClampedContent,
8570
+ {
8571
+ $clamp: clamp,
8572
+ "data-wui-collapsible-content": "true",
8573
+ children
8574
+ }
8575
+ );
8566
8576
  }
8567
8577
  return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(import_jsx_runtime211.Fragment, { children: [
8568
8578
  children,
@@ -9129,6 +9139,54 @@ var import_react35 = require("react");
9129
9139
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
9130
9140
  var import_styled_components45 = __toESM(require("styled-components"));
9131
9141
  var import_jsx_runtime218 = require("react/jsx-runtime");
9142
+ var hide = import_styled_components45.keyframes`
9143
+ from {
9144
+ opacity: 1;
9145
+ }
9146
+ to {
9147
+ opacity: 0;
9148
+ }
9149
+ `;
9150
+ var slideDownAndFade = import_styled_components45.keyframes`
9151
+ from {
9152
+ opacity: 0;
9153
+ transform: translateY(-6px);
9154
+ }
9155
+ to {
9156
+ opacity: 1;
9157
+ transform: translateY(0);
9158
+ }
9159
+ `;
9160
+ var slideLeftAndFade = import_styled_components45.keyframes`
9161
+ from {
9162
+ opacity: 0;
9163
+ transform: translateX(6px);
9164
+ }
9165
+ to {
9166
+ opacity: 1;
9167
+ transform: translateX(0);
9168
+ }
9169
+ `;
9170
+ var slideUpAndFade = import_styled_components45.keyframes`
9171
+ from {
9172
+ opacity: 0;
9173
+ transform: translateY(6px);
9174
+ }
9175
+ to {
9176
+ opacity: 1;
9177
+ transform: translateY(0);
9178
+ }
9179
+ `;
9180
+ var slideRightAndFade = import_styled_components45.keyframes`
9181
+ from {
9182
+ opacity: 0;
9183
+ transform: translateX(-6px);
9184
+ }
9185
+ to {
9186
+ opacity: 1;
9187
+ transform: translateX(0);
9188
+ }
9189
+ `;
9132
9190
  var StyledContent = (0, import_styled_components45.default)(import_react_tooltip2.Content)`
9133
9191
  --tooltip-font-family: var(--wui-typography-family-default);
9134
9192
  --tooltip-border-radius: var(--wui-border-radius-05);
@@ -9139,6 +9197,8 @@ var StyledContent = (0, import_styled_components45.default)(import_react_tooltip
9139
9197
  --tooltip-font-weight: var(--wui-typography-label-4-weight);
9140
9198
  --tooltip-horizontal-padding: var(--wui-space-02);
9141
9199
  --tooltip-vertical-padding: var(--wui-space-03);
9200
+ --tooltip-animation-duration: var(--wui-motion-duration-04);
9201
+ --tooltip-animation-timing-function: var(--wui-motion-ease-out);
9142
9202
 
9143
9203
  font-family: var(--tooltip-font-family);
9144
9204
  font-size: var(--tooltip-font-size);
@@ -9147,26 +9207,30 @@ var StyledContent = (0, import_styled_components45.default)(import_react_tooltip
9147
9207
  background-color: var(--tooltip-bg);
9148
9208
  color: var(--tooltip-color);
9149
9209
  user-select: none;
9150
- animation-duration: 400ms;
9151
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
9210
+ animation-duration: var(--tooltip-animation-duration);
9211
+ animation-timing-function: var(--tooltip-animation-timing-function);
9152
9212
  will-change: transform, opacity;
9153
9213
  max-width: 30em;
9154
9214
  z-index: var(--wui-zindex-tooltip);
9155
9215
 
9216
+ &[data-state='closed'] {
9217
+ animation-name: ${hide};
9218
+ }
9219
+
9156
9220
  &[data-state='delayed-open'][data-side='top'] {
9157
- animation-name: slideDownAndFade;
9221
+ animation-name: ${slideUpAndFade};
9158
9222
  }
9159
9223
 
9160
9224
  &[data-state='delayed-open'][data-side='right'] {
9161
- animation-name: slideLeftAndFade;
9225
+ animation-name: ${slideRightAndFade};
9162
9226
  }
9163
9227
 
9164
9228
  &[data-state='delayed-open'][data-side='bottom'] {
9165
- animation-name: slideUpAndFade;
9229
+ animation-name: ${slideDownAndFade};
9166
9230
  }
9167
9231
 
9168
9232
  &[data-state='delayed-open'][data-side='left'] {
9169
- animation-name: slideRightAndFade;
9233
+ animation-name: ${slideLeftAndFade};
9170
9234
  }
9171
9235
  `;
9172
9236
  var VISUAL_OFFSET = 6;
@@ -10469,15 +10533,19 @@ MenuItemButton.displayName = "MenuItemButton";
10469
10533
  var import_styled_components59 = __toESM(require("styled-components"));
10470
10534
  var import_jsx_runtime234 = require("react/jsx-runtime");
10471
10535
  var StyledMenuItemLabel = import_styled_components59.default.span``;
10472
- var StyledMenuItemDescription = (0, import_styled_components59.default)(Text).attrs({
10473
- variant: "body4",
10474
- prominence: "secondary"
10475
- })``;
10536
+ var StyledMenuItemDescription = (0, import_styled_components59.default)(Text)``;
10476
10537
  var MenuItemLabel = ({ children }) => {
10477
10538
  return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMenuItemLabel, { children });
10478
10539
  };
10479
10540
  var MenuItemDescription = ({ children }) => {
10480
- return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMenuItemDescription, { children });
10541
+ return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
10542
+ StyledMenuItemDescription,
10543
+ {
10544
+ prominence: "secondary",
10545
+ variant: "body4",
10546
+ children
10547
+ }
10548
+ );
10481
10549
  };
10482
10550
 
10483
10551
  // src/components/Menu/SubMenu.tsx