@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.
Files changed (154) hide show
  1. package/README.md +20 -5
  2. package/dist/components/Accordion/Accordion.css +85 -0
  3. package/dist/components/Accordion/Accordion2.js +96 -0
  4. package/dist/components/Alert/Alert.css +111 -0
  5. package/dist/{index8.js → components/Alert/Alert2.js} +7 -5
  6. package/dist/components/Avatar/Avatar.css +97 -0
  7. package/dist/{index10.js → components/Avatar/Avatar2.js} +2 -2
  8. package/dist/components/Badge/Badge.css +26 -0
  9. package/dist/{index23.js → components/Badge/Badge2.js} +2 -2
  10. package/dist/components/BadgeGroup/BadgeGroup.css +115 -0
  11. package/dist/{index14.js → components/BadgeGroup/BadgeGroup2.js} +2 -2
  12. package/dist/components/Breadcrumbs/Breadcrumbs.css +45 -0
  13. package/dist/{index18.js → components/Breadcrumbs/Breadcrumbs2.js} +2 -2
  14. package/dist/components/Button/Button.css +93 -0
  15. package/dist/{index12.js → components/Button/Button2.js} +2 -2
  16. package/dist/components/ButtonGroup/ButtonGroup.css +107 -0
  17. package/dist/{index16.js → components/ButtonGroup/ButtonGroup2.js} +2 -2
  18. package/dist/components/Calendar/Calendar.css +144 -0
  19. package/dist/{index40.js → components/Calendar/Calendar2.js} +4 -4
  20. package/dist/components/Card/Card.css +23 -0
  21. package/dist/{index25.js → components/Card/Card2.js} +2 -2
  22. package/dist/components/Carousel/Carousel.css +124 -0
  23. package/dist/components/Carousel/Carousel2.js +147 -0
  24. package/dist/components/Checkbox/Checkbox.css +62 -0
  25. package/dist/{index29.js → components/Checkbox/Checkbox2.js} +2 -2
  26. package/dist/components/CodeSnippet/CodeSnippet.css +155 -0
  27. package/dist/{index46.js → components/CodeSnippet/CodeSnippet2.js} +6 -6
  28. package/dist/components/ContentDivider/ContentDivider.css +38 -0
  29. package/dist/{index48.js → components/ContentDivider/ContentDivider2.js} +2 -2
  30. package/dist/components/CreditCard/CreditCard.css +139 -0
  31. package/dist/{index27.js → components/CreditCard/CreditCard2.js} +2 -2
  32. package/dist/components/DatePicker/DatePicker.css +91 -0
  33. package/dist/{index50.js → components/DatePicker/DatePicker2.js} +9 -9
  34. package/dist/components/Dropdown/Dropdown.css +149 -0
  35. package/dist/{index38.js → components/Dropdown/Dropdown2.js} +8 -9
  36. package/dist/components/EmptyState/EmptyState.css +72 -0
  37. package/dist/{index52.js → components/EmptyState/EmptyState2.js} +3 -3
  38. package/dist/components/FileUploader/FileUploader.css +135 -0
  39. package/dist/{index54.js → components/FileUploader/FileUploader2.js} +4 -4
  40. package/dist/components/GaugeChart/GaugeChart.css +63 -0
  41. package/dist/components/GaugeChart/GaugeChart2.js +74 -0
  42. package/dist/components/HeaderNavigation/HeaderNavigation.css +87 -0
  43. package/dist/{index56.js → components/HeaderNavigation/HeaderNavigation2.js} +2 -2
  44. package/dist/components/Heatmap/Heatmap.css +100 -0
  45. package/dist/components/Heatmap/Heatmap2.js +160 -0
  46. package/dist/components/Icon/Icon.css +6 -0
  47. package/dist/{index6.js → components/Icon/Icon2.js} +2 -2
  48. package/dist/components/InlineCTA/InlineCTA.css +144 -0
  49. package/dist/{index58.js → components/InlineCTA/InlineCTA2.js} +17 -5
  50. package/dist/components/Input/Input.css +75 -0
  51. package/dist/{index21.js → components/Input/Input2.js} +3 -3
  52. package/dist/components/LineBarCharts/LineBarChart.css +122 -0
  53. package/dist/{index60.js → components/LineBarCharts/LineBarChart2.js} +11 -3
  54. package/dist/components/LoadingIndicators/LoadingIndicators.css +107 -0
  55. package/dist/{index62.js → components/LoadingIndicators/LoadingIndicators2.js} +2 -2
  56. package/dist/components/Metrics/Metrics.css +106 -0
  57. package/dist/{index64.js → components/Metrics/Metrics2.js} +3 -3
  58. package/dist/components/Modal/Modal.css +198 -0
  59. package/dist/{index66.js → components/Modal/Modal2.js} +11 -9
  60. package/dist/components/MultiSelect/MultiSelect.css +174 -0
  61. package/dist/{index68.js → components/MultiSelect/MultiSelect2.js} +11 -12
  62. package/dist/components/Notification/Notification.css +242 -0
  63. package/dist/{index70.js → components/Notification/Notification2.js} +7 -5
  64. package/dist/components/PageHeader/PageHeader.css +85 -0
  65. package/dist/{index72.js → components/PageHeader/PageHeader2.js} +3 -3
  66. package/dist/components/Pagination/Pagination.css +101 -0
  67. package/dist/{index74.js → components/Pagination/Pagination2.js} +2 -2
  68. package/dist/components/PieChart/PieChart.css +115 -0
  69. package/dist/{index76.js → components/PieChart/PieChart2.js} +3 -3
  70. package/dist/components/ProgressIndicators/ProgressIndicators.css +95 -0
  71. package/dist/{index78.js → components/ProgressIndicators/ProgressIndicators2.js} +6 -3
  72. package/dist/components/ProgressSteps/ProgressSteps.css +175 -0
  73. package/dist/{index80.js → components/ProgressSteps/ProgressSteps2.js} +2 -2
  74. package/dist/components/RadarChart/RadarChart.css +119 -0
  75. package/dist/{index82.js → components/RadarChart/RadarChart2.js} +21 -15
  76. package/dist/components/RadioButton/RadioButton.css +21 -0
  77. package/dist/{index84.js → components/RadioButton/RadioButton2.js} +2 -2
  78. package/dist/components/RadioGroup/RadioGroup.css +64 -0
  79. package/dist/{index86.js → components/RadioGroup/RadioGroup2.js} +2 -2
  80. package/dist/components/Rating/Rating.css +91 -0
  81. package/dist/{index88.js → components/Rating/Rating2.js} +3 -3
  82. package/dist/components/RichTextEditor/RichTextEditor.css +94 -0
  83. package/dist/{index90.js → components/RichTextEditor/RichTextEditor2.js} +4 -4
  84. package/dist/components/SectionFooter/SectionFooter.css +59 -0
  85. package/dist/{index92.js → components/SectionFooter/SectionFooter2.js} +2 -2
  86. package/dist/components/SectionHeader/SectionHeader.css +78 -0
  87. package/dist/{index94.js → components/SectionHeader/SectionHeader2.js} +2 -2
  88. package/dist/components/Select/Select.css +156 -0
  89. package/dist/{index102.js → components/Select/Select2.js} +11 -12
  90. package/dist/components/SidebarNavigation/SidebarNavigation.css +116 -0
  91. package/dist/{index96.js → components/SidebarNavigation/SidebarNavigation2.js} +2 -2
  92. package/dist/components/SlideoutMenu/SlideoutMenu.css +161 -0
  93. package/dist/{index98.js → components/SlideoutMenu/SlideoutMenu2.js} +3 -3
  94. package/dist/components/Slider/Slider.css +106 -0
  95. package/dist/{index104.js → components/Slider/Slider2.js} +2 -2
  96. package/dist/components/Sparkline/Sparkline.css +65 -0
  97. package/dist/components/Sparkline/Sparkline2.js +100 -0
  98. package/dist/components/Switch/Switch.css +59 -0
  99. package/dist/{index100.js → components/Switch/Switch2.js} +2 -2
  100. package/dist/components/Table/Table.css +126 -0
  101. package/dist/{index108.js → components/Table/Table2.js} +2 -2
  102. package/dist/components/Tabs/Tabs.css +138 -0
  103. package/dist/{index110.js → components/Tabs/Tabs2.js} +53 -6
  104. package/dist/components/Tag/Tag.css +64 -0
  105. package/dist/{index106.js → components/Tag/Tag2.js} +3 -3
  106. package/dist/components/Textarea/Textarea.css +52 -0
  107. package/dist/{index112.js → components/Textarea/Textarea2.js} +3 -3
  108. package/dist/components/Tooltip/Tooltip.css +61 -0
  109. package/dist/{index114.js → components/Tooltip/Tooltip2.js} +6 -6
  110. package/dist/components/TreeView/TreeView.css +109 -0
  111. package/dist/{index116.js → components/TreeView/TreeView2.js} +2 -2
  112. package/dist/components/UtilityButton/UtilityButton.css +90 -0
  113. package/dist/{index118.js → components/UtilityButton/UtilityButton2.js} +2 -2
  114. package/dist/components/VideoPlayer/VideoPlayer.css +41 -0
  115. package/dist/{index120.js → components/VideoPlayer/VideoPlayer2.js} +2 -2
  116. package/dist/{index33.js → hooks/useDisclosure.js} +1 -1
  117. package/dist/hooks/useExitAnimation.js +25 -0
  118. package/dist/{index34.js → hooks/useFocusTrap.js} +1 -1
  119. package/dist/hooks/usePresence.js +31 -0
  120. package/dist/index.cjs +1030 -4720
  121. package/dist/index.js +69 -63
  122. package/dist/src/components/Accordion/Accordion.d.ts +20 -0
  123. package/dist/src/components/Accordion/Accordion.test.d.ts +1 -0
  124. package/dist/src/components/Accordion/index.d.ts +1 -0
  125. package/dist/src/components/GaugeChart/GaugeChart.d.ts +17 -0
  126. package/dist/src/components/GaugeChart/GaugeChart.test.d.ts +1 -0
  127. package/dist/src/components/GaugeChart/index.d.ts +1 -0
  128. package/dist/src/components/Heatmap/Heatmap.d.ts +28 -0
  129. package/dist/src/components/Heatmap/Heatmap.test.d.ts +1 -0
  130. package/dist/src/components/Heatmap/index.d.ts +1 -0
  131. package/dist/src/components/InlineCTA/InlineCTA.d.ts +2 -0
  132. package/dist/src/components/LineBarCharts/LineBarChart.d.ts +2 -0
  133. package/dist/src/components/Sparkline/Sparkline.d.ts +17 -0
  134. package/dist/src/components/Sparkline/Sparkline.test.d.ts +1 -0
  135. package/dist/src/components/Sparkline/index.d.ts +1 -0
  136. package/dist/src/hooks/index.d.ts +2 -0
  137. package/dist/src/hooks/useExitAnimation.d.ts +18 -0
  138. package/dist/src/hooks/usePresence.d.ts +13 -0
  139. package/dist/src/index.d.ts +4 -0
  140. package/dist/styles/theme.css +813 -0
  141. package/dist/styles.css +881 -68
  142. package/dist/{index19.js → utils/FieldWrapper.js} +1 -1
  143. package/package.json +8 -4
  144. package/theme.starter.css +58 -0
  145. package/dist/index42.js +0 -134
  146. package/dist/index43.js +0 -16
  147. package/dist/index44.js +0 -4232
  148. /package/dist/{index3.js → a11y/index.js} +0 -0
  149. /package/dist/{index30.js → hooks/useAnchoredPosition.js} +0 -0
  150. /package/dist/{index31.js → hooks/useComposedRefs.js} +0 -0
  151. /package/dist/{index32.js → hooks/useControllableState.js} +0 -0
  152. /package/dist/{index35.js → hooks/useListNavigation.js} +0 -0
  153. /package/dist/{index36.js → hooks/useOutsideInteraction.js} +0 -0
  154. /package/dist/{index4.js → utils/cx.js} +0 -0
package/README.md CHANGED
@@ -12,21 +12,36 @@ Accessible, token-driven React components for [lelandrangel.com](https://lelandr
12
12
  npm install @pitchfork-ui/react
13
13
  ```
14
14
 
15
- > **Peer dependencies** — install these if not already in your project:
15
+ > **Required peer dependencies** — install these if not already in your project:
16
16
  >
17
17
  > ```bash
18
18
  > npm install @fortawesome/fontawesome-svg-core @fortawesome/free-regular-svg-icons @fortawesome/react-fontawesome
19
19
  > ```
20
+ >
21
+ > **Optional peer dependencies** — only needed if you use specific components:
22
+ >
23
+ > | Package | Component |
24
+ > | ---------------------- | ------------- |
25
+ > | `prism-react-renderer` | `CodeSnippet` |
26
+ >
27
+ > ```bash
28
+ > npm install prism-react-renderer
29
+ > ```
20
30
 
21
31
  ## Setup
22
32
 
23
- Import the stylesheet once at your app's entry point:
33
+ No stylesheet import needed. Component CSS and design token variables are injected automatically when components are imported.
24
34
 
25
- ```ts
26
- import '@pitchfork-ui/react/styles.css';
35
+ ```tsx
36
+ // CSS loads automatically — nothing else required
37
+ import { Button } from '@pitchfork-ui/react';
27
38
  ```
28
39
 
29
- This single file includes all component styles and design token variables. No separate token package required.
40
+ > **CJS / SSR environments** if your bundler does not support CSS-in-JS injection, import the full stylesheet manually:
41
+ >
42
+ > ```ts
43
+ > import '@pitchfork-ui/react/styles.css';
44
+ > ```
30
45
 
31
46
  ## Usage
32
47
 
@@ -0,0 +1,85 @@
1
+ .pf-accordion {
2
+ border: 1px solid var(--pf-accordion-border);
3
+ border-radius: var(--radius-md);
4
+ overflow: hidden;
5
+ }
6
+
7
+ .pf-accordion__item + .pf-accordion__item {
8
+ border-top: 1px solid var(--pf-accordion-border);
9
+ }
10
+
11
+ .pf-accordion__heading {
12
+ margin: 0;
13
+ font-size: inherit;
14
+ font-weight: inherit;
15
+ }
16
+
17
+ .pf-accordion__trigger {
18
+ align-items: center;
19
+ background: transparent;
20
+ border: 0;
21
+ color: var(--pf-accordion-trigger-text);
22
+ cursor: pointer;
23
+ display: flex;
24
+ font: inherit;
25
+ font-weight: var(--font-weight-medium);
26
+ gap: var(--space-3);
27
+ justify-content: space-between;
28
+ padding: var(--space-3) var(--space-4);
29
+ text-align: start;
30
+ width: 100%;
31
+ }
32
+
33
+ .pf-accordion__trigger:hover:not(:disabled) {
34
+ background: var(--pf-accordion-trigger-bg-hover);
35
+ }
36
+
37
+ .pf-accordion__trigger:focus-visible {
38
+ box-shadow: var(--pf-focus-ring);
39
+ outline: none;
40
+ }
41
+
42
+ .pf-accordion__trigger:disabled {
43
+ cursor: not-allowed;
44
+ opacity: 0.5;
45
+ }
46
+
47
+ .pf-accordion__icon {
48
+ align-items: center;
49
+ color: var(--pf-accordion-icon);
50
+ display: inline-flex;
51
+ flex-shrink: 0;
52
+ transition: transform var(--pf-transition-fast);
53
+ }
54
+
55
+ .pf-accordion__item--open .pf-accordion__icon {
56
+ transform: rotate(180deg);
57
+ }
58
+
59
+ /* Animate open/close height with the grid-template-rows 0fr → 1fr technique */
60
+ .pf-accordion__panel {
61
+ display: grid;
62
+ grid-template-rows: 0fr;
63
+ transition: grid-template-rows var(--pf-transition-medium);
64
+ }
65
+
66
+ .pf-accordion__panel--open {
67
+ grid-template-rows: 1fr;
68
+ }
69
+
70
+ .pf-accordion__content {
71
+ min-height: 0;
72
+ overflow: hidden;
73
+ color: var(--pf-accordion-content-text);
74
+ }
75
+
76
+ .pf-accordion__content-inner {
77
+ padding: 0 var(--space-4) var(--space-4);
78
+ }
79
+
80
+ @media (prefers-reduced-motion: reduce) {
81
+ .pf-accordion__panel,
82
+ .pf-accordion__icon {
83
+ transition: none;
84
+ }
85
+ }
@@ -0,0 +1,96 @@
1
+ import { Keys } from "../../a11y/index.js";
2
+ import { useControllableState } from "../../hooks/useControllableState.js";
3
+ import { cx } from "../../utils/cx.js";
4
+ import { Icon } from "../Icon/Icon2.js";
5
+ import './Accordion.css';/* empty css */
6
+ import { forwardRef, useId, useRef } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/components/Accordion/Accordion.tsx
9
+ var Accordion = forwardRef(function Accordion({ className, items, type = "single", value, defaultValue, onValueChange, headingLevel = 3, ...props }, ref) {
10
+ const baseId = useId();
11
+ const [expanded = [], setExpanded] = useControllableState({
12
+ value,
13
+ defaultValue: defaultValue ?? [],
14
+ onChange: onValueChange
15
+ });
16
+ const triggerRefs = useRef([]);
17
+ const toggle = (itemValue) => {
18
+ const isOpen = expanded.includes(itemValue);
19
+ if (type === "single") setExpanded(isOpen ? [] : [itemValue]);
20
+ else setExpanded(isOpen ? expanded.filter((v) => v !== itemValue) : [...expanded, itemValue]);
21
+ };
22
+ const enabledIndexes = items.map((item, index) => ({
23
+ item,
24
+ index
25
+ })).filter(({ item }) => !item.disabled).map(({ index }) => index);
26
+ const onTriggerKeyDown = (event, index) => {
27
+ if (enabledIndexes.length === 0) return;
28
+ const position = enabledIndexes.indexOf(index);
29
+ let target;
30
+ if (event.key === Keys.ArrowDown) target = enabledIndexes[(position + 1) % enabledIndexes.length];
31
+ else if (event.key === Keys.ArrowUp) target = enabledIndexes[(position - 1 + enabledIndexes.length) % enabledIndexes.length];
32
+ else if (event.key === Keys.Home) target = enabledIndexes[0];
33
+ else if (event.key === Keys.End) target = enabledIndexes[enabledIndexes.length - 1];
34
+ if (target !== void 0) {
35
+ event.preventDefault();
36
+ triggerRefs.current[target]?.focus();
37
+ }
38
+ };
39
+ const Heading = `h${headingLevel}`;
40
+ return /* @__PURE__ */ jsx("div", {
41
+ ref,
42
+ className: cx("pf-accordion", className),
43
+ ...props,
44
+ children: items.map((item, index) => {
45
+ const isOpen = expanded.includes(item.value);
46
+ const triggerId = `${baseId}-trigger-${item.value}`;
47
+ const panelId = `${baseId}-panel-${item.value}`;
48
+ return /* @__PURE__ */ jsxs("div", {
49
+ className: cx("pf-accordion__item", isOpen && "pf-accordion__item--open"),
50
+ children: [/* @__PURE__ */ jsx(Heading, {
51
+ className: "pf-accordion__heading",
52
+ children: /* @__PURE__ */ jsxs("button", {
53
+ ref: (element) => {
54
+ triggerRefs.current[index] = element;
55
+ },
56
+ type: "button",
57
+ id: triggerId,
58
+ className: "pf-accordion__trigger",
59
+ "aria-expanded": isOpen,
60
+ "aria-controls": panelId,
61
+ disabled: item.disabled,
62
+ onClick: () => toggle(item.value),
63
+ onKeyDown: (event) => onTriggerKeyDown(event, index),
64
+ children: [/* @__PURE__ */ jsx("span", {
65
+ className: "pf-accordion__title",
66
+ children: item.title
67
+ }), /* @__PURE__ */ jsx("span", {
68
+ className: "pf-accordion__icon",
69
+ "aria-hidden": true,
70
+ children: /* @__PURE__ */ jsx(Icon, {
71
+ name: "chevron-down",
72
+ "aria-hidden": true
73
+ })
74
+ })]
75
+ })
76
+ }), /* @__PURE__ */ jsx("div", {
77
+ className: cx("pf-accordion__panel", isOpen && "pf-accordion__panel--open"),
78
+ children: /* @__PURE__ */ jsx("div", {
79
+ id: panelId,
80
+ role: "region",
81
+ "aria-labelledby": triggerId,
82
+ className: "pf-accordion__content",
83
+ ...isOpen ? {} : { inert: true },
84
+ children: /* @__PURE__ */ jsx("div", {
85
+ className: "pf-accordion__content-inner",
86
+ children: item.content
87
+ })
88
+ })
89
+ })]
90
+ }, item.value);
91
+ })
92
+ });
93
+ });
94
+ Accordion.displayName = "Accordion";
95
+ //#endregion
96
+ export { Accordion };
@@ -0,0 +1,111 @@
1
+ .pf-alert {
2
+ align-items: flex-start;
3
+ border: 1px solid var(--pf-alert-border);
4
+ border-radius: var(--radius-md);
5
+ display: flex;
6
+ gap: var(--space-3);
7
+ padding: var(--space-3);
8
+ }
9
+
10
+ .pf-alert--info {
11
+ background: var(--pf-alert-info-background);
12
+ border-color: var(--pf-alert-info-border);
13
+ color: var(--pf-alert-info-foreground);
14
+ }
15
+
16
+ .pf-alert--success {
17
+ background: var(--pf-alert-success-background);
18
+ border-color: var(--pf-alert-success-border);
19
+ color: var(--pf-alert-success-foreground);
20
+ }
21
+
22
+ .pf-alert--warning {
23
+ background: var(--pf-alert-warning-background);
24
+ border-color: var(--pf-alert-warning-border);
25
+ color: var(--pf-alert-warning-foreground);
26
+ }
27
+
28
+ .pf-alert--danger {
29
+ background: var(--pf-alert-danger-background);
30
+ border-color: var(--pf-alert-danger-border);
31
+ color: var(--pf-alert-danger-foreground);
32
+ }
33
+
34
+ .pf-alert__icon {
35
+ align-items: center;
36
+ display: inline-flex;
37
+ font-size: var(--font-size-lg);
38
+ height: 1em;
39
+ justify-content: center;
40
+ line-height: 1;
41
+ margin-top: 1px;
42
+ width: 1em;
43
+ }
44
+
45
+ .pf-alert__content {
46
+ display: grid;
47
+ gap: var(--space-1);
48
+ }
49
+
50
+ .pf-alert__title {
51
+ font-size: var(--font-size-sm);
52
+ font-weight: var(--font-weight-semibold);
53
+ line-height: 1.3;
54
+ margin: 0;
55
+ }
56
+
57
+ .pf-alert__description {
58
+ font-size: var(--font-size-sm);
59
+ line-height: 1.4;
60
+ }
61
+
62
+ .pf-alert__description p {
63
+ margin: 0;
64
+ }
65
+
66
+ .pf-alert__dismiss {
67
+ align-items: center;
68
+ background: transparent;
69
+ border: 0;
70
+ border-radius: var(--radius-sm);
71
+ color: currentColor;
72
+ cursor: pointer;
73
+ display: inline-flex;
74
+ font-size: var(--font-size-md);
75
+ justify-content: center;
76
+ margin-inline-start: auto;
77
+ padding: 0;
78
+ }
79
+
80
+ .pf-alert__dismiss:focus-visible {
81
+ box-shadow: var(--pf-alert-focus-ring, var(--pf-focus-ring));
82
+ outline: none;
83
+ }
84
+
85
+ /* Exit: fade and collapse so surrounding content reflows when dismissed. */
86
+ .pf-alert--exiting {
87
+ animation: pf-alert-out var(--duration-moderate) var(--easing-accelerate) forwards;
88
+ overflow: hidden;
89
+ pointer-events: none;
90
+ }
91
+
92
+ @keyframes pf-alert-out {
93
+ from {
94
+ opacity: 1;
95
+ max-height: 480px;
96
+ }
97
+ to {
98
+ opacity: 0;
99
+ max-height: 0;
100
+ margin-top: 0;
101
+ margin-bottom: 0;
102
+ padding-top: 0;
103
+ padding-bottom: 0;
104
+ }
105
+ }
106
+
107
+ @media (prefers-reduced-motion: reduce) {
108
+ .pf-alert--exiting {
109
+ animation: none;
110
+ }
111
+ }
@@ -1,6 +1,7 @@
1
- import { cx } from "./index4.js";
2
- import { Icon } from "./index6.js";
3
- /* empty css */
1
+ import { useExitAnimation } from "../../hooks/useExitAnimation.js";
2
+ import { cx } from "../../utils/cx.js";
3
+ import { Icon } from "../Icon/Icon2.js";
4
+ import './Alert.css';/* empty css */
4
5
  import { forwardRef } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  //#region src/components/Alert/Alert.tsx
@@ -22,9 +23,10 @@ var Alert = forwardRef(({ className, variant = "info", heading, description, dis
22
23
  "aria-hidden": true
23
24
  });
24
25
  const body = children ?? description;
26
+ const { isExiting, startExit } = useExitAnimation({ onExited: onDismiss });
25
27
  return /* @__PURE__ */ jsxs("div", {
26
28
  ref,
27
- className: cx("pf-alert", `pf-alert--${variant}`, className),
29
+ className: cx("pf-alert", `pf-alert--${variant}`, isExiting && "pf-alert--exiting", className),
28
30
  role: variantRole[variant],
29
31
  ...props,
30
32
  children: [
@@ -47,7 +49,7 @@ var Alert = forwardRef(({ className, variant = "info", heading, description, dis
47
49
  type: "button",
48
50
  className: "pf-alert__dismiss",
49
51
  "aria-label": "Dismiss alert",
50
- onClick: () => onDismiss?.(),
52
+ onClick: startExit,
51
53
  children: /* @__PURE__ */ jsx(Icon, {
52
54
  name: "circle-xmark",
53
55
  "aria-hidden": true
@@ -0,0 +1,97 @@
1
+ .pf-avatar {
2
+ --pf-avatar-status-size: 10px;
3
+ --pf-avatar-status-offset: -2px;
4
+
5
+ background: var(--pf-avatar-bg, var(--pf-surface-subtle));
6
+ border: 1px solid var(--pf-avatar-border, var(--pf-surface-border));
7
+ border-radius: var(--radius-full);
8
+ color: var(--pf-avatar-text);
9
+ display: inline-flex;
10
+ font-weight: var(--font-weight-semibold);
11
+ justify-content: center;
12
+ overflow: visible;
13
+ position: relative;
14
+ text-transform: uppercase;
15
+ user-select: none;
16
+ }
17
+
18
+ .pf-avatar--sm {
19
+ --pf-avatar-status-size: 9px;
20
+ --pf-avatar-status-offset: -2px;
21
+
22
+ font-size: var(--font-size-2xs);
23
+ height: 24px;
24
+ width: 24px;
25
+ }
26
+
27
+ .pf-avatar--md {
28
+ --pf-avatar-status-size: 10px;
29
+ --pf-avatar-status-offset: -2px;
30
+
31
+ font-size: var(--font-size-xs);
32
+ height: 32px;
33
+ width: 32px;
34
+ }
35
+
36
+ .pf-avatar--lg {
37
+ --pf-avatar-status-size: 12px;
38
+ --pf-avatar-status-offset: -2px;
39
+
40
+ font-size: var(--font-size-sm);
41
+ height: 40px;
42
+ width: 40px;
43
+ }
44
+
45
+ .pf-avatar--xl {
46
+ --pf-avatar-status-size: 14px;
47
+ --pf-avatar-status-offset: -1px;
48
+
49
+ font-size: var(--font-size-md);
50
+ height: 56px;
51
+ width: 56px;
52
+ }
53
+
54
+ .pf-avatar__image {
55
+ border-radius: inherit;
56
+ display: block;
57
+ height: 100%;
58
+ object-fit: cover;
59
+ width: 100%;
60
+ }
61
+
62
+ .pf-avatar__fallback {
63
+ align-items: center;
64
+ border-radius: inherit;
65
+ display: inline-flex;
66
+ height: 100%;
67
+ justify-content: center;
68
+ line-height: 1;
69
+ width: 100%;
70
+ }
71
+
72
+ .pf-avatar__status {
73
+ border: 2px solid var(--pf-avatar-status-border);
74
+ border-radius: var(--radius-full);
75
+ top: var(--pf-avatar-status-offset);
76
+ height: var(--pf-avatar-status-size, 10px);
77
+ position: absolute;
78
+ inset-inline-end: var(--pf-avatar-status-offset);
79
+ width: var(--pf-avatar-status-size, 10px);
80
+ z-index: 1;
81
+ }
82
+
83
+ .pf-avatar__status--online {
84
+ background: var(--pf-avatar-status-online);
85
+ }
86
+
87
+ .pf-avatar__status--away {
88
+ background: var(--pf-avatar-status-away);
89
+ }
90
+
91
+ .pf-avatar__status--busy {
92
+ background: var(--pf-avatar-status-busy);
93
+ }
94
+
95
+ .pf-avatar__status--offline {
96
+ background: var(--pf-avatar-status-offline);
97
+ }
@@ -1,5 +1,5 @@
1
- import { cx } from "./index4.js";
2
- /* empty css */
1
+ import { cx } from "../../utils/cx.js";
2
+ import './Avatar.css';/* empty css */
3
3
  import { forwardRef } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/Avatar/Avatar.tsx
@@ -0,0 +1,26 @@
1
+ .pf-badge {
2
+ align-items: center;
3
+ border-radius: var(--radius-full);
4
+ display: inline-flex;
5
+ font-size: var(--font-size-xs);
6
+ font-weight: var(--font-weight-medium);
7
+ line-height: 1;
8
+ min-height: 22px;
9
+ padding: 0 var(--space-2);
10
+ }
11
+ .pf-badge--neutral {
12
+ background: var(--pf-badge-neutral-background, var(--color-gray-100));
13
+ color: var(--pf-badge-neutral-foreground, var(--color-gray-700));
14
+ }
15
+ .pf-badge--brand {
16
+ background: var(--pf-badge-brand-background, var(--color-brand-100));
17
+ color: var(--pf-badge-brand-foreground, var(--color-brand-700));
18
+ }
19
+ .pf-badge--success {
20
+ background: var(--pf-badge-success-background, var(--color-semantic-status-success-background));
21
+ color: var(--pf-badge-success-foreground, var(--color-semantic-status-success-foreground));
22
+ }
23
+ .pf-badge--warning {
24
+ background: var(--pf-badge-warning-background, var(--color-semantic-status-warning-background));
25
+ color: var(--pf-badge-warning-foreground, var(--color-semantic-status-warning-foreground));
26
+ }
@@ -1,5 +1,5 @@
1
- import { cx } from "./index4.js";
2
- /* empty css */
1
+ import { cx } from "../../utils/cx.js";
2
+ import './Badge.css';/* empty css */
3
3
  import { forwardRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/Badge/Badge.tsx
@@ -0,0 +1,115 @@
1
+ .pf-badge-group {
2
+ align-items: center;
3
+ display: inline-flex;
4
+ font-size: var(--font-size-xs);
5
+ font-weight: var(--font-weight-medium);
6
+ line-height: 1;
7
+ }
8
+
9
+ .pf-badge-group__badge,
10
+ .pf-badge-group__text {
11
+ border: 1px solid;
12
+ display: inline-flex;
13
+ min-height: 24px;
14
+ padding: 0 var(--space-2);
15
+ white-space: nowrap;
16
+ }
17
+
18
+ .pf-badge-group__badge {
19
+ align-items: center;
20
+ border-radius: var(--radius-full);
21
+ z-index: 1;
22
+ }
23
+
24
+ .pf-badge-group__text {
25
+ align-items: center;
26
+ }
27
+
28
+ .pf-badge-group--leading .pf-badge-group__text {
29
+ margin-inline-start: -1px;
30
+ padding-inline-start: calc(var(--space-2) + 2px);
31
+ }
32
+
33
+ .pf-badge-group--trailing .pf-badge-group__text {
34
+ margin-inline-end: -1px;
35
+ padding-inline-end: calc(var(--space-2) + 2px);
36
+ }
37
+
38
+ .pf-badge-group--leading .pf-badge-group__badge {
39
+ border-radius: var(--radius-full) 0 0 var(--radius-full);
40
+ }
41
+
42
+ .pf-badge-group--leading .pf-badge-group__text {
43
+ border-radius: 0 var(--radius-full) var(--radius-full) 0;
44
+ }
45
+
46
+ .pf-badge-group--trailing .pf-badge-group__text {
47
+ border-radius: var(--radius-full) 0 0 var(--radius-full);
48
+ }
49
+
50
+ .pf-badge-group--trailing .pf-badge-group__badge {
51
+ border-radius: 0 var(--radius-full) var(--radius-full) 0;
52
+ }
53
+
54
+ .pf-badge-group__badge--gray {
55
+ background: var(--pf-badgegroup-gray-100);
56
+ border-color: var(--pf-badgegroup-gray-200);
57
+ color: var(--pf-badgegroup-gray-700);
58
+ }
59
+
60
+ .pf-badge-group__badge--brand {
61
+ background: var(--pf-badgegroup-brand-100);
62
+ border-color: var(--pf-badgegroup-brand-300);
63
+ color: var(--pf-badgegroup-brand-700);
64
+ }
65
+
66
+ .pf-badge-group__badge--error {
67
+ background: var(--pf-badgegroup-danger-bg);
68
+ border-color: var(--pf-badgegroup-danger-border);
69
+ color: var(--pf-badgegroup-danger-text);
70
+ }
71
+
72
+ .pf-badge-group__badge--warning {
73
+ background: var(--pf-badgegroup-warning-bg);
74
+ border-color: var(--pf-badgegroup-warning-border);
75
+ color: var(--pf-badgegroup-warning-text);
76
+ }
77
+
78
+ .pf-badge-group__badge--success {
79
+ background: var(--pf-badgegroup-success-bg);
80
+ border-color: var(--pf-badgegroup-success-border);
81
+ color: var(--pf-badgegroup-success-text);
82
+ }
83
+
84
+ .pf-badge-group__text--pill {
85
+ background: var(--pf-badgegroup-surface-bg, var(--pf-surface-bg));
86
+ }
87
+
88
+ .pf-badge-group__text--modern {
89
+ background: var(--pf-badgegroup-surface-subtle, var(--pf-surface-subtle));
90
+ }
91
+
92
+ .pf-badge-group__text--gray {
93
+ border-color: var(--pf-badgegroup-gray-200);
94
+ color: var(--pf-badgegroup-gray-700);
95
+ }
96
+
97
+ .pf-badge-group__text--brand {
98
+ border-color: var(--pf-badgegroup-brand-300);
99
+ color: var(--pf-badgegroup-brand-700);
100
+ }
101
+
102
+ .pf-badge-group__text--error {
103
+ border-color: var(--pf-badgegroup-danger-border);
104
+ color: var(--pf-badgegroup-danger-text);
105
+ }
106
+
107
+ .pf-badge-group__text--warning {
108
+ border-color: var(--pf-badgegroup-warning-border);
109
+ color: var(--pf-badgegroup-warning-text);
110
+ }
111
+
112
+ .pf-badge-group__text--success {
113
+ border-color: var(--pf-badgegroup-success-border);
114
+ color: var(--pf-badgegroup-success-text);
115
+ }
@@ -1,5 +1,5 @@
1
- import { cx } from "./index4.js";
2
- /* empty css */
1
+ import { cx } from "../../utils/cx.js";
2
+ import './BadgeGroup.css';/* empty css */
3
3
  import { forwardRef } from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/BadgeGroup/BadgeGroup.tsx
@@ -0,0 +1,45 @@
1
+ .pf-breadcrumbs {
2
+ width: 100%;
3
+ }
4
+
5
+ .pf-breadcrumbs__list {
6
+ align-items: center;
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+ gap: var(--space-2);
10
+ list-style: none;
11
+ margin: 0;
12
+ padding: 0;
13
+ }
14
+
15
+ .pf-breadcrumbs__item {
16
+ align-items: center;
17
+ display: inline-flex;
18
+ gap: var(--space-2);
19
+ }
20
+
21
+ .pf-breadcrumbs__link {
22
+ color: var(--pf-breadcrumbs-link-color);
23
+ font-size: var(--font-size-sm);
24
+ line-height: 1.4;
25
+ text-decoration: none;
26
+ }
27
+
28
+ .pf-breadcrumbs__link:hover {
29
+ color: var(--pf-breadcrumbs-link-hover-color);
30
+ text-decoration: underline;
31
+ }
32
+
33
+ .pf-breadcrumbs__link--current,
34
+ .pf-breadcrumbs__link[aria-current='page'] {
35
+ color: var(--pf-breadcrumbs-link-current-color);
36
+ font-weight: var(--font-weight-medium);
37
+ text-decoration: none;
38
+ }
39
+
40
+ .pf-breadcrumbs__separator {
41
+ color: var(--pf-breadcrumbs-separator-color);
42
+ display: inline-flex;
43
+ font-size: var(--font-size-xs);
44
+ line-height: 1;
45
+ }
@@ -1,5 +1,5 @@
1
- import { cx } from "./index4.js";
2
- /* empty css */
1
+ import { cx } from "../../utils/cx.js";
2
+ import './Breadcrumbs.css';/* empty css */
3
3
  import { forwardRef } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/Breadcrumbs/Breadcrumbs.tsx