@wistia/ui 0.6.2-beta.be728696.d49d6eb → 0.6.2

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.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
- import * as react_router from 'react-router';
5
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
6
5
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
7
6
  import * as styled_components from 'styled-components';
@@ -262,7 +261,7 @@ type BaseButtonProps = {
262
261
  */
263
262
  variant?: ButtonVariants;
264
263
  };
265
- type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & LinkProps & {
264
+ type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
266
265
  href: string | undefined;
267
266
  children: ReactNode;
268
267
  /**
@@ -288,63 +287,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
288
287
  * action, or performing a delete operation. It replaces the HTML `<button>` element,
289
288
  * unless an `href` attribute is passed, in which it will render an `<a>` element.
290
289
  */
291
- declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
292
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
293
- } & {
294
- beforeAction?: (() => Promise<void>) | (() => void);
295
- children: ReactNode;
296
- colorScheme?: ColorSchemeTypes;
297
- disabled?: boolean;
298
- leftIcon?: JSX.Element | undefined;
299
- rightIcon?: JSX.Element | undefined;
300
- type?: LinkTypes | undefined;
301
- underline?: boolean;
302
- } & Omit<react_router.LinkProps, "to"> & {
303
- href: string | undefined;
304
- type?: LinkTypes;
305
- } & {
306
- href: string | undefined;
307
- children: ReactNode;
308
- /**
309
- * This just allows pathrough to beforeAction for link
310
- * @ignore
311
- */
312
- beforeAction?: (() => Promise<void>) | (() => void);
313
- /**
314
- * This just allows pathrough to beforeAction for link
315
- * @ignore
316
- */
317
- type?: LinkTypes;
318
- }, "ref"> | Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
319
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
320
- } & {
321
- beforeAction?: (() => Promise<void>) | (() => void);
322
- children: ReactNode;
323
- colorScheme?: ColorSchemeTypes;
324
- disabled?: boolean;
325
- leftIcon?: JSX.Element | undefined;
326
- rightIcon?: JSX.Element | undefined;
327
- type?: LinkTypes | undefined;
328
- underline?: boolean;
329
- } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
330
- ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
331
- } & {
332
- href?: never;
333
- type?: "button" | "reset" | "submit";
334
- } & {
335
- href: string | undefined;
336
- children: ReactNode;
337
- /**
338
- * This just allows pathrough to beforeAction for link
339
- * @ignore
340
- */
341
- beforeAction?: (() => Promise<void>) | (() => void);
342
- /**
343
- * This just allows pathrough to beforeAction for link
344
- * @ignore
345
- */
346
- type?: LinkTypes;
347
- }, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
290
+ declare const Button: react.ForwardRefExoticComponent<(Omit<ButtonAsLinkProps, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
348
291
 
349
292
  type ToastProps = ComponentPropsWithoutRef<'div'> & {
350
293
  /**
@@ -1047,11 +990,6 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1047
990
  * The action to be performed when the form is submitted. It can be asynchronous.
1048
991
  */
1049
992
  action?: Action;
1050
- /**
1051
- * Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
1052
- * is set on the `FormField` itself.
1053
- */
1054
- labelPosition?: 'block' | 'inline';
1055
993
  /**
1056
994
  * The form elements used in the form
1057
995
  */
@@ -1077,7 +1015,7 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1077
1015
  * x
1078
1016
  */
1079
1017
  declare const FormComponent: {
1080
- <T>({ children, action, values, labelPosition, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1018
+ <T>({ children, action, values, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1081
1019
  displayName: string;
1082
1020
  };
1083
1021
  declare const Form: <T>(props: FormProps<T> & {
@@ -1114,16 +1052,12 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
1114
1052
  * A value that overrides the basic value. This should pair with `onChange`.
1115
1053
  */
1116
1054
  value?: string;
1117
- /**
1118
- * Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
1119
- */
1120
- labelPosition?: 'block' | 'inline';
1121
1055
  };
1122
1056
  /**
1123
1057
  * Component description goes here
1124
1058
  */
1125
1059
  declare const FormField: {
1126
- ({ children, label, name, error, value, labelPosition, id, ...props }: FormFieldProps): JSX.Element;
1060
+ ({ children, label, name, error, value, ...props }: FormFieldProps): JSX.Element;
1127
1061
  displayName: string;
1128
1062
  };
1129
1063
 
@@ -1699,57 +1633,6 @@ type MenuItemButtonProps = ButtonProps & {
1699
1633
 
1700
1634
  declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1701
1635
  ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1702
- } & {
1703
- beforeAction?: (() => Promise<void>) | (() => void);
1704
- children: react.ReactNode;
1705
- colorScheme?: ColorSchemeTypes;
1706
- disabled?: boolean;
1707
- leftIcon?: react.JSX.Element | undefined;
1708
- rightIcon?: react.JSX.Element | undefined;
1709
- type?: LinkTypes | undefined;
1710
- underline?: boolean;
1711
- } & Omit<react_router.LinkProps, "to"> & {
1712
- href: string | undefined;
1713
- type?: LinkTypes;
1714
- } & {
1715
- href: string | undefined;
1716
- children: react.ReactNode;
1717
- beforeAction?: (() => Promise<void>) | (() => void);
1718
- type?: LinkTypes;
1719
- } & {
1720
- appearance?: "dangerous" | "default" | "gated";
1721
- badge?: react.JSX.Element;
1722
- children?: react.ReactNode;
1723
- command?: react.ReactNode;
1724
- icon?: ButtonProps["leftIcon"];
1725
- leftIcon?: ButtonProps["leftIcon"];
1726
- rightIcon?: ButtonProps["rightIcon"];
1727
- fullWidth?: never;
1728
- asChild?: never;
1729
- variant?: never;
1730
- size?: never;
1731
- unstyled?: never;
1732
- } & {
1733
- /**
1734
- * Treats the menu item as a link when provided
1735
- */
1736
- href?: MenuItemButtonProps["href"];
1737
- }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1738
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1739
- } & {
1740
- beforeAction?: (() => Promise<void>) | (() => void);
1741
- children: react.ReactNode;
1742
- colorScheme?: ColorSchemeTypes;
1743
- disabled?: boolean;
1744
- leftIcon?: react.JSX.Element | undefined;
1745
- rightIcon?: react.JSX.Element | undefined;
1746
- type?: LinkTypes | undefined;
1747
- underline?: boolean;
1748
- } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1749
- ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
1750
- } & {
1751
- href?: never;
1752
- type?: "button" | "reset" | "submit";
1753
1636
  } & {
1754
1637
  href: string | undefined;
1755
1638
  children: react.ReactNode;
@@ -2542,7 +2425,7 @@ type SelectOptionProps = {
2542
2425
  */
2543
2426
  children: ReactNode;
2544
2427
  /**
2545
- * The value to set. Leave this empty to define a placeholder option.
2428
+ * The value to set
2546
2429
  */
2547
2430
  value: string;
2548
2431
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
- import * as react_router from 'react-router';
5
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
6
5
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
7
6
  import * as styled_components from 'styled-components';
@@ -262,7 +261,7 @@ type BaseButtonProps = {
262
261
  */
263
262
  variant?: ButtonVariants;
264
263
  };
265
- type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & LinkProps & {
264
+ type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
266
265
  href: string | undefined;
267
266
  children: ReactNode;
268
267
  /**
@@ -288,63 +287,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
288
287
  * action, or performing a delete operation. It replaces the HTML `<button>` element,
289
288
  * unless an `href` attribute is passed, in which it will render an `<a>` element.
290
289
  */
291
- declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
292
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
293
- } & {
294
- beforeAction?: (() => Promise<void>) | (() => void);
295
- children: ReactNode;
296
- colorScheme?: ColorSchemeTypes;
297
- disabled?: boolean;
298
- leftIcon?: JSX.Element | undefined;
299
- rightIcon?: JSX.Element | undefined;
300
- type?: LinkTypes | undefined;
301
- underline?: boolean;
302
- } & Omit<react_router.LinkProps, "to"> & {
303
- href: string | undefined;
304
- type?: LinkTypes;
305
- } & {
306
- href: string | undefined;
307
- children: ReactNode;
308
- /**
309
- * This just allows pathrough to beforeAction for link
310
- * @ignore
311
- */
312
- beforeAction?: (() => Promise<void>) | (() => void);
313
- /**
314
- * This just allows pathrough to beforeAction for link
315
- * @ignore
316
- */
317
- type?: LinkTypes;
318
- }, "ref"> | Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
319
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
320
- } & {
321
- beforeAction?: (() => Promise<void>) | (() => void);
322
- children: ReactNode;
323
- colorScheme?: ColorSchemeTypes;
324
- disabled?: boolean;
325
- leftIcon?: JSX.Element | undefined;
326
- rightIcon?: JSX.Element | undefined;
327
- type?: LinkTypes | undefined;
328
- underline?: boolean;
329
- } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
330
- ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
331
- } & {
332
- href?: never;
333
- type?: "button" | "reset" | "submit";
334
- } & {
335
- href: string | undefined;
336
- children: ReactNode;
337
- /**
338
- * This just allows pathrough to beforeAction for link
339
- * @ignore
340
- */
341
- beforeAction?: (() => Promise<void>) | (() => void);
342
- /**
343
- * This just allows pathrough to beforeAction for link
344
- * @ignore
345
- */
346
- type?: LinkTypes;
347
- }, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
290
+ declare const Button: react.ForwardRefExoticComponent<(Omit<ButtonAsLinkProps, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
348
291
 
349
292
  type ToastProps = ComponentPropsWithoutRef<'div'> & {
350
293
  /**
@@ -1047,11 +990,6 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1047
990
  * The action to be performed when the form is submitted. It can be asynchronous.
1048
991
  */
1049
992
  action?: Action;
1050
- /**
1051
- * Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
1052
- * is set on the `FormField` itself.
1053
- */
1054
- labelPosition?: 'block' | 'inline';
1055
993
  /**
1056
994
  * The form elements used in the form
1057
995
  */
@@ -1077,7 +1015,7 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1077
1015
  * x
1078
1016
  */
1079
1017
  declare const FormComponent: {
1080
- <T>({ children, action, values, labelPosition, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1018
+ <T>({ children, action, values, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1081
1019
  displayName: string;
1082
1020
  };
1083
1021
  declare const Form: <T>(props: FormProps<T> & {
@@ -1114,16 +1052,12 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
1114
1052
  * A value that overrides the basic value. This should pair with `onChange`.
1115
1053
  */
1116
1054
  value?: string;
1117
- /**
1118
- * Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
1119
- */
1120
- labelPosition?: 'block' | 'inline';
1121
1055
  };
1122
1056
  /**
1123
1057
  * Component description goes here
1124
1058
  */
1125
1059
  declare const FormField: {
1126
- ({ children, label, name, error, value, labelPosition, id, ...props }: FormFieldProps): JSX.Element;
1060
+ ({ children, label, name, error, value, ...props }: FormFieldProps): JSX.Element;
1127
1061
  displayName: string;
1128
1062
  };
1129
1063
 
@@ -1699,57 +1633,6 @@ type MenuItemButtonProps = ButtonProps & {
1699
1633
 
1700
1634
  declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1701
1635
  ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1702
- } & {
1703
- beforeAction?: (() => Promise<void>) | (() => void);
1704
- children: react.ReactNode;
1705
- colorScheme?: ColorSchemeTypes;
1706
- disabled?: boolean;
1707
- leftIcon?: react.JSX.Element | undefined;
1708
- rightIcon?: react.JSX.Element | undefined;
1709
- type?: LinkTypes | undefined;
1710
- underline?: boolean;
1711
- } & Omit<react_router.LinkProps, "to"> & {
1712
- href: string | undefined;
1713
- type?: LinkTypes;
1714
- } & {
1715
- href: string | undefined;
1716
- children: react.ReactNode;
1717
- beforeAction?: (() => Promise<void>) | (() => void);
1718
- type?: LinkTypes;
1719
- } & {
1720
- appearance?: "dangerous" | "default" | "gated";
1721
- badge?: react.JSX.Element;
1722
- children?: react.ReactNode;
1723
- command?: react.ReactNode;
1724
- icon?: ButtonProps["leftIcon"];
1725
- leftIcon?: ButtonProps["leftIcon"];
1726
- rightIcon?: ButtonProps["rightIcon"];
1727
- fullWidth?: never;
1728
- asChild?: never;
1729
- variant?: never;
1730
- size?: never;
1731
- unstyled?: never;
1732
- } & {
1733
- /**
1734
- * Treats the menu item as a link when provided
1735
- */
1736
- href?: MenuItemButtonProps["href"];
1737
- }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1738
- ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1739
- } & {
1740
- beforeAction?: (() => Promise<void>) | (() => void);
1741
- children: react.ReactNode;
1742
- colorScheme?: ColorSchemeTypes;
1743
- disabled?: boolean;
1744
- leftIcon?: react.JSX.Element | undefined;
1745
- rightIcon?: react.JSX.Element | undefined;
1746
- type?: LinkTypes | undefined;
1747
- underline?: boolean;
1748
- } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1749
- ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
1750
- } & {
1751
- href?: never;
1752
- type?: "button" | "reset" | "submit";
1753
1636
  } & {
1754
1637
  href: string | undefined;
1755
1638
  children: react.ReactNode;
@@ -2542,7 +2425,7 @@ type SelectOptionProps = {
2542
2425
  */
2543
2426
  children: ReactNode;
2544
2427
  /**
2545
- * The value to set. Leave this empty to define a placeholder option.
2428
+ * The value to set
2546
2429
  */
2547
2430
  value: string;
2548
2431
  /**
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.6.2-beta.be728696.d49d6eb
3
+ * @license @wistia/ui v0.6.2
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8044,18 +8044,9 @@ var FormContext = createContext2({
8044
8044
  values: {},
8045
8045
  errors: {},
8046
8046
  hasSubmitted: false,
8047
- formId: "",
8048
- labelPosition: "block"
8047
+ formId: ""
8049
8048
  });
8050
- var FormComponent = ({
8051
- children,
8052
- action,
8053
- values = {},
8054
- labelPosition = "block",
8055
- validate,
8056
- fullWidth = false,
8057
- ...props
8058
- }, forwardedRef) => {
8049
+ var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
8059
8050
  const [errors, setErrors] = useState6({});
8060
8051
  const [hasSubmitted, setHasSubmitted] = useState6(false);
8061
8052
  const innerRef = useRef5();
@@ -8107,20 +8098,19 @@ var FormComponent = ({
8107
8098
  values,
8108
8099
  errors,
8109
8100
  hasSubmitted,
8110
- formId: id,
8111
- labelPosition
8101
+ formId: id
8112
8102
  };
8113
- }, [labelPosition, values, errors, id, hasSubmitted]);
8103
+ }, [values, errors, id, hasSubmitted]);
8114
8104
  return (
8115
8105
  // @ts-expect-error - generic context providers are a giant pain
8116
8106
  /* @__PURE__ */ jsx189(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx189(
8117
8107
  Stack,
8118
8108
  {
8109
+ gap: "space-05",
8119
8110
  ...props,
8120
8111
  ref,
8121
8112
  $fullWidth: fullWidth,
8122
8113
  as: StyledForm,
8123
- gap: "space-05",
8124
8114
  id,
8125
8115
  onBlur: handleBlur,
8126
8116
  onReset: handleReset,
@@ -8174,7 +8164,7 @@ import { useContext as useContext2, useRef as useRef6 } from "react";
8174
8164
  import { isArray, isNotUndefined as isNotUndefined6 } from "@wistia/type-guards";
8175
8165
  import { jsx as jsx190, jsxs as jsxs18 } from "react/jsx-runtime";
8176
8166
  var ErrorItem = ({ name, error, formId }) => {
8177
- return /* @__PURE__ */ jsx190("li", { children: /* @__PURE__ */ jsx190(Link, { href: `#${formId}-${name}`, children: error }) }, name);
8167
+ return /* @__PURE__ */ jsx190("li", { children: /* @__PURE__ */ jsx190(Link, { href: `${formId}-${name}`, children: error }) }, name);
8178
8168
  };
8179
8169
  var FormErrorSummary = ({ description }) => {
8180
8170
  const ref = useRef6(null);
@@ -8270,30 +8260,14 @@ var CheckboxGroup = ({
8270
8260
  CheckboxGroup.displayName = "CheckboxGroup";
8271
8261
 
8272
8262
  // src/components/FormField/FormField.tsx
8273
- import { Fragment as Fragment6, jsx as jsx193, jsxs as jsxs20 } from "react/jsx-runtime";
8263
+ import { jsx as jsx193, jsxs as jsxs20 } from "react/jsx-runtime";
8274
8264
  var StyledFormField = styled33.div`
8275
8265
  --form-field-spacing: var(--wui-space-01);
8276
- --form-field-spacing-inline: var(--wui-space-02);
8277
8266
  --form-field-error-color: var(--wui-color-text-secondary-error);
8278
8267
 
8279
- display: grid;
8268
+ display: flex;
8269
+ flex-direction: column;
8280
8270
  gap: var(--form-field-spacing);
8281
- justify-content: flex-start;
8282
- align-items: center;
8283
- grid-template-columns: auto 1fr;
8284
- grid-template-rows: auto 1fr;
8285
-
8286
- &[data-label-position='inline'] {
8287
- gap: var(--form-field-spacing-inline);
8288
- grid-template-columns: minmax(auto, 1fr) 1fr;
8289
- grid-template-rows: 1fr auto;
8290
- }
8291
-
8292
- &[data-label-position='block'] {
8293
- gap: var(--form-field-spacing);
8294
- grid-template-columns: 1fr;
8295
- grid-template-rows: 1fr;
8296
- }
8297
8271
  `;
8298
8272
  var StyledErrorList = styled33.ul`
8299
8273
  margin: 0;
@@ -8333,20 +8307,18 @@ var FormField = ({
8333
8307
  name,
8334
8308
  error,
8335
8309
  value,
8336
- labelPosition,
8337
- id,
8338
8310
  ...props
8339
8311
  }) => {
8340
8312
  const formState = useContext3(FormContext);
8341
8313
  const checkboxGroup = useContext3(CheckboxGroupContext);
8342
- const isIntegratedLabel = children.type === Checkbox;
8343
- const computedId = id ?? `${formState.formId}-${name}`;
8314
+ const id = props.id ?? `${formState.formId}-${name}`;
8315
+ const isInlineLabel = children.type === Checkbox;
8344
8316
  const computedError = error ?? formState.errors[name];
8345
8317
  const defaultValue = formState.values[name];
8346
8318
  let childProps = {
8347
8319
  name,
8348
- id: computedId,
8349
- label: isIntegratedLabel ? label : void 0,
8320
+ id,
8321
+ label: isInlineLabel ? label : void 0,
8350
8322
  ...props
8351
8323
  };
8352
8324
  if (isUndefined4(value) && isNotUndefined7(defaultValue)) {
@@ -8370,31 +8342,21 @@ var FormField = ({
8370
8342
  name: computedName,
8371
8343
  onChange: handleChange,
8372
8344
  "aria-invalid": isNotNil11(error),
8373
- "aria-describedby": isNotNil11(error) ? `${computedId}-error` : void 0
8345
+ "aria-describedby": isNotNil11(error) ? `${id}-error` : void 0
8374
8346
  };
8375
8347
  }
8376
8348
  Children4.only(children);
8377
- return /* @__PURE__ */ jsxs20(
8378
- StyledFormField,
8379
- {
8380
- ...props,
8381
- "data-label-position": labelPosition ?? formState.labelPosition,
8382
- children: [
8383
- !isIntegratedLabel && /* @__PURE__ */ jsx193(Label, { htmlFor: computedId, children: label }),
8384
- cloneElement4(children, childProps),
8385
- isNotNil11(computedError) ? /* @__PURE__ */ jsxs20(Fragment6, { children: [
8386
- /* @__PURE__ */ jsx193("div", {}),
8387
- /* @__PURE__ */ jsx193(
8388
- ErrorMessages,
8389
- {
8390
- errors: computedError,
8391
- id: `${computedId}-error`
8392
- }
8393
- )
8394
- ] }) : null
8395
- ]
8396
- }
8397
- );
8349
+ return /* @__PURE__ */ jsxs20(StyledFormField, { ...props, children: [
8350
+ !isInlineLabel && /* @__PURE__ */ jsx193(Label, { htmlFor: id, children: label }),
8351
+ cloneElement4(children, childProps),
8352
+ isNotNil11(computedError) ? /* @__PURE__ */ jsx193(
8353
+ ErrorMessages,
8354
+ {
8355
+ errors: computedError,
8356
+ id: `${id}-error`
8357
+ }
8358
+ ) : null
8359
+ ] });
8398
8360
  };
8399
8361
  FormField.displayName = "FormField";
8400
8362
 
@@ -9892,7 +9854,7 @@ var TabItem = forwardRef21(
9892
9854
  TabItem.displayName = "TabItem";
9893
9855
 
9894
9856
  // src/components/Tabs/extractTabItems.ts
9895
- import { Children as Children6, Fragment as Fragment7, isValidElement as isValidElement2 } from "react";
9857
+ import { Children as Children6, Fragment as Fragment6, isValidElement as isValidElement2 } from "react";
9896
9858
  var extractTabItems = (children) => {
9897
9859
  const tabItems = [];
9898
9860
  Children6.forEach(children, (child) => {
@@ -9901,7 +9863,7 @@ var extractTabItems = (children) => {
9901
9863
  }
9902
9864
  if (typeof child.type !== "string" && child.type.displayName === "Tab") {
9903
9865
  tabItems.push(child);
9904
- } else if (child.type === Fragment7) {
9866
+ } else if (child.type === Fragment6) {
9905
9867
  const fragmentElement = child;
9906
9868
  tabItems.push(...extractTabItems(fragmentElement.props.children));
9907
9869
  } else if ((child.props.children ?? null) != null) {
@@ -10062,7 +10024,7 @@ Tab.displayName = "Tab";
10062
10024
  import { forwardRef as forwardRef24 } from "react";
10063
10025
  import styled54 from "styled-components";
10064
10026
  import { isNil as isNil15, isNotNil as isNotNil22, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
10065
- import { Fragment as Fragment8, jsx as jsx220, jsxs as jsxs34 } from "react/jsx-runtime";
10027
+ import { Fragment as Fragment7, jsx as jsx220, jsxs as jsxs34 } from "react/jsx-runtime";
10066
10028
  var TagLabel = styled54.a`
10067
10029
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
10068
10030
  font-size: var(--wui-typography-label-4-size);
@@ -10147,7 +10109,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
10147
10109
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
10148
10110
  );
10149
10111
  }
10150
- return /* @__PURE__ */ jsxs34(Fragment8, { children: [
10112
+ return /* @__PURE__ */ jsxs34(Fragment7, { children: [
10151
10113
  /* @__PURE__ */ jsx220(TagDivider, { $colorScheme: colorScheme }),
10152
10114
  /* @__PURE__ */ jsxs34(
10153
10115
  StyledRemoveButton,
@@ -10378,7 +10340,6 @@ var StyledContent3 = styled56(Content4)`
10378
10340
  border-radius: var(--wui-select-content-border-radius);
10379
10341
  padding: var(--wui-select-option-padding);
10380
10342
  min-width: 200px;
10381
- z-index: var(--wui-zindex-menu);
10382
10343
  `;
10383
10344
  var Select = forwardRef25(
10384
10345
  ({