@wistia/ui 0.18.0-beta.978703a9.78cdfd1 → 0.18.0-beta.af6ce7a5.9372ce9

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.18.0-beta.978703a9.78cdfd1
3
+ * @license @wistia/ui v0.18.0-beta.af6ce7a5.9372ce9
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -3370,7 +3370,7 @@ var StyledToast = import_styled_components17.styled.div`
3370
3370
  justify-content: space-between;
3371
3371
  min-height: 56px;
3372
3372
  width: 356px;
3373
- border-radius: var(--wui-border-radius-02);
3373
+ border-radius: var(--wui-border-radius-01);
3374
3374
  background-color: var(--wui-color-bg-surface);
3375
3375
  border: 1px solid var(--wui-color-border);
3376
3376
  color: var(--wui-color-text);
@@ -3386,28 +3386,13 @@ var StyledToast = import_styled_components17.styled.div`
3386
3386
  flex: 0 0 16px;
3387
3387
  }
3388
3388
  `;
3389
- var Action = ({
3390
- actionButton,
3391
- toastId
3392
- }) => {
3389
+ var Action = ({ actionButton }) => {
3393
3390
  if ((0, import_type_guards11.isNotNil)(actionButton) && (0, import_react19.isValidElement)(actionButton)) {
3394
- const { onClick, ...restProps } = actionButton.props;
3395
- const handleClick = (event) => {
3396
- if (onClick) {
3397
- onClick(
3398
- event,
3399
- toastId ?? ""
3400
- );
3401
- }
3402
- };
3403
3391
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react19.cloneElement)(actionButton, {
3404
- ...restProps,
3405
3392
  variant: "soft",
3406
3393
  // force Button variant
3407
- size: "sm",
3394
+ size: "sm"
3408
3395
  // force Button size
3409
- onClick: handleClick
3410
- // decorate onClick function with new args
3411
3396
  }) });
3412
3397
  }
3413
3398
  return null;
@@ -3417,7 +3402,6 @@ var Toast = ({
3417
3402
  message,
3418
3403
  colorScheme = "inherit",
3419
3404
  icon,
3420
- toastId,
3421
3405
  ...props
3422
3406
  }) => {
3423
3407
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
@@ -3430,13 +3414,7 @@ var Toast = ({
3430
3414
  (0, import_type_guards11.isNotNil)(icon) ? icon : null,
3431
3415
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
3432
3416
  ] }),
3433
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3434
- Action,
3435
- {
3436
- actionButton: action,
3437
- toastId
3438
- }
3439
- )
3417
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
3440
3418
  ]
3441
3419
  }
3442
3420
  );
@@ -3449,15 +3427,14 @@ var useToast = () => {
3449
3427
  return (0, import_react20.useCallback)(
3450
3428
  ({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
3451
3429
  import_sonner2.toast.custom(
3452
- (toastId) => {
3430
+ () => {
3453
3431
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3454
3432
  Toast,
3455
3433
  {
3456
3434
  action,
3457
3435
  colorScheme,
3458
3436
  icon,
3459
- message,
3460
- toastId: String(toastId)
3437
+ message
3461
3438
  }
3462
3439
  );
3463
3440
  },
@@ -7927,6 +7904,7 @@ var StyledButton = import_styled_components22.styled.button`
7927
7904
  ${({ $variant }) => buttonVariantsStyles[$variant]}
7928
7905
  ${({ $unstyled }) => !$unstyled && buttonBaseStyles}
7929
7906
  ${({ $fullWidth }) => $fullWidth && "width: 100%;"}
7907
+ align-self: flex-start;
7930
7908
  text-align: center;
7931
7909
  `;
7932
7910
  var StyledButtonContent = import_styled_components22.styled.div`
@@ -8623,7 +8601,7 @@ var DEFAULT_ELEMENT = "div";
8623
8601
  var BoxComponent = (0, import_react27.forwardRef)(
8624
8602
  ({
8625
8603
  alignContent = "stretch",
8626
- alignItems = "flex-start",
8604
+ alignItems = "stretch",
8627
8605
  alignSelf,
8628
8606
  basis,
8629
8607
  children,
@@ -9142,6 +9120,10 @@ var ButtonGroupComponent = import_styled_components31.styled.div`
9142
9120
  justify-content: ${({ $align }) => getAlignment($align)};
9143
9121
  width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
9144
9122
 
9123
+ ${StyledButton} {
9124
+ align-self: unset;
9125
+ }
9126
+
9145
9127
  ${mq.smAndUp} {
9146
9128
  flex-direction: row;
9147
9129
  }