@miethe/ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +1536 -0
  3. package/dist/bulk-actions/Button.d.ts +28 -0
  4. package/dist/bulk-actions/Button.d.ts.map +1 -0
  5. package/dist/bulk-actions/Button.js +45 -0
  6. package/dist/bulk-actions/Button.js.map +1 -0
  7. package/dist/bulk-actions/bulk-action-bar.d.ts +91 -0
  8. package/dist/bulk-actions/bulk-action-bar.d.ts.map +1 -0
  9. package/dist/bulk-actions/bulk-action-bar.js +94 -0
  10. package/dist/bulk-actions/bulk-action-bar.js.map +1 -0
  11. package/dist/bulk-actions/index.d.ts +5 -0
  12. package/dist/bulk-actions/index.d.ts.map +1 -0
  13. package/dist/bulk-actions/index.js +7 -0
  14. package/dist/bulk-actions/index.js.map +1 -0
  15. package/dist/bulk-actions/utils.d.ts +6 -0
  16. package/dist/bulk-actions/utils.d.ts.map +1 -0
  17. package/dist/bulk-actions/utils.js +9 -0
  18. package/dist/bulk-actions/utils.js.map +1 -0
  19. package/dist/components/ui/alert.d.ts +9 -0
  20. package/dist/components/ui/alert.d.ts.map +1 -0
  21. package/dist/components/ui/alert.js +23 -0
  22. package/dist/components/ui/alert.js.map +1 -0
  23. package/dist/components/ui/button.d.ts +12 -0
  24. package/dist/components/ui/button.d.ts.map +1 -0
  25. package/dist/components/ui/button.js +34 -0
  26. package/dist/components/ui/button.js.map +1 -0
  27. package/dist/components/ui/collapsible.d.ts +6 -0
  28. package/dist/components/ui/collapsible.d.ts.map +1 -0
  29. package/dist/components/ui/collapsible.js +7 -0
  30. package/dist/components/ui/collapsible.js.map +1 -0
  31. package/dist/components/ui/skeleton.d.ts +4 -0
  32. package/dist/components/ui/skeleton.d.ts.map +1 -0
  33. package/dist/components/ui/skeleton.js +7 -0
  34. package/dist/components/ui/skeleton.js.map +1 -0
  35. package/dist/content-viewer/ContentPane.d.ts +107 -0
  36. package/dist/content-viewer/ContentPane.d.ts.map +1 -0
  37. package/dist/content-viewer/ContentPane.js +247 -0
  38. package/dist/content-viewer/ContentPane.js.map +1 -0
  39. package/dist/content-viewer/ContentViewerProvider.d.ts +83 -0
  40. package/dist/content-viewer/ContentViewerProvider.d.ts.map +1 -0
  41. package/dist/content-viewer/ContentViewerProvider.js +92 -0
  42. package/dist/content-viewer/ContentViewerProvider.js.map +1 -0
  43. package/dist/content-viewer/FileTree.d.ts +71 -0
  44. package/dist/content-viewer/FileTree.d.ts.map +1 -0
  45. package/dist/content-viewer/FileTree.js +294 -0
  46. package/dist/content-viewer/FileTree.js.map +1 -0
  47. package/dist/content-viewer/adapters.d.ts +101 -0
  48. package/dist/content-viewer/adapters.d.ts.map +1 -0
  49. package/dist/content-viewer/adapters.js +32 -0
  50. package/dist/content-viewer/adapters.js.map +1 -0
  51. package/dist/content-viewer/index.d.ts +8 -0
  52. package/dist/content-viewer/index.d.ts.map +1 -0
  53. package/dist/content-viewer/index.js +5 -0
  54. package/dist/content-viewer/index.js.map +1 -0
  55. package/dist/diff/DiffViewer.d.ts +112 -0
  56. package/dist/diff/DiffViewer.d.ts.map +1 -0
  57. package/dist/diff/DiffViewer.js +414 -0
  58. package/dist/diff/DiffViewer.js.map +1 -0
  59. package/dist/diff/diff.d.ts +32 -0
  60. package/dist/diff/diff.d.ts.map +1 -0
  61. package/dist/diff/diff.js +8 -0
  62. package/dist/diff/diff.js.map +1 -0
  63. package/dist/diff/index.d.ts +4 -0
  64. package/dist/diff/index.d.ts.map +1 -0
  65. package/dist/diff/index.js +3 -0
  66. package/dist/diff/index.js.map +1 -0
  67. package/dist/display/FilePreviewPane.d.ts +31 -0
  68. package/dist/display/FilePreviewPane.d.ts.map +1 -0
  69. package/dist/display/FilePreviewPane.js +144 -0
  70. package/dist/display/FilePreviewPane.js.map +1 -0
  71. package/dist/display/FrontmatterDisplay.d.ts +33 -0
  72. package/dist/display/FrontmatterDisplay.d.ts.map +1 -0
  73. package/dist/display/FrontmatterDisplay.js +79 -0
  74. package/dist/display/FrontmatterDisplay.js.map +1 -0
  75. package/dist/display/index.d.ts +5 -0
  76. package/dist/display/index.d.ts.map +1 -0
  77. package/dist/display/index.js +4 -0
  78. package/dist/display/index.js.map +1 -0
  79. package/dist/editor/MarkdownEditor.d.ts +28 -0
  80. package/dist/editor/MarkdownEditor.d.ts.map +1 -0
  81. package/dist/editor/MarkdownEditor.js +160 -0
  82. package/dist/editor/MarkdownEditor.js.map +1 -0
  83. package/dist/editor/SplitPreview.d.ts +28 -0
  84. package/dist/editor/SplitPreview.d.ts.map +1 -0
  85. package/dist/editor/SplitPreview.js +34 -0
  86. package/dist/editor/SplitPreview.js.map +1 -0
  87. package/dist/editor/index.d.ts +5 -0
  88. package/dist/editor/index.d.ts.map +1 -0
  89. package/dist/editor/index.js +4 -0
  90. package/dist/editor/index.js.map +1 -0
  91. package/dist/filters/filters-dropdown.d.ts +24 -0
  92. package/dist/filters/filters-dropdown.d.ts.map +1 -0
  93. package/dist/filters/filters-dropdown.js +36 -0
  94. package/dist/filters/filters-dropdown.js.map +1 -0
  95. package/dist/filters/index.d.ts +9 -0
  96. package/dist/filters/index.d.ts.map +1 -0
  97. package/dist/filters/index.js +5 -0
  98. package/dist/filters/index.js.map +1 -0
  99. package/dist/filters/sort-dropdown.d.ts +13 -0
  100. package/dist/filters/sort-dropdown.d.ts.map +1 -0
  101. package/dist/filters/sort-dropdown.js +20 -0
  102. package/dist/filters/sort-dropdown.js.map +1 -0
  103. package/dist/filters/tag-filter-popover.d.ts +39 -0
  104. package/dist/filters/tag-filter-popover.d.ts.map +1 -0
  105. package/dist/filters/tag-filter-popover.js +72 -0
  106. package/dist/filters/tag-filter-popover.js.map +1 -0
  107. package/dist/filters/tool-filter-popover.d.ts +42 -0
  108. package/dist/filters/tool-filter-popover.d.ts.map +1 -0
  109. package/dist/filters/tool-filter-popover.js +67 -0
  110. package/dist/filters/tool-filter-popover.js.map +1 -0
  111. package/dist/hooks/use-debounce.d.ts +9 -0
  112. package/dist/hooks/use-debounce.d.ts.map +1 -0
  113. package/dist/hooks/use-debounce.js +21 -0
  114. package/dist/hooks/use-debounce.js.map +1 -0
  115. package/dist/hooks/use-intersection-observer.d.ts +11 -0
  116. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  117. package/dist/hooks/use-intersection-observer.js +25 -0
  118. package/dist/hooks/use-intersection-observer.js.map +1 -0
  119. package/dist/index.d.ts +10 -0
  120. package/dist/index.d.ts.map +1 -0
  121. package/dist/index.js +10 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/pickers/EntityPickerDialog.d.ts +233 -0
  124. package/dist/pickers/EntityPickerDialog.d.ts.map +1 -0
  125. package/dist/pickers/EntityPickerDialog.js +355 -0
  126. package/dist/pickers/EntityPickerDialog.js.map +1 -0
  127. package/dist/pickers/EntityPickerViewToggle.d.ts +8 -0
  128. package/dist/pickers/EntityPickerViewToggle.d.ts.map +1 -0
  129. package/dist/pickers/EntityPickerViewToggle.js +17 -0
  130. package/dist/pickers/EntityPickerViewToggle.js.map +1 -0
  131. package/dist/pickers/index.d.ts +5 -0
  132. package/dist/pickers/index.d.ts.map +1 -0
  133. package/dist/pickers/index.js +3 -0
  134. package/dist/pickers/index.js.map +1 -0
  135. package/dist/primitives/Badge.d.ts +16 -0
  136. package/dist/primitives/Badge.d.ts.map +1 -0
  137. package/dist/primitives/Badge.js +43 -0
  138. package/dist/primitives/Badge.js.map +1 -0
  139. package/dist/primitives/BaseArtifactModal.d.ts +114 -0
  140. package/dist/primitives/BaseArtifactModal.d.ts.map +1 -0
  141. package/dist/primitives/BaseArtifactModal.js +76 -0
  142. package/dist/primitives/BaseArtifactModal.js.map +1 -0
  143. package/dist/primitives/Dialog.d.ts +20 -0
  144. package/dist/primitives/Dialog.d.ts.map +1 -0
  145. package/dist/primitives/Dialog.js +24 -0
  146. package/dist/primitives/Dialog.js.map +1 -0
  147. package/dist/primitives/DropdownMenu.d.ts +28 -0
  148. package/dist/primitives/DropdownMenu.d.ts.map +1 -0
  149. package/dist/primitives/DropdownMenu.js +34 -0
  150. package/dist/primitives/DropdownMenu.js.map +1 -0
  151. package/dist/primitives/EnterpriseOwnerBadge.d.ts +9 -0
  152. package/dist/primitives/EnterpriseOwnerBadge.d.ts.map +1 -0
  153. package/dist/primitives/EnterpriseOwnerBadge.js +12 -0
  154. package/dist/primitives/EnterpriseOwnerBadge.js.map +1 -0
  155. package/dist/primitives/GroupedSelect.d.ts +30 -0
  156. package/dist/primitives/GroupedSelect.d.ts.map +1 -0
  157. package/dist/primitives/GroupedSelect.js +47 -0
  158. package/dist/primitives/GroupedSelect.js.map +1 -0
  159. package/dist/primitives/Input.d.ts +6 -0
  160. package/dist/primitives/Input.d.ts.map +1 -0
  161. package/dist/primitives/Input.js +9 -0
  162. package/dist/primitives/Input.js.map +1 -0
  163. package/dist/primitives/LockIcon.d.ts +11 -0
  164. package/dist/primitives/LockIcon.d.ts.map +1 -0
  165. package/dist/primitives/LockIcon.js +15 -0
  166. package/dist/primitives/LockIcon.js.map +1 -0
  167. package/dist/primitives/MaskedSecretInput.d.ts +16 -0
  168. package/dist/primitives/MaskedSecretInput.d.ts.map +1 -0
  169. package/dist/primitives/MaskedSecretInput.js +42 -0
  170. package/dist/primitives/MaskedSecretInput.js.map +1 -0
  171. package/dist/primitives/ModalHeader.d.ts +66 -0
  172. package/dist/primitives/ModalHeader.d.ts.map +1 -0
  173. package/dist/primitives/ModalHeader.js +58 -0
  174. package/dist/primitives/ModalHeader.js.map +1 -0
  175. package/dist/primitives/Popover.d.ts +9 -0
  176. package/dist/primitives/Popover.d.ts.map +1 -0
  177. package/dist/primitives/Popover.js +13 -0
  178. package/dist/primitives/Popover.js.map +1 -0
  179. package/dist/primitives/ScrollArea.d.ts +6 -0
  180. package/dist/primitives/ScrollArea.d.ts.map +1 -0
  181. package/dist/primitives/ScrollArea.js +11 -0
  182. package/dist/primitives/ScrollArea.js.map +1 -0
  183. package/dist/primitives/SearchableCombobox.d.ts +30 -0
  184. package/dist/primitives/SearchableCombobox.d.ts.map +1 -0
  185. package/dist/primitives/SearchableCombobox.js +124 -0
  186. package/dist/primitives/SearchableCombobox.js.map +1 -0
  187. package/dist/primitives/SearchablePickerDialog.d.ts +20 -0
  188. package/dist/primitives/SearchablePickerDialog.d.ts.map +1 -0
  189. package/dist/primitives/SearchablePickerDialog.js +78 -0
  190. package/dist/primitives/SearchablePickerDialog.js.map +1 -0
  191. package/dist/primitives/StatusBadge.d.ts +21 -0
  192. package/dist/primitives/StatusBadge.d.ts.map +1 -0
  193. package/dist/primitives/StatusBadge.js +25 -0
  194. package/dist/primitives/StatusBadge.js.map +1 -0
  195. package/dist/primitives/TabNavigation.d.ts +68 -0
  196. package/dist/primitives/TabNavigation.d.ts.map +1 -0
  197. package/dist/primitives/TabNavigation.js +74 -0
  198. package/dist/primitives/TabNavigation.js.map +1 -0
  199. package/dist/primitives/Tabs.d.ts +8 -0
  200. package/dist/primitives/Tabs.d.ts.map +1 -0
  201. package/dist/primitives/Tabs.js +14 -0
  202. package/dist/primitives/Tabs.js.map +1 -0
  203. package/dist/primitives/Tooltip.d.ts +8 -0
  204. package/dist/primitives/Tooltip.d.ts.map +1 -0
  205. package/dist/primitives/Tooltip.js +12 -0
  206. package/dist/primitives/Tooltip.js.map +1 -0
  207. package/dist/primitives/VerticalTabNavigation.d.ts +75 -0
  208. package/dist/primitives/VerticalTabNavigation.d.ts.map +1 -0
  209. package/dist/primitives/VerticalTabNavigation.js +166 -0
  210. package/dist/primitives/VerticalTabNavigation.js.map +1 -0
  211. package/dist/primitives/ViewModeToggle.d.ts +12 -0
  212. package/dist/primitives/ViewModeToggle.d.ts.map +1 -0
  213. package/dist/primitives/ViewModeToggle.js +56 -0
  214. package/dist/primitives/ViewModeToggle.js.map +1 -0
  215. package/dist/primitives/WizardShell.d.ts +81 -0
  216. package/dist/primitives/WizardShell.d.ts.map +1 -0
  217. package/dist/primitives/WizardShell.js +73 -0
  218. package/dist/primitives/WizardShell.js.map +1 -0
  219. package/dist/primitives/index.d.ts +38 -0
  220. package/dist/primitives/index.d.ts.map +1 -0
  221. package/dist/primitives/index.js +24 -0
  222. package/dist/primitives/index.js.map +1 -0
  223. package/dist/primitives/utils.d.ts +6 -0
  224. package/dist/primitives/utils.d.ts.map +1 -0
  225. package/dist/primitives/utils.js +9 -0
  226. package/dist/primitives/utils.js.map +1 -0
  227. package/dist/types/index.d.ts +63 -0
  228. package/dist/types/index.d.ts.map +1 -0
  229. package/dist/types/index.js +9 -0
  230. package/dist/types/index.js.map +1 -0
  231. package/dist/utils/frontmatter.d.ts +63 -0
  232. package/dist/utils/frontmatter.d.ts.map +1 -0
  233. package/dist/utils/frontmatter.js +345 -0
  234. package/dist/utils/frontmatter.js.map +1 -0
  235. package/dist/utils/index.d.ts +6 -0
  236. package/dist/utils/index.d.ts.map +1 -0
  237. package/dist/utils/index.js +6 -0
  238. package/dist/utils/index.js.map +1 -0
  239. package/dist/utils/perf-marks.d.ts +28 -0
  240. package/dist/utils/perf-marks.d.ts.map +1 -0
  241. package/dist/utils/perf-marks.js +45 -0
  242. package/dist/utils/perf-marks.js.map +1 -0
  243. package/dist/utils/readme-utils.d.ts +67 -0
  244. package/dist/utils/readme-utils.d.ts.map +1 -0
  245. package/dist/utils/readme-utils.js +164 -0
  246. package/dist/utils/readme-utils.js.map +1 -0
  247. package/dist/utils/type-colors.d.ts +70 -0
  248. package/dist/utils/type-colors.d.ts.map +1 -0
  249. package/dist/utils/type-colors.js +118 -0
  250. package/dist/utils/type-colors.js.map +1 -0
  251. package/package.json +131 -0
@@ -0,0 +1,8 @@
1
+ export type ViewMode = 'grid' | 'list';
2
+ export interface EntityPickerViewToggleProps {
3
+ value: ViewMode;
4
+ onChange: (mode: ViewMode) => void;
5
+ className?: string;
6
+ }
7
+ export declare function EntityPickerViewToggle({ value, onChange, className, }: EntityPickerViewToggleProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=EntityPickerViewToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityPickerViewToggle.d.ts","sourceRoot":"","sources":["../../src/pickers/EntityPickerViewToggle.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,QAAQ,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,2BAA2B,2CA6B7B"}
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { LayoutGrid, List } from 'lucide-react';
4
+ import { cn } from '../primitives/utils';
5
+ const OPTIONS = [
6
+ { mode: 'grid', icon: LayoutGrid, label: 'Grid view' },
7
+ { mode: 'list', icon: List, label: 'List view' },
8
+ ];
9
+ export function EntityPickerViewToggle({ value, onChange, className, }) {
10
+ return (_jsx("div", { role: "group", "aria-label": "View mode", className: cn('inline-flex items-center rounded-md border border-input bg-background p-0.5 shadow-sm', className), children: OPTIONS.map(({ mode, icon: Icon, label }) => {
11
+ const isActive = value === mode;
12
+ return (_jsx("button", { type: "button", "aria-label": label, "aria-pressed": isActive, onClick: () => onChange(mode), className: cn('inline-flex h-7 w-7 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', isActive
13
+ ? 'bg-accent text-accent-foreground'
14
+ : 'text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground'), children: _jsx(Icon, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }, mode));
15
+ }) }));
16
+ }
17
+ //# sourceMappingURL=EntityPickerViewToggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityPickerViewToggle.js","sourceRoot":"","sources":["../../src/pickers/EntityPickerViewToggle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAUzC,MAAM,OAAO,GAAiE;IAC5E,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE;IACtD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;CACjD,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,SAAS,GACmB;IAC5B,OAAO,CACL,cACE,IAAI,EAAC,OAAO,gBACD,WAAW,EACtB,SAAS,EAAE,EAAE,CAAC,uFAAuF,EAAE,SAAS,CAAC,YAEhH,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3C,MAAM,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC;YAChC,OAAO,CACL,iBAEE,IAAI,EAAC,QAAQ,gBACD,KAAK,kBACH,QAAQ,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,SAAS,EAAE,EAAE,CACX,mJAAmJ,EACnJ,QAAQ;oBACN,CAAC,CAAC,kCAAkC;oBACpC,CAAC,CAAC,uEAAuE,CAC5E,YAED,KAAC,IAAI,IAAC,SAAS,EAAC,aAAa,iBAAa,MAAM,GAAG,IAZ9C,IAAI,CAaF,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { EntityPickerDialog, EntityPickerTrigger } from './EntityPickerDialog';
2
+ export type { EntityPickerDialogProps, EntityPickerTab, EntityPickerTriggerProps, InfiniteDataResult, } from './EntityPickerDialog';
3
+ export { EntityPickerViewToggle } from './EntityPickerViewToggle';
4
+ export type { EntityPickerViewToggleProps, ViewMode } from './EntityPickerViewToggle';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pickers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,YAAY,EACV,uBAAuB,EACvB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { EntityPickerDialog, EntityPickerTrigger } from './EntityPickerDialog';
2
+ export { EntityPickerViewToggle } from './EntityPickerViewToggle';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pickers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAO/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ /**
8
+ * Custom hex color for the badge background.
9
+ * Overrides variant color when provided.
10
+ * @example "#FF5733"
11
+ */
12
+ colorStyle?: string;
13
+ }
14
+ declare function Badge({ className, variant, colorStyle, style, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
15
+ export { Badge, badgeVariants };
16
+ //# sourceMappingURL=Badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/primitives/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAkBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkBD,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAa7E;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from './utils';
4
+ const badgeVariants = cva('inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
5
+ variants: {
6
+ variant: {
7
+ default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
8
+ secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
9
+ destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
10
+ outline: 'text-foreground',
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ variant: 'default',
15
+ },
16
+ });
17
+ /**
18
+ * Calculate contrast text color (white or black) for a given background color.
19
+ * Uses relative luminance formula from WCAG 2.0.
20
+ */
21
+ function getContrastTextColor(hexColor) {
22
+ const hex = hexColor.replace('#', '');
23
+ const r = parseInt(hex.substring(0, 2), 16) / 255;
24
+ const g = parseInt(hex.substring(2, 4), 16) / 255;
25
+ const b = parseInt(hex.substring(4, 6), 16) / 255;
26
+ const luminance = 0.2126 * (r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4)) +
27
+ 0.7152 * (g <= 0.03928 ? g / 12.92 : Math.pow((g + 0.055) / 1.055, 2.4)) +
28
+ 0.0722 * (b <= 0.03928 ? b / 12.92 : Math.pow((b + 0.055) / 1.055, 2.4));
29
+ return luminance > 0.5 ? '#000000' : '#FFFFFF';
30
+ }
31
+ function Badge({ className, variant, colorStyle, style, ...props }) {
32
+ const customStyle = colorStyle
33
+ ? {
34
+ backgroundColor: colorStyle,
35
+ borderColor: colorStyle,
36
+ color: getContrastTextColor(colorStyle),
37
+ ...style,
38
+ }
39
+ : style;
40
+ return (_jsx("div", { className: cn(badgeVariants({ variant }), className), style: customStyle, ...props }));
41
+ }
42
+ export { Badge, badgeVariants };
43
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/primitives/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,MAAM,aAAa,GAAG,GAAG,CACvB,sKAAsK,EACtK;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,kFAAkF;YACpF,SAAS,EACP,iFAAiF;YACnF,WAAW,EACT,8FAA8F;YAChG,OAAO,EAAE,iBAAiB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAaF;;;GAGG;AACH,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC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AU;YACvB,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC;YACvC,GAAG,KAAK;SACT;QACH,CAAC,CAAC,KAAK,CAAC;IAEV,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,KAAM,KAAK,GAAI,CAC7F,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * BaseArtifactModal Component — @miethe/ui primitive
3
+ *
4
+ * A composition-based modal foundation for artifact-focused dialogs.
5
+ * Encapsulates the common structure: Dialog wrapper, artifact header with
6
+ * icon resolution, tab bar navigation, and scrollable content area.
7
+ *
8
+ * Decoupled from SkillMeat's `Artifact` type via the generic `ModalArtifact`
9
+ * interface. Icon resolution is opt-in via the `getTypeConfig` prop.
10
+ *
11
+ * @example Basic usage
12
+ * ```tsx
13
+ * <BaseArtifactModal
14
+ * artifact={{ name: 'My Skill', type: 'skill' }}
15
+ * open={isOpen}
16
+ * onClose={() => setIsOpen(false)}
17
+ * activeTab={activeTab}
18
+ * onTabChange={setActiveTab}
19
+ * tabs={[
20
+ * { value: 'overview', label: 'Overview', icon: Info },
21
+ * { value: 'settings', label: 'Settings', icon: Settings },
22
+ * ]}
23
+ * >
24
+ * <div>Tab content here</div>
25
+ * </BaseArtifactModal>
26
+ * ```
27
+ */
28
+ import * as React from 'react';
29
+ import { type Tab } from './TabNavigation';
30
+ /**
31
+ * Minimal artifact interface required by BaseArtifactModal.
32
+ * Consumers pass any object that satisfies this shape — including the full
33
+ * SkillMeat `Artifact` type, which is a structural superset.
34
+ */
35
+ export interface ModalArtifact {
36
+ /** Display name of the artifact */
37
+ name: string;
38
+ /** Artifact type string (e.g. 'skill', 'command', 'agent') */
39
+ type: string;
40
+ /** Optional description shown in the header */
41
+ description?: string;
42
+ }
43
+ /** Configuration for a single artifact type — controls icon and color */
44
+ export interface ArtifactTypeConfig {
45
+ /** Lucide icon name (e.g. 'Zap', 'Terminal', 'Bot') */
46
+ icon?: string;
47
+ /** Tailwind color class for the icon (e.g. 'text-yellow-500') */
48
+ color?: string;
49
+ }
50
+ /**
51
+ * Tab definition for the BaseArtifactModal navigation bar.
52
+ * Re-exported from TabNavigation for convenience — consumers can use either
53
+ * `Tab` or `ModalTab` interchangeably.
54
+ */
55
+ export type ModalTab = Tab;
56
+ export interface BaseArtifactModalProps {
57
+ /** The artifact to display in the modal */
58
+ artifact: ModalArtifact;
59
+ /** Whether the modal is open */
60
+ open: boolean;
61
+ /** Called when the modal should close */
62
+ onClose: () => void;
63
+ /**
64
+ * Optional override for the Dialog onOpenChange callback.
65
+ * When provided, it is called in addition to `onClose` on close.
66
+ */
67
+ onOpenChange?: (open: boolean) => void;
68
+ /** Current active tab (controlled) */
69
+ activeTab: string;
70
+ /** Tab change handler */
71
+ onTabChange: (tab: string) => void;
72
+ /** Tab definitions array */
73
+ tabs: Tab[];
74
+ /** Optional header action buttons (right side of header) */
75
+ headerActions?: React.ReactNode;
76
+ /** Tab content area */
77
+ children: React.ReactNode;
78
+ /** Optional extra CSS classes for DialogContent */
79
+ className?: string;
80
+ /** Optional max-width override (default: 'max-w-5xl lg:max-w-6xl') */
81
+ maxWidth?: string;
82
+ /** URL to return to if navigated from another page */
83
+ returnTo?: string;
84
+ /** Handler for return navigation */
85
+ onReturn?: () => void;
86
+ /** Optional content to render between header and tabs */
87
+ aboveTabsContent?: React.ReactNode;
88
+ /**
89
+ * Optional callback to resolve icon + color config for a given artifact type.
90
+ * When not provided the component renders a generic FileText icon.
91
+ *
92
+ * @example
93
+ * getTypeConfig={(type) => ARTIFACT_TYPES[type]}
94
+ */
95
+ getTypeConfig?: (type: string) => ArtifactTypeConfig | undefined;
96
+ }
97
+ /**
98
+ * BaseArtifactModal — composition-based modal foundation for artifact dialogs.
99
+ *
100
+ * Provides:
101
+ * - Dialog + DialogContent with standard 90vh sizing
102
+ * - Artifact icon resolution via optional `getTypeConfig` prop
103
+ * - ModalHeader with artifact name, description, icon, and actions slot
104
+ * - Optional return-to-previous navigation bar
105
+ * - TabNavigation with underline styling
106
+ * - Children slot for tab content
107
+ *
108
+ * Does NOT provide:
109
+ * - Tab content implementations (passed as children)
110
+ * - State management (activeTab is controlled externally)
111
+ * - Queries, mutations, or business logic
112
+ */
113
+ export declare function BaseArtifactModal({ artifact, open, onClose, onOpenChange, activeTab, onTabChange, tabs, headerActions, children, className, maxWidth, returnTo, onReturn, aboveTabsContent, getTypeConfig, }: BaseArtifactModalProps): import("react/jsx-runtime").JSX.Element;
114
+ //# sourceMappingURL=BaseArtifactModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseArtifactModal.d.ts","sourceRoot":"","sources":["../../src/primitives/BaseArtifactModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAO1D;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,QAAQ,EAAE,aAAa,CAAC;IACxB,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,yCAAyC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,4BAA4B;IAC5B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,4DAA4D;IAC5D,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;CAClE;AAMD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,SAAS,EACT,WAAW,EACX,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,aAAa,GACd,EAAE,sBAAsB,2CA0FxB"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * BaseArtifactModal Component — @miethe/ui primitive
3
+ *
4
+ * A composition-based modal foundation for artifact-focused dialogs.
5
+ * Encapsulates the common structure: Dialog wrapper, artifact header with
6
+ * icon resolution, tab bar navigation, and scrollable content area.
7
+ *
8
+ * Decoupled from SkillMeat's `Artifact` type via the generic `ModalArtifact`
9
+ * interface. Icon resolution is opt-in via the `getTypeConfig` prop.
10
+ *
11
+ * @example Basic usage
12
+ * ```tsx
13
+ * <BaseArtifactModal
14
+ * artifact={{ name: 'My Skill', type: 'skill' }}
15
+ * open={isOpen}
16
+ * onClose={() => setIsOpen(false)}
17
+ * activeTab={activeTab}
18
+ * onTabChange={setActiveTab}
19
+ * tabs={[
20
+ * { value: 'overview', label: 'Overview', icon: Info },
21
+ * { value: 'settings', label: 'Settings', icon: Settings },
22
+ * ]}
23
+ * >
24
+ * <div>Tab content here</div>
25
+ * </BaseArtifactModal>
26
+ * ```
27
+ */
28
+ 'use client';
29
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
+ import * as LucideIcons from 'lucide-react';
31
+ import { ArrowLeft, AlertCircle, FileText } from 'lucide-react';
32
+ import { Dialog, DialogContent } from './Dialog';
33
+ import { Tabs } from './Tabs';
34
+ import { ModalHeader } from './ModalHeader';
35
+ import { TabNavigation } from './TabNavigation';
36
+ import { cn } from './utils';
37
+ // ============================================================================
38
+ // Component
39
+ // ============================================================================
40
+ /**
41
+ * BaseArtifactModal — composition-based modal foundation for artifact dialogs.
42
+ *
43
+ * Provides:
44
+ * - Dialog + DialogContent with standard 90vh sizing
45
+ * - Artifact icon resolution via optional `getTypeConfig` prop
46
+ * - ModalHeader with artifact name, description, icon, and actions slot
47
+ * - Optional return-to-previous navigation bar
48
+ * - TabNavigation with underline styling
49
+ * - Children slot for tab content
50
+ *
51
+ * Does NOT provide:
52
+ * - Tab content implementations (passed as children)
53
+ * - State management (activeTab is controlled externally)
54
+ * - Queries, mutations, or business logic
55
+ */
56
+ export function BaseArtifactModal({ artifact, open, onClose, onOpenChange, activeTab, onTabChange, tabs, headerActions, children, className, maxWidth, returnTo, onReturn, aboveTabsContent, getTypeConfig, }) {
57
+ const handleOpenChange = (isOpen) => {
58
+ if (onOpenChange) {
59
+ onOpenChange(isOpen);
60
+ }
61
+ if (!isOpen) {
62
+ onClose();
63
+ }
64
+ };
65
+ // Resolve artifact icon from optional config callback
66
+ const config = getTypeConfig ? getTypeConfig(artifact.type) : undefined;
67
+ const iconName = config?.icon ?? 'FileText';
68
+ const IconLookup = LucideIcons[iconName];
69
+ const IconComponent = IconLookup || FileText;
70
+ // If getTypeConfig was provided but returned nothing, show unsupported fallback
71
+ if (getTypeConfig && !config) {
72
+ return (_jsx(Dialog, { open: open, onOpenChange: handleOpenChange, children: _jsxs(DialogContent, { className: "max-w-md", children: [_jsx(ModalHeader, { icon: AlertCircle, iconClassName: "text-yellow-500", title: artifact.name, description: `Artifact type "${artifact.type}" is not supported.` }), _jsx("div", { className: "flex justify-end p-4", children: _jsx("button", { type: "button", onClick: onClose, className: "inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", children: "Close" }) })] }) }));
73
+ }
74
+ return (_jsx(Dialog, { open: open, onOpenChange: handleOpenChange, children: _jsxs(DialogContent, { className: cn('flex h-[90vh] max-h-[90vh] min-h-0 flex-col overflow-hidden p-0', maxWidth ?? 'max-w-5xl lg:max-w-6xl', className), children: [_jsx(ModalHeader, { icon: IconComponent, iconClassName: config?.color, title: artifact.name, description: artifact.description, actions: headerActions }), returnTo && onReturn && (_jsx("div", { className: "border-b px-6 py-2", children: _jsxs("button", { type: "button", onClick: onReturn, className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [_jsx(ArrowLeft, { className: "h-4 w-4", "aria-hidden": "true" }), "Return to previous page"] }) })), aboveTabsContent, _jsxs(Tabs, { value: activeTab, onValueChange: onTabChange, className: "flex h-full min-h-0 flex-1 flex-col px-6", children: [_jsx(TabNavigation, { tabs: tabs }), children] })] }) }));
75
+ }
76
+ //# sourceMappingURL=BaseArtifactModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseArtifactModal.js","sourceRoot":"","sources":["../../src/primitives/BaseArtifactModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,YAAY,CAAC;;AAGb,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAY,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AA6E7B,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,SAAS,EACT,WAAW,EACX,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,aAAa,GACU;IACvB,MAAM,gBAAgB,GAAG,CAAC,MAAe,EAAE,EAAE;QAC3C,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;IAEF,sDAAsD;IACtD,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,MAAM,QAAQ,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BAE7C,GACL,CACP,EAGA,gBAAgB,EAGjB,MAAC,IAAI,IACH,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,WAAW,EAC1B,SAAS,EAAC,0CAA0C,aAEpD,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,EAC5B,QAAQ,IACJ,IACO,GACT,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
20
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/primitives/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAElF,CAAC;AAGF,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKlF,CAAC;AAGF,QAAA,MAAM,WAAW,oKASf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
5
+ import { X } from 'lucide-react';
6
+ import { cn } from './utils';
7
+ const Dialog = DialogPrimitive.Root;
8
+ const DialogTrigger = DialogPrimitive.Trigger;
9
+ const DialogPortal = DialogPrimitive.Portal;
10
+ const DialogClose = DialogPrimitive.Close;
11
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props })));
12
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
13
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
14
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
15
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
16
+ DialogHeader.displayName = 'DialogHeader';
17
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
18
+ DialogFooter.displayName = 'DialogFooter';
19
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
20
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
21
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
22
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
23
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
24
+ //# sourceMappingURL=Dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../src/primitives/Dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAEpC,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC;AAE9C,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC;AAE5C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,OAAO,IACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,wJAAwJ,EACxJ,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC;AAEhE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGp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G,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC;AAE5D,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC;AAExE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
28
+ //# sourceMappingURL=DropdownMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/primitives/DropdownMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAKvE,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAEhD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AAExD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAElD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAGH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAGH,QAAA,MAAM,mBAAmB,0KAevB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAQjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAI3F,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
+ import { Check, ChevronRight, Circle } from 'lucide-react';
6
+ import { cn } from './utils';
7
+ const DropdownMenu = DropdownMenuPrimitive.Root;
8
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
10
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
11
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
12
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
13
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
14
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
16
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
17
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
18
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
19
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
20
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
21
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
22
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
23
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
24
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
25
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
26
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
27
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
28
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
29
+ const DropdownMenuShortcut = ({ className, ...props }) => {
30
+ return (_jsx("span", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));
31
+ };
32
+ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
33
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
34
+ //# sourceMappingURL=DropdownMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../src/primitives/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO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C,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyC,EAAE,EAAE;IAC9F,OAAO,CACL,eAAM,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC5F,CAAC;AACJ,CAAC,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface EnterpriseOwnerBadgeProps {
2
+ className?: string;
3
+ }
4
+ /**
5
+ * Badge indicating that an artifact is managed by the enterprise organization.
6
+ * Displays inline on artifact cards to signal enterprise governance.
7
+ */
8
+ export declare function EnterpriseOwnerBadge({ className }: EnterpriseOwnerBadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=EnterpriseOwnerBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnterpriseOwnerBadge.d.ts","sourceRoot":"","sources":["../../src/primitives/EnterpriseOwnerBadge.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CAe5E"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Building2 } from 'lucide-react';
3
+ import { Badge } from './Badge';
4
+ import { cn } from './utils';
5
+ /**
6
+ * Badge indicating that an artifact is managed by the enterprise organization.
7
+ * Displays inline on artifact cards to signal enterprise governance.
8
+ */
9
+ export function EnterpriseOwnerBadge({ className }) {
10
+ return (_jsxs(Badge, { variant: "outline", "aria-label": "This artifact is managed by your organization", className: cn('inline-flex items-center gap-1 border-violet-500/30 bg-violet-500/10 font-medium text-violet-700 dark:text-violet-300', 'px-2 py-0.5 text-xs', className), children: [_jsx(Building2, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }), _jsx("span", { children: "Enterprise Managed" })] }));
11
+ }
12
+ //# sourceMappingURL=EnterpriseOwnerBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnterpriseOwnerBadge.js","sourceRoot":"","sources":["../../src/primitives/EnterpriseOwnerBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAM7B;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,SAAS,EAA6B;IAC3E,OAAO,CACL,MAAC,KAAK,IACJ,OAAO,EAAC,SAAS,gBACN,+CAA+C,EAC1D,SAAS,EAAE,EAAE,CACX,uHAAuH,EACvH,qBAAqB,EACrB,SAAS,CACV,aAED,KAAC,SAAS,IAAC,SAAS,EAAC,kBAAkB,iBAAa,MAAM,GAAG,EAC7D,gDAA+B,IACzB,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ export interface GroupedSelectItem {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ /** Hidden items are omitted from the DOM entirely (not just visually hidden). */
7
+ hidden?: boolean;
8
+ }
9
+ export interface GroupedSelectGroup {
10
+ label: string;
11
+ items: GroupedSelectItem[];
12
+ }
13
+ export interface GroupedSelectProps {
14
+ groups: GroupedSelectGroup[];
15
+ value?: string;
16
+ onValueChange?: (value: string) => void;
17
+ placeholder?: string;
18
+ disabled?: boolean;
19
+ className?: string;
20
+ }
21
+ /**
22
+ * A grouped select built on Radix Select. Each group is rendered as a
23
+ * `SelectGroup` with a labelled header. Items and entire groups with all
24
+ * items hidden are omitted from the DOM.
25
+ *
26
+ * Keyboard navigation across groups is handled natively by Radix.
27
+ */
28
+ declare function GroupedSelect({ groups, value, onValueChange, placeholder, disabled, className, }: GroupedSelectProps): React.ReactElement;
29
+ export { GroupedSelect };
30
+ //# sourceMappingURL=GroupedSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupedSelect.d.ts","sourceRoot":"","sources":["../../src/primitives/GroupedSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmJD;;;;;;GAMG;AACH,iBAAS,aAAa,CAAC,EACrB,MAAM,EACN,KAAK,EACL,aAAa,EACb,WAA4B,EAC5B,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAoCzC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as SelectPrimitive from '@radix-ui/react-select';
5
+ import { Check, ChevronDown, ChevronUp } from 'lucide-react';
6
+ import { cn } from './utils';
7
+ // ---------------------------------------------------------------------------
8
+ // Internal styled sub-components (following shadcn/DropdownMenu primitive pattern)
9
+ // ---------------------------------------------------------------------------
10
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn('flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background', 'placeholder:text-muted-foreground', 'focus:outline-none focus:ring-1 focus:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50', '[&>span]:line-clamp-1', className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })] })));
11
+ SelectTrigger.displayName = 'GroupedSelectTrigger';
12
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
13
+ SelectScrollUpButton.displayName = 'GroupedSelectScrollUpButton';
14
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
15
+ SelectScrollDownButton.displayName = 'GroupedSelectScrollDownButton';
16
+ const SelectContent = React.forwardRef(({ className, children, position = 'popper', ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, position: position, className: cn('relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md', 'data-[state=open]:animate-in data-[state=closed]:animate-out', 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2', 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', position === 'popper' &&
17
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn('p-1', position === 'popper' &&
18
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
19
+ SelectContent.displayName = 'GroupedSelectContent';
20
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-xs font-semibold text-muted-foreground', className), ...props })));
21
+ SelectLabel.displayName = 'GroupedSelectLabel';
22
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn('relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none', 'focus:bg-accent focus:text-accent-foreground', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
23
+ SelectItem.displayName = 'GroupedSelectItem';
24
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
25
+ SelectSeparator.displayName = 'GroupedSelectSeparator';
26
+ // ---------------------------------------------------------------------------
27
+ // GroupedSelect — public component
28
+ // ---------------------------------------------------------------------------
29
+ /**
30
+ * A grouped select built on Radix Select. Each group is rendered as a
31
+ * `SelectGroup` with a labelled header. Items and entire groups with all
32
+ * items hidden are omitted from the DOM.
33
+ *
34
+ * Keyboard navigation across groups is handled natively by Radix.
35
+ */
36
+ function GroupedSelect({ groups, value, onValueChange, placeholder = 'Select\u2026', disabled, className, }) {
37
+ // Filter to groups that have at least one visible item
38
+ const visibleGroups = groups
39
+ .map((group) => ({
40
+ ...group,
41
+ items: group.items.filter((item) => !item.hidden),
42
+ }))
43
+ .filter((group) => group.items.length > 0);
44
+ return (_jsxs(SelectPrimitive.Root, { value: value, onValueChange: onValueChange, disabled: disabled, children: [_jsx(SelectTrigger, { className: className, children: _jsx(SelectPrimitive.Value, { placeholder: placeholder }) }), _jsx(SelectContent, { children: visibleGroups.map((group, groupIndex) => (_jsxs(React.Fragment, { children: [groupIndex > 0 && _jsx(SelectSeparator, {}), _jsxs(SelectPrimitive.Group, { children: [_jsx(SelectLabel, { "aria-label": group.label, children: group.label }), group.items.map((item) => (_jsx(SelectItem, { value: item.value, disabled: item.disabled, children: item.label }, item.value)))] })] }, group.label))) })] }));
45
+ }
46
+ export { GroupedSelect };
47
+ //# sourceMappingURL=GroupedSelect.js.map