@pitchfork-ui/react 0.1.9 → 0.6.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/README.md +20 -5
- package/dist/components/Accordion/Accordion.css +85 -0
- package/dist/components/Accordion/Accordion2.js +96 -0
- package/dist/components/Alert/Alert.css +111 -0
- package/dist/{index8.js → components/Alert/Alert2.js} +7 -5
- package/dist/components/Avatar/Avatar.css +97 -0
- package/dist/{index10.js → components/Avatar/Avatar2.js} +2 -2
- package/dist/components/Badge/Badge.css +26 -0
- package/dist/{index23.js → components/Badge/Badge2.js} +2 -2
- package/dist/components/BadgeGroup/BadgeGroup.css +115 -0
- package/dist/{index14.js → components/BadgeGroup/BadgeGroup2.js} +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.css +45 -0
- package/dist/{index18.js → components/Breadcrumbs/Breadcrumbs2.js} +2 -2
- package/dist/components/Button/Button.css +93 -0
- package/dist/{index12.js → components/Button/Button2.js} +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.css +107 -0
- package/dist/{index16.js → components/ButtonGroup/ButtonGroup2.js} +2 -2
- package/dist/components/Calendar/Calendar.css +144 -0
- package/dist/{index40.js → components/Calendar/Calendar2.js} +4 -4
- package/dist/components/Card/Card.css +23 -0
- package/dist/{index25.js → components/Card/Card2.js} +2 -2
- package/dist/components/Carousel/Carousel.css +124 -0
- package/dist/components/Carousel/Carousel2.js +147 -0
- package/dist/components/Checkbox/Checkbox.css +62 -0
- package/dist/{index29.js → components/Checkbox/Checkbox2.js} +2 -2
- package/dist/components/CodeSnippet/CodeSnippet.css +155 -0
- package/dist/{index46.js → components/CodeSnippet/CodeSnippet2.js} +6 -6
- package/dist/components/ContentDivider/ContentDivider.css +38 -0
- package/dist/{index48.js → components/ContentDivider/ContentDivider2.js} +2 -2
- package/dist/components/CreditCard/CreditCard.css +139 -0
- package/dist/{index27.js → components/CreditCard/CreditCard2.js} +2 -2
- package/dist/components/DatePicker/DatePicker.css +91 -0
- package/dist/{index50.js → components/DatePicker/DatePicker2.js} +9 -9
- package/dist/components/Dropdown/Dropdown.css +149 -0
- package/dist/{index38.js → components/Dropdown/Dropdown2.js} +8 -9
- package/dist/components/EmptyState/EmptyState.css +72 -0
- package/dist/{index52.js → components/EmptyState/EmptyState2.js} +3 -3
- package/dist/components/FileUploader/FileUploader.css +135 -0
- package/dist/{index54.js → components/FileUploader/FileUploader2.js} +4 -4
- package/dist/components/GaugeChart/GaugeChart.css +63 -0
- package/dist/components/GaugeChart/GaugeChart2.js +74 -0
- package/dist/components/HeaderNavigation/HeaderNavigation.css +87 -0
- package/dist/{index56.js → components/HeaderNavigation/HeaderNavigation2.js} +2 -2
- package/dist/components/Heatmap/Heatmap.css +100 -0
- package/dist/components/Heatmap/Heatmap2.js +160 -0
- package/dist/components/Icon/Icon.css +6 -0
- package/dist/{index6.js → components/Icon/Icon2.js} +2 -2
- package/dist/components/InlineCTA/InlineCTA.css +144 -0
- package/dist/{index58.js → components/InlineCTA/InlineCTA2.js} +17 -5
- package/dist/components/Input/Input.css +75 -0
- package/dist/{index21.js → components/Input/Input2.js} +3 -3
- package/dist/components/LineBarCharts/LineBarChart.css +122 -0
- package/dist/{index60.js → components/LineBarCharts/LineBarChart2.js} +11 -3
- package/dist/components/LoadingIndicators/LoadingIndicators.css +107 -0
- package/dist/{index62.js → components/LoadingIndicators/LoadingIndicators2.js} +2 -2
- package/dist/components/Metrics/Metrics.css +106 -0
- package/dist/{index64.js → components/Metrics/Metrics2.js} +3 -3
- package/dist/components/Modal/Modal.css +198 -0
- package/dist/{index66.js → components/Modal/Modal2.js} +11 -9
- package/dist/components/MultiSelect/MultiSelect.css +174 -0
- package/dist/{index68.js → components/MultiSelect/MultiSelect2.js} +11 -12
- package/dist/components/Notification/Notification.css +242 -0
- package/dist/{index70.js → components/Notification/Notification2.js} +7 -5
- package/dist/components/PageHeader/PageHeader.css +85 -0
- package/dist/{index72.js → components/PageHeader/PageHeader2.js} +3 -3
- package/dist/components/Pagination/Pagination.css +101 -0
- package/dist/{index74.js → components/Pagination/Pagination2.js} +2 -2
- package/dist/components/PieChart/PieChart.css +115 -0
- package/dist/{index76.js → components/PieChart/PieChart2.js} +3 -3
- package/dist/components/ProgressIndicators/ProgressIndicators.css +95 -0
- package/dist/{index78.js → components/ProgressIndicators/ProgressIndicators2.js} +6 -3
- package/dist/components/ProgressSteps/ProgressSteps.css +175 -0
- package/dist/{index80.js → components/ProgressSteps/ProgressSteps2.js} +2 -2
- package/dist/components/RadarChart/RadarChart.css +119 -0
- package/dist/{index82.js → components/RadarChart/RadarChart2.js} +21 -15
- package/dist/components/RadioButton/RadioButton.css +21 -0
- package/dist/{index84.js → components/RadioButton/RadioButton2.js} +2 -2
- package/dist/components/RadioGroup/RadioGroup.css +64 -0
- package/dist/{index86.js → components/RadioGroup/RadioGroup2.js} +2 -2
- package/dist/components/Rating/Rating.css +91 -0
- package/dist/{index88.js → components/Rating/Rating2.js} +3 -3
- package/dist/components/RichTextEditor/RichTextEditor.css +94 -0
- package/dist/{index90.js → components/RichTextEditor/RichTextEditor2.js} +4 -4
- package/dist/components/SectionFooter/SectionFooter.css +59 -0
- package/dist/{index92.js → components/SectionFooter/SectionFooter2.js} +2 -2
- package/dist/components/SectionHeader/SectionHeader.css +78 -0
- package/dist/{index94.js → components/SectionHeader/SectionHeader2.js} +2 -2
- package/dist/components/Select/Select.css +156 -0
- package/dist/{index102.js → components/Select/Select2.js} +11 -12
- package/dist/components/SidebarNavigation/SidebarNavigation.css +116 -0
- package/dist/{index96.js → components/SidebarNavigation/SidebarNavigation2.js} +2 -2
- package/dist/components/SlideoutMenu/SlideoutMenu.css +161 -0
- package/dist/{index98.js → components/SlideoutMenu/SlideoutMenu2.js} +3 -3
- package/dist/components/Slider/Slider.css +106 -0
- package/dist/{index104.js → components/Slider/Slider2.js} +2 -2
- package/dist/components/Sparkline/Sparkline.css +65 -0
- package/dist/components/Sparkline/Sparkline2.js +100 -0
- package/dist/components/Switch/Switch.css +59 -0
- package/dist/{index100.js → components/Switch/Switch2.js} +2 -2
- package/dist/components/Table/Table.css +126 -0
- package/dist/{index108.js → components/Table/Table2.js} +2 -2
- package/dist/components/Tabs/Tabs.css +138 -0
- package/dist/{index110.js → components/Tabs/Tabs2.js} +53 -6
- package/dist/components/Tag/Tag.css +64 -0
- package/dist/{index106.js → components/Tag/Tag2.js} +3 -3
- package/dist/components/Textarea/Textarea.css +52 -0
- package/dist/{index112.js → components/Textarea/Textarea2.js} +3 -3
- package/dist/components/Tooltip/Tooltip.css +61 -0
- package/dist/{index114.js → components/Tooltip/Tooltip2.js} +6 -6
- package/dist/components/TreeView/TreeView.css +109 -0
- package/dist/{index116.js → components/TreeView/TreeView2.js} +2 -2
- package/dist/components/UtilityButton/UtilityButton.css +90 -0
- package/dist/{index118.js → components/UtilityButton/UtilityButton2.js} +2 -2
- package/dist/components/VideoPlayer/VideoPlayer.css +41 -0
- package/dist/{index120.js → components/VideoPlayer/VideoPlayer2.js} +2 -2
- package/dist/{index33.js → hooks/useDisclosure.js} +1 -1
- package/dist/hooks/useExitAnimation.js +25 -0
- package/dist/{index34.js → hooks/useFocusTrap.js} +1 -1
- package/dist/hooks/usePresence.js +31 -0
- package/dist/index.cjs +1030 -4720
- package/dist/index.js +69 -63
- package/dist/src/components/Accordion/Accordion.d.ts +20 -0
- package/dist/src/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/src/components/Accordion/index.d.ts +1 -0
- package/dist/src/components/GaugeChart/GaugeChart.d.ts +17 -0
- package/dist/src/components/GaugeChart/GaugeChart.test.d.ts +1 -0
- package/dist/src/components/GaugeChart/index.d.ts +1 -0
- package/dist/src/components/Heatmap/Heatmap.d.ts +28 -0
- package/dist/src/components/Heatmap/Heatmap.test.d.ts +1 -0
- package/dist/src/components/Heatmap/index.d.ts +1 -0
- package/dist/src/components/InlineCTA/InlineCTA.d.ts +2 -0
- package/dist/src/components/LineBarCharts/LineBarChart.d.ts +2 -0
- package/dist/src/components/Sparkline/Sparkline.d.ts +17 -0
- package/dist/src/components/Sparkline/Sparkline.test.d.ts +1 -0
- package/dist/src/components/Sparkline/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/useExitAnimation.d.ts +18 -0
- package/dist/src/hooks/usePresence.d.ts +13 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/styles/theme.css +813 -0
- package/dist/styles.css +881 -68
- package/dist/{index19.js → utils/FieldWrapper.js} +1 -1
- package/package.json +8 -4
- package/theme.starter.css +58 -0
- package/dist/index42.js +0 -134
- package/dist/index43.js +0 -16
- package/dist/index44.js +0 -4232
- /package/dist/{index3.js → a11y/index.js} +0 -0
- /package/dist/{index30.js → hooks/useAnchoredPosition.js} +0 -0
- /package/dist/{index31.js → hooks/useComposedRefs.js} +0 -0
- /package/dist/{index32.js → hooks/useControllableState.js} +0 -0
- /package/dist/{index35.js → hooks/useListNavigation.js} +0 -0
- /package/dist/{index36.js → hooks/useOutsideInteraction.js} +0 -0
- /package/dist/{index4.js → utils/cx.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,63 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
import { Keys, composeDescribedBy, getFocusableElements, isActivationKey } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
|
|
1
|
+
import './styles/theme.css';/* empty css */
|
|
2
|
+
import { Keys, composeDescribedBy, getFocusableElements, isActivationKey } from "./a11y/index.js";
|
|
3
|
+
import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
|
|
4
|
+
import { useComposedRefs } from "./hooks/useComposedRefs.js";
|
|
5
|
+
import { useControllableState } from "./hooks/useControllableState.js";
|
|
6
|
+
import { useDisclosure } from "./hooks/useDisclosure.js";
|
|
7
|
+
import { useExitAnimation } from "./hooks/useExitAnimation.js";
|
|
8
|
+
import { useFocusTrap } from "./hooks/useFocusTrap.js";
|
|
9
|
+
import { useListNavigation } from "./hooks/useListNavigation.js";
|
|
10
|
+
import { useOutsideInteraction } from "./hooks/useOutsideInteraction.js";
|
|
11
|
+
import { usePresence } from "./hooks/usePresence.js";
|
|
12
|
+
import { Icon, getAvailableIconNames, getCustomIconNames } from "./components/Icon/Icon2.js";
|
|
13
|
+
import { Accordion } from "./components/Accordion/Accordion2.js";
|
|
14
|
+
import { Alert } from "./components/Alert/Alert2.js";
|
|
15
|
+
import { Avatar } from "./components/Avatar/Avatar2.js";
|
|
16
|
+
import { Button } from "./components/Button/Button2.js";
|
|
17
|
+
import { BadgeGroup } from "./components/BadgeGroup/BadgeGroup2.js";
|
|
18
|
+
import { ButtonGroup } from "./components/ButtonGroup/ButtonGroup2.js";
|
|
19
|
+
import { Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs2.js";
|
|
20
|
+
import { Input } from "./components/Input/Input2.js";
|
|
21
|
+
import { Badge } from "./components/Badge/Badge2.js";
|
|
22
|
+
import { Card, CardContent, CardFooter, CardHeader } from "./components/Card/Card2.js";
|
|
23
|
+
import { CreditCard } from "./components/CreditCard/CreditCard2.js";
|
|
24
|
+
import { Checkbox } from "./components/Checkbox/Checkbox2.js";
|
|
25
|
+
import { Dropdown } from "./components/Dropdown/Dropdown2.js";
|
|
26
|
+
import { Calendar } from "./components/Calendar/Calendar2.js";
|
|
27
|
+
import { Carousel } from "./components/Carousel/Carousel2.js";
|
|
28
|
+
import { CodeSnippet } from "./components/CodeSnippet/CodeSnippet2.js";
|
|
29
|
+
import { ContentDivider } from "./components/ContentDivider/ContentDivider2.js";
|
|
30
|
+
import { DatePicker } from "./components/DatePicker/DatePicker2.js";
|
|
31
|
+
import { EmptyState } from "./components/EmptyState/EmptyState2.js";
|
|
32
|
+
import { FileUploader } from "./components/FileUploader/FileUploader2.js";
|
|
33
|
+
import { HeaderNavigation } from "./components/HeaderNavigation/HeaderNavigation2.js";
|
|
34
|
+
import { InlineCTA } from "./components/InlineCTA/InlineCTA2.js";
|
|
35
|
+
import { GaugeChart } from "./components/GaugeChart/GaugeChart2.js";
|
|
36
|
+
import { Heatmap } from "./components/Heatmap/Heatmap2.js";
|
|
37
|
+
import { AreaChart, BarChart, LineChart } from "./components/LineBarCharts/LineBarChart2.js";
|
|
38
|
+
import { LoadingDots, LoadingSkeleton, LoadingSpinner } from "./components/LoadingIndicators/LoadingIndicators2.js";
|
|
39
|
+
import { MetricCard, MetricGrid } from "./components/Metrics/Metrics2.js";
|
|
40
|
+
import { Modal, ModalBody, ModalFooter, ModalHeader } from "./components/Modal/Modal2.js";
|
|
41
|
+
import { MultiSelect } from "./components/MultiSelect/MultiSelect2.js";
|
|
42
|
+
import { Notification, NotificationStack } from "./components/Notification/Notification2.js";
|
|
43
|
+
import { PageHeader, PageHeaderMeta } from "./components/PageHeader/PageHeader2.js";
|
|
44
|
+
import { Pagination } from "./components/Pagination/Pagination2.js";
|
|
45
|
+
import { PieChart } from "./components/PieChart/PieChart2.js";
|
|
46
|
+
import { ProgressBar, ProgressCircle } from "./components/ProgressIndicators/ProgressIndicators2.js";
|
|
47
|
+
import { ProgressSteps } from "./components/ProgressSteps/ProgressSteps2.js";
|
|
48
|
+
import { RadarChart } from "./components/RadarChart/RadarChart2.js";
|
|
49
|
+
import { RadioButton } from "./components/RadioButton/RadioButton2.js";
|
|
50
|
+
import { RadioGroup } from "./components/RadioGroup/RadioGroup2.js";
|
|
51
|
+
import { RatingBadge, RatingStars } from "./components/Rating/Rating2.js";
|
|
52
|
+
import { RichTextEditor } from "./components/RichTextEditor/RichTextEditor2.js";
|
|
53
|
+
import { SectionFooter } from "./components/SectionFooter/SectionFooter2.js";
|
|
54
|
+
import { SectionHeader } from "./components/SectionHeader/SectionHeader2.js";
|
|
55
|
+
import { SidebarNavigation } from "./components/SidebarNavigation/SidebarNavigation2.js";
|
|
56
|
+
import { Sparkline } from "./components/Sparkline/Sparkline2.js";
|
|
57
|
+
import { SlideoutMenu } from "./components/SlideoutMenu/SlideoutMenu2.js";
|
|
58
|
+
import { Switch } from "./components/Switch/Switch2.js";
|
|
59
|
+
import { Select } from "./components/Select/Select2.js";
|
|
60
|
+
import { Slider } from "./components/Slider/Slider2.js";
|
|
61
|
+
import { Tag } from "./components/Tag/Tag2.js";
|
|
62
|
+
import { Table } from "./components/Table/Table2.js";
|
|
63
|
+
import { Tabs } from "./components/Tabs/Tabs2.js";
|
|
64
|
+
import { Textarea } from "./components/Textarea/Textarea2.js";
|
|
65
|
+
import { Tooltip } from "./components/Tooltip/Tooltip2.js";
|
|
66
|
+
import { TreeView } from "./components/TreeView/TreeView2.js";
|
|
67
|
+
import { UtilityButton } from "./components/UtilityButton/UtilityButton2.js";
|
|
68
|
+
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 };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type AccordionType = 'single' | 'multiple';
|
|
2
|
+
export interface AccordionItemData {
|
|
3
|
+
value: string;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
9
|
+
items: AccordionItemData[];
|
|
10
|
+
/** `single` collapses other panels when one opens; `multiple` allows many. Default `single`. */
|
|
11
|
+
type?: AccordionType;
|
|
12
|
+
/** Controlled list of expanded item values. */
|
|
13
|
+
value?: string[];
|
|
14
|
+
/** Initial expanded item values (uncontrolled). */
|
|
15
|
+
defaultValue?: string[];
|
|
16
|
+
onValueChange?: (value: string[]) => void;
|
|
17
|
+
/** Heading level for each item's header. Default 3. */
|
|
18
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
}
|
|
20
|
+
export declare const Accordion: import('react').ForwardRefExoticComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface GaugeChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
/** Current value */
|
|
3
|
+
value: number;
|
|
4
|
+
/** Maximum value. Defaults to 100. */
|
|
5
|
+
max?: number;
|
|
6
|
+
/** Label rendered in the center of the gauge. Defaults to the percentage string. */
|
|
7
|
+
centerLabel?: React.ReactNode;
|
|
8
|
+
/** Secondary label rendered below the center label */
|
|
9
|
+
subLabel?: React.ReactNode;
|
|
10
|
+
/** Diameter in pixels */
|
|
11
|
+
size?: number;
|
|
12
|
+
/** Arc stroke thickness in pixels */
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
/** Override the filled arc color. Defaults to `--pf-gauge-color`. */
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const GaugeChart: import('react').ForwardRefExoticComponent<GaugeChartProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GaugeChart';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface HeatmapDatum {
|
|
2
|
+
/** ISO date string, `YYYY-MM-DD` */
|
|
3
|
+
date: string;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
export interface HeatmapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
data: HeatmapDatum[];
|
|
8
|
+
/** First day to render (ISO). Defaults to the earliest date in `data`. */
|
|
9
|
+
startDate?: string;
|
|
10
|
+
/** Last day to render (ISO). Defaults to the latest date in `data`. */
|
|
11
|
+
endDate?: string;
|
|
12
|
+
/** Number of color buckets including the empty level. Defaults to 5. */
|
|
13
|
+
levels?: number;
|
|
14
|
+
/** 0 = Sunday, 1 = Monday. Defaults to 0. */
|
|
15
|
+
weekStartsOn?: 0 | 1;
|
|
16
|
+
/** Cell edge length in pixels. Defaults to 12. */
|
|
17
|
+
cellSize?: number;
|
|
18
|
+
/** Gap between cells in pixels. Defaults to 3. */
|
|
19
|
+
cellGap?: number;
|
|
20
|
+
showWeekdayLabels?: boolean;
|
|
21
|
+
showMonthLabels?: boolean;
|
|
22
|
+
/** Formats the native tooltip on each cell. */
|
|
23
|
+
valueFormatter?: (value: number, date: string) => string;
|
|
24
|
+
/** Accessible summary. Defaults to a generated description. */
|
|
25
|
+
label?: string;
|
|
26
|
+
emptyLabel?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const Heatmap: import('react').ForwardRefExoticComponent<HeatmapProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Heatmap';
|
|
@@ -7,5 +7,7 @@ export interface InlineCTAProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
iconName?: IconName;
|
|
9
9
|
tone?: InlineCTATone;
|
|
10
|
+
dismissible?: boolean;
|
|
11
|
+
onDismiss?: () => void;
|
|
10
12
|
}
|
|
11
13
|
export declare const InlineCTA: import('react').ForwardRefExoticComponent<InlineCTAProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -18,6 +18,8 @@ export interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
valueFormatter?: (value: number) => string;
|
|
19
19
|
}
|
|
20
20
|
export declare const LineChart: import('react').ForwardRefExoticComponent<LineChartProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export type AreaChartProps = Omit<LineChartProps, 'area'>;
|
|
22
|
+
export declare const AreaChart: import('react').ForwardRefExoticComponent<AreaChartProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
23
|
export interface BarChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
22
24
|
data: ChartDataPoint[];
|
|
23
25
|
series: ChartSeries[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type SparklineVariant = 'line' | 'area';
|
|
2
|
+
export type SparklineTrend = 'up' | 'down' | 'neutral';
|
|
3
|
+
export interface SparklineProps extends React.HTMLAttributes<SVGSVGElement> {
|
|
4
|
+
data: number[];
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
variant?: SparklineVariant;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Show a dot at the last data point */
|
|
11
|
+
endDot?: boolean;
|
|
12
|
+
/** Animate the line drawing in (and area fading in) on mount. Off by default. */
|
|
13
|
+
animate?: boolean;
|
|
14
|
+
/** Accessible label for screen readers */
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Sparkline: import('react').ForwardRefExoticComponent<SparklineProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sparkline';
|
|
@@ -2,6 +2,8 @@ export * from './useAnchoredPosition';
|
|
|
2
2
|
export * from './useComposedRefs';
|
|
3
3
|
export * from './useControllableState';
|
|
4
4
|
export * from './useDisclosure';
|
|
5
|
+
export * from './useExitAnimation';
|
|
5
6
|
export * from './useFocusTrap';
|
|
6
7
|
export * from './useListNavigation';
|
|
7
8
|
export * from './useOutsideInteraction';
|
|
9
|
+
export * from './usePresence';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface UseExitAnimationOptions {
|
|
2
|
+
/** Called once the exit animation has finished (or immediately if reduced motion). */
|
|
3
|
+
onExited?: () => void;
|
|
4
|
+
/** Exit animation duration in ms. Should match the CSS animation duration. Defaults to 220. */
|
|
5
|
+
duration?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseExitAnimation {
|
|
8
|
+
/** True while the exit animation is playing — apply your `--exiting` class. */
|
|
9
|
+
isExiting: boolean;
|
|
10
|
+
/** Trigger the exit: plays the animation, then calls `onExited`. */
|
|
11
|
+
startExit: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Plays an exit animation before signalling removal. Apply `isExiting` to a CSS
|
|
15
|
+
* class that runs the exit keyframes; `onExited` fires after `duration`. When the
|
|
16
|
+
* user prefers reduced motion, `onExited` fires immediately with no animation.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useExitAnimation({ onExited, duration, }?: UseExitAnimationOptions): UseExitAnimation;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface UsePresence {
|
|
2
|
+
/** Whether the element should be rendered (true while open and while exiting). */
|
|
3
|
+
isMounted: boolean;
|
|
4
|
+
/** True while the exit animation is playing — apply your `--exiting` class. */
|
|
5
|
+
isExiting: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Keeps a conditionally-rendered element mounted long enough to play an exit
|
|
9
|
+
* animation. Drive it with the `present` prop (e.g. a Modal's `open`): when it
|
|
10
|
+
* flips to false, the element stays mounted with `isExiting` true for `duration`
|
|
11
|
+
* ms, then unmounts. Reduced motion unmounts immediately.
|
|
12
|
+
*/
|
|
13
|
+
export declare function usePresence(present: boolean, duration?: number): UsePresence;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './a11y';
|
|
2
|
+
export * from './components/Accordion';
|
|
2
3
|
export * from './components/Alert';
|
|
3
4
|
export * from './components/Avatar';
|
|
4
5
|
export * from './components/Button';
|
|
@@ -21,6 +22,8 @@ export * from './components/FileUploader';
|
|
|
21
22
|
export * from './components/HeaderNavigation';
|
|
22
23
|
export * from './components/Icon';
|
|
23
24
|
export * from './components/InlineCTA';
|
|
25
|
+
export * from './components/GaugeChart';
|
|
26
|
+
export * from './components/Heatmap';
|
|
24
27
|
export * from './components/LineBarCharts';
|
|
25
28
|
export * from './components/LoadingIndicators';
|
|
26
29
|
export * from './components/Metrics';
|
|
@@ -40,6 +43,7 @@ export * from './components/RichTextEditor';
|
|
|
40
43
|
export * from './components/SectionFooter';
|
|
41
44
|
export * from './components/SectionHeader';
|
|
42
45
|
export * from './components/SidebarNavigation';
|
|
46
|
+
export * from './components/Sparkline';
|
|
43
47
|
export * from './components/SlideoutMenu';
|
|
44
48
|
export * from './components/Switch';
|
|
45
49
|
export * from './components/Select';
|