@miethe/ui 0.2.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +863 -9
  3. package/dist/components/content-viewer/ArticleViewer.d.ts +42 -0
  4. package/dist/components/content-viewer/ArticleViewer.d.ts.map +1 -0
  5. package/dist/components/content-viewer/ArticleViewer.js +321 -0
  6. package/dist/components/content-viewer/ArticleViewer.js.map +1 -0
  7. package/dist/components/content-viewer/FrontmatterHeader.d.ts +32 -0
  8. package/dist/components/content-viewer/FrontmatterHeader.d.ts.map +1 -0
  9. package/dist/components/content-viewer/FrontmatterHeader.js +95 -0
  10. package/dist/components/content-viewer/FrontmatterHeader.js.map +1 -0
  11. package/dist/components/content-viewer/callouts/Callout.d.ts +43 -0
  12. package/dist/components/content-viewer/callouts/Callout.d.ts.map +1 -0
  13. package/dist/components/content-viewer/callouts/Callout.js +86 -0
  14. package/dist/components/content-viewer/callouts/Callout.js.map +1 -0
  15. package/dist/components/content-viewer/callouts/index.d.ts +2 -0
  16. package/dist/components/content-viewer/callouts/index.d.ts.map +1 -0
  17. package/dist/components/content-viewer/callouts/index.js +2 -0
  18. package/dist/components/content-viewer/callouts/index.js.map +1 -0
  19. package/dist/components/content-viewer/index.d.ts +21 -0
  20. package/dist/components/content-viewer/index.d.ts.map +1 -0
  21. package/dist/components/content-viewer/index.js +29 -0
  22. package/dist/components/content-viewer/index.js.map +1 -0
  23. package/dist/components/content-viewer/plugins/index.d.ts +5 -0
  24. package/dist/components/content-viewer/plugins/index.d.ts.map +1 -0
  25. package/dist/components/content-viewer/plugins/index.js +5 -0
  26. package/dist/components/content-viewer/plugins/index.js.map +1 -0
  27. package/dist/components/content-viewer/plugins/lowlightLoader.d.ts +63 -0
  28. package/dist/components/content-viewer/plugins/lowlightLoader.d.ts.map +1 -0
  29. package/dist/components/content-viewer/plugins/lowlightLoader.js +120 -0
  30. package/dist/components/content-viewer/plugins/lowlightLoader.js.map +1 -0
  31. package/dist/components/content-viewer/plugins/rehypeCodeHighlight.d.ts +44 -0
  32. package/dist/components/content-viewer/plugins/rehypeCodeHighlight.d.ts.map +1 -0
  33. package/dist/components/content-viewer/plugins/rehypeCodeHighlight.js +122 -0
  34. package/dist/components/content-viewer/plugins/rehypeCodeHighlight.js.map +1 -0
  35. package/dist/components/content-viewer/plugins/rehypeExternalLinks.d.ts +59 -0
  36. package/dist/components/content-viewer/plugins/rehypeExternalLinks.d.ts.map +1 -0
  37. package/dist/components/content-viewer/plugins/rehypeExternalLinks.js +79 -0
  38. package/dist/components/content-viewer/plugins/rehypeExternalLinks.js.map +1 -0
  39. package/dist/components/content-viewer/plugins/rehypeHeadingIds.d.ts +37 -0
  40. package/dist/components/content-viewer/plugins/rehypeHeadingIds.d.ts.map +1 -0
  41. package/dist/components/content-viewer/plugins/rehypeHeadingIds.js +82 -0
  42. package/dist/components/content-viewer/plugins/rehypeHeadingIds.js.map +1 -0
  43. package/dist/components/content-viewer/plugins/remarkCallouts.d.ts +39 -0
  44. package/dist/components/content-viewer/plugins/remarkCallouts.d.ts.map +1 -0
  45. package/dist/components/content-viewer/plugins/remarkCallouts.js +77 -0
  46. package/dist/components/content-viewer/plugins/remarkCallouts.js.map +1 -0
  47. package/dist/components/content-viewer/plugins/slugify.d.ts +24 -0
  48. package/dist/components/content-viewer/plugins/slugify.d.ts.map +1 -0
  49. package/dist/components/content-viewer/plugins/slugify.js +31 -0
  50. package/dist/components/content-viewer/plugins/slugify.js.map +1 -0
  51. package/dist/components/content-viewer/sanitize.d.ts +75 -0
  52. package/dist/components/content-viewer/sanitize.d.ts.map +1 -0
  53. package/dist/components/content-viewer/sanitize.js +252 -0
  54. package/dist/components/content-viewer/sanitize.js.map +1 -0
  55. package/dist/components/content-viewer/types.d.ts +315 -0
  56. package/dist/components/content-viewer/types.d.ts.map +1 -0
  57. package/dist/components/content-viewer/types.js +8 -0
  58. package/dist/components/content-viewer/types.js.map +1 -0
  59. package/dist/components/content-viewer/variants.d.ts +71 -0
  60. package/dist/components/content-viewer/variants.d.ts.map +1 -0
  61. package/dist/components/content-viewer/variants.js +105 -0
  62. package/dist/components/content-viewer/variants.js.map +1 -0
  63. package/dist/content-viewer/ContentPane.d.ts +44 -1
  64. package/dist/content-viewer/ContentPane.d.ts.map +1 -1
  65. package/dist/content-viewer/ContentPane.js +139 -5
  66. package/dist/content-viewer/ContentPane.js.map +1 -1
  67. package/dist/content-viewer/FileTree.d.ts +23 -1
  68. package/dist/content-viewer/FileTree.d.ts.map +1 -1
  69. package/dist/content-viewer/FileTree.js +20 -5
  70. package/dist/content-viewer/FileTree.js.map +1 -1
  71. package/dist/content-viewer/index.d.ts +2 -0
  72. package/dist/content-viewer/index.d.ts.map +1 -1
  73. package/dist/content-viewer/index.js +2 -0
  74. package/dist/content-viewer/index.js.map +1 -1
  75. package/dist/diff/DiffViewer.js +3 -3
  76. package/dist/diff/DiffViewer.js.map +1 -1
  77. package/dist/discovery/discovery-card.d.ts +25 -0
  78. package/dist/discovery/discovery-card.d.ts.map +1 -0
  79. package/dist/discovery/discovery-card.js +265 -0
  80. package/dist/discovery/discovery-card.js.map +1 -0
  81. package/dist/discovery/index.d.ts +3 -0
  82. package/dist/discovery/index.d.ts.map +1 -0
  83. package/dist/discovery/index.js +3 -0
  84. package/dist/discovery/index.js.map +1 -0
  85. package/dist/display/ContextInfoCard.d.ts +61 -0
  86. package/dist/display/ContextInfoCard.d.ts.map +1 -0
  87. package/dist/display/ContextInfoCard.js +45 -0
  88. package/dist/display/ContextInfoCard.js.map +1 -0
  89. package/dist/display/index.d.ts +2 -0
  90. package/dist/display/index.d.ts.map +1 -1
  91. package/dist/display/index.js +1 -0
  92. package/dist/display/index.js.map +1 -1
  93. package/dist/editor/CodeEditor.d.ts +39 -0
  94. package/dist/editor/CodeEditor.d.ts.map +1 -0
  95. package/dist/editor/CodeEditor.js +114 -0
  96. package/dist/editor/CodeEditor.js.map +1 -0
  97. package/dist/editor/MarkdownEditor.d.ts +3 -2
  98. package/dist/editor/MarkdownEditor.d.ts.map +1 -1
  99. package/dist/editor/MarkdownEditor.js +32 -80
  100. package/dist/editor/MarkdownEditor.js.map +1 -1
  101. package/dist/editor/SplitPreview.d.ts +10 -1
  102. package/dist/editor/SplitPreview.d.ts.map +1 -1
  103. package/dist/editor/SplitPreview.js +4 -2
  104. package/dist/editor/SplitPreview.js.map +1 -1
  105. package/dist/editor/codeLanguages.d.ts +28 -0
  106. package/dist/editor/codeLanguages.d.ts.map +1 -0
  107. package/dist/editor/codeLanguages.js +54 -0
  108. package/dist/editor/codeLanguages.js.map +1 -0
  109. package/dist/editor/index.d.ts +2 -0
  110. package/dist/editor/index.d.ts.map +1 -1
  111. package/dist/editor/index.js +6 -0
  112. package/dist/editor/index.js.map +1 -1
  113. package/dist/editor/theme.d.ts +16 -0
  114. package/dist/editor/theme.d.ts.map +1 -0
  115. package/dist/editor/theme.js +82 -0
  116. package/dist/editor/theme.js.map +1 -0
  117. package/dist/filters/filter-bar.d.ts +14 -0
  118. package/dist/filters/filter-bar.d.ts.map +1 -0
  119. package/dist/filters/filter-bar.js +47 -0
  120. package/dist/filters/filter-bar.js.map +1 -0
  121. package/dist/filters/filter-slot-config.d.ts +239 -0
  122. package/dist/filters/filter-slot-config.d.ts.map +1 -0
  123. package/dist/filters/filter-slot-config.js +24 -0
  124. package/dist/filters/filter-slot-config.js.map +1 -0
  125. package/dist/filters/index.d.ts +2 -0
  126. package/dist/filters/index.d.ts.map +1 -1
  127. package/dist/filters/index.js +1 -0
  128. package/dist/filters/index.js.map +1 -1
  129. package/dist/primitives/BatchReadinessPill.d.ts +22 -0
  130. package/dist/primitives/BatchReadinessPill.d.ts.map +1 -0
  131. package/dist/primitives/BatchReadinessPill.js +20 -0
  132. package/dist/primitives/BatchReadinessPill.js.map +1 -0
  133. package/dist/primitives/Card.d.ts +28 -0
  134. package/dist/primitives/Card.d.ts.map +1 -0
  135. package/dist/primitives/Card.js +30 -0
  136. package/dist/primitives/Card.js.map +1 -0
  137. package/dist/primitives/CollectionPicker.d.ts +47 -0
  138. package/dist/primitives/CollectionPicker.d.ts.map +1 -0
  139. package/dist/primitives/CollectionPicker.js +105 -0
  140. package/dist/primitives/CollectionPicker.js.map +1 -0
  141. package/dist/primitives/CreateEntityDialog.d.ts +144 -0
  142. package/dist/primitives/CreateEntityDialog.d.ts.map +1 -0
  143. package/dist/primitives/CreateEntityDialog.js +379 -0
  144. package/dist/primitives/CreateEntityDialog.js.map +1 -0
  145. package/dist/primitives/EffectiveStatusChips.d.ts +43 -0
  146. package/dist/primitives/EffectiveStatusChips.d.ts.map +1 -0
  147. package/dist/primitives/EffectiveStatusChips.js +23 -0
  148. package/dist/primitives/EffectiveStatusChips.js.map +1 -0
  149. package/dist/primitives/FormField.d.ts +29 -0
  150. package/dist/primitives/FormField.d.ts.map +1 -0
  151. package/dist/primitives/FormField.js +27 -0
  152. package/dist/primitives/FormField.js.map +1 -0
  153. package/dist/primitives/Label.d.ts +20 -0
  154. package/dist/primitives/Label.d.ts.map +1 -0
  155. package/dist/primitives/Label.js +21 -0
  156. package/dist/primitives/Label.js.map +1 -0
  157. package/dist/primitives/MismatchBadge.d.ts +34 -0
  158. package/dist/primitives/MismatchBadge.d.ts.map +1 -0
  159. package/dist/primitives/MismatchBadge.js +28 -0
  160. package/dist/primitives/MismatchBadge.js.map +1 -0
  161. package/dist/primitives/PlanningNodeTypeIcon.d.ts +33 -0
  162. package/dist/primitives/PlanningNodeTypeIcon.d.ts.map +1 -0
  163. package/dist/primitives/PlanningNodeTypeIcon.js +35 -0
  164. package/dist/primitives/PlanningNodeTypeIcon.js.map +1 -0
  165. package/dist/primitives/SecretField.d.ts +28 -0
  166. package/dist/primitives/SecretField.d.ts.map +1 -0
  167. package/dist/primitives/SecretField.js +65 -0
  168. package/dist/primitives/SecretField.js.map +1 -0
  169. package/dist/primitives/Spinner.d.ts +16 -0
  170. package/dist/primitives/Spinner.d.ts.map +1 -0
  171. package/dist/primitives/Spinner.js +34 -0
  172. package/dist/primitives/Spinner.js.map +1 -0
  173. package/dist/primitives/StatusChip.d.ts +17 -0
  174. package/dist/primitives/StatusChip.d.ts.map +1 -0
  175. package/dist/primitives/StatusChip.js +22 -0
  176. package/dist/primitives/StatusChip.js.map +1 -0
  177. package/dist/primitives/Switch.d.ts +32 -0
  178. package/dist/primitives/Switch.d.ts.map +1 -0
  179. package/dist/primitives/Switch.js +43 -0
  180. package/dist/primitives/Switch.js.map +1 -0
  181. package/dist/primitives/index.d.ts +28 -0
  182. package/dist/primitives/index.d.ts.map +1 -1
  183. package/dist/primitives/index.js +16 -0
  184. package/dist/primitives/index.js.map +1 -1
  185. package/dist/primitives/variants.d.ts +18 -0
  186. package/dist/primitives/variants.d.ts.map +1 -0
  187. package/dist/primitives/variants.js +33 -0
  188. package/dist/primitives/variants.js.map +1 -0
  189. package/dist/utils/type-colors.d.ts.map +1 -1
  190. package/dist/utils/type-colors.js +4 -0
  191. package/dist/utils/type-colors.js.map +1 -1
  192. package/package.json +40 -6
@@ -0,0 +1,82 @@
1
+ import { EditorView } from '@codemirror/view';
2
+ // ============================================================================
3
+ // Theme Extensions
4
+ // ============================================================================
5
+ /**
6
+ * Light theme extension for CodeMirror.
7
+ * Uses CSS custom properties so it adapts to any Tailwind/shadcn token set.
8
+ */
9
+ export const lightTheme = EditorView.theme({
10
+ '&': {
11
+ backgroundColor: 'hsl(var(--background))',
12
+ color: 'hsl(var(--foreground))',
13
+ height: '100%',
14
+ },
15
+ '.cm-content': {
16
+ caretColor: 'hsl(var(--foreground))',
17
+ fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
18
+ fontSize: '14px',
19
+ lineHeight: '1.6',
20
+ padding: '16px',
21
+ },
22
+ '.cm-cursor, .cm-dropCursor': {
23
+ borderLeftColor: 'hsl(var(--foreground))',
24
+ },
25
+ '&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
26
+ backgroundColor: 'hsl(var(--accent))',
27
+ },
28
+ '.cm-activeLine': {
29
+ backgroundColor: 'hsl(var(--accent) / 0.1)',
30
+ },
31
+ '.cm-gutters': {
32
+ backgroundColor: 'hsl(var(--muted))',
33
+ color: 'hsl(var(--muted-foreground))',
34
+ border: 'none',
35
+ },
36
+ '.cm-activeLineGutter': {
37
+ backgroundColor: 'hsl(var(--accent) / 0.1)',
38
+ },
39
+ }, { dark: false });
40
+ /**
41
+ * Dark theme extension for CodeMirror.
42
+ * Uses CSS custom properties so it adapts to any Tailwind/shadcn token set.
43
+ */
44
+ export const darkTheme = EditorView.theme({
45
+ '&': {
46
+ backgroundColor: 'hsl(var(--background))',
47
+ color: 'hsl(var(--foreground))',
48
+ height: '100%',
49
+ },
50
+ '.cm-content': {
51
+ caretColor: 'hsl(var(--foreground))',
52
+ fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
53
+ fontSize: '14px',
54
+ lineHeight: '1.6',
55
+ padding: '16px',
56
+ },
57
+ '.cm-cursor, .cm-dropCursor': {
58
+ borderLeftColor: 'hsl(var(--foreground))',
59
+ },
60
+ '&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
61
+ backgroundColor: 'hsl(var(--accent))',
62
+ },
63
+ '.cm-activeLine': {
64
+ backgroundColor: 'hsl(var(--accent) / 0.1)',
65
+ },
66
+ '.cm-gutters': {
67
+ backgroundColor: 'hsl(var(--muted))',
68
+ color: 'hsl(var(--muted-foreground))',
69
+ border: 'none',
70
+ },
71
+ '.cm-activeLineGutter': {
72
+ backgroundColor: 'hsl(var(--accent) / 0.1)',
73
+ },
74
+ }, { dark: true });
75
+ /**
76
+ * Returns true when the OS/browser is currently in dark mode.
77
+ * Safe to call in SSR contexts — returns false when `window` is unavailable.
78
+ */
79
+ export function prefersDark() {
80
+ return typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches;
81
+ }
82
+ //# sourceMappingURL=theme.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AAwB;KAC1C;IACD,wFAAwF,EAAE;QACxF,eAAe,EAAE,oBAAoB;KACtC;IACD,gBAAgB,EAAE;QAChB,eAAe,EAAE,0BAA0B;KAC5C;IACD,aAAa,EAAE;QACb,eAAe,EAAE,mBAAmB;QACpC,KAAK,EAAE,8BAA8B;QACrC,MAAM,EAAE,MAAM;KACf;IACD,sBAAsB,EAAE;QACtB,eAAe,EAAE,0BAA0B;KAC5C;CACF,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAC;AACpG,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { FilterBarProps } from './filter-slot-config';
2
+ /**
3
+ * Horizontal toolbar with four zones (left → right):
4
+ *
5
+ * 1. Search input — always rendered
6
+ * 2. Filter slots — conditional, driven by `filterSlots[]`
7
+ * 3. Sort dropdown — rendered when `sort` prop is provided
8
+ * 4. View toggle — rendered when `viewToggle` prop is provided and `enabled !== false`
9
+ */
10
+ export declare function FilterBar({ searchValue, onSearchChange, searchPlaceholder, searchAriaLabel, filterSlots, conditionContext, sort, viewToggle, className, }: FilterBarProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare namespace FilterBar {
12
+ var displayName: string;
13
+ }
14
+ //# sourceMappingURL=filter-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-bar.d.ts","sourceRoot":"","sources":["../../src/filters/filter-bar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,sBAAsB,CAAC;AAyE9B;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACxB,WAAW,EACX,cAAc,EACd,iBAA6B,EAC7B,eAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,SAAS,GACV,EAAE,cAAc,2CA8DhB;yBAxEe,SAAS"}
@@ -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 { LayoutGrid, List, Search } from 'lucide-react';
5
+ import { Input } from '../primitives/Input';
6
+ import { cn } from '../primitives/utils';
7
+ import { SortDropdown } from './sort-dropdown';
8
+ const VIEW_MODES = [
9
+ { value: 'grid', Icon: LayoutGrid, label: 'Grid view' },
10
+ { value: 'list', Icon: List, label: 'List view' },
11
+ ];
12
+ function ViewToggle({ value, onChange, enabled = true }) {
13
+ return (_jsx("div", { role: "group", "aria-label": "View mode", className: "inline-flex rounded-md border border-input bg-background p-0.5 shadow-sm", children: VIEW_MODES.map(({ value: modeValue, Icon, label }) => {
14
+ const isActive = value === modeValue;
15
+ return (_jsx("button", { type: "button", "aria-label": label, "aria-pressed": isActive, disabled: !enabled, onClick: () => onChange(modeValue), className: cn('inline-flex h-7 w-7 items-center justify-center rounded-sm transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1', 'disabled:pointer-events-none disabled:opacity-50', isActive
16
+ ? 'bg-primary text-primary-foreground shadow-sm'
17
+ : 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'), children: _jsx(Icon, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }, modeValue));
18
+ }) }));
19
+ }
20
+ // ---------------------------------------------------------------------------
21
+ // Slot visibility predicate
22
+ // ---------------------------------------------------------------------------
23
+ function isSlotVisible(slot, conditionContext) {
24
+ if (!slot.condition)
25
+ return true;
26
+ if (conditionContext === undefined)
27
+ return false;
28
+ return slot.condition(conditionContext);
29
+ }
30
+ // ---------------------------------------------------------------------------
31
+ // FilterBar
32
+ // ---------------------------------------------------------------------------
33
+ /**
34
+ * Horizontal toolbar with four zones (left → right):
35
+ *
36
+ * 1. Search input — always rendered
37
+ * 2. Filter slots — conditional, driven by `filterSlots[]`
38
+ * 3. Sort dropdown — rendered when `sort` prop is provided
39
+ * 4. View toggle — rendered when `viewToggle` prop is provided and `enabled !== false`
40
+ */
41
+ export function FilterBar({ searchValue, onSearchChange, searchPlaceholder = 'Search…', searchAriaLabel = 'Search', filterSlots, conditionContext, sort, viewToggle, className, }) {
42
+ const visibleSlots = React.useMemo(() => (filterSlots ?? []).filter((slot) => isSlotVisible(slot, conditionContext)), [filterSlots, conditionContext]);
43
+ const showViewToggle = viewToggle !== undefined && viewToggle.enabled !== false;
44
+ return (_jsxs("div", { className: cn('flex flex-wrap items-center gap-2', className), children: [_jsxs("div", { role: "search", "aria-label": searchAriaLabel, className: "relative min-w-[200px] flex-1", children: [_jsx(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", "aria-hidden": "true" }), _jsx(Input, { type: "search", value: searchValue, onChange: (e) => onSearchChange(e.target.value), placeholder: searchPlaceholder, "aria-label": searchAriaLabel, className: "pl-9" })] }), visibleSlots.map((slot) => (_jsx("div", { "aria-label": slot.label, children: slot.component }, slot.id))), _jsx("div", { className: "flex-1", "aria-hidden": "true" }), sort !== undefined && (_jsx(SortDropdown, { options: sort.options, sortField: sort.sortField, sortOrder: sort.sortOrder, onSortChange: sort.onSortChange })), showViewToggle && (_jsx(ViewToggle, { value: viewToggle.value, onChange: viewToggle.onChange, enabled: viewToggle.enabled }))] }));
45
+ }
46
+ FilterBar.displayName = 'FilterBar';
47
+ //# sourceMappingURL=filter-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-bar.js","sourceRoot":"","sources":["../../src/filters/filter-bar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB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,EAAC,QAAQ,iBAAa,MAAM,GAAG,EAG5C,IAAI,KAAK,SAAS,IAAI,CACrB,KAAC,YAAY,IACX,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,GAC/B,CACH,EAGA,cAAc,IAAI,CACjB,KAAC,UAAU,IACT,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAC7B,OAAO,EAAE,UAAU,CAAC,OAAO,GAC3B,CACH,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -0,0 +1,239 @@
1
+ /**
2
+ * FilterBar declarative slot/props API for @miethe/ui
3
+ *
4
+ * Mirrors the TabConfig[] → FilterSlotConfig[] declarative pattern from the
5
+ * tab-registry (consolidated-entity-modal). Each slot is a self-contained
6
+ * React node with an optional condition predicate evaluated at render time.
7
+ *
8
+ * **Design rationale**:
9
+ * - `FilterSlotConfig[]` drives the middle zone between the search input and
10
+ * the sort dropdown, analogous to how `TabConfig[]` drives tab visibility.
11
+ * - Condition predicates receive a `FilterSlotConditionContext` (not a DOM
12
+ * event) so that gating logic is declarative and testable outside React.
13
+ * - Core controls (search, sort, view toggle) are first-class props rather
14
+ * than slots — they are always present and their internal layout is owned
15
+ * by FilterBar.
16
+ * - Chips, filter-mode toggles, and active-count badges are intentionally
17
+ * excluded from this API revision; they are candidates for a future slot
18
+ * zone or a `children` escape hatch.
19
+ *
20
+ * @see FilterBarProps — full props contract for the FilterBar component
21
+ * @see SortOption, SortDropdownProps — re-exported from sort-dropdown.tsx
22
+ */
23
+ import type * as React from 'react';
24
+ import type { SortOption } from './sort-dropdown';
25
+ export type { SortOption };
26
+ /**
27
+ * Runtime context passed to each `FilterSlotConfig.condition()` predicate.
28
+ *
29
+ * Extend this interface (not `FilterSlotConfig`) when a new axis of gating
30
+ * is needed (e.g. lens, featureFlag). Keeping context narrow prevents slots
31
+ * from hard-coding SkillMeat domain knowledge inside @miethe/ui.
32
+ */
33
+ export interface FilterSlotConditionContext {
34
+ /**
35
+ * Stable identifier for the page or view that owns this FilterBar.
36
+ * Slots use this to restrict themselves to relevant surfaces — e.g. a
37
+ * "Type" filter slot may only render on the artifacts page.
38
+ *
39
+ * @example "artifacts" | "marketplace" | "sources"
40
+ */
41
+ pageId: string;
42
+ /**
43
+ * Backend edition string forwarded from the parent page.
44
+ * When undefined the slot must treat its condition as permissive
45
+ * (backward-compatible default — show in all editions).
46
+ *
47
+ * @example "local" | "enterprise"
48
+ */
49
+ edition?: string;
50
+ }
51
+ /**
52
+ * Declarative descriptor for a single conditional slot in the FilterBar's
53
+ * middle zone (rendered after the search input, before the sort dropdown).
54
+ *
55
+ * Slots are registered by the consumer as a static `FilterSlotConfig[]`
56
+ * array — FilterBar iterates the list, evaluates each `condition`, and
57
+ * renders the `component` for every slot whose condition returns `true`
58
+ * (or is absent).
59
+ *
60
+ * **Ordering**: FilterBar renders slots in array order. The consumer
61
+ * controls visual priority by ordering the array.
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * const slots: FilterSlotConfig[] = [
66
+ * {
67
+ * id: 'type-filter',
68
+ * label: 'Type',
69
+ * component: <TypeFilter selected={types} onChange={setTypes} />,
70
+ * },
71
+ * {
72
+ * id: 'tier-filter',
73
+ * label: 'Tier',
74
+ * component: <TierFilter selected={tiers} onChange={setTiers} />,
75
+ * condition: (ctx) => ctx.pageId === 'artifacts',
76
+ * },
77
+ * ];
78
+ * ```
79
+ */
80
+ export interface FilterSlotConfig {
81
+ /**
82
+ * Stable identifier for this slot.
83
+ * Used as the React `key` when rendering the slot list; must be unique
84
+ * within a given `FilterBarProps.filterSlots` array.
85
+ */
86
+ id: string;
87
+ /**
88
+ * Human-readable label describing the slot's filter domain.
89
+ * FilterBar does not render the label directly — it is available for
90
+ * accessibility wrappers, tooltips, or future slot-header zones.
91
+ *
92
+ * @example "Type" | "Tier" | "Tag"
93
+ */
94
+ label: string;
95
+ /**
96
+ * The React node to render when the slot is active.
97
+ * Typically a controlled filter component (popover, select, etc.) whose
98
+ * state is managed by the consumer outside FilterBar.
99
+ *
100
+ * FilterBar provides no state plumbing for slot components — the consumer
101
+ * owns the filter state and passes it down via closure.
102
+ */
103
+ component: React.ReactNode;
104
+ /**
105
+ * Optional predicate evaluated at render time to determine whether this
106
+ * slot should appear.
107
+ *
108
+ * When absent (or when the predicate returns `true`) the slot is rendered.
109
+ * When the predicate returns `false` the slot is omitted from the DOM —
110
+ * FilterBar does not apply CSS visibility; it skips rendering entirely.
111
+ *
112
+ * **Constraints**:
113
+ * - Must be a pure function of `ctx` — do not close over mutable state.
114
+ * - Do not perform async work; condition is evaluated synchronously.
115
+ *
116
+ * @param ctx - Condition context forwarded from `FilterBarProps.conditionContext`
117
+ * @returns `true` to show the slot, `false` to hide it
118
+ */
119
+ condition?: (ctx: FilterSlotConditionContext) => boolean;
120
+ }
121
+ /**
122
+ * Controlled sort state passed to FilterBar.
123
+ * Mirrors the `SortDropdown` prop contract so FilterBar can forward these
124
+ * directly to `<SortDropdown>` without an adapter layer.
125
+ */
126
+ export interface FilterBarSortProps {
127
+ /**
128
+ * Available sort fields presented in the sort dropdown.
129
+ * Must contain at least one option; FilterBar does not validate this.
130
+ */
131
+ options: SortOption[];
132
+ /**
133
+ * Currently active sort field value. Must match one of the `options[].value`
134
+ * entries for the sort dropdown to show the active indicator correctly.
135
+ */
136
+ sortField: string;
137
+ /**
138
+ * Current sort direction.
139
+ */
140
+ sortOrder: 'asc' | 'desc';
141
+ /**
142
+ * Called when the user selects a new sort field or toggles the direction.
143
+ *
144
+ * @param field - The selected `SortOption.value`
145
+ * @param order - The resulting sort direction
146
+ */
147
+ onSortChange: (field: string, order: 'asc' | 'desc') => void;
148
+ }
149
+ /**
150
+ * Full props contract for the FilterBar component.
151
+ *
152
+ * FilterBar renders a horizontal toolbar with three zones:
153
+ *
154
+ * ```
155
+ * [ Search input ] [ ...filterSlots ] [ spacer ] [ Sort dropdown ] [ View toggle ]
156
+ * ```
157
+ *
158
+ * - **Search** (left-anchored, flex-1): controlled text input with clear button.
159
+ * - **Filter slots** (inline, after search): conditional slot components from
160
+ * `filterSlots`, rendered in array order.
161
+ * - **Sort** (right zone): `SortDropdown` rendered when `sort` prop is provided.
162
+ * - **View toggle** (right zone, after sort): grid/list buttons rendered when
163
+ * `viewToggle` prop is provided.
164
+ *
165
+ * All zones are optional except search. Pass `undefined` to omit a zone.
166
+ */
167
+ export interface FilterBarProps {
168
+ /**
169
+ * Controlled search input value.
170
+ * FilterBar may debounce internally before calling `search.onChange` —
171
+ * consumers should treat `search.onChange` as a debounced signal.
172
+ */
173
+ searchValue: string;
174
+ /**
175
+ * Called when the search value changes (may be debounced).
176
+ *
177
+ * @param value - New search string (empty string on clear)
178
+ */
179
+ onSearchChange: (value: string) => void;
180
+ /**
181
+ * Placeholder text for the search input.
182
+ * Defaults to `"Search…"` when omitted.
183
+ */
184
+ searchPlaceholder?: string;
185
+ /**
186
+ * ARIA label for the search input and its wrapping `role="search"` landmark.
187
+ * Defaults to `"Search"` when omitted. Provide a domain-specific label for
188
+ * better screen-reader context (e.g. `"Search artifacts"`).
189
+ */
190
+ searchAriaLabel?: string;
191
+ /**
192
+ * Ordered list of conditional slot descriptors rendered between the search
193
+ * input and the spacer. Each slot's `condition` is evaluated against
194
+ * `conditionContext`; slots whose condition returns `false` are omitted.
195
+ *
196
+ * Pass an empty array (or omit) to render no slots.
197
+ */
198
+ filterSlots?: FilterSlotConfig[];
199
+ /**
200
+ * Context forwarded to every `FilterSlotConfig.condition()` call.
201
+ * Required when `filterSlots` contains any slots with a `condition`.
202
+ * Ignored when no slots define conditions.
203
+ */
204
+ conditionContext?: FilterSlotConditionContext;
205
+ /**
206
+ * Sort control configuration. When provided, a `SortDropdown` is rendered
207
+ * in the right zone of the toolbar. Omit to hide the sort control entirely.
208
+ */
209
+ sort?: FilterBarSortProps;
210
+ /**
211
+ * View toggle configuration. When provided, grid/list toggle buttons are
212
+ * rendered to the right of the sort dropdown.
213
+ * Omit to hide the view toggle entirely.
214
+ */
215
+ viewToggle?: {
216
+ /**
217
+ * Currently active view mode.
218
+ */
219
+ value: 'grid' | 'list';
220
+ /**
221
+ * Called when the user selects a different view mode.
222
+ *
223
+ * @param mode - The newly selected view mode
224
+ */
225
+ onChange: (mode: 'grid' | 'list') => void;
226
+ /**
227
+ * When `false`, both toggle buttons are rendered but non-interactive
228
+ * (disabled state). Useful for surfaces where view switching is
229
+ * contextually unavailable. Defaults to `true`.
230
+ */
231
+ enabled?: boolean;
232
+ };
233
+ /**
234
+ * Additional CSS class names applied to the outermost container element.
235
+ * Use for per-page layout overrides (padding, border, background).
236
+ */
237
+ className?: string;
238
+ }
239
+ //# sourceMappingURL=filter-slot-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-slot-config.d.ts","sourceRoot":"","sources":["../../src/filters/filter-slot-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,YAAY,EAAE,UAAU,EAAE,CAAC;AAM3B;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;;;;;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the TabConfig[] → FilterSlotConfig[] declarative pattern from the
5
+ * tab-registry (consolidated-entity-modal). Each slot is a self-contained
6
+ * React node with an optional condition predicate evaluated at render time.
7
+ *
8
+ * **Design rationale**:
9
+ * - `FilterSlotConfig[]` drives the middle zone between the search input and
10
+ * the sort dropdown, analogous to how `TabConfig[]` drives tab visibility.
11
+ * - Condition predicates receive a `FilterSlotConditionContext` (not a DOM
12
+ * event) so that gating logic is declarative and testable outside React.
13
+ * - Core controls (search, sort, view toggle) are first-class props rather
14
+ * than slots — they are always present and their internal layout is owned
15
+ * by FilterBar.
16
+ * - Chips, filter-mode toggles, and active-count badges are intentionally
17
+ * excluded from this API revision; they are candidates for a future slot
18
+ * zone or a `children` escape hatch.
19
+ *
20
+ * @see FilterBarProps — full props contract for the FilterBar component
21
+ * @see SortOption, SortDropdownProps — re-exported from sort-dropdown.tsx
22
+ */
23
+ export {};
24
+ //# sourceMappingURL=filter-slot-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-slot-config.js","sourceRoot":"","sources":["../../src/filters/filter-slot-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
@@ -6,4 +6,6 @@ export { FiltersDropdown } from './filters-dropdown';
6
6
  export type { FilterCategory, FilterCategoryOption, FilterMode, FiltersDropdownProps, } from './filters-dropdown';
7
7
  export { SortDropdown } from './sort-dropdown';
8
8
  export type { SortOption, SortDropdownProps } from './sort-dropdown';
9
+ export { FilterBar } from './filter-bar';
10
+ export type { FilterSlotConfig, FilterSlotConditionContext, FilterBarProps, FilterBarSortProps, } from './filter-slot-config';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
@@ -2,4 +2,5 @@ export { TagFilterPopover, TagFilterBar } from './tag-filter-popover';
2
2
  export { ToolFilterPopover, ToolFilterBar } from './tool-filter-popover';
3
3
  export { FiltersDropdown } from './filters-dropdown';
4
4
  export { SortDropdown } from './sort-dropdown';
5
+ export { FilterBar } from './filter-bar';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Readiness state of a planning phase batch. */
2
+ export type PlanningPhaseBatchReadinessState = 'ready' | 'blocked' | 'waiting' | 'unknown';
3
+ export interface BatchReadinessPillProps {
4
+ readinessState: PlanningPhaseBatchReadinessState | string;
5
+ blockingNodeIds?: string[];
6
+ blockingTaskIds?: string[];
7
+ }
8
+ /**
9
+ * Renders the batch readiness chip with optional blocker details shown inline
10
+ * below the chip when blockingNodeIds or blockingTaskIds are present.
11
+ *
12
+ * Extracted from CCDash Planning primitives (PCP-709).
13
+ *
14
+ * @example
15
+ * <BatchReadinessPill
16
+ * readinessState="blocked"
17
+ * blockingNodeIds={['prd-auth', 'prd-onboarding']}
18
+ * blockingTaskIds={['TASK-2.1']}
19
+ * />
20
+ */
21
+ export declare function BatchReadinessPill({ readinessState, blockingNodeIds, blockingTaskIds, }: BatchReadinessPillProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=BatchReadinessPill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BatchReadinessPill.d.ts","sourceRoot":"","sources":["../../src/primitives/BatchReadinessPill.tsx"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,MAAM,gCAAgC,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE3F,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,gCAAgC,GAAG,MAAM,CAAC;IAC1D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,eAAe,GAChB,EAAE,uBAAuB,2CAgBzB"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StatusChip } from './StatusChip';
3
+ import { readinessVariant } from './variants';
4
+ /**
5
+ * Renders the batch readiness chip with optional blocker details shown inline
6
+ * below the chip when blockingNodeIds or blockingTaskIds are present.
7
+ *
8
+ * Extracted from CCDash Planning primitives (PCP-709).
9
+ *
10
+ * @example
11
+ * <BatchReadinessPill
12
+ * readinessState="blocked"
13
+ * blockingNodeIds={['prd-auth', 'prd-onboarding']}
14
+ * blockingTaskIds={['TASK-2.1']}
15
+ * />
16
+ */
17
+ export function BatchReadinessPill({ readinessState, blockingNodeIds, blockingTaskIds, }) {
18
+ return (_jsxs("div", { className: "inline-flex flex-col gap-1", children: [_jsx(StatusChip, { label: readinessState, variant: readinessVariant(readinessState) }), blockingNodeIds && blockingNodeIds.length > 0 && (_jsxs("div", { className: "text-[10px] text-rose-400/80 truncate", children: ["Blocking nodes: ", blockingNodeIds.join(', ')] })), blockingTaskIds && blockingTaskIds.length > 0 && (_jsxs("div", { className: "text-[10px] text-rose-400/80 truncate", children: ["Blocking tasks: ", blockingTaskIds.join(', ')] }))] }));
19
+ }
20
+ //# sourceMappingURL=BatchReadinessPill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BatchReadinessPill.js","sourceRoot":"","sources":["../../src/primitives/BatchReadinessPill.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAW9C;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,eAAe,GACS;IACxB,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,UAAU,IAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,gBAAgB,CAAC,cAAc,CAAC,GAAI,EAC/E,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAChD,eAAK,SAAS,EAAC,uCAAuC,iCACnC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IACvC,CACP,EACA,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAChD,eAAK,SAAS,EAAC,uCAAuC,iCACnC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IACvC,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Composable card surface with a rounded border and subtle shadow.
4
+ * Compose with `CardHeader`, `CardContent`, and `CardFooter` to build
5
+ * structured content panels.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Card>
10
+ * <CardHeader>Title</CardHeader>
11
+ * <CardContent>Body text.</CardContent>
12
+ * <CardFooter>Actions</CardFooter>
13
+ * </Card>
14
+ * ```
15
+ */
16
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
+ /** Top section of a `Card`; stacks children vertically with standard padding. */
18
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ /** Main body of a `Card`; applies standard padding with no top padding (pairs with `CardHeader`). */
20
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
21
+ /** Bottom row of a `Card`; lays children out in a flex row, typically for action buttons. */
22
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
23
+ export type CardProps = React.HTMLAttributes<HTMLDivElement>;
24
+ export type CardHeaderProps = React.HTMLAttributes<HTMLDivElement>;
25
+ export type CardContentProps = React.HTMLAttributes<HTMLDivElement>;
26
+ export type CardFooterProps = React.HTMLAttributes<HTMLDivElement>;
27
+ export { Card, CardHeader, CardContent, CardFooter };
28
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/primitives/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,IAAI,6GAWT,CAAC;AAGF,iFAAiF;AACjF,QAAA,MAAM,UAAU,6GAQf,CAAC;AAGF,qGAAqG;AACrG,QAAA,MAAM,WAAW,6GAIhB,CAAC;AAGF,6FAA6F;AAC7F,QAAA,MAAM,UAAU,6GAQf,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from './utils';
4
+ /**
5
+ * Composable card surface with a rounded border and subtle shadow.
6
+ * Compose with `CardHeader`, `CardContent`, and `CardFooter` to build
7
+ * structured content panels.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Card>
12
+ * <CardHeader>Title</CardHeader>
13
+ * <CardContent>Body text.</CardContent>
14
+ * <CardFooter>Actions</CardFooter>
15
+ * </Card>
16
+ * ```
17
+ */
18
+ const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className), ...props })));
19
+ Card.displayName = 'Card';
20
+ /** Top section of a `Card`; stacks children vertically with standard padding. */
21
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-6', className), ...props })));
22
+ CardHeader.displayName = 'CardHeader';
23
+ /** Main body of a `Card`; applies standard padding with no top padding (pairs with `CardHeader`). */
24
+ const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('p-6 pt-0', className), ...props })));
25
+ CardContent.displayName = 'CardContent';
26
+ /** Bottom row of a `Card`; lays children out in a flex row, typically for action buttons. */
27
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
28
+ CardFooter.displayName = 'CardFooter';
29
+ export { Card, CardHeader, CardContent, CardFooter };
30
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/primitives/Card.t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K,GACT,CACH,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAOtC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Configuration for the collection picker section embedded in creation dialogs.
3
+ *
4
+ * Mirrors `CollectionPickerConfig` from `skillmeat/web/lib/entity-form-schema.ts`.
5
+ * Defined locally to keep the @miethe/ui package self-contained.
6
+ */
7
+ export interface CollectionPickerConfig {
8
+ /** Show the collection picker section */
9
+ enabled: boolean;
10
+ /**
11
+ * Whether selecting a collection is mandatory before submitting.
12
+ * @default true
13
+ */
14
+ required?: boolean;
15
+ /**
16
+ * Whether the picker section can be collapsed by the user.
17
+ * @default true
18
+ */
19
+ collapsible?: boolean;
20
+ /** Pre-select a specific collection when the dialog opens */
21
+ defaultCollectionId?: string;
22
+ }
23
+ export interface CollectionItem {
24
+ id: string;
25
+ name: string;
26
+ description?: string;
27
+ }
28
+ export interface CollectionPickerProps {
29
+ /** Schema-driven configuration from the parent EntityFormSchema */
30
+ config: CollectionPickerConfig;
31
+ /** Currently selected collection ID (controlled) */
32
+ value?: string;
33
+ /** Called when the user selects a collection */
34
+ onChange: (collectionId: string) => void;
35
+ /**
36
+ * Override for the pre-filled default collection. When provided, the picker
37
+ * auto-selects this collection on mount (if not already controlled).
38
+ * Consumers should resolve this from `useCollectionContext()` before passing.
39
+ */
40
+ defaultCollectionId?: string;
41
+ /** Full list of available collections to pick from */
42
+ collections: CollectionItem[];
43
+ /** Optional extra CSS class for the root container */
44
+ className?: string;
45
+ }
46
+ export declare function CollectionPicker({ config, value, onChange, defaultCollectionId, collections, className, }: CollectionPickerProps): import("react/jsx-runtime").JSX.Element;
47
+ //# sourceMappingURL=CollectionPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionPicker.d.ts","sourceRoot":"","sources":["../../src/primitives/CollectionPicker.tsx"],"names":[],"mappings":"AAqCA;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sDAAsD;IACtD,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwHD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,SAAS,GACV,EAAE,qBAAqB,2CAsGvB"}