@pitchfork-ui/react 0.1.9 → 0.2.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/Alert/Alert.css +83 -0
- package/dist/{index8.js → components/Alert/Alert2.js} +3 -3
- 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 +122 -0
- package/dist/{index42.js → components/Carousel/Carousel2.js} +3 -3
- 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 +132 -0
- package/dist/{index38.js → components/Dropdown/Dropdown2.js} +8 -8
- 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 +46 -0
- package/dist/components/GaugeChart/GaugeChart2.js +73 -0
- package/dist/components/HeaderNavigation/HeaderNavigation.css +87 -0
- package/dist/{index56.js → components/HeaderNavigation/HeaderNavigation2.js} +2 -2
- package/dist/components/Icon/Icon.css +6 -0
- package/dist/{index6.js → components/Icon/Icon2.js} +2 -2
- package/dist/components/InlineCTA/InlineCTA.css +86 -0
- package/dist/{index58.js → components/InlineCTA/InlineCTA2.js} +3 -3
- 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 +136 -0
- package/dist/{index66.js → components/Modal/Modal2.js} +4 -4
- package/dist/components/MultiSelect/MultiSelect.css +157 -0
- package/dist/{index68.js → components/MultiSelect/MultiSelect2.js} +11 -11
- package/dist/components/Notification/Notification.css +187 -0
- package/dist/{index70.js → components/Notification/Notification2.js} +3 -3
- 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 +81 -0
- package/dist/{index76.js → components/PieChart/PieChart2.js} +2 -2
- package/dist/components/ProgressIndicators/ProgressIndicators.css +77 -0
- package/dist/{index78.js → components/ProgressIndicators/ProgressIndicators2.js} +2 -2
- package/dist/components/ProgressSteps/ProgressSteps.css +158 -0
- package/dist/{index80.js → components/ProgressSteps/ProgressSteps2.js} +2 -2
- package/dist/components/RadarChart/RadarChart.css +97 -0
- package/dist/{index82.js → components/RadarChart/RadarChart2.js} +2 -2
- 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 +137 -0
- package/dist/{index102.js → components/Select/Select2.js} +11 -11
- 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 +17 -0
- package/dist/components/Sparkline/Sparkline2.js +99 -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 +112 -0
- package/dist/{index110.js → components/Tabs/Tabs2.js} +2 -2
- 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 +26 -0
- package/dist/{index114.js → components/Tooltip/Tooltip2.js} +2 -2
- 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/{index34.js → hooks/useFocusTrap.js} +1 -1
- package/dist/index.cjs +380 -4450
- package/dist/index.js +65 -63
- 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/LineBarCharts/LineBarChart.d.ts +2 -0
- package/dist/src/components/Sparkline/Sparkline.d.ts +15 -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/index.d.ts +2 -0
- package/dist/styles/theme.css +779 -0
- package/dist/styles.css +124 -5
- package/dist/{index19.js → utils/FieldWrapper.js} +1 -1
- package/package.json +8 -4
- package/theme.starter.css +57 -0
- 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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './GaugeChart.css';/* empty css */
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/GaugeChart/GaugeChart.tsx
|
|
6
|
+
var GaugeChart = forwardRef(function GaugeChart({ className, value, max = 100, centerLabel, subLabel, size = 200, strokeWidth = 16, color, style, ...props }, ref) {
|
|
7
|
+
const progress = max > 0 ? Math.min(Math.max(value, 0), max) / max : 0;
|
|
8
|
+
const radius = (size - strokeWidth) / 2;
|
|
9
|
+
const circumference = 2 * Math.PI * radius;
|
|
10
|
+
const filled = progress * circumference;
|
|
11
|
+
const gap = circumference - filled;
|
|
12
|
+
const center = size / 2;
|
|
13
|
+
const pct = Math.round(progress * 100);
|
|
14
|
+
const defaultLabel = `${pct}%`;
|
|
15
|
+
const colorVar = color ?? "var(--pf-gauge-color)";
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
ref,
|
|
18
|
+
className: cx("pf-gauge", className),
|
|
19
|
+
style: {
|
|
20
|
+
width: size,
|
|
21
|
+
height: size,
|
|
22
|
+
...style
|
|
23
|
+
},
|
|
24
|
+
role: "meter",
|
|
25
|
+
"aria-valuenow": value,
|
|
26
|
+
"aria-valuemin": 0,
|
|
27
|
+
"aria-valuemax": max,
|
|
28
|
+
"aria-label": `${pct}%`,
|
|
29
|
+
...props,
|
|
30
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
31
|
+
width: size,
|
|
32
|
+
height: size,
|
|
33
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: "pf-gauge__svg",
|
|
36
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
37
|
+
cx: center,
|
|
38
|
+
cy: center,
|
|
39
|
+
r: radius,
|
|
40
|
+
fill: "none",
|
|
41
|
+
strokeWidth,
|
|
42
|
+
className: "pf-gauge__track"
|
|
43
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
44
|
+
cx: center,
|
|
45
|
+
cy: center,
|
|
46
|
+
r: radius,
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: colorVar,
|
|
49
|
+
strokeWidth,
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeDasharray: `${filled} ${gap}`,
|
|
52
|
+
style: {
|
|
53
|
+
transform: "rotate(-90deg)",
|
|
54
|
+
transformOrigin: `${center}px ${center}px`
|
|
55
|
+
},
|
|
56
|
+
className: "pf-gauge__fill"
|
|
57
|
+
})]
|
|
58
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: "pf-gauge__center",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "pf-gauge__label",
|
|
63
|
+
children: centerLabel ?? defaultLabel
|
|
64
|
+
}), subLabel ? /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: "pf-gauge__sub-label",
|
|
66
|
+
children: subLabel
|
|
67
|
+
}) : null]
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
GaugeChart.displayName = "GaugeChart";
|
|
72
|
+
//#endregion
|
|
73
|
+
export { GaugeChart };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
.pf-header-navigation {
|
|
2
|
+
background: var(--pf-header-nav-bg);
|
|
3
|
+
border: 1px solid var(--pf-header-nav-border);
|
|
4
|
+
border-radius: var(--radius-md);
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pf-header-navigation__nav {
|
|
9
|
+
align-items: center;
|
|
10
|
+
display: grid;
|
|
11
|
+
gap: var(--space-3);
|
|
12
|
+
grid-template-columns: 1fr;
|
|
13
|
+
min-height: 56px;
|
|
14
|
+
padding: var(--space-3);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media (min-width: 768px) {
|
|
18
|
+
.pf-header-navigation__nav {
|
|
19
|
+
grid-template-columns: auto 1fr auto;
|
|
20
|
+
padding: 0 var(--space-4);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.pf-header-navigation__brand {
|
|
25
|
+
color: var(--pf-header-nav-text);
|
|
26
|
+
font-size: var(--font-size-md);
|
|
27
|
+
font-weight: var(--font-weight-semibold);
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pf-header-navigation__list {
|
|
32
|
+
align-items: center;
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: var(--space-1);
|
|
35
|
+
list-style: none;
|
|
36
|
+
margin: 0;
|
|
37
|
+
overflow-x: auto;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pf-header-navigation__item {
|
|
42
|
+
flex: 0 0 auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pf-header-navigation__link {
|
|
46
|
+
align-items: center;
|
|
47
|
+
background: transparent;
|
|
48
|
+
border: 0;
|
|
49
|
+
border-radius: var(--radius-sm);
|
|
50
|
+
color: var(--pf-header-nav-text-muted);
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
font: inherit;
|
|
54
|
+
min-height: 32px;
|
|
55
|
+
padding: 0 var(--space-2);
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pf-header-navigation__link:hover {
|
|
61
|
+
background: var(--pf-header-nav-bg-subtle);
|
|
62
|
+
color: var(--pf-header-nav-text);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.pf-header-navigation__link:focus-visible {
|
|
66
|
+
box-shadow: var(--pf-headernavigation-focus-ring, var(--pf-focus-ring));
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pf-header-navigation__link--active {
|
|
71
|
+
background: var(--pf-header-nav-bg-subtle);
|
|
72
|
+
color: var(--pf-header-nav-text);
|
|
73
|
+
font-weight: var(--font-weight-semibold);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.pf-header-navigation__actions {
|
|
77
|
+
align-items: center;
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
gap: var(--space-2);
|
|
80
|
+
justify-content: flex-start;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (min-width: 768px) {
|
|
84
|
+
.pf-header-navigation__actions {
|
|
85
|
+
justify-content: initial;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './HeaderNavigation.css';/* empty css */
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/HeaderNavigation/HeaderNavigation.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './Icon.css';/* empty css */
|
|
3
3
|
import { faBarChart, faCalendar, faCircleCheck, faCircleQuestion, faCircleXmark, faCopy, faCreditCard, faSquareCaretLeft, faSquareCaretRight, faSquareCheck, faStar, faUser } from "@fortawesome/free-regular-svg-icons";
|
|
4
4
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.pf-inline-cta {
|
|
2
|
+
align-items: start;
|
|
3
|
+
background: var(--pf-inline-cta-bg);
|
|
4
|
+
border: 1px solid var(--pf-inline-cta-border);
|
|
5
|
+
border-radius: var(--radius-md);
|
|
6
|
+
display: grid;
|
|
7
|
+
gap: var(--space-3);
|
|
8
|
+
grid-template-columns: auto 1fr;
|
|
9
|
+
padding: var(--space-3);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (min-width: 768px) {
|
|
13
|
+
.pf-inline-cta {
|
|
14
|
+
align-items: center;
|
|
15
|
+
grid-template-columns: auto 1fr auto;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pf-inline-cta__icon {
|
|
20
|
+
align-items: center;
|
|
21
|
+
color: var(--pf-inline-cta-text-muted);
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
font-size: var(--font-size-md);
|
|
24
|
+
justify-content: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pf-inline-cta__content {
|
|
28
|
+
display: grid;
|
|
29
|
+
gap: 2px;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pf-inline-cta__heading {
|
|
34
|
+
color: var(--pf-inline-cta-text);
|
|
35
|
+
font-size: var(--font-size-sm);
|
|
36
|
+
font-weight: var(--font-weight-semibold);
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pf-inline-cta__description {
|
|
41
|
+
color: var(--pf-inline-cta-text-muted);
|
|
42
|
+
font-size: var(--font-size-sm);
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pf-inline-cta__action {
|
|
47
|
+
align-items: center;
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
gap: var(--space-2);
|
|
50
|
+
grid-column: 1 / -1;
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (min-width: 768px) {
|
|
55
|
+
.pf-inline-cta__action {
|
|
56
|
+
grid-column: auto;
|
|
57
|
+
justify-content: initial;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pf-inline-cta--info {
|
|
62
|
+
background: color-mix(in srgb, var(--pf-inline-cta-info-bg) 70%, var(--color-base-white));
|
|
63
|
+
border-color: var(--pf-inline-cta-info-border);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pf-inline-cta--info .pf-inline-cta__icon {
|
|
67
|
+
color: var(--pf-inline-cta-info-icon);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pf-inline-cta--info .pf-inline-cta__heading {
|
|
71
|
+
color: var(--pf-inline-cta-info-heading);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pf-inline-cta--info .pf-inline-cta__description {
|
|
75
|
+
color: var(--pf-inline-cta-info-description);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pf-inline-cta--success {
|
|
79
|
+
background: color-mix(in srgb, var(--pf-inline-cta-success-bg) 55%, var(--color-base-white));
|
|
80
|
+
border-color: var(--pf-inline-cta-success-border);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pf-inline-cta--warning {
|
|
84
|
+
background: color-mix(in srgb, var(--pf-inline-cta-warning-bg) 60%, var(--color-base-white));
|
|
85
|
+
border-color: var(--pf-inline-cta-warning-border);
|
|
86
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { Icon } from "
|
|
3
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import { Icon } from "../Icon/Icon2.js";
|
|
3
|
+
import './InlineCTA.css';/* empty css */
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/InlineCTA/InlineCTA.tsx
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.pf-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--space-2);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pf-field__label {
|
|
7
|
+
color: var(--pf-input-field-label, var(--pf-field-label));
|
|
8
|
+
font-size: var(--font-size-sm);
|
|
9
|
+
font-weight: var(--font-weight-medium);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pf-field__required {
|
|
13
|
+
color: var(--pf-field-required);
|
|
14
|
+
margin-inline-start: var(--space-1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pf-field__description {
|
|
18
|
+
color: var(--pf-input-field-description, var(--pf-field-description));
|
|
19
|
+
font-size: var(--font-size-sm);
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pf-field__error {
|
|
24
|
+
color: var(--pf-input-field-error, var(--pf-field-error));
|
|
25
|
+
font-size: var(--font-size-sm);
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pf-input {
|
|
30
|
+
background: var(--pf-input-bg);
|
|
31
|
+
border: 1px solid var(--pf-input-border);
|
|
32
|
+
border-radius: var(--radius-md);
|
|
33
|
+
color: var(--pf-input-text);
|
|
34
|
+
font: inherit;
|
|
35
|
+
min-height: 40px;
|
|
36
|
+
padding: 0 var(--space-3);
|
|
37
|
+
width: 100%;
|
|
38
|
+
transition:
|
|
39
|
+
background 0.2s,
|
|
40
|
+
border 0.2s,
|
|
41
|
+
color 0.2s,
|
|
42
|
+
opacity 0.2s;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pf-input:disabled,
|
|
46
|
+
.pf-input[aria-disabled='true'] {
|
|
47
|
+
background: var(--pf-control-bg-disabled);
|
|
48
|
+
border-color: var(--pf-control-border-disabled);
|
|
49
|
+
color: var(--pf-control-text-disabled);
|
|
50
|
+
cursor: not-allowed;
|
|
51
|
+
opacity: 0.6;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pf-input:focus {
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pf-input:focus-visible {
|
|
59
|
+
border-color: var(--pf-input-focus-border);
|
|
60
|
+
box-shadow: var(--pf-input-focus-ring, var(--pf-focus-ring));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pf-input::placeholder {
|
|
64
|
+
color: var(--pf-input-placeholder);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pf-input--invalid {
|
|
68
|
+
border-color: var(--pf-input-invalid-border);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (prefers-reduced-motion: reduce) {
|
|
72
|
+
.pf-input {
|
|
73
|
+
transition: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { FieldWrapper } from "
|
|
3
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import { FieldWrapper } from "../../utils/FieldWrapper.js";
|
|
3
|
+
import './Input.css';/* empty css */
|
|
4
4
|
import { forwardRef, useId } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Input/Input.tsx
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* ─── Chart color palette ─────────────────────────────────────────────── */
|
|
2
|
+
:root {
|
|
3
|
+
--pf-chart-color-1: var(--color-brand-600);
|
|
4
|
+
--pf-chart-color-2: var(--color-brand-400);
|
|
5
|
+
--pf-chart-color-3: var(--color-gray-500);
|
|
6
|
+
--pf-chart-color-4: var(--color-gray-400);
|
|
7
|
+
--pf-chart-color-5: #0ea5e9;
|
|
8
|
+
--pf-chart-color-6: #22c55e;
|
|
9
|
+
--pf-chart-grid: var(--color-semantic-border-default);
|
|
10
|
+
--pf-chart-text-muted: var(--color-semantic-text-muted);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-theme='dark'] {
|
|
14
|
+
--pf-chart-color-1: var(--color-brand-400);
|
|
15
|
+
--pf-chart-color-2: var(--color-brand-300);
|
|
16
|
+
--pf-chart-color-3: var(--color-gray-400);
|
|
17
|
+
--pf-chart-color-4: var(--color-gray-500);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ─── Container ──────────────────────────────────────────────────────── */
|
|
21
|
+
.pf-chart {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: var(--space-3);
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pf-chart__svg {
|
|
29
|
+
display: block;
|
|
30
|
+
height: auto;
|
|
31
|
+
overflow: visible;
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pf-chart__empty {
|
|
36
|
+
align-items: center;
|
|
37
|
+
color: var(--pf-chart-text-muted);
|
|
38
|
+
display: flex;
|
|
39
|
+
font-size: var(--font-size-sm);
|
|
40
|
+
height: 120px;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ─── Grid & axes ────────────────────────────────────────────────────── */
|
|
45
|
+
.pf-chart__grid {
|
|
46
|
+
stroke: var(--pf-chart-grid);
|
|
47
|
+
stroke-width: 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pf-chart__tick {
|
|
51
|
+
fill: var(--pf-chart-text-muted);
|
|
52
|
+
font-family: inherit;
|
|
53
|
+
font-size: var(--font-size-2xs);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pf-chart__tick--y {
|
|
57
|
+
dominant-baseline: middle;
|
|
58
|
+
text-anchor: end;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pf-chart__tick--x {
|
|
62
|
+
dominant-baseline: hanging;
|
|
63
|
+
text-anchor: middle;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pf-chart__axis-label {
|
|
67
|
+
fill: var(--pf-chart-text-muted);
|
|
68
|
+
font-family: inherit;
|
|
69
|
+
font-size: var(--font-size-2xs);
|
|
70
|
+
text-anchor: middle;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ─── Line dots ──────────────────────────────────────────────────────── */
|
|
74
|
+
.pf-chart__dot {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transition: opacity 80ms ease;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pf-chart__svg:hover .pf-chart__dot {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ─── Bars ───────────────────────────────────────────────────────────── */
|
|
84
|
+
.pf-chart__bar {
|
|
85
|
+
transition: opacity 80ms ease;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pf-chart__bar:hover {
|
|
89
|
+
opacity: 0.75;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ─── Legend ─────────────────────────────────────────────────────────── */
|
|
93
|
+
.pf-chart-legend {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-wrap: wrap;
|
|
96
|
+
gap: var(--space-2) var(--space-4);
|
|
97
|
+
list-style: none;
|
|
98
|
+
margin: 0;
|
|
99
|
+
padding: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.pf-chart-legend__item {
|
|
103
|
+
align-items: center;
|
|
104
|
+
color: var(--pf-chart-text-muted);
|
|
105
|
+
display: flex;
|
|
106
|
+
font-size: var(--font-size-sm);
|
|
107
|
+
gap: var(--space-2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.pf-chart-legend__swatch {
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
height: 8px;
|
|
114
|
+
width: 8px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media (prefers-reduced-motion: reduce) {
|
|
118
|
+
.pf-chart__dot,
|
|
119
|
+
.pf-chart__bar {
|
|
120
|
+
transition: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './LineBarChart.css';/* empty css */
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/LineBarCharts/LineBarChart.tsx
|
|
@@ -195,6 +195,14 @@ var LineChart = forwardRef(function LineChart({ className, data, series, yAxisLa
|
|
|
195
195
|
});
|
|
196
196
|
});
|
|
197
197
|
LineChart.displayName = "LineChart";
|
|
198
|
+
var AreaChart = forwardRef(function AreaChart(props, ref) {
|
|
199
|
+
return /* @__PURE__ */ jsx(LineChart, {
|
|
200
|
+
...props,
|
|
201
|
+
area: true,
|
|
202
|
+
ref
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
AreaChart.displayName = "AreaChart";
|
|
198
206
|
var BarChart = forwardRef(function BarChart({ className, data, series, yAxisLabel, showLegend = true, stacked = false, valueFormatter, ...props }, ref) {
|
|
199
207
|
if (!data.length || !series.length) return /* @__PURE__ */ jsx("div", {
|
|
200
208
|
ref,
|
|
@@ -261,4 +269,4 @@ var BarChart = forwardRef(function BarChart({ className, data, series, yAxisLabe
|
|
|
261
269
|
});
|
|
262
270
|
BarChart.displayName = "BarChart";
|
|
263
271
|
//#endregion
|
|
264
|
-
export { BarChart, LineChart };
|
|
272
|
+
export { AreaChart, BarChart, LineChart };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
@keyframes pf-spin {
|
|
2
|
+
to {
|
|
3
|
+
transform: rotate(360deg);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes pf-pulse-dots {
|
|
8
|
+
0%,
|
|
9
|
+
80%,
|
|
10
|
+
100% {
|
|
11
|
+
opacity: 0.35;
|
|
12
|
+
transform: scale(0.9);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
40% {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
transform: scale(1);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes pf-skeleton-shimmer {
|
|
22
|
+
0% {
|
|
23
|
+
background-position: 200% 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
100% {
|
|
27
|
+
background-position: -200% 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pf-loading-spinner {
|
|
32
|
+
animation: pf-spin 0.8s linear infinite;
|
|
33
|
+
border: 3px solid color-mix(in srgb, var(--pf-loading-border) 75%, transparent);
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
border-top-color: var(--pf-loading-accent);
|
|
36
|
+
display: inline-block;
|
|
37
|
+
flex: 0 0 auto;
|
|
38
|
+
height: var(--pf-spinner-size, 24px);
|
|
39
|
+
min-height: 12px;
|
|
40
|
+
min-width: 12px;
|
|
41
|
+
width: var(--pf-spinner-size, 24px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pf-loading-dots {
|
|
45
|
+
align-items: center;
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
gap: var(--space-2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pf-loading-dots__dot {
|
|
51
|
+
animation: pf-pulse-dots 1s ease-in-out infinite;
|
|
52
|
+
background: var(--pf-loading-accent);
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
display: inline-block;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pf-loading-dots__dot:nth-child(2) {
|
|
58
|
+
animation-delay: 0.16s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pf-loading-dots__dot:nth-child(3) {
|
|
62
|
+
animation-delay: 0.32s;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.pf-loading-dots--sm .pf-loading-dots__dot {
|
|
66
|
+
height: 6px;
|
|
67
|
+
width: 6px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pf-loading-dots--md .pf-loading-dots__dot {
|
|
71
|
+
height: 8px;
|
|
72
|
+
width: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pf-loading-dots--lg .pf-loading-dots__dot {
|
|
76
|
+
height: 10px;
|
|
77
|
+
width: 10px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.pf-loading-skeleton {
|
|
81
|
+
animation: pf-skeleton-shimmer 1.4s linear infinite;
|
|
82
|
+
height: var(--pf-skeleton-height, 16px);
|
|
83
|
+
width: var(--pf-skeleton-width, 100%);
|
|
84
|
+
background: linear-gradient(
|
|
85
|
+
90deg,
|
|
86
|
+
color-mix(in srgb, var(--pf-loading-bg-subtle) 92%, var(--color-base-white) 8%) 25%,
|
|
87
|
+
color-mix(in srgb, var(--pf-loading-border) 72%, var(--color-base-white) 28%) 37%,
|
|
88
|
+
color-mix(in srgb, var(--pf-loading-bg-subtle) 92%, var(--color-base-white) 8%) 63%
|
|
89
|
+
);
|
|
90
|
+
background-size: 200% 100%;
|
|
91
|
+
border-radius: var(--radius-sm);
|
|
92
|
+
display: inline-block;
|
|
93
|
+
max-width: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pf-loading-skeleton--rounded {
|
|
97
|
+
border-radius: var(--radius-full);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (prefers-reduced-motion: reduce) {
|
|
101
|
+
.pf-loading-spinner,
|
|
102
|
+
.pf-loading-dots__dot,
|
|
103
|
+
.pf-loading-skeleton {
|
|
104
|
+
animation-duration: 0.01ms;
|
|
105
|
+
animation-iteration-count: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './LoadingIndicators.css';/* empty css */
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/LoadingIndicators/LoadingIndicators.tsx
|