@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,139 @@
|
|
|
1
|
+
/* Ensure Storybook CSS variable controls always apply to the card */
|
|
2
|
+
/* Ensure Storybook CSS variable controls always apply to the card */
|
|
3
|
+
.css-var-scope .pf-credit-card {
|
|
4
|
+
color: var(--pf-credit-card-text-color, var(--color-base-white));
|
|
5
|
+
}
|
|
6
|
+
/* ...existing code... */
|
|
7
|
+
.pf-credit-card {
|
|
8
|
+
--pf-credit-card-border: color-mix(in srgb, var(--color-base-white) 25%, transparent);
|
|
9
|
+
--pf-credit-card-glare: color-mix(in srgb, var(--color-base-white) 22%, transparent);
|
|
10
|
+
--pf-credit-card-generic-gradient: linear-gradient(
|
|
11
|
+
135deg,
|
|
12
|
+
var(--color-gray-800),
|
|
13
|
+
var(--color-gray-900) 55%,
|
|
14
|
+
var(--color-gray-700)
|
|
15
|
+
);
|
|
16
|
+
--pf-credit-card-visa-gradient: linear-gradient(
|
|
17
|
+
135deg,
|
|
18
|
+
var(--color-brand-700),
|
|
19
|
+
var(--color-brand-900) 55%,
|
|
20
|
+
var(--color-brand-700)
|
|
21
|
+
);
|
|
22
|
+
--pf-credit-card-mastercard-gradient: linear-gradient(
|
|
23
|
+
135deg,
|
|
24
|
+
var(--color-warning-600),
|
|
25
|
+
var(--color-warning-800) 55%,
|
|
26
|
+
var(--color-danger-500)
|
|
27
|
+
);
|
|
28
|
+
--pf-credit-card-amex-gradient: linear-gradient(
|
|
29
|
+
135deg,
|
|
30
|
+
var(--color-success-700),
|
|
31
|
+
var(--color-success-800) 55%,
|
|
32
|
+
var(--color-gray-800)
|
|
33
|
+
);
|
|
34
|
+
--pf-credit-card-chip-gradient: linear-gradient(
|
|
35
|
+
135deg,
|
|
36
|
+
var(--color-gray-50),
|
|
37
|
+
var(--color-gray-300)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
border: 1px solid var(--pf-credit-card-border);
|
|
41
|
+
border-radius: var(--radius-lg);
|
|
42
|
+
box-shadow: var(--shadow-md);
|
|
43
|
+
color: var(--pf-credit-card-text-color, var(--color-base-white));
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: var(--space-4);
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
width: 340px;
|
|
49
|
+
aspect-ratio: 1.586;
|
|
50
|
+
min-height: 200px;
|
|
51
|
+
padding: var(--space-4);
|
|
52
|
+
position: relative;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pf-credit-card::before {
|
|
56
|
+
background: radial-gradient(circle at 20% 20%, var(--pf-credit-card-glare), transparent 40%);
|
|
57
|
+
border-radius: inherit;
|
|
58
|
+
content: '';
|
|
59
|
+
inset: 0;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
position: absolute;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pf-credit-card.is-generic {
|
|
65
|
+
background: var(--pf-credit-card-generic-gradient);
|
|
66
|
+
}
|
|
67
|
+
.pf-credit-card.is-visa {
|
|
68
|
+
background: var(--pf-credit-card-visa-gradient);
|
|
69
|
+
}
|
|
70
|
+
.pf-credit-card.is-mastercard {
|
|
71
|
+
background: var(--pf-credit-card-mastercard-gradient);
|
|
72
|
+
}
|
|
73
|
+
.pf-credit-card.is-amex {
|
|
74
|
+
background: var(--pf-credit-card-amex-gradient);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.pf-credit-card .top-row {
|
|
78
|
+
align-items: center;
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pf-credit-card .chip {
|
|
86
|
+
background: var(--pf-credit-card-chip-gradient);
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
height: 28px;
|
|
90
|
+
width: 38px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pf-credit-card .brand,
|
|
94
|
+
.pf-credit-card .number,
|
|
95
|
+
.pf-credit-card .label,
|
|
96
|
+
.pf-credit-card .value {
|
|
97
|
+
color: inherit;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pf-credit-card .brand {
|
|
101
|
+
font-size: var(--font-size-xs);
|
|
102
|
+
font-weight: var(--font-weight-semibold);
|
|
103
|
+
letter-spacing: 0.08em;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.pf-credit-card .number {
|
|
107
|
+
font-size: clamp(var(--font-size-lg), 2.6vw, var(--font-size-2xl));
|
|
108
|
+
font-weight: var(--font-weight-semibold);
|
|
109
|
+
letter-spacing: 0.08em;
|
|
110
|
+
line-height: 1.25;
|
|
111
|
+
margin: 0;
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.pf-credit-card .meta {
|
|
117
|
+
display: flex;
|
|
118
|
+
gap: var(--space-4);
|
|
119
|
+
position: relative;
|
|
120
|
+
z-index: 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.pf-credit-card .meta > div {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: var(--space-1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.pf-credit-card .label {
|
|
130
|
+
font-size: var(--font-size-2xs);
|
|
131
|
+
letter-spacing: 0.08em;
|
|
132
|
+
opacity: 0.85;
|
|
133
|
+
text-transform: uppercase;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.pf-credit-card .value {
|
|
137
|
+
font-size: var(--font-size-sm);
|
|
138
|
+
font-weight: var(--font-weight-medium);
|
|
139
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import './CreditCard.css';/* empty css */
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/CreditCard/CreditCard.tsx
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.pf-date-picker {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pf-date-picker__trigger {
|
|
6
|
+
align-items: center;
|
|
7
|
+
background: var(--pf-datepicker-bg);
|
|
8
|
+
border: 1px solid var(--pf-datepicker-border);
|
|
9
|
+
border-radius: var(--radius-md);
|
|
10
|
+
color: var(--pf-datepicker-text);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
flex: 1;
|
|
14
|
+
font-size: var(--font-size-sm);
|
|
15
|
+
gap: var(--space-2);
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
min-height: 40px;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
padding: 0 var(--space-3);
|
|
20
|
+
text-align: left;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pf-date-picker__trigger:hover:not(:disabled) {
|
|
24
|
+
border-color: var(--pf-datepicker-border-strong);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pf-date-picker__trigger:focus-visible {
|
|
28
|
+
box-shadow: var(--pf-datepicker-focus-ring, var(--pf-focus-ring));
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.pf-date-picker__trigger:disabled {
|
|
33
|
+
background: var(--pf-datepicker-bg-subtle);
|
|
34
|
+
color: var(--pf-datepicker-text-muted);
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pf-date-picker__trigger--invalid {
|
|
39
|
+
border-color: var(--pf-datepicker-invalid-border);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pf-date-picker__value {
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pf-date-picker__value--placeholder {
|
|
49
|
+
color: var(--pf-datepicker-text-muted);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pf-date-picker__control-row {
|
|
53
|
+
align-items: center;
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: var(--space-1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pf-date-picker__icon-button {
|
|
59
|
+
align-items: center;
|
|
60
|
+
background: transparent;
|
|
61
|
+
border: 0;
|
|
62
|
+
border-radius: var(--radius-sm);
|
|
63
|
+
color: var(--pf-datepicker-text-muted);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
height: 28px;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
width: 28px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pf-date-picker__icon-button:focus-visible,
|
|
73
|
+
.pf-date-picker__icon-button:hover {
|
|
74
|
+
background: var(--pf-datepicker-bg-subtle);
|
|
75
|
+
color: var(--pf-datepicker-text);
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pf-date-picker__icon-button:disabled {
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
opacity: 0.45;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.pf-date-picker__popover {
|
|
85
|
+
position: fixed;
|
|
86
|
+
z-index: 999;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.pf-date-picker__popover .pf-field {
|
|
90
|
+
margin: 0;
|
|
91
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Keys, composeDescribedBy } from "
|
|
2
|
-
import { cx } from "
|
|
3
|
-
import { Icon } from "
|
|
4
|
-
import { FieldWrapper } from "
|
|
5
|
-
import { useAnchoredPosition } from "
|
|
6
|
-
import { useDisclosure } from "
|
|
7
|
-
import { useOutsideInteraction } from "
|
|
8
|
-
import { Calendar } from "
|
|
9
|
-
|
|
1
|
+
import { Keys, composeDescribedBy } from "../../a11y/index.js";
|
|
2
|
+
import { cx } from "../../utils/cx.js";
|
|
3
|
+
import { Icon } from "../Icon/Icon2.js";
|
|
4
|
+
import { FieldWrapper } from "../../utils/FieldWrapper.js";
|
|
5
|
+
import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
|
|
6
|
+
import { useDisclosure } from "../../hooks/useDisclosure.js";
|
|
7
|
+
import { useOutsideInteraction } from "../../hooks/useOutsideInteraction.js";
|
|
8
|
+
import { Calendar } from "../Calendar/Calendar2.js";
|
|
9
|
+
import './DatePicker.css';/* empty css */
|
|
10
10
|
import { forwardRef, useId, useMemo, useRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { createPortal } from "react-dom";
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
.pf-dropdown {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pf-dropdown__trigger {
|
|
6
|
+
align-items: center;
|
|
7
|
+
background: var(--pf-dropdown-button-secondary-bg, var(--pf-button-secondary-bg));
|
|
8
|
+
border: 1px solid var(--pf-dropdown-button-secondary-border, var(--pf-button-secondary-border));
|
|
9
|
+
border-radius: var(--radius-md);
|
|
10
|
+
color: var(--pf-dropdown-button-secondary-text, var(--pf-button-secondary-text));
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
gap: var(--space-2);
|
|
14
|
+
min-height: 36px;
|
|
15
|
+
padding: 0 var(--space-3);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pf-dropdown__trigger:hover:not(:disabled) {
|
|
19
|
+
background: var(--pf-dropdown-button-secondary-bg-hover, var(--pf-button-secondary-bg-hover));
|
|
20
|
+
border-color: var(
|
|
21
|
+
--pf-dropdown-button-secondary-border-hover,
|
|
22
|
+
var(--pf-button-secondary-border-hover)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pf-dropdown__trigger:focus-visible {
|
|
27
|
+
box-shadow: var(--pf-dropdown-focus-ring, var(--pf-focus-ring));
|
|
28
|
+
outline: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pf-dropdown__trigger:disabled,
|
|
32
|
+
.pf-dropdown__trigger[aria-disabled='true'] {
|
|
33
|
+
background: var(--pf-dropdown-button-secondary-bg-disabled, #f5f5f5);
|
|
34
|
+
border-color: var(--pf-dropdown-button-secondary-border-disabled, #e0e0e0);
|
|
35
|
+
color: var(--pf-dropdown-button-secondary-text-disabled, #b0b0b0);
|
|
36
|
+
cursor: not-allowed;
|
|
37
|
+
opacity: 0.6;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pf-dropdown__chevron {
|
|
41
|
+
color: var(--pf-dropdown-text-muted);
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
height: var(--pf-dropdown-icon-size);
|
|
44
|
+
transition: transform 140ms ease;
|
|
45
|
+
width: var(--pf-dropdown-icon-size);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pf-dropdown__chevron svg {
|
|
49
|
+
height: var(--pf-dropdown-icon-size);
|
|
50
|
+
width: var(--pf-dropdown-icon-size);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pf-dropdown__chevron--open {
|
|
54
|
+
transform: rotate(180deg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pf-dropdown__menu {
|
|
58
|
+
background: var(--pf-dropdown-surface-bg, var(--pf-surface-bg));
|
|
59
|
+
border: 1px solid var(--pf-dropdown-surface-border, var(--pf-surface-border));
|
|
60
|
+
border-radius: var(--radius-md);
|
|
61
|
+
box-shadow: var(--shadow-md);
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: var(--pf-dropdown-menu-gap);
|
|
65
|
+
padding: var(--space-1);
|
|
66
|
+
position: fixed;
|
|
67
|
+
z-index: 1000;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pf-dropdown__item {
|
|
71
|
+
align-items: center;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: 0;
|
|
74
|
+
border-radius: var(--radius-sm);
|
|
75
|
+
color: var(--pf-dropdown-text);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
font: inherit;
|
|
79
|
+
justify-content: space-between;
|
|
80
|
+
min-height: 34px;
|
|
81
|
+
padding: 0 var(--space-2);
|
|
82
|
+
text-align: left;
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.pf-dropdown__item-left {
|
|
87
|
+
align-items: center;
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
gap: var(--space-2);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pf-dropdown__item-icon {
|
|
93
|
+
color: var(--pf-dropdown-text-muted);
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
height: var(--pf-dropdown-icon-size);
|
|
96
|
+
width: var(--pf-dropdown-icon-size);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.pf-dropdown__item-icon svg {
|
|
100
|
+
height: var(--pf-dropdown-icon-size);
|
|
101
|
+
width: var(--pf-dropdown-icon-size);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.pf-dropdown__item-shortcut {
|
|
105
|
+
color: var(--pf-dropdown-text-muted);
|
|
106
|
+
font-size: var(--font-size-xs);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pf-dropdown__item:hover:not(:disabled),
|
|
110
|
+
.pf-dropdown__item--active {
|
|
111
|
+
background: var(--pf-dropdown-surface-subtle, var(--pf-surface-subtle));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.pf-dropdown__item--destructive {
|
|
115
|
+
color: var(--pf-dropdown-text-danger);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.pf-dropdown__item--destructive .pf-dropdown__item-icon {
|
|
119
|
+
color: var(--pf-dropdown-icon-danger);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pf-dropdown__item:disabled {
|
|
123
|
+
color: var(--pf-dropdown-text-muted);
|
|
124
|
+
cursor: not-allowed;
|
|
125
|
+
opacity: 0.7;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (prefers-reduced-motion: reduce) {
|
|
129
|
+
.pf-dropdown__chevron {
|
|
130
|
+
transition: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Keys, isActivationKey } from "
|
|
2
|
-
import { cx } from "
|
|
3
|
-
import { Icon } from "
|
|
4
|
-
import { useAnchoredPosition } from "
|
|
5
|
-
import { useDisclosure } from "
|
|
6
|
-
import { useListNavigation } from "
|
|
7
|
-
import { useOutsideInteraction } from "
|
|
8
|
-
|
|
1
|
+
import { Keys, isActivationKey } from "../../a11y/index.js";
|
|
2
|
+
import { cx } from "../../utils/cx.js";
|
|
3
|
+
import { Icon } from "../Icon/Icon2.js";
|
|
4
|
+
import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
|
|
5
|
+
import { useDisclosure } from "../../hooks/useDisclosure.js";
|
|
6
|
+
import { useListNavigation } from "../../hooks/useListNavigation.js";
|
|
7
|
+
import { useOutsideInteraction } from "../../hooks/useOutsideInteraction.js";
|
|
8
|
+
import './Dropdown.css';/* empty css */
|
|
9
9
|
import { forwardRef, useEffect, useId, useRef } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { createPortal } from "react-dom";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.pf-empty-state {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--space-3);
|
|
6
|
+
padding: var(--space-8);
|
|
7
|
+
text-align: center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pf-empty-state--sm {
|
|
11
|
+
gap: var(--space-2);
|
|
12
|
+
padding: var(--space-4);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pf-empty-state--lg {
|
|
16
|
+
gap: var(--space-4);
|
|
17
|
+
padding: var(--space-10);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pf-empty-state__icon {
|
|
21
|
+
color: var(--pf-empty-state-icon);
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
font-size: var(--font-size-3xl);
|
|
24
|
+
line-height: 1;
|
|
25
|
+
margin-bottom: var(--space-1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pf-empty-state--sm .pf-empty-state__icon {
|
|
29
|
+
font-size: var(--font-size-xl);
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pf-empty-state--lg .pf-empty-state__icon {
|
|
34
|
+
font-size: var(--font-size-5xl);
|
|
35
|
+
margin-bottom: var(--space-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pf-empty-state__heading {
|
|
39
|
+
color: var(--pf-empty-state-text);
|
|
40
|
+
font-size: var(--font-size-md);
|
|
41
|
+
font-weight: var(--font-weight-semibold);
|
|
42
|
+
line-height: 1.3;
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pf-empty-state--sm .pf-empty-state__heading {
|
|
47
|
+
font-size: var(--font-size-sm);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pf-empty-state--lg .pf-empty-state__heading {
|
|
51
|
+
font-size: var(--font-size-xl);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pf-empty-state__description {
|
|
55
|
+
color: var(--pf-empty-state-text-muted);
|
|
56
|
+
font-size: var(--font-size-sm);
|
|
57
|
+
line-height: 1.5;
|
|
58
|
+
margin: 0;
|
|
59
|
+
max-width: 40ch;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.pf-empty-state--lg .pf-empty-state__description {
|
|
63
|
+
font-size: var(--font-size-md);
|
|
64
|
+
max-width: 48ch;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pf-empty-state__action {
|
|
68
|
+
align-items: center;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
gap: var(--space-2);
|
|
71
|
+
margin-top: var(--space-1);
|
|
72
|
+
}
|
|
@@ -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 './EmptyState.css';/* empty css */
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/EmptyState/EmptyState.tsx
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.pf-file-uploader {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--space-3);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pf-file-uploader__input {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pf-file-uploader__dropzone {
|
|
11
|
+
align-items: center;
|
|
12
|
+
background: var(--pf-file-uploader-bg);
|
|
13
|
+
border: 1px dashed var(--pf-file-uploader-border);
|
|
14
|
+
border-radius: var(--radius-md);
|
|
15
|
+
color: var(--pf-file-uploader-text);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
display: grid;
|
|
18
|
+
gap: var(--space-1);
|
|
19
|
+
justify-items: center;
|
|
20
|
+
padding: var(--space-4);
|
|
21
|
+
text-align: center;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pf-file-uploader__dropzone:hover:not(:disabled) {
|
|
26
|
+
border-color: var(--pf-file-uploader-border-strong);
|
|
27
|
+
background: var(--pf-file-uploader-bg-subtle);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pf-file-uploader__dropzone:focus-visible {
|
|
31
|
+
box-shadow: var(--pf-fileuploader-focus-ring, var(--pf-focus-ring));
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pf-file-uploader__dropzone--active {
|
|
36
|
+
border-color: var(--pf-file-uploader-active-border);
|
|
37
|
+
box-shadow: inset 0 0 0 1px var(--pf-file-uploader-active-border);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pf-file-uploader__dropzone--invalid {
|
|
41
|
+
border-color: var(--pf-file-uploader-invalid-border);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pf-file-uploader__dropzone:disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
opacity: 0.6;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pf-file-uploader__icon {
|
|
50
|
+
align-items: center;
|
|
51
|
+
background: var(--pf-file-uploader-bg-subtle);
|
|
52
|
+
border: 1px solid var(--pf-file-uploader-border);
|
|
53
|
+
border-radius: 999px;
|
|
54
|
+
color: var(--pf-file-uploader-text-muted);
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
height: 36px;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
width: 36px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pf-file-uploader__title {
|
|
62
|
+
font-size: var(--font-size-sm);
|
|
63
|
+
font-weight: var(--font-weight-semibold);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pf-file-uploader__subtitle,
|
|
67
|
+
.pf-file-uploader__hint {
|
|
68
|
+
color: var(--pf-file-uploader-text-muted);
|
|
69
|
+
font-size: var(--font-size-xs);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pf-file-uploader__list {
|
|
73
|
+
display: grid;
|
|
74
|
+
gap: var(--space-2);
|
|
75
|
+
list-style: none;
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.pf-file-uploader__list-item {
|
|
81
|
+
align-items: center;
|
|
82
|
+
background: var(--pf-file-uploader-bg);
|
|
83
|
+
border: 1px solid var(--pf-file-uploader-border);
|
|
84
|
+
border-radius: var(--radius-sm);
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: space-between;
|
|
87
|
+
padding: var(--space-2) var(--space-3);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.pf-file-uploader__file-meta {
|
|
91
|
+
display: grid;
|
|
92
|
+
gap: 2px;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pf-file-uploader__file-name {
|
|
97
|
+
color: var(--pf-file-uploader-text);
|
|
98
|
+
font-size: var(--font-size-sm);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.pf-file-uploader__file-size {
|
|
105
|
+
color: var(--pf-file-uploader-text-muted);
|
|
106
|
+
font-size: var(--font-size-xs);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pf-file-uploader__remove {
|
|
110
|
+
align-items: center;
|
|
111
|
+
background: transparent;
|
|
112
|
+
border: 0;
|
|
113
|
+
border-radius: var(--radius-sm);
|
|
114
|
+
color: var(--pf-file-uploader-text-muted);
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
height: 24px;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
width: 24px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pf-file-uploader__remove:hover:not(:disabled) {
|
|
123
|
+
background: var(--pf-file-uploader-bg-subtle);
|
|
124
|
+
color: var(--pf-file-uploader-text);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.pf-file-uploader__remove:focus-visible {
|
|
128
|
+
box-shadow: var(--pf-fileuploader-focus-ring, var(--pf-focus-ring));
|
|
129
|
+
outline: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.pf-file-uploader__remove:disabled {
|
|
133
|
+
cursor: not-allowed;
|
|
134
|
+
opacity: 0.55;
|
|
135
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cx } from "
|
|
2
|
-
import { Icon } from "
|
|
3
|
-
import { FieldWrapper } from "
|
|
4
|
-
|
|
1
|
+
import { cx } from "../../utils/cx.js";
|
|
2
|
+
import { Icon } from "../Icon/Icon2.js";
|
|
3
|
+
import { FieldWrapper } from "../../utils/FieldWrapper.js";
|
|
4
|
+
import './FileUploader.css';/* empty css */
|
|
5
5
|
import { forwardRef, useId, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/FileUploader/FileUploader.tsx
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.pf-gauge {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pf-gauge__svg {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pf-gauge__track {
|
|
14
|
+
stroke: var(--pf-gauge-track-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pf-gauge__fill {
|
|
18
|
+
transition: stroke-dasharray var(--pf-transition-medium, 180ms ease);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pf-gauge__center {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
gap: var(--space-1);
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
padding: var(--space-2);
|
|
30
|
+
border-radius: var(--radius-full);
|
|
31
|
+
background: var(--pf-gauge-center-bg);
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pf-gauge__label {
|
|
36
|
+
color: var(--pf-gauge-label-color);
|
|
37
|
+
font-size: var(--pf-gauge-label-size);
|
|
38
|
+
font-weight: var(--font-weight-semibold);
|
|
39
|
+
line-height: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pf-gauge__sub-label {
|
|
43
|
+
color: var(--pf-gauge-sub-label-color);
|
|
44
|
+
font-size: var(--font-size-sm);
|
|
45
|
+
line-height: 1;
|
|
46
|
+
}
|