@pitchfork-ui/react 0.1.9

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 (242) hide show
  1. package/README.md +60 -0
  2. package/dist/index.cjs +9010 -0
  3. package/dist/index.js +63 -0
  4. package/dist/index10.js +36 -0
  5. package/dist/index100.js +26 -0
  6. package/dist/index102.js +190 -0
  7. package/dist/index104.js +93 -0
  8. package/dist/index106.js +27 -0
  9. package/dist/index108.js +88 -0
  10. package/dist/index110.js +96 -0
  11. package/dist/index112.js +38 -0
  12. package/dist/index114.js +155 -0
  13. package/dist/index116.js +193 -0
  14. package/dist/index118.js +24 -0
  15. package/dist/index12.js +38 -0
  16. package/dist/index120.js +69 -0
  17. package/dist/index14.js +24 -0
  18. package/dist/index16.js +64 -0
  19. package/dist/index18.js +39 -0
  20. package/dist/index19.js +35 -0
  21. package/dist/index21.js +37 -0
  22. package/dist/index23.js +13 -0
  23. package/dist/index25.js +38 -0
  24. package/dist/index27.js +68 -0
  25. package/dist/index29.js +25 -0
  26. package/dist/index3.js +32 -0
  27. package/dist/index30.js +49 -0
  28. package/dist/index31.js +15 -0
  29. package/dist/index32.js +22 -0
  30. package/dist/index33.js +25 -0
  31. package/dist/index34.js +55 -0
  32. package/dist/index35.js +36 -0
  33. package/dist/index36.js +22 -0
  34. package/dist/index38.js +149 -0
  35. package/dist/index4.js +6 -0
  36. package/dist/index40.js +255 -0
  37. package/dist/index42.js +134 -0
  38. package/dist/index43.js +16 -0
  39. package/dist/index44.js +4232 -0
  40. package/dist/index46.js +123 -0
  41. package/dist/index48.js +41 -0
  42. package/dist/index50.js +135 -0
  43. package/dist/index52.js +39 -0
  44. package/dist/index54.js +186 -0
  45. package/dist/index56.js +63 -0
  46. package/dist/index58.js +45 -0
  47. package/dist/index6.js +182 -0
  48. package/dist/index60.js +264 -0
  49. package/dist/index62.js +68 -0
  50. package/dist/index64.js +69 -0
  51. package/dist/index66.js +95 -0
  52. package/dist/index68.js +202 -0
  53. package/dist/index70.js +68 -0
  54. package/dist/index72.js +50 -0
  55. package/dist/index74.js +88 -0
  56. package/dist/index76.js +92 -0
  57. package/dist/index78.js +76 -0
  58. package/dist/index8.js +61 -0
  59. package/dist/index80.js +44 -0
  60. package/dist/index82.js +116 -0
  61. package/dist/index84.js +25 -0
  62. package/dist/index86.js +56 -0
  63. package/dist/index88.js +88 -0
  64. package/dist/index90.js +167 -0
  65. package/dist/index92.js +32 -0
  66. package/dist/index94.js +40 -0
  67. package/dist/index96.js +87 -0
  68. package/dist/index98.js +185 -0
  69. package/dist/src/a11y/index.d.ts +15 -0
  70. package/dist/src/components/Alert/Alert.d.ts +10 -0
  71. package/dist/src/components/Alert/Alert.test.d.ts +1 -0
  72. package/dist/src/components/Alert/index.d.ts +1 -0
  73. package/dist/src/components/Avatar/Avatar.d.ts +10 -0
  74. package/dist/src/components/Avatar/Avatar.test.d.ts +1 -0
  75. package/dist/src/components/Avatar/index.d.ts +1 -0
  76. package/dist/src/components/Badge/Badge.d.ts +5 -0
  77. package/dist/src/components/Badge/Badge.test.d.ts +1 -0
  78. package/dist/src/components/Badge/index.d.ts +1 -0
  79. package/dist/src/components/BadgeGroup/BadgeGroup.d.ts +11 -0
  80. package/dist/src/components/BadgeGroup/BadgeGroup.test.d.ts +1 -0
  81. package/dist/src/components/BadgeGroup/index.d.ts +1 -0
  82. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +11 -0
  83. package/dist/src/components/Breadcrumbs/Breadcrumbs.test.d.ts +1 -0
  84. package/dist/src/components/Breadcrumbs/index.d.ts +1 -0
  85. package/dist/src/components/Button/Button.d.ts +9 -0
  86. package/dist/src/components/Button/Button.test.d.ts +1 -0
  87. package/dist/src/components/Button/index.d.ts +1 -0
  88. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +16 -0
  89. package/dist/src/components/ButtonGroup/ButtonGroup.test.d.ts +1 -0
  90. package/dist/src/components/ButtonGroup/index.d.ts +1 -0
  91. package/dist/src/components/Calendar/Calendar.d.ts +14 -0
  92. package/dist/src/components/Calendar/Calendar.test.d.ts +1 -0
  93. package/dist/src/components/Calendar/index.d.ts +1 -0
  94. package/dist/src/components/Card/Card.d.ts +20 -0
  95. package/dist/src/components/Card/Card.test.d.ts +1 -0
  96. package/dist/src/components/Card/index.d.ts +1 -0
  97. package/dist/src/components/Carousel/Carousel.d.ts +10 -0
  98. package/dist/src/components/Carousel/Carousel.test.d.ts +1 -0
  99. package/dist/src/components/Carousel/index.d.ts +1 -0
  100. package/dist/src/components/Checkbox/Checkbox.d.ts +4 -0
  101. package/dist/src/components/Checkbox/Checkbox.test.d.ts +1 -0
  102. package/dist/src/components/Checkbox/index.d.ts +1 -0
  103. package/dist/src/components/CodeSnippet/CodeSnippet.d.ts +11 -0
  104. package/dist/src/components/CodeSnippet/CodeSnippet.test.d.ts +1 -0
  105. package/dist/src/components/CodeSnippet/index.d.ts +1 -0
  106. package/dist/src/components/ContentDivider/ContentDivider.d.ts +7 -0
  107. package/dist/src/components/ContentDivider/ContentDivider.test.d.ts +1 -0
  108. package/dist/src/components/ContentDivider/index.d.ts +1 -0
  109. package/dist/src/components/CreditCard/CreditCard.d.ts +10 -0
  110. package/dist/src/components/CreditCard/CreditCard.test.d.ts +1 -0
  111. package/dist/src/components/CreditCard/index.d.ts +1 -0
  112. package/dist/src/components/DatePicker/DatePicker.d.ts +17 -0
  113. package/dist/src/components/DatePicker/DatePicker.test.d.ts +1 -0
  114. package/dist/src/components/DatePicker/index.d.ts +1 -0
  115. package/dist/src/components/Dropdown/Dropdown.d.ts +20 -0
  116. package/dist/src/components/Dropdown/Dropdown.test.d.ts +1 -0
  117. package/dist/src/components/Dropdown/index.d.ts +1 -0
  118. package/dist/src/components/EmptyState/EmptyState.d.ts +11 -0
  119. package/dist/src/components/EmptyState/EmptyState.test.d.ts +1 -0
  120. package/dist/src/components/EmptyState/index.d.ts +1 -0
  121. package/dist/src/components/FileUploader/FileUploader.d.ts +15 -0
  122. package/dist/src/components/FileUploader/FileUploader.test.d.ts +1 -0
  123. package/dist/src/components/FileUploader/index.d.ts +1 -0
  124. package/dist/src/components/HeaderNavigation/HeaderNavigation.d.ts +12 -0
  125. package/dist/src/components/HeaderNavigation/HeaderNavigation.test.d.ts +1 -0
  126. package/dist/src/components/HeaderNavigation/index.d.ts +1 -0
  127. package/dist/src/components/Icon/Icon.d.ts +12 -0
  128. package/dist/src/components/Icon/Icon.test.d.ts +1 -0
  129. package/dist/src/components/Icon/index.d.ts +1 -0
  130. package/dist/src/components/InlineCTA/InlineCTA.d.ts +11 -0
  131. package/dist/src/components/InlineCTA/InlineCTA.test.d.ts +1 -0
  132. package/dist/src/components/InlineCTA/index.d.ts +1 -0
  133. package/dist/src/components/Input/Input.d.ts +6 -0
  134. package/dist/src/components/Input/Input.test.d.ts +1 -0
  135. package/dist/src/components/Input/index.d.ts +1 -0
  136. package/dist/src/components/LineBarCharts/LineBarChart.d.ts +29 -0
  137. package/dist/src/components/LineBarCharts/LineBarChart.test.d.ts +1 -0
  138. package/dist/src/components/LineBarCharts/index.d.ts +1 -0
  139. package/dist/src/components/LoadingIndicators/LoadingIndicators.d.ts +17 -0
  140. package/dist/src/components/LoadingIndicators/LoadingIndicators.test.d.ts +1 -0
  141. package/dist/src/components/LoadingIndicators/index.d.ts +1 -0
  142. package/dist/src/components/Metrics/Metrics.d.ts +15 -0
  143. package/dist/src/components/Metrics/Metrics.test.d.ts +1 -0
  144. package/dist/src/components/Metrics/index.d.ts +1 -0
  145. package/dist/src/components/Modal/Modal.d.ts +16 -0
  146. package/dist/src/components/Modal/Modal.test.d.ts +1 -0
  147. package/dist/src/components/Modal/index.d.ts +1 -0
  148. package/dist/src/components/MultiSelect/MultiSelect.d.ts +18 -0
  149. package/dist/src/components/MultiSelect/MultiSelect.test.d.ts +1 -0
  150. package/dist/src/components/MultiSelect/index.d.ts +1 -0
  151. package/dist/src/components/Notification/Notification.d.ts +16 -0
  152. package/dist/src/components/Notification/Notification.test.d.ts +1 -0
  153. package/dist/src/components/Notification/index.d.ts +1 -0
  154. package/dist/src/components/PageHeader/PageHeader.d.ts +12 -0
  155. package/dist/src/components/PageHeader/PageHeader.test.d.ts +1 -0
  156. package/dist/src/components/PageHeader/index.d.ts +1 -0
  157. package/dist/src/components/Pagination/Pagination.d.ts +14 -0
  158. package/dist/src/components/Pagination/Pagination.test.d.ts +1 -0
  159. package/dist/src/components/Pagination/index.d.ts +1 -0
  160. package/dist/src/components/PieChart/PieChart.d.ts +14 -0
  161. package/dist/src/components/PieChart/PieChart.test.d.ts +1 -0
  162. package/dist/src/components/PieChart/index.d.ts +1 -0
  163. package/dist/src/components/ProgressIndicators/ProgressIndicators.d.ts +16 -0
  164. package/dist/src/components/ProgressIndicators/ProgressIndicators.test.d.ts +1 -0
  165. package/dist/src/components/ProgressIndicators/index.d.ts +1 -0
  166. package/dist/src/components/ProgressSteps/ProgressSteps.d.ts +12 -0
  167. package/dist/src/components/ProgressSteps/ProgressSteps.test.d.ts +1 -0
  168. package/dist/src/components/ProgressSteps/index.d.ts +1 -0
  169. package/dist/src/components/RadarChart/RadarChart.d.ts +15 -0
  170. package/dist/src/components/RadarChart/RadarChart.test.d.ts +1 -0
  171. package/dist/src/components/RadarChart/index.d.ts +1 -0
  172. package/dist/src/components/RadioButton/RadioButton.d.ts +4 -0
  173. package/dist/src/components/RadioButton/RadioButton.test.d.ts +1 -0
  174. package/dist/src/components/RadioButton/index.d.ts +1 -0
  175. package/dist/src/components/RadioGroup/RadioGroup.d.ts +17 -0
  176. package/dist/src/components/RadioGroup/RadioGroup.test.d.ts +1 -0
  177. package/dist/src/components/RadioGroup/index.d.ts +1 -0
  178. package/dist/src/components/Rating/Rating.d.ts +15 -0
  179. package/dist/src/components/Rating/Rating.test.d.ts +1 -0
  180. package/dist/src/components/Rating/index.d.ts +1 -0
  181. package/dist/src/components/RichTextEditor/RichTextEditor.d.ts +14 -0
  182. package/dist/src/components/RichTextEditor/RichTextEditor.test.d.ts +1 -0
  183. package/dist/src/components/RichTextEditor/index.d.ts +1 -0
  184. package/dist/src/components/SectionFooter/SectionFooter.d.ts +8 -0
  185. package/dist/src/components/SectionFooter/SectionFooter.test.d.ts +1 -0
  186. package/dist/src/components/SectionFooter/index.d.ts +1 -0
  187. package/dist/src/components/SectionHeader/SectionHeader.d.ts +10 -0
  188. package/dist/src/components/SectionHeader/SectionHeader.test.d.ts +1 -0
  189. package/dist/src/components/SectionHeader/index.d.ts +1 -0
  190. package/dist/src/components/Select/Select.d.ts +22 -0
  191. package/dist/src/components/Select/Select.test.d.ts +1 -0
  192. package/dist/src/components/Select/index.d.ts +1 -0
  193. package/dist/src/components/SidebarNavigation/SidebarNavigation.d.ts +19 -0
  194. package/dist/src/components/SidebarNavigation/SidebarNavigation.test.d.ts +1 -0
  195. package/dist/src/components/SidebarNavigation/index.d.ts +1 -0
  196. package/dist/src/components/SlideoutMenu/SlideoutMenu.d.ts +17 -0
  197. package/dist/src/components/SlideoutMenu/SlideoutMenu.test.d.ts +1 -0
  198. package/dist/src/components/SlideoutMenu/index.d.ts +1 -0
  199. package/dist/src/components/Slider/Slider.d.ts +10 -0
  200. package/dist/src/components/Slider/Slider.test.d.ts +1 -0
  201. package/dist/src/components/Slider/index.d.ts +1 -0
  202. package/dist/src/components/Switch/Switch.d.ts +4 -0
  203. package/dist/src/components/Switch/Switch.test.d.ts +1 -0
  204. package/dist/src/components/Switch/index.d.ts +1 -0
  205. package/dist/src/components/Table/Table.d.ts +34 -0
  206. package/dist/src/components/Table/Table.test.d.ts +1 -0
  207. package/dist/src/components/Table/index.d.ts +1 -0
  208. package/dist/src/components/Tabs/Tabs.d.ts +18 -0
  209. package/dist/src/components/Tabs/Tabs.test.d.ts +1 -0
  210. package/dist/src/components/Tabs/index.d.ts +1 -0
  211. package/dist/src/components/Tag/Tag.d.ts +7 -0
  212. package/dist/src/components/Tag/Tag.test.d.ts +1 -0
  213. package/dist/src/components/Tag/index.d.ts +1 -0
  214. package/dist/src/components/Textarea/Textarea.d.ts +6 -0
  215. package/dist/src/components/Textarea/Textarea.test.d.ts +1 -0
  216. package/dist/src/components/Textarea/index.d.ts +1 -0
  217. package/dist/src/components/Tooltip/Tooltip.d.ts +11 -0
  218. package/dist/src/components/Tooltip/Tooltip.test.d.ts +1 -0
  219. package/dist/src/components/Tooltip/index.d.ts +1 -0
  220. package/dist/src/components/TreeView/TreeView.d.ts +22 -0
  221. package/dist/src/components/TreeView/TreeView.test.d.ts +1 -0
  222. package/dist/src/components/TreeView/index.d.ts +1 -0
  223. package/dist/src/components/UtilityButton/UtilityButton.d.ts +9 -0
  224. package/dist/src/components/UtilityButton/UtilityButton.test.d.ts +1 -0
  225. package/dist/src/components/UtilityButton/index.d.ts +1 -0
  226. package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +20 -0
  227. package/dist/src/components/VideoPlayer/VideoPlayer.test.d.ts +1 -0
  228. package/dist/src/components/VideoPlayer/index.d.ts +1 -0
  229. package/dist/src/hooks/index.d.ts +7 -0
  230. package/dist/src/hooks/useAnchoredPosition.d.ts +12 -0
  231. package/dist/src/hooks/useComposedRefs.d.ts +1 -0
  232. package/dist/src/hooks/useControllableState.d.ts +6 -0
  233. package/dist/src/hooks/useDisclosure.d.ts +13 -0
  234. package/dist/src/hooks/useFocusTrap.d.ts +7 -0
  235. package/dist/src/hooks/useListNavigation.d.ts +15 -0
  236. package/dist/src/hooks/useOutsideInteraction.d.ts +7 -0
  237. package/dist/src/index.d.ts +55 -0
  238. package/dist/src/test/setup.d.ts +0 -0
  239. package/dist/src/utils/FieldWrapper.d.ts +15 -0
  240. package/dist/src/utils/cx.d.ts +1 -0
  241. package/dist/styles.css +5676 -0
  242. package/package.json +43 -0
@@ -0,0 +1,185 @@
1
+ import { cx } from "./index4.js";
2
+ import { Icon } from "./index6.js";
3
+ /* empty css */
4
+ import { useEffect, useId, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { createPortal } from "react-dom";
7
+ //#region src/components/SlideoutMenu/SlideoutMenu.tsx
8
+ var FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
9
+ function SlideoutMenu({ className, open, onOpenChange, title, description, footer, placement = "right", size = "md", closeOnOverlayClick = true, showCloseButton = true, children, ...props }) {
10
+ const ANIMATION_DURATION_MS = 220;
11
+ const titleId = useId();
12
+ const descriptionId = useId();
13
+ const panelRef = useRef(null);
14
+ const previousActiveRef = useRef(null);
15
+ const closeTimerRef = useRef(null);
16
+ const [mounted, setMounted] = useState(open);
17
+ const [visible, setVisible] = useState(open);
18
+ useEffect(() => {
19
+ if (typeof window === "undefined") return;
20
+ if (open) {
21
+ if (closeTimerRef.current) {
22
+ clearTimeout(closeTimerRef.current);
23
+ closeTimerRef.current = null;
24
+ }
25
+ setMounted(true);
26
+ setVisible(false);
27
+ closeTimerRef.current = setTimeout(() => {
28
+ setVisible(true);
29
+ closeTimerRef.current = null;
30
+ }, 16);
31
+ return;
32
+ }
33
+ setVisible(false);
34
+ closeTimerRef.current = setTimeout(() => {
35
+ setMounted(false);
36
+ }, ANIMATION_DURATION_MS);
37
+ return () => {
38
+ if (closeTimerRef.current) {
39
+ clearTimeout(closeTimerRef.current);
40
+ closeTimerRef.current = null;
41
+ }
42
+ };
43
+ }, [open]);
44
+ useEffect(() => {
45
+ if (!mounted || !open || typeof document === "undefined") return;
46
+ const getFocusableElements = () => {
47
+ if (!panelRef.current) return [];
48
+ return Array.from(panelRef.current.querySelectorAll(FOCUSABLE_SELECTOR));
49
+ };
50
+ const focusFirstElement = () => {
51
+ const focusableElements = getFocusableElements();
52
+ if (focusableElements.length > 0) {
53
+ focusableElements[0]?.focus();
54
+ return;
55
+ }
56
+ panelRef.current?.focus();
57
+ };
58
+ const focusLastElement = () => {
59
+ const focusableElements = getFocusableElements();
60
+ if (focusableElements.length > 0) {
61
+ focusableElements[focusableElements.length - 1]?.focus();
62
+ return;
63
+ }
64
+ panelRef.current?.focus();
65
+ };
66
+ previousActiveRef.current = document.activeElement;
67
+ const originalOverflow = document.body.style.overflow;
68
+ document.body.style.overflow = "hidden";
69
+ focusFirstElement();
70
+ const onKeyDown = (event) => {
71
+ if (event.key === "Escape") {
72
+ onOpenChange?.(false);
73
+ return;
74
+ }
75
+ if (event.key !== "Tab" || !panelRef.current) return;
76
+ const focusableElements = getFocusableElements();
77
+ const activeElement = document.activeElement;
78
+ if (!panelRef.current.contains(activeElement)) {
79
+ event.preventDefault();
80
+ if (event.shiftKey) {
81
+ focusLastElement();
82
+ return;
83
+ }
84
+ focusFirstElement();
85
+ return;
86
+ }
87
+ if (focusableElements.length === 0) {
88
+ event.preventDefault();
89
+ panelRef.current.focus();
90
+ return;
91
+ }
92
+ const firstElement = focusableElements[0];
93
+ const lastElement = focusableElements[focusableElements.length - 1];
94
+ if (event.shiftKey) {
95
+ if (activeElement === firstElement || activeElement === panelRef.current) {
96
+ event.preventDefault();
97
+ focusLastElement();
98
+ }
99
+ return;
100
+ }
101
+ if (activeElement === lastElement) {
102
+ event.preventDefault();
103
+ focusFirstElement();
104
+ }
105
+ };
106
+ const onFocusIn = (event) => {
107
+ if (!panelRef.current) return;
108
+ const target = event.target;
109
+ if (target instanceof Node && panelRef.current.contains(target)) return;
110
+ focusFirstElement();
111
+ };
112
+ document.addEventListener("keydown", onKeyDown);
113
+ document.addEventListener("focusin", onFocusIn);
114
+ return () => {
115
+ document.body.style.overflow = originalOverflow;
116
+ document.removeEventListener("keydown", onKeyDown);
117
+ document.removeEventListener("focusin", onFocusIn);
118
+ previousActiveRef.current?.focus?.();
119
+ };
120
+ }, [
121
+ mounted,
122
+ open,
123
+ onOpenChange
124
+ ]);
125
+ if (!mounted || typeof document === "undefined") return null;
126
+ return createPortal(/* @__PURE__ */ jsxs("div", {
127
+ className: "pf-slideout__portal",
128
+ "data-state": visible ? "open" : "closed",
129
+ children: [/* @__PURE__ */ jsx("div", {
130
+ className: "pf-slideout__overlay",
131
+ onClick: () => {
132
+ if (closeOnOverlayClick) onOpenChange?.(false);
133
+ }
134
+ }), /* @__PURE__ */ jsx("div", {
135
+ className: cx("pf-slideout__viewport", `pf-slideout__viewport--${placement}`),
136
+ children: /* @__PURE__ */ jsxs("div", {
137
+ ref: panelRef,
138
+ className: cx("pf-slideout", `pf-slideout--${size}`, className),
139
+ role: "dialog",
140
+ "aria-modal": "true",
141
+ "aria-labelledby": title ? titleId : void 0,
142
+ "aria-describedby": description ? descriptionId : void 0,
143
+ tabIndex: -1,
144
+ ...props,
145
+ children: [
146
+ title || description || showCloseButton ? /* @__PURE__ */ jsxs("header", {
147
+ className: "pf-slideout__header",
148
+ children: [/* @__PURE__ */ jsxs("div", {
149
+ className: "pf-slideout__heading-group",
150
+ children: [title ? /* @__PURE__ */ jsx("h2", {
151
+ className: "pf-slideout__title",
152
+ id: titleId,
153
+ children: title
154
+ }) : null, description ? /* @__PURE__ */ jsx("p", {
155
+ className: "pf-slideout__description",
156
+ id: descriptionId,
157
+ children: description
158
+ }) : null]
159
+ }), showCloseButton ? /* @__PURE__ */ jsx("button", {
160
+ type: "button",
161
+ className: "pf-slideout__close",
162
+ "aria-label": "Close slideout",
163
+ onClick: () => onOpenChange?.(false),
164
+ children: /* @__PURE__ */ jsx(Icon, {
165
+ name: "circle-xmark",
166
+ "aria-hidden": true
167
+ })
168
+ }) : null]
169
+ }) : null,
170
+ /* @__PURE__ */ jsx("div", {
171
+ className: "pf-slideout__body",
172
+ children
173
+ }),
174
+ footer ? /* @__PURE__ */ jsx("footer", {
175
+ className: "pf-slideout__footer",
176
+ children: footer
177
+ }) : null
178
+ ]
179
+ })
180
+ })]
181
+ }), document.body);
182
+ }
183
+ SlideoutMenu.displayName = "SlideoutMenu";
184
+ //#endregion
185
+ export { SlideoutMenu };
@@ -0,0 +1,15 @@
1
+ export declare const Keys: {
2
+ readonly ArrowDown: "ArrowDown";
3
+ readonly ArrowLeft: "ArrowLeft";
4
+ readonly ArrowRight: "ArrowRight";
5
+ readonly ArrowUp: "ArrowUp";
6
+ readonly End: "End";
7
+ readonly Enter: "Enter";
8
+ readonly Escape: "Escape";
9
+ readonly Home: "Home";
10
+ readonly Space: " ";
11
+ readonly Tab: "Tab";
12
+ };
13
+ export declare const isActivationKey: (key: string) => key is "Enter" | " ";
14
+ export declare const composeDescribedBy: (...ids: Array<string | false | null | undefined>) => string | undefined;
15
+ export declare const getFocusableElements: (container: HTMLElement) => HTMLElement[];
@@ -0,0 +1,10 @@
1
+ export type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
2
+ export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ variant?: AlertVariant;
4
+ heading?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ dismissible?: boolean;
7
+ onDismiss?: () => void;
8
+ icon?: React.ReactNode;
9
+ }
10
+ export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Alert';
@@ -0,0 +1,10 @@
1
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
2
+ export type AvatarStatus = 'online' | 'away' | 'busy' | 'offline';
3
+ export interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
4
+ src?: string;
5
+ alt?: string;
6
+ name?: string;
7
+ size?: AvatarSize;
8
+ status?: AvatarStatus;
9
+ }
10
+ export declare const Avatar: import('react').ForwardRefExoticComponent<AvatarProps & import('react').RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Avatar';
@@ -0,0 +1,5 @@
1
+ export type BadgeVariant = 'neutral' | 'brand' | 'success' | 'warning';
2
+ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ variant?: BadgeVariant;
4
+ }
5
+ export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Badge';
@@ -0,0 +1,11 @@
1
+ export type BadgeGroupColor = 'gray' | 'brand' | 'error' | 'warning' | 'success';
2
+ export type BadgeGroupAppearance = 'pill' | 'modern';
3
+ export type BadgeGroupBadgePosition = 'leading' | 'trailing';
4
+ export interface BadgeGroupProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ label: string;
6
+ message: string;
7
+ color?: BadgeGroupColor;
8
+ appearance?: BadgeGroupAppearance;
9
+ badgePosition?: BadgeGroupBadgePosition;
10
+ }
11
+ export declare const BadgeGroup: import('react').ForwardRefExoticComponent<BadgeGroupProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './BadgeGroup';
@@ -0,0 +1,11 @@
1
+ export interface BreadcrumbItem {
2
+ label: React.ReactNode;
3
+ href?: string;
4
+ onClick?: React.MouseEventHandler<HTMLElement>;
5
+ current?: boolean;
6
+ }
7
+ export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
8
+ items: BreadcrumbItem[];
9
+ separator?: React.ReactNode;
10
+ }
11
+ export declare const Breadcrumbs: import('react').ForwardRefExoticComponent<BreadcrumbsProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ export * from './Breadcrumbs';
@@ -0,0 +1,9 @@
1
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost';
2
+ export type ButtonSize = 'sm' | 'md' | 'lg';
3
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: ButtonVariant;
5
+ size?: ButtonSize;
6
+ fullWidth?: boolean;
7
+ loading?: boolean;
8
+ }
9
+ export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1,16 @@
1
+ export interface ButtonGroupItem {
2
+ value: string;
3
+ label: string;
4
+ icon?: React.ReactNode;
5
+ disabled?: boolean;
6
+ dot?: boolean;
7
+ }
8
+ export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ items: ButtonGroupItem[];
10
+ value?: string | string[];
11
+ defaultValue?: string | string[];
12
+ multiple?: boolean;
13
+ onValueChange?: (value: string | string[]) => void;
14
+ disabled?: boolean;
15
+ }
16
+ export declare const ButtonGroup: import('react').ForwardRefExoticComponent<ButtonGroupProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './ButtonGroup';
@@ -0,0 +1,14 @@
1
+ export interface CalendarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
2
+ value?: Date;
3
+ defaultValue?: Date;
4
+ onValueChange?: (value: Date) => void;
5
+ autoSelectToday?: boolean;
6
+ label?: string;
7
+ description?: string;
8
+ error?: string;
9
+ disabledDates?: (date: Date) => boolean;
10
+ showOutsideDays?: boolean;
11
+ startYear?: number;
12
+ endYear?: number;
13
+ }
14
+ export declare const Calendar: import('react').ForwardRefExoticComponent<CalendarProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Calendar';
@@ -0,0 +1,20 @@
1
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ ref?: React.Ref<HTMLDivElement>;
3
+ }
4
+ export type CardSectionProps = CardProps;
5
+ export declare function Card({ className, ref, ...props }: CardProps): import("react").JSX.Element;
6
+ export declare namespace Card {
7
+ var displayName: string;
8
+ }
9
+ export declare function CardHeader({ className, ref, ...props }: CardSectionProps): import("react").JSX.Element;
10
+ export declare namespace CardHeader {
11
+ var displayName: string;
12
+ }
13
+ export declare function CardContent({ className, ref, ...props }: CardSectionProps): import("react").JSX.Element;
14
+ export declare namespace CardContent {
15
+ var displayName: string;
16
+ }
17
+ export declare function CardFooter({ className, ref, ...props }: CardSectionProps): import("react").JSX.Element;
18
+ export declare namespace CardFooter {
19
+ var displayName: string;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Card';
@@ -0,0 +1,10 @@
1
+ export interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ slides: React.ReactNode[];
3
+ initialIndex?: number;
4
+ loop?: boolean;
5
+ showIndicators?: boolean;
6
+ autoPlay?: boolean;
7
+ autoPlayInterval?: number;
8
+ onIndexChange?: (index: number) => void;
9
+ }
10
+ export declare const Carousel: import('react').ForwardRefExoticComponent<CarouselProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Carousel';
@@ -0,0 +1,4 @@
1
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
2
+ label?: string;
3
+ }
4
+ export declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1,11 @@
1
+ export interface CodeSnippetProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
2
+ code: string;
3
+ language?: string;
4
+ title?: React.ReactNode;
5
+ showLineNumbers?: boolean;
6
+ maxHeight?: number;
7
+ copyLabel?: string;
8
+ copiedLabel?: string;
9
+ onCodeCopy?: (code: string) => void;
10
+ }
11
+ export declare const CodeSnippet: import('react').ForwardRefExoticComponent<CodeSnippetProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ export * from './CodeSnippet';
@@ -0,0 +1,7 @@
1
+ export type ContentDividerOrientation = 'horizontal' | 'vertical';
2
+ export interface ContentDividerProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ label?: React.ReactNode;
4
+ orientation?: ContentDividerOrientation;
5
+ inset?: boolean;
6
+ }
7
+ export declare const ContentDivider: import('react').ForwardRefExoticComponent<ContentDividerProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './ContentDivider';
@@ -0,0 +1,10 @@
1
+ export type CreditCardBrand = 'generic' | 'visa' | 'mastercard' | 'amex';
2
+ export interface CreditCardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ brand?: CreditCardBrand;
4
+ cardNumber: string;
5
+ cardholderName: string;
6
+ expiry: string;
7
+ cvc?: string;
8
+ masked?: boolean;
9
+ }
10
+ export declare const CreditCard: import('react').ForwardRefExoticComponent<CreditCardProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './CreditCard';
@@ -0,0 +1,17 @@
1
+ export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
2
+ value?: Date;
3
+ defaultValue?: Date;
4
+ onValueChange?: (value: Date | undefined) => void;
5
+ label?: string;
6
+ description?: string;
7
+ error?: string;
8
+ placeholder?: string;
9
+ required?: boolean;
10
+ disabled?: boolean;
11
+ allowClear?: boolean;
12
+ disabledDates?: (date: Date) => boolean;
13
+ showOutsideDays?: boolean;
14
+ startYear?: number;
15
+ endYear?: number;
16
+ }
17
+ export declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './DatePicker';
@@ -0,0 +1,20 @@
1
+ export interface DropdownItem {
2
+ id?: string;
3
+ label: string;
4
+ onSelect?: () => void;
5
+ icon?: React.ReactNode;
6
+ shortcut?: string;
7
+ disabled?: boolean;
8
+ destructive?: boolean;
9
+ }
10
+ export interface DropdownProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ label?: string;
12
+ items: DropdownItem[];
13
+ align?: 'start' | 'end';
14
+ disabled?: boolean;
15
+ /**
16
+ * Maximum number of items to show before scrolling. If not set, menu grows to fit all items.
17
+ */
18
+ maxVisibleItems?: number;
19
+ }
20
+ export declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Dropdown';
@@ -0,0 +1,11 @@
1
+ import { IconName } from '../Icon';
2
+ export type EmptyStateSize = 'sm' | 'md' | 'lg';
3
+ export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ heading: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ iconName?: IconName;
8
+ action?: React.ReactNode;
9
+ size?: EmptyStateSize;
10
+ }
11
+ export declare const EmptyState: import('react').ForwardRefExoticComponent<EmptyStateProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './EmptyState';
@@ -0,0 +1,15 @@
1
+ export interface FileUploaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'value' | 'defaultValue'> {
2
+ label?: string;
3
+ description?: string;
4
+ error?: string;
5
+ accept?: string;
6
+ multiple?: boolean;
7
+ maxFiles?: number;
8
+ maxFileSize?: number;
9
+ required?: boolean;
10
+ disabled?: boolean;
11
+ value?: File[];
12
+ defaultValue?: File[];
13
+ onFilesChange?: (files: File[]) => void;
14
+ }
15
+ export declare const FileUploader: import('react').ForwardRefExoticComponent<FileUploaderProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './FileUploader';
@@ -0,0 +1,12 @@
1
+ export interface HeaderNavigationItem {
2
+ label: React.ReactNode;
3
+ href?: string;
4
+ onClick?: React.MouseEventHandler<HTMLElement>;
5
+ active?: boolean;
6
+ }
7
+ export interface HeaderNavigationProps extends React.HTMLAttributes<HTMLElement> {
8
+ brand?: React.ReactNode;
9
+ items: HeaderNavigationItem[];
10
+ actions?: React.ReactNode;
11
+ }
12
+ export declare const HeaderNavigation: import('react').ForwardRefExoticComponent<HeaderNavigationProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ export * from './HeaderNavigation';
@@ -0,0 +1,12 @@
1
+ import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
2
+ export type IconName = string;
3
+ export declare const getAvailableIconNames: () => string[];
4
+ export declare const getCustomIconNames: () => string[];
5
+ export interface IconProps extends Omit<FontAwesomeIconProps, 'icon'> {
6
+ name: IconName;
7
+ label?: string;
8
+ }
9
+ export declare function Icon({ name, label, className, style, ...props }: IconProps): import("react").JSX.Element | null;
10
+ export declare namespace Icon {
11
+ var displayName: string;
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Icon';
@@ -0,0 +1,11 @@
1
+ import { IconName } from '../Icon';
2
+ export type InlineCTATone = 'default' | 'info' | 'success' | 'warning';
3
+ export interface InlineCTAProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ heading?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ action?: React.ReactNode;
7
+ icon?: React.ReactNode;
8
+ iconName?: IconName;
9
+ tone?: InlineCTATone;
10
+ }
11
+ export declare const InlineCTA: import('react').ForwardRefExoticComponent<InlineCTAProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './InlineCTA';
@@ -0,0 +1,6 @@
1
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
2
+ label?: string;
3
+ description?: string;
4
+ error?: string;
5
+ }
6
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Input';