@pitchfork-ui/react 0.7.0 → 0.9.0
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/LICENSE +21 -0
- package/dist/a11y/index.js +1 -0
- package/dist/components/Accordion/Accordion2.js +1 -0
- package/dist/components/Alert/Alert2.js +1 -0
- package/dist/components/Avatar/Avatar2.js +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.css +26 -0
- package/dist/components/AvatarGroup/AvatarGroup2.js +38 -0
- package/dist/components/Badge/Badge2.js +1 -0
- package/dist/components/BadgeGroup/BadgeGroup2.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs2.js +1 -0
- package/dist/components/Button/Button2.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup2.js +1 -0
- package/dist/components/Calendar/Calendar.css +0 -1
- package/dist/components/Calendar/Calendar2.js +1 -0
- package/dist/components/Card/Card2.js +1 -0
- package/dist/components/Carousel/Carousel2.js +1 -0
- package/dist/components/Checkbox/Checkbox2.js +1 -0
- package/dist/components/CodeSnippet/CodeSnippet2.js +1 -0
- package/dist/components/Combobox/Combobox.css +155 -0
- package/dist/components/Combobox/Combobox2.js +192 -0
- package/dist/components/CommandPalette/CommandPalette.css +225 -0
- package/dist/components/CommandPalette/CommandPalette2.js +196 -0
- package/dist/components/ContentDivider/ContentDivider2.js +1 -0
- package/dist/components/CreditCard/CreditCard2.js +1 -0
- package/dist/components/DatePicker/DatePicker2.js +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +258 -0
- package/dist/components/DateRangePicker/DateRangePicker2.js +379 -0
- package/dist/components/Dropdown/Dropdown2.js +1 -0
- package/dist/components/EmptyState/EmptyState2.js +1 -0
- package/dist/components/FileUploader/FileUploader2.js +1 -0
- package/dist/components/GaugeChart/GaugeChart2.js +1 -0
- package/dist/components/HeaderNavigation/HeaderNavigation2.js +1 -0
- package/dist/components/Heatmap/Heatmap2.js +1 -0
- package/dist/components/Icon/Icon2.js +44 -0
- package/dist/components/InlineCTA/InlineCTA2.js +1 -0
- package/dist/components/Input/Input2.js +1 -0
- package/dist/components/Kbd/Kbd.css +25 -0
- package/dist/components/Kbd/Kbd2.js +18 -0
- package/dist/components/LineBarCharts/LineBarChart2.js +1 -0
- package/dist/components/LoadingIndicators/LoadingIndicators2.js +1 -0
- package/dist/components/Metrics/Metrics2.js +1 -0
- package/dist/components/Modal/Modal.css +6 -3
- package/dist/components/Modal/Modal2.js +1 -0
- package/dist/components/MultiSelect/MultiSelect2.js +1 -0
- package/dist/components/Notification/Notification2.js +1 -0
- package/dist/components/NumberInput/NumberInput.css +98 -0
- package/dist/components/NumberInput/NumberInput2.js +166 -0
- package/dist/components/PageHeader/PageHeader2.js +1 -0
- package/dist/components/Pagination/Pagination2.js +1 -0
- package/dist/components/PieChart/PieChart2.js +1 -0
- package/dist/components/Popover/Popover.css +46 -0
- package/dist/components/Popover/Popover2.js +77 -0
- package/dist/components/ProgressIndicators/ProgressIndicators2.js +1 -0
- package/dist/components/ProgressSteps/ProgressSteps2.js +1 -0
- package/dist/components/RadarChart/RadarChart2.js +1 -0
- package/dist/components/RadioButton/RadioButton2.js +1 -0
- package/dist/components/RadioGroup/RadioGroup2.js +1 -0
- package/dist/components/Rating/Rating2.js +1 -0
- package/dist/components/RichTextEditor/RichTextEditor2.js +1 -0
- package/dist/components/SectionFooter/SectionFooter2.js +1 -0
- package/dist/components/SectionHeader/SectionHeader2.js +1 -0
- package/dist/components/Select/Select2.js +1 -0
- package/dist/components/SidebarNavigation/SidebarNavigation2.js +1 -0
- package/dist/components/SlideoutMenu/SlideoutMenu2.js +1 -0
- package/dist/components/Slider/Slider2.js +1 -0
- package/dist/components/Sparkline/Sparkline2.js +1 -0
- package/dist/components/Switch/Switch2.js +1 -0
- package/dist/components/Table/Table2.js +1 -0
- package/dist/components/Tabs/Tabs2.js +1 -0
- package/dist/components/Tag/Tag2.js +1 -0
- package/dist/components/Textarea/Textarea2.js +1 -0
- package/dist/components/Toast/Toast.js +130 -0
- package/dist/components/Tooltip/Tooltip2.js +1 -0
- package/dist/components/TreeView/TreeView2.js +1 -0
- package/dist/components/UtilityButton/UtilityButton2.js +1 -0
- package/dist/components/VideoPlayer/VideoPlayer2.js +1 -0
- package/dist/hooks/useAnchoredPosition.js +1 -0
- package/dist/hooks/useComposedRefs.js +1 -0
- package/dist/hooks/useControllableState.js +1 -0
- package/dist/hooks/useDisclosure.js +1 -0
- package/dist/hooks/useExitAnimation.js +1 -0
- package/dist/hooks/useFocusTrap.js +1 -0
- package/dist/hooks/useListNavigation.js +1 -0
- package/dist/hooks/useOutsideInteraction.js +1 -0
- package/dist/hooks/usePresence.js +1 -0
- package/dist/index.cjs +1191 -24
- package/dist/index.js +10 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.d.ts +14 -0
- package/dist/src/components/AvatarGroup/AvatarGroup.test.d.ts +1 -0
- package/dist/src/components/AvatarGroup/index.d.ts +1 -0
- package/dist/src/components/Combobox/Combobox.d.ts +20 -0
- package/dist/src/components/Combobox/Combobox.test.d.ts +1 -0
- package/dist/src/components/Combobox/index.d.ts +1 -0
- package/dist/src/components/CommandPalette/CommandPalette.d.ts +18 -0
- package/dist/src/components/CommandPalette/CommandPalette.test.d.ts +1 -0
- package/dist/src/components/CommandPalette/index.d.ts +1 -0
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +21 -0
- package/dist/src/components/DateRangePicker/DateRangePicker.test.d.ts +1 -0
- package/dist/src/components/DateRangePicker/index.d.ts +1 -0
- package/dist/src/components/Kbd/Kbd.d.ts +9 -0
- package/dist/src/components/Kbd/Kbd.test.d.ts +1 -0
- package/dist/src/components/Kbd/index.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +19 -0
- package/dist/src/components/NumberInput/NumberInput.test.d.ts +1 -0
- package/dist/src/components/NumberInput/index.d.ts +1 -0
- package/dist/src/components/Popover/Popover.d.ts +21 -0
- package/dist/src/components/Popover/Popover.test.d.ts +1 -0
- package/dist/src/components/Popover/index.d.ts +1 -0
- package/dist/src/components/Toast/Toast.d.ts +35 -0
- package/dist/src/components/Toast/Toast.test.d.ts +1 -0
- package/dist/src/components/Toast/index.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +983 -80
- package/dist/utils/FieldWrapper.js +1 -0
- package/dist/utils/cx.js +1 -0
- package/package.json +29 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import './styles/theme.css';/* empty css */
|
|
2
3
|
import { Keys, composeDescribedBy, getFocusableElements, isActivationKey } from "./a11y/index.js";
|
|
3
4
|
import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
|
|
@@ -13,7 +14,9 @@ import { Icon, getAvailableIconNames, getCustomIconNames } from "./components/Ic
|
|
|
13
14
|
import { Accordion } from "./components/Accordion/Accordion2.js";
|
|
14
15
|
import { Alert } from "./components/Alert/Alert2.js";
|
|
15
16
|
import { Avatar } from "./components/Avatar/Avatar2.js";
|
|
17
|
+
import { AvatarGroup } from "./components/AvatarGroup/AvatarGroup2.js";
|
|
16
18
|
import { Button } from "./components/Button/Button2.js";
|
|
19
|
+
import { CommandPalette } from "./components/CommandPalette/CommandPalette2.js";
|
|
17
20
|
import { BadgeGroup } from "./components/BadgeGroup/BadgeGroup2.js";
|
|
18
21
|
import { ButtonGroup } from "./components/ButtonGroup/ButtonGroup2.js";
|
|
19
22
|
import { Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs2.js";
|
|
@@ -26,12 +29,15 @@ import { Dropdown } from "./components/Dropdown/Dropdown2.js";
|
|
|
26
29
|
import { Calendar } from "./components/Calendar/Calendar2.js";
|
|
27
30
|
import { Carousel } from "./components/Carousel/Carousel2.js";
|
|
28
31
|
import { CodeSnippet } from "./components/CodeSnippet/CodeSnippet2.js";
|
|
32
|
+
import { Combobox } from "./components/Combobox/Combobox2.js";
|
|
29
33
|
import { ContentDivider } from "./components/ContentDivider/ContentDivider2.js";
|
|
30
34
|
import { DatePicker } from "./components/DatePicker/DatePicker2.js";
|
|
35
|
+
import { DateRangePicker } from "./components/DateRangePicker/DateRangePicker2.js";
|
|
31
36
|
import { EmptyState } from "./components/EmptyState/EmptyState2.js";
|
|
32
37
|
import { FileUploader } from "./components/FileUploader/FileUploader2.js";
|
|
33
38
|
import { HeaderNavigation } from "./components/HeaderNavigation/HeaderNavigation2.js";
|
|
34
39
|
import { InlineCTA } from "./components/InlineCTA/InlineCTA2.js";
|
|
40
|
+
import { Kbd } from "./components/Kbd/Kbd2.js";
|
|
35
41
|
import { GaugeChart } from "./components/GaugeChart/GaugeChart2.js";
|
|
36
42
|
import { Heatmap } from "./components/Heatmap/Heatmap2.js";
|
|
37
43
|
import { AreaChart, BarChart, LineChart } from "./components/LineBarCharts/LineBarChart2.js";
|
|
@@ -40,9 +46,11 @@ import { MetricCard, MetricGrid } from "./components/Metrics/Metrics2.js";
|
|
|
40
46
|
import { Modal, ModalBody, ModalFooter, ModalHeader } from "./components/Modal/Modal2.js";
|
|
41
47
|
import { MultiSelect } from "./components/MultiSelect/MultiSelect2.js";
|
|
42
48
|
import { Notification, NotificationStack } from "./components/Notification/Notification2.js";
|
|
49
|
+
import { NumberInput } from "./components/NumberInput/NumberInput2.js";
|
|
43
50
|
import { PageHeader, PageHeaderMeta } from "./components/PageHeader/PageHeader2.js";
|
|
44
51
|
import { Pagination } from "./components/Pagination/Pagination2.js";
|
|
45
52
|
import { PieChart } from "./components/PieChart/PieChart2.js";
|
|
53
|
+
import { Popover } from "./components/Popover/Popover2.js";
|
|
46
54
|
import { ProgressBar, ProgressCircle } from "./components/ProgressIndicators/ProgressIndicators2.js";
|
|
47
55
|
import { ProgressSteps } from "./components/ProgressSteps/ProgressSteps2.js";
|
|
48
56
|
import { RadarChart } from "./components/RadarChart/RadarChart2.js";
|
|
@@ -62,8 +70,9 @@ import { Tag } from "./components/Tag/Tag2.js";
|
|
|
62
70
|
import { Table } from "./components/Table/Table2.js";
|
|
63
71
|
import { Tabs } from "./components/Tabs/Tabs2.js";
|
|
64
72
|
import { Textarea } from "./components/Textarea/Textarea2.js";
|
|
73
|
+
import { ToastProvider, toast, useToast } from "./components/Toast/Toast.js";
|
|
65
74
|
import { Tooltip } from "./components/Tooltip/Tooltip2.js";
|
|
66
75
|
import { TreeView } from "./components/TreeView/TreeView2.js";
|
|
67
76
|
import { UtilityButton } from "./components/UtilityButton/UtilityButton2.js";
|
|
68
77
|
import { VideoPlayer } from "./components/VideoPlayer/VideoPlayer2.js";
|
|
69
|
-
export { Accordion, Alert, AreaChart, Avatar, Badge, BadgeGroup, BarChart, Breadcrumbs, Button, ButtonGroup, Calendar, Card, CardContent, CardFooter, CardHeader, Carousel, Checkbox, CodeSnippet, ContentDivider, CreditCard, DatePicker, Dropdown, EmptyState, FileUploader, GaugeChart, HeaderNavigation, Heatmap, Icon, InlineCTA, Input, Keys, LineChart, LoadingDots, LoadingSkeleton, LoadingSpinner, MetricCard, MetricGrid, Modal, ModalBody, ModalFooter, ModalHeader, MultiSelect, Notification, NotificationStack, PageHeader, PageHeaderMeta, Pagination, PieChart, ProgressBar, ProgressCircle, ProgressSteps, RadarChart, RadioButton, RadioGroup, RatingBadge, RatingStars, RichTextEditor, SectionFooter, SectionHeader, Select, SidebarNavigation, SlideoutMenu, Slider, Sparkline, Switch, Table, Tabs, Tag, Textarea, Tooltip, TreeView, UtilityButton, VideoPlayer, composeDescribedBy, getAvailableIconNames, getCustomIconNames, getFocusableElements, isActivationKey, useAnchoredPosition, useComposedRefs, useControllableState, useDisclosure, useExitAnimation, useFocusTrap, useListNavigation, useOutsideInteraction, usePresence };
|
|
78
|
+
export { Accordion, Alert, AreaChart, Avatar, AvatarGroup, Badge, BadgeGroup, BarChart, Breadcrumbs, Button, ButtonGroup, Calendar, Card, CardContent, CardFooter, CardHeader, Carousel, Checkbox, CodeSnippet, Combobox, CommandPalette, ContentDivider, CreditCard, DatePicker, DateRangePicker, Dropdown, EmptyState, FileUploader, GaugeChart, HeaderNavigation, Heatmap, Icon, InlineCTA, Input, Kbd, Keys, LineChart, LoadingDots, LoadingSkeleton, LoadingSpinner, MetricCard, MetricGrid, Modal, ModalBody, ModalFooter, ModalHeader, MultiSelect, Notification, NotificationStack, NumberInput, PageHeader, PageHeaderMeta, Pagination, PieChart, Popover, ProgressBar, ProgressCircle, ProgressSteps, RadarChart, RadioButton, RadioGroup, RatingBadge, RatingStars, RichTextEditor, SectionFooter, SectionHeader, Select, SidebarNavigation, SlideoutMenu, Slider, Sparkline, Switch, Table, Tabs, Tag, Textarea, ToastProvider, Tooltip, TreeView, UtilityButton, VideoPlayer, composeDescribedBy, getAvailableIconNames, getCustomIconNames, getFocusableElements, isActivationKey, toast, useAnchoredPosition, useComposedRefs, useControllableState, useDisclosure, useExitAnimation, useFocusTrap, useListNavigation, useOutsideInteraction, usePresence, useToast };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvatarProps, AvatarSize } from '../Avatar';
|
|
2
|
+
export type AvatarGroupItem = Pick<AvatarProps, 'src' | 'alt' | 'name'>;
|
|
3
|
+
export interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
avatars: AvatarGroupItem[];
|
|
5
|
+
/** Max avatars to show before collapsing into a +N chip. Default 5. */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Size applied to every avatar in the group. Default `md`. */
|
|
8
|
+
size?: AvatarSize;
|
|
9
|
+
/** Explicit total to compute the overflow count (defaults to `avatars.length`). */
|
|
10
|
+
total?: number;
|
|
11
|
+
/** Accessible label for the group. */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const AvatarGroup: import('react').ForwardRefExoticComponent<AvatarGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AvatarGroup';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ComboboxOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ComboboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange'> {
|
|
7
|
+
options: ComboboxOption[];
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
label?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** Message shown when no options match the query. */
|
|
16
|
+
emptyMessage?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const Combobox: import('react').ForwardRefExoticComponent<ComboboxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Combobox';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface CommandItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
/** Grouping label — items with the same group name are visually grouped. */
|
|
7
|
+
group?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onSelect: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface CommandPaletteProps {
|
|
12
|
+
open: boolean;
|
|
13
|
+
onOpenChange: (open: boolean) => void;
|
|
14
|
+
items: CommandItem[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
emptyMessage?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function CommandPalette({ open, onOpenChange, items, placeholder, emptyMessage, }: CommandPaletteProps): import('react').ReactPortal | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CommandPalette';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DateRange {
|
|
2
|
+
start: Date | null;
|
|
3
|
+
end: Date | null;
|
|
4
|
+
}
|
|
5
|
+
export interface DateRangePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
|
|
6
|
+
value?: DateRange;
|
|
7
|
+
defaultValue?: DateRange;
|
|
8
|
+
onValueChange?: (range: DateRange) => void;
|
|
9
|
+
label?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
startPlaceholder?: string;
|
|
13
|
+
endPlaceholder?: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
disabledDates?: (date: Date) => boolean;
|
|
17
|
+
showOutsideDays?: boolean;
|
|
18
|
+
startYear?: number;
|
|
19
|
+
endYear?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const DateRangePicker: import('react').ForwardRefExoticComponent<DateRangePickerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateRangePicker';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type KbdSize = 'sm' | 'md';
|
|
2
|
+
export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** Render a key combination joined into a single cap (e.g. `['⌘', 'K']`). */
|
|
4
|
+
keys?: string[];
|
|
5
|
+
size?: KbdSize;
|
|
6
|
+
/** Separator shown between keys in a combo. Default `+`. */
|
|
7
|
+
separator?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Kbd: import('react').ForwardRefExoticComponent<KbdProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Kbd';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'type' | 'min' | 'max' | 'step'> {
|
|
2
|
+
value?: number | null;
|
|
3
|
+
defaultValue?: number | null;
|
|
4
|
+
onValueChange?: (value: number | null) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
/** Intl.NumberFormat options applied to the value while the field is not focused. */
|
|
12
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
13
|
+
/** Locale(s) for formatting. Defaults to the runtime default. */
|
|
14
|
+
locale?: string | string[];
|
|
15
|
+
decrementLabel?: string;
|
|
16
|
+
incrementLabel?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const NumberInput: import('react').ForwardRefExoticComponent<NumberInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberInput';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
/** The element the popover anchors to and toggles from (e.g. a Button). */
|
|
4
|
+
trigger: ReactElement;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Controlled open state. */
|
|
7
|
+
open?: boolean;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
/** Horizontal alignment relative to the trigger. Default `start`. */
|
|
11
|
+
align?: 'start' | 'end';
|
|
12
|
+
/** Accessible label for the popover dialog. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Close when clicking/tapping outside. Default true. */
|
|
15
|
+
closeOnOutsideClick?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Popover({ trigger, children, open, defaultOpen, onOpenChange, align, label, closeOnOutsideClick, className, }: PopoverProps): import("react").JSX.Element;
|
|
19
|
+
export declare namespace Popover {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Popover';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NotificationPlacement, NotificationVariant } from '../Notification';
|
|
2
|
+
export interface ToastOptions {
|
|
3
|
+
variant?: NotificationVariant;
|
|
4
|
+
heading?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
/** Auto-dismiss delay in ms. Pass `false` to keep until manually dismissed. Defaults to 4000. */
|
|
8
|
+
duration?: number | false;
|
|
9
|
+
/** Whether to show the X dismiss button. Defaults to true. */
|
|
10
|
+
dismissible?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ToastContextValue {
|
|
13
|
+
toast: (options: ToastOptions) => string;
|
|
14
|
+
dismiss: (id: string) => void;
|
|
15
|
+
dismissAll: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ToastProviderProps {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
placement?: NotificationPlacement;
|
|
20
|
+
/** Default auto-dismiss delay for all toasts. Defaults to 4000ms. */
|
|
21
|
+
defaultDuration?: number | false;
|
|
22
|
+
}
|
|
23
|
+
export declare function ToastProvider({ children, placement, defaultDuration, }: ToastProviderProps): import("react").JSX.Element;
|
|
24
|
+
export declare function useToast(): ToastContextValue;
|
|
25
|
+
/**
|
|
26
|
+
* Fire a toast imperatively from anywhere — no hook needed.
|
|
27
|
+
* Requires a `<ToastProvider>` to be mounted somewhere in the tree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function toast(options: ToastOptions): string;
|
|
30
|
+
export declare namespace toast {
|
|
31
|
+
var info: (opts: Omit<ToastOptions, "variant">) => string;
|
|
32
|
+
var success: (opts: Omit<ToastOptions, "variant">) => string;
|
|
33
|
+
var warning: (opts: Omit<ToastOptions, "variant">) => string;
|
|
34
|
+
var danger: (opts: Omit<ToastOptions, "variant">) => string;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toast';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * from './a11y';
|
|
|
2
2
|
export * from './components/Accordion';
|
|
3
3
|
export * from './components/Alert';
|
|
4
4
|
export * from './components/Avatar';
|
|
5
|
+
export * from './components/AvatarGroup';
|
|
5
6
|
export * from './components/Button';
|
|
7
|
+
export * from './components/CommandPalette';
|
|
6
8
|
export * from './components/BadgeGroup';
|
|
7
9
|
export * from './components/ButtonGroup';
|
|
8
10
|
export * from './components/Breadcrumbs';
|
|
@@ -14,14 +16,17 @@ export * from './components/Checkbox';
|
|
|
14
16
|
export * from './components/Calendar';
|
|
15
17
|
export * from './components/Carousel';
|
|
16
18
|
export * from './components/CodeSnippet';
|
|
19
|
+
export * from './components/Combobox';
|
|
17
20
|
export * from './components/ContentDivider';
|
|
18
21
|
export * from './components/DatePicker';
|
|
22
|
+
export * from './components/DateRangePicker';
|
|
19
23
|
export * from './components/Dropdown';
|
|
20
24
|
export * from './components/EmptyState';
|
|
21
25
|
export * from './components/FileUploader';
|
|
22
26
|
export * from './components/HeaderNavigation';
|
|
23
27
|
export * from './components/Icon';
|
|
24
28
|
export * from './components/InlineCTA';
|
|
29
|
+
export * from './components/Kbd';
|
|
25
30
|
export * from './components/GaugeChart';
|
|
26
31
|
export * from './components/Heatmap';
|
|
27
32
|
export * from './components/LineBarCharts';
|
|
@@ -30,9 +35,11 @@ export * from './components/Metrics';
|
|
|
30
35
|
export * from './components/Modal';
|
|
31
36
|
export * from './components/MultiSelect';
|
|
32
37
|
export * from './components/Notification';
|
|
38
|
+
export * from './components/NumberInput';
|
|
33
39
|
export * from './components/PageHeader';
|
|
34
40
|
export * from './components/Pagination';
|
|
35
41
|
export * from './components/PieChart';
|
|
42
|
+
export * from './components/Popover';
|
|
36
43
|
export * from './components/ProgressIndicators';
|
|
37
44
|
export * from './components/ProgressSteps';
|
|
38
45
|
export * from './components/RadarChart';
|
|
@@ -52,6 +59,7 @@ export * from './components/Tag';
|
|
|
52
59
|
export * from './components/Table';
|
|
53
60
|
export * from './components/Tabs';
|
|
54
61
|
export * from './components/Textarea';
|
|
62
|
+
export * from './components/Toast';
|
|
55
63
|
export * from './components/Tooltip';
|
|
56
64
|
export * from './components/TreeView';
|
|
57
65
|
export * from './components/UtilityButton';
|
package/dist/styles/theme.css
CHANGED
|
@@ -221,6 +221,39 @@
|
|
|
221
221
|
--pf-select-option-active-bg: var(--color-semantic-action-primary);
|
|
222
222
|
--pf-select-option-active-text: var(--color-semantic-action-primary-text);
|
|
223
223
|
|
|
224
|
+
/* Combobox aliases */
|
|
225
|
+
--pf-combobox-bg: var(--pf-input-bg);
|
|
226
|
+
--pf-combobox-border: var(--pf-input-border);
|
|
227
|
+
--pf-combobox-text: var(--pf-input-text);
|
|
228
|
+
--pf-combobox-placeholder: var(--pf-input-placeholder);
|
|
229
|
+
--pf-combobox-focus-border: var(--color-semantic-action-primary);
|
|
230
|
+
--pf-combobox-invalid-border: var(--color-semantic-status-danger-border);
|
|
231
|
+
--pf-combobox-menu-bg: var(--pf-surface-bg);
|
|
232
|
+
--pf-combobox-menu-border: var(--pf-surface-border-strong);
|
|
233
|
+
--pf-combobox-option-active-bg: var(--color-semantic-action-primary);
|
|
234
|
+
--pf-combobox-option-active-text: var(--color-semantic-action-primary-text);
|
|
235
|
+
|
|
236
|
+
/* Command palette aliases */
|
|
237
|
+
--pf-command-bg: var(--pf-surface-bg);
|
|
238
|
+
--pf-command-border: var(--pf-surface-border-strong);
|
|
239
|
+
--pf-command-text: var(--color-semantic-text-default);
|
|
240
|
+
--pf-command-text-muted: var(--color-semantic-text-muted);
|
|
241
|
+
--pf-command-shortcut-bg: var(--color-semantic-background-subtle);
|
|
242
|
+
--pf-command-item-active-bg: var(--color-semantic-action-primary);
|
|
243
|
+
--pf-command-item-active-text: var(--color-semantic-action-primary-text);
|
|
244
|
+
|
|
245
|
+
/* Number input aliases */
|
|
246
|
+
--pf-numberinput-bg: var(--pf-input-bg);
|
|
247
|
+
--pf-numberinput-border: var(--pf-input-border);
|
|
248
|
+
--pf-numberinput-text: var(--pf-input-text);
|
|
249
|
+
--pf-numberinput-placeholder: var(--pf-input-placeholder);
|
|
250
|
+
--pf-numberinput-focus-border: var(--color-semantic-action-primary);
|
|
251
|
+
--pf-numberinput-invalid-border: var(--color-semantic-status-danger-border);
|
|
252
|
+
--pf-numberinput-step-bg: var(--color-semantic-background-subtle);
|
|
253
|
+
--pf-numberinput-step-text: var(--color-semantic-text-default);
|
|
254
|
+
--pf-numberinput-step-hover-bg: var(--color-semantic-action-primary);
|
|
255
|
+
--pf-numberinput-step-hover-text: var(--color-semantic-action-primary-text);
|
|
256
|
+
|
|
224
257
|
/* Overlay and elevation color aliases */
|
|
225
258
|
--pf-overlay-backdrop: color-mix(in srgb, var(--color-gray-900) 48%, transparent);
|
|
226
259
|
--pf-elevation-overlay-shadow: 0 24px 60px
|
|
@@ -372,6 +405,22 @@
|
|
|
372
405
|
--pf-utility-btn-danger-text: var(--color-semantic-status-danger-foreground);
|
|
373
406
|
--pf-utility-btn-danger-bg-hover: var(--color-danger-100);
|
|
374
407
|
|
|
408
|
+
/* Kbd aliases */
|
|
409
|
+
--pf-kbd-bg: var(--color-semantic-background-subtle);
|
|
410
|
+
--pf-kbd-border: var(--color-semantic-border-default);
|
|
411
|
+
--pf-kbd-text: var(--color-semantic-text-default);
|
|
412
|
+
|
|
413
|
+
/* Popover aliases */
|
|
414
|
+
--pf-popover-bg: var(--color-semantic-background-default);
|
|
415
|
+
--pf-popover-border: var(--color-semantic-border-default);
|
|
416
|
+
--pf-popover-text: var(--color-semantic-text-default);
|
|
417
|
+
|
|
418
|
+
/* AvatarGroup aliases */
|
|
419
|
+
--pf-avatar-group-ring: var(--color-semantic-background-default);
|
|
420
|
+
--pf-avatar-group-overflow-bg: var(--color-semantic-background-subtle);
|
|
421
|
+
/* default (not muted) text: muted on the subtle chip was only 4.34:1 in light */
|
|
422
|
+
--pf-avatar-group-overflow-text: var(--color-semantic-text-default);
|
|
423
|
+
|
|
375
424
|
/* Accordion aliases */
|
|
376
425
|
--pf-accordion-border: var(--color-semantic-border-default);
|
|
377
426
|
--pf-accordion-trigger-text: var(--color-semantic-text-default);
|
|
@@ -484,6 +533,21 @@
|
|
|
484
533
|
--pf-datepicker-focus-border: var(--color-semantic-action-primary);
|
|
485
534
|
--pf-datepicker-invalid-border: var(--color-semantic-status-danger-border);
|
|
486
535
|
|
|
536
|
+
/* Date range picker aliases */
|
|
537
|
+
--pf-daterange-bg: var(--pf-datepicker-bg);
|
|
538
|
+
--pf-daterange-bg-subtle: var(--pf-datepicker-bg-subtle);
|
|
539
|
+
--pf-daterange-border: var(--pf-datepicker-border);
|
|
540
|
+
--pf-daterange-border-strong: var(--pf-datepicker-border-strong);
|
|
541
|
+
--pf-daterange-text: var(--pf-datepicker-text);
|
|
542
|
+
--pf-daterange-text-muted: var(--pf-datepicker-text-muted);
|
|
543
|
+
--pf-daterange-focus-ring: var(--pf-focus-ring);
|
|
544
|
+
--pf-daterange-invalid-border: var(--color-semantic-status-danger-border);
|
|
545
|
+
--pf-daterange-menu-bg: var(--pf-surface-bg);
|
|
546
|
+
--pf-daterange-menu-border: var(--pf-surface-border-strong);
|
|
547
|
+
/* brand-600 vs white popover = 6.25:1 non-text; white text on brand-600 = 6.25:1 text */
|
|
548
|
+
--pf-daterange-range-bg: var(--color-brand-600);
|
|
549
|
+
--pf-daterange-range-text: var(--color-base-white);
|
|
550
|
+
|
|
487
551
|
/* BadgeGroup aliases */
|
|
488
552
|
--pf-badgegroup-gray-100: var(--color-gray-100);
|
|
489
553
|
--pf-badgegroup-gray-200: var(--color-gray-200);
|
|
@@ -760,6 +824,10 @@
|
|
|
760
824
|
/* Calendar — same border-default contrast issue as TreeView */
|
|
761
825
|
--pf-calendar-border: var(--color-semantic-border-strong);
|
|
762
826
|
|
|
827
|
+
/* Dark mode: brand-400 vs gray-800 = 4.08:1 non-text; gray-900 text on brand-400 = 5.58:1 text */
|
|
828
|
+
--pf-daterange-range-bg: var(--color-brand-400);
|
|
829
|
+
--pf-daterange-range-text: var(--color-gray-900);
|
|
830
|
+
|
|
763
831
|
/* GaugeChart — track uses background-subtle (gray-700) which is 1.72:1 against gray-900 */
|
|
764
832
|
--pf-gauge-track-color: var(--color-semantic-border-strong);
|
|
765
833
|
|