@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,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} CheckboxProps
|
|
3
|
+
* @property {boolean} [checked] controlled checked state (pair with onChange)
|
|
4
|
+
* @property {boolean} [defaultChecked] initial state for uncontrolled use (default false)
|
|
5
|
+
* @property {(checked: boolean, event: import('react').ChangeEvent<HTMLInputElement>) => void} [onChange]
|
|
6
|
+
* @property {boolean} [disabled] native disabled attribute (default false)
|
|
7
|
+
* @property {import('react').ReactNode} [children] label text (rendered as passed, not lowercased)
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* A single checkbox: <label class="check"> wrapping the styled <input type="checkbox" class="check-box">.
|
|
11
|
+
* @param {CheckboxProps & import('react').InputHTMLAttributes<HTMLInputElement>} props
|
|
12
|
+
*/
|
|
13
|
+
export default function Checkbox({ checked, defaultChecked, onChange, disabled, children, ...rest }: CheckboxProps & any): any;
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {Object} RadioProps
|
|
16
|
+
* @property {string} name shared group name; radios must come in groups of >=2 so any one
|
|
17
|
+
* can be deselected by picking another. for a lone binary choice
|
|
18
|
+
* use Checkbox or Switch, never a single standalone Radio.
|
|
19
|
+
* @property {string} [value] the value submitted / matched when this radio is selected
|
|
20
|
+
* @property {boolean} [checked] controlled checked state (pair with onChange)
|
|
21
|
+
* @property {boolean} [defaultChecked] initial state for uncontrolled use (default false)
|
|
22
|
+
* @property {(event: import('react').ChangeEvent<HTMLInputElement>) => void} [onChange]
|
|
23
|
+
* @property {boolean} [disabled] native disabled attribute (default false)
|
|
24
|
+
* @property {import('react').ReactNode} [children] label text (rendered as passed, not lowercased)
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* A single radio: <label class="is-radio"> wrapping the styled <input type="radio" class="is-radio-dot">.
|
|
28
|
+
* Always render via RadioGroup (or at least two sibling radios sharing `name`) so a selection can be
|
|
29
|
+
* changed; a lone radio cannot be deselected, which is an accessibility anti-pattern. For a single
|
|
30
|
+
* binary choice use Checkbox or Switch instead.
|
|
31
|
+
* @param {RadioProps & import('react').InputHTMLAttributes<HTMLInputElement>} props
|
|
32
|
+
*/
|
|
33
|
+
export function Radio({ name, value, checked, defaultChecked, onChange, disabled, children, ...rest }: RadioProps & any): any;
|
|
34
|
+
/**
|
|
35
|
+
* @typedef {Object} RadioOption
|
|
36
|
+
* @property {string} value
|
|
37
|
+
* @property {import('react').ReactNode} label
|
|
38
|
+
* @property {boolean} [disabled]
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {Object} RadioGroupProps
|
|
42
|
+
* @property {string} name shared name for every radio in the group (required for single-select)
|
|
43
|
+
* @property {string} [value] controlled selected value (pair with onChange)
|
|
44
|
+
* @property {string} [defaultValue] initial selected value for uncontrolled use
|
|
45
|
+
* @property {(value: string, event: import('react').ChangeEvent<HTMLInputElement>) => void} [onChange]
|
|
46
|
+
* @property {RadioOption[]} options the choices to render
|
|
47
|
+
* @property {string} ariaLabel accessible name for the role=radiogroup container; required for
|
|
48
|
+
* an accessible group (a radiogroup with no name is an a11y failure)
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* A group of radios: <div class="is-radios" role="radiogroup"> of <label class="is-radio"> rows.
|
|
52
|
+
* Only one option is selectable because every input shares `name`.
|
|
53
|
+
* @param {RadioGroupProps & import('react').HTMLAttributes<HTMLDivElement>} props
|
|
54
|
+
*/
|
|
55
|
+
export function RadioGroup({ name, value, defaultValue, onChange, options, ariaLabel, ...rest }: RadioGroupProps & any): any;
|
|
56
|
+
export type CheckboxProps = {
|
|
57
|
+
/**
|
|
58
|
+
* controlled checked state (pair with onChange)
|
|
59
|
+
*/
|
|
60
|
+
checked?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* initial state for uncontrolled use (default false)
|
|
63
|
+
*/
|
|
64
|
+
defaultChecked?: boolean;
|
|
65
|
+
onChange?: (checked: boolean, event: any) => void;
|
|
66
|
+
/**
|
|
67
|
+
* native disabled attribute (default false)
|
|
68
|
+
*/
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* label text (rendered as passed, not lowercased)
|
|
72
|
+
*/
|
|
73
|
+
children?: any;
|
|
74
|
+
};
|
|
75
|
+
export type RadioProps = {
|
|
76
|
+
/**
|
|
77
|
+
* shared group name; radios must come in groups of >=2 so any one
|
|
78
|
+
* can be deselected by picking another. for a lone binary choice
|
|
79
|
+
* use Checkbox or Switch, never a single standalone Radio.
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* the value submitted / matched when this radio is selected
|
|
84
|
+
*/
|
|
85
|
+
value?: string;
|
|
86
|
+
/**
|
|
87
|
+
* controlled checked state (pair with onChange)
|
|
88
|
+
*/
|
|
89
|
+
checked?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* initial state for uncontrolled use (default false)
|
|
92
|
+
*/
|
|
93
|
+
defaultChecked?: boolean;
|
|
94
|
+
onChange?: (event: any) => void;
|
|
95
|
+
/**
|
|
96
|
+
* native disabled attribute (default false)
|
|
97
|
+
*/
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* label text (rendered as passed, not lowercased)
|
|
101
|
+
*/
|
|
102
|
+
children?: any;
|
|
103
|
+
};
|
|
104
|
+
export type RadioOption = {
|
|
105
|
+
value: string;
|
|
106
|
+
label: any;
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
};
|
|
109
|
+
export type RadioGroupProps = {
|
|
110
|
+
/**
|
|
111
|
+
* shared name for every radio in the group (required for single-select)
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
/**
|
|
115
|
+
* controlled selected value (pair with onChange)
|
|
116
|
+
*/
|
|
117
|
+
value?: string;
|
|
118
|
+
/**
|
|
119
|
+
* initial selected value for uncontrolled use
|
|
120
|
+
*/
|
|
121
|
+
defaultValue?: string;
|
|
122
|
+
onChange?: (value: string, event: any) => void;
|
|
123
|
+
/**
|
|
124
|
+
* the choices to render
|
|
125
|
+
*/
|
|
126
|
+
options: RadioOption[];
|
|
127
|
+
/**
|
|
128
|
+
* accessible name for the role=radiogroup container; required for
|
|
129
|
+
* an accessible group (a radiogroup with no name is an a11y failure)
|
|
130
|
+
*/
|
|
131
|
+
ariaLabel: string;
|
|
132
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace Checked {
|
|
4
|
+
namespace args {
|
|
5
|
+
let defaultChecked: boolean;
|
|
6
|
+
let children: string;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export namespace Disabled {
|
|
10
|
+
export namespace args_1 {
|
|
11
|
+
export let disabled: boolean;
|
|
12
|
+
let defaultChecked_1: boolean;
|
|
13
|
+
export { defaultChecked_1 as defaultChecked };
|
|
14
|
+
let children_1: string;
|
|
15
|
+
export { children_1 as children };
|
|
16
|
+
}
|
|
17
|
+
export { args_1 as args };
|
|
18
|
+
}
|
|
19
|
+
export namespace Group {
|
|
20
|
+
function render(): any;
|
|
21
|
+
}
|
|
22
|
+
export namespace LicenseRadios {
|
|
23
|
+
export function render_1(): any;
|
|
24
|
+
export { render_1 as render };
|
|
25
|
+
}
|
|
26
|
+
export namespace RadioGroupProviders {
|
|
27
|
+
export function render_2(): any;
|
|
28
|
+
export { render_2 as render };
|
|
29
|
+
}
|
|
30
|
+
export namespace RadioGroupControlled {
|
|
31
|
+
export function render_3(): any;
|
|
32
|
+
export { render_3 as render };
|
|
33
|
+
}
|
|
34
|
+
export namespace ClicksToCheck {
|
|
35
|
+
export namespace args_2 {
|
|
36
|
+
let children_2: string;
|
|
37
|
+
export { children_2 as children };
|
|
38
|
+
}
|
|
39
|
+
export { args_2 as args };
|
|
40
|
+
export function play({ canvasElement }: {
|
|
41
|
+
canvasElement: any;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
declare namespace meta {
|
|
45
|
+
export let title: string;
|
|
46
|
+
export { Checkbox as component };
|
|
47
|
+
export let tags: string[];
|
|
48
|
+
export let decorators: Function[];
|
|
49
|
+
export namespace argTypes {
|
|
50
|
+
export namespace defaultChecked_2 {
|
|
51
|
+
let control: string;
|
|
52
|
+
}
|
|
53
|
+
export { defaultChecked_2 as defaultChecked };
|
|
54
|
+
export namespace disabled_1 {
|
|
55
|
+
let control_1: string;
|
|
56
|
+
export { control_1 as control };
|
|
57
|
+
}
|
|
58
|
+
export { disabled_1 as disabled };
|
|
59
|
+
export namespace children_3 {
|
|
60
|
+
let control_2: string;
|
|
61
|
+
export { control_2 as control };
|
|
62
|
+
}
|
|
63
|
+
export { children_3 as children };
|
|
64
|
+
}
|
|
65
|
+
export namespace args_3 {
|
|
66
|
+
let children_4: string;
|
|
67
|
+
export { children_4 as children };
|
|
68
|
+
let defaultChecked_3: boolean;
|
|
69
|
+
export { defaultChecked_3 as defaultChecked };
|
|
70
|
+
let disabled_2: boolean;
|
|
71
|
+
export { disabled_2 as disabled };
|
|
72
|
+
}
|
|
73
|
+
export { args_3 as args };
|
|
74
|
+
}
|
|
75
|
+
import Checkbox from './Checkbox.jsx';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {'ok'|'warn'|'err'} ChipTone
|
|
3
|
+
* @typedef {'sm'} ChipSize
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* a static chip: an icon names the thing, a short label confirms it, color reinforces. wraps
|
|
7
|
+
* `<span class="chip">` with the parametric tone / size modifiers and an optional real x-button.
|
|
8
|
+
* @param {object} props
|
|
9
|
+
* @param {ChipTone} [props.tone] - semantic tone -> .chip-ok / .chip-warn / .chip-err (default: none)
|
|
10
|
+
* @param {ChipSize} [props.size] - 'sm' -> .chip-sm dense box (default: none)
|
|
11
|
+
* @param {string} [props.brand] - a provider/company name (claude, gemini, openai, cursor, opencode, or an alias).
|
|
12
|
+
* When the chip names a company, pass this instead of `icon`: it leads with the real brand mark, never a generic glyph. (ignored when not resolvable)
|
|
13
|
+
* @param {React.ElementType} [props.icon] - leading lucide icon component ref (e.g. icon={Hash}) (ignored when `brand` is set)
|
|
14
|
+
* @param {boolean} [props.chrome=false] - mark this as a ui-chrome chip -> lowercases the label. Leave off for user content (ids, names, data values).
|
|
15
|
+
* @param {boolean} [props.removable=false] - render a real .chipx-x button with an X icon
|
|
16
|
+
* @param {() => void} [props.onRemove] - called when the x-button is clicked
|
|
17
|
+
* @param {string} [props.removeLabel] - aria-label for the x-button (default: `remove ${children}`; effectively required when children is not a plain string)
|
|
18
|
+
* @param {string} [props.className] - extra classes appended after the chip classes
|
|
19
|
+
* @param {React.ReactNode} props.children - the chip label / content (not force-lowercased unless chrome)
|
|
20
|
+
*/
|
|
21
|
+
export default function Chip({ tone, size, brand, icon: Icon, chrome, removable, onRemove, removeLabel, className, children, ...rest }: {
|
|
22
|
+
tone?: ChipTone;
|
|
23
|
+
size?: ChipSize;
|
|
24
|
+
brand?: string;
|
|
25
|
+
icon?: React.ElementType;
|
|
26
|
+
chrome?: boolean;
|
|
27
|
+
removable?: boolean;
|
|
28
|
+
onRemove?: () => void;
|
|
29
|
+
removeLabel?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}): any;
|
|
33
|
+
/**
|
|
34
|
+
* a filter / toggle chip: a real `<button class="chip chip-toggle" aria-pressed>`. selected shows a
|
|
35
|
+
* leading check (.chipx-tick, revealed by css) and an amber fill; the css carries the rest. supports
|
|
36
|
+
* controlled (pressed + onChange) and uncontrolled (defaultPressed) use.
|
|
37
|
+
* @param {object} props
|
|
38
|
+
* @param {boolean} [props.pressed] - controlled pressed state
|
|
39
|
+
* @param {boolean} [props.defaultPressed=false] - initial pressed state when uncontrolled
|
|
40
|
+
* @param {(next: boolean) => void} [props.onChange] - called with the next pressed state on click
|
|
41
|
+
* @param {string} [props.brand] - a provider/company name; leads with the real brand mark when NOT pressed (ignored when `icon` is wanted instead)
|
|
42
|
+
* @param {React.ElementType} [props.icon] - leading icon shown when NOT pressed (e.g. icon={Filter}) (ignored when `brand` is set)
|
|
43
|
+
* @param {string} [props.className] - extra classes appended after the chip classes
|
|
44
|
+
* @param {React.ReactNode} props.children - the toggle label (not force-lowercased)
|
|
45
|
+
*/
|
|
46
|
+
export function FilterChip({ pressed, defaultPressed, onChange, brand, icon: Icon, className, children, ...rest }: {
|
|
47
|
+
pressed?: boolean;
|
|
48
|
+
defaultPressed?: boolean;
|
|
49
|
+
onChange?: (next: boolean) => void;
|
|
50
|
+
brand?: string;
|
|
51
|
+
icon?: React.ElementType;
|
|
52
|
+
className?: string;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}): any;
|
|
55
|
+
/**
|
|
56
|
+
* a status dot ALWAYS paired with a label, so status never rides on color alone. renders the small
|
|
57
|
+
* filled .chipx-dot square (tinted via the --c color var) followed by the required label text.
|
|
58
|
+
* by default it ships inside a `.chip` chassis to match the specimen; pass bare to drop the wrapper.
|
|
59
|
+
* @param {object} props
|
|
60
|
+
* @param {string} props.label - the status word (required; names the state) — not force-lowercased
|
|
61
|
+
* @param {string} [props.color] - css color for the dot, written to style="--c:..." (default: token fallback)
|
|
62
|
+
* @param {boolean} [props.bare=false] - omit the surrounding .chip wrapper, render dot + label only
|
|
63
|
+
* @param {string} [props.className] - extra classes appended after the chip class (ignored when bare)
|
|
64
|
+
*/
|
|
65
|
+
export function StatusDot({ label, color, bare, className, ...rest }: {
|
|
66
|
+
label: string;
|
|
67
|
+
color?: string;
|
|
68
|
+
bare?: boolean;
|
|
69
|
+
className?: string;
|
|
70
|
+
}): any;
|
|
71
|
+
/**
|
|
72
|
+
* a numeric notification count: a trailing pill of tabular digits (.chipx-count). neutral by default;
|
|
73
|
+
* .unread flips it to the scarce amber. tnum keeps digits tabular.
|
|
74
|
+
* @param {object} props
|
|
75
|
+
* @param {number|string} props.count - the value to display
|
|
76
|
+
* @param {boolean} [props.unread=false] - amber unread treatment -> .unread
|
|
77
|
+
* @param {string} [props.className] - extra classes appended after the count classes
|
|
78
|
+
*/
|
|
79
|
+
export function CountBadge({ count, unread, className, ...rest }: {
|
|
80
|
+
count: number | string;
|
|
81
|
+
unread?: boolean;
|
|
82
|
+
className?: string;
|
|
83
|
+
}): any;
|
|
84
|
+
export type ChipTone = "ok" | "warn" | "err";
|
|
85
|
+
export type ChipSize = "sm";
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace WithIcon {
|
|
4
|
+
namespace args {
|
|
5
|
+
export let brand: any;
|
|
6
|
+
export { Hash as icon };
|
|
7
|
+
export let children: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export namespace ToneOk {
|
|
11
|
+
export namespace args_1 {
|
|
12
|
+
let brand_1: any;
|
|
13
|
+
export { brand_1 as brand };
|
|
14
|
+
export let tone: string;
|
|
15
|
+
export { ShieldCheck as icon };
|
|
16
|
+
export let chrome: boolean;
|
|
17
|
+
let children_1: string;
|
|
18
|
+
export { children_1 as children };
|
|
19
|
+
}
|
|
20
|
+
export { args_1 as args };
|
|
21
|
+
}
|
|
22
|
+
export namespace ToneWarn {
|
|
23
|
+
export namespace args_2 {
|
|
24
|
+
let brand_2: any;
|
|
25
|
+
export { brand_2 as brand };
|
|
26
|
+
let tone_1: string;
|
|
27
|
+
export { tone_1 as tone };
|
|
28
|
+
let chrome_1: boolean;
|
|
29
|
+
export { chrome_1 as chrome };
|
|
30
|
+
let children_2: string;
|
|
31
|
+
export { children_2 as children };
|
|
32
|
+
}
|
|
33
|
+
export { args_2 as args };
|
|
34
|
+
}
|
|
35
|
+
export namespace ToneErr {
|
|
36
|
+
export namespace args_3 {
|
|
37
|
+
let brand_3: any;
|
|
38
|
+
export { brand_3 as brand };
|
|
39
|
+
let tone_2: string;
|
|
40
|
+
export { tone_2 as tone };
|
|
41
|
+
let chrome_2: boolean;
|
|
42
|
+
export { chrome_2 as chrome };
|
|
43
|
+
let children_3: string;
|
|
44
|
+
export { children_3 as children };
|
|
45
|
+
}
|
|
46
|
+
export { args_3 as args };
|
|
47
|
+
}
|
|
48
|
+
export namespace Small {
|
|
49
|
+
export namespace args_4 {
|
|
50
|
+
export let size: string;
|
|
51
|
+
let brand_4: string;
|
|
52
|
+
export { brand_4 as brand };
|
|
53
|
+
let children_4: string;
|
|
54
|
+
export { children_4 as children };
|
|
55
|
+
}
|
|
56
|
+
export { args_4 as args };
|
|
57
|
+
}
|
|
58
|
+
export namespace SmallTones {
|
|
59
|
+
function render(): any;
|
|
60
|
+
}
|
|
61
|
+
export namespace RemovableSmall {
|
|
62
|
+
export namespace args_5 {
|
|
63
|
+
let brand_5: any;
|
|
64
|
+
export { brand_5 as brand };
|
|
65
|
+
let size_1: string;
|
|
66
|
+
export { size_1 as size };
|
|
67
|
+
export let removable: boolean;
|
|
68
|
+
export { Tag as icon };
|
|
69
|
+
let children_5: string;
|
|
70
|
+
export { children_5 as children };
|
|
71
|
+
export let removeLabel: string;
|
|
72
|
+
export let onRemove: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
73
|
+
}
|
|
74
|
+
export { args_5 as args };
|
|
75
|
+
}
|
|
76
|
+
export namespace Tones {
|
|
77
|
+
export function render_1(): any;
|
|
78
|
+
export { render_1 as render };
|
|
79
|
+
}
|
|
80
|
+
export namespace Removable {
|
|
81
|
+
export namespace args_6 {
|
|
82
|
+
let brand_6: any;
|
|
83
|
+
export { brand_6 as brand };
|
|
84
|
+
let removable_1: boolean;
|
|
85
|
+
export { removable_1 as removable };
|
|
86
|
+
export { Tag as icon };
|
|
87
|
+
let children_6: string;
|
|
88
|
+
export { children_6 as children };
|
|
89
|
+
let onRemove_1: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
90
|
+
export { onRemove_1 as onRemove };
|
|
91
|
+
}
|
|
92
|
+
export { args_6 as args };
|
|
93
|
+
export function play({ args, canvasElement }: {
|
|
94
|
+
args: any;
|
|
95
|
+
canvasElement: any;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
export namespace Filter_ {
|
|
99
|
+
export let name: string;
|
|
100
|
+
export function render_2(): any;
|
|
101
|
+
export { render_2 as render };
|
|
102
|
+
export function play_1({ canvasElement }: {
|
|
103
|
+
canvasElement: any;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
export { play_1 as play };
|
|
106
|
+
}
|
|
107
|
+
export namespace FilterControlled {
|
|
108
|
+
let name_1: string;
|
|
109
|
+
export { name_1 as name };
|
|
110
|
+
export function render_3(): any;
|
|
111
|
+
export { render_3 as render };
|
|
112
|
+
}
|
|
113
|
+
export namespace Status {
|
|
114
|
+
let name_2: string;
|
|
115
|
+
export { name_2 as name };
|
|
116
|
+
export function render_4(): any;
|
|
117
|
+
export { render_4 as render };
|
|
118
|
+
}
|
|
119
|
+
export namespace StatusDotBare {
|
|
120
|
+
let name_3: string;
|
|
121
|
+
export { name_3 as name };
|
|
122
|
+
export function render_5(): any;
|
|
123
|
+
export { render_5 as render };
|
|
124
|
+
}
|
|
125
|
+
export namespace Count {
|
|
126
|
+
let name_4: string;
|
|
127
|
+
export { name_4 as name };
|
|
128
|
+
export function render_6(): any;
|
|
129
|
+
export { render_6 as render };
|
|
130
|
+
}
|
|
131
|
+
declare namespace meta {
|
|
132
|
+
export let title: string;
|
|
133
|
+
export { Chip as component };
|
|
134
|
+
export let tags: string[];
|
|
135
|
+
export namespace argTypes {
|
|
136
|
+
export namespace tone_3 {
|
|
137
|
+
let control: string;
|
|
138
|
+
let options: string[];
|
|
139
|
+
}
|
|
140
|
+
export { tone_3 as tone };
|
|
141
|
+
export namespace size_2 {
|
|
142
|
+
let control_1: string;
|
|
143
|
+
export { control_1 as control };
|
|
144
|
+
let options_1: string[];
|
|
145
|
+
export { options_1 as options };
|
|
146
|
+
}
|
|
147
|
+
export { size_2 as size };
|
|
148
|
+
export namespace brand_7 {
|
|
149
|
+
let control_2: string;
|
|
150
|
+
export { control_2 as control };
|
|
151
|
+
let options_2: string[];
|
|
152
|
+
export { options_2 as options };
|
|
153
|
+
}
|
|
154
|
+
export { brand_7 as brand };
|
|
155
|
+
export namespace chrome_3 {
|
|
156
|
+
let control_3: string;
|
|
157
|
+
export { control_3 as control };
|
|
158
|
+
}
|
|
159
|
+
export { chrome_3 as chrome };
|
|
160
|
+
export namespace removable_2 {
|
|
161
|
+
let control_4: string;
|
|
162
|
+
export { control_4 as control };
|
|
163
|
+
}
|
|
164
|
+
export { removable_2 as removable };
|
|
165
|
+
export namespace children_7 {
|
|
166
|
+
let control_5: string;
|
|
167
|
+
export { control_5 as control };
|
|
168
|
+
}
|
|
169
|
+
export { children_7 as children };
|
|
170
|
+
}
|
|
171
|
+
export namespace args_7 {
|
|
172
|
+
let children_8: string;
|
|
173
|
+
export { children_8 as children };
|
|
174
|
+
let brand_8: string;
|
|
175
|
+
export { brand_8 as brand };
|
|
176
|
+
let tone_4: any;
|
|
177
|
+
export { tone_4 as tone };
|
|
178
|
+
let size_3: any;
|
|
179
|
+
export { size_3 as size };
|
|
180
|
+
let chrome_4: boolean;
|
|
181
|
+
export { chrome_4 as chrome };
|
|
182
|
+
let removable_3: boolean;
|
|
183
|
+
export { removable_3 as removable };
|
|
184
|
+
}
|
|
185
|
+
export { args_7 as args };
|
|
186
|
+
}
|
|
187
|
+
import { Hash } from 'lucide-react';
|
|
188
|
+
import { ShieldCheck } from 'lucide-react';
|
|
189
|
+
import { Tag } from 'lucide-react';
|
|
190
|
+
import Chip from './Chip.jsx';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommandBlock — a square `$ command` block: a mono command line with a leading dim `$`, and a copy
|
|
3
|
+
* button that flips to an olive check + the word "copied" for ~1.5s.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {string} props.command - the literal shell command (case preserved — never lowercased).
|
|
7
|
+
* @param {string} [props.label] - an accessible name for the copy button; defaults to the command.
|
|
8
|
+
* @param {string} [props.className] - extra classes appended to the root.
|
|
9
|
+
*/
|
|
10
|
+
export function CommandBlock({ command, label, className, ...rest }: {
|
|
11
|
+
command: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}): any;
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {object} CliStep
|
|
17
|
+
* @property {string} title - the step heading (e.g. "install"). Chrome — rendered lowercase by CSS.
|
|
18
|
+
* @property {string} [body] - optional prose explaining the step (body font, case preserved).
|
|
19
|
+
* @property {string} [command] - optional shell command for the step, rendered as a CommandBlock.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* CliSteps — a numbered step list: each step is a square amber-tinted number marker + a title + an
|
|
23
|
+
* optional body + an optional CommandBlock, with a connector line running between the markers.
|
|
24
|
+
*
|
|
25
|
+
* @param {object} props
|
|
26
|
+
* @param {CliStep[]} props.steps - the steps, in order; numbered from 1.
|
|
27
|
+
* @param {string} [props.label='getting started'] - accessible name for the list (lowercase chrome).
|
|
28
|
+
* @param {string} [props.className] - extra classes appended to the root.
|
|
29
|
+
*/
|
|
30
|
+
export function CliSteps({ steps, label, className, ...rest }: {
|
|
31
|
+
steps: CliStep[];
|
|
32
|
+
label?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
}): any;
|
|
35
|
+
/**
|
|
36
|
+
* GettingStarted — a dismissible card wrapping <CliSteps>: a header (title + close button) over the
|
|
37
|
+
* step list. Dismissing persists "dismissed" to localStorage under `storageKey`, so the card stays
|
|
38
|
+
* gone across reloads; when no key is given it dismisses for the session only.
|
|
39
|
+
*
|
|
40
|
+
* @param {object} props
|
|
41
|
+
* @param {string} [props.title='getting started'] - the card heading (lowercase chrome).
|
|
42
|
+
* @param {CliStep[]} props.steps - the onboarding steps, passed through to CliSteps.
|
|
43
|
+
* @param {string} [props.storageKey] - localStorage key the dismissed flag persists under.
|
|
44
|
+
* @param {() => void} [props.onDismiss] - called after the card is dismissed.
|
|
45
|
+
* @param {string} [props.className] - extra classes appended to the root.
|
|
46
|
+
*/
|
|
47
|
+
export function GettingStarted({ title, steps, storageKey, onDismiss, className, ...rest }: {
|
|
48
|
+
title?: string;
|
|
49
|
+
steps: CliStep[];
|
|
50
|
+
storageKey?: string;
|
|
51
|
+
onDismiss?: () => void;
|
|
52
|
+
className?: string;
|
|
53
|
+
}): any;
|
|
54
|
+
export default CliSteps;
|
|
55
|
+
export type CliStep = {
|
|
56
|
+
/**
|
|
57
|
+
* - the step heading (e.g. "install"). Chrome — rendered lowercase by CSS.
|
|
58
|
+
*/
|
|
59
|
+
title: string;
|
|
60
|
+
/**
|
|
61
|
+
* - optional prose explaining the step (body font, case preserved).
|
|
62
|
+
*/
|
|
63
|
+
body?: string;
|
|
64
|
+
/**
|
|
65
|
+
* - optional shell command for the step, rendered as a CommandBlock.
|
|
66
|
+
*/
|
|
67
|
+
command?: string;
|
|
68
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Steps {
|
|
3
|
+
function render(): any;
|
|
4
|
+
}
|
|
5
|
+
export namespace Command {
|
|
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 GettingStartedCard {
|
|
13
|
+
export function render_2(): any;
|
|
14
|
+
export { render_2 as render };
|
|
15
|
+
}
|
|
16
|
+
declare namespace meta {
|
|
17
|
+
export let title: string;
|
|
18
|
+
export { CliSteps as component };
|
|
19
|
+
export let decorators: Function[];
|
|
20
|
+
export namespace parameters {
|
|
21
|
+
let layout: string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
import { CliSteps } from './CliOnboard.jsx';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Playground {
|
|
3
|
+
namespace parameters {
|
|
4
|
+
let layout: string;
|
|
5
|
+
}
|
|
6
|
+
function render(args: any): any;
|
|
7
|
+
}
|
|
8
|
+
export namespace Default {
|
|
9
|
+
export namespace parameters_1 {
|
|
10
|
+
let layout_1: string;
|
|
11
|
+
export { layout_1 as layout };
|
|
12
|
+
}
|
|
13
|
+
export { parameters_1 as parameters };
|
|
14
|
+
export function render_1(args: any): any;
|
|
15
|
+
export { render_1 as render };
|
|
16
|
+
export function play({ args, canvasElement }: {
|
|
17
|
+
args: any;
|
|
18
|
+
canvasElement: any;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export namespace Filtered {
|
|
22
|
+
export namespace parameters_2 {
|
|
23
|
+
let layout_2: string;
|
|
24
|
+
export { layout_2 as layout };
|
|
25
|
+
}
|
|
26
|
+
export { parameters_2 as parameters };
|
|
27
|
+
export function render_2(args: any): any;
|
|
28
|
+
export { render_2 as render };
|
|
29
|
+
export function play_1({ canvasElement }: {
|
|
30
|
+
canvasElement: any;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
export { play_1 as play };
|
|
33
|
+
}
|
|
34
|
+
export namespace Empty {
|
|
35
|
+
export namespace parameters_3 {
|
|
36
|
+
let layout_3: string;
|
|
37
|
+
export { layout_3 as layout };
|
|
38
|
+
}
|
|
39
|
+
export { parameters_3 as parameters };
|
|
40
|
+
export function render_3(args: any): any;
|
|
41
|
+
export { render_3 as render };
|
|
42
|
+
export function play_2({ canvasElement }: {
|
|
43
|
+
canvasElement: any;
|
|
44
|
+
}): Promise<void>;
|
|
45
|
+
export { play_2 as play };
|
|
46
|
+
}
|
|
47
|
+
export namespace EscapeCloses {
|
|
48
|
+
export namespace parameters_4 {
|
|
49
|
+
let layout_4: string;
|
|
50
|
+
export { layout_4 as layout };
|
|
51
|
+
}
|
|
52
|
+
export { parameters_4 as parameters };
|
|
53
|
+
export function render_4(args: any): any;
|
|
54
|
+
export { render_4 as render };
|
|
55
|
+
export function play_3({ args, canvasElement }: {
|
|
56
|
+
args: any;
|
|
57
|
+
canvasElement: any;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
export { play_3 as play };
|
|
60
|
+
}
|
|
61
|
+
declare namespace meta {
|
|
62
|
+
export let title: string;
|
|
63
|
+
export { CommandPalette as component };
|
|
64
|
+
export let tags: string[];
|
|
65
|
+
export let decorators: Function[];
|
|
66
|
+
export namespace argTypes {
|
|
67
|
+
namespace open {
|
|
68
|
+
let control: string;
|
|
69
|
+
}
|
|
70
|
+
namespace sections {
|
|
71
|
+
let control_1: string;
|
|
72
|
+
export { control_1 as control };
|
|
73
|
+
}
|
|
74
|
+
namespace onClose {
|
|
75
|
+
let action: string;
|
|
76
|
+
}
|
|
77
|
+
namespace onTheme {
|
|
78
|
+
let action_1: string;
|
|
79
|
+
export { action_1 as action };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export namespace args {
|
|
83
|
+
export { SECTIONS as sections };
|
|
84
|
+
let onClose_1: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
85
|
+
export { onClose_1 as onClose };
|
|
86
|
+
let onTheme_1: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
87
|
+
export { onTheme_1 as onTheme };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
import CommandPalette from './CommandPalette.jsx';
|
|
91
|
+
declare const SECTIONS: {
|
|
92
|
+
id: string;
|
|
93
|
+
label: string;
|
|
94
|
+
}[];
|