@multivendorx/zyra 1.0.63 → 1.0.65
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/build/index.d.ts +1 -0
- package/build/index.js +7317 -6627
- package/build/index.js.map +1 -1
- package/build/index.mjs +7317 -6627
- package/build/index.mjs.map +1 -1
- package/build/types/builderform/src/EmailBuilder.d.ts +29 -0
- package/build/types/builderform/src/EmailTemplateEditorPopup.d.ts +16 -0
- package/build/types/builderform/src/FormBuilder/Builder.d.ts +11 -0
- package/build/types/builderform/src/FormBuilder/Canvas.d.ts +23 -0
- package/build/types/builderform/src/FormBuilder/FormBuilder.d.ts +13 -0
- package/build/types/builderform/src/FormBuilder/FormSettings.d.ts +19 -0
- package/build/types/builderform/src/FormBuilder/Inspector.d.ts +14 -0
- package/build/types/builderform/src/FormBuilder/Share.d.ts +10 -0
- package/build/types/builderform/src/FormBuilder/When.d.ts +20 -0
- package/build/types/builderform/src/FormBuilder/extensions.d.ts +97 -0
- package/build/types/builderform/src/FormBuilder/fields.d.ts +36 -0
- package/build/types/builderform/src/FormBuilder/index.d.ts +5 -0
- package/build/types/builderform/src/FormBuilder/route.d.ts +10 -0
- package/build/types/builderform/src/FormBuilder/runtime.d.ts +87 -0
- package/build/types/builderform/src/FormBuilder/types.d.ts +151 -0
- package/build/types/builderform/src/Switch.d.ts +9 -0
- package/build/types/builderform/src/emailBlockTypes.d.ts +89 -0
- package/build/types/builderform/src/index.d.ts +9 -0
- package/build/types/builderform/src/legacyEmailAdapter.d.ts +40 -0
- package/build/types/bundle/src/fieldRegistry.d.ts +1 -0
- package/build/types/bundle/src/index.d.ts +6 -0
- package/build/types/components/src/ActivityListComponent.d.ts +39 -0
- package/build/types/components/src/AnalyticsComponent.d.ts +56 -0
- package/build/types/components/src/AppShellComponent.d.ts +64 -0
- package/build/types/components/src/AuthLayoutComponent.d.ts +26 -0
- package/build/types/components/src/AvatarComponent.d.ts +13 -0
- package/build/types/components/src/BadgeComponent.d.ts +30 -0
- package/build/types/components/src/BrandComponent.d.ts +18 -0
- package/build/types/components/src/CardComponent.d.ts +25 -0
- package/build/types/components/src/ChartComponent.d.ts +58 -0
- package/build/types/components/src/ChoiceCardComponent.d.ts +41 -0
- package/build/types/components/src/ClipboardComponent.d.ts +13 -0
- package/build/types/components/src/ColumnComponent.d.ts +11 -0
- package/build/types/components/src/ContainerComponent.d.ts +11 -0
- package/build/types/components/src/CustomRecaptchaComponent.d.ts +2 -0
- package/build/types/components/src/EntityCellComponent.d.ts +30 -0
- package/build/types/components/src/FilterComponent.d.ts +20 -0
- package/build/types/components/src/FormGroupComponent.d.ts +19 -0
- package/build/types/components/src/FormGroupWrapperComponent.d.ts +10 -0
- package/build/types/components/src/FullPageLoadingComponent.d.ts +14 -0
- package/build/types/components/src/HeaderComponent.d.ts +93 -0
- package/build/types/components/src/HeaderSearchComponent.d.ts +32 -0
- package/build/types/components/src/IconComponent.d.ts +12 -0
- package/build/types/components/src/InformationItemComponent.d.ts +38 -0
- package/build/types/components/src/LegendComponent.d.ts +52 -0
- package/build/types/components/src/ListComponent.d.ts +47 -0
- package/build/types/components/src/ListToolbarComponent.d.ts +53 -0
- package/build/types/components/src/MapComponent.d.ts +33 -0
- package/build/types/components/src/MetricTileComponent.d.ts +174 -0
- package/build/types/components/src/ModuleGridComponent.d.ts +74 -0
- package/build/types/components/src/ModuleGuardComponent.d.ts +17 -0
- package/build/types/components/src/NavigatorComponent.d.ts +111 -0
- package/build/types/components/src/NoticeComponent.d.ts +48 -0
- package/build/types/components/src/PopupComponent.d.ts +28 -0
- package/build/types/components/src/RecaptchaComponent.d.ts +11 -0
- package/build/types/components/src/SaveStatusComponent.d.ts +18 -0
- package/build/types/components/src/ScoreRingComponent.d.ts +16 -0
- package/build/types/components/src/SectionComponent.d.ts +18 -0
- package/build/types/components/src/SettingRowComponent.d.ts +134 -0
- package/build/types/components/src/SettingsSectionComponent.d.ts +24 -0
- package/build/types/components/src/SetupWizardComponent.d.ts +75 -0
- package/build/types/components/src/SkeletonComponent.d.ts +11 -0
- package/build/types/components/src/SystemInfoComponent.d.ts +11 -0
- package/build/types/components/src/TabsComponent.d.ts +34 -0
- package/build/types/components/src/ThemeChoiceComponent.d.ts +19 -0
- package/build/types/components/src/TooltipComponent.d.ts +12 -0
- package/build/types/components/src/TourComponent.d.ts +26 -0
- package/build/types/components/src/TrendIndicatorComponent.d.ts +21 -0
- package/build/types/components/src/TrendStatComponent.d.ts +34 -0
- package/build/types/components/src/TypographyComponent.d.ts +58 -0
- package/build/types/components/src/index.d.ts +84 -0
- package/build/types/components/src/paletteClass.d.ts +3 -0
- package/build/types/core/src/ModuleContext.d.ts +8 -0
- package/build/types/core/src/SettingContext.d.ts +17 -0
- package/build/types/core/src/ThemeContext.d.ts +20 -0
- package/build/types/core/src/apiService.d.ts +38 -0
- package/build/types/core/src/blockStyle.d.ts +63 -0
- package/build/types/core/src/colorPalette.d.ts +41 -0
- package/build/types/core/src/index.d.ts +14 -0
- package/build/types/core/src/utils.d.ts +1165 -0
- package/build/types/inputs/src/AddressInput.d.ts +24 -0
- package/build/types/inputs/src/ButtonInput.d.ts +53 -0
- package/build/types/inputs/src/CalendarInput.d.ts +46 -0
- package/build/types/inputs/src/DecoratedInput.d.ts +11 -0
- package/build/types/inputs/src/DynamicRowInput.d.ts +42 -0
- package/build/types/inputs/src/EmailInput.d.ts +15 -0
- package/build/types/inputs/src/EndpointInput.d.ts +4 -0
- package/build/types/inputs/src/EventCalendarInput.d.ts +25 -0
- package/build/types/inputs/src/ExpandablePanelInput.d.ts +116 -0
- package/build/types/inputs/src/FileInput.d.ts +39 -0
- package/build/types/inputs/src/InputRenderer.d.ts +94 -0
- package/build/types/inputs/src/LogViewerInput.d.ts +13 -0
- package/build/types/inputs/src/MultiCheckboxInput.d.ts +48 -0
- package/build/types/inputs/src/NestedInput.d.ts +54 -0
- package/build/types/inputs/src/PhoneInput.d.ts +29 -0
- package/build/types/inputs/src/PickerInput.d.ts +77 -0
- package/build/types/inputs/src/RandomkeyInput.d.ts +14 -0
- package/build/types/inputs/src/RichTextInput.d.ts +30 -0
- package/build/types/inputs/src/SelectInput.d.ts +40 -0
- package/build/types/inputs/src/SetupWizardInput.d.ts +50 -0
- package/build/types/inputs/src/ShortcodeTableInput.d.ts +23 -0
- package/build/types/inputs/src/TableInput.d.ts +72 -0
- package/build/types/inputs/src/TaskExecutorInput.d.ts +30 -0
- package/build/types/inputs/src/TextAreaInput.d.ts +27 -0
- package/build/types/inputs/src/TextInput.d.ts +33 -0
- package/build/types/inputs/src/ToggleInput.d.ts +37 -0
- package/build/types/inputs/src/index.d.ts +53 -0
- package/build/types/table/src/Table.d.ts +4 -0
- package/build/types/table/src/TableActionButtons.d.ts +16 -0
- package/build/types/table/src/TableBulkActions.d.ts +19 -0
- package/build/types/table/src/TableCard.d.ts +10 -0
- package/build/types/table/src/TableEditable.d.ts +18 -0
- package/build/types/table/src/TableFilter.d.ts +19 -0
- package/build/types/table/src/TablePagination.d.ts +17 -0
- package/build/types/table/src/TableRowActions.d.ts +17 -0
- package/build/types/table/src/TableUtils.d.ts +3 -0
- package/build/types/table/src/index.d.ts +5 -0
- package/build/types/table/src/tableLabels.d.ts +14 -0
- package/build/types/table/src/types.d.ts +166 -0
- package/package.json +4 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EmailBlock } from './emailBlockTypes';
|
|
2
|
+
export interface LegacyEmailBlockStyle {
|
|
3
|
+
/** px */
|
|
4
|
+
fontSize?: number;
|
|
5
|
+
lineHeight?: number;
|
|
6
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
7
|
+
color?: string;
|
|
8
|
+
fontWeight?: number;
|
|
9
|
+
marginTop?: number;
|
|
10
|
+
marginRight?: number;
|
|
11
|
+
marginBottom?: number;
|
|
12
|
+
marginLeft?: number;
|
|
13
|
+
paddingTop?: number;
|
|
14
|
+
paddingRight?: number;
|
|
15
|
+
paddingBottom?: number;
|
|
16
|
+
paddingLeft?: number;
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
borderRadius?: number;
|
|
19
|
+
gap?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface LegacyEmailBlock {
|
|
22
|
+
id: number | string;
|
|
23
|
+
type: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
text?: string;
|
|
26
|
+
html?: string;
|
|
27
|
+
level?: number;
|
|
28
|
+
layout?: string;
|
|
29
|
+
columns?: LegacyEmailBlock[][];
|
|
30
|
+
style?: LegacyEmailBlockStyle;
|
|
31
|
+
src?: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
url?: string;
|
|
34
|
+
cssClass?: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
export declare const legacyEmailBlockToEmailBlock: (item: LegacyEmailBlock) => EmailBlock;
|
|
38
|
+
export declare const legacyEmailBlocksToEmailBlocks: (items: LegacyEmailBlock[]) => EmailBlock[];
|
|
39
|
+
export declare const emailBlockToLegacyEmailBlock: (block: EmailBlock) => LegacyEmailBlock;
|
|
40
|
+
export declare const emailBlocksToLegacyEmailBlocks: (blocks: EmailBlock[]) => LegacyEmailBlock[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ActivityListComponent.scss';
|
|
3
|
+
interface ActivityAction {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
/** Renders the control inert (e.g. the capability it triggers doesn't exist yet) instead of omitting it outright. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Shown in a tooltip over the control when disabled — explains why, rather than leaving a dead button unexplained. */
|
|
10
|
+
disabledReason?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ActivityItem {
|
|
13
|
+
id: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
/** Background tint for the icon circle — any valid CSS color. */
|
|
16
|
+
iconColor?: string;
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
/** Small inline marker next to the title, e.g. an "AI" pill. */
|
|
19
|
+
badge?: React.ReactNode;
|
|
20
|
+
desc?: React.ReactNode;
|
|
21
|
+
timestamp?: React.ReactNode;
|
|
22
|
+
action?: ActivityAction;
|
|
23
|
+
}
|
|
24
|
+
interface ActivityListProps {
|
|
25
|
+
items: ActivityItem[];
|
|
26
|
+
/** Grid columns at desktop width — collapses responsively same as the rest of this design system. */
|
|
27
|
+
cols?: number;
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
skeletonCount?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A card-grid of "something changed" entries — icon, title (+ optional
|
|
33
|
+
* badge), description, timestamp, and an optional single action —
|
|
34
|
+
* distinct from ListComponent's single-column row list, which has no slot
|
|
35
|
+
* for a badge next to the title or a timestamp/action pair on their own
|
|
36
|
+
* trailing row.
|
|
37
|
+
*/
|
|
38
|
+
declare const ActivityListComponent: React.FC<ActivityListProps>;
|
|
39
|
+
export default ActivityListComponent;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AnalyticsComponent.scss';
|
|
3
|
+
type AnalyticsItem = {
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconClass?: string;
|
|
6
|
+
colorClass?: string;
|
|
7
|
+
number: React.ReactNode;
|
|
8
|
+
text: React.ReactNode;
|
|
9
|
+
extra?: React.ReactNode;
|
|
10
|
+
progress?: number;
|
|
11
|
+
/** Real navigation — renders the tile as an <a>. Takes priority over onClick when both are given. */
|
|
12
|
+
link?: string;
|
|
13
|
+
/** Renders the tile as a real <button> instead of a plain <div> — for stat tiles that should also launch somewhere. */
|
|
14
|
+
onClick?: (item: AnalyticsItem) => void;
|
|
15
|
+
/** `variant="score-ring"` only — a short explanatory line under `text` (which that variant reads as the tile's own title, next to `icon`, instead of its usual caption-under-number role). */
|
|
16
|
+
desc?: React.ReactNode;
|
|
17
|
+
/** `variant="score-ring"` only — real status pill next to `text` (the tile's title), e.g. "Poor"/"Needs Work"/"Good". Omit to render no badge. */
|
|
18
|
+
badgeText?: React.ReactNode;
|
|
19
|
+
/** `variant="score-ring"` only — passed straight through to the badge's own `color` prop (a semantic class name, e.g. "is-poor" — same convention `BadgeComponent`'s own `color` prop already documents). */
|
|
20
|
+
badgeColor?: string;
|
|
21
|
+
/** `variant="score-ring"` only — passed straight through to the badge's own `className` prop, for a caller-owned color rule scoped to that class (BadgeComponent only ships specific semantic status classes, not generic color names — see that component's own docblock). */
|
|
22
|
+
badgeClassName?: string;
|
|
23
|
+
/** `variant="score-ring"` only — the ring's own filled-arc color (any real CSS color). Reuses `progress` (0–100) for how much of the ring that arc covers. Defaults to `currentColor`. */
|
|
24
|
+
ringColor?: string;
|
|
25
|
+
/** `variant="priority-card"` only — the bottom action row's own label, e.g. "View issues". Pass a translated string; there is no built-in fallback, so omitting it renders no label. */
|
|
26
|
+
linkText?: React.ReactNode;
|
|
27
|
+
/** `variant="trend-stat"` only — sparkline points, e.g. `[{ value: 3 }, { value: 8 }]`. Omit for a tile without a sparkline. */
|
|
28
|
+
chartData?: Record<string, number | string>[];
|
|
29
|
+
/** `variant="trend-stat"` only — which key of each `chartData` point holds the value. Defaults to `value`. */
|
|
30
|
+
chartDataKey?: string;
|
|
31
|
+
/** `variant="trend-stat"` only — sparkline stroke color (`primary` | `secondary` | `accent` or any CSS color). Defaults to `primary`. */
|
|
32
|
+
chartColor?: string;
|
|
33
|
+
};
|
|
34
|
+
type AnalyticsProps = {
|
|
35
|
+
data: AnalyticsItem[];
|
|
36
|
+
variant?: 'default' | 'small' | 'with-out-boxshadow' | 'small-card' | 'dashboard' | 'progress' | 'background-color' | 'tinted' | 'score-ring' | 'priority-card' | 'small-priority-card' | 'trend-stat';
|
|
37
|
+
cols?: number;
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
onActiveChange?: (index: number) => void;
|
|
40
|
+
/** `variant="score-ring"` only — the ring's own pixel diameter, passed straight through to `ChartComponent`'s own `height` (which sizes the ring's bounding square, not just a stroke width). Defaults to 90, this variant's original fixed size. */
|
|
41
|
+
ringSize?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Controls which tile renders `active`, overriding this component's
|
|
44
|
+
* own uncontrolled default (whichever tile was last clicked, starting
|
|
45
|
+
* on the first clickable one). For a caller whose own real selection
|
|
46
|
+
* state lives elsewhere (e.g. IssuesSummaryCards.tsx's `activePriority`
|
|
47
|
+
* prop) and rebuilds its `data` array — a new array reference — on every
|
|
48
|
+
* render: without this, this component's own internal state would
|
|
49
|
+
* silently reset back to the first clickable tile on that next render,
|
|
50
|
+
* fighting the caller's actual selection. Pass `-1` for "no tile
|
|
51
|
+
* active".
|
|
52
|
+
*/
|
|
53
|
+
activeIndex?: number;
|
|
54
|
+
};
|
|
55
|
+
declare const AnalyticsComponent: React.FC<AnalyticsProps>;
|
|
56
|
+
export default AnalyticsComponent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AppShellComponent.scss';
|
|
3
|
+
export interface AppShellNavItem {
|
|
4
|
+
href: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** adminfont icon name, without the `adminfont-` prefix. */
|
|
7
|
+
icon: string;
|
|
8
|
+
/** Small count shown after the label, e.g. unread notifications. */
|
|
9
|
+
count?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AppShellNavGroup {
|
|
12
|
+
label: string;
|
|
13
|
+
items: AppShellNavItem[];
|
|
14
|
+
}
|
|
15
|
+
/** Anything that renders like an `<a>`: a router Link or a plain anchor. */
|
|
16
|
+
export type AppShellLink = React.ElementType<{
|
|
17
|
+
href: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
'aria-current'?: 'page';
|
|
21
|
+
}>;
|
|
22
|
+
/** Every visible string the shell owns, so the host can translate them. */
|
|
23
|
+
export interface AppShellLabels {
|
|
24
|
+
mainNavigation: string;
|
|
25
|
+
openNavigation: string;
|
|
26
|
+
closeNavigation: string;
|
|
27
|
+
logOut: string;
|
|
28
|
+
/** Line under the user's name when `profileHref` is set, e.g. "Admin · My profile". */
|
|
29
|
+
profile: (role: string) => string;
|
|
30
|
+
}
|
|
31
|
+
export interface AppShellComponentProps {
|
|
32
|
+
/** Product name, e.g. "Educube". */
|
|
33
|
+
brandName: string;
|
|
34
|
+
/** Second line under the product name, e.g. "Admin". */
|
|
35
|
+
area: string;
|
|
36
|
+
/** Full logo image; replaces the mark and name in the sidebar. */
|
|
37
|
+
logoUrl?: string;
|
|
38
|
+
/** Image shown inside the brand mark instead of the first letter. */
|
|
39
|
+
markUrl?: string;
|
|
40
|
+
homeHref: string;
|
|
41
|
+
nav: AppShellNavGroup[];
|
|
42
|
+
/** Current path, used to highlight the active item and close the mobile menu on navigation. */
|
|
43
|
+
activePath: string;
|
|
44
|
+
user: {
|
|
45
|
+
name: string;
|
|
46
|
+
role: string;
|
|
47
|
+
};
|
|
48
|
+
onLogout: () => void;
|
|
49
|
+
/** The signed-in user's own profile page; makes the user card a link. */
|
|
50
|
+
profileHref?: string;
|
|
51
|
+
/** Extra icon buttons beside the brand, e.g. a theme toggle. */
|
|
52
|
+
sidebarActions?: React.ReactNode;
|
|
53
|
+
linkComponent?: AppShellLink;
|
|
54
|
+
labels: AppShellLabels;
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Sidebar app frame: brand, grouped navigation, user card and a main area.
|
|
59
|
+
* The main area carries `admin-main-wrapper`, the scope Zyra's own grid and
|
|
60
|
+
* component styles are written for. Below 960px the sidebar becomes an
|
|
61
|
+
* off-canvas drawer opened from a top bar.
|
|
62
|
+
*/
|
|
63
|
+
export declare const AppShellComponent: React.FC<AppShellComponentProps>;
|
|
64
|
+
export default AppShellComponent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AuthLayoutComponent.scss';
|
|
3
|
+
export interface AuthLayoutComponentProps {
|
|
4
|
+
/** Product name shown above the card title. */
|
|
5
|
+
brandName: string;
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Line under the form, e.g. a "Create an account" link. */
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
/** Rendered at the bottom of the card, e.g. a language picker. */
|
|
11
|
+
aside?: React.ReactNode;
|
|
12
|
+
/** Full logo image; replaces the mark and name in the card header. */
|
|
13
|
+
logoUrl?: string;
|
|
14
|
+
/** Image shown inside the brand mark instead of the first letter. */
|
|
15
|
+
markUrl?: string;
|
|
16
|
+
/** Bold greeting above the title, e.g. a branded "Welcome back". */
|
|
17
|
+
welcome?: string;
|
|
18
|
+
/** Paragraph under the greeting; line breaks are kept. */
|
|
19
|
+
message?: string;
|
|
20
|
+
/** Cover image behind the card. */
|
|
21
|
+
backgroundImageUrl?: string;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/** Centered card for sign-in, registration and password screens. */
|
|
25
|
+
export declare const AuthLayoutComponent: React.FC<AuthLayoutComponentProps>;
|
|
26
|
+
export default AuthLayoutComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AvatarComponent.scss';
|
|
3
|
+
/** Up to two initials from a display name ("Ada Lovelace" -> "AL"). */
|
|
4
|
+
export declare const getInitials: (name: string) => string;
|
|
5
|
+
export interface AvatarComponentProps {
|
|
6
|
+
/** Person's display name; the initials are derived from it. */
|
|
7
|
+
name: string;
|
|
8
|
+
size?: 'sm' | 'md';
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Round initials badge for a person. Decorative: the name is shown next to it. */
|
|
12
|
+
export declare const AvatarComponent: React.FC<AvatarComponentProps>;
|
|
13
|
+
export default AvatarComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BadgeComponent.scss';
|
|
3
|
+
export interface BadgeItem {
|
|
4
|
+
text?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
color?: string;
|
|
7
|
+
variant?: 'normal' | 'dot';
|
|
8
|
+
border?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface BadgeComponentProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
14
|
+
/** Single badge content */
|
|
15
|
+
text?: React.ReactNode;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
color?: string;
|
|
18
|
+
variant?: 'normal' | 'dot';
|
|
19
|
+
border?: boolean;
|
|
20
|
+
icon?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Multiple badges */
|
|
23
|
+
badges?: BadgeItem[];
|
|
24
|
+
/** Renders skeleton pill(s) instead of the real badge(s) — for a status/tag whose value is still loading. */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/** `isLoading` only — how many skeleton pills to render. Defaults to `badges?.length || 1`. */
|
|
27
|
+
skeletonCount?: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const BadgeComponent: React.FC<BadgeComponentProps>;
|
|
30
|
+
export default BadgeComponent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BrandComponent.scss';
|
|
3
|
+
export interface BrandComponentProps {
|
|
4
|
+
/** Product name. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Small second line under the name, e.g. "Admin". */
|
|
7
|
+
area?: string;
|
|
8
|
+
/** Content of the square logo mark. Defaults to the name's first letter. */
|
|
9
|
+
mark?: React.ReactNode;
|
|
10
|
+
/** Image shown inside the mark instead of the first letter. */
|
|
11
|
+
markUrl?: string;
|
|
12
|
+
/** Full logo image. When set it replaces the mark and the name. */
|
|
13
|
+
logoUrl?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Logo mark + product name (+ optional area line). Wrap in a link as needed. */
|
|
17
|
+
export declare const BrandComponent: React.FC<BrandComponentProps>;
|
|
18
|
+
export default BrandComponent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './CardComponent.scss';
|
|
3
|
+
export type CardProps = {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
titleIcon?: string;
|
|
6
|
+
desc?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
iconName?: string;
|
|
10
|
+
onIconClick?: () => void;
|
|
11
|
+
action?: React.ReactNode;
|
|
12
|
+
transparent?: boolean;
|
|
13
|
+
contentWidth?: boolean;
|
|
14
|
+
toggle?: boolean;
|
|
15
|
+
defaultExpanded?: boolean;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
badges?: {
|
|
18
|
+
text: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}[];
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
isLoading?: true;
|
|
23
|
+
};
|
|
24
|
+
declare const CardComponent: ({ title, desc, className, id, iconName, onIconClick, action, titleIcon, borderColor, transparent, contentWidth, toggle, defaultExpanded, badges, children, isLoading, }: CardProps) => React.JSX.Element;
|
|
25
|
+
export default CardComponent;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ChartComponent.scss';
|
|
3
|
+
type PieItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: number;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
/** dynamic-line — one band's own color plus the value at which it hands off to the next-higher band. Sorted ascending by `value`; the last entry's color also covers anything above its own `value`. */
|
|
9
|
+
type ChartThreshold = {
|
|
10
|
+
value: number;
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
type ChartComponentProps = {
|
|
14
|
+
/** Which shape to render. 'ring' and 'gauge' are the odd ones out — plain-SVG progress arcs (no recharts) for one 0–100 value, e.g. a health/SEO score, rather than a full chart. 'ring' sweeps a full circle; 'gauge' sweeps a 270° speedometer arc with a gap at the bottom and a dot marking the current value. 'progress' is a thin rounded horizontal bar for one 0–100 value (`data[0][dataKey]`) — plain HTML, no recharts; `height` is the bar's thickness in px (default 8) and `color` its fill; pass `ariaLabel` for screen readers. 'dynamic-line' is a single-series line whose own stroke color changes along its length as the plotted value crosses `thresholds` — e.g. a score trend that reads red/yellow/green wherever it's actually in each band, rather than one flat color. */
|
|
15
|
+
type: 'area' | 'radar' | 'bar' | 'pie' | 'ring' | 'gauge' | 'dynamic-line' | 'progress';
|
|
16
|
+
/** 'pie' takes PieItem[] (each carries its own color); every other type — including 'ring'/'gauge', which only ever read `data[0][dataKey]` — takes plain rows keyed by dataKey/xKey/angleKey/labelKey. */
|
|
17
|
+
data: Record<string, number | string>[] | PieItem[];
|
|
18
|
+
height?: number;
|
|
19
|
+
/** A palette name, or any real CSS color (hex, `var(--token)`, ...) — 'ring'/'gauge' in particular are commonly given a status color (green/yellow/red) that isn't one of the 3 presets. */
|
|
20
|
+
color?: 'primary' | 'secondary' | 'accent' | (string & {});
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
/** area/radar/bar — which field holds the plotted value. */
|
|
23
|
+
dataKey?: string;
|
|
24
|
+
/** area — which field holds the X-axis category. */
|
|
25
|
+
xKey?: string;
|
|
26
|
+
/** area/bar — clamp the value axis, e.g. a 0-100 score. Without it, bar's
|
|
27
|
+
* value axis auto-scales to the tallest bar in `data`, so a set of
|
|
28
|
+
* middling scores can visually read as "near-full" against each other
|
|
29
|
+
* even though none of them are close to 100. */
|
|
30
|
+
yDomain?: [number, number];
|
|
31
|
+
/** radar — which field holds each axis's label. */
|
|
32
|
+
angleKey?: string;
|
|
33
|
+
/** bar — which field holds each bar's label. */
|
|
34
|
+
labelKey?: string;
|
|
35
|
+
/** bar — recharts' own naming: 'vertical' renders horizontal bars (category on the Y axis). */
|
|
36
|
+
layout?: 'horizontal' | 'vertical';
|
|
37
|
+
/** area — drops grid/axes/tooltip and renders just the curve, for a compact trend-line look (e.g. under a score card). */
|
|
38
|
+
sparkline?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* pie/ring/gauge — content rendered centered in the donut's hole / ring / gauge, e.g. a score +
|
|
41
|
+
* label. All three render sites check `null != centerLabel && '' !== centerLabel` rather than a
|
|
42
|
+
* plain truthy check, so a real `0` score still renders wrapped in its own
|
|
43
|
+
* `.chart-ring-center`/`.chart-gauge-center`/`.chart-pie-center` div — a plain `{centerLabel &&
|
|
44
|
+
* (...)}` would print a bare, unwrapped "0" below the ring instead (0 is falsy, so the wrapper
|
|
45
|
+
* div itself never rendered, but `{0}` elsewhere in that same expression still does).
|
|
46
|
+
*/
|
|
47
|
+
centerLabel?: React.ReactNode;
|
|
48
|
+
/** pie — also render each legend entry's `label` next to its value, not just the value alone. */
|
|
49
|
+
legendLabels?: boolean;
|
|
50
|
+
/** pie — 'bottom' (default) wraps a compact legend row under the donut; 'side' places a row of larger dot+value/label stat items beside it (e.g. a hero score summary); 'none' renders no legend at all — for a caller plotting its own (e.g. `LegendComponent`) instead of this one, without resorting to a `display: none !important` override on `.chart-pie-legend`. */
|
|
51
|
+
legendPosition?: 'bottom' | 'side' | 'none';
|
|
52
|
+
/** dynamic-line — the value bands its stroke color hands off between, ascending by `value`. Defaults to this design system's own red/yellow/green status bands (`<40`/`40–70`/`>=70`), the same bands `AnalyticsComponent`'s score badges already use. */
|
|
53
|
+
thresholds?: ChartThreshold[];
|
|
54
|
+
ariaLabel?: string;
|
|
55
|
+
className?: string;
|
|
56
|
+
};
|
|
57
|
+
declare const ChartComponent: React.FC<ChartComponentProps>;
|
|
58
|
+
export default ChartComponent;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ChoiceCardComponent.scss';
|
|
3
|
+
export interface ChoiceCardOption {
|
|
4
|
+
value: string;
|
|
5
|
+
/** adminfont icon name shown in a tinted box before the title. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** A palette color name or any real CSS color — see `SettingRowComponent`'s own `iconColor` doc. */
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
desc?: React.ReactNode;
|
|
11
|
+
/** A short status pill under the description — e.g. "No changes will be made to your website." */
|
|
12
|
+
tagText?: React.ReactNode;
|
|
13
|
+
/** `tagText`'s own `BadgeComponent` color. */
|
|
14
|
+
tagColor?: string;
|
|
15
|
+
/** The aside "Best for ..." note. Omit to render no aside for this option. */
|
|
16
|
+
bestFor?: {
|
|
17
|
+
title?: React.ReactNode;
|
|
18
|
+
desc: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ChoiceCardComponentProps {
|
|
23
|
+
options: ChoiceCardOption[];
|
|
24
|
+
value: string;
|
|
25
|
+
onChange: (value: string) => void;
|
|
26
|
+
/** Radio input `name` grouping the options — auto-generated when omitted. */
|
|
27
|
+
name?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
isLoading?: boolean;
|
|
30
|
+
/** `isLoading` only — how many skeleton cards to render. Defaults to `options?.length || 3`. */
|
|
31
|
+
skeletonCount?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A vertical stack of big selectable radio cards — icon+title+desc, an
|
|
35
|
+
* optional status pill, and an optional "Best for ..." aside — e.g. "How
|
|
36
|
+
* VuloPilot Handles Issues" (Monitor / Recommend / Auto-fix). Distinct from
|
|
37
|
+
* `SettingRowComponent`'s own row list: one exclusive choice among a
|
|
38
|
+
* handful of options, not a list of independent toggles.
|
|
39
|
+
*/
|
|
40
|
+
declare const ChoiceCardComponent: React.FC<ChoiceCardComponentProps>;
|
|
41
|
+
export default ChoiceCardComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldComponent } from '../../core/src/index';
|
|
3
|
+
import './ClipboardComponent.scss';
|
|
4
|
+
interface CopyToClipboardProps {
|
|
5
|
+
text?: string;
|
|
6
|
+
variant?: 'code' | 'button' | 'icon';
|
|
7
|
+
copyButtonLabel?: string;
|
|
8
|
+
copiedLabel?: string;
|
|
9
|
+
onCopy?: () => string | void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ClipboardComponent: React.FC<CopyToClipboardProps>;
|
|
12
|
+
declare const ClipboardFieldComponent: FieldComponent;
|
|
13
|
+
export default ClipboardFieldComponent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ContainerComponent.scss';
|
|
3
|
+
type ColumnProps = {
|
|
4
|
+
grid?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
row?: boolean;
|
|
8
|
+
fullHeight?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const ColumnComponent: React.FC<ColumnProps>;
|
|
11
|
+
export default ColumnComponent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ContainerComponent.scss';
|
|
3
|
+
type ContainerProps = {
|
|
4
|
+
id?: string;
|
|
5
|
+
column?: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
general?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const ContainerComponent: React.FC<ContainerProps>;
|
|
11
|
+
export default ContainerComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './EntityCellComponent.scss';
|
|
3
|
+
export interface EntityCellDetail {
|
|
4
|
+
/** adminfont icon name, without the `adminfont-` prefix. */
|
|
5
|
+
icon?: string;
|
|
6
|
+
text: React.ReactNode;
|
|
7
|
+
/** Tooltip, e.g. the meaning of an icon-only label. */
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface EntityCellComponentProps {
|
|
11
|
+
title: string;
|
|
12
|
+
/** Makes the title a link. */
|
|
13
|
+
href?: string;
|
|
14
|
+
/** Custom link renderer (e.g. a router Link). Defaults to a plain `<a>`. */
|
|
15
|
+
linkComponent?: React.ElementType<{
|
|
16
|
+
href: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}>;
|
|
20
|
+
/** Badges shown after the title, e.g. status and level. */
|
|
21
|
+
badges?: React.ReactNode;
|
|
22
|
+
/** Secondary line under the title, e.g. a slug and a date. */
|
|
23
|
+
details?: EntityCellDetail[];
|
|
24
|
+
/** Small, quieter row of counts and owners at the bottom. */
|
|
25
|
+
stats?: EntityCellDetail[];
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Table/list cell for a named thing: linked title, badges, details and stats rows. */
|
|
29
|
+
export declare const EntityCellComponent: React.FC<EntityCellComponentProps>;
|
|
30
|
+
export default EntityCellComponent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './FilterComponent.scss';
|
|
3
|
+
export interface FilterOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
count?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FilterComponentProps {
|
|
9
|
+
/** Names the group for screen readers, e.g. "Filter by status". */
|
|
10
|
+
label: string;
|
|
11
|
+
options: FilterOption[];
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
/** Leaves out chips with a count of 0, except the first and the selected
|
|
15
|
+
* one, so a status nobody is in doesn't take up room. */
|
|
16
|
+
hideEmpty?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const FilterComponent: React.FC<FilterComponentProps>;
|
|
20
|
+
export default FilterComponent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './FormGroupComponent.scss';
|
|
3
|
+
type FormGroupProps = {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
desc?: React.ReactNode;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconRight?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
cols?: number;
|
|
12
|
+
labelDes?: string;
|
|
13
|
+
row?: boolean;
|
|
14
|
+
inline?: boolean;
|
|
15
|
+
notice?: string;
|
|
16
|
+
noticeType?: 'error' | 'success' | 'warning' | 'info';
|
|
17
|
+
};
|
|
18
|
+
declare const FormGroupComponent: React.FC<FormGroupProps>;
|
|
19
|
+
export default FormGroupComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './FormGroupWrapperComponent.scss';
|
|
3
|
+
type FormGroupWrapperProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
/** `rows`: one bordered card, each setting a row with its name and help on the left and its control on the right. */
|
|
7
|
+
variant?: 'default' | 'rows';
|
|
8
|
+
};
|
|
9
|
+
declare const FormGroupWrapperComponent: React.FC<FormGroupWrapperProps>;
|
|
10
|
+
export default FormGroupWrapperComponent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BrandComponent.scss';
|
|
3
|
+
import './FullPageLoadingComponent.scss';
|
|
4
|
+
export interface FullPageLoadingComponentProps {
|
|
5
|
+
/** Product name; its first letter is the pulsing mark. Omit for text only. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Already-translated status text. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Image shown inside the mark instead of the first letter. */
|
|
10
|
+
markUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Full-screen centered loading state, shown while a session loads. */
|
|
13
|
+
export declare const FullPageLoadingComponent: React.FC<FullPageLoadingComponentProps>;
|
|
14
|
+
export default FullPageLoadingComponent;
|