@acmekit/docs-ui 2.13.41

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 (236) hide show
  1. package/dist/Items-YPPZD6C6.mjs +312 -0
  2. package/dist/chunk-JD7BP7O5.mjs +13144 -0
  3. package/dist/index.d.mts +1550 -0
  4. package/dist/index.d.ts +1550 -0
  5. package/dist/index.js +15218 -0
  6. package/dist/index.mjs +366 -0
  7. package/package.json +58 -0
  8. package/src/components/Badge/index.tsx +74 -0
  9. package/src/components/BadgesList/index.tsx +18 -0
  10. package/src/components/BetaBadge/index.tsx +24 -0
  11. package/src/components/Bordered/index.tsx +21 -0
  12. package/src/components/BorderedIcon/index.tsx +60 -0
  13. package/src/components/Breadcrumbs/index.tsx +83 -0
  14. package/src/components/Button/index.tsx +100 -0
  15. package/src/components/Card/Layout/Default/index.tsx +124 -0
  16. package/src/components/Card/Layout/Filler/index.tsx +30 -0
  17. package/src/components/Card/Layout/Large/index.tsx +88 -0
  18. package/src/components/Card/Layout/Mini/index.tsx +142 -0
  19. package/src/components/Card/index.tsx +50 -0
  20. package/src/components/CardList/index.tsx +40 -0
  21. package/src/components/ChildDocs/index.tsx +9 -0
  22. package/src/components/CodeBlock/Actions/AskAi/index.tsx +10 -0
  23. package/src/components/CodeBlock/Actions/Copy/index.tsx +59 -0
  24. package/src/components/CodeBlock/Actions/index.tsx +137 -0
  25. package/src/components/CodeBlock/Collapsible/Button/index.tsx +58 -0
  26. package/src/components/CodeBlock/Collapsible/Fade/index.tsx +55 -0
  27. package/src/components/CodeBlock/Collapsible/Lines/index.tsx +22 -0
  28. package/src/components/CodeBlock/Header/Wrapper/index.tsx +46 -0
  29. package/src/components/CodeBlock/Header/index.tsx +67 -0
  30. package/src/components/CodeBlock/Inline/index.tsx +20 -0
  31. package/src/components/CodeBlock/Line/index.tsx +331 -0
  32. package/src/components/CodeBlock/index.tsx +510 -0
  33. package/src/components/CodeMdx/index.tsx +45 -0
  34. package/src/components/CodeTabs/Item/index.tsx +67 -0
  35. package/src/components/CodeTabs/index.tsx +319 -0
  36. package/src/components/ContentMenu/Actions/index.tsx +7 -0
  37. package/src/components/ContentMenu/Products/index.tsx +64 -0
  38. package/src/components/ContentMenu/Toc/index.tsx +148 -0
  39. package/src/components/ContentMenu/Version/index.tsx +77 -0
  40. package/src/components/ContentMenu/index.tsx +31 -0
  41. package/src/components/CopyButton/index.tsx +76 -0
  42. package/src/components/Details/Summary/index.tsx +75 -0
  43. package/src/components/Details/index.tsx +98 -0
  44. package/src/components/DetailsList/index.tsx +32 -0
  45. package/src/components/DottedSeparator/index.tsx +30 -0
  46. package/src/components/EditButton/index.tsx +32 -0
  47. package/src/components/EditDate/index.tsx +33 -0
  48. package/src/components/ErrorPage/Icon/index.tsx +428 -0
  49. package/src/components/ErrorPage/index.tsx +32 -0
  50. package/src/components/Feedback/Solutions/index.tsx +105 -0
  51. package/src/components/Feedback/index.tsx +304 -0
  52. package/src/components/Footer/index.tsx +23 -0
  53. package/src/components/Heading/H1/index.tsx +21 -0
  54. package/src/components/Heading/H2/index.tsx +47 -0
  55. package/src/components/Heading/H3/index.tsx +42 -0
  56. package/src/components/Heading/H4/index.tsx +14 -0
  57. package/src/components/Heading/index.tsx +4 -0
  58. package/src/components/IconHeadline/index.tsx +15 -0
  59. package/src/components/Icons/AiAssistant/index.tsx +462 -0
  60. package/src/components/Icons/ArrowRightDown/index.tsx +30 -0
  61. package/src/components/Icons/BundledProduct/index.tsx +72 -0
  62. package/src/components/Icons/CalendarRefresh/index.tsx +70 -0
  63. package/src/components/Icons/ChefHat/index.tsx +65 -0
  64. package/src/components/Icons/CircleDottedLine/index.tsx +60 -0
  65. package/src/components/Icons/CloudSolid/index.tsx +47 -0
  66. package/src/components/Icons/ColoredAcmeKit/index.tsx +13 -0
  67. package/src/components/Icons/DecisionProcess/index.tsx +58 -0
  68. package/src/components/Icons/Erp/index.tsx +92 -0
  69. package/src/components/Icons/Github/index.tsx +22 -0
  70. package/src/components/Icons/House/index.tsx +23 -0
  71. package/src/components/Icons/ImageBinary/index.tsx +69 -0
  72. package/src/components/Icons/Kapa/index.tsx +22 -0
  73. package/src/components/Icons/Markdown/index.tsx +25 -0
  74. package/src/components/Icons/NavigationDropdown/Admin/index.tsx +33 -0
  75. package/src/components/Icons/NavigationDropdown/Doc/index.tsx +41 -0
  76. package/src/components/Icons/NavigationDropdown/DocV1/index.tsx +37 -0
  77. package/src/components/Icons/NavigationDropdown/Modules/index.tsx +33 -0
  78. package/src/components/Icons/NavigationDropdown/Resources/index.tsx +37 -0
  79. package/src/components/Icons/NavigationDropdown/Store/index.tsx +37 -0
  80. package/src/components/Icons/NavigationDropdown/Ui/index.tsx +37 -0
  81. package/src/components/Icons/NavigationDropdown/User/index.tsx +37 -0
  82. package/src/components/Icons/PuzzleColored/index.tsx +35 -0
  83. package/src/components/Icons/QuestionMark/index.tsx +23 -0
  84. package/src/components/Icons/Restock/index.tsx +55 -0
  85. package/src/components/Icons/ScrollText/index.tsx +68 -0
  86. package/src/components/Icons/ShadedBg/index.tsx +334 -0
  87. package/src/components/Icons/Shop/index.tsx +68 -0
  88. package/src/components/Icons/SidebarLeft/index.tsx +42 -0
  89. package/src/components/Icons/StripeColored/index.tsx +60 -0
  90. package/src/components/Icons/ThumbDown/index.tsx +23 -0
  91. package/src/components/Icons/ThumbUp/index.tsx +23 -0
  92. package/src/components/Icons/WindowPaintbrush/index.tsx +57 -0
  93. package/src/components/Icons/index.tsx +20 -0
  94. package/src/components/InlineCode/index.tsx +42 -0
  95. package/src/components/InlineIcon/index.tsx +21 -0
  96. package/src/components/InlineThemeImage/index.tsx +14 -0
  97. package/src/components/Input/Search/index.tsx +64 -0
  98. package/src/components/Input/Text/index.tsx +39 -0
  99. package/src/components/Kbd/index.tsx +33 -0
  100. package/src/components/Label/index.tsx +19 -0
  101. package/src/components/Link/index.tsx +67 -0
  102. package/src/components/LinkButton/index.tsx +43 -0
  103. package/src/components/Loading/Dots/index.tsx +16 -0
  104. package/src/components/Loading/Spinner/index.tsx +19 -0
  105. package/src/components/Loading/index.tsx +43 -0
  106. package/src/components/MDXComponents/index.tsx +209 -0
  107. package/src/components/MainNav/DesktopMenu/ThemeMenu/index.tsx +76 -0
  108. package/src/components/MainNav/DesktopMenu/index.tsx +100 -0
  109. package/src/components/MainNav/Items/Dropdown/index.tsx +88 -0
  110. package/src/components/MainNav/Items/Link/index.tsx +34 -0
  111. package/src/components/MainNav/Items/index.tsx +61 -0
  112. package/src/components/MainNav/MobileMenu/Main/index.tsx +67 -0
  113. package/src/components/MainNav/MobileMenu/SubMenu/index.tsx +77 -0
  114. package/src/components/MainNav/MobileMenu/index.tsx +103 -0
  115. package/src/components/MainNav/Version/index.tsx +33 -0
  116. package/src/components/MainNav/index.tsx +153 -0
  117. package/src/components/MarkdownContent/index.tsx +41 -0
  118. package/src/components/Menu/Action/index.tsx +43 -0
  119. package/src/components/Menu/Divider/index.tsx +35 -0
  120. package/src/components/Menu/Dropdown/index.tsx +78 -0
  121. package/src/components/Menu/Item/index.tsx +36 -0
  122. package/src/components/Menu/SubMenu/index.tsx +47 -0
  123. package/src/components/Menu/index.tsx +44 -0
  124. package/src/components/Modal/Footer/index.tsx +29 -0
  125. package/src/components/Modal/Header/index.tsx +33 -0
  126. package/src/components/Modal/index.tsx +124 -0
  127. package/src/components/Note/Layout/index.tsx +139 -0
  128. package/src/components/Note/Types/checks.tsx +7 -0
  129. package/src/components/Note/Types/default.tsx +7 -0
  130. package/src/components/Note/Types/error.tsx +7 -0
  131. package/src/components/Note/Types/soon.tsx +7 -0
  132. package/src/components/Note/Types/sucess.tsx +7 -0
  133. package/src/components/Note/Types/warning.tsx +7 -0
  134. package/src/components/Note/index.tsx +32 -0
  135. package/src/components/Notices/DeprecatedNotice/index.tsx +33 -0
  136. package/src/components/Notices/ExpandableNotice/index.tsx +36 -0
  137. package/src/components/Notices/FeatureFlagNotice/index.tsx +36 -0
  138. package/src/components/Notices/VersionNotice/index.tsx +37 -0
  139. package/src/components/Notification/Item/Layout/Default/index.tsx +89 -0
  140. package/src/components/Notification/Item/index.tsx +88 -0
  141. package/src/components/Notification/index.tsx +65 -0
  142. package/src/components/Pagination/Card/index.tsx +80 -0
  143. package/src/components/Pagination/index.tsx +35 -0
  144. package/src/components/Prerequisites/Item/index.tsx +43 -0
  145. package/src/components/Prerequisites/index.tsx +94 -0
  146. package/src/components/RadioItem/index.tsx +38 -0
  147. package/src/components/Rating/index.tsx +133 -0
  148. package/src/components/RootProviders/index.tsx +31 -0
  149. package/src/components/Select/Badge/index.tsx +122 -0
  150. package/src/components/Select/Dropdown/index.tsx +188 -0
  151. package/src/components/Select/Input/index.tsx +123 -0
  152. package/src/components/Select/index.ts +13 -0
  153. package/src/components/Sidebar/Child/index.tsx +43 -0
  154. package/src/components/Sidebar/Item/Category/index.tsx +151 -0
  155. package/src/components/Sidebar/Item/Link/index.tsx +174 -0
  156. package/src/components/Sidebar/Item/Sidebar/index.tsx +67 -0
  157. package/src/components/Sidebar/Item/SubCategory/index.tsx +83 -0
  158. package/src/components/Sidebar/Item/index.tsx +41 -0
  159. package/src/components/Sidebar/Top/MobileClose/index.tsx +21 -0
  160. package/src/components/Sidebar/Top/index.tsx +33 -0
  161. package/src/components/Sidebar/index.tsx +153 -0
  162. package/src/components/SourceCodeLink/index.tsx +37 -0
  163. package/src/components/SplitLists/index.tsx +58 -0
  164. package/src/components/Table/index.tsx +87 -0
  165. package/src/components/Tabs/index.tsx +106 -0
  166. package/src/components/TextArea/index.tsx +30 -0
  167. package/src/components/ThemeImage/index.tsx +26 -0
  168. package/src/components/Toggle/index.tsx +28 -0
  169. package/src/components/Tooltip/index.tsx +65 -0
  170. package/src/components/TypeList/Items/index.tsx +337 -0
  171. package/src/components/TypeList/index.tsx +63 -0
  172. package/src/components/WideSection/index.tsx +25 -0
  173. package/src/components/ZoomImg/index.tsx +17 -0
  174. package/src/components/index.ts +75 -0
  175. package/src/constants.tsx +261 -0
  176. package/src/global-config.ts +11 -0
  177. package/src/hooks/index.ts +14 -0
  178. package/src/hooks/use-active-on-scroll/index.tsx +223 -0
  179. package/src/hooks/use-click-outside/index.tsx +37 -0
  180. package/src/hooks/use-collapsible/index.tsx +128 -0
  181. package/src/hooks/use-collapsible-code-lines/index.tsx +149 -0
  182. package/src/hooks/use-copy/index.tsx +28 -0
  183. package/src/hooks/use-heading-url/index.tsx +32 -0
  184. package/src/hooks/use-is-external-link/index.tsx +19 -0
  185. package/src/hooks/use-keyboard-shortcut/index.tsx +71 -0
  186. package/src/hooks/use-mutation-observer/index.ts +32 -0
  187. package/src/hooks/use-page-scroll-manager/index.tsx +82 -0
  188. package/src/hooks/use-resize-observer/index.ts +20 -0
  189. package/src/hooks/use-scroll-utils/index.tsx +372 -0
  190. package/src/hooks/use-select/index.tsx +99 -0
  191. package/src/hooks/use-tabs/index.tsx +94 -0
  192. package/src/index.ts +8 -0
  193. package/src/layouts/barebone.tsx +18 -0
  194. package/src/layouts/index.ts +4 -0
  195. package/src/layouts/main-content.tsx +86 -0
  196. package/src/layouts/root.tsx +43 -0
  197. package/src/layouts/tight.tsx +29 -0
  198. package/src/layouts/wide.tsx +25 -0
  199. package/src/providers/AiAssistant/index.tsx +65 -0
  200. package/src/providers/BrowserProvider/index.tsx +40 -0
  201. package/src/providers/ColorMode/index.tsx +73 -0
  202. package/src/providers/Layout/index.tsx +52 -0
  203. package/src/providers/MainNav/index.tsx +134 -0
  204. package/src/providers/Mobile/index.tsx +62 -0
  205. package/src/providers/Modal/index.tsx +52 -0
  206. package/src/providers/Notification/index.tsx +149 -0
  207. package/src/providers/Pagination/index.tsx +230 -0
  208. package/src/providers/Search/index.tsx +91 -0
  209. package/src/providers/Sidebar/index.tsx +745 -0
  210. package/src/providers/SiteConfig/index.tsx +70 -0
  211. package/src/providers/index.ts +13 -0
  212. package/src/types/config.ts +34 -0
  213. package/src/types/frontmatter.ts +23 -0
  214. package/src/types/general.ts +1 -0
  215. package/src/types/index.ts +9 -0
  216. package/src/types/menu.ts +40 -0
  217. package/src/types/navigation-dropdown.ts +16 -0
  218. package/src/types/navigation.ts +21 -0
  219. package/src/types/sidebar.ts +109 -0
  220. package/src/types/toc.ts +19 -0
  221. package/src/types/ui.ts +9 -0
  222. package/src/utils/array-same-elms.ts +10 -0
  223. package/src/utils/capitalize.ts +3 -0
  224. package/src/utils/check-sidebar-item-visibility.ts +47 -0
  225. package/src/utils/decode-str.ts +8 -0
  226. package/src/utils/dom-utils.ts +29 -0
  227. package/src/utils/event-parser.ts +54 -0
  228. package/src/utils/get-link-with-base-path.ts +3 -0
  229. package/src/utils/get-navbar-items.ts +55 -0
  230. package/src/utils/get-scrolled-top.ts +8 -0
  231. package/src/utils/index.ts +13 -0
  232. package/src/utils/is-elm-window.ts +3 -0
  233. package/src/utils/is-in-view.ts +10 -0
  234. package/src/utils/os-browser-utils.ts +39 -0
  235. package/src/utils/set-obj-value.ts +38 -0
  236. package/src/utils/sidebar-utils.ts +129 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,366 @@
1
+ import {
2
+ AiAssistantIcon,
3
+ AiAssistantProvider,
4
+ Badge,
5
+ BadgesList,
6
+ BareboneLayout,
7
+ BetaBadge,
8
+ Bordered,
9
+ BorderedIcon,
10
+ Breadcrumbs,
11
+ BrowserProvider,
12
+ BundledProductIcon,
13
+ Button,
14
+ CalendarRefreshIcon,
15
+ Card,
16
+ CardList,
17
+ ChefHatIcon,
18
+ ChildDocs,
19
+ CodeBlock,
20
+ CodeMdx,
21
+ CodeTab,
22
+ CodeTabs,
23
+ ColorModeProvider,
24
+ ColoredAcmeKitIcon,
25
+ ContentMenu,
26
+ CopyButton,
27
+ DecisionProcessIcon,
28
+ DeprecatedNotice,
29
+ Details,
30
+ DetailsList,
31
+ DetailsSummary,
32
+ DocsTrackingEvents,
33
+ DotsLoading,
34
+ DottedSeparator,
35
+ DropdownMenu,
36
+ EditButton,
37
+ EditDate,
38
+ ErpIcon,
39
+ ErrorPage,
40
+ ExpandableNotice,
41
+ FeatureFlagNotice,
42
+ Feedback,
43
+ Footer,
44
+ GITHUB_ISSUES_LINK,
45
+ H1,
46
+ H2,
47
+ H3,
48
+ H4,
49
+ Hr,
50
+ IconCircleDottedLine,
51
+ IconCloudSolid,
52
+ IconHeadline,
53
+ ImageBinaryIcon,
54
+ InlineCode,
55
+ InlineIcon,
56
+ InlineThemeImage,
57
+ InputText,
58
+ Kbd,
59
+ Label,
60
+ LayoutProvider,
61
+ LayoutProviderContext,
62
+ Link,
63
+ LinkButton,
64
+ Loading,
65
+ MDXComponents,
66
+ MainNav,
67
+ MainNavProvider,
68
+ MarkdownContent,
69
+ Menu,
70
+ MobileProvider,
71
+ Modal,
72
+ ModalFooter,
73
+ ModalHeader,
74
+ ModalProvider,
75
+ Note,
76
+ NotificationContainer,
77
+ NotificationItem,
78
+ NotificationItemLayoutDefault,
79
+ NotificationProvider,
80
+ NotificationReducerActionTypes,
81
+ Pagination,
82
+ PaginationContext,
83
+ PaginationProvider,
84
+ Prerequisites,
85
+ PuzzleColoredIcon,
86
+ QuestionMarkIcon,
87
+ RadioItem,
88
+ Rating,
89
+ RestockIcon,
90
+ RootLayout,
91
+ RootProviders,
92
+ ScrollControllerProvider,
93
+ ScrollTextIcon,
94
+ SearchInput,
95
+ SearchProvider,
96
+ SelectBadge,
97
+ SelectDropdown,
98
+ SelectInput,
99
+ ShadedBgIcon,
100
+ ShopIcon,
101
+ Sidebar,
102
+ SidebarContext,
103
+ SidebarItem,
104
+ SidebarProvider,
105
+ SiteConfigProvider,
106
+ Solutions,
107
+ SourceCodeLink,
108
+ SpinnerLoading,
109
+ SplitList,
110
+ StripeColoredIcon,
111
+ Table,
112
+ Tabs,
113
+ TabsContent,
114
+ TabsContentWrapper,
115
+ TabsList,
116
+ TabsTrigger,
117
+ TabsTriggerVertical,
118
+ TextArea,
119
+ ThemeImage,
120
+ ThumbDownIcon,
121
+ ThumbUpIcon,
122
+ TightLayout,
123
+ Toggle,
124
+ Tooltip,
125
+ TypeList,
126
+ VersionNotice,
127
+ WideLayout,
128
+ WideSection,
129
+ WindowPaintbrushIcon,
130
+ ZoomImg,
131
+ areSidebarItemsEqual,
132
+ capitalize,
133
+ checkArraySameElms,
134
+ checkSidebarItemVisibility,
135
+ decodeStr,
136
+ findNextSibling,
137
+ findPrevSibling,
138
+ findSidebarItem,
139
+ getBrowser,
140
+ getLinkWithBasePath,
141
+ getNavDropdownItems,
142
+ getOsShortcut,
143
+ getScrolledTop,
144
+ getSidebarItemWithHistory,
145
+ globalConfig,
146
+ isElmWindow,
147
+ isInView,
148
+ isSidebarItemLink,
149
+ navDropdownItems,
150
+ normalizeMenuItems,
151
+ products,
152
+ reducer,
153
+ useActiveOnScroll,
154
+ useAiAssistant,
155
+ useClickOutside,
156
+ useCollapsible,
157
+ useCollapsibleCodeLines,
158
+ useColorMode,
159
+ useCopy,
160
+ useEvent,
161
+ useHeadingUrl,
162
+ useIsBrowser,
163
+ useIsExternalLink,
164
+ useKeyboardShortcut,
165
+ useLayout,
166
+ useMainNav,
167
+ useMobile,
168
+ useModal,
169
+ useMutationObserver,
170
+ useNotifications,
171
+ usePageScrollManager,
172
+ usePagination,
173
+ usePrevious,
174
+ useResizeObserver,
175
+ useScrollController,
176
+ useScrollPosition,
177
+ useScrollPositionBlocker,
178
+ useSearch,
179
+ useSelect,
180
+ useSidebar,
181
+ useSiteConfig,
182
+ useTabs
183
+ } from "./chunk-JD7BP7O5.mjs";
184
+ export {
185
+ AiAssistantIcon,
186
+ AiAssistantProvider,
187
+ Badge,
188
+ BadgesList,
189
+ BareboneLayout,
190
+ BetaBadge,
191
+ Bordered,
192
+ BorderedIcon,
193
+ Breadcrumbs,
194
+ BrowserProvider,
195
+ BundledProductIcon,
196
+ Button,
197
+ CalendarRefreshIcon,
198
+ Card,
199
+ CardList,
200
+ ChefHatIcon,
201
+ ChildDocs,
202
+ CodeBlock,
203
+ CodeMdx,
204
+ CodeTab,
205
+ CodeTabs,
206
+ ColorModeProvider,
207
+ ColoredAcmeKitIcon,
208
+ ContentMenu,
209
+ CopyButton,
210
+ DecisionProcessIcon,
211
+ DeprecatedNotice,
212
+ Details,
213
+ DetailsList,
214
+ DetailsSummary,
215
+ DocsTrackingEvents,
216
+ DotsLoading,
217
+ DottedSeparator,
218
+ DropdownMenu,
219
+ EditButton,
220
+ EditDate,
221
+ ErpIcon,
222
+ ErrorPage,
223
+ ExpandableNotice,
224
+ FeatureFlagNotice,
225
+ Feedback,
226
+ Footer,
227
+ GITHUB_ISSUES_LINK,
228
+ H1,
229
+ H2,
230
+ H3,
231
+ H4,
232
+ Hr,
233
+ IconCircleDottedLine,
234
+ IconCloudSolid,
235
+ IconHeadline,
236
+ ImageBinaryIcon,
237
+ InlineCode,
238
+ InlineIcon,
239
+ InlineThemeImage,
240
+ InputText,
241
+ Kbd,
242
+ Label,
243
+ LayoutProvider,
244
+ LayoutProviderContext,
245
+ Link,
246
+ LinkButton,
247
+ Loading,
248
+ MDXComponents,
249
+ MainNav,
250
+ MainNavProvider,
251
+ MarkdownContent,
252
+ Menu,
253
+ MobileProvider,
254
+ Modal,
255
+ ModalFooter,
256
+ ModalHeader,
257
+ ModalProvider,
258
+ Note,
259
+ NotificationContainer,
260
+ NotificationItem,
261
+ NotificationItemLayoutDefault,
262
+ NotificationProvider,
263
+ NotificationReducerActionTypes,
264
+ Pagination,
265
+ PaginationContext,
266
+ PaginationProvider,
267
+ Prerequisites,
268
+ PuzzleColoredIcon,
269
+ QuestionMarkIcon,
270
+ RadioItem,
271
+ Rating,
272
+ RestockIcon,
273
+ RootLayout,
274
+ RootProviders,
275
+ ScrollControllerProvider,
276
+ ScrollTextIcon,
277
+ SearchInput,
278
+ SearchProvider,
279
+ SelectBadge,
280
+ SelectDropdown,
281
+ SelectInput,
282
+ ShadedBgIcon,
283
+ ShopIcon,
284
+ Sidebar,
285
+ SidebarContext,
286
+ SidebarItem,
287
+ SidebarProvider,
288
+ SiteConfigProvider,
289
+ Solutions,
290
+ SourceCodeLink,
291
+ SpinnerLoading,
292
+ SplitList,
293
+ StripeColoredIcon,
294
+ Table,
295
+ Tabs,
296
+ TabsContent,
297
+ TabsContentWrapper,
298
+ TabsList,
299
+ TabsTrigger,
300
+ TabsTriggerVertical,
301
+ TextArea,
302
+ ThemeImage,
303
+ ThumbDownIcon,
304
+ ThumbUpIcon,
305
+ TightLayout,
306
+ Toggle,
307
+ Tooltip,
308
+ TypeList,
309
+ VersionNotice,
310
+ WideLayout,
311
+ WideSection,
312
+ WindowPaintbrushIcon,
313
+ ZoomImg,
314
+ areSidebarItemsEqual,
315
+ capitalize,
316
+ checkArraySameElms,
317
+ checkSidebarItemVisibility,
318
+ decodeStr,
319
+ findNextSibling,
320
+ findPrevSibling,
321
+ findSidebarItem,
322
+ getBrowser,
323
+ getLinkWithBasePath,
324
+ getNavDropdownItems,
325
+ getOsShortcut,
326
+ getScrolledTop,
327
+ getSidebarItemWithHistory,
328
+ globalConfig,
329
+ isElmWindow,
330
+ isInView,
331
+ isSidebarItemLink,
332
+ navDropdownItems,
333
+ normalizeMenuItems,
334
+ products,
335
+ reducer,
336
+ useActiveOnScroll,
337
+ useAiAssistant,
338
+ useClickOutside,
339
+ useCollapsible,
340
+ useCollapsibleCodeLines,
341
+ useColorMode,
342
+ useCopy,
343
+ useEvent,
344
+ useHeadingUrl,
345
+ useIsBrowser,
346
+ useIsExternalLink,
347
+ useKeyboardShortcut,
348
+ useLayout,
349
+ useMainNav,
350
+ useMobile,
351
+ useModal,
352
+ useMutationObserver,
353
+ useNotifications,
354
+ usePageScrollManager,
355
+ usePagination,
356
+ usePrevious,
357
+ useResizeObserver,
358
+ useScrollController,
359
+ useScrollPosition,
360
+ useScrollPositionBlocker,
361
+ useSearch,
362
+ useSelect,
363
+ useSidebar,
364
+ useSiteConfig,
365
+ useTabs
366
+ };
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@acmekit/docs-ui",
3
+ "description": "React UI components for AcmeKit documentation.",
4
+ "version": "2.13.41",
5
+ "license": "MIT",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "sideEffects": false,
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/acmekit/acmekit",
21
+ "directory": "packages/docs/docs-ui"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "src"
26
+ ],
27
+ "scripts": {
28
+ "build": "yarn run -T tsup",
29
+ "watch": "yarn run -T tsup --watch",
30
+ "clean": "rimraf dist"
31
+ },
32
+ "devDependencies": {
33
+ "@types/react": "^18.2.0",
34
+ "@types/react-dom": "^18.2.0",
35
+ "rimraf": "^5.0.1",
36
+ "tailwindcss": "^3.3.3",
37
+ "typescript": "^5.1.6"
38
+ },
39
+ "peerDependencies": {
40
+ "react": "*",
41
+ "react-dom": "*",
42
+ "react-router-dom": ">=6.0.0"
43
+ },
44
+ "dependencies": {
45
+ "@acmekit/icons": "2.13.41",
46
+ "@acmekit/ui": "4.1.37",
47
+ "@uidotdev/usehooks": "^2.4.1",
48
+ "clsx": "^2.0.0",
49
+ "prism-react-renderer": "2.4.0",
50
+ "react-markdown": "^9.0.1",
51
+ "react-medium-image-zoom": "^5.2.10",
52
+ "react-router-dom": "^6.28.0",
53
+ "react-tooltip": "^5.28.0",
54
+ "react-transition-group": "^4.4.5",
55
+ "react-uuid": "^2.0.0"
56
+ },
57
+ "packageManager": "yarn@3.2.1"
58
+ }
@@ -0,0 +1,74 @@
1
+ import React from "react"
2
+ import clsx from "clsx"
3
+ import { ShadedBgIcon } from "../Icons/ShadedBg"
4
+
5
+ export type BadgeVariant =
6
+ | "purple"
7
+ | "orange"
8
+ | "green"
9
+ | "blue"
10
+ | "red"
11
+ | "neutral"
12
+ | "code"
13
+
14
+ export type BadgeType = "default" | "shaded"
15
+
16
+ export type BadgeProps = {
17
+ className?: string
18
+ childrenWrapperClassName?: string
19
+ variant: BadgeVariant
20
+ badgeType?: BadgeType
21
+ } & React.HTMLAttributes<HTMLSpanElement>
22
+
23
+ export const Badge = ({
24
+ className,
25
+ variant,
26
+ badgeType = "default",
27
+ children,
28
+ childrenWrapperClassName,
29
+ ...props
30
+ }: BadgeProps) => {
31
+ return (
32
+ <span
33
+ className={clsx(
34
+ "text-compact-x-small-plus text-center",
35
+ badgeType === "default" &&
36
+ "px-docs_0.25 py-0 rounded-docs_sm border border-solid",
37
+ variant === "purple" &&
38
+ "bg-acmekit-tag-purple-bg text-acmekit-tag-purple-text border-acmekit-tag-purple-border",
39
+ variant === "orange" &&
40
+ "bg-acmekit-tag-orange-bg text-acmekit-tag-orange-text border-acmekit-tag-orange-border",
41
+ variant === "green" &&
42
+ "bg-acmekit-tag-green-bg text-acmekit-tag-green-text border-acmekit-tag-green-border",
43
+ variant === "blue" &&
44
+ "bg-acmekit-tag-blue-bg text-acmekit-tag-blue-text border-acmekit-tag-blue-border",
45
+ variant === "red" &&
46
+ "bg-acmekit-tag-red-bg text-acmekit-tag-red-text border-acmekit-tag-red-border",
47
+ variant === "neutral" &&
48
+ "bg-acmekit-tag-neutral-bg text-acmekit-tag-neutral-text border-acmekit-tag-neutral-border",
49
+ variant === "code" &&
50
+ "bg-acmekit-contrast-bg-subtle text-acmekit-contrast-fg-secondary border-acmekit-contrast-border-bot",
51
+ badgeType === "shaded" && "px-[3px] !bg-transparent relative",
52
+ // needed for tailwind utilities
53
+ "badge",
54
+ className
55
+ )}
56
+ {...props}
57
+ >
58
+ {badgeType === "shaded" && (
59
+ <ShadedBgIcon
60
+ variant={variant}
61
+ className={clsx("absolute top-0 left-0 w-full h-full")}
62
+ />
63
+ )}
64
+ <span
65
+ className={clsx(
66
+ badgeType === "shaded" && "relative z-[1]",
67
+ childrenWrapperClassName
68
+ )}
69
+ >
70
+ {children}
71
+ </span>
72
+ </span>
73
+ )
74
+ }
@@ -0,0 +1,18 @@
1
+ import React from "react"
2
+ import { Badge, BadgeProps } from "../Badge"
3
+ import clsx from "clsx"
4
+
5
+ type BadgesListProps = {
6
+ badges: BadgeProps[]
7
+ className?: string
8
+ }
9
+
10
+ export const BadgesList = ({ badges, className }: BadgesListProps) => {
11
+ return (
12
+ <div className={clsx("flex flex-wrap gap-docs_0.5", className)}>
13
+ {badges.map((badgeProps, index) => (
14
+ <Badge {...badgeProps} key={index} />
15
+ ))}
16
+ </div>
17
+ )
18
+ }
@@ -0,0 +1,24 @@
1
+ import React from "react"
2
+ import { Badge } from "../../components/Badge"
3
+ import { Tooltip } from "../../components/Tooltip"
4
+
5
+ type BetaBadgeProps = {
6
+ text?: string
7
+ tooltipText?: string
8
+ }
9
+
10
+ export const BetaBadge = ({
11
+ text = "Coming soon",
12
+ tooltipText = "Coming soon",
13
+ }: BetaBadgeProps) => {
14
+ return (
15
+ <Tooltip
16
+ tooltipChildren={tooltipText}
17
+ className="align-middle text-compact-x-small-plus"
18
+ >
19
+ <Badge variant="blue" badgeType="shaded" className="cursor-pointer">
20
+ {text}
21
+ </Badge>
22
+ </Tooltip>
23
+ )
24
+ }
@@ -0,0 +1,21 @@
1
+ import clsx from "clsx"
2
+ import React from "react"
3
+
4
+ export type BorderedProps = {
5
+ wrapperClassName?: string
6
+ } & React.HTMLAttributes<HTMLSpanElement>
7
+
8
+ export const Bordered = ({ wrapperClassName, children }: BorderedProps) => {
9
+ return (
10
+ <span
11
+ className={clsx(
12
+ "border-acmekit-border-strong bg-acmekit-bg-base",
13
+ "mr-docs_1 inline-flex w-fit items-center justify-center rounded-docs_DEFAULT border border-solid p-[3px]",
14
+ "no-zoom-img",
15
+ wrapperClassName
16
+ )}
17
+ >
18
+ {children}
19
+ </span>
20
+ )
21
+ }
@@ -0,0 +1,60 @@
1
+ import React from "react"
2
+ import clsx from "clsx"
3
+ import { IconProps } from "@acmekit/icons/dist/types"
4
+
5
+
6
+ export type BorderedIconProps = {
7
+ icon?: string
8
+ IconComponent?: React.FC<IconProps> | null
9
+ wrapperClassName?: string
10
+ iconWrapperClassName?: string
11
+ iconClassName?: string
12
+ iconColorClassName?: string
13
+ iconWidth?: number
14
+ iconHeight?: number
15
+ } & React.HTMLAttributes<HTMLSpanElement>
16
+
17
+ export const BorderedIcon = ({
18
+ icon = "",
19
+ IconComponent = null,
20
+ iconWrapperClassName,
21
+ iconClassName,
22
+ iconColorClassName = "",
23
+ wrapperClassName,
24
+ iconWidth = 28,
25
+ iconHeight = 28,
26
+ ...props
27
+ }: BorderedIconProps) => {
28
+ return (
29
+ <span
30
+ className={clsx(
31
+ "rounded-docs_sm p-docs_0.125 bg-acmekit-bg-base inline-flex items-center justify-center",
32
+ "shadow-border-base dark:shadow-border-base-dark",
33
+ iconWrapperClassName
34
+ )}
35
+ {...props}
36
+ >
37
+ <span className={clsx("rounded-docs_xs", wrapperClassName)}>
38
+ {!IconComponent && (
39
+ <img
40
+ src={icon || ""}
41
+ className={clsx(iconClassName, "bordered-icon rounded-docs_xs")}
42
+ width={iconWidth}
43
+ height={iconHeight}
44
+ alt=""
45
+ />
46
+ )}
47
+ {IconComponent && (
48
+ <IconComponent
49
+ className={clsx(
50
+ "text-acmekit-fg-subtle rounded-docs_xs",
51
+ iconClassName,
52
+ "bordered-icon",
53
+ iconColorClassName
54
+ )}
55
+ />
56
+ )}
57
+ </span>
58
+ </span>
59
+ )
60
+ }
@@ -0,0 +1,83 @@
1
+ import React, { useMemo } from "react"
2
+ import clsx from "clsx"
3
+ import { Link } from "react-router-dom"
4
+ import { useSidebar } from "../../providers/Sidebar"
5
+ import { useSiteConfig } from "../../providers/SiteConfig"
6
+ import { Button } from "../Button"
7
+ import { TriangleRightMini } from "@acmekit/icons"
8
+ import { Sidebar } from "../../types"
9
+
10
+ type BreadcrumbItems = {
11
+ title: string
12
+ link: string
13
+ }[]
14
+
15
+ export const Breadcrumbs = () => {
16
+ const { sidebarHistory, getSidebarFirstLinkChild, getSidebar } = useSidebar()
17
+ const {
18
+ config: { breadcrumbOptions },
19
+ } = useSiteConfig()
20
+
21
+ const getLinkPath = (item: Sidebar.SidebarItemLink): string => {
22
+ return item.isPathHref ? item.path : `#${item.path}`
23
+ }
24
+
25
+ const breadcrumbItems = useMemo(() => {
26
+ const items: BreadcrumbItems = []
27
+ if (breadcrumbOptions?.startItems) {
28
+ items.push(...breadcrumbOptions.startItems)
29
+ }
30
+
31
+ sidebarHistory.forEach((sidebar_id) => {
32
+ const sidebar = getSidebar(sidebar_id)
33
+
34
+ if (!sidebar) {
35
+ return
36
+ }
37
+
38
+ const sidebarFirstChild = getSidebarFirstLinkChild(sidebar)
39
+
40
+ if (!sidebarFirstChild) {
41
+ return
42
+ }
43
+
44
+ items.push({
45
+ title: sidebar.title,
46
+ link: getLinkPath(sidebarFirstChild),
47
+ })
48
+ })
49
+
50
+ return items
51
+ }, [sidebarHistory, breadcrumbOptions])
52
+
53
+ return (
54
+ <div
55
+ className={clsx(
56
+ "flex items-center gap-docs_0.25",
57
+ "text-acmekit-fg-muted text-compact-small",
58
+ "mb-docs_1 flex-wrap"
59
+ )}
60
+ >
61
+ {breadcrumbItems.map(({ title, link }, index) => (
62
+ <React.Fragment key={link}>
63
+ {index > 0 && <TriangleRightMini />}
64
+ <Button
65
+ variant="transparent-clear"
66
+ className={clsx(
67
+ "px-docs_0.5 py-docs_0.25",
68
+ link === "#" && "hover:cursor-default",
69
+ "!p-0 hover:!bg-transparent hover:!text-acmekit-fg-subtle"
70
+ )}
71
+ >
72
+ <Link
73
+ to={link}
74
+ className={clsx(link === "#" && "hover:cursor-default")}
75
+ >
76
+ {title}
77
+ </Link>
78
+ </Button>
79
+ </React.Fragment>
80
+ ))}
81
+ </div>
82
+ )
83
+ }