@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
@@ -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 "./index4.js";
2
- /* empty css */
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
@@ -0,0 +1,106 @@
1
+ .pf-metric-grid {
2
+ display: grid;
3
+ gap: var(--space-4);
4
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
5
+ }
6
+
7
+ .pf-metric-card {
8
+ background: var(--pf-metric-bg);
9
+ border: 1px solid var(--pf-metric-border);
10
+ border-radius: var(--radius-md);
11
+ display: grid;
12
+ gap: var(--space-3);
13
+ padding: var(--space-3);
14
+ }
15
+
16
+ @media (min-width: 768px) {
17
+ .pf-metric-card {
18
+ padding: var(--space-4);
19
+ }
20
+ }
21
+
22
+ .pf-metric-card__header {
23
+ align-items: start;
24
+ display: flex;
25
+ gap: var(--space-3);
26
+ justify-content: space-between;
27
+ }
28
+
29
+ .pf-metric-card__heading-wrap {
30
+ align-items: center;
31
+ display: inline-flex;
32
+ gap: var(--space-2);
33
+ min-width: 0;
34
+ }
35
+
36
+ .pf-metric-card__heading {
37
+ color: var(--pf-metric-text-muted);
38
+ font-size: var(--font-size-sm);
39
+ margin: 0;
40
+ }
41
+
42
+ .pf-metric-card__icon {
43
+ align-items: center;
44
+ color: var(--pf-metric-text-muted);
45
+ display: inline-flex;
46
+ font-size: var(--font-size-sm);
47
+ justify-content: center;
48
+ }
49
+
50
+ .pf-metric-card__action {
51
+ align-items: center;
52
+ display: inline-flex;
53
+ gap: var(--space-2);
54
+ }
55
+
56
+ .pf-metric-card__body {
57
+ align-items: baseline;
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: var(--space-2);
61
+ }
62
+
63
+ .pf-metric-card__value {
64
+ color: var(--pf-metric-text);
65
+ font-size: clamp(var(--font-size-3xl), 3vw, var(--font-size-4xl));
66
+ font-weight: var(--font-weight-semibold);
67
+ letter-spacing: -0.02em;
68
+ line-height: 1.05;
69
+ margin: 0;
70
+ }
71
+
72
+ .pf-metric-card__trend {
73
+ align-items: center;
74
+ border-radius: var(--radius-full);
75
+ display: inline-flex;
76
+ font-size: var(--font-size-xs);
77
+ font-weight: var(--font-weight-medium);
78
+ gap: var(--space-1);
79
+ padding: var(--space-1) var(--space-2);
80
+ }
81
+
82
+ .pf-metric-card__trend-symbol {
83
+ font-size: var(--font-size-2xs);
84
+ line-height: 1;
85
+ }
86
+
87
+ .pf-metric-card__trend--positive {
88
+ background: color-mix(in srgb, var(--pf-metric-success-bg) 55%, var(--color-base-white));
89
+ color: var(--pf-metric-success-text);
90
+ }
91
+
92
+ .pf-metric-card__trend--negative {
93
+ background: color-mix(in srgb, var(--pf-metric-danger-bg) 55%, var(--color-base-white));
94
+ color: var(--pf-metric-danger-text);
95
+ }
96
+
97
+ .pf-metric-card__trend--neutral {
98
+ background: var(--pf-metric-bg-subtle);
99
+ color: var(--pf-metric-text-muted);
100
+ }
101
+
102
+ .pf-metric-card__description {
103
+ color: var(--pf-metric-text-muted);
104
+ font-size: var(--font-size-sm);
105
+ margin: 0;
106
+ }
@@ -1,6 +1,6 @@
1
- import { cx } from "./index4.js";
2
- import { Icon } from "./index6.js";
3
- /* empty css */
1
+ import { cx } from "../../utils/cx.js";
2
+ import { Icon } from "../Icon/Icon2.js";
3
+ import './Metrics.css';/* empty css */
4
4
  import { forwardRef } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Metrics/Metrics.tsx
@@ -0,0 +1,198 @@
1
+ .pf-modal__portal {
2
+ inset: 0;
3
+ position: fixed;
4
+ z-index: 1000;
5
+ }
6
+
7
+ .pf-modal__overlay {
8
+ background: var(--pf-modal-overlay-backdrop, var(--pf-overlay-backdrop));
9
+ inset: 0;
10
+ position: absolute;
11
+ }
12
+
13
+ .pf-modal__viewport {
14
+ align-items: end;
15
+ display: flex;
16
+ inset: 0;
17
+ justify-content: center;
18
+ overflow-y: auto;
19
+ padding: var(--space-2);
20
+ position: relative;
21
+ }
22
+
23
+ @media (min-width: 768px) {
24
+ .pf-modal__viewport {
25
+ align-items: center;
26
+ padding: var(--space-4);
27
+ }
28
+ }
29
+
30
+ .pf-modal {
31
+ background: var(--pf-modal-bg);
32
+ border: 1px solid color-mix(in srgb, var(--pf-modal-border) 85%, transparent);
33
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
34
+ box-shadow: var(--pf-modal-elevation-overlay-shadow, var(--pf-elevation-overlay-shadow));
35
+ color: var(--pf-modal-text);
36
+ display: grid;
37
+ max-height: 92vh;
38
+ overflow: hidden;
39
+ width: 100%;
40
+ }
41
+
42
+ @media (min-width: 768px) {
43
+ .pf-modal {
44
+ border-radius: var(--radius-lg);
45
+ max-height: min(90vh, 720px);
46
+ }
47
+ }
48
+
49
+ .pf-modal:focus-visible {
50
+ outline: none;
51
+ }
52
+
53
+ .pf-modal--sm {
54
+ max-width: 420px;
55
+ }
56
+
57
+ .pf-modal--md {
58
+ max-width: 560px;
59
+ }
60
+
61
+ .pf-modal--lg {
62
+ max-width: 720px;
63
+ }
64
+
65
+ .pf-modal__header,
66
+ .pf-modal__footer {
67
+ align-items: start;
68
+ display: flex;
69
+ gap: var(--space-3);
70
+ justify-content: space-between;
71
+ padding: var(--space-3);
72
+ }
73
+
74
+ @media (min-width: 768px) {
75
+ .pf-modal__header,
76
+ .pf-modal__body,
77
+ .pf-modal__footer {
78
+ padding: var(--space-4);
79
+ }
80
+ }
81
+
82
+ .pf-modal__header {
83
+ border-bottom: 1px solid var(--pf-modal-border);
84
+ }
85
+
86
+ .pf-modal__footer {
87
+ border-top: 1px solid var(--pf-modal-border);
88
+ justify-content: flex-end;
89
+ }
90
+
91
+ .pf-modal__body {
92
+ display: grid;
93
+ gap: var(--space-4);
94
+ overflow-y: auto;
95
+ padding: var(--space-3);
96
+ }
97
+
98
+ .pf-modal__heading-group {
99
+ display: grid;
100
+ gap: var(--space-1);
101
+ min-width: 0;
102
+ }
103
+
104
+ .pf-modal__title {
105
+ font-size: var(--font-size-lg);
106
+ font-weight: var(--font-weight-semibold);
107
+ line-height: 1.2;
108
+ margin: 0;
109
+ }
110
+
111
+ .pf-modal__description {
112
+ color: var(--pf-modal-text-muted);
113
+ font-size: var(--font-size-sm);
114
+ line-height: 1.45;
115
+ margin: 0;
116
+ }
117
+
118
+ .pf-modal__close {
119
+ align-items: center;
120
+ background: transparent;
121
+ border: 0;
122
+ border-radius: var(--radius-sm);
123
+ color: var(--pf-modal-text-muted);
124
+ cursor: pointer;
125
+ display: inline-flex;
126
+ flex: 0 0 auto;
127
+ font-size: var(--font-size-lg);
128
+ height: var(--space-8);
129
+ justify-content: center;
130
+ width: var(--space-8);
131
+ }
132
+
133
+ .pf-modal__close:hover,
134
+ .pf-modal__close:focus-visible {
135
+ background: var(--pf-modal-bg-subtle);
136
+ color: var(--pf-modal-text);
137
+ outline: none;
138
+ }
139
+
140
+ /* Entrance animation — uses motion tokens via theme aliases */
141
+ @keyframes pf-modal-overlay-in {
142
+ from {
143
+ opacity: 0;
144
+ }
145
+ to {
146
+ opacity: 1;
147
+ }
148
+ }
149
+
150
+ @keyframes pf-modal-in {
151
+ from {
152
+ opacity: 0;
153
+ transform: translateY(8px) scale(0.98);
154
+ }
155
+ to {
156
+ opacity: 1;
157
+ transform: translateY(0) scale(1);
158
+ }
159
+ }
160
+
161
+ .pf-modal__overlay {
162
+ animation: pf-modal-overlay-in var(--pf-transition-fast);
163
+ }
164
+
165
+ .pf-modal {
166
+ animation: pf-modal-in var(--pf-transition-enter);
167
+ }
168
+
169
+ /* Exit animation — plays while the dialog is being dismissed (presence handling) */
170
+ @keyframes pf-modal-overlay-out {
171
+ to {
172
+ opacity: 0;
173
+ }
174
+ }
175
+
176
+ @keyframes pf-modal-out {
177
+ to {
178
+ opacity: 0;
179
+ transform: translateY(8px) scale(0.98);
180
+ }
181
+ }
182
+
183
+ .pf-modal__overlay--exiting {
184
+ animation: pf-modal-overlay-out var(--pf-transition-fast) forwards;
185
+ }
186
+
187
+ .pf-modal--exiting {
188
+ animation: pf-modal-out var(--pf-transition-fast) forwards;
189
+ }
190
+
191
+ @media (prefers-reduced-motion: reduce) {
192
+ .pf-modal__overlay,
193
+ .pf-modal,
194
+ .pf-modal__overlay--exiting,
195
+ .pf-modal--exiting {
196
+ animation: none;
197
+ }
198
+ }
@@ -1,7 +1,8 @@
1
- import { cx } from "./index4.js";
2
- import { Icon } from "./index6.js";
3
- import { useFocusTrap } from "./index34.js";
4
- /* empty css */
1
+ import { useFocusTrap } from "../../hooks/useFocusTrap.js";
2
+ import { usePresence } from "../../hooks/usePresence.js";
3
+ import { cx } from "../../utils/cx.js";
4
+ import { Icon } from "../Icon/Icon2.js";
5
+ import './Modal.css';/* empty css */
5
6
  import { forwardRef, useEffect, useId, useImperativeHandle, useRef } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { createPortal } from "react-dom";
@@ -28,25 +29,26 @@ var Modal = forwardRef(function Modal({ className, open, onOpenChange, title, de
28
29
  const titleId = useId();
29
30
  const descriptionId = useId();
30
31
  const dialogRef = useRef(null);
32
+ const { isMounted, isExiting } = usePresence(open);
31
33
  useImperativeHandle(ref, () => dialogRef.current, []);
32
34
  useEffect(() => {
33
- if (!open || typeof document === "undefined") return;
35
+ if (!isMounted || typeof document === "undefined") return;
34
36
  const originalOverflow = document.body.style.overflow;
35
37
  document.body.style.overflow = "hidden";
36
38
  return () => {
37
39
  document.body.style.overflow = originalOverflow;
38
40
  };
39
- }, [open]);
41
+ }, [isMounted]);
40
42
  useFocusTrap({
41
43
  containerRef: dialogRef,
42
44
  enabled: open,
43
45
  onEscape: () => onOpenChange?.(false)
44
46
  });
45
- if (!open || typeof document === "undefined") return null;
47
+ if (!isMounted || typeof document === "undefined") return null;
46
48
  return createPortal(/* @__PURE__ */ jsxs("div", {
47
49
  className: "pf-modal__portal",
48
50
  children: [/* @__PURE__ */ jsx("div", {
49
- className: "pf-modal__overlay",
51
+ className: cx("pf-modal__overlay", isExiting && "pf-modal__overlay--exiting"),
50
52
  onClick: () => {
51
53
  if (closeOnOverlayClick) onOpenChange?.(false);
52
54
  }
@@ -54,7 +56,7 @@ var Modal = forwardRef(function Modal({ className, open, onOpenChange, title, de
54
56
  className: "pf-modal__viewport",
55
57
  children: /* @__PURE__ */ jsxs("div", {
56
58
  ref: dialogRef,
57
- className: cx("pf-modal", `pf-modal--${size}`, className),
59
+ className: cx("pf-modal", `pf-modal--${size}`, isExiting && "pf-modal--exiting", className),
58
60
  role: "dialog",
59
61
  "aria-modal": "true",
60
62
  "aria-labelledby": title ? titleId : void 0,
@@ -0,0 +1,174 @@
1
+ .pf-multi-select {
2
+ position: relative;
3
+ }
4
+
5
+ .pf-multi-select__trigger {
6
+ align-items: center;
7
+ background: var(--pf-multiselect-bg);
8
+ border: 1px solid var(--pf-multiselect-border);
9
+ border-radius: var(--radius-md);
10
+ color: var(--pf-multiselect-text);
11
+ cursor: pointer;
12
+ display: flex;
13
+ font: inherit;
14
+ gap: var(--space-2);
15
+ justify-content: space-between;
16
+ min-height: 40px;
17
+ padding: var(--space-1) var(--space-2) var(--space-1) var(--space-2);
18
+ text-align: start;
19
+ width: 100%;
20
+ transition:
21
+ background 0.2s,
22
+ border 0.2s,
23
+ color 0.2s,
24
+ opacity 0.2s;
25
+ }
26
+
27
+ .pf-multi-select__trigger:disabled,
28
+ .pf-multi-select__trigger[aria-disabled='true'] {
29
+ background: var(--pf-control-bg-disabled);
30
+ border-color: var(--pf-control-border-disabled);
31
+ color: var(--pf-control-text-disabled);
32
+ cursor: not-allowed;
33
+ opacity: 0.6;
34
+ }
35
+
36
+ .pf-multi-select__trigger:focus {
37
+ outline: none;
38
+ }
39
+
40
+ .pf-multi-select__trigger:focus-visible {
41
+ border-color: var(--pf-multiselect-focus-border);
42
+ box-shadow: var(--pf-multiselect-focus-ring, var(--pf-focus-ring));
43
+ }
44
+
45
+ .pf-multi-select__trigger--open {
46
+ border-color: var(--pf-multiselect-focus-border);
47
+ }
48
+
49
+ .pf-multi-select__trigger--invalid {
50
+ border-color: var(--pf-multiselect-invalid-border);
51
+ }
52
+
53
+ .pf-multi-select__placeholder {
54
+ color: var(--pf-multiselect-text-muted);
55
+ }
56
+
57
+ .pf-multi-select__chips {
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: var(--space-1);
61
+ }
62
+
63
+ .pf-multi-select__chip {
64
+ background: var(--pf-multiselect-bg-subtle);
65
+ border-radius: var(--radius-full);
66
+ color: var(--pf-multiselect-text);
67
+ font-size: var(--font-size-sm);
68
+ line-height: 1;
69
+ padding: 7px var(--space-2);
70
+ }
71
+
72
+ .pf-multi-select__icon {
73
+ align-items: center;
74
+ color: var(--pf-multiselect-text);
75
+ display: inline-flex;
76
+ flex-shrink: 0;
77
+ height: 20px;
78
+ justify-content: center;
79
+ width: 20px;
80
+ transform-origin: center;
81
+ transition: transform var(--pf-transition-fast);
82
+ }
83
+
84
+ .pf-multi-select__icon svg {
85
+ display: block;
86
+ height: 16px;
87
+ width: 16px;
88
+ }
89
+
90
+ .pf-multi-select__icon--open {
91
+ transform: rotate(180deg);
92
+ }
93
+
94
+ .pf-multi-select__menu {
95
+ background: var(--pf-multiselect-bg);
96
+ border: 1px solid var(--pf-multiselect-border);
97
+ border-radius: var(--radius-md);
98
+ box-shadow: var(--pf-multiselect-elevation-popover-shadow, var(--pf-elevation-popover-shadow));
99
+ list-style: none;
100
+ margin: 0;
101
+ max-height: 240px;
102
+ overflow: auto;
103
+ padding: var(--space-1);
104
+ position: fixed;
105
+ z-index: 1000;
106
+ transform-origin: top center;
107
+ animation: pf-multi-select-menu-in var(--duration-fast) var(--easing-decelerate);
108
+ }
109
+
110
+ @keyframes pf-multi-select-menu-in {
111
+ from {
112
+ opacity: 0;
113
+ transform: translateY(-4px) scaleY(0.96);
114
+ }
115
+ to {
116
+ opacity: 1;
117
+ transform: translateY(0) scaleY(1);
118
+ }
119
+ }
120
+
121
+ .pf-multi-select__option {
122
+ align-items: center;
123
+ border-radius: var(--radius-sm);
124
+ color: var(--pf-multiselect-text);
125
+ cursor: pointer;
126
+ display: flex;
127
+ justify-content: space-between;
128
+ gap: var(--space-2);
129
+ padding: var(--space-2) var(--space-3);
130
+ }
131
+
132
+ .pf-multi-select__option:hover,
133
+ .pf-multi-select__option--active {
134
+ background: var(--pf-multiselect-active-bg);
135
+ color: var(--pf-multiselect-active-text);
136
+ }
137
+
138
+ .pf-multi-select__option--selected {
139
+ font-weight: var(--font-weight-medium);
140
+ }
141
+
142
+ .pf-multi-select__option--disabled {
143
+ background: transparent;
144
+ color: var(--pf-multiselect-text-muted);
145
+ cursor: not-allowed;
146
+ }
147
+
148
+ .pf-multi-select__option--disabled:hover {
149
+ background: transparent;
150
+ color: var(--pf-multiselect-text-muted);
151
+ }
152
+
153
+ .pf-multi-select__check {
154
+ display: inline-flex;
155
+ height: 16px;
156
+ width: 16px;
157
+ }
158
+
159
+ .pf-multi-select__check svg {
160
+ display: block;
161
+ height: 16px;
162
+ width: 16px;
163
+ }
164
+
165
+ @media (prefers-reduced-motion: reduce) {
166
+ .pf-multi-select__trigger,
167
+ .pf-multi-select__icon {
168
+ transition: none;
169
+ }
170
+
171
+ .pf-multi-select__menu {
172
+ animation: none;
173
+ }
174
+ }
@@ -1,14 +1,14 @@
1
- import { Keys, composeDescribedBy, isActivationKey } from "./index3.js";
2
- import { cx } from "./index4.js";
3
- import { Icon } from "./index6.js";
4
- import { FieldWrapper } from "./index19.js";
5
- import { useAnchoredPosition } from "./index30.js";
6
- import { useComposedRefs } from "./index31.js";
7
- import { useControllableState } from "./index32.js";
8
- import { useDisclosure } from "./index33.js";
9
- import { useListNavigation } from "./index35.js";
10
- import { useOutsideInteraction } from "./index36.js";
11
- /* empty css */
1
+ import { Keys, composeDescribedBy, isActivationKey } from "../../a11y/index.js";
2
+ import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
3
+ import { useComposedRefs } from "../../hooks/useComposedRefs.js";
4
+ import { useControllableState } from "../../hooks/useControllableState.js";
5
+ import { useDisclosure } from "../../hooks/useDisclosure.js";
6
+ import { useListNavigation } from "../../hooks/useListNavigation.js";
7
+ import { useOutsideInteraction } from "../../hooks/useOutsideInteraction.js";
8
+ import { cx } from "../../utils/cx.js";
9
+ import { Icon } from "../Icon/Icon2.js";
10
+ import { FieldWrapper } from "../../utils/FieldWrapper.js";
11
+ import './MultiSelect.css';/* empty css */
12
12
  import { forwardRef, useEffect, useId, useMemo, useRef } from "react";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { createPortal } from "react-dom";
@@ -125,7 +125,6 @@ var MultiSelect = forwardRef(({ id, options, value, defaultValue, onValueChange,
125
125
  "aria-haspopup": "listbox",
126
126
  "aria-expanded": isOpen,
127
127
  "aria-required": required || void 0,
128
- "aria-controls": isOpen ? listboxId : void 0,
129
128
  "aria-describedby": describedBy,
130
129
  onClick: () => {
131
130
  disclosure.toggle();