@veltrixsecops/app-sdk 3.1.0 → 3.5.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/README.md +1 -1
- package/dist/byol/index.cjs +3802 -0
- package/dist/byol/index.cjs.map +1 -0
- package/dist/byol/index.d.cts +578 -0
- package/dist/byol/index.d.ts +578 -0
- package/dist/byol/index.js +2587 -0
- package/dist/byol/index.js.map +1 -0
- package/dist/chunk-3WK4EVQ3.js +842 -0
- package/dist/chunk-3WK4EVQ3.js.map +1 -0
- package/dist/{chunk-6KUTYJW5.js → chunk-HIL6RIDG.js} +107 -3
- package/dist/chunk-HIL6RIDG.js.map +1 -0
- package/dist/{chunk-VWFTOFTI.js → chunk-Y6XBNZGR.js} +8 -2
- package/dist/chunk-Y6XBNZGR.js.map +1 -0
- package/dist/client/index.cjs +112 -2
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +127 -6
- package/dist/client/index.d.ts +127 -6
- package/dist/client/index.js +13 -1
- package/dist/connections/index.cjs +1787 -0
- package/dist/connections/index.cjs.map +1 -0
- package/dist/connections/index.d.cts +78 -0
- package/dist/connections/index.d.ts +78 -0
- package/dist/connections/index.js +754 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/hooks/index.cjs +7 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +24 -3
- package/dist/hooks/index.d.ts +24 -3
- package/dist/hooks/index.js +7 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/opentofu/index.cjs +138 -0
- package/dist/opentofu/index.cjs.map +1 -0
- package/dist/opentofu/index.d.cts +131 -0
- package/dist/opentofu/index.d.ts +131 -0
- package/dist/opentofu/index.js +109 -0
- package/dist/opentofu/index.js.map +1 -0
- package/dist/pipeline/index.cjs +7 -0
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +9 -2
- package/dist/pipeline/index.d.ts +9 -2
- package/dist/pipeline/index.js +3 -1
- package/dist/pipeline-beeT8dje.d.cts +408 -0
- package/dist/pipeline-beeT8dje.d.ts +408 -0
- package/dist/ui/index.cjs +248 -0
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +238 -1
- package/dist/ui/index.d.ts +238 -1
- package/dist/ui/index.js +39 -573
- package/dist/ui/index.js.map +1 -1
- package/dist/{use-app-context-SEU1tyZd.d.cts → use-app-context-Byv_fam0.d.cts} +241 -4
- package/dist/{use-app-context-SEU1tyZd.d.ts → use-app-context-Byv_fam0.d.ts} +241 -4
- package/opentofu/README.md +114 -0
- package/opentofu/modules/aws/main.tf +1008 -0
- package/opentofu/modules/aws/outputs.tf +90 -0
- package/opentofu/modules/aws/variables.tf +437 -0
- package/opentofu/modules/aws/versions.tf +23 -0
- package/opentofu/modules/azure/main.tf +920 -0
- package/opentofu/modules/azure/outputs.tf +72 -0
- package/opentofu/modules/azure/variables.tf +498 -0
- package/opentofu/modules/azure/versions.tf +27 -0
- package/opentofu/modules/gcp/main.tf +645 -0
- package/opentofu/modules/gcp/outputs.tf +73 -0
- package/opentofu/modules/gcp/variables.tf +428 -0
- package/opentofu/modules/gcp/versions.tf +27 -0
- package/opentofu/modules/hetzner/main.tf +432 -0
- package/opentofu/modules/hetzner/outputs.tf +72 -0
- package/opentofu/modules/hetzner/variables.tf +423 -0
- package/opentofu/modules/hetzner/versions.tf +26 -0
- package/package.json +33 -1
- package/dist/chunk-6KUTYJW5.js.map +0 -1
- package/dist/chunk-VWFTOFTI.js.map +0 -1
- package/dist/pipeline-A-gSsPRR.d.cts +0 -189
- package/dist/pipeline-A-gSsPRR.d.ts +0 -189
package/dist/ui/index.d.cts
CHANGED
|
@@ -127,6 +127,135 @@ interface SelectProps {
|
|
|
127
127
|
* <Select label="Environment" value={env} onChange={setEnv} options={[{ value: 'prod', label: 'Production' }]} />
|
|
128
128
|
*/
|
|
129
129
|
declare const Select: React.FC<SelectProps>;
|
|
130
|
+
type SearchBoxSize = 'sm' | 'md' | 'lg';
|
|
131
|
+
interface SearchBoxProps {
|
|
132
|
+
/** Controlled search text. */
|
|
133
|
+
value: string;
|
|
134
|
+
/** Called with the new text — debounced by `debounceMs` when set. */
|
|
135
|
+
onChange: (value: string) => void;
|
|
136
|
+
placeholder?: string;
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
size?: SearchBoxSize;
|
|
139
|
+
/** Debounces `onChange` by this many ms; omit (or `0`) to call on every keystroke. */
|
|
140
|
+
debounceMs?: number;
|
|
141
|
+
className?: string;
|
|
142
|
+
'aria-label'?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* SearchBox — delegates to the platform's real SearchBox at render time (leading search icon,
|
|
146
|
+
* a clear button once there's text, optional debounce). The fallback is a bare
|
|
147
|
+
* `<input type="search">` wired straight to `value`/`onChange` — no icon, no debounce, no
|
|
148
|
+
* clear button — but functionally sufficient for typing and clearing.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* <SearchBox value={search} onChange={setSearch} placeholder="Search apps…" debounceMs={250} />
|
|
152
|
+
*/
|
|
153
|
+
declare const SearchBox: React.FC<SearchBoxProps>;
|
|
154
|
+
interface PaginationProps {
|
|
155
|
+
/** 1-based current page. */
|
|
156
|
+
page: number;
|
|
157
|
+
pageSize: number;
|
|
158
|
+
totalItems: number;
|
|
159
|
+
onPageChange: (page: number) => void;
|
|
160
|
+
/** Renders a page-size selector when provided together with `pageSizeOptions`. */
|
|
161
|
+
onPageSizeChange?: (size: number) => void;
|
|
162
|
+
pageSizeOptions?: number[];
|
|
163
|
+
disabled?: boolean;
|
|
164
|
+
className?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Pagination — delegates to the platform's real Pagination at render time: a "Showing X–Y of
|
|
168
|
+
* N" summary, numbered pages with ellipsis for large ranges, an optional page-size Select, and
|
|
169
|
+
* `aria-current="page"` on the active page — visually consistent with DataTable's built-in
|
|
170
|
+
* pagination footer. The fallback is a plain Prev/Next pair with "page X of Y" text.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* <Pagination page={page} pageSize={20} totalItems={total} onPageChange={setPage} />
|
|
174
|
+
*/
|
|
175
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
176
|
+
interface FilterOption {
|
|
177
|
+
value: string;
|
|
178
|
+
label: string;
|
|
179
|
+
}
|
|
180
|
+
interface FilterDefinition {
|
|
181
|
+
/** Stable identifier; also the React key for this filter's dropdown. */
|
|
182
|
+
key: string;
|
|
183
|
+
/** Shown as the dropdown's placeholder/aria-label, and as its entry in the "Add filter" menu. */
|
|
184
|
+
label: string;
|
|
185
|
+
options: FilterOption[];
|
|
186
|
+
/** `null` (not `''`) represents "no selection" — the value FilterBar clears back to. */
|
|
187
|
+
value: string | null;
|
|
188
|
+
onChange: (value: string | null) => void;
|
|
189
|
+
/** Always rendered when true. Omit/false to make this filter addable/removable via the "Add filter" menu. */
|
|
190
|
+
alwaysVisible?: boolean;
|
|
191
|
+
}
|
|
192
|
+
interface FilterBarSearchProps {
|
|
193
|
+
value: string;
|
|
194
|
+
onChange: (value: string) => void;
|
|
195
|
+
placeholder?: string;
|
|
196
|
+
}
|
|
197
|
+
interface FilterBarProps {
|
|
198
|
+
filters: FilterDefinition[];
|
|
199
|
+
/** Renders a SearchBox ahead of the filter dropdowns when provided. */
|
|
200
|
+
search?: FilterBarSearchProps;
|
|
201
|
+
/**
|
|
202
|
+
* Called by "Clear all" instead of FilterBar's own clearing logic. Omit it to let FilterBar
|
|
203
|
+
* clear every filter with a value itself (`filter.onChange(null)` for each).
|
|
204
|
+
*/
|
|
205
|
+
onClearAll?: () => void;
|
|
206
|
+
addFilterLabel?: string;
|
|
207
|
+
className?: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* FilterBar — delegates to the platform's real FilterBar at render time: an optional
|
|
211
|
+
* SearchBox, always-visible filter dropdowns, and optional filters the user can add/remove via
|
|
212
|
+
* an "Add filter" menu (a filter with a non-null `value` is always treated as visible, even
|
|
213
|
+
* before the user explicitly adds it). The fallback renders every filter as a plain,
|
|
214
|
+
* always-visible native `<select>` — no add/remove menu, no styled search box — so an app page
|
|
215
|
+
* under test still exposes every filter's full behavior via `onChange`.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* <FilterBar
|
|
219
|
+
* search={{ value: search, onChange: setSearch, placeholder: 'Search apps…' }}
|
|
220
|
+
* filters={[
|
|
221
|
+
* { key: 'vendor', label: 'Vendor', options: vendorOptions, value: vendor, onChange: setVendor, alwaysVisible: true },
|
|
222
|
+
* { key: 'category', label: 'Category', options: categoryOptions, value: category, onChange: setCategory },
|
|
223
|
+
* ]}
|
|
224
|
+
* />
|
|
225
|
+
*/
|
|
226
|
+
declare const FilterBar: React.FC<FilterBarProps>;
|
|
227
|
+
type SortDirection = 'asc' | 'desc';
|
|
228
|
+
interface SortOption {
|
|
229
|
+
value: string;
|
|
230
|
+
label: string;
|
|
231
|
+
}
|
|
232
|
+
interface SortSelectProps {
|
|
233
|
+
/** Sortable fields, e.g. `[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Updated' }]`. */
|
|
234
|
+
options: SortOption[];
|
|
235
|
+
/** Selected field key. */
|
|
236
|
+
value: string;
|
|
237
|
+
direction: SortDirection;
|
|
238
|
+
/** Called with the field and direction together, whichever one the interaction changed. */
|
|
239
|
+
onChange: (value: string, direction: SortDirection) => void;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
className?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* SortSelect — delegates to the platform's real SortSelect at render time: a labeled field
|
|
245
|
+
* Select paired with an asc/desc direction toggle button, styled to sit in the same toolbar
|
|
246
|
+
* row as FilterBar. The standalone sort control for list/card surfaces that aren't a
|
|
247
|
+
* DataTable (which has its own column-header sort). The fallback is a native `<select>` for
|
|
248
|
+
* the field plus a button that flips direction.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* <SortSelect
|
|
252
|
+
* options={[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Last updated' }]}
|
|
253
|
+
* value={sortField}
|
|
254
|
+
* direction={sortDirection}
|
|
255
|
+
* onChange={(field, direction) => { setSortField(field); setSortDirection(direction) }}
|
|
256
|
+
* />
|
|
257
|
+
*/
|
|
258
|
+
declare const SortSelect: React.FC<SortSelectProps>;
|
|
130
259
|
interface FormFieldProps {
|
|
131
260
|
label?: string;
|
|
132
261
|
htmlFor?: string;
|
|
@@ -323,6 +452,114 @@ interface FormDialogProps {
|
|
|
323
452
|
* </FormDialog>
|
|
324
453
|
*/
|
|
325
454
|
declare const FormDialog: React.FC<FormDialogProps>;
|
|
455
|
+
type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
456
|
+
interface ModalProps {
|
|
457
|
+
/** Controls visibility. Renders nothing when `false`. */
|
|
458
|
+
isOpen: boolean;
|
|
459
|
+
/** Called on backdrop click (unless disabled), Escape, and the X button. */
|
|
460
|
+
onClose: () => void;
|
|
461
|
+
/** Heading rendered at the top of the modal. */
|
|
462
|
+
title?: React.ReactNode;
|
|
463
|
+
/** Secondary line rendered under the title. */
|
|
464
|
+
subtitle?: React.ReactNode;
|
|
465
|
+
/** Modal body. */
|
|
466
|
+
children: React.ReactNode;
|
|
467
|
+
/** Optional footer content (e.g. action buttons), rendered in a tinted bar. */
|
|
468
|
+
footer?: React.ReactNode;
|
|
469
|
+
size?: ModalSize;
|
|
470
|
+
/** When true, clicking the backdrop no longer closes the modal. */
|
|
471
|
+
disableBackdropClose?: boolean;
|
|
472
|
+
/** When true, Escape no longer closes the modal. */
|
|
473
|
+
disableEscapeClose?: boolean;
|
|
474
|
+
/** Hide the top-right close (X) button. */
|
|
475
|
+
hideCloseButton?: boolean;
|
|
476
|
+
/** Accessible label for the close button. Defaults to "Close". */
|
|
477
|
+
closeLabel?: string;
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Modal — delegates to the platform's real Modal at render time: a coordinated
|
|
482
|
+
* overlay shell with a `title` + `subtitle` header, a scrollable body, and an
|
|
483
|
+
* optional `footer` action bar. The general-purpose sibling of {@link FormDialog}
|
|
484
|
+
* (form) and the confirm dialog (yes/no) — use it for detail/wizard/picker
|
|
485
|
+
* overlays. Selects and other popovers rendered inside it float above the body,
|
|
486
|
+
* so their menus are never clipped. The fallback is a minimal, accessible,
|
|
487
|
+
* non-throwing shell for local dev / tests.
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* <Modal isOpen={open} onClose={close} title="Choose a region" subtitle="Where should this live?"
|
|
491
|
+
* footer={<Button onClick={close}>Done</Button>}>
|
|
492
|
+
* <Select label="Region" options={regions} value={region} onChange={setRegion} />
|
|
493
|
+
* </Modal>
|
|
494
|
+
*/
|
|
495
|
+
declare const Modal: React.FC<ModalProps>;
|
|
496
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
497
|
+
interface AlertProps {
|
|
498
|
+
/** Severity — drives color and default icon. Defaults to `info`. */
|
|
499
|
+
variant?: AlertVariant;
|
|
500
|
+
/** Optional bold heading above the message. */
|
|
501
|
+
title?: React.ReactNode;
|
|
502
|
+
/** The message body. */
|
|
503
|
+
children?: React.ReactNode;
|
|
504
|
+
/** Override the default icon, or pass `false` to hide it. */
|
|
505
|
+
icon?: React.ReactNode | false;
|
|
506
|
+
/** When provided, renders a dismiss (X) button that calls this. */
|
|
507
|
+
onDismiss?: () => void;
|
|
508
|
+
/** Optional trailing action (e.g. a link or button). */
|
|
509
|
+
action?: React.ReactNode;
|
|
510
|
+
className?: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Alert — delegates to the platform's real Alert at render time: an inline,
|
|
514
|
+
* static severity banner for warnings, errors, tips and success notices in the
|
|
515
|
+
* page/form body. For transient pop-up notifications use {@link useToast}
|
|
516
|
+
* instead (its `variant` supports the same `warning`/`error`/`success`/`info`).
|
|
517
|
+
* The fallback is a minimal, accessible colored banner for local dev / tests.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* <Alert variant="warning" title="Heads up">
|
|
521
|
+
* Distributed deployments need at least 3 indexers.
|
|
522
|
+
* </Alert>
|
|
523
|
+
*/
|
|
524
|
+
declare const Alert: React.FC<AlertProps>;
|
|
525
|
+
type MultiSelectSize = 'sm' | 'md' | 'lg';
|
|
526
|
+
interface MultiSelectOption {
|
|
527
|
+
value: string;
|
|
528
|
+
label: string;
|
|
529
|
+
disabled?: boolean;
|
|
530
|
+
}
|
|
531
|
+
interface MultiSelectProps {
|
|
532
|
+
options: MultiSelectOption[];
|
|
533
|
+
/** Currently selected values. */
|
|
534
|
+
value?: string[];
|
|
535
|
+
/** Called with the new list of selected values. */
|
|
536
|
+
onChange?: (values: string[]) => void;
|
|
537
|
+
placeholder?: string;
|
|
538
|
+
label?: string;
|
|
539
|
+
error?: string;
|
|
540
|
+
helperText?: string;
|
|
541
|
+
size?: MultiSelectSize;
|
|
542
|
+
disabled?: boolean;
|
|
543
|
+
fullWidth?: boolean;
|
|
544
|
+
/** Show a filter box inside the dropdown. Defaults to true. */
|
|
545
|
+
searchable?: boolean;
|
|
546
|
+
/** How many chips to show in the trigger before "+N more". Defaults to 3. */
|
|
547
|
+
maxTagCount?: number;
|
|
548
|
+
className?: string;
|
|
549
|
+
name?: string;
|
|
550
|
+
'aria-label'?: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* MultiSelect — delegates to the platform's real searchable multi-selection
|
|
554
|
+
* dropdown at render time (selected values as removable chips, a filter box,
|
|
555
|
+
* select-all / clear). The fallback is a native `<select multiple>` for local
|
|
556
|
+
* dev / tests. Use for any multi-value picker (environments, tags, targets…).
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* <MultiSelect label="Environments" value={ids} onChange={setIds}
|
|
560
|
+
* options={envs.map(e => ({ value: e.id, label: e.name }))} />
|
|
561
|
+
*/
|
|
562
|
+
declare const MultiSelect: React.FC<MultiSelectProps>;
|
|
326
563
|
type ToastVariant = 'success' | 'error' | 'warning' | 'info';
|
|
327
564
|
interface ToastOptions {
|
|
328
565
|
variant?: ToastVariant;
|
|
@@ -390,4 +627,4 @@ interface ConfirmationDialogContextValue {
|
|
|
390
627
|
*/
|
|
391
628
|
declare function useConfirmDialog(): ConfirmationDialogContextValue;
|
|
392
629
|
|
|
393
|
-
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Checkbox, type CheckboxProps, type ConfirmationDialogContextValue, type ConfirmationOptions, type ConfirmationVariant, DataTable, type DataTableAlign, type DataTableColumn, type DataTableEmptyState, type DataTablePaginationState, type DataTableProps, type DataTableSort, type DataTableSortOrder, EmptyState, type EmptyStateProps, FormDialog, type FormDialogProps, type FormDialogSize, FormField, type FormFieldProps, Input, type InputProps, type InputSize, type InputVariant, Select, type SelectOption, type SelectProps, type SelectSize, Skeleton, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, Spinner, type SpinnerProps, type SpinnerSize, StatsCard, type StatsCardDelta, type StatsCardProps, type StatsCardVariant, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type Toast, type ToastContextValue, type ToastOptions, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, useConfirmDialog, useToast };
|
|
630
|
+
export { Alert, type AlertProps, type AlertVariant, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Checkbox, type CheckboxProps, type ConfirmationDialogContextValue, type ConfirmationOptions, type ConfirmationVariant, DataTable, type DataTableAlign, type DataTableColumn, type DataTableEmptyState, type DataTablePaginationState, type DataTableProps, type DataTableSort, type DataTableSortOrder, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterBarSearchProps, type FilterDefinition, type FilterOption, FormDialog, type FormDialogProps, type FormDialogSize, FormField, type FormFieldProps, Input, type InputProps, type InputSize, type InputVariant, Modal, type ModalProps, type ModalSize, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectSize, Pagination, type PaginationProps, SearchBox, type SearchBoxProps, type SearchBoxSize, Select, type SelectOption, type SelectProps, type SelectSize, Skeleton, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, type SortDirection, type SortOption, SortSelect, type SortSelectProps, Spinner, type SpinnerProps, type SpinnerSize, StatsCard, type StatsCardDelta, type StatsCardProps, type StatsCardVariant, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type Toast, type ToastContextValue, type ToastOptions, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, useConfirmDialog, useToast };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -127,6 +127,135 @@ interface SelectProps {
|
|
|
127
127
|
* <Select label="Environment" value={env} onChange={setEnv} options={[{ value: 'prod', label: 'Production' }]} />
|
|
128
128
|
*/
|
|
129
129
|
declare const Select: React.FC<SelectProps>;
|
|
130
|
+
type SearchBoxSize = 'sm' | 'md' | 'lg';
|
|
131
|
+
interface SearchBoxProps {
|
|
132
|
+
/** Controlled search text. */
|
|
133
|
+
value: string;
|
|
134
|
+
/** Called with the new text — debounced by `debounceMs` when set. */
|
|
135
|
+
onChange: (value: string) => void;
|
|
136
|
+
placeholder?: string;
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
size?: SearchBoxSize;
|
|
139
|
+
/** Debounces `onChange` by this many ms; omit (or `0`) to call on every keystroke. */
|
|
140
|
+
debounceMs?: number;
|
|
141
|
+
className?: string;
|
|
142
|
+
'aria-label'?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* SearchBox — delegates to the platform's real SearchBox at render time (leading search icon,
|
|
146
|
+
* a clear button once there's text, optional debounce). The fallback is a bare
|
|
147
|
+
* `<input type="search">` wired straight to `value`/`onChange` — no icon, no debounce, no
|
|
148
|
+
* clear button — but functionally sufficient for typing and clearing.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* <SearchBox value={search} onChange={setSearch} placeholder="Search apps…" debounceMs={250} />
|
|
152
|
+
*/
|
|
153
|
+
declare const SearchBox: React.FC<SearchBoxProps>;
|
|
154
|
+
interface PaginationProps {
|
|
155
|
+
/** 1-based current page. */
|
|
156
|
+
page: number;
|
|
157
|
+
pageSize: number;
|
|
158
|
+
totalItems: number;
|
|
159
|
+
onPageChange: (page: number) => void;
|
|
160
|
+
/** Renders a page-size selector when provided together with `pageSizeOptions`. */
|
|
161
|
+
onPageSizeChange?: (size: number) => void;
|
|
162
|
+
pageSizeOptions?: number[];
|
|
163
|
+
disabled?: boolean;
|
|
164
|
+
className?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Pagination — delegates to the platform's real Pagination at render time: a "Showing X–Y of
|
|
168
|
+
* N" summary, numbered pages with ellipsis for large ranges, an optional page-size Select, and
|
|
169
|
+
* `aria-current="page"` on the active page — visually consistent with DataTable's built-in
|
|
170
|
+
* pagination footer. The fallback is a plain Prev/Next pair with "page X of Y" text.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* <Pagination page={page} pageSize={20} totalItems={total} onPageChange={setPage} />
|
|
174
|
+
*/
|
|
175
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
176
|
+
interface FilterOption {
|
|
177
|
+
value: string;
|
|
178
|
+
label: string;
|
|
179
|
+
}
|
|
180
|
+
interface FilterDefinition {
|
|
181
|
+
/** Stable identifier; also the React key for this filter's dropdown. */
|
|
182
|
+
key: string;
|
|
183
|
+
/** Shown as the dropdown's placeholder/aria-label, and as its entry in the "Add filter" menu. */
|
|
184
|
+
label: string;
|
|
185
|
+
options: FilterOption[];
|
|
186
|
+
/** `null` (not `''`) represents "no selection" — the value FilterBar clears back to. */
|
|
187
|
+
value: string | null;
|
|
188
|
+
onChange: (value: string | null) => void;
|
|
189
|
+
/** Always rendered when true. Omit/false to make this filter addable/removable via the "Add filter" menu. */
|
|
190
|
+
alwaysVisible?: boolean;
|
|
191
|
+
}
|
|
192
|
+
interface FilterBarSearchProps {
|
|
193
|
+
value: string;
|
|
194
|
+
onChange: (value: string) => void;
|
|
195
|
+
placeholder?: string;
|
|
196
|
+
}
|
|
197
|
+
interface FilterBarProps {
|
|
198
|
+
filters: FilterDefinition[];
|
|
199
|
+
/** Renders a SearchBox ahead of the filter dropdowns when provided. */
|
|
200
|
+
search?: FilterBarSearchProps;
|
|
201
|
+
/**
|
|
202
|
+
* Called by "Clear all" instead of FilterBar's own clearing logic. Omit it to let FilterBar
|
|
203
|
+
* clear every filter with a value itself (`filter.onChange(null)` for each).
|
|
204
|
+
*/
|
|
205
|
+
onClearAll?: () => void;
|
|
206
|
+
addFilterLabel?: string;
|
|
207
|
+
className?: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* FilterBar — delegates to the platform's real FilterBar at render time: an optional
|
|
211
|
+
* SearchBox, always-visible filter dropdowns, and optional filters the user can add/remove via
|
|
212
|
+
* an "Add filter" menu (a filter with a non-null `value` is always treated as visible, even
|
|
213
|
+
* before the user explicitly adds it). The fallback renders every filter as a plain,
|
|
214
|
+
* always-visible native `<select>` — no add/remove menu, no styled search box — so an app page
|
|
215
|
+
* under test still exposes every filter's full behavior via `onChange`.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* <FilterBar
|
|
219
|
+
* search={{ value: search, onChange: setSearch, placeholder: 'Search apps…' }}
|
|
220
|
+
* filters={[
|
|
221
|
+
* { key: 'vendor', label: 'Vendor', options: vendorOptions, value: vendor, onChange: setVendor, alwaysVisible: true },
|
|
222
|
+
* { key: 'category', label: 'Category', options: categoryOptions, value: category, onChange: setCategory },
|
|
223
|
+
* ]}
|
|
224
|
+
* />
|
|
225
|
+
*/
|
|
226
|
+
declare const FilterBar: React.FC<FilterBarProps>;
|
|
227
|
+
type SortDirection = 'asc' | 'desc';
|
|
228
|
+
interface SortOption {
|
|
229
|
+
value: string;
|
|
230
|
+
label: string;
|
|
231
|
+
}
|
|
232
|
+
interface SortSelectProps {
|
|
233
|
+
/** Sortable fields, e.g. `[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Updated' }]`. */
|
|
234
|
+
options: SortOption[];
|
|
235
|
+
/** Selected field key. */
|
|
236
|
+
value: string;
|
|
237
|
+
direction: SortDirection;
|
|
238
|
+
/** Called with the field and direction together, whichever one the interaction changed. */
|
|
239
|
+
onChange: (value: string, direction: SortDirection) => void;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
className?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* SortSelect — delegates to the platform's real SortSelect at render time: a labeled field
|
|
245
|
+
* Select paired with an asc/desc direction toggle button, styled to sit in the same toolbar
|
|
246
|
+
* row as FilterBar. The standalone sort control for list/card surfaces that aren't a
|
|
247
|
+
* DataTable (which has its own column-header sort). The fallback is a native `<select>` for
|
|
248
|
+
* the field plus a button that flips direction.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* <SortSelect
|
|
252
|
+
* options={[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Last updated' }]}
|
|
253
|
+
* value={sortField}
|
|
254
|
+
* direction={sortDirection}
|
|
255
|
+
* onChange={(field, direction) => { setSortField(field); setSortDirection(direction) }}
|
|
256
|
+
* />
|
|
257
|
+
*/
|
|
258
|
+
declare const SortSelect: React.FC<SortSelectProps>;
|
|
130
259
|
interface FormFieldProps {
|
|
131
260
|
label?: string;
|
|
132
261
|
htmlFor?: string;
|
|
@@ -323,6 +452,114 @@ interface FormDialogProps {
|
|
|
323
452
|
* </FormDialog>
|
|
324
453
|
*/
|
|
325
454
|
declare const FormDialog: React.FC<FormDialogProps>;
|
|
455
|
+
type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
456
|
+
interface ModalProps {
|
|
457
|
+
/** Controls visibility. Renders nothing when `false`. */
|
|
458
|
+
isOpen: boolean;
|
|
459
|
+
/** Called on backdrop click (unless disabled), Escape, and the X button. */
|
|
460
|
+
onClose: () => void;
|
|
461
|
+
/** Heading rendered at the top of the modal. */
|
|
462
|
+
title?: React.ReactNode;
|
|
463
|
+
/** Secondary line rendered under the title. */
|
|
464
|
+
subtitle?: React.ReactNode;
|
|
465
|
+
/** Modal body. */
|
|
466
|
+
children: React.ReactNode;
|
|
467
|
+
/** Optional footer content (e.g. action buttons), rendered in a tinted bar. */
|
|
468
|
+
footer?: React.ReactNode;
|
|
469
|
+
size?: ModalSize;
|
|
470
|
+
/** When true, clicking the backdrop no longer closes the modal. */
|
|
471
|
+
disableBackdropClose?: boolean;
|
|
472
|
+
/** When true, Escape no longer closes the modal. */
|
|
473
|
+
disableEscapeClose?: boolean;
|
|
474
|
+
/** Hide the top-right close (X) button. */
|
|
475
|
+
hideCloseButton?: boolean;
|
|
476
|
+
/** Accessible label for the close button. Defaults to "Close". */
|
|
477
|
+
closeLabel?: string;
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Modal — delegates to the platform's real Modal at render time: a coordinated
|
|
482
|
+
* overlay shell with a `title` + `subtitle` header, a scrollable body, and an
|
|
483
|
+
* optional `footer` action bar. The general-purpose sibling of {@link FormDialog}
|
|
484
|
+
* (form) and the confirm dialog (yes/no) — use it for detail/wizard/picker
|
|
485
|
+
* overlays. Selects and other popovers rendered inside it float above the body,
|
|
486
|
+
* so their menus are never clipped. The fallback is a minimal, accessible,
|
|
487
|
+
* non-throwing shell for local dev / tests.
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* <Modal isOpen={open} onClose={close} title="Choose a region" subtitle="Where should this live?"
|
|
491
|
+
* footer={<Button onClick={close}>Done</Button>}>
|
|
492
|
+
* <Select label="Region" options={regions} value={region} onChange={setRegion} />
|
|
493
|
+
* </Modal>
|
|
494
|
+
*/
|
|
495
|
+
declare const Modal: React.FC<ModalProps>;
|
|
496
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
497
|
+
interface AlertProps {
|
|
498
|
+
/** Severity — drives color and default icon. Defaults to `info`. */
|
|
499
|
+
variant?: AlertVariant;
|
|
500
|
+
/** Optional bold heading above the message. */
|
|
501
|
+
title?: React.ReactNode;
|
|
502
|
+
/** The message body. */
|
|
503
|
+
children?: React.ReactNode;
|
|
504
|
+
/** Override the default icon, or pass `false` to hide it. */
|
|
505
|
+
icon?: React.ReactNode | false;
|
|
506
|
+
/** When provided, renders a dismiss (X) button that calls this. */
|
|
507
|
+
onDismiss?: () => void;
|
|
508
|
+
/** Optional trailing action (e.g. a link or button). */
|
|
509
|
+
action?: React.ReactNode;
|
|
510
|
+
className?: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Alert — delegates to the platform's real Alert at render time: an inline,
|
|
514
|
+
* static severity banner for warnings, errors, tips and success notices in the
|
|
515
|
+
* page/form body. For transient pop-up notifications use {@link useToast}
|
|
516
|
+
* instead (its `variant` supports the same `warning`/`error`/`success`/`info`).
|
|
517
|
+
* The fallback is a minimal, accessible colored banner for local dev / tests.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* <Alert variant="warning" title="Heads up">
|
|
521
|
+
* Distributed deployments need at least 3 indexers.
|
|
522
|
+
* </Alert>
|
|
523
|
+
*/
|
|
524
|
+
declare const Alert: React.FC<AlertProps>;
|
|
525
|
+
type MultiSelectSize = 'sm' | 'md' | 'lg';
|
|
526
|
+
interface MultiSelectOption {
|
|
527
|
+
value: string;
|
|
528
|
+
label: string;
|
|
529
|
+
disabled?: boolean;
|
|
530
|
+
}
|
|
531
|
+
interface MultiSelectProps {
|
|
532
|
+
options: MultiSelectOption[];
|
|
533
|
+
/** Currently selected values. */
|
|
534
|
+
value?: string[];
|
|
535
|
+
/** Called with the new list of selected values. */
|
|
536
|
+
onChange?: (values: string[]) => void;
|
|
537
|
+
placeholder?: string;
|
|
538
|
+
label?: string;
|
|
539
|
+
error?: string;
|
|
540
|
+
helperText?: string;
|
|
541
|
+
size?: MultiSelectSize;
|
|
542
|
+
disabled?: boolean;
|
|
543
|
+
fullWidth?: boolean;
|
|
544
|
+
/** Show a filter box inside the dropdown. Defaults to true. */
|
|
545
|
+
searchable?: boolean;
|
|
546
|
+
/** How many chips to show in the trigger before "+N more". Defaults to 3. */
|
|
547
|
+
maxTagCount?: number;
|
|
548
|
+
className?: string;
|
|
549
|
+
name?: string;
|
|
550
|
+
'aria-label'?: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* MultiSelect — delegates to the platform's real searchable multi-selection
|
|
554
|
+
* dropdown at render time (selected values as removable chips, a filter box,
|
|
555
|
+
* select-all / clear). The fallback is a native `<select multiple>` for local
|
|
556
|
+
* dev / tests. Use for any multi-value picker (environments, tags, targets…).
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* <MultiSelect label="Environments" value={ids} onChange={setIds}
|
|
560
|
+
* options={envs.map(e => ({ value: e.id, label: e.name }))} />
|
|
561
|
+
*/
|
|
562
|
+
declare const MultiSelect: React.FC<MultiSelectProps>;
|
|
326
563
|
type ToastVariant = 'success' | 'error' | 'warning' | 'info';
|
|
327
564
|
interface ToastOptions {
|
|
328
565
|
variant?: ToastVariant;
|
|
@@ -390,4 +627,4 @@ interface ConfirmationDialogContextValue {
|
|
|
390
627
|
*/
|
|
391
628
|
declare function useConfirmDialog(): ConfirmationDialogContextValue;
|
|
392
629
|
|
|
393
|
-
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Checkbox, type CheckboxProps, type ConfirmationDialogContextValue, type ConfirmationOptions, type ConfirmationVariant, DataTable, type DataTableAlign, type DataTableColumn, type DataTableEmptyState, type DataTablePaginationState, type DataTableProps, type DataTableSort, type DataTableSortOrder, EmptyState, type EmptyStateProps, FormDialog, type FormDialogProps, type FormDialogSize, FormField, type FormFieldProps, Input, type InputProps, type InputSize, type InputVariant, Select, type SelectOption, type SelectProps, type SelectSize, Skeleton, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, Spinner, type SpinnerProps, type SpinnerSize, StatsCard, type StatsCardDelta, type StatsCardProps, type StatsCardVariant, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type Toast, type ToastContextValue, type ToastOptions, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, useConfirmDialog, useToast };
|
|
630
|
+
export { Alert, type AlertProps, type AlertVariant, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Checkbox, type CheckboxProps, type ConfirmationDialogContextValue, type ConfirmationOptions, type ConfirmationVariant, DataTable, type DataTableAlign, type DataTableColumn, type DataTableEmptyState, type DataTablePaginationState, type DataTableProps, type DataTableSort, type DataTableSortOrder, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterBarSearchProps, type FilterDefinition, type FilterOption, FormDialog, type FormDialogProps, type FormDialogSize, FormField, type FormFieldProps, Input, type InputProps, type InputSize, type InputVariant, Modal, type ModalProps, type ModalSize, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectSize, Pagination, type PaginationProps, SearchBox, type SearchBoxProps, type SearchBoxSize, Select, type SelectOption, type SelectProps, type SelectSize, Skeleton, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, type SortDirection, type SortOption, SortSelect, type SortSelectProps, Spinner, type SpinnerProps, type SpinnerSize, StatsCard, type StatsCardDelta, type StatsCardProps, type StatsCardVariant, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type Toast, type ToastContextValue, type ToastOptions, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, useConfirmDialog, useToast };
|