@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.
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/lib/README.md +13 -0
- package/dist/lib/base.css +48 -0
- package/dist/lib/components.css +2 -0
- package/dist/lib/fonts.css +28 -0
- package/dist/lib/tokens.css +184 -0
- package/dist/lib/tokens.json +768 -0
- package/dist/lib/types/Accordion.d.ts +47 -0
- package/dist/lib/types/Accordion.stories.d.ts +91 -0
- package/dist/lib/types/Avatar.d.ts +94 -0
- package/dist/lib/types/Avatar.stories.d.ts +160 -0
- package/dist/lib/types/BrandMark.d.ts +25 -0
- package/dist/lib/types/BrandMark.stories.d.ts +75 -0
- package/dist/lib/types/Breadcrumb.d.ts +66 -0
- package/dist/lib/types/Breadcrumb.stories.d.ts +91 -0
- package/dist/lib/types/Button.d.ts +86 -0
- package/dist/lib/types/Button.stories.d.ts +129 -0
- package/dist/lib/types/Card.d.ts +145 -0
- package/dist/lib/types/Card.stories.d.ts +70 -0
- package/dist/lib/types/Chart.stories.d.ts +55 -0
- package/dist/lib/types/ChartBar.d.ts +51 -0
- package/dist/lib/types/ChartLine.d.ts +54 -0
- package/dist/lib/types/Checkbox.d.ts +132 -0
- package/dist/lib/types/Checkbox.stories.d.ts +75 -0
- package/dist/lib/types/Chip.d.ts +85 -0
- package/dist/lib/types/Chip.stories.d.ts +190 -0
- package/dist/lib/types/CliOnboard.d.ts +68 -0
- package/dist/lib/types/CliOnboard.stories.d.ts +24 -0
- package/dist/lib/types/CommandPalette.d.ts +6 -0
- package/dist/lib/types/CommandPalette.stories.d.ts +94 -0
- package/dist/lib/types/CommitGraph.d.ts +71 -0
- package/dist/lib/types/CommitGraph.stories.d.ts +17 -0
- package/dist/lib/types/ConnectionState.d.ts +82 -0
- package/dist/lib/types/ConnectionState.stories.d.ts +117 -0
- package/dist/lib/types/ConsentDialog.d.ts +97 -0
- package/dist/lib/types/ConsentDialog.stories.d.ts +61 -0
- package/dist/lib/types/DataTable.d.ts +116 -0
- package/dist/lib/types/DataTable.stories.d.ts +240 -0
- package/dist/lib/types/DateRange.d.ts +242 -0
- package/dist/lib/types/DateRange.stories.d.ts +272 -0
- package/dist/lib/types/Dialog.d.ts +9 -0
- package/dist/lib/types/Dialog.stories.d.ts +121 -0
- package/dist/lib/types/DiffView.d.ts +39 -0
- package/dist/lib/types/DiffView.stories.d.ts +118 -0
- package/dist/lib/types/EmptyState.d.ts +28 -0
- package/dist/lib/types/EmptyState.stories.d.ts +130 -0
- package/dist/lib/types/EvidenceCaption.d.ts +39 -0
- package/dist/lib/types/EvidenceCaption.stories.d.ts +43 -0
- package/dist/lib/types/Explainer.d.ts +82 -0
- package/dist/lib/types/Explainer.stories.d.ts +22 -0
- package/dist/lib/types/FacetRail.d.ts +13 -0
- package/dist/lib/types/FacetRail.stories.d.ts +28 -0
- package/dist/lib/types/Feedback.d.ts +222 -0
- package/dist/lib/types/Feedback.stories.d.ts +81 -0
- package/dist/lib/types/GroupedMultiSelect.d.ts +67 -0
- package/dist/lib/types/GroupedMultiSelect.stories.d.ts +59 -0
- package/dist/lib/types/Input.d.ts +158 -0
- package/dist/lib/types/Input.stories.d.ts +181 -0
- package/dist/lib/types/Intensity.d.ts +55 -0
- package/dist/lib/types/Intensity.stories.d.ts +108 -0
- package/dist/lib/types/MapCanvas.d.ts +89 -0
- package/dist/lib/types/MapCanvas.stories.d.ts +174 -0
- package/dist/lib/types/Menu.d.ts +62 -0
- package/dist/lib/types/Menu.stories.d.ts +173 -0
- package/dist/lib/types/ModerationQueue.d.ts +135 -0
- package/dist/lib/types/ModerationQueue.stories.d.ts +34 -0
- package/dist/lib/types/Pager.d.ts +47 -0
- package/dist/lib/types/Pager.stories.d.ts +100 -0
- package/dist/lib/types/Pagination.d.ts +50 -0
- package/dist/lib/types/Pagination.stories.d.ts +193 -0
- package/dist/lib/types/PolicySelect.d.ts +80 -0
- package/dist/lib/types/PolicySelect.stories.d.ts +130 -0
- package/dist/lib/types/ProviderIcon.d.ts +83 -0
- package/dist/lib/types/ProviderIcon.stories.d.ts +44 -0
- package/dist/lib/types/RailShell.d.ts +199 -0
- package/dist/lib/types/RailShell.stories.d.ts +32 -0
- package/dist/lib/types/Redaction.d.ts +53 -0
- package/dist/lib/types/Redaction.stories.d.ts +120 -0
- package/dist/lib/types/RoleRoster.d.ts +97 -0
- package/dist/lib/types/RoleRoster.stories.d.ts +23 -0
- package/dist/lib/types/SignIn.d.ts +78 -0
- package/dist/lib/types/SignIn.stories.d.ts +57 -0
- package/dist/lib/types/Sparkline.d.ts +19 -0
- package/dist/lib/types/StatTiles.d.ts +115 -0
- package/dist/lib/types/StatTiles.stories.d.ts +31 -0
- package/dist/lib/types/StepWizard.d.ts +92 -0
- package/dist/lib/types/StepWizard.stories.d.ts +18 -0
- package/dist/lib/types/StepsWaterfall.d.ts +67 -0
- package/dist/lib/types/StepsWaterfall.stories.d.ts +94 -0
- package/dist/lib/types/Switch.d.ts +63 -0
- package/dist/lib/types/Switch.stories.d.ts +134 -0
- package/dist/lib/types/Tabs.d.ts +48 -0
- package/dist/lib/types/Tabs.stories.d.ts +75 -0
- package/dist/lib/types/TimeStrip.d.ts +12 -0
- package/dist/lib/types/TimeStrip.stories.d.ts +30 -0
- package/dist/lib/types/Timeline.d.ts +192 -0
- package/dist/lib/types/Timeline.stories.d.ts +974 -0
- package/dist/lib/types/ToastHost.d.ts +70 -0
- package/dist/lib/types/ToastHost.stories.d.ts +115 -0
- package/dist/lib/types/ToolRenderers.d.ts +24 -0
- package/dist/lib/types/ToolRenderers.stories.d.ts +138 -0
- package/dist/lib/types/Tooltip.d.ts +80 -0
- package/dist/lib/types/Tooltip.stories.d.ts +116 -0
- package/dist/lib/types/Tour.d.ts +37 -0
- package/dist/lib/types/Tour.stories.d.ts +39 -0
- package/dist/lib/types/TranscriptMarkers.d.ts +50 -0
- package/dist/lib/types/TranscriptMarkers.stories.d.ts +48 -0
- package/dist/lib/types/Treemap.d.ts +77 -0
- package/dist/lib/types/Treemap.stories.d.ts +101 -0
- package/dist/lib/types/VisibilityControl.d.ts +54 -0
- package/dist/lib/types/VisibilityControl.stories.d.ts +126 -0
- package/dist/lib/types/chart-shared.d.ts +63 -0
- package/dist/lib/types/index.d.ts +53 -0
- package/dist/lib/types/story-frame.d.ts +12 -0
- package/dist/lib/ui.js +8707 -0
- package/package.json +67 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the simple prev/next pager (the .pager specimen). a label naming the current page,
|
|
3
|
+
* flanked by previous/next icon buttons. reuses .pager + .btn.btn-secondary.btn-sm.btn-icon
|
|
4
|
+
* with no new css. for numbered pagination use a separate component.
|
|
5
|
+
*
|
|
6
|
+
* @typedef {Object} PagerProps
|
|
7
|
+
* @property {number} page - the current (1-based) page number. default 1.
|
|
8
|
+
* @property {number} total - the total number of pages. default 1.
|
|
9
|
+
* @property {() => void} [onPrev] - called when the previous button is clicked.
|
|
10
|
+
* @property {() => void} [onNext] - called when the next button is clicked.
|
|
11
|
+
* @property {(nextPage: number) => void} [onChange] - called with the new page number on either button (fallback when onPrev/onNext are not given).
|
|
12
|
+
* @property {string} [label] - aria-label for the whole pager nav. default 'pagination'.
|
|
13
|
+
*
|
|
14
|
+
* @param {PagerProps} props
|
|
15
|
+
*/
|
|
16
|
+
export default function Pager({ page, total, onPrev, onNext, onChange, label }: PagerProps): any;
|
|
17
|
+
/**
|
|
18
|
+
* the simple prev/next pager (the .pager specimen). a label naming the current page,
|
|
19
|
+
* flanked by previous/next icon buttons. reuses .pager + .btn.btn-secondary.btn-sm.btn-icon
|
|
20
|
+
* with no new css. for numbered pagination use a separate component.
|
|
21
|
+
*/
|
|
22
|
+
export type PagerProps = {
|
|
23
|
+
/**
|
|
24
|
+
* - the current (1-based) page number. default 1.
|
|
25
|
+
*/
|
|
26
|
+
page: number;
|
|
27
|
+
/**
|
|
28
|
+
* - the total number of pages. default 1.
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
* - called when the previous button is clicked.
|
|
33
|
+
*/
|
|
34
|
+
onPrev?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* - called when the next button is clicked.
|
|
37
|
+
*/
|
|
38
|
+
onNext?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* - called with the new page number on either button (fallback when onPrev/onNext are not given).
|
|
41
|
+
*/
|
|
42
|
+
onChange?: (nextPage: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* - aria-label for the whole pager nav. default 'pagination'.
|
|
45
|
+
*/
|
|
46
|
+
label?: string;
|
|
47
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace Middle {
|
|
4
|
+
namespace args {
|
|
5
|
+
let page: number;
|
|
6
|
+
let total: number;
|
|
7
|
+
let label: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export namespace AtStart {
|
|
11
|
+
export namespace args_1 {
|
|
12
|
+
let page_1: number;
|
|
13
|
+
export { page_1 as page };
|
|
14
|
+
let total_1: number;
|
|
15
|
+
export { total_1 as total };
|
|
16
|
+
let label_1: string;
|
|
17
|
+
export { label_1 as label };
|
|
18
|
+
}
|
|
19
|
+
export { args_1 as args };
|
|
20
|
+
}
|
|
21
|
+
export namespace AtEnd {
|
|
22
|
+
export namespace args_2 {
|
|
23
|
+
let page_2: number;
|
|
24
|
+
export { page_2 as page };
|
|
25
|
+
let total_2: number;
|
|
26
|
+
export { total_2 as total };
|
|
27
|
+
let label_2: string;
|
|
28
|
+
export { label_2 as label };
|
|
29
|
+
}
|
|
30
|
+
export { args_2 as args };
|
|
31
|
+
}
|
|
32
|
+
export namespace SinglePage {
|
|
33
|
+
export namespace args_3 {
|
|
34
|
+
let page_3: number;
|
|
35
|
+
export { page_3 as page };
|
|
36
|
+
let total_3: number;
|
|
37
|
+
export { total_3 as total };
|
|
38
|
+
let label_3: string;
|
|
39
|
+
export { label_3 as label };
|
|
40
|
+
}
|
|
41
|
+
export { args_3 as args };
|
|
42
|
+
}
|
|
43
|
+
export namespace Interactive {
|
|
44
|
+
function render(): any;
|
|
45
|
+
}
|
|
46
|
+
export namespace PrevNextPrecedence {
|
|
47
|
+
export function render_1(): any;
|
|
48
|
+
export { render_1 as render };
|
|
49
|
+
}
|
|
50
|
+
declare namespace meta {
|
|
51
|
+
export let title: string;
|
|
52
|
+
export { Pager as component };
|
|
53
|
+
export let tags: string[];
|
|
54
|
+
export namespace argTypes {
|
|
55
|
+
export namespace page_4 {
|
|
56
|
+
namespace control {
|
|
57
|
+
let type: string;
|
|
58
|
+
let min: number;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export { page_4 as page };
|
|
62
|
+
export namespace total_4 {
|
|
63
|
+
export namespace control_1 {
|
|
64
|
+
let type_1: string;
|
|
65
|
+
export { type_1 as type };
|
|
66
|
+
let min_1: number;
|
|
67
|
+
export { min_1 as min };
|
|
68
|
+
}
|
|
69
|
+
export { control_1 as control };
|
|
70
|
+
}
|
|
71
|
+
export { total_4 as total };
|
|
72
|
+
export namespace label_4 {
|
|
73
|
+
let control_2: string;
|
|
74
|
+
export { control_2 as control };
|
|
75
|
+
}
|
|
76
|
+
export { label_4 as label };
|
|
77
|
+
export namespace onPrev {
|
|
78
|
+
let action: string;
|
|
79
|
+
}
|
|
80
|
+
export namespace onNext {
|
|
81
|
+
let action_1: string;
|
|
82
|
+
export { action_1 as action };
|
|
83
|
+
}
|
|
84
|
+
export namespace onChange {
|
|
85
|
+
let action_2: string;
|
|
86
|
+
export { action_2 as action };
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export namespace args_4 {
|
|
90
|
+
let page_5: number;
|
|
91
|
+
export { page_5 as page };
|
|
92
|
+
let total_5: number;
|
|
93
|
+
export { total_5 as total };
|
|
94
|
+
let label_5: string;
|
|
95
|
+
export { label_5 as label };
|
|
96
|
+
}
|
|
97
|
+
export { args_4 as args };
|
|
98
|
+
export let decorators: ((Story: any) => any)[];
|
|
99
|
+
}
|
|
100
|
+
import Pager from './Pager.jsx';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} PaginationProps
|
|
3
|
+
* @property {number} [page] controlled current page (1-based); pair with onChange.
|
|
4
|
+
* @property {number} [defaultPage=1] initial page when uncontrolled.
|
|
5
|
+
* @property {number} [total] total number of pages. if omitted it is derived from
|
|
6
|
+
* totalItems / pageSize.
|
|
7
|
+
* @property {number} [totalItems] total item count, used with pageSize to derive `total`.
|
|
8
|
+
* @property {number} [pageSize=10] items per page, used with totalItems to derive `total`.
|
|
9
|
+
* @property {(nextPage: number) => void} [onChange] called with the new 1-based page on any change.
|
|
10
|
+
* @property {number} [siblingCount=1] page buttons shown on each side of the current page.
|
|
11
|
+
* @property {string} [label='pagination'] aria-label for the <nav>.
|
|
12
|
+
*
|
|
13
|
+
* @param {PaginationProps} props
|
|
14
|
+
*/
|
|
15
|
+
export default function Pagination({ page, defaultPage, total, totalItems, pageSize, onChange, siblingCount, label, }: PaginationProps): any;
|
|
16
|
+
export type PaginationProps = {
|
|
17
|
+
/**
|
|
18
|
+
* controlled current page (1-based); pair with onChange.
|
|
19
|
+
*/
|
|
20
|
+
page?: number;
|
|
21
|
+
/**
|
|
22
|
+
* initial page when uncontrolled.
|
|
23
|
+
*/
|
|
24
|
+
defaultPage?: number;
|
|
25
|
+
/**
|
|
26
|
+
* total number of pages. if omitted it is derived from
|
|
27
|
+
* totalItems / pageSize.
|
|
28
|
+
*/
|
|
29
|
+
total?: number;
|
|
30
|
+
/**
|
|
31
|
+
* total item count, used with pageSize to derive `total`.
|
|
32
|
+
*/
|
|
33
|
+
totalItems?: number;
|
|
34
|
+
/**
|
|
35
|
+
* items per page, used with totalItems to derive `total`.
|
|
36
|
+
*/
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
/**
|
|
39
|
+
* called with the new 1-based page on any change.
|
|
40
|
+
*/
|
|
41
|
+
onChange?: (nextPage: number) => void;
|
|
42
|
+
/**
|
|
43
|
+
* page buttons shown on each side of the current page.
|
|
44
|
+
*/
|
|
45
|
+
siblingCount?: number;
|
|
46
|
+
/**
|
|
47
|
+
* aria-label for the <nav>.
|
|
48
|
+
*/
|
|
49
|
+
label?: string;
|
|
50
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace ShortRange {
|
|
4
|
+
namespace args {
|
|
5
|
+
let total: number;
|
|
6
|
+
let defaultPage: number;
|
|
7
|
+
let label: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export namespace LongRange {
|
|
11
|
+
export namespace args_1 {
|
|
12
|
+
let total_1: number;
|
|
13
|
+
export { total_1 as total };
|
|
14
|
+
let defaultPage_1: number;
|
|
15
|
+
export { defaultPage_1 as defaultPage };
|
|
16
|
+
let label_1: string;
|
|
17
|
+
export { label_1 as label };
|
|
18
|
+
}
|
|
19
|
+
export { args_1 as args };
|
|
20
|
+
}
|
|
21
|
+
export namespace FromItems {
|
|
22
|
+
export namespace args_2 {
|
|
23
|
+
let total_2: any;
|
|
24
|
+
export { total_2 as total };
|
|
25
|
+
export let totalItems: number;
|
|
26
|
+
export let pageSize: number;
|
|
27
|
+
let defaultPage_2: number;
|
|
28
|
+
export { defaultPage_2 as defaultPage };
|
|
29
|
+
let label_2: string;
|
|
30
|
+
export { label_2 as label };
|
|
31
|
+
}
|
|
32
|
+
export { args_2 as args };
|
|
33
|
+
}
|
|
34
|
+
export namespace AtFirstPage {
|
|
35
|
+
export namespace args_3 {
|
|
36
|
+
let total_3: number;
|
|
37
|
+
export { total_3 as total };
|
|
38
|
+
let defaultPage_3: number;
|
|
39
|
+
export { defaultPage_3 as defaultPage };
|
|
40
|
+
let label_3: string;
|
|
41
|
+
export { label_3 as label };
|
|
42
|
+
}
|
|
43
|
+
export { args_3 as args };
|
|
44
|
+
}
|
|
45
|
+
export namespace AtLastPage {
|
|
46
|
+
export namespace args_4 {
|
|
47
|
+
let total_4: number;
|
|
48
|
+
export { total_4 as total };
|
|
49
|
+
let defaultPage_4: number;
|
|
50
|
+
export { defaultPage_4 as defaultPage };
|
|
51
|
+
let label_4: string;
|
|
52
|
+
export { label_4 as label };
|
|
53
|
+
}
|
|
54
|
+
export { args_4 as args };
|
|
55
|
+
}
|
|
56
|
+
export namespace WideWindow {
|
|
57
|
+
export namespace args_5 {
|
|
58
|
+
let total_5: number;
|
|
59
|
+
export { total_5 as total };
|
|
60
|
+
let defaultPage_5: number;
|
|
61
|
+
export { defaultPage_5 as defaultPage };
|
|
62
|
+
export let siblingCount: number;
|
|
63
|
+
let label_5: string;
|
|
64
|
+
export { label_5 as label };
|
|
65
|
+
}
|
|
66
|
+
export { args_5 as args };
|
|
67
|
+
}
|
|
68
|
+
export namespace Collapsed {
|
|
69
|
+
export namespace args_6 {
|
|
70
|
+
let total_6: number;
|
|
71
|
+
export { total_6 as total };
|
|
72
|
+
let defaultPage_6: number;
|
|
73
|
+
export { defaultPage_6 as defaultPage };
|
|
74
|
+
let label_6: string;
|
|
75
|
+
export { label_6 as label };
|
|
76
|
+
}
|
|
77
|
+
export { args_6 as args };
|
|
78
|
+
export namespace parameters {
|
|
79
|
+
namespace viewport {
|
|
80
|
+
let defaultViewport: string;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export namespace Controlled {
|
|
85
|
+
export namespace args_7 {
|
|
86
|
+
let total_7: number;
|
|
87
|
+
export { total_7 as total };
|
|
88
|
+
let siblingCount_1: number;
|
|
89
|
+
export { siblingCount_1 as siblingCount };
|
|
90
|
+
let label_7: string;
|
|
91
|
+
export { label_7 as label };
|
|
92
|
+
}
|
|
93
|
+
export { args_7 as args };
|
|
94
|
+
export function render(args: any): any;
|
|
95
|
+
export function play({ canvasElement, args }: {
|
|
96
|
+
canvasElement: any;
|
|
97
|
+
args: any;
|
|
98
|
+
}): Promise<void>;
|
|
99
|
+
}
|
|
100
|
+
export namespace ControlledFrozen {
|
|
101
|
+
export namespace args_8 {
|
|
102
|
+
let total_8: number;
|
|
103
|
+
export { total_8 as total };
|
|
104
|
+
let siblingCount_2: number;
|
|
105
|
+
export { siblingCount_2 as siblingCount };
|
|
106
|
+
export let page: number;
|
|
107
|
+
let label_8: string;
|
|
108
|
+
export { label_8 as label };
|
|
109
|
+
}
|
|
110
|
+
export { args_8 as args };
|
|
111
|
+
export function play_1({ canvasElement, args }: {
|
|
112
|
+
canvasElement: any;
|
|
113
|
+
args: any;
|
|
114
|
+
}): Promise<void>;
|
|
115
|
+
export { play_1 as play };
|
|
116
|
+
}
|
|
117
|
+
export namespace ClickPage {
|
|
118
|
+
export namespace args_9 {
|
|
119
|
+
let total_9: number;
|
|
120
|
+
export { total_9 as total };
|
|
121
|
+
let defaultPage_7: number;
|
|
122
|
+
export { defaultPage_7 as defaultPage };
|
|
123
|
+
let siblingCount_3: number;
|
|
124
|
+
export { siblingCount_3 as siblingCount };
|
|
125
|
+
let label_9: string;
|
|
126
|
+
export { label_9 as label };
|
|
127
|
+
}
|
|
128
|
+
export { args_9 as args };
|
|
129
|
+
export function play_2({ canvasElement, args }: {
|
|
130
|
+
canvasElement: any;
|
|
131
|
+
args: any;
|
|
132
|
+
}): Promise<void>;
|
|
133
|
+
export { play_2 as play };
|
|
134
|
+
}
|
|
135
|
+
declare namespace meta {
|
|
136
|
+
export let title: string;
|
|
137
|
+
export { Pagination as component };
|
|
138
|
+
export let tags: string[];
|
|
139
|
+
export namespace argTypes {
|
|
140
|
+
export namespace page_1 {
|
|
141
|
+
let control: string;
|
|
142
|
+
}
|
|
143
|
+
export { page_1 as page };
|
|
144
|
+
export namespace defaultPage_8 {
|
|
145
|
+
let control_1: string;
|
|
146
|
+
export { control_1 as control };
|
|
147
|
+
}
|
|
148
|
+
export { defaultPage_8 as defaultPage };
|
|
149
|
+
export namespace total_10 {
|
|
150
|
+
let control_2: string;
|
|
151
|
+
export { control_2 as control };
|
|
152
|
+
}
|
|
153
|
+
export { total_10 as total };
|
|
154
|
+
export namespace totalItems_1 {
|
|
155
|
+
let control_3: string;
|
|
156
|
+
export { control_3 as control };
|
|
157
|
+
}
|
|
158
|
+
export { totalItems_1 as totalItems };
|
|
159
|
+
export namespace pageSize_1 {
|
|
160
|
+
let control_4: string;
|
|
161
|
+
export { control_4 as control };
|
|
162
|
+
}
|
|
163
|
+
export { pageSize_1 as pageSize };
|
|
164
|
+
export namespace siblingCount_4 {
|
|
165
|
+
let control_5: string;
|
|
166
|
+
export { control_5 as control };
|
|
167
|
+
export let options: number[];
|
|
168
|
+
}
|
|
169
|
+
export { siblingCount_4 as siblingCount };
|
|
170
|
+
export namespace label_10 {
|
|
171
|
+
let control_6: string;
|
|
172
|
+
export { control_6 as control };
|
|
173
|
+
}
|
|
174
|
+
export { label_10 as label };
|
|
175
|
+
export namespace onChange {
|
|
176
|
+
let action: string;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
export namespace args_10 {
|
|
180
|
+
let total_11: number;
|
|
181
|
+
export { total_11 as total };
|
|
182
|
+
let defaultPage_9: number;
|
|
183
|
+
export { defaultPage_9 as defaultPage };
|
|
184
|
+
let siblingCount_5: number;
|
|
185
|
+
export { siblingCount_5 as siblingCount };
|
|
186
|
+
let label_11: string;
|
|
187
|
+
export { label_11 as label };
|
|
188
|
+
let onChange_1: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
189
|
+
export { onChange_1 as onChange };
|
|
190
|
+
}
|
|
191
|
+
export { args_10 as args };
|
|
192
|
+
}
|
|
193
|
+
import Pagination from './Pagination.jsx';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} PolicyOption
|
|
3
|
+
* @property {string} value the value submitted / matched when selected.
|
|
4
|
+
* @property {import('react').ReactNode} label the bold option label (mono).
|
|
5
|
+
* @property {import('react').ReactNode} [rationale] one-line plain-prose explanation (body font).
|
|
6
|
+
* @property {boolean} [disabled] native disabled state for this option.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} PolicySelectProps
|
|
10
|
+
* @property {import('react').ReactNode} label the field label above the control (mono, lowercase chrome).
|
|
11
|
+
* @property {string} name form name; the shared radio group name in the radio variant.
|
|
12
|
+
* @property {string} [value] controlled selected value; pair with onChange.
|
|
13
|
+
* @property {string} [defaultValue] initial value for uncontrolled use.
|
|
14
|
+
* @property {(value: string) => void} [onChange] called with the next value on selection.
|
|
15
|
+
* @property {PolicyOption[]} options the choices to render (each {value,label,rationale}).
|
|
16
|
+
* @property {'radio'|'select'} [variant='radio'] layout: a rationale-per-row radio group, or a native select.
|
|
17
|
+
* @property {import('react').ReactNode} [hint] optional one-line helper beneath the label.
|
|
18
|
+
* @property {string} [id] id for the control / radiogroup; auto-generated when omitted.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A governance policy selector. See PolicySelectProps.
|
|
22
|
+
* @param {PolicySelectProps} props
|
|
23
|
+
*/
|
|
24
|
+
export default function PolicySelect({ label, name, value, defaultValue, onChange, options, variant, hint, id, }: PolicySelectProps): any;
|
|
25
|
+
export type PolicyOption = {
|
|
26
|
+
/**
|
|
27
|
+
* the value submitted / matched when selected.
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
/**
|
|
31
|
+
* the bold option label (mono).
|
|
32
|
+
*/
|
|
33
|
+
label: any;
|
|
34
|
+
/**
|
|
35
|
+
* one-line plain-prose explanation (body font).
|
|
36
|
+
*/
|
|
37
|
+
rationale?: any;
|
|
38
|
+
/**
|
|
39
|
+
* native disabled state for this option.
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type PolicySelectProps = {
|
|
44
|
+
/**
|
|
45
|
+
* the field label above the control (mono, lowercase chrome).
|
|
46
|
+
*/
|
|
47
|
+
label: any;
|
|
48
|
+
/**
|
|
49
|
+
* form name; the shared radio group name in the radio variant.
|
|
50
|
+
*/
|
|
51
|
+
name: string;
|
|
52
|
+
/**
|
|
53
|
+
* controlled selected value; pair with onChange.
|
|
54
|
+
*/
|
|
55
|
+
value?: string;
|
|
56
|
+
/**
|
|
57
|
+
* initial value for uncontrolled use.
|
|
58
|
+
*/
|
|
59
|
+
defaultValue?: string;
|
|
60
|
+
/**
|
|
61
|
+
* called with the next value on selection.
|
|
62
|
+
*/
|
|
63
|
+
onChange?: (value: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* the choices to render (each {value,label,rationale}).
|
|
66
|
+
*/
|
|
67
|
+
options: PolicyOption[];
|
|
68
|
+
/**
|
|
69
|
+
* layout: a rationale-per-row radio group, or a native select.
|
|
70
|
+
*/
|
|
71
|
+
variant?: "radio" | "select";
|
|
72
|
+
/**
|
|
73
|
+
* optional one-line helper beneath the label.
|
|
74
|
+
*/
|
|
75
|
+
hint?: any;
|
|
76
|
+
/**
|
|
77
|
+
* id for the control / radiogroup; auto-generated when omitted.
|
|
78
|
+
*/
|
|
79
|
+
id?: string;
|
|
80
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace DataAccess {
|
|
3
|
+
namespace args {
|
|
4
|
+
export let label: string;
|
|
5
|
+
export let name: string;
|
|
6
|
+
export let variant: string;
|
|
7
|
+
export { DATA_ACCESS as options };
|
|
8
|
+
export let defaultValue: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export namespace Acceptance {
|
|
12
|
+
export namespace args_1 {
|
|
13
|
+
let label_1: string;
|
|
14
|
+
export { label_1 as label };
|
|
15
|
+
let name_1: string;
|
|
16
|
+
export { name_1 as name };
|
|
17
|
+
let variant_1: string;
|
|
18
|
+
export { variant_1 as variant };
|
|
19
|
+
export { ACCEPTANCE as options };
|
|
20
|
+
let defaultValue_1: string;
|
|
21
|
+
export { defaultValue_1 as defaultValue };
|
|
22
|
+
}
|
|
23
|
+
export { args_1 as args };
|
|
24
|
+
}
|
|
25
|
+
export namespace Retention {
|
|
26
|
+
export namespace args_2 {
|
|
27
|
+
let label_2: string;
|
|
28
|
+
export { label_2 as label };
|
|
29
|
+
let name_2: string;
|
|
30
|
+
export { name_2 as name };
|
|
31
|
+
let variant_2: string;
|
|
32
|
+
export { variant_2 as variant };
|
|
33
|
+
export let hint: string;
|
|
34
|
+
export { RETENTION as options };
|
|
35
|
+
let defaultValue_2: string;
|
|
36
|
+
export { defaultValue_2 as defaultValue };
|
|
37
|
+
}
|
|
38
|
+
export { args_2 as args };
|
|
39
|
+
}
|
|
40
|
+
export namespace Select {
|
|
41
|
+
export namespace args_3 {
|
|
42
|
+
let label_3: string;
|
|
43
|
+
export { label_3 as label };
|
|
44
|
+
let name_3: string;
|
|
45
|
+
export { name_3 as name };
|
|
46
|
+
let variant_3: string;
|
|
47
|
+
export { variant_3 as variant };
|
|
48
|
+
export { DATA_ACCESS as options };
|
|
49
|
+
let defaultValue_3: string;
|
|
50
|
+
export { defaultValue_3 as defaultValue };
|
|
51
|
+
}
|
|
52
|
+
export { args_3 as args };
|
|
53
|
+
}
|
|
54
|
+
export namespace WithDisabledOption {
|
|
55
|
+
export namespace args_4 {
|
|
56
|
+
let label_4: string;
|
|
57
|
+
export { label_4 as label };
|
|
58
|
+
let name_4: string;
|
|
59
|
+
export { name_4 as name };
|
|
60
|
+
let variant_4: string;
|
|
61
|
+
export { variant_4 as variant };
|
|
62
|
+
export let options: {
|
|
63
|
+
value: string;
|
|
64
|
+
label: string;
|
|
65
|
+
rationale: string;
|
|
66
|
+
}[];
|
|
67
|
+
let defaultValue_4: string;
|
|
68
|
+
export { defaultValue_4 as defaultValue };
|
|
69
|
+
}
|
|
70
|
+
export { args_4 as args };
|
|
71
|
+
}
|
|
72
|
+
export namespace Selects {
|
|
73
|
+
export namespace args_5 {
|
|
74
|
+
let label_5: string;
|
|
75
|
+
export { label_5 as label };
|
|
76
|
+
let name_5: string;
|
|
77
|
+
export { name_5 as name };
|
|
78
|
+
let variant_5: string;
|
|
79
|
+
export { variant_5 as variant };
|
|
80
|
+
export { DATA_ACCESS as options };
|
|
81
|
+
}
|
|
82
|
+
export { args_5 as args };
|
|
83
|
+
export function render(args: any): any;
|
|
84
|
+
export function play({ canvasElement }: {
|
|
85
|
+
canvasElement: any;
|
|
86
|
+
}): Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
declare namespace meta {
|
|
89
|
+
export let title: string;
|
|
90
|
+
export { PolicySelect as component };
|
|
91
|
+
export let tags: string[];
|
|
92
|
+
export let decorators: Function[];
|
|
93
|
+
export namespace argTypes {
|
|
94
|
+
export namespace variant_6 {
|
|
95
|
+
export let control: string;
|
|
96
|
+
let options_1: string[];
|
|
97
|
+
export { options_1 as options };
|
|
98
|
+
}
|
|
99
|
+
export { variant_6 as variant };
|
|
100
|
+
export namespace label_6 {
|
|
101
|
+
let control_1: string;
|
|
102
|
+
export { control_1 as control };
|
|
103
|
+
}
|
|
104
|
+
export { label_6 as label };
|
|
105
|
+
export namespace hint_1 {
|
|
106
|
+
let control_2: string;
|
|
107
|
+
export { control_2 as control };
|
|
108
|
+
}
|
|
109
|
+
export { hint_1 as hint };
|
|
110
|
+
export namespace onChange {
|
|
111
|
+
let action: string;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
declare const DATA_ACCESS: {
|
|
116
|
+
value: string;
|
|
117
|
+
label: string;
|
|
118
|
+
rationale: string;
|
|
119
|
+
}[];
|
|
120
|
+
declare const ACCEPTANCE: {
|
|
121
|
+
value: string;
|
|
122
|
+
label: string;
|
|
123
|
+
rationale: string;
|
|
124
|
+
}[];
|
|
125
|
+
declare const RETENTION: {
|
|
126
|
+
value: string;
|
|
127
|
+
label: string;
|
|
128
|
+
rationale: string;
|
|
129
|
+
}[];
|
|
130
|
+
import PolicySelect from './PolicySelect.jsx';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProviderIcon — the real brand mark for a harness, single-color via currentColor.
|
|
3
|
+
*
|
|
4
|
+
* decorative by default (it is paired with a name in every composite below). pass
|
|
5
|
+
* `label` to make a STANDALONE mark informative (role="img" + the provider name).
|
|
6
|
+
* pass `accent` to tint the mark with its provider accent instead of inheriting
|
|
7
|
+
* the surrounding text color — but remember the accent is never the sole signal.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} props
|
|
10
|
+
* @param {'claude-code'|'gemini-cli'|'codex'|'opencode'|'cursor'} props.harness
|
|
11
|
+
* @param {number} [props.size] explicit px; omit to inherit the contextual icon size.
|
|
12
|
+
* @param {boolean} [props.accent] tint with PROVIDER_ACCENT[harness] (default: currentColor).
|
|
13
|
+
* @param {boolean|string} [props.label] true → the provider name as aria-label; a string overrides.
|
|
14
|
+
* @param {string} [props.className] extra classes appended after `pv-icon`.
|
|
15
|
+
* @returns {JSX.Element|null} null when `harness` is unknown.
|
|
16
|
+
*/
|
|
17
|
+
export function ProviderIcon({ harness, size, accent, label, className, ...rest }: {
|
|
18
|
+
harness: "claude-code" | "gemini-cli" | "codex" | "opencode" | "cursor";
|
|
19
|
+
size?: number;
|
|
20
|
+
accent?: boolean;
|
|
21
|
+
label?: boolean | string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}): JSX.Element | null;
|
|
24
|
+
/**
|
|
25
|
+
* ProviderTag — a square hairline chip: the real mark + the lowercase harness slug.
|
|
26
|
+
*
|
|
27
|
+
* the system's chip look (mono, hairline border, radius 0, lowercase chrome). the
|
|
28
|
+
* mark sits to the left of the slug so the chip is never color-only: even fully
|
|
29
|
+
* monochrome it names the provider in words. pass `accent` to tint the mark.
|
|
30
|
+
*
|
|
31
|
+
* @param {object} props
|
|
32
|
+
* @param {'claude-code'|'gemini-cli'|'codex'|'opencode'|'cursor'} props.harness
|
|
33
|
+
* @param {boolean} [props.accent] tint the mark with the provider accent (default: ink).
|
|
34
|
+
* @param {string} [props.className]
|
|
35
|
+
* @returns {JSX.Element|null}
|
|
36
|
+
*/
|
|
37
|
+
export function ProviderTag({ harness, accent, className, ...rest }: {
|
|
38
|
+
harness: "claude-code" | "gemini-cli" | "codex" | "opencode" | "cursor";
|
|
39
|
+
accent?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): JSX.Element | null;
|
|
42
|
+
/**
|
|
43
|
+
* ProviderName — mark + the harness slug as a plain inline label (no chip border).
|
|
44
|
+
*
|
|
45
|
+
* the in-prose form: use it inline in a sentence or a table cell. pass `accent` to
|
|
46
|
+
* tint BOTH the mark and the slug with the provider accent (the slug gets a
|
|
47
|
+
* non-color cue regardless — it is real text, so it is readable mono-color too).
|
|
48
|
+
*
|
|
49
|
+
* @param {object} props
|
|
50
|
+
* @param {'claude-code'|'gemini-cli'|'codex'|'opencode'|'cursor'} props.harness
|
|
51
|
+
* @param {boolean} [props.accent] tint mark + label with the provider accent.
|
|
52
|
+
* @param {string} [props.className]
|
|
53
|
+
* @returns {JSX.Element|null}
|
|
54
|
+
*/
|
|
55
|
+
export function ProviderName({ harness, accent, className, ...rest }: {
|
|
56
|
+
harness: "claude-code" | "gemini-cli" | "codex" | "opencode" | "cursor";
|
|
57
|
+
accent?: boolean;
|
|
58
|
+
className?: string;
|
|
59
|
+
}): JSX.Element | null;
|
|
60
|
+
/**
|
|
61
|
+
* AccentLegend — the per-provider accent map, documented as a UI.
|
|
62
|
+
*
|
|
63
|
+
* one row per harness: the real mark, the provider name, and the accent swatch
|
|
64
|
+
* with its token name written out. the swatch is the LAST column on purpose —
|
|
65
|
+
* the mark + name already identify the provider, so the legend reads correctly
|
|
66
|
+
* with the color stripped (the neuroinclusive rule made visible).
|
|
67
|
+
*
|
|
68
|
+
* @param {object} props
|
|
69
|
+
* @param {string} [props.className]
|
|
70
|
+
* @returns {JSX.Element}
|
|
71
|
+
*/
|
|
72
|
+
export function AccentLegend({ className, ...rest }: {
|
|
73
|
+
className?: string;
|
|
74
|
+
}): JSX.Element;
|
|
75
|
+
export const HARNESSES: string[];
|
|
76
|
+
export const PROVIDER_ACCENT: {
|
|
77
|
+
'claude-code': string;
|
|
78
|
+
'gemini-cli': string;
|
|
79
|
+
codex: string;
|
|
80
|
+
opencode: string;
|
|
81
|
+
cursor: string;
|
|
82
|
+
};
|
|
83
|
+
export default ProviderIcon;
|