@wistia/ui 0.4.4 → 0.4.5-beta.29a2dc1f.0bf9afa
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 +499 -431
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +50 -36
- package/dist/index.d.ts +50 -36
- package/dist/index.mjs +383 -316
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -56,6 +56,25 @@ declare const useMq: () => MediaQueryBooleans;
|
|
|
56
56
|
type MediaQueryLabels = keyof MediaQueryBooleans;
|
|
57
57
|
declare const useActiveMq: () => MediaQueryLabels[];
|
|
58
58
|
|
|
59
|
+
type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
60
|
+
type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
61
|
+
declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
|
|
62
|
+
|
|
63
|
+
type KeyFilterPredicate = (evt: KeyboardEvent) => boolean;
|
|
64
|
+
type KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;
|
|
65
|
+
type EventHandler = (event: KeyboardEvent) => unknown;
|
|
66
|
+
type UseKeyOptions = {
|
|
67
|
+
eventName?: string;
|
|
68
|
+
eventTarget?: Parameters<typeof useEvent>[2];
|
|
69
|
+
eventOptions?: Parameters<typeof useEvent>[3];
|
|
70
|
+
};
|
|
71
|
+
declare const useKey: (key: KeyFilter, eventHandler: EventHandler, options?: UseKeyOptions, dependencies?: unknown[]) => void;
|
|
72
|
+
|
|
73
|
+
type AriaLiveContextType = {
|
|
74
|
+
announce: (message: string, politeness?: 'assertive' | 'polite') => void;
|
|
75
|
+
};
|
|
76
|
+
declare const useAriaLive: () => AriaLiveContextType;
|
|
77
|
+
|
|
59
78
|
declare const colorSchemeOptions: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
|
|
60
79
|
type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
|
|
61
80
|
type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
@@ -259,11 +278,6 @@ declare const useWindowSize: (interval?: number) => {
|
|
|
259
278
|
height: number;
|
|
260
279
|
};
|
|
261
280
|
|
|
262
|
-
type AriaLiveContextType = {
|
|
263
|
-
announce: (message: string, politeness?: 'assertive' | 'polite') => void;
|
|
264
|
-
};
|
|
265
|
-
declare const useAriaLive: () => AriaLiveContextType;
|
|
266
|
-
|
|
267
281
|
type ActionButtonProps = {
|
|
268
282
|
/**
|
|
269
283
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -505,6 +519,36 @@ declare const Box: {
|
|
|
505
519
|
displayName: string;
|
|
506
520
|
};
|
|
507
521
|
|
|
522
|
+
type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
|
|
523
|
+
/**
|
|
524
|
+
* Should be at least one `Breadcrumb` component
|
|
525
|
+
*/
|
|
526
|
+
children: ReactNode;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Used to display a screens's location within a hierarchical structure
|
|
530
|
+
*/
|
|
531
|
+
declare const Breadcrumbs: {
|
|
532
|
+
({ children, ...props }: BreadcrumbsProps): JSX.Element;
|
|
533
|
+
displayName: string;
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
type BreadcrumbProps = {
|
|
537
|
+
/**
|
|
538
|
+
* An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
|
|
539
|
+
* */
|
|
540
|
+
icon?: ButtonAsLinkProps['leftIcon'];
|
|
541
|
+
/**
|
|
542
|
+
* The text of the breadcrumb link
|
|
543
|
+
*/
|
|
544
|
+
children: ReactNode;
|
|
545
|
+
/**
|
|
546
|
+
* The link to the page of the breadcrumb
|
|
547
|
+
*/
|
|
548
|
+
href: string;
|
|
549
|
+
};
|
|
550
|
+
declare const Breadcrumb: ({ icon, href, children }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
551
|
+
|
|
508
552
|
type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
509
553
|
/**
|
|
510
554
|
* Align buttons to the left or right of their container
|
|
@@ -2118,34 +2162,4 @@ declare const WistiaLogo: {
|
|
|
2118
2162
|
displayName: string;
|
|
2119
2163
|
};
|
|
2120
2164
|
|
|
2121
|
-
type BreadcrumbsProps
|
|
2122
|
-
/**
|
|
2123
|
-
* Should be at least one `Breadcrumb` component
|
|
2124
|
-
*/
|
|
2125
|
-
children: ReactNode;
|
|
2126
|
-
};
|
|
2127
|
-
/**
|
|
2128
|
-
* Used to display a screens's location within a hierarchical structure
|
|
2129
|
-
*/
|
|
2130
|
-
declare const Breadcrumbs: {
|
|
2131
|
-
({ children, ...props }: BreadcrumbsProps): JSX.Element;
|
|
2132
|
-
displayName: string;
|
|
2133
|
-
};
|
|
2134
|
-
|
|
2135
|
-
type BreadcrumbProps = {
|
|
2136
|
-
/**
|
|
2137
|
-
* An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
|
|
2138
|
-
* */
|
|
2139
|
-
icon?: ButtonAsLinkProps['leftIcon'];
|
|
2140
|
-
/**
|
|
2141
|
-
* The text of the breadcrumb link
|
|
2142
|
-
*/
|
|
2143
|
-
children: ReactNode;
|
|
2144
|
-
/**
|
|
2145
|
-
* The link to the page of the breadcrumb
|
|
2146
|
-
*/
|
|
2147
|
-
href: string;
|
|
2148
|
-
};
|
|
2149
|
-
declare const Breadcrumb: ({ icon, href, children }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
2150
|
-
|
|
2151
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, 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, useBoolean, useFormState, useMq, useToast, useWindowSize };
|
|
2165
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, 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, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,25 @@ declare const useMq: () => MediaQueryBooleans;
|
|
|
56
56
|
type MediaQueryLabels = keyof MediaQueryBooleans;
|
|
57
57
|
declare const useActiveMq: () => MediaQueryLabels[];
|
|
58
58
|
|
|
59
|
+
type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
60
|
+
type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
61
|
+
declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
|
|
62
|
+
|
|
63
|
+
type KeyFilterPredicate = (evt: KeyboardEvent) => boolean;
|
|
64
|
+
type KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;
|
|
65
|
+
type EventHandler = (event: KeyboardEvent) => unknown;
|
|
66
|
+
type UseKeyOptions = {
|
|
67
|
+
eventName?: string;
|
|
68
|
+
eventTarget?: Parameters<typeof useEvent>[2];
|
|
69
|
+
eventOptions?: Parameters<typeof useEvent>[3];
|
|
70
|
+
};
|
|
71
|
+
declare const useKey: (key: KeyFilter, eventHandler: EventHandler, options?: UseKeyOptions, dependencies?: unknown[]) => void;
|
|
72
|
+
|
|
73
|
+
type AriaLiveContextType = {
|
|
74
|
+
announce: (message: string, politeness?: 'assertive' | 'polite') => void;
|
|
75
|
+
};
|
|
76
|
+
declare const useAriaLive: () => AriaLiveContextType;
|
|
77
|
+
|
|
59
78
|
declare const colorSchemeOptions: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
|
|
60
79
|
type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
|
|
61
80
|
type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
@@ -259,11 +278,6 @@ declare const useWindowSize: (interval?: number) => {
|
|
|
259
278
|
height: number;
|
|
260
279
|
};
|
|
261
280
|
|
|
262
|
-
type AriaLiveContextType = {
|
|
263
|
-
announce: (message: string, politeness?: 'assertive' | 'polite') => void;
|
|
264
|
-
};
|
|
265
|
-
declare const useAriaLive: () => AriaLiveContextType;
|
|
266
|
-
|
|
267
281
|
type ActionButtonProps = {
|
|
268
282
|
/**
|
|
269
283
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -505,6 +519,36 @@ declare const Box: {
|
|
|
505
519
|
displayName: string;
|
|
506
520
|
};
|
|
507
521
|
|
|
522
|
+
type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
|
|
523
|
+
/**
|
|
524
|
+
* Should be at least one `Breadcrumb` component
|
|
525
|
+
*/
|
|
526
|
+
children: ReactNode;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Used to display a screens's location within a hierarchical structure
|
|
530
|
+
*/
|
|
531
|
+
declare const Breadcrumbs: {
|
|
532
|
+
({ children, ...props }: BreadcrumbsProps): JSX.Element;
|
|
533
|
+
displayName: string;
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
type BreadcrumbProps = {
|
|
537
|
+
/**
|
|
538
|
+
* An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
|
|
539
|
+
* */
|
|
540
|
+
icon?: ButtonAsLinkProps['leftIcon'];
|
|
541
|
+
/**
|
|
542
|
+
* The text of the breadcrumb link
|
|
543
|
+
*/
|
|
544
|
+
children: ReactNode;
|
|
545
|
+
/**
|
|
546
|
+
* The link to the page of the breadcrumb
|
|
547
|
+
*/
|
|
548
|
+
href: string;
|
|
549
|
+
};
|
|
550
|
+
declare const Breadcrumb: ({ icon, href, children }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
551
|
+
|
|
508
552
|
type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
509
553
|
/**
|
|
510
554
|
* Align buttons to the left or right of their container
|
|
@@ -2118,34 +2162,4 @@ declare const WistiaLogo: {
|
|
|
2118
2162
|
displayName: string;
|
|
2119
2163
|
};
|
|
2120
2164
|
|
|
2121
|
-
type BreadcrumbsProps
|
|
2122
|
-
/**
|
|
2123
|
-
* Should be at least one `Breadcrumb` component
|
|
2124
|
-
*/
|
|
2125
|
-
children: ReactNode;
|
|
2126
|
-
};
|
|
2127
|
-
/**
|
|
2128
|
-
* Used to display a screens's location within a hierarchical structure
|
|
2129
|
-
*/
|
|
2130
|
-
declare const Breadcrumbs: {
|
|
2131
|
-
({ children, ...props }: BreadcrumbsProps): JSX.Element;
|
|
2132
|
-
displayName: string;
|
|
2133
|
-
};
|
|
2134
|
-
|
|
2135
|
-
type BreadcrumbProps = {
|
|
2136
|
-
/**
|
|
2137
|
-
* An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
|
|
2138
|
-
* */
|
|
2139
|
-
icon?: ButtonAsLinkProps['leftIcon'];
|
|
2140
|
-
/**
|
|
2141
|
-
* The text of the breadcrumb link
|
|
2142
|
-
*/
|
|
2143
|
-
children: ReactNode;
|
|
2144
|
-
/**
|
|
2145
|
-
* The link to the page of the breadcrumb
|
|
2146
|
-
*/
|
|
2147
|
-
href: string;
|
|
2148
|
-
};
|
|
2149
|
-
declare const Breadcrumb: ({ icon, href, children }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
2150
|
-
|
|
2151
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, 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, useBoolean, useFormState, useMq, useToast, useWindowSize };
|
|
2165
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, 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, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
|