@wistia/ui 0.6.24 → 0.6.25

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
@@ -2552,6 +2552,100 @@ type StackProps = {
2552
2552
  */
2553
2553
  declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & UnknownRecord;
2554
2554
 
2555
+ type SwitchSizeType = 'lg' | 'md' | 'sm';
2556
+ type SwitchProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'size'> & {
2557
+ /**
2558
+ * Indicates the state of the switch
2559
+ */
2560
+ checked?: boolean;
2561
+ /**
2562
+ * Disables switch
2563
+ */
2564
+ disabled?: boolean;
2565
+ /**
2566
+ * Optional ID attribute
2567
+ */
2568
+ id?: string | undefined;
2569
+ /**
2570
+ * The label for the switch
2571
+ */
2572
+ label: JSX.Element | string;
2573
+ /**
2574
+ * The description for the switch
2575
+ */
2576
+ description?: JSX.Element | string | undefined;
2577
+ /**
2578
+ * The name of the switch. Submitted with its owning form as part of a name/value pair.
2579
+ */
2580
+ name?: string | undefined;
2581
+ /**
2582
+ * Callback function invoked when the value changes
2583
+ */
2584
+ onChange?: (event: ChangeEvent) => unknown;
2585
+ /**
2586
+ * Indicates if the input is required
2587
+ */
2588
+ required?: boolean;
2589
+ /**
2590
+ * A predefined size for the switch
2591
+ */
2592
+ size?: SwitchSizeType;
2593
+ /**
2594
+ * The value given as data when submitted with a `name`.
2595
+ */
2596
+ value?: string;
2597
+ /**
2598
+ * Whether to visually hide the label (it will still be available to screen readers)
2599
+ */
2600
+ hideLabel?: boolean;
2601
+ };
2602
+ declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "size" | "hideLabel"> & {
2603
+ /**
2604
+ * Indicates the state of the switch
2605
+ */
2606
+ checked?: boolean;
2607
+ /**
2608
+ * Disables switch
2609
+ */
2610
+ disabled?: boolean;
2611
+ /**
2612
+ * Optional ID attribute
2613
+ */
2614
+ id?: string | undefined;
2615
+ /**
2616
+ * The label for the switch
2617
+ */
2618
+ label: JSX.Element | string;
2619
+ /**
2620
+ * The description for the switch
2621
+ */
2622
+ description?: JSX.Element | string | undefined;
2623
+ /**
2624
+ * The name of the switch. Submitted with its owning form as part of a name/value pair.
2625
+ */
2626
+ name?: string | undefined;
2627
+ /**
2628
+ * Callback function invoked when the value changes
2629
+ */
2630
+ onChange?: (event: ChangeEvent) => unknown;
2631
+ /**
2632
+ * Indicates if the input is required
2633
+ */
2634
+ required?: boolean;
2635
+ /**
2636
+ * A predefined size for the switch
2637
+ */
2638
+ size?: SwitchSizeType;
2639
+ /**
2640
+ * The value given as data when submitted with a `name`.
2641
+ */
2642
+ value?: string;
2643
+ /**
2644
+ * Whether to visually hide the label (it will still be available to screen readers)
2645
+ */
2646
+ hideLabel?: boolean;
2647
+ } & react.RefAttributes<HTMLInputElement>>;
2648
+
2555
2649
  type TableBodyProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
2556
2650
  children?: ReactNode;
2557
2651
  };
@@ -2831,4 +2925,4 @@ declare const WistiaLogo: {
2831
2925
  displayName: string;
2832
2926
  };
2833
2927
 
2834
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2928
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -2552,6 +2552,100 @@ type StackProps = {
2552
2552
  */
2553
2553
  declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & UnknownRecord;
2554
2554
 
2555
+ type SwitchSizeType = 'lg' | 'md' | 'sm';
2556
+ type SwitchProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'size'> & {
2557
+ /**
2558
+ * Indicates the state of the switch
2559
+ */
2560
+ checked?: boolean;
2561
+ /**
2562
+ * Disables switch
2563
+ */
2564
+ disabled?: boolean;
2565
+ /**
2566
+ * Optional ID attribute
2567
+ */
2568
+ id?: string | undefined;
2569
+ /**
2570
+ * The label for the switch
2571
+ */
2572
+ label: JSX.Element | string;
2573
+ /**
2574
+ * The description for the switch
2575
+ */
2576
+ description?: JSX.Element | string | undefined;
2577
+ /**
2578
+ * The name of the switch. Submitted with its owning form as part of a name/value pair.
2579
+ */
2580
+ name?: string | undefined;
2581
+ /**
2582
+ * Callback function invoked when the value changes
2583
+ */
2584
+ onChange?: (event: ChangeEvent) => unknown;
2585
+ /**
2586
+ * Indicates if the input is required
2587
+ */
2588
+ required?: boolean;
2589
+ /**
2590
+ * A predefined size for the switch
2591
+ */
2592
+ size?: SwitchSizeType;
2593
+ /**
2594
+ * The value given as data when submitted with a `name`.
2595
+ */
2596
+ value?: string;
2597
+ /**
2598
+ * Whether to visually hide the label (it will still be available to screen readers)
2599
+ */
2600
+ hideLabel?: boolean;
2601
+ };
2602
+ declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "size" | "hideLabel"> & {
2603
+ /**
2604
+ * Indicates the state of the switch
2605
+ */
2606
+ checked?: boolean;
2607
+ /**
2608
+ * Disables switch
2609
+ */
2610
+ disabled?: boolean;
2611
+ /**
2612
+ * Optional ID attribute
2613
+ */
2614
+ id?: string | undefined;
2615
+ /**
2616
+ * The label for the switch
2617
+ */
2618
+ label: JSX.Element | string;
2619
+ /**
2620
+ * The description for the switch
2621
+ */
2622
+ description?: JSX.Element | string | undefined;
2623
+ /**
2624
+ * The name of the switch. Submitted with its owning form as part of a name/value pair.
2625
+ */
2626
+ name?: string | undefined;
2627
+ /**
2628
+ * Callback function invoked when the value changes
2629
+ */
2630
+ onChange?: (event: ChangeEvent) => unknown;
2631
+ /**
2632
+ * Indicates if the input is required
2633
+ */
2634
+ required?: boolean;
2635
+ /**
2636
+ * A predefined size for the switch
2637
+ */
2638
+ size?: SwitchSizeType;
2639
+ /**
2640
+ * The value given as data when submitted with a `name`.
2641
+ */
2642
+ value?: string;
2643
+ /**
2644
+ * Whether to visually hide the label (it will still be available to screen readers)
2645
+ */
2646
+ hideLabel?: boolean;
2647
+ } & react.RefAttributes<HTMLInputElement>>;
2648
+
2555
2649
  type TableBodyProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
2556
2650
  children?: ReactNode;
2557
2651
  };
@@ -2831,4 +2925,4 @@ declare const WistiaLogo: {
2831
2925
  displayName: string;
2832
2926
  };
2833
2927
 
2834
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2928
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };