@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,130 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace Default {
|
|
4
|
+
namespace args {
|
|
5
|
+
export { Inbox as icon };
|
|
6
|
+
export let title: string;
|
|
7
|
+
export let message: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export namespace WithAction {
|
|
11
|
+
export namespace args_1 {
|
|
12
|
+
export { Plus as icon };
|
|
13
|
+
let title_1: string;
|
|
14
|
+
export { title_1 as title };
|
|
15
|
+
let message_1: string;
|
|
16
|
+
export { message_1 as message };
|
|
17
|
+
export let action: any;
|
|
18
|
+
}
|
|
19
|
+
export { args_1 as args };
|
|
20
|
+
}
|
|
21
|
+
export namespace NoMessage {
|
|
22
|
+
export namespace args_2 {
|
|
23
|
+
export { Compass as icon };
|
|
24
|
+
let title_2: string;
|
|
25
|
+
export { title_2 as title };
|
|
26
|
+
let message_2: any;
|
|
27
|
+
export { message_2 as message };
|
|
28
|
+
}
|
|
29
|
+
export { args_2 as args };
|
|
30
|
+
}
|
|
31
|
+
export namespace NoResults {
|
|
32
|
+
export namespace args_3 {
|
|
33
|
+
export { Search as icon };
|
|
34
|
+
let title_3: string;
|
|
35
|
+
export { title_3 as title };
|
|
36
|
+
let message_3: string;
|
|
37
|
+
export { message_3 as message };
|
|
38
|
+
let action_1: any;
|
|
39
|
+
export { action_1 as action };
|
|
40
|
+
}
|
|
41
|
+
export { args_3 as args };
|
|
42
|
+
}
|
|
43
|
+
export namespace NoMembers {
|
|
44
|
+
export namespace args_4 {
|
|
45
|
+
export { Users as icon };
|
|
46
|
+
let title_4: string;
|
|
47
|
+
export { title_4 as title };
|
|
48
|
+
let message_4: string;
|
|
49
|
+
export { message_4 as message };
|
|
50
|
+
let action_2: any;
|
|
51
|
+
export { action_2 as action };
|
|
52
|
+
}
|
|
53
|
+
export { args_4 as args };
|
|
54
|
+
}
|
|
55
|
+
export namespace ErrorState {
|
|
56
|
+
export namespace args_5 {
|
|
57
|
+
export { ShieldAlert as icon };
|
|
58
|
+
let title_5: string;
|
|
59
|
+
export { title_5 as title };
|
|
60
|
+
let message_5: string;
|
|
61
|
+
export { message_5 as message };
|
|
62
|
+
let action_3: any;
|
|
63
|
+
export { action_3 as action };
|
|
64
|
+
}
|
|
65
|
+
export { args_5 as args };
|
|
66
|
+
}
|
|
67
|
+
export namespace NoIcon {
|
|
68
|
+
export namespace args_6 {
|
|
69
|
+
export let icon: any;
|
|
70
|
+
let title_6: string;
|
|
71
|
+
export { title_6 as title };
|
|
72
|
+
let message_6: string;
|
|
73
|
+
export { message_6 as message };
|
|
74
|
+
}
|
|
75
|
+
export { args_6 as args };
|
|
76
|
+
}
|
|
77
|
+
export namespace ActionViaChildren {
|
|
78
|
+
export namespace args_7 {
|
|
79
|
+
export { Plus as icon };
|
|
80
|
+
let title_7: string;
|
|
81
|
+
export { title_7 as title };
|
|
82
|
+
let message_7: string;
|
|
83
|
+
export { message_7 as message };
|
|
84
|
+
}
|
|
85
|
+
export { args_7 as args };
|
|
86
|
+
export function render(args: any): any;
|
|
87
|
+
}
|
|
88
|
+
declare namespace meta {
|
|
89
|
+
let title_8: string;
|
|
90
|
+
export { title_8 as title };
|
|
91
|
+
export { EmptyState as component };
|
|
92
|
+
export let tags: string[];
|
|
93
|
+
export let decorators: Function[];
|
|
94
|
+
export namespace argTypes {
|
|
95
|
+
export namespace icon_1 {
|
|
96
|
+
let control: boolean;
|
|
97
|
+
}
|
|
98
|
+
export { icon_1 as icon };
|
|
99
|
+
export namespace title_9 {
|
|
100
|
+
let control_1: string;
|
|
101
|
+
export { control_1 as control };
|
|
102
|
+
}
|
|
103
|
+
export { title_9 as title };
|
|
104
|
+
export namespace message_8 {
|
|
105
|
+
let control_2: string;
|
|
106
|
+
export { control_2 as control };
|
|
107
|
+
}
|
|
108
|
+
export { message_8 as message };
|
|
109
|
+
export namespace action_4 {
|
|
110
|
+
let control_3: boolean;
|
|
111
|
+
export { control_3 as control };
|
|
112
|
+
}
|
|
113
|
+
export { action_4 as action };
|
|
114
|
+
}
|
|
115
|
+
export namespace args_8 {
|
|
116
|
+
export { Inbox as icon };
|
|
117
|
+
let title_10: string;
|
|
118
|
+
export { title_10 as title };
|
|
119
|
+
let message_9: string;
|
|
120
|
+
export { message_9 as message };
|
|
121
|
+
}
|
|
122
|
+
export { args_8 as args };
|
|
123
|
+
}
|
|
124
|
+
import { Inbox } from 'lucide-react';
|
|
125
|
+
import { Plus } from 'lucide-react';
|
|
126
|
+
import { Compass } from 'lucide-react';
|
|
127
|
+
import { Search } from 'lucide-react';
|
|
128
|
+
import { Users } from 'lucide-react';
|
|
129
|
+
import { ShieldAlert } from 'lucide-react';
|
|
130
|
+
import EmptyState from './EmptyState.jsx';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EvidenceCaption — the recap sentence assembled from fragments.
|
|
3
|
+
*
|
|
4
|
+
* @param {object} props
|
|
5
|
+
* @param {Array<{text: string, anchorId?: string, label?: string}>} props.fragments
|
|
6
|
+
* the ordered fragments. a fragment WITH `anchorId` is a clickable proof link (jumps to the
|
|
7
|
+
* <EvidenceTarget id={anchorId}> and flashes it); `label` names the destination for AT
|
|
8
|
+
* (defaults to the anchorId). a fragment without `anchorId` is plain prose.
|
|
9
|
+
* @param {(anchorId: string) => void} [props.onJump] - called with the anchorId when a fragment is
|
|
10
|
+
* activated (in addition to the built-in scroll + highlight).
|
|
11
|
+
* @param {string} [props['aria-label']] - accessible label for the recap region (default: "recap").
|
|
12
|
+
* @param {string} [props.className]
|
|
13
|
+
*/
|
|
14
|
+
export function EvidenceCaption({ fragments, onJump, "aria-label": ariaLabel, className, ...rest }: {
|
|
15
|
+
fragments: Array<{
|
|
16
|
+
text: string;
|
|
17
|
+
anchorId?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
}>;
|
|
20
|
+
onJump?: (anchorId: string) => void;
|
|
21
|
+
}): any;
|
|
22
|
+
/**
|
|
23
|
+
* EvidenceTarget — the proof block a fragment jumps to. it owns the `id` the caption scrolls to and
|
|
24
|
+
* the `data-ec-flash` attribute the CSS animates on arrival. give it an `eyebrow` (a small mono
|
|
25
|
+
* anchor label, lowercased chrome) so the reader sees which evidence they landed on.
|
|
26
|
+
*
|
|
27
|
+
* @param {object} props
|
|
28
|
+
* @param {string} props.id - the anchor id; a fragment's `anchorId` points here.
|
|
29
|
+
* @param {string} [props.eyebrow] - the small anchor label shown above the block (chrome → mono).
|
|
30
|
+
* @param {React.ReactNode} props.children - the evidence content.
|
|
31
|
+
* @param {string} [props.className]
|
|
32
|
+
*/
|
|
33
|
+
export function EvidenceTarget({ id, eyebrow, children, className, ...rest }: {
|
|
34
|
+
id: string;
|
|
35
|
+
eyebrow?: string;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): any;
|
|
39
|
+
export default EvidenceCaption;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
function render(args: any): any;
|
|
4
|
+
namespace args {
|
|
5
|
+
let onJump: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
6
|
+
}
|
|
7
|
+
function play({ args, canvasElement }: {
|
|
8
|
+
args: any;
|
|
9
|
+
canvasElement: any;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export namespace LightTheme {
|
|
13
|
+
export function render_1(args: any): any;
|
|
14
|
+
export { render_1 as render };
|
|
15
|
+
export namespace args_1 {
|
|
16
|
+
let onJump_1: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
17
|
+
export { onJump_1 as onJump };
|
|
18
|
+
}
|
|
19
|
+
export { args_1 as args };
|
|
20
|
+
export namespace globals {
|
|
21
|
+
let theme: string;
|
|
22
|
+
namespace backgrounds {
|
|
23
|
+
let value: string;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
declare namespace meta {
|
|
28
|
+
export let title: string;
|
|
29
|
+
export { EvidenceCaption as component };
|
|
30
|
+
export let tags: string[];
|
|
31
|
+
export let decorators: Function[];
|
|
32
|
+
export namespace argTypes {
|
|
33
|
+
export namespace fragments {
|
|
34
|
+
let control: boolean;
|
|
35
|
+
}
|
|
36
|
+
export namespace onJump_2 {
|
|
37
|
+
let control_1: boolean;
|
|
38
|
+
export { control_1 as control };
|
|
39
|
+
}
|
|
40
|
+
export { onJump_2 as onJump };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
import { EvidenceCaption } from './EvidenceCaption.jsx';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} ExplainerProps
|
|
3
|
+
* @property {React.ReactNode} children the explanatory PROSE (rendered in var(--font-body)); may contain <Term> words.
|
|
4
|
+
* @property {React.ReactNode} [title='what am i looking at?'] the toggle-row heading (mono chrome, lowercased by css).
|
|
5
|
+
* @property {boolean} [defaultOpen=false] initial open state when nothing is persisted.
|
|
6
|
+
* @property {string} [storageKey] when given, open/closed persists to localStorage under this surface key.
|
|
7
|
+
* @property {'card'|'inline'} [tone='card'] 'card' = bordered panel; 'inline' = a quieter ghost (no fill/border).
|
|
8
|
+
* @property {string} [className] extra class on the root.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The "what am i looking at?" block — one per surface. A square "?" / heading toggle row reveals or
|
|
12
|
+
* hides a short prose body (the heading reads aria-expanded; the body is the toggle's aria-controls
|
|
13
|
+
* region). The toggle target is the whole row (>= the 24px minimum). Open state persists per surface
|
|
14
|
+
* when `storageKey` is set. Two tones: a bordered `card` panel, or a quieter `inline` ghost.
|
|
15
|
+
* It is never a modal and never steals focus.
|
|
16
|
+
*/
|
|
17
|
+
export default function Explainer({ children, title, defaultOpen, storageKey, tone, className, }: {
|
|
18
|
+
children: any;
|
|
19
|
+
title?: string;
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
storageKey: any;
|
|
22
|
+
tone?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): any;
|
|
25
|
+
/**
|
|
26
|
+
* @typedef {Object} TermProps
|
|
27
|
+
* @property {string} def the plain-language definition shown in the tooltip (mono chrome).
|
|
28
|
+
* @property {React.ReactNode} children the inline word(s) to underline.
|
|
29
|
+
* @property {string} [className] extra class on the trigger.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Inline glossary term: a dotted-underline word that reveals a small square tooltip with its
|
|
33
|
+
* definition on hover AND keyboard focus (and on tap, for touch). The trigger is a real <button> so
|
|
34
|
+
* it's reachable and operable from the keyboard; the bubble is wired via aria-describedby so the
|
|
35
|
+
* definition reinforces — never solely names — the word. A tooltip is reinforcement, so anything
|
|
36
|
+
* load-bearing must also live in visible copy.
|
|
37
|
+
*/
|
|
38
|
+
export function Term({ def, children, className }: {
|
|
39
|
+
def: any;
|
|
40
|
+
children: any;
|
|
41
|
+
className?: string;
|
|
42
|
+
}): any;
|
|
43
|
+
export type ExplainerProps = {
|
|
44
|
+
/**
|
|
45
|
+
* the explanatory PROSE (rendered in var(--font-body)); may contain <Term> words.
|
|
46
|
+
*/
|
|
47
|
+
children: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* the toggle-row heading (mono chrome, lowercased by css).
|
|
50
|
+
*/
|
|
51
|
+
title?: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* initial open state when nothing is persisted.
|
|
54
|
+
*/
|
|
55
|
+
defaultOpen?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* when given, open/closed persists to localStorage under this surface key.
|
|
58
|
+
*/
|
|
59
|
+
storageKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 'card' = bordered panel; 'inline' = a quieter ghost (no fill/border).
|
|
62
|
+
*/
|
|
63
|
+
tone?: "card" | "inline";
|
|
64
|
+
/**
|
|
65
|
+
* extra class on the root.
|
|
66
|
+
*/
|
|
67
|
+
className?: string;
|
|
68
|
+
};
|
|
69
|
+
export type TermProps = {
|
|
70
|
+
/**
|
|
71
|
+
* the plain-language definition shown in the tooltip (mono chrome).
|
|
72
|
+
*/
|
|
73
|
+
def: string;
|
|
74
|
+
/**
|
|
75
|
+
* the inline word(s) to underline.
|
|
76
|
+
*/
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* extra class on the trigger.
|
|
80
|
+
*/
|
|
81
|
+
className?: string;
|
|
82
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
function render(): any;
|
|
4
|
+
function play({ canvasElement }: {
|
|
5
|
+
canvasElement: any;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export namespace Inline {
|
|
9
|
+
export function render_1(): any;
|
|
10
|
+
export { render_1 as render };
|
|
11
|
+
}
|
|
12
|
+
export namespace Terms {
|
|
13
|
+
export function render_2(): any;
|
|
14
|
+
export { render_2 as render };
|
|
15
|
+
}
|
|
16
|
+
declare namespace meta {
|
|
17
|
+
export let title: string;
|
|
18
|
+
export { Explainer as component };
|
|
19
|
+
export let tags: string[];
|
|
20
|
+
export let decorators: Function[];
|
|
21
|
+
}
|
|
22
|
+
import Explainer from './Explainer.jsx';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function FacetRail({ order, onOrder, providers, activeProviders, onProvider, topics, activeTopics, onTopic, onClear, className, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
order?: string;
|
|
4
|
+
onOrder: any;
|
|
5
|
+
providers?: any[];
|
|
6
|
+
activeProviders?: Set<any>;
|
|
7
|
+
onProvider: any;
|
|
8
|
+
topics?: any[];
|
|
9
|
+
activeTopics?: Set<any>;
|
|
10
|
+
onTopic: any;
|
|
11
|
+
onClear: any;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
function render(): any;
|
|
4
|
+
}
|
|
5
|
+
export namespace Empty {
|
|
6
|
+
export function render_1(): any;
|
|
7
|
+
export { render_1 as render };
|
|
8
|
+
}
|
|
9
|
+
export namespace AllActive {
|
|
10
|
+
export function render_2(): any;
|
|
11
|
+
export { render_2 as render };
|
|
12
|
+
}
|
|
13
|
+
export namespace TogglesProvider {
|
|
14
|
+
export function render_3(): any;
|
|
15
|
+
export { render_3 as render };
|
|
16
|
+
export function play({ canvasElement }: {
|
|
17
|
+
canvasElement: any;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
declare namespace meta {
|
|
21
|
+
export let title: string;
|
|
22
|
+
export { FacetRail as component };
|
|
23
|
+
export namespace parameters {
|
|
24
|
+
let layout: string;
|
|
25
|
+
}
|
|
26
|
+
export let tags: string[];
|
|
27
|
+
}
|
|
28
|
+
import FacetRail from './FacetRail.jsx';
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton — a placeholder block that mirrors the shape of loading content.
|
|
3
|
+
* @typedef {Object} SkeletonProps
|
|
4
|
+
* @property {string} [label='loading'] aria-label announcing what is loading.
|
|
5
|
+
* @property {boolean} [avatar=true] render the leading 32px avatar block + two
|
|
6
|
+
* stacked lines (w-40 / w-70) at the top.
|
|
7
|
+
* @property {number} [lines=2] number of full-width body lines below the row;
|
|
8
|
+
* they cycle through w-90 / w-70 widths.
|
|
9
|
+
* @property {string} [className] extra classes appended to the .fb-skel root.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @param {SkeletonProps} props
|
|
13
|
+
*/
|
|
14
|
+
export function Skeleton({ label, avatar, lines, className }: SkeletonProps): any;
|
|
15
|
+
/**
|
|
16
|
+
* Progress — a determinate progress bar with a labelled head + tabular percent.
|
|
17
|
+
* @typedef {Object} ProgressProps
|
|
18
|
+
* @property {number} [value=0] current value, 0–100 (clamped); drives the fill
|
|
19
|
+
* width and aria-valuenow + the displayed percent.
|
|
20
|
+
* @property {number} [min=0] aria-valuemin.
|
|
21
|
+
* @property {number} [max=100] aria-valuemax.
|
|
22
|
+
* @property {React.ReactNode} [label] caption shown at the left of the head row.
|
|
23
|
+
* @property {string} [ariaLabel] accessible name for the track (progressbar);
|
|
24
|
+
* falls back to the string `label` when omitted.
|
|
25
|
+
* @property {boolean} [showPct=true] render the tabular percent on the right.
|
|
26
|
+
* @property {string} [className] extra classes appended to the .fb-prog root.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @param {ProgressProps} props
|
|
30
|
+
*/
|
|
31
|
+
export function Progress({ value, min, max, label, ariaLabel, showPct, className, }: ProgressProps): any;
|
|
32
|
+
/**
|
|
33
|
+
* Spinner — an inline busy marker: spinning icon + lowercase label, in a live region.
|
|
34
|
+
* @typedef {Object} SpinnerProps
|
|
35
|
+
* @property {React.ReactNode} [children] label text beside the icon (the live message).
|
|
36
|
+
* @property {React.ComponentType} [icon=LoaderCircle] icon component reference; the CSS
|
|
37
|
+
* spins .lucide only under no-preference + aria-busy.
|
|
38
|
+
* @property {string} [className] extra classes appended to the .fb-spin root.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* @param {SpinnerProps} props
|
|
42
|
+
*/
|
|
43
|
+
export function Spinner({ children, icon: Icon, className }: SpinnerProps): any;
|
|
44
|
+
/**
|
|
45
|
+
* Toast — a transient notification: icon + title + message + dismiss button.
|
|
46
|
+
* Render inside an aria-live region (e.g. a wrapper with aria-live="polite") for the
|
|
47
|
+
* announcement; the toast itself carries role status (ok) or alert (error).
|
|
48
|
+
* @typedef {Object} ToastProps
|
|
49
|
+
* @property {'ok'|'err'} [variant='ok'] tone; 'ok' = circle-check/olive + role=status,
|
|
50
|
+
* 'err' = circle-x/clay + role=alert.
|
|
51
|
+
* @property {React.ReactNode} title the .fb-toast-title line.
|
|
52
|
+
* @property {React.ReactNode} [children] the body message (.fb-toast-msg).
|
|
53
|
+
* @property {React.ComponentType} [icon] override the leading icon component reference.
|
|
54
|
+
* @property {() => void} [onClose] called when the dismiss button is clicked; when
|
|
55
|
+
* omitted the close button is not rendered.
|
|
56
|
+
* @property {string} [closeLabel='dismiss notification'] aria-label for the close button.
|
|
57
|
+
* @property {string} [className] extra classes appended to the .fb-toast root.
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* @param {ToastProps} props
|
|
61
|
+
*/
|
|
62
|
+
export function Toast({ variant, title, children, icon: Icon, onClose, closeLabel, className, }: ToastProps): any;
|
|
63
|
+
/**
|
|
64
|
+
* FeedbackPanel — a centred inline state surface (loading / error / empty), with an
|
|
65
|
+
* icon tile, lowercase title and a message. Loading sets aria-busy + role=status;
|
|
66
|
+
* error sets role=alert; the neutral (empty / resolved) panel has no role.
|
|
67
|
+
* @typedef {Object} FeedbackPanelProps
|
|
68
|
+
* @property {'loading'|'error'|'empty'} [variant='empty'] which surface to render; picks
|
|
69
|
+
* the default icon, role and .is-err styling.
|
|
70
|
+
* @property {React.ReactNode} [title] the .fb-panel-title (defaults per variant).
|
|
71
|
+
* @property {React.ReactNode} [children] the message body (.fb-panel-msg).
|
|
72
|
+
* @property {React.ComponentType} [icon] override the icon component reference; defaults
|
|
73
|
+
* to loader-circle / circle-alert / search-x.
|
|
74
|
+
* @property {string} [className] extra classes appended to the .fb-panel root.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* @param {FeedbackPanelProps} props
|
|
78
|
+
*/
|
|
79
|
+
export function FeedbackPanel({ variant, title, children, icon: Icon, className }: FeedbackPanelProps): any;
|
|
80
|
+
export default Spinner;
|
|
81
|
+
/**
|
|
82
|
+
* Skeleton — a placeholder block that mirrors the shape of loading content.
|
|
83
|
+
*/
|
|
84
|
+
export type SkeletonProps = {
|
|
85
|
+
/**
|
|
86
|
+
* aria-label announcing what is loading.
|
|
87
|
+
*/
|
|
88
|
+
label?: string;
|
|
89
|
+
/**
|
|
90
|
+
* render the leading 32px avatar block + two
|
|
91
|
+
* stacked lines (w-40 / w-70) at the top.
|
|
92
|
+
*/
|
|
93
|
+
avatar?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* number of full-width body lines below the row;
|
|
96
|
+
* they cycle through w-90 / w-70 widths.
|
|
97
|
+
*/
|
|
98
|
+
lines?: number;
|
|
99
|
+
/**
|
|
100
|
+
* extra classes appended to the .fb-skel root.
|
|
101
|
+
*/
|
|
102
|
+
className?: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Progress — a determinate progress bar with a labelled head + tabular percent.
|
|
106
|
+
*/
|
|
107
|
+
export type ProgressProps = {
|
|
108
|
+
/**
|
|
109
|
+
* current value, 0–100 (clamped); drives the fill
|
|
110
|
+
* width and aria-valuenow + the displayed percent.
|
|
111
|
+
*/
|
|
112
|
+
value?: number;
|
|
113
|
+
/**
|
|
114
|
+
* aria-valuemin.
|
|
115
|
+
*/
|
|
116
|
+
min?: number;
|
|
117
|
+
/**
|
|
118
|
+
* aria-valuemax.
|
|
119
|
+
*/
|
|
120
|
+
max?: number;
|
|
121
|
+
/**
|
|
122
|
+
* caption shown at the left of the head row.
|
|
123
|
+
*/
|
|
124
|
+
label?: React.ReactNode;
|
|
125
|
+
/**
|
|
126
|
+
* accessible name for the track (progressbar);
|
|
127
|
+
* falls back to the string `label` when omitted.
|
|
128
|
+
*/
|
|
129
|
+
ariaLabel?: string;
|
|
130
|
+
/**
|
|
131
|
+
* render the tabular percent on the right.
|
|
132
|
+
*/
|
|
133
|
+
showPct?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* extra classes appended to the .fb-prog root.
|
|
136
|
+
*/
|
|
137
|
+
className?: string;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Spinner — an inline busy marker: spinning icon + lowercase label, in a live region.
|
|
141
|
+
*/
|
|
142
|
+
export type SpinnerProps = {
|
|
143
|
+
/**
|
|
144
|
+
* label text beside the icon (the live message).
|
|
145
|
+
*/
|
|
146
|
+
children?: React.ReactNode;
|
|
147
|
+
/**
|
|
148
|
+
* icon component reference; the CSS
|
|
149
|
+
* spins .lucide only under no-preference + aria-busy.
|
|
150
|
+
*/
|
|
151
|
+
icon?: React.ComponentType;
|
|
152
|
+
/**
|
|
153
|
+
* extra classes appended to the .fb-spin root.
|
|
154
|
+
*/
|
|
155
|
+
className?: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Toast — a transient notification: icon + title + message + dismiss button.
|
|
159
|
+
* Render inside an aria-live region (e.g. a wrapper with aria-live="polite") for the
|
|
160
|
+
* announcement; the toast itself carries role status (ok) or alert (error).
|
|
161
|
+
*/
|
|
162
|
+
export type ToastProps = {
|
|
163
|
+
/**
|
|
164
|
+
* tone; 'ok' = circle-check/olive + role=status,
|
|
165
|
+
* 'err' = circle-x/clay + role=alert.
|
|
166
|
+
*/
|
|
167
|
+
variant?: "ok" | "err";
|
|
168
|
+
/**
|
|
169
|
+
* the .fb-toast-title line.
|
|
170
|
+
*/
|
|
171
|
+
title: React.ReactNode;
|
|
172
|
+
/**
|
|
173
|
+
* the body message (.fb-toast-msg).
|
|
174
|
+
*/
|
|
175
|
+
children?: React.ReactNode;
|
|
176
|
+
/**
|
|
177
|
+
* override the leading icon component reference.
|
|
178
|
+
*/
|
|
179
|
+
icon?: React.ComponentType;
|
|
180
|
+
/**
|
|
181
|
+
* called when the dismiss button is clicked; when
|
|
182
|
+
* omitted the close button is not rendered.
|
|
183
|
+
*/
|
|
184
|
+
onClose?: () => void;
|
|
185
|
+
/**
|
|
186
|
+
* aria-label for the close button.
|
|
187
|
+
*/
|
|
188
|
+
closeLabel?: string;
|
|
189
|
+
/**
|
|
190
|
+
* extra classes appended to the .fb-toast root.
|
|
191
|
+
*/
|
|
192
|
+
className?: string;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* FeedbackPanel — a centred inline state surface (loading / error / empty), with an
|
|
196
|
+
* icon tile, lowercase title and a message. Loading sets aria-busy + role=status;
|
|
197
|
+
* error sets role=alert; the neutral (empty / resolved) panel has no role.
|
|
198
|
+
*/
|
|
199
|
+
export type FeedbackPanelProps = {
|
|
200
|
+
/**
|
|
201
|
+
* which surface to render; picks
|
|
202
|
+
* the default icon, role and .is-err styling.
|
|
203
|
+
*/
|
|
204
|
+
variant?: "loading" | "error" | "empty";
|
|
205
|
+
/**
|
|
206
|
+
* the .fb-panel-title (defaults per variant).
|
|
207
|
+
*/
|
|
208
|
+
title?: React.ReactNode;
|
|
209
|
+
/**
|
|
210
|
+
* the message body (.fb-panel-msg).
|
|
211
|
+
*/
|
|
212
|
+
children?: React.ReactNode;
|
|
213
|
+
/**
|
|
214
|
+
* override the icon component reference; defaults
|
|
215
|
+
* to loader-circle / circle-alert / search-x.
|
|
216
|
+
*/
|
|
217
|
+
icon?: React.ComponentType;
|
|
218
|
+
/**
|
|
219
|
+
* extra classes appended to the .fb-panel root.
|
|
220
|
+
*/
|
|
221
|
+
className?: string;
|
|
222
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace SpinnerDefault {
|
|
4
|
+
function render(): any;
|
|
5
|
+
}
|
|
6
|
+
export namespace SkeletonLoading {
|
|
7
|
+
export function render_1(): any;
|
|
8
|
+
export { render_1 as render };
|
|
9
|
+
}
|
|
10
|
+
export namespace SkeletonNoAvatar {
|
|
11
|
+
export function render_2(): any;
|
|
12
|
+
export { render_2 as render };
|
|
13
|
+
}
|
|
14
|
+
export namespace ProgressBar {
|
|
15
|
+
export function render_3(): any;
|
|
16
|
+
export { render_3 as render };
|
|
17
|
+
}
|
|
18
|
+
export namespace ProgressEmpty {
|
|
19
|
+
export function render_4(): any;
|
|
20
|
+
export { render_4 as render };
|
|
21
|
+
}
|
|
22
|
+
export namespace ProgressComplete {
|
|
23
|
+
export function render_5(): any;
|
|
24
|
+
export { render_5 as render };
|
|
25
|
+
}
|
|
26
|
+
export namespace ToastOk {
|
|
27
|
+
export function render_6(): any;
|
|
28
|
+
export { render_6 as render };
|
|
29
|
+
}
|
|
30
|
+
export namespace ToastError {
|
|
31
|
+
export function render_7(): any;
|
|
32
|
+
export { render_7 as render };
|
|
33
|
+
}
|
|
34
|
+
export namespace ToastCustomIcon {
|
|
35
|
+
export function render_8(): any;
|
|
36
|
+
export { render_8 as render };
|
|
37
|
+
}
|
|
38
|
+
export namespace PanelEmpty {
|
|
39
|
+
export function render_9(): any;
|
|
40
|
+
export { render_9 as render };
|
|
41
|
+
}
|
|
42
|
+
export namespace PanelLoading {
|
|
43
|
+
export function render_10(): any;
|
|
44
|
+
export { render_10 as render };
|
|
45
|
+
}
|
|
46
|
+
export namespace PanelError {
|
|
47
|
+
export function render_11(): any;
|
|
48
|
+
export { render_11 as render };
|
|
49
|
+
}
|
|
50
|
+
export namespace ProgressNoPct {
|
|
51
|
+
export function render_12(): any;
|
|
52
|
+
export { render_12 as render };
|
|
53
|
+
}
|
|
54
|
+
export namespace SkeletonAvatarOnly {
|
|
55
|
+
export function render_13(): any;
|
|
56
|
+
export { render_13 as render };
|
|
57
|
+
}
|
|
58
|
+
export namespace SpinnerCustomIcon {
|
|
59
|
+
export function render_14(): any;
|
|
60
|
+
export { render_14 as render };
|
|
61
|
+
}
|
|
62
|
+
export namespace ToastNoClose {
|
|
63
|
+
export function render_15(): any;
|
|
64
|
+
export { render_15 as render };
|
|
65
|
+
}
|
|
66
|
+
declare namespace meta {
|
|
67
|
+
export let title: string;
|
|
68
|
+
export { Spinner as component };
|
|
69
|
+
export let tags: string[];
|
|
70
|
+
export let decorators: Function[];
|
|
71
|
+
export namespace argTypes {
|
|
72
|
+
namespace children {
|
|
73
|
+
let control: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export namespace args {
|
|
77
|
+
let children_1: string;
|
|
78
|
+
export { children_1 as children };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
import { Spinner } from './Feedback.jsx';
|