@peasant-labs/fairtrade 0.0.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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -0
  3. package/dist/lib/README.md +13 -0
  4. package/dist/lib/base.css +48 -0
  5. package/dist/lib/components.css +2 -0
  6. package/dist/lib/fonts.css +28 -0
  7. package/dist/lib/tokens.css +184 -0
  8. package/dist/lib/tokens.json +768 -0
  9. package/dist/lib/types/Accordion.d.ts +47 -0
  10. package/dist/lib/types/Accordion.stories.d.ts +91 -0
  11. package/dist/lib/types/Avatar.d.ts +94 -0
  12. package/dist/lib/types/Avatar.stories.d.ts +160 -0
  13. package/dist/lib/types/BrandMark.d.ts +25 -0
  14. package/dist/lib/types/BrandMark.stories.d.ts +75 -0
  15. package/dist/lib/types/Breadcrumb.d.ts +66 -0
  16. package/dist/lib/types/Breadcrumb.stories.d.ts +91 -0
  17. package/dist/lib/types/Button.d.ts +86 -0
  18. package/dist/lib/types/Button.stories.d.ts +129 -0
  19. package/dist/lib/types/Card.d.ts +145 -0
  20. package/dist/lib/types/Card.stories.d.ts +70 -0
  21. package/dist/lib/types/Chart.stories.d.ts +55 -0
  22. package/dist/lib/types/ChartBar.d.ts +51 -0
  23. package/dist/lib/types/ChartLine.d.ts +54 -0
  24. package/dist/lib/types/Checkbox.d.ts +132 -0
  25. package/dist/lib/types/Checkbox.stories.d.ts +75 -0
  26. package/dist/lib/types/Chip.d.ts +85 -0
  27. package/dist/lib/types/Chip.stories.d.ts +190 -0
  28. package/dist/lib/types/CliOnboard.d.ts +68 -0
  29. package/dist/lib/types/CliOnboard.stories.d.ts +24 -0
  30. package/dist/lib/types/CommandPalette.d.ts +6 -0
  31. package/dist/lib/types/CommandPalette.stories.d.ts +94 -0
  32. package/dist/lib/types/CommitGraph.d.ts +71 -0
  33. package/dist/lib/types/CommitGraph.stories.d.ts +17 -0
  34. package/dist/lib/types/ConnectionState.d.ts +82 -0
  35. package/dist/lib/types/ConnectionState.stories.d.ts +117 -0
  36. package/dist/lib/types/ConsentDialog.d.ts +97 -0
  37. package/dist/lib/types/ConsentDialog.stories.d.ts +61 -0
  38. package/dist/lib/types/DataTable.d.ts +116 -0
  39. package/dist/lib/types/DataTable.stories.d.ts +240 -0
  40. package/dist/lib/types/DateRange.d.ts +242 -0
  41. package/dist/lib/types/DateRange.stories.d.ts +272 -0
  42. package/dist/lib/types/Dialog.d.ts +9 -0
  43. package/dist/lib/types/Dialog.stories.d.ts +121 -0
  44. package/dist/lib/types/DiffView.d.ts +39 -0
  45. package/dist/lib/types/DiffView.stories.d.ts +118 -0
  46. package/dist/lib/types/EmptyState.d.ts +28 -0
  47. package/dist/lib/types/EmptyState.stories.d.ts +130 -0
  48. package/dist/lib/types/EvidenceCaption.d.ts +39 -0
  49. package/dist/lib/types/EvidenceCaption.stories.d.ts +43 -0
  50. package/dist/lib/types/Explainer.d.ts +82 -0
  51. package/dist/lib/types/Explainer.stories.d.ts +22 -0
  52. package/dist/lib/types/FacetRail.d.ts +13 -0
  53. package/dist/lib/types/FacetRail.stories.d.ts +28 -0
  54. package/dist/lib/types/Feedback.d.ts +222 -0
  55. package/dist/lib/types/Feedback.stories.d.ts +81 -0
  56. package/dist/lib/types/GroupedMultiSelect.d.ts +67 -0
  57. package/dist/lib/types/GroupedMultiSelect.stories.d.ts +59 -0
  58. package/dist/lib/types/Input.d.ts +158 -0
  59. package/dist/lib/types/Input.stories.d.ts +181 -0
  60. package/dist/lib/types/Intensity.d.ts +55 -0
  61. package/dist/lib/types/Intensity.stories.d.ts +108 -0
  62. package/dist/lib/types/MapCanvas.d.ts +89 -0
  63. package/dist/lib/types/MapCanvas.stories.d.ts +174 -0
  64. package/dist/lib/types/Menu.d.ts +62 -0
  65. package/dist/lib/types/Menu.stories.d.ts +173 -0
  66. package/dist/lib/types/ModerationQueue.d.ts +135 -0
  67. package/dist/lib/types/ModerationQueue.stories.d.ts +34 -0
  68. package/dist/lib/types/Pager.d.ts +47 -0
  69. package/dist/lib/types/Pager.stories.d.ts +100 -0
  70. package/dist/lib/types/Pagination.d.ts +50 -0
  71. package/dist/lib/types/Pagination.stories.d.ts +193 -0
  72. package/dist/lib/types/PolicySelect.d.ts +80 -0
  73. package/dist/lib/types/PolicySelect.stories.d.ts +130 -0
  74. package/dist/lib/types/ProviderIcon.d.ts +83 -0
  75. package/dist/lib/types/ProviderIcon.stories.d.ts +44 -0
  76. package/dist/lib/types/RailShell.d.ts +199 -0
  77. package/dist/lib/types/RailShell.stories.d.ts +32 -0
  78. package/dist/lib/types/Redaction.d.ts +53 -0
  79. package/dist/lib/types/Redaction.stories.d.ts +120 -0
  80. package/dist/lib/types/RoleRoster.d.ts +97 -0
  81. package/dist/lib/types/RoleRoster.stories.d.ts +23 -0
  82. package/dist/lib/types/SignIn.d.ts +78 -0
  83. package/dist/lib/types/SignIn.stories.d.ts +57 -0
  84. package/dist/lib/types/Sparkline.d.ts +19 -0
  85. package/dist/lib/types/StatTiles.d.ts +115 -0
  86. package/dist/lib/types/StatTiles.stories.d.ts +31 -0
  87. package/dist/lib/types/StepWizard.d.ts +92 -0
  88. package/dist/lib/types/StepWizard.stories.d.ts +18 -0
  89. package/dist/lib/types/StepsWaterfall.d.ts +67 -0
  90. package/dist/lib/types/StepsWaterfall.stories.d.ts +94 -0
  91. package/dist/lib/types/Switch.d.ts +63 -0
  92. package/dist/lib/types/Switch.stories.d.ts +134 -0
  93. package/dist/lib/types/Tabs.d.ts +48 -0
  94. package/dist/lib/types/Tabs.stories.d.ts +75 -0
  95. package/dist/lib/types/TimeStrip.d.ts +12 -0
  96. package/dist/lib/types/TimeStrip.stories.d.ts +30 -0
  97. package/dist/lib/types/Timeline.d.ts +192 -0
  98. package/dist/lib/types/Timeline.stories.d.ts +974 -0
  99. package/dist/lib/types/ToastHost.d.ts +70 -0
  100. package/dist/lib/types/ToastHost.stories.d.ts +115 -0
  101. package/dist/lib/types/ToolRenderers.d.ts +24 -0
  102. package/dist/lib/types/ToolRenderers.stories.d.ts +138 -0
  103. package/dist/lib/types/Tooltip.d.ts +80 -0
  104. package/dist/lib/types/Tooltip.stories.d.ts +116 -0
  105. package/dist/lib/types/Tour.d.ts +37 -0
  106. package/dist/lib/types/Tour.stories.d.ts +39 -0
  107. package/dist/lib/types/TranscriptMarkers.d.ts +50 -0
  108. package/dist/lib/types/TranscriptMarkers.stories.d.ts +48 -0
  109. package/dist/lib/types/Treemap.d.ts +77 -0
  110. package/dist/lib/types/Treemap.stories.d.ts +101 -0
  111. package/dist/lib/types/VisibilityControl.d.ts +54 -0
  112. package/dist/lib/types/VisibilityControl.stories.d.ts +126 -0
  113. package/dist/lib/types/chart-shared.d.ts +63 -0
  114. package/dist/lib/types/index.d.ts +53 -0
  115. package/dist/lib/types/story-frame.d.ts +12 -0
  116. package/dist/lib/ui.js +8707 -0
  117. package/package.json +67 -0
@@ -0,0 +1,44 @@
1
+ export default meta;
2
+ export namespace Marks {
3
+ let decorators: Function[];
4
+ function render(): any;
5
+ function play({ canvasElement }: {
6
+ canvasElement: any;
7
+ }): Promise<void>;
8
+ }
9
+ export namespace Tags {
10
+ let decorators_1: Function[];
11
+ export { decorators_1 as decorators };
12
+ export function render_1(): any;
13
+ export { render_1 as render };
14
+ export function play_1({ canvasElement }: {
15
+ canvasElement: any;
16
+ }): Promise<void>;
17
+ export { play_1 as play };
18
+ }
19
+ export namespace Names {
20
+ let decorators_2: Function[];
21
+ export { decorators_2 as decorators };
22
+ export function render_2(): any;
23
+ export { render_2 as render };
24
+ }
25
+ export namespace AccentLegendStory {
26
+ export let name: string;
27
+ let decorators_3: Function[];
28
+ export { decorators_3 as decorators };
29
+ export function render_3(): any;
30
+ export { render_3 as render };
31
+ export function play_2({ canvasElement }: {
32
+ canvasElement: any;
33
+ }): Promise<void>;
34
+ export { play_2 as play };
35
+ }
36
+ declare namespace meta {
37
+ export let title: string;
38
+ export { ProviderIcon as component };
39
+ export let tags: string[];
40
+ export namespace parameters {
41
+ let layout: string;
42
+ }
43
+ }
44
+ import { ProviderIcon } from './ProviderIcon.jsx';
@@ -0,0 +1,199 @@
1
+ /**
2
+ * @typedef {Object} RailShellProps
3
+ * @property {React.ReactNode} [toolbar] optional sticky top toolbar (mono chrome row); omitted when absent.
4
+ * @property {React.ReactNode} children the main content / canvas column (scrolls; min-width:0).
5
+ * @property {React.ReactNode} rail the rail contents — compose with <RailSection> children.
6
+ * @property {'left'|'right'} [railSide='right'] which side the desktop rail sits on.
7
+ * @property {string} [sheetTitle='details'] the bottom-sheet toggle label (mono, lowercased) on mobile.
8
+ * @property {React.ReactNode} [sheetMeta] quiet right-side content in the sheet header (e.g. a count).
9
+ * @property {string} [className] extra class on the root.
10
+ */
11
+ /**
12
+ * The shell frame: a two-column canvas + sticky-rail layout on desktop that collapses the rail into
13
+ * a fixed bottom-sheet below 880px. The main column scrolls and is min-width:0 so a wide canvas
14
+ * stays contained; the rail is a 320px sticky hairline card. The same `rail` content renders in both
15
+ * the desktop card and the mobile sheet, so avoid `id` attributes inside it. The sheet's expand /
16
+ * collapse is a button reporting aria-expanded and is wired to the sheet body via aria-controls.
17
+ */
18
+ export default function RailShell({ toolbar, children, rail, railSide, sheetTitle, sheetMeta, className, }: {
19
+ toolbar: any;
20
+ children: any;
21
+ rail: any;
22
+ railSide?: string;
23
+ sheetTitle?: string;
24
+ sheetMeta: any;
25
+ className?: string;
26
+ }): any;
27
+ /**
28
+ * @typedef {Object} RailSectionProps
29
+ * @property {React.ReactNode} [title] mono section header (lowercased by css).
30
+ * @property {React.ComponentType} [icon] optional lucide icon component shown before the title.
31
+ * @property {React.ReactNode} [meta] quiet right-aligned header content (a count, a glyph).
32
+ * @property {React.ReactNode} children the section body.
33
+ * @property {boolean} [collapsible=false] when true, the header is a button that toggles the body.
34
+ * @property {boolean} [defaultOpen=true] initial open state when collapsible.
35
+ * @property {string} [className] extra class on the section.
36
+ */
37
+ /**
38
+ * One titled hairline section inside a rail: a mono header (optional icon + title + meta) over a
39
+ * body. When `collapsible`, the header becomes a button reporting aria-expanded and wired to the
40
+ * body via aria-controls; the chevron rotates open. Sections divide from one another with the
41
+ * rail card's hairlines.
42
+ */
43
+ export function RailSection({ title, icon: Icon, meta, children, collapsible, defaultOpen, className, }: {
44
+ title: any;
45
+ icon: any;
46
+ meta: any;
47
+ children: any;
48
+ collapsible?: boolean;
49
+ defaultOpen?: boolean;
50
+ className?: string;
51
+ }): any;
52
+ /**
53
+ * @typedef {Object} SplitRailProps
54
+ * @property {React.ReactNode} left content of the left column (e.g. an outline tree).
55
+ * @property {React.ReactNode} right content of the right column (e.g. filters).
56
+ * @property {string} [leftTitle='outline'] left column header (mono, lowercased).
57
+ * @property {string} [rightTitle='filters'] right column header (mono, lowercased).
58
+ * @property {React.ComponentType} [leftIcon] optional lucide icon for the left header.
59
+ * @property {React.ComponentType} [rightIcon] optional lucide icon for the right header.
60
+ * @property {React.ReactNode} [leftMeta] quiet right-aligned content in the left header.
61
+ * @property {React.ReactNode} [rightMeta] quiet right-aligned content in the right header.
62
+ * @property {string} [className] extra class on the root.
63
+ */
64
+ /**
65
+ * The dual-rail variant: two independently-collapsible columns (outline-left / filters-right), each
66
+ * a hairline panel that collapses on its own. Side by side on desktop; stacks to a single column on
67
+ * mobile. Use as the `rail` of a RailShell, or standalone as a two-pane control surface.
68
+ */
69
+ export function SplitRail({ left, right, leftTitle, rightTitle, leftIcon, rightIcon, leftMeta, rightMeta, className, }: {
70
+ left: any;
71
+ right: any;
72
+ leftTitle?: string;
73
+ rightTitle?: string;
74
+ leftIcon: any;
75
+ rightIcon: any;
76
+ leftMeta: any;
77
+ rightMeta: any;
78
+ className?: string;
79
+ }): any;
80
+ export type RailShellProps = {
81
+ /**
82
+ * optional sticky top toolbar (mono chrome row); omitted when absent.
83
+ */
84
+ toolbar?: React.ReactNode;
85
+ /**
86
+ * the main content / canvas column (scrolls; min-width:0).
87
+ */
88
+ children: React.ReactNode;
89
+ /**
90
+ * the rail contents — compose with <RailSection> children.
91
+ */
92
+ rail: React.ReactNode;
93
+ /**
94
+ * which side the desktop rail sits on.
95
+ */
96
+ railSide?: "left" | "right";
97
+ /**
98
+ * the bottom-sheet toggle label (mono, lowercased) on mobile.
99
+ */
100
+ sheetTitle?: string;
101
+ /**
102
+ * quiet right-side content in the sheet header (e.g. a count).
103
+ */
104
+ sheetMeta?: React.ReactNode;
105
+ /**
106
+ * extra class on the root.
107
+ */
108
+ className?: string;
109
+ };
110
+ export type RailSectionProps = {
111
+ /**
112
+ * mono section header (lowercased by css).
113
+ */
114
+ title?: React.ReactNode;
115
+ /**
116
+ * optional lucide icon component shown before the title.
117
+ */
118
+ icon?: React.ComponentType;
119
+ /**
120
+ * quiet right-aligned header content (a count, a glyph).
121
+ */
122
+ meta?: React.ReactNode;
123
+ /**
124
+ * the section body.
125
+ */
126
+ children: React.ReactNode;
127
+ /**
128
+ * when true, the header is a button that toggles the body.
129
+ */
130
+ collapsible?: boolean;
131
+ /**
132
+ * initial open state when collapsible.
133
+ */
134
+ defaultOpen?: boolean;
135
+ /**
136
+ * extra class on the section.
137
+ */
138
+ className?: string;
139
+ };
140
+ export type SplitRailPanelProps = {
141
+ /**
142
+ * mono header for the column.
143
+ */
144
+ title?: React.ReactNode;
145
+ /**
146
+ * optional lucide icon before the title.
147
+ */
148
+ icon?: React.ComponentType;
149
+ /**
150
+ * quiet right-aligned header content.
151
+ */
152
+ meta?: React.ReactNode;
153
+ /**
154
+ * the column body.
155
+ */
156
+ children: React.ReactNode;
157
+ /**
158
+ * initial open state (each column collapses independently).
159
+ */
160
+ defaultOpen?: boolean;
161
+ };
162
+ export type SplitRailProps = {
163
+ /**
164
+ * content of the left column (e.g. an outline tree).
165
+ */
166
+ left: React.ReactNode;
167
+ /**
168
+ * content of the right column (e.g. filters).
169
+ */
170
+ right: React.ReactNode;
171
+ /**
172
+ * left column header (mono, lowercased).
173
+ */
174
+ leftTitle?: string;
175
+ /**
176
+ * right column header (mono, lowercased).
177
+ */
178
+ rightTitle?: string;
179
+ /**
180
+ * optional lucide icon for the left header.
181
+ */
182
+ leftIcon?: React.ComponentType;
183
+ /**
184
+ * optional lucide icon for the right header.
185
+ */
186
+ rightIcon?: React.ComponentType;
187
+ /**
188
+ * quiet right-aligned content in the left header.
189
+ */
190
+ leftMeta?: React.ReactNode;
191
+ /**
192
+ * quiet right-aligned content in the right header.
193
+ */
194
+ rightMeta?: React.ReactNode;
195
+ /**
196
+ * extra class on the root.
197
+ */
198
+ className?: string;
199
+ };
@@ -0,0 +1,32 @@
1
+ export default meta;
2
+ export namespace Default {
3
+ function render(): any;
4
+ }
5
+ export namespace RailLeft {
6
+ export function render_1(): any;
7
+ export { render_1 as render };
8
+ }
9
+ export namespace Split {
10
+ export function render_2(): any;
11
+ export { render_2 as render };
12
+ }
13
+ export namespace SplitInShell {
14
+ export function render_3(): any;
15
+ export { render_3 as render };
16
+ }
17
+ export namespace MobileSheet {
18
+ export function render_4(): any;
19
+ export { render_4 as render };
20
+ export function play({ canvasElement }: {
21
+ canvasElement: any;
22
+ }): Promise<void>;
23
+ }
24
+ declare namespace meta {
25
+ export let title: string;
26
+ export { RailShell as component };
27
+ export namespace parameters {
28
+ let layout: string;
29
+ }
30
+ export let tags: string[];
31
+ }
32
+ import RailShell from './RailShell.jsx';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * RedactionReview — the safe-by-default review surface.
3
+ *
4
+ * @param {object} props
5
+ * @param {'minimal'|'standard'|'maximum'} [props.level='standard'] - the selected redaction level
6
+ * @param {(level: string) => void} [props.onLevel] - called with the next level on select
7
+ * @param {Array<{id, category, confidence:number, before?:string, secret?:string, after:string, kept?:boolean}>} [props.matches]
8
+ * - the flagged matches. `before`/`secret` is the original (one or the other), `after` the
9
+ * redacted form. `kept` (controlled mode) = the user opted OUT, secret leaves as-is.
10
+ * @param {(id: string, kept: boolean) => void} [props.onToggle] - called when a match is toggled;
11
+ * when given, the component is controlled (read `kept` off each match).
12
+ * @param {number} [props.scanned] - sessions/files scanned so far (defaults to `total`: done).
13
+ * @param {number} [props.total=0] - total to scan.
14
+ * @param {string|boolean} [props.failure] - honest-failure banner text; truthy shows the banner.
15
+ * @param {string} [props.className]
16
+ */
17
+ export function RedactionReview({ level, onLevel, matches, onToggle, scanned, total, failure, className, ...rest }: {
18
+ level?: "minimal" | "standard" | "maximum";
19
+ onLevel?: (level: string) => void;
20
+ matches?: Array<{
21
+ id: any;
22
+ category: any;
23
+ confidence: number;
24
+ before?: string;
25
+ secret?: string;
26
+ after: string;
27
+ kept?: boolean;
28
+ }>;
29
+ onToggle?: (id: string, kept: boolean) => void;
30
+ scanned?: number;
31
+ total?: number;
32
+ failure?: string | boolean;
33
+ className?: string;
34
+ }): any;
35
+ /**
36
+ * WhereDoesThisGo — the transparency panel shown before an outbound action. the destination url,
37
+ * then a two-column split: "what gets sent" (Send icon, add rail) vs "what stays private" (Lock
38
+ * icon, neutral rail). calm, square, hairline. each column header pairs an icon with its word so
39
+ * the two halves never read on color alone.
40
+ *
41
+ * @param {object} props
42
+ * @param {string} props.destination - the outbound url (code -> mono, not lowercased)
43
+ * @param {string[]} [props.sent] - the things that WILL be sent
44
+ * @param {string[]} [props.private] - the things that stay on the machine
45
+ * @param {string} [props.className]
46
+ */
47
+ export function WhereDoesThisGo({ destination, sent, private: stays, className, ...rest }: {
48
+ destination: string;
49
+ sent?: string[];
50
+ private?: string[];
51
+ className?: string;
52
+ }): any;
53
+ export default RedactionReview;
@@ -0,0 +1,120 @@
1
+ export default meta;
2
+ export namespace Default {
3
+ function render(args: any): any;
4
+ namespace args {
5
+ let level: string;
6
+ let scanned: number;
7
+ let total: number;
8
+ }
9
+ function play({ canvasElement }: {
10
+ canvasElement: any;
11
+ }): Promise<void>;
12
+ }
13
+ export namespace WithScanFailure {
14
+ export function render_1(args: any): any;
15
+ export { render_1 as render };
16
+ export namespace args_1 {
17
+ let level_1: string;
18
+ export { level_1 as level };
19
+ let scanned_1: number;
20
+ export { scanned_1 as scanned };
21
+ let total_1: number;
22
+ export { total_1 as total };
23
+ export let failure: boolean;
24
+ }
25
+ export { args_1 as args };
26
+ export function play_1({ canvasElement }: {
27
+ canvasElement: any;
28
+ }): Promise<void>;
29
+ export { play_1 as play };
30
+ }
31
+ export namespace Empty {
32
+ export function render_2(args: any): any;
33
+ export { render_2 as render };
34
+ export namespace args_2 {
35
+ let level_2: string;
36
+ export { level_2 as level };
37
+ let scanned_2: number;
38
+ export { scanned_2 as scanned };
39
+ let total_2: number;
40
+ export { total_2 as total };
41
+ export let matches: any[];
42
+ }
43
+ export { args_2 as args };
44
+ }
45
+ export namespace Transparency {
46
+ export function render_3(args: any): any;
47
+ export { render_3 as render };
48
+ export namespace parameters {
49
+ namespace controls {
50
+ let include: string[];
51
+ }
52
+ }
53
+ export namespace args_3 {
54
+ export let destination: string;
55
+ export let sent: string[];
56
+ let _private: string[];
57
+ export { _private as private };
58
+ }
59
+ export { args_3 as args };
60
+ export function play_2({ canvasElement }: {
61
+ canvasElement: any;
62
+ }): Promise<void>;
63
+ export { play_2 as play };
64
+ }
65
+ export namespace LightTheme {
66
+ export function render_4(args: any): any;
67
+ export { render_4 as render };
68
+ export namespace args_4 {
69
+ let level_3: string;
70
+ export { level_3 as level };
71
+ let scanned_3: number;
72
+ export { scanned_3 as scanned };
73
+ let total_3: number;
74
+ export { total_3 as total };
75
+ }
76
+ export { args_4 as args };
77
+ export namespace globals {
78
+ let theme: string;
79
+ namespace backgrounds {
80
+ let value: string;
81
+ }
82
+ }
83
+ }
84
+ declare namespace meta {
85
+ export let title: string;
86
+ export { RedactionReview as component };
87
+ export let tags: string[];
88
+ export let decorators: Function[];
89
+ export namespace argTypes {
90
+ export namespace level_4 {
91
+ let control: string;
92
+ let options: string[];
93
+ }
94
+ export { level_4 as level };
95
+ export namespace total_4 {
96
+ let control_1: string;
97
+ export { control_1 as control };
98
+ }
99
+ export { total_4 as total };
100
+ export namespace scanned_4 {
101
+ let control_2: string;
102
+ export { control_2 as control };
103
+ }
104
+ export { scanned_4 as scanned };
105
+ export namespace matches_1 {
106
+ let control_3: boolean;
107
+ export { control_3 as control };
108
+ }
109
+ export { matches_1 as matches };
110
+ export namespace onToggle {
111
+ let control_4: boolean;
112
+ export { control_4 as control };
113
+ }
114
+ export namespace onLevel {
115
+ let control_5: boolean;
116
+ export { control_5 as control };
117
+ }
118
+ }
119
+ }
120
+ import { RedactionReview } from './Redaction.jsx';
@@ -0,0 +1,97 @@
1
+ /**
2
+ * The inline destructive-confirm: a trigger button that, on click, swaps in place to
3
+ * "{label}? [yes] [cancel]" — never a modal, so the row never reflows out from under the cursor.
4
+ * yes fires onConfirm and (if it doesn't throw) reverts to the trigger; cancel reverts immediately.
5
+ *
6
+ * @param {Object} props
7
+ * @param {React.ReactNode} [props.label='remove'] the trigger's lowercase chrome label
8
+ * @param {string} [props.confirmLabel] the verb echoed in the prompt + on yes (defaults to label, lowercased)
9
+ * @param {React.ReactNode} [props.icon] optional leading glyph for the trigger (e.g. <Trash2 />)
10
+ * @param {() => (void | Promise<void>)} props.onConfirm fired when yes is activated
11
+ * @param {boolean} [props.busy=false] external pending flag — disables yes + shows "{verb}…"
12
+ * @param {boolean} [props.disabled=false] disables the trigger entirely
13
+ * @param {string} [props['aria-label']] accessible name for the trigger (defaults from label/confirmLabel)
14
+ * @param {string} [props.className] extra class on the wrapper
15
+ */
16
+ export function ConfirmInline({ label, confirmLabel, icon, onConfirm, busy, disabled, "aria-label": ariaLabel, className, }: {
17
+ label?: React.ReactNode;
18
+ confirmLabel?: string;
19
+ icon?: React.ReactNode;
20
+ onConfirm: () => (void | Promise<void>);
21
+ busy?: boolean;
22
+ disabled?: boolean;
23
+ }): any;
24
+ /**
25
+ * @typedef {Object} RosterMember
26
+ * @property {string} handle the member's handle (user content — never lowercased)
27
+ * @property {string} [name] display name (user content)
28
+ * @property {'owner'|'member'|'contributor'|'guest'} role the member's role
29
+ * @property {boolean} [owner] locks the row: role select disabled, "owner" shown as text + lock glyph, no remove
30
+ * @property {string} [org] an org affiliation chip (user content, e.g. a github org login)
31
+ * @property {string} [avatar] avatar image url; falls back to the handle's initial
32
+ * @property {string} [id] stable key (defaults to handle)
33
+ */
34
+ /**
35
+ * A member role roster: one row per member with avatar/handle + name, an org chip, a role select,
36
+ * and (for non-owner rows) an inline remove. Owner rows are locked — the role reads as plain
37
+ * "owner" text beside a lock glyph and there's no remove, mirroring village where the owner can't
38
+ * be reassigned or removed here.
39
+ *
40
+ * @param {Object} props
41
+ * @param {RosterMember[]} props.members the members to list
42
+ * @param {(member: RosterMember, role: string) => void} [props.onRole] fired when a row's role select changes
43
+ * @param {(member: RosterMember) => (void | Promise<void>)} [props.onRemove] fired when a row's remove is confirmed
44
+ * @param {string} [props.title='members'] section header label (lowercase chrome)
45
+ * @param {string[]} [props.roles] selectable roles (default member/contributor/guest; owner is never offered)
46
+ */
47
+ export default function RoleRoster({ members, onRole, onRemove, title, roles, }: {
48
+ members: RosterMember[];
49
+ onRole?: (member: RosterMember, role: string) => void;
50
+ onRemove?: (member: RosterMember) => (void | Promise<void>);
51
+ title?: string;
52
+ roles?: string[];
53
+ }): any;
54
+ /**
55
+ * A clay-bordered section wrapping destructive actions (e.g. "delete collective"). Fronted by a
56
+ * warning glyph + the literal word "warning" so the danger framing is never carried by the clay
57
+ * border alone. children is the body — typically a sentence of consequence + a
58
+ * <ConfirmInline confirmLabel="delete" />.
59
+ *
60
+ * @param {Object} props
61
+ * @param {React.ReactNode} [props.title='danger zone'] the section header label (lowercase chrome)
62
+ * @param {React.ReactNode} props.children the destructive actions / explanation
63
+ */
64
+ export function DangerZone({ title, children }: {
65
+ title?: React.ReactNode;
66
+ children: React.ReactNode;
67
+ }): any;
68
+ export type RosterMember = {
69
+ /**
70
+ * the member's handle (user content — never lowercased)
71
+ */
72
+ handle: string;
73
+ /**
74
+ * display name (user content)
75
+ */
76
+ name?: string;
77
+ /**
78
+ * the member's role
79
+ */
80
+ role: "owner" | "member" | "contributor" | "guest";
81
+ /**
82
+ * locks the row: role select disabled, "owner" shown as text + lock glyph, no remove
83
+ */
84
+ owner?: boolean;
85
+ /**
86
+ * an org affiliation chip (user content, e.g. a github org login)
87
+ */
88
+ org?: string;
89
+ /**
90
+ * avatar image url; falls back to the handle's initial
91
+ */
92
+ avatar?: string;
93
+ /**
94
+ * stable key (defaults to handle)
95
+ */
96
+ id?: string;
97
+ };
@@ -0,0 +1,23 @@
1
+ export default meta;
2
+ export namespace Roster {
3
+ function render(): any;
4
+ }
5
+ export namespace ConfirmRemove {
6
+ export function render_1(): any;
7
+ export { render_1 as render };
8
+ export function play({ canvasElement }: {
9
+ canvasElement: any;
10
+ }): Promise<void>;
11
+ }
12
+ export namespace Danger {
13
+ export let name: string;
14
+ export function render_2(): any;
15
+ export { render_2 as render };
16
+ }
17
+ declare namespace meta {
18
+ export let title: string;
19
+ export { RoleRoster as component };
20
+ export let tags: string[];
21
+ export let decorators: Function[];
22
+ }
23
+ import RoleRoster from './RoleRoster.jsx';
@@ -0,0 +1,78 @@
1
+ /**
2
+ * SignInProviders — a multi-provider OAuth split button.
3
+ *
4
+ * the first provider is the PRIMARY action ("continue with <label>"); the rest
5
+ * live behind a chevron that opens a keyboard-operable menu. clicking the
6
+ * primary or any menu row calls onSignIn(providerId).
7
+ *
8
+ * @param {object} props
9
+ * @param {Array<{id:string,label:string}>} [props.providers] ordered; [0] is primary. defaults to PROVIDERS.
10
+ * @param {(id:string)=>void} [props.onSignIn] called with the chosen provider id.
11
+ * @param {string} [props.className]
12
+ * @returns {JSX.Element|null}
13
+ */
14
+ export function SignInProviders({ providers, onSignIn, className, ...rest }: {
15
+ providers?: Array<{
16
+ id: string;
17
+ label: string;
18
+ }>;
19
+ onSignIn?: (id: string) => void;
20
+ className?: string;
21
+ }): JSX.Element | null;
22
+ /**
23
+ * HandleClaim — the post-OAuth handle-claim card.
24
+ *
25
+ * a mono @-prefixed input with live validation shown as an ICON + a WORD (never
26
+ * color alone), one or two suggestion chips, and a "claim handle" button that
27
+ * stays disabled until the handle validates as available. the typed handle keeps
28
+ * its case; validation normalizes a copy.
29
+ *
30
+ * @param {object} props
31
+ * @param {(handle:string)=>void} [props.onSubmit] called with the typed handle on claim.
32
+ * @param {(raw:string)=>{state:'idle'|'available'|'taken'|'invalid'|'checking',hint?:string}} [props.validate]
33
+ * override the validator; defaults to the built-in handle rule + taken set.
34
+ * @param {string} [props.initialValue] seed the field (kept verbatim, case preserved).
35
+ * @param {string} [props.suggestedFrom] a provider username to derive suggestion chips from.
36
+ * @param {string[]} [props.suggestions] explicit suggestion chips (overrides suggestedFrom).
37
+ * @param {string} [props.className]
38
+ * @returns {JSX.Element}
39
+ */
40
+ export function HandleClaim({ onSubmit, validate, initialValue, suggestedFrom, suggestions, className, ...rest }: {
41
+ onSubmit?: (handle: string) => void;
42
+ validate?: (raw: string) => {
43
+ state: "idle" | "available" | "taken" | "invalid" | "checking";
44
+ hint?: string;
45
+ };
46
+ initialValue?: string;
47
+ suggestedFrom?: string;
48
+ suggestions?: string[];
49
+ className?: string;
50
+ }): JSX.Element;
51
+ /**
52
+ * OnboardingCard — the two steps composed into one onboarding specimen: the
53
+ * provider split button up top, the handle-claim card below. a thin pass-through
54
+ * wrapper so a consumer (and the combined story) can show the whole front door.
55
+ *
56
+ * @param {object} props
57
+ * @param {Array<{id:string,label:string}>} [props.providers]
58
+ * @param {(id:string)=>void} [props.onSignIn]
59
+ * @param {(handle:string)=>void} [props.onSubmit]
60
+ * @param {string} [props.suggestedFrom]
61
+ * @param {string} [props.className]
62
+ * @returns {JSX.Element}
63
+ */
64
+ export function OnboardingCard({ providers, onSignIn, onSubmit, suggestedFrom, className, ...rest }: {
65
+ providers?: Array<{
66
+ id: string;
67
+ label: string;
68
+ }>;
69
+ onSignIn?: (id: string) => void;
70
+ onSubmit?: (handle: string) => void;
71
+ suggestedFrom?: string;
72
+ className?: string;
73
+ }): JSX.Element;
74
+ export const PROVIDERS: {
75
+ id: string;
76
+ label: string;
77
+ }[];
78
+ export default SignInProviders;