@deque/cauldron-react 5.8.0 → 5.8.1-canary.033b4e81

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.
@@ -0,0 +1,31 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Placement } from '@popperjs/core';
3
+ import { Cauldron } from '../../types';
4
+ export type PopoverVariant = 'prompt' | 'custom';
5
+ type BaseProps = React.HTMLAttributes<HTMLDivElement> & {
6
+ target: React.RefObject<HTMLElement> | HTMLElement;
7
+ variant?: PopoverVariant;
8
+ show: boolean;
9
+ onClose: () => void;
10
+ placement?: Placement;
11
+ portal?: React.RefObject<HTMLElement> | HTMLElement;
12
+ };
13
+ type CustomProps = BaseProps & {
14
+ variant: 'custom';
15
+ applyButtonText?: string;
16
+ onApply?: () => void;
17
+ closeButtonText?: string;
18
+ infoText?: ReactNode;
19
+ children: ReactNode;
20
+ } & Cauldron.LabelProps;
21
+ type PromptProps = BaseProps & {
22
+ variant: 'prompt';
23
+ applyButtonText?: string;
24
+ onApply: () => void;
25
+ closeButtonText?: string;
26
+ infoText: ReactNode;
27
+ children?: ReactNode;
28
+ };
29
+ export type PopoverProps = PromptProps | CustomProps;
30
+ declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
31
+ export default Popover;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconType } from '../Icon';
3
+ import { ContentNode } from '../../types';
4
+ interface TagButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
5
+ label: ContentNode;
6
+ value: ContentNode;
7
+ icon: IconType;
8
+ onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
9
+ }
10
+ declare const TagButton: React.ForwardRefExoticComponent<TagButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export default TagButton;
package/lib/index.d.ts CHANGED
@@ -39,6 +39,7 @@ export { default as Code } from './components/Code';
39
39
  export { default as LoaderOverlay } from './components/LoaderOverlay';
40
40
  export { default as Line } from './components/Line';
41
41
  export { default as Tag, TagLabel } from './components/Tag';
42
+ export { default as TagButton } from './components/TagButton';
42
43
  export { default as Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter } from './components/Table';
43
44
  export { default as Tabs, Tab, TabPanel } from './components/Tabs';
44
45
  export { DescriptionList, DescriptionListItem, DescriptionTerm, DescriptionDetails } from './components/DescriptionList';
@@ -52,6 +53,9 @@ export { default as FieldWrap } from './components/FieldWrap';
52
53
  export { default as Breadcrumb, BreadcrumbItem, BreadcrumbLink } from './components/Breadcrumb';
53
54
  export { default as TwoColumnPanel, ColumnHeader, ColumnGroupHeader, ColumnLeft, ColumnRight, ColumnList } from './components/TwoColumnPanel';
54
55
  export { default as Notice } from './components/Notice';
56
+ export { default as Listbox, ListboxOption, ListboxGroup } from './components/Listbox';
57
+ export { default as Combobox, ComboboxOption, ComboboxGroup } from './components/Combobox';
58
+ export { default as Popover } from './components/Popover';
55
59
  /**
56
60
  * Helpers / Utils
57
61
  */