@mintlify/components 1.0.3 → 1.0.5

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 (118) hide show
  1. package/dist/components/callout/callout.js +4 -4
  2. package/dist/components/icon/icon.d.ts.map +1 -1
  3. package/dist/components/icon/icon.js +14 -14
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/index.d.ts.map +1 -1
  6. package/dist/components/search/button.d.ts +12 -0
  7. package/dist/components/search/button.d.ts.map +1 -0
  8. package/dist/components/search/button.js +55 -0
  9. package/dist/components/search/index.d.ts +7 -0
  10. package/dist/components/search/index.d.ts.map +1 -0
  11. package/dist/components/search/provider.d.ts +19 -0
  12. package/dist/components/search/provider.d.ts.map +1 -0
  13. package/dist/components/search/provider.js +32 -0
  14. package/dist/components/search/search.d.ts +39 -0
  15. package/dist/components/search/search.d.ts.map +1 -0
  16. package/dist/components/search/search.js +263 -0
  17. package/dist/index.js +55 -48
  18. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  19. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +165 -164
  20. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +21 -20
  21. package/dist/node_modules/.pnpm/@floating-ui_react@0.26.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.js +367 -0
  22. package/dist/node_modules/.pnpm/@floating-ui_react@0.26.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +13 -0
  23. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/combobox/combobox.js +397 -0
  24. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/description/description.js +43 -0
  25. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/dialog/dialog.js +100 -0
  26. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js +129 -0
  27. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  28. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/label/label.js +59 -0
  29. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/mouse.js +4 -0
  30. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/portal/portal.js +71 -0
  31. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/transition/transition.js +135 -0
  32. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +14 -0
  33. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +48 -0
  34. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +36 -0
  35. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +8 -0
  36. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +12 -0
  37. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  38. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-by-comparator.js +16 -0
  39. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-controllable.js +9 -0
  40. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  41. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  42. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-document-event.js +15 -0
  43. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-element-size.js +20 -0
  44. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-escape.js +12 -0
  45. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-event-listener.js +15 -0
  46. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  47. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-flags.js +8 -0
  48. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +41 -0
  49. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js +11 -0
  50. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js +24 -0
  51. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-touch-device.js +16 -0
  52. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  53. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  54. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js +27 -0
  55. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js +14 -0
  56. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-outside-click.js +39 -0
  57. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-owner.js +8 -0
  58. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-refocusable-input.js +22 -0
  59. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  60. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-root-containers.js +38 -0
  61. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +12 -0
  62. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +16 -0
  63. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-store.js +7 -0
  64. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +20 -0
  65. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tab-direction.js +13 -0
  66. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js +16 -0
  67. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-transition.js +69 -0
  68. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +18 -0
  69. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-watch.js +15 -0
  70. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-window-event.js +15 -0
  71. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/close-provider.js +9 -0
  72. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  73. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/floating.js +149 -0
  74. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  75. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/frozen.js +13 -0
  76. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  77. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  78. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/open-closed.js +19 -0
  79. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/portal-force-root.js +12 -0
  80. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/active-element-history.js +14 -0
  81. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/bugs.js +18 -0
  82. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/calculate-active-index.js +40 -0
  83. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  84. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/default-map.js +12 -0
  85. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  86. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/document-ready.js +9 -0
  87. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  88. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/focus-management.js +84 -0
  89. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/form.js +14 -0
  90. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  91. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  92. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/owner.js +7 -0
  93. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/platform.js +14 -0
  94. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/render.js +118 -0
  95. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/store.js +14 -0
  96. package/dist/node_modules/.pnpm/@react-aria_focus@3.21.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  97. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocus.js +30 -0
  98. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocusVisible.js +97 -0
  99. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocusWithin.js +57 -0
  100. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  101. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/utils.js +66 -0
  102. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/DOMFunctions.js +27 -0
  103. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  104. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  105. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  106. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  107. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/platform.js +47 -0
  108. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  109. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  110. package/dist/node_modules/.pnpm/@react-stately_flags@3.1.2/node_modules/@react-stately/flags/dist/import.js +7 -0
  111. package/dist/node_modules/.pnpm/@tanstack_react-virtual@3.13.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  112. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/index.js +533 -0
  113. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  114. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js +13 -0
  115. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search-x.js +16 -0
  116. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js +14 -0
  117. package/dist/styles.css +1 -1
  118. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as w } from "react/jsx-runtime";
2
2
  import I from "../../_virtual/index.js";
3
3
  import { Classes as v } from "../../constants/selectors.js";
4
- import { DangerIcon as $, CheckIcon as A, TipIcon as T, NoteIcon as _, WarningIcon as D, InfoIcon as L } from "../../icons/index.js";
4
+ import { DangerIcon as $, CheckIcon as A, TipIcon as _, NoteIcon as T, WarningIcon as D, InfoIcon as L } from "../../icons/index.js";
5
5
  import { cn as x } from "../../utils/cn.js";
6
6
  import { Icon as W } from "../icon/icon.js";
7
7
  const j = {
@@ -18,13 +18,13 @@ const j = {
18
18
  childrenClassName: "text-yellow-800 dark:text-yellow-300"
19
19
  },
20
20
  note: {
21
- icon: _,
21
+ icon: T,
22
22
  defaultAriaLabel: "Note",
23
23
  className: "border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20",
24
24
  childrenClassName: "text-blue-800 dark:text-blue-300"
25
25
  },
26
26
  tip: {
27
- icon: T,
27
+ icon: _,
28
28
  defaultAriaLabel: "Tip",
29
29
  className: 'border border-green-200 bg-green-50 dark:border-green-900 dark:bg-green-600/20 **:data-[component-part="callout-icon"]:mt-px',
30
30
  childrenClassName: "text-green-800 dark:text-green-300"
@@ -109,7 +109,7 @@ const j = {
109
109
  "div",
110
110
  {
111
111
  className: x(
112
- "prose dark:prose-invert w-full min-w-0 text-sm [&_a]:border-current [&_a]:text-current! [&_code]:text-current! [&_kbd]:bg-stone-100 [&_kbd]:text-current! dark:[&_kbd]:bg-stone-800",
112
+ "prose dark:prose-invert w-full min-w-0 text-sm [&_a]:border-current [&_a]:text-current! [&_code]:text-current! [&_kbd]:bg-stone-100 [&_kbd]:text-current! dark:[&_kbd]:bg-stone-800 [&_strong]:text-current!",
113
113
  d
114
114
  ),
115
115
  "data-component-part": "callout-content",
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAG5B,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,IAAI,GAAI,kIAaX,SAAS,mDAwHX,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,QAAQ,EAEb,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAG5B,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,IAAI,GAAI,kIAaX,SAAS,mDAyHX,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -2,12 +2,12 @@ import { jsx as n } from "react/jsx-runtime";
2
2
  import { MINTLIFY_ICONS_CDN_URL as C } from "../../constants/index.js";
3
3
  import { Classes as N } from "../../constants/selectors.js";
4
4
  import { cn as i } from "../../utils/cn.js";
5
- import { getIconUrl as y, ICON_TYPES as M } from "../../utils/icon-utils.js";
6
- import { isAbsoluteUrl as $ } from "../../utils/is-absolute-url.js";
7
- const w = ({
5
+ import { getIconUrl as y, ICON_TYPES as M, isBrandsIcon as $ } from "../../utils/icon-utils.js";
6
+ import { isAbsoluteUrl as v } from "../../utils/is-absolute-url.js";
7
+ const x = ({
8
8
  icon: t,
9
9
  iconType: a,
10
- color: s,
10
+ color: e,
11
11
  colorLight: g,
12
12
  colorDark: p,
13
13
  size: k,
@@ -22,22 +22,22 @@ const w = ({
22
22
  ...!I && { width: k || 16, height: k || 16 },
23
23
  display: "inline-block",
24
24
  verticalAlign: "middle"
25
- }, e = g && p, r = e ? {
25
+ }, s = g && p, r = s ? {
26
26
  ...b,
27
27
  "--color-light": g,
28
28
  "--color-dark": p
29
29
  } : b, o = i(
30
30
  N.Icon,
31
31
  "inline",
32
- !(s || e || l) && "bg-primary dark:bg-primary-light",
33
- e && "bg-(--color-light) dark:bg-(--color-dark)",
32
+ !(e || s || l) && "bg-primary dark:bg-primary-light",
33
+ s && "bg-(--color-light) dark:bg-(--color-dark)",
34
34
  f
35
35
  ), W = h === "pdf", m = y(t.toLowerCase(), a, d);
36
36
  if (a && !M.includes(a))
37
37
  return console.log(
38
38
  `Invalid iconType ${a} expected a string equal to one of: brands, duotone, light, regular, sharp-solid, solid, thin`
39
39
  ), null;
40
- if (typeof t == "string" && ($(t) || t.startsWith("/"))) {
40
+ if (typeof t == "string" && (v(t) || t.startsWith("/"))) {
41
41
  if (t.startsWith(C) || t.startsWith("https://mintlify.b-cdn.net"))
42
42
  return /* @__PURE__ */ n(
43
43
  "svg",
@@ -52,7 +52,7 @@ const w = ({
52
52
  maskRepeat: "no-repeat",
53
53
  maskPosition: "center",
54
54
  maskSize: "100%",
55
- ...!e && { backgroundColor: "currentColor" },
55
+ ...!s && { backgroundColor: "currentColor" },
56
56
  ...r
57
57
  }
58
58
  }
@@ -78,7 +78,7 @@ const w = ({
78
78
  alt: t,
79
79
  className: i(
80
80
  o,
81
- !(s || l || e) && "bg-stone-800 dark:bg-stone-100"
81
+ !(e || l || s) && "bg-stone-800 dark:bg-stone-100"
82
82
  ),
83
83
  "data-component-part": "icon-image",
84
84
  src: m,
@@ -93,7 +93,7 @@ const w = ({
93
93
  {
94
94
  className: i(
95
95
  o,
96
- !(s || l || e) && "bg-stone-800 dark:bg-stone-100"
96
+ !(e || l || s) && "bg-stone-800 dark:bg-stone-100"
97
97
  ),
98
98
  "data-component-part": "icon-svg",
99
99
  style: {
@@ -103,13 +103,13 @@ const w = ({
103
103
  maskImage: `url(${m})`,
104
104
  maskRepeat: "no-repeat",
105
105
  maskPosition: "center",
106
- maskSize: d === "lucide" ? "100%" : void 0,
107
- backgroundColor: s,
106
+ maskSize: d === "lucide" && !$(t) ? "100%" : void 0,
107
+ backgroundColor: e,
108
108
  ...r
109
109
  }
110
110
  }
111
111
  );
112
112
  };
113
113
  export {
114
- w as Icon
114
+ x as Icon
115
115
  };
@@ -12,6 +12,7 @@ export * from './icon';
12
12
  export * from './mermaid';
13
13
  export * from './panel';
14
14
  export * from './property';
15
+ export * from './search';
15
16
  export * from './steps';
16
17
  export * from './tabs';
17
18
  export * from './tile';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ type SearchButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ showShortcut?: boolean;
4
+ shortcutText?: string;
5
+ };
6
+ declare const SearchButton: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
7
+ showShortcut?: boolean;
8
+ shortcutText?: string;
9
+ } & import('react').RefAttributes<HTMLButtonElement>>;
10
+ export type { SearchButtonProps };
11
+ export { SearchButton };
12
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/search/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,OAAO,CAAC;AAI9D,KAAK,iBAAiB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACjE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,YAAY;mBAJD,OAAO;mBACP,MAAM;qDAwDtB,CAAC;AAIF,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as x } from "react";
3
+ import { cn as p } from "../../utils/cn.js";
4
+ import { useSearch as l } from "./provider.js";
5
+ import u from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js";
6
+ const h = x(
7
+ ({
8
+ showShortcut: o = !0,
9
+ shortcutText: s = "⌘K",
10
+ className: n,
11
+ children: a,
12
+ onClick: e,
13
+ ...d
14
+ }, i) => {
15
+ const t = l(), m = (c) => {
16
+ t == null || t.open(), e == null || e(c);
17
+ };
18
+ return /* @__PURE__ */ f(
19
+ "button",
20
+ {
21
+ className: p(
22
+ "flex w-full items-center gap-2 px-3 py-2 text-left text-sm",
23
+ "bg-transparent",
24
+ "border border-stone-200 dark:border-white/10",
25
+ "rounded-xl",
26
+ "text-stone-500",
27
+ "hover:border-stone-300 dark:hover:border-white/20",
28
+ "focus:outline-none focus:ring-0 focus:ring-offset-0",
29
+ "transition-colors",
30
+ "cursor-pointer",
31
+ n
32
+ ),
33
+ onClick: m,
34
+ ref: i,
35
+ type: "button",
36
+ ...d,
37
+ children: [
38
+ /* @__PURE__ */ r(
39
+ u,
40
+ {
41
+ className: "shrink-0 text-stone-800 dark:text-stone-500",
42
+ size: 16
43
+ }
44
+ ),
45
+ /* @__PURE__ */ r("span", { className: "flex-1 text-stone-500 dark:text-stone-400", children: a || "Search..." }),
46
+ o && /* @__PURE__ */ r("kbd", { className: "hidden items-center gap-0.5 rounded px-1.5 py-0.5 font-medium font-sans text-stone-500 text-xs sm:inline-flex dark:text-stone-400", children: s })
47
+ ]
48
+ }
49
+ );
50
+ }
51
+ );
52
+ h.displayName = "SearchButton";
53
+ export {
54
+ h as SearchButton
55
+ };
@@ -0,0 +1,7 @@
1
+ export type { SearchButtonProps } from './button';
2
+ export { SearchButton } from './button';
3
+ export type { SearchContextValue, SearchProviderProps, } from './provider';
4
+ export { SearchProvider, useSearch } from './provider';
5
+ export type { SearchProps, SearchResult } from './search';
6
+ export { Search } from './search';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { SearchProps } from './search';
3
+ type SearchContextValue = {
4
+ isOpen: boolean;
5
+ open: () => void;
6
+ close: () => void;
7
+ toggle: () => void;
8
+ };
9
+ type SearchProviderProps = {
10
+ children: ReactNode;
11
+ shortcutKey?: string;
12
+ requireModifier?: boolean;
13
+ searchProps: Omit<SearchProps, "isOpen" | "onClose">;
14
+ };
15
+ declare const SearchProvider: ({ children, shortcutKey, requireModifier, searchProps, }: SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const useSearch: () => SearchContextValue | null;
17
+ export type { SearchContextValue, SearchProviderProps };
18
+ export { SearchProvider, useSearch };
19
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/components/search/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAIF,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;CACtD,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,0DAKrB,mBAAmB,4CA2CrB,CAAC;AAEF,QAAA,MAAM,SAAS,iCAEd,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { jsxs as g, jsx as C } from "react/jsx-runtime";
2
+ import { useState as p, useCallback as a, useEffect as E, createContext as v, useContext as h } from "react";
3
+ import { Search as k } from "./search.js";
4
+ const u = v(null), b = ({
5
+ children: f,
6
+ shortcutKey: o = "k",
7
+ requireModifier: i = !0,
8
+ searchProps: m
9
+ }) => {
10
+ const [c, r] = p(!1), w = a(() => r(!0), []), l = a(() => r(!1), []), n = a(() => r((t) => !t), []);
11
+ return E(() => {
12
+ const t = (e) => {
13
+ const d = e.metaKey || e.ctrlKey;
14
+ if (i ? d && e.key.toLowerCase() === o.toLowerCase() : e.key.toLowerCase() === o.toLowerCase()) {
15
+ if (!d) {
16
+ const s = e.target;
17
+ if (s.tagName === "INPUT" || s.tagName === "TEXTAREA" || s.isContentEditable)
18
+ return;
19
+ }
20
+ e.preventDefault(), n();
21
+ }
22
+ };
23
+ return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
24
+ }, [o, i, n]), /* @__PURE__ */ g(u.Provider, { value: { isOpen: c, open: w, close: l, toggle: n }, children: [
25
+ f,
26
+ /* @__PURE__ */ C(k, { ...m, isOpen: c, onClose: l })
27
+ ] });
28
+ }, P = () => h(u);
29
+ export {
30
+ b as SearchProvider,
31
+ P as useSearch
32
+ };
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+ type SearchResult = {
3
+ id: string;
4
+ header: string;
5
+ content: string;
6
+ link: string;
7
+ icon?: ReactNode;
8
+ metadata?: {
9
+ breadcrumbs?: string[];
10
+ [key: string]: unknown;
11
+ };
12
+ };
13
+ type SearchProps = {
14
+ onSearch: (query: string) => void;
15
+ results: SearchResult[];
16
+ isOpen: boolean;
17
+ onClose: () => void;
18
+ isLoading?: boolean;
19
+ placeholder?: string;
20
+ recentSearches?: SearchResult[];
21
+ onSelectResult?: (result: SearchResult, query: string) => void;
22
+ className?: string;
23
+ emptyState?: ReactNode;
24
+ loadingState?: ReactNode;
25
+ position?: "top" | "center";
26
+ paddingTop?: string;
27
+ };
28
+ type SearchHitProps = {
29
+ isActive: boolean;
30
+ header: string;
31
+ description: string;
32
+ icon?: ReactNode;
33
+ metadata?: SearchResult["metadata"];
34
+ };
35
+ declare const SearchHit: ({ isActive, header, description, icon, metadata, }: SearchHitProps) => import("react/jsx-runtime").JSX.Element;
36
+ declare const Search: import('react').ForwardRefExoticComponent<SearchProps & import('react').RefAttributes<HTMLInputElement>>;
37
+ export type { SearchResult, SearchProps };
38
+ export { Search, SearchHit };
39
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/search/search.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAGf,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,oDAMhB,cAAc,4CAuChB,CAAC;AAEF,QAAA,MAAM,MAAM,0GA6RX,CAAC;AAIF,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,263 @@
1
+ import { jsxs as s, jsx as t, Fragment as g } from "react/jsx-runtime";
2
+ import { forwardRef as G, useState as T, useRef as M, useImperativeHandle as O, useEffect as P, useCallback as p, useMemo as b, Fragment as x } from "react";
3
+ import { cn as m } from "../../utils/cn.js";
4
+ import { Combobox as X, ComboboxInput as B, ComboboxOptions as J, ComboboxOption as C } from "../../node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/combobox/combobox.js";
5
+ import U from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js";
6
+ import V from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js";
7
+ import W from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search-x.js";
8
+ import { Transition as Y, TransitionChild as F } from "../../node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/transition/transition.js";
9
+ import { Dialog as Z, DialogPanel as _ } from "../../node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/dialog/dialog.js";
10
+ import L from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js";
11
+ const j = ({
12
+ isActive: d,
13
+ header: r,
14
+ description: i,
15
+ icon: o,
16
+ metadata: n
17
+ }) => /* @__PURE__ */ s(
18
+ "div",
19
+ {
20
+ className: m(
21
+ "flex w-full cursor-pointer items-start gap-2 rounded-xl border border-transparent bg-transparent px-3 py-2 text-stone-500 transition-colors focus:ring-0 focus:ring-offset-0",
22
+ d && "bg-stone-100 dark:bg-white/5"
23
+ ),
24
+ children: [
25
+ o && /* @__PURE__ */ t("div", { className: "shrink-0 self-center text-stone-700 dark:text-stone-300", children: o }),
26
+ /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col gap-1", children: [
27
+ (n == null ? void 0 : n.breadcrumbs) && n.breadcrumbs.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-center gap-1 truncate text-stone-500 text-xs dark:text-stone-400", children: n.breadcrumbs.map((f, c) => (
28
+ // biome-ignore lint/suspicious/noArrayIndexKey: Breadcrumbs are positional and may contain duplicates
29
+ /* @__PURE__ */ s(x, { children: [
30
+ c > 0 && /* @__PURE__ */ t("span", { className: "text-stone-400", children: " > " }),
31
+ /* @__PURE__ */ t("span", { className: "truncate", children: f })
32
+ ] }, c)
33
+ )) }),
34
+ /* @__PURE__ */ t("div", { className: "truncate font-medium text-sm text-stone-900 dark:text-white", children: r }),
35
+ i && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-sm text-stone-600 dark:text-stone-400", children: i })
36
+ ] }),
37
+ d && /* @__PURE__ */ t(L, { className: "size-5 shrink-0 self-center text-stone-400 dark:text-stone-500" })
38
+ ]
39
+ }
40
+ ), ee = G(
41
+ ({
42
+ onSearch: d,
43
+ results: r,
44
+ isOpen: i,
45
+ onClose: o,
46
+ isLoading: n = !1,
47
+ placeholder: f = "Search...",
48
+ recentSearches: c = [],
49
+ onSelectResult: h,
50
+ className: z,
51
+ emptyState: S,
52
+ loadingState: D,
53
+ position: y = "top",
54
+ paddingTop: E = "64px"
55
+ }, K) => {
56
+ const [a, k] = T(""), [v, N] = T(!1), w = M(null);
57
+ O(K, () => w.current), P(() => {
58
+ i || (k(""), N(!1));
59
+ }, [i]);
60
+ const R = p(
61
+ (e) => {
62
+ k(e), d(e);
63
+ },
64
+ [d]
65
+ ), u = p(
66
+ (e) => {
67
+ e && (h == null || h(e, a), o());
68
+ },
69
+ [h, a, o]
70
+ ), H = p(
71
+ (e) => {
72
+ if (e.key === "Escape") {
73
+ e.preventDefault(), o();
74
+ return;
75
+ }
76
+ if (e.key === "Tab" && (r.length > 0 || c.length > 0) && (e.preventDefault(), e.currentTarget.setSelectionRange(
77
+ e.currentTarget.value.length,
78
+ e.currentTarget.value.length
79
+ )), e.key === "Enter" && (e.metaKey || e.ctrlKey) && a && r.length > 0 && !n) {
80
+ const l = r[0];
81
+ l && u(l);
82
+ }
83
+ },
84
+ [r, c, u, o, a, n]
85
+ ), I = p((e) => {
86
+ N(e.currentTarget.scrollTop > 0);
87
+ }, []), Q = b(
88
+ () => !a && c.length > 0 && r.length === 0,
89
+ [a, c.length, r.length]
90
+ ), $ = b(
91
+ () => a && r.length > 0 && !n,
92
+ [a, r.length, n]
93
+ ), q = b(
94
+ () => a && !n && r.length === 0,
95
+ [a, n, r.length]
96
+ ), A = /* @__PURE__ */ s(
97
+ X,
98
+ {
99
+ onChange: (e) => {
100
+ e && u(e);
101
+ },
102
+ value: null,
103
+ children: [
104
+ /* @__PURE__ */ s(
105
+ "div",
106
+ {
107
+ className: m(
108
+ "relative z-10 h-14 border-transparent border-b p-1.5 transition",
109
+ v && "border-stone-200 dark:border-white/10"
110
+ ),
111
+ children: [
112
+ /* @__PURE__ */ t(
113
+ B,
114
+ {
115
+ autoComplete: "off",
116
+ autoFocus: !0,
117
+ className: m(
118
+ "peer h-full w-full rounded-xl bg-white pr-14 pl-11 text-stone-950 tracking-tight shadow-sm outline-none ring ring-black/5 transition placeholder:text-stone-400 focus:ring-black/90 dark:bg-stone-900 dark:text-white dark:focus:ring-white placeholder:dark:text-white/50",
119
+ "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none",
120
+ !v && a && "shadow-lg"
121
+ ),
122
+ onChange: (e) => R(e.target.value),
123
+ onKeyDown: H,
124
+ placeholder: f,
125
+ ref: w,
126
+ type: "search",
127
+ value: a
128
+ }
129
+ ),
130
+ /* @__PURE__ */ t(
131
+ U,
132
+ {
133
+ className: "absolute top-1/2 left-5 -translate-y-1/2 text-stone-950 opacity-50 peer-focus:opacity-100 dark:text-white",
134
+ size: 18
135
+ }
136
+ ),
137
+ a && /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-6 flex -translate-y-1/2 items-center justify-center gap-1 rounded-md bg-stone-950/5 px-1.5 py-1.5 font-medium text-xs text-zinc-950/70 leading-[9px] dark:bg-white/5 dark:text-white/70", children: "ESC" })
138
+ ]
139
+ }
140
+ ),
141
+ /* @__PURE__ */ s(
142
+ J,
143
+ {
144
+ className: "mx-1.5 max-h-[calc(100vh-10rem)] overflow-y-auto",
145
+ onScroll: I,
146
+ static: !0,
147
+ children: [
148
+ Q && /* @__PURE__ */ s(g, { children: [
149
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-2.5 py-2", children: /* @__PURE__ */ t("span", { className: "truncate text-sm text-stone-500", children: "Recent searches" }) }),
150
+ c.map((e) => /* @__PURE__ */ t(
151
+ C,
152
+ {
153
+ className: "last:mb-2",
154
+ value: e,
155
+ children: ({ focus: l }) => /* @__PURE__ */ t(
156
+ j,
157
+ {
158
+ description: e.content,
159
+ header: e.header,
160
+ icon: e.icon,
161
+ isActive: l,
162
+ metadata: e.metadata
163
+ }
164
+ )
165
+ },
166
+ e.id
167
+ ))
168
+ ] }),
169
+ $ && r.map((e) => /* @__PURE__ */ t(
170
+ C,
171
+ {
172
+ className: "last:mb-2",
173
+ value: e,
174
+ children: ({ focus: l }) => /* @__PURE__ */ t(
175
+ j,
176
+ {
177
+ description: e.content,
178
+ header: e.header,
179
+ icon: e.icon,
180
+ isActive: l,
181
+ metadata: e.metadata
182
+ }
183
+ )
184
+ },
185
+ e.id
186
+ )),
187
+ n && a && /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center gap-3 px-2.5 py-12", children: D || /* @__PURE__ */ s(g, { children: [
188
+ /* @__PURE__ */ t(V, { className: "size-6 animate-spin text-stone-400 dark:text-stone-500" }),
189
+ /* @__PURE__ */ s("div", { className: "text-center", children: [
190
+ /* @__PURE__ */ t("p", { className: "font-medium text-sm text-stone-700 dark:text-stone-300", children: "Searching..." }),
191
+ /* @__PURE__ */ s("p", { className: "mt-1 text-stone-500 text-xs dark:text-stone-400", children: [
192
+ 'Finding results for "',
193
+ a,
194
+ '"'
195
+ ] })
196
+ ] })
197
+ ] }) }),
198
+ q && /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center gap-3 px-2.5 py-12", children: S || /* @__PURE__ */ s(g, { children: [
199
+ /* @__PURE__ */ t(W, { className: "size-6 text-stone-300 dark:text-stone-600" }),
200
+ /* @__PURE__ */ s("div", { className: "text-center", children: [
201
+ /* @__PURE__ */ t("p", { className: "font-medium text-sm text-stone-700 dark:text-stone-300", children: "No results found" }),
202
+ /* @__PURE__ */ t("p", { className: "mt-1 text-stone-500 text-xs dark:text-stone-400", children: "Try searching with different keywords" })
203
+ ] })
204
+ ] }) })
205
+ ]
206
+ }
207
+ )
208
+ ]
209
+ }
210
+ );
211
+ return /* @__PURE__ */ t(Y, { appear: !0, as: x, show: i, children: /* @__PURE__ */ s(
212
+ Z,
213
+ {
214
+ as: "div",
215
+ className: m("relative z-50", z),
216
+ onClose: o,
217
+ children: [
218
+ /* @__PURE__ */ t(
219
+ F,
220
+ {
221
+ as: x,
222
+ enter: "ease-out duration-100",
223
+ enterFrom: "opacity-0",
224
+ enterTo: "opacity-100",
225
+ leave: "ease-in duration-50",
226
+ leaveFrom: "opacity-100",
227
+ leaveTo: "opacity-0",
228
+ children: /* @__PURE__ */ t("div", { className: "fixed inset-0 bg-black/20 backdrop-blur-sm transition-opacity dark:bg-black/40" })
229
+ }
230
+ ),
231
+ /* @__PURE__ */ t(
232
+ "div",
233
+ {
234
+ className: m(
235
+ "fixed inset-0 z-10 flex justify-center p-4",
236
+ y === "top" ? "items-start" : "items-center"
237
+ ),
238
+ style: y === "top" ? { paddingTop: E } : void 0,
239
+ children: /* @__PURE__ */ t(
240
+ F,
241
+ {
242
+ as: x,
243
+ enter: "ease-out duration-100",
244
+ enterFrom: "opacity-0 scale-95",
245
+ enterTo: "opacity-100 scale-100",
246
+ leave: "ease-in duration-50",
247
+ leaveFrom: "opacity-100 scale-100",
248
+ leaveTo: "opacity-0 scale-95",
249
+ children: /* @__PURE__ */ t(_, { className: "flex w-full max-w-[640px] flex-col overflow-hidden rounded-2xl border border-stone-200 bg-white shadow-2xl dark:border-white/10 dark:bg-stone-900", children: A })
250
+ }
251
+ )
252
+ }
253
+ )
254
+ ]
255
+ }
256
+ ) });
257
+ }
258
+ );
259
+ ee.displayName = "Search";
260
+ export {
261
+ ee as Search,
262
+ j as SearchHit
263
+ };