@wistia/ui 0.1.0 → 0.1.1

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,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, InputHTMLAttributes } from 'react';
3
+ import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, RefObject, InputHTMLAttributes } from 'react';
4
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
5
  import * as styled_components from 'styled-components';
6
6
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -1508,6 +1508,91 @@ declare const CheckboxMenuItem: {
1508
1508
  displayName: string;
1509
1509
  };
1510
1510
 
1511
+ type ModalProps = ComponentPropsWithoutRef<'div'> & {
1512
+ /**
1513
+ * The content of the modal.
1514
+ */
1515
+ children: ReactNode;
1516
+ /**
1517
+ * Whether or not the modal should take up the full height of the viewport
1518
+ */
1519
+ fullHeight?: boolean;
1520
+ /**
1521
+ * Ref to the element that should receive focus when the modal opens
1522
+ */
1523
+ initialFocusRef?: RefObject<HTMLElement>;
1524
+ /**
1525
+ * Determines if the modal is currently open
1526
+ */
1527
+ isOpen: boolean;
1528
+ /**
1529
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
1530
+ */
1531
+ hideCloseButton?: boolean;
1532
+ /**
1533
+ * Determines if the title is visible
1534
+ */
1535
+ hideTitle?: boolean;
1536
+ /**
1537
+ * When the Modal is dismissed, this function will be called. You'll typically want to set the
1538
+ * state of `isOpen` to false here
1539
+ */
1540
+ onRequestClose?: () => void;
1541
+ /**
1542
+ * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
1543
+ * and the title will be hidden but still accessible to screen readers.
1544
+ */
1545
+ title: string;
1546
+ /**
1547
+ * The base width to apply to the Modal
1548
+ */
1549
+ width?: string;
1550
+ };
1551
+ /**
1552
+ * A Modal is a focused UI element that appears atop the main interface, requiring
1553
+ * user interaction or dismissal before returning to the underlying content.
1554
+ */
1555
+ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1556
+ /**
1557
+ * The content of the modal.
1558
+ */
1559
+ children: ReactNode;
1560
+ /**
1561
+ * Whether or not the modal should take up the full height of the viewport
1562
+ */
1563
+ fullHeight?: boolean;
1564
+ /**
1565
+ * Ref to the element that should receive focus when the modal opens
1566
+ */
1567
+ initialFocusRef?: RefObject<HTMLElement>;
1568
+ /**
1569
+ * Determines if the modal is currently open
1570
+ */
1571
+ isOpen: boolean;
1572
+ /**
1573
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
1574
+ */
1575
+ hideCloseButton?: boolean;
1576
+ /**
1577
+ * Determines if the title is visible
1578
+ */
1579
+ hideTitle?: boolean;
1580
+ /**
1581
+ * When the Modal is dismissed, this function will be called. You'll typically want to set the
1582
+ * state of `isOpen` to false here
1583
+ */
1584
+ onRequestClose?: () => void;
1585
+ /**
1586
+ * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
1587
+ * and the title will be hidden but still accessible to screen readers.
1588
+ */
1589
+ title: string;
1590
+ /**
1591
+ * The base width to apply to the Modal
1592
+ */
1593
+ width?: string;
1594
+ } & react.RefAttributes<HTMLDivElement>>;
1595
+
1511
1596
  type RadioProps = ComponentPropsWithoutRef<'input'> & {
1512
1597
  /**
1513
1598
  * Indicates the state of the radio
@@ -1834,4 +1919,4 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
1834
1919
  type?: "email" | "multiline" | "number" | "phone" | "search" | "text" | "url";
1835
1920
  } & react.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
1836
1921
 
1837
- export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useFormState, useMq, useToast, useWindowSize };
1922
+ export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useFormState, useMq, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, InputHTMLAttributes } from 'react';
3
+ import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, RefObject, InputHTMLAttributes } from 'react';
4
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
5
  import * as styled_components from 'styled-components';
6
6
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -1508,6 +1508,91 @@ declare const CheckboxMenuItem: {
1508
1508
  displayName: string;
1509
1509
  };
1510
1510
 
1511
+ type ModalProps = ComponentPropsWithoutRef<'div'> & {
1512
+ /**
1513
+ * The content of the modal.
1514
+ */
1515
+ children: ReactNode;
1516
+ /**
1517
+ * Whether or not the modal should take up the full height of the viewport
1518
+ */
1519
+ fullHeight?: boolean;
1520
+ /**
1521
+ * Ref to the element that should receive focus when the modal opens
1522
+ */
1523
+ initialFocusRef?: RefObject<HTMLElement>;
1524
+ /**
1525
+ * Determines if the modal is currently open
1526
+ */
1527
+ isOpen: boolean;
1528
+ /**
1529
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
1530
+ */
1531
+ hideCloseButton?: boolean;
1532
+ /**
1533
+ * Determines if the title is visible
1534
+ */
1535
+ hideTitle?: boolean;
1536
+ /**
1537
+ * When the Modal is dismissed, this function will be called. You'll typically want to set the
1538
+ * state of `isOpen` to false here
1539
+ */
1540
+ onRequestClose?: () => void;
1541
+ /**
1542
+ * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
1543
+ * and the title will be hidden but still accessible to screen readers.
1544
+ */
1545
+ title: string;
1546
+ /**
1547
+ * The base width to apply to the Modal
1548
+ */
1549
+ width?: string;
1550
+ };
1551
+ /**
1552
+ * A Modal is a focused UI element that appears atop the main interface, requiring
1553
+ * user interaction or dismissal before returning to the underlying content.
1554
+ */
1555
+ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1556
+ /**
1557
+ * The content of the modal.
1558
+ */
1559
+ children: ReactNode;
1560
+ /**
1561
+ * Whether or not the modal should take up the full height of the viewport
1562
+ */
1563
+ fullHeight?: boolean;
1564
+ /**
1565
+ * Ref to the element that should receive focus when the modal opens
1566
+ */
1567
+ initialFocusRef?: RefObject<HTMLElement>;
1568
+ /**
1569
+ * Determines if the modal is currently open
1570
+ */
1571
+ isOpen: boolean;
1572
+ /**
1573
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
1574
+ */
1575
+ hideCloseButton?: boolean;
1576
+ /**
1577
+ * Determines if the title is visible
1578
+ */
1579
+ hideTitle?: boolean;
1580
+ /**
1581
+ * When the Modal is dismissed, this function will be called. You'll typically want to set the
1582
+ * state of `isOpen` to false here
1583
+ */
1584
+ onRequestClose?: () => void;
1585
+ /**
1586
+ * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
1587
+ * and the title will be hidden but still accessible to screen readers.
1588
+ */
1589
+ title: string;
1590
+ /**
1591
+ * The base width to apply to the Modal
1592
+ */
1593
+ width?: string;
1594
+ } & react.RefAttributes<HTMLDivElement>>;
1595
+
1511
1596
  type RadioProps = ComponentPropsWithoutRef<'input'> & {
1512
1597
  /**
1513
1598
  * Indicates the state of the radio
@@ -1834,4 +1919,4 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
1834
1919
  type?: "email" | "multiline" | "number" | "phone" | "search" | "text" | "url";
1835
1920
  } & react.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
1836
1921
 
1837
- export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useFormState, useMq, useToast, useWindowSize };
1922
+ export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useFormState, useMq, useToast, useWindowSize };