@pitchfork-ui/react 0.8.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/AvatarGroup2.js +1 -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/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/Combobox2.js +1 -0
- package/dist/components/CommandPalette/CommandPalette2.js +1 -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/DateRangePicker2.js +1 -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 +1 -0
- package/dist/components/InlineCTA/InlineCTA2.js +1 -0
- package/dist/components/Input/Input2.js +1 -0
- package/dist/components/Kbd/Kbd2.js +1 -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/NumberInput2.js +1 -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/Popover2.js +1 -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 +1 -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 +1 -0
- package/dist/index.js +1 -0
- package/dist/styles.css +6 -3
- package/dist/utils/FieldWrapper.js +1 -0
- package/dist/utils/cx.js +1 -0
- package/package.json +29 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leland Rangel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/a11y/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cx } from "../../utils/cx.js";
|
|
2
3
|
import './Icon.css';/* empty css */
|
|
3
4
|
import { faBarChart, faCalendar, faCircleCheck, faCircleQuestion, faCircleXmark, faCopy, faCreditCard, faSquareCaretLeft, faSquareCaretRight, faSquareCheck, faStar, faUser } from "@fortawesome/free-regular-svg-icons";
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
.pf-modal {
|
|
31
31
|
background: var(--pf-modal-bg);
|
|
32
32
|
border: 1px solid color-mix(in srgb, var(--pf-modal-border) 85%, transparent);
|
|
33
|
-
border-radius: var(--radius-lg)
|
|
33
|
+
border-radius: var(--radius-lg);
|
|
34
34
|
box-shadow: var(--pf-modal-elevation-overlay-shadow, var(--pf-elevation-overlay-shadow));
|
|
35
35
|
color: var(--pf-modal-text);
|
|
36
|
-
display:
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
37
38
|
max-height: 92vh;
|
|
38
39
|
overflow: hidden;
|
|
39
40
|
width: 100%;
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
|
|
42
43
|
@media (min-width: 768px) {
|
|
43
44
|
.pf-modal {
|
|
44
|
-
border-radius: var(--radius-lg);
|
|
45
45
|
max-height: min(90vh, 720px);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
.pf-modal__footer {
|
|
67
67
|
align-items: start;
|
|
68
68
|
display: flex;
|
|
69
|
+
flex-shrink: 0;
|
|
69
70
|
gap: var(--space-3);
|
|
70
71
|
justify-content: space-between;
|
|
71
72
|
padding: var(--space-3);
|
|
@@ -90,7 +91,9 @@
|
|
|
90
91
|
|
|
91
92
|
.pf-modal__body {
|
|
92
93
|
display: grid;
|
|
94
|
+
flex: 1 1 auto;
|
|
93
95
|
gap: var(--space-4);
|
|
96
|
+
min-height: 0;
|
|
94
97
|
overflow-y: auto;
|
|
95
98
|
padding: var(--space-3);
|
|
96
99
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { useEffect, useState } from "react";
|
|
2
3
|
//#region src/hooks/useAnchoredPosition.ts
|
|
3
4
|
function useAnchoredPosition({ anchorRef, floatingRef, enabled = true, align = "start", offset = 8, viewportPadding = 8, minWidth, matchAnchorWidth = true, flip = false }) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { useEffect, useRef, useState } from "react";
|
|
2
3
|
//#region src/hooks/usePresence.ts
|
|
3
4
|
var prefersReducedMotion = () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -4224,10 +4224,11 @@ body {
|
|
|
4224
4224
|
.pf-modal {
|
|
4225
4225
|
background: var(--pf-modal-bg);
|
|
4226
4226
|
border: 1px solid color-mix(in srgb, var(--pf-modal-border) 85%, transparent);
|
|
4227
|
-
border-radius: var(--radius-lg)
|
|
4227
|
+
border-radius: var(--radius-lg);
|
|
4228
4228
|
box-shadow: var(--pf-modal-elevation-overlay-shadow, var(--pf-elevation-overlay-shadow));
|
|
4229
4229
|
color: var(--pf-modal-text);
|
|
4230
|
-
display:
|
|
4230
|
+
display: flex;
|
|
4231
|
+
flex-direction: column;
|
|
4231
4232
|
max-height: 92vh;
|
|
4232
4233
|
overflow: hidden;
|
|
4233
4234
|
width: 100%;
|
|
@@ -4235,7 +4236,6 @@ body {
|
|
|
4235
4236
|
|
|
4236
4237
|
@media (min-width: 768px) {
|
|
4237
4238
|
.pf-modal {
|
|
4238
|
-
border-radius: var(--radius-lg);
|
|
4239
4239
|
max-height: min(90vh, 720px);
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
@@ -4260,6 +4260,7 @@ body {
|
|
|
4260
4260
|
.pf-modal__footer {
|
|
4261
4261
|
align-items: start;
|
|
4262
4262
|
display: flex;
|
|
4263
|
+
flex-shrink: 0;
|
|
4263
4264
|
gap: var(--space-3);
|
|
4264
4265
|
justify-content: space-between;
|
|
4265
4266
|
padding: var(--space-3);
|
|
@@ -4284,7 +4285,9 @@ body {
|
|
|
4284
4285
|
|
|
4285
4286
|
.pf-modal__body {
|
|
4286
4287
|
display: grid;
|
|
4288
|
+
flex: 1 1 auto;
|
|
4287
4289
|
gap: var(--space-4);
|
|
4290
|
+
min-height: 0;
|
|
4288
4291
|
overflow-y: auto;
|
|
4289
4292
|
padding: var(--space-3);
|
|
4290
4293
|
}
|
package/dist/utils/cx.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pitchfork-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Accessible, themeable React component library for lelandrangel.com — 65+ components backed by a Style Dictionary token system, with dark mode and bundled CSS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Leland Rangel",
|
|
7
|
+
"homepage": "https://lelandrangel.com/pitchfork-ui/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/lelandcrangel/pitchfork-ui.git",
|
|
11
|
+
"directory": "packages/react"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/lelandcrangel/pitchfork-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react",
|
|
18
|
+
"component-library",
|
|
19
|
+
"design-system",
|
|
20
|
+
"ui",
|
|
21
|
+
"components",
|
|
22
|
+
"accessible",
|
|
23
|
+
"a11y",
|
|
24
|
+
"dark-mode",
|
|
25
|
+
"design-tokens",
|
|
26
|
+
"typescript"
|
|
27
|
+
],
|
|
4
28
|
"type": "module",
|
|
5
29
|
"main": "dist/index.cjs",
|
|
6
30
|
"module": "dist/index.js",
|
|
@@ -11,7 +35,9 @@
|
|
|
11
35
|
],
|
|
12
36
|
"files": [
|
|
13
37
|
"dist",
|
|
14
|
-
"theme.starter.css"
|
|
38
|
+
"theme.starter.css",
|
|
39
|
+
"LICENSE",
|
|
40
|
+
"README.md"
|
|
15
41
|
],
|
|
16
42
|
"scripts": {
|
|
17
43
|
"build": "vite build",
|
|
@@ -27,7 +53,7 @@
|
|
|
27
53
|
"react-dom": ">=18.2.0 || >=19.0.0"
|
|
28
54
|
},
|
|
29
55
|
"devDependencies": {
|
|
30
|
-
"@pitchfork-ui/tokens": "
|
|
56
|
+
"@pitchfork-ui/tokens": "*",
|
|
31
57
|
"@vitejs/plugin-react": "latest",
|
|
32
58
|
"vite-plugin-dts": "latest",
|
|
33
59
|
"vite-plugin-lib-inject-css": "^2.2.2"
|