@selectwin/kit 0.1.2
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 +29 -0
- package/dist/SelectAccordion.d.ts +14 -0
- package/dist/SelectActionCard.d.ts +12 -0
- package/dist/SelectActionList.d.ts +22 -0
- package/dist/SelectActionMenu.d.ts +6 -0
- package/dist/SelectAddButton.d.ts +10 -0
- package/dist/SelectAlert.d.ts +10 -0
- package/dist/SelectAuthFx.d.ts +8 -0
- package/dist/SelectAvatar.d.ts +13 -0
- package/dist/SelectBackLink.d.ts +6 -0
- package/dist/SelectBadge.d.ts +9 -0
- package/dist/SelectBalanceCard.d.ts +21 -0
- package/dist/SelectBankAccountField.d.ts +22 -0
- package/dist/SelectBarChart.d.ts +11 -0
- package/dist/SelectBoxPlot.d.ts +18 -0
- package/dist/SelectBuilderLayout.d.ts +18 -0
- package/dist/SelectBullet.d.ts +16 -0
- package/dist/SelectBump.d.ts +11 -0
- package/dist/SelectButton.d.ts +17 -0
- package/dist/SelectCalendarHeatmap.d.ts +16 -0
- package/dist/SelectCandlestick.d.ts +18 -0
- package/dist/SelectCard.d.ts +12 -0
- package/dist/SelectChartCard.d.ts +22 -0
- package/dist/SelectChord.d.ts +12 -0
- package/dist/SelectCirclePack.d.ts +14 -0
- package/dist/SelectCollapsible.d.ts +10 -0
- package/dist/SelectColorField.d.ts +9 -0
- package/dist/SelectColumnChart.d.ts +13 -0
- package/dist/SelectComboChart.d.ts +20 -0
- package/dist/SelectCombobox.d.ts +32 -0
- package/dist/SelectConfirmModal.d.ts +13 -0
- package/dist/SelectCopyRow.d.ts +11 -0
- package/dist/SelectCopyableId.d.ts +16 -0
- package/dist/SelectDataTable.d.ts +100 -0
- package/dist/SelectDateField.d.ts +19 -0
- package/dist/SelectDatePicker.d.ts +34 -0
- package/dist/SelectDateRangeField.d.ts +20 -0
- package/dist/SelectDetail.d.ts +19 -0
- package/dist/SelectDisclosureButton.d.ts +12 -0
- package/dist/SelectDivider.d.ts +7 -0
- package/dist/SelectDocumentField.d.ts +11 -0
- package/dist/SelectDonut.d.ts +17 -0
- package/dist/SelectDotField.d.ts +5 -0
- package/dist/SelectDumbbell.d.ts +17 -0
- package/dist/SelectFeeBreakdown.d.ts +14 -0
- package/dist/SelectField.d.ts +66 -0
- package/dist/SelectFieldGrid.d.ts +8 -0
- package/dist/SelectFileDropzone.d.ts +13 -0
- package/dist/SelectFileTile.d.ts +15 -0
- package/dist/SelectFilterBar.d.ts +28 -0
- package/dist/SelectFilterChip.d.ts +9 -0
- package/dist/SelectFormLayout.d.ts +12 -0
- package/dist/SelectFormModal.d.ts +18 -0
- package/dist/SelectFunnel.d.ts +9 -0
- package/dist/SelectGauge.d.ts +18 -0
- package/dist/SelectGaugeBands.d.ts +18 -0
- package/dist/SelectGlobe.d.ts +47 -0
- package/dist/SelectHeatmap.d.ts +26 -0
- package/dist/SelectHexbin.d.ts +18 -0
- package/dist/SelectHorizontalBar.d.ts +23 -0
- package/dist/SelectIcicle.d.ts +15 -0
- package/dist/SelectIcon.d.ts +8 -0
- package/dist/SelectIconButton.d.ts +14 -0
- package/dist/SelectIdentityFooter.d.ts +12 -0
- package/dist/SelectImageField.d.ts +20 -0
- package/dist/SelectImageUploadField.d.ts +23 -0
- package/dist/SelectImageUrlsField.d.ts +12 -0
- package/dist/SelectImageZoomModal.d.ts +7 -0
- package/dist/SelectJsonViewer.d.ts +16 -0
- package/dist/SelectKeyValueEditor.d.ts +19 -0
- package/dist/SelectKpiCard.d.ts +15 -0
- package/dist/SelectLayout.d.ts +73 -0
- package/dist/SelectLineChart.d.ts +12 -0
- package/dist/SelectLinkButton.d.ts +11 -0
- package/dist/SelectListCard.d.ts +25 -0
- package/dist/SelectLoader.d.ts +10 -0
- package/dist/SelectMarimekko.d.ts +18 -0
- package/dist/SelectMediaCell.d.ts +11 -0
- package/dist/SelectMenu.d.ts +27 -0
- package/dist/SelectModal.d.ts +17 -0
- package/dist/SelectMoney.d.ts +32 -0
- package/dist/SelectMoneyField.d.ts +19 -0
- package/dist/SelectNetwork.d.ts +22 -0
- package/dist/SelectNote.d.ts +9 -0
- package/dist/SelectNumberField.d.ts +18 -0
- package/dist/SelectOfflineModal.d.ts +1 -0
- package/dist/SelectOptionList.d.ts +17 -0
- package/dist/SelectOtpInput.d.ts +13 -0
- package/dist/SelectPage.d.ts +25 -0
- package/dist/SelectPagination.d.ts +23 -0
- package/dist/SelectPanel.d.ts +13 -0
- package/dist/SelectParallel.d.ts +19 -0
- package/dist/SelectPareto.d.ts +10 -0
- package/dist/SelectPasswordStrength.d.ts +9 -0
- package/dist/SelectPaymentBrand.d.ts +17 -0
- package/dist/SelectPhoneField.d.ts +28 -0
- package/dist/SelectPlanCard.d.ts +21 -0
- package/dist/SelectPolarArea.d.ts +13 -0
- package/dist/SelectPopover.d.ts +17 -0
- package/dist/SelectPreviewFrame.d.ts +12 -0
- package/dist/SelectProgressList.d.ts +24 -0
- package/dist/SelectPyramid.d.ts +20 -0
- package/dist/SelectRadar.d.ts +19 -0
- package/dist/SelectRadialBar.d.ts +20 -0
- package/dist/SelectRadioGroup.d.ts +20 -0
- package/dist/SelectRangeBar.d.ts +18 -0
- package/dist/SelectRating.d.ts +11 -0
- package/dist/SelectRepeatingFieldArray.d.ts +31 -0
- package/dist/SelectResendButton.d.ts +9 -0
- package/dist/SelectRowActions.d.ts +12 -0
- package/dist/SelectSankey.d.ts +16 -0
- package/dist/SelectScatter.d.ts +26 -0
- package/dist/SelectSearchInput.d.ts +11 -0
- package/dist/SelectSection.d.ts +14 -0
- package/dist/SelectSegmented.d.ts +16 -0
- package/dist/SelectSelect.d.ts +26 -0
- package/dist/SelectSetting.d.ts +21 -0
- package/dist/SelectSideNav.d.ts +20 -0
- package/dist/SelectSkeleton.d.ts +17 -0
- package/dist/SelectSlope.d.ts +17 -0
- package/dist/SelectSparkline.d.ts +9 -0
- package/dist/SelectStackedArea.d.ts +11 -0
- package/dist/SelectStatusBadge.d.ts +14 -0
- package/dist/SelectSteps.d.ts +11 -0
- package/dist/SelectStreamGraph.d.ts +11 -0
- package/dist/SelectSunburst.d.ts +20 -0
- package/dist/SelectSurface.d.ts +14 -0
- package/dist/SelectSwitch.d.ts +13 -0
- package/dist/SelectSwitchField.d.ts +9 -0
- package/dist/SelectTable.d.ts +56 -0
- package/dist/SelectTabs.d.ts +15 -0
- package/dist/SelectTagSelect.d.ts +23 -0
- package/dist/SelectText.d.ts +22 -0
- package/dist/SelectTextarea.d.ts +26 -0
- package/dist/SelectThemeSwitcher.d.ts +11 -0
- package/dist/SelectThumbnail.d.ts +9 -0
- package/dist/SelectTicker.d.ts +9 -0
- package/dist/SelectTile.d.ts +20 -0
- package/dist/SelectTimeline.d.ts +15 -0
- package/dist/SelectToast.d.ts +15 -0
- package/dist/SelectToggle.d.ts +17 -0
- package/dist/SelectTogglePanel.d.ts +13 -0
- package/dist/SelectTooltip.d.ts +8 -0
- package/dist/SelectTree.d.ts +13 -0
- package/dist/SelectTreemap.d.ts +14 -0
- package/dist/SelectUnitInput.d.ts +17 -0
- package/dist/SelectVenn.d.ts +13 -0
- package/dist/SelectViolin.d.ts +18 -0
- package/dist/SelectWaffle.d.ts +11 -0
- package/dist/SelectWaterfall.d.ts +16 -0
- package/dist/SelectWordCloud.d.ts +14 -0
- package/dist/SelectWorkspaceSwitcher.d.ts +10 -0
- package/dist/SelectZoomThumbnail.d.ts +7 -0
- package/dist/chartTip.d.ts +26 -0
- package/dist/chartUtils.d.ts +76 -0
- package/dist/detectSelectTheme.d.ts +8 -0
- package/dist/icons.d.ts +85 -0
- package/dist/index.d.ts +234 -0
- package/dist/index.js +8329 -0
- package/dist/internal/document.d.ts +9 -0
- package/dist/internal/money.d.ts +8 -0
- package/dist/internal/phone.d.ts +22 -0
- package/dist/internal/useFocusTrap.d.ts +2 -0
- package/dist/internal/useSelectReveal.d.ts +75 -0
- package/dist/jsonTree.d.ts +87 -0
- package/dist/positioning.d.ts +17 -0
- package/dist/spacing.d.ts +10 -0
- package/dist/style.css +1 -0
- package/dist/uploadUtils.d.ts +16 -0
- package/dist/worldLand.d.ts +6 -0
- package/package.json +61 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
/** SelectSwitch — an on/off toggle (the dashboard's primary control for enabling
|
|
3
|
+
* features). On = brand fill + knob right. Accessible button[role=switch]. */
|
|
4
|
+
type SelectSwitchOwnProps = {
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange: (checked: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Accessible name when there's no visible label nearby. */
|
|
9
|
+
label?: string;
|
|
10
|
+
};
|
|
11
|
+
export type SelectSwitchProps = SelectSwitchOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectSwitchOwnProps>;
|
|
12
|
+
export declare const SelectSwitch: import('react').ForwardRefExoticComponent<SelectSwitchOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectSwitchOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectSwitchFieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
hint?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const SelectSwitchField: import('react').ForwardRefExoticComponent<SelectSwitchFieldProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectSwitchFieldProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectColumn {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
align?: 'start' | 'end' | 'center';
|
|
5
|
+
width?: string;
|
|
6
|
+
/** Render the header as a sort control with a caret. */
|
|
7
|
+
sortable?: boolean;
|
|
8
|
+
sortDir?: 'asc' | 'desc' | null;
|
|
9
|
+
onSort?: () => void;
|
|
10
|
+
}
|
|
11
|
+
type SelectTableOwnProps = {
|
|
12
|
+
columns: SelectColumn[];
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
empty?: ReactNode;
|
|
15
|
+
/** Borderless footer row below the rows box (e.g. "Updated · View all"). */
|
|
16
|
+
footer?: ReactNode;
|
|
17
|
+
/** Card title in the table's own header bar (e.g. "Variantes"). Renders the table as
|
|
18
|
+
* a self-contained titled card — do NOT wrap it in a SelectSection (card-in-card). */
|
|
19
|
+
title?: ReactNode;
|
|
20
|
+
/** Right-aligned action in the header bar (e.g. an "Adicionar" button). */
|
|
21
|
+
action?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
|
|
24
|
+
export declare const SelectTable: import('react').ForwardRefExoticComponent<SelectTableOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
|
+
/** SelectUserCell — the recurring "avatar + name + secondary line" identity cell used
|
|
26
|
+
* across user/sign-up tables. */
|
|
27
|
+
type SelectUserCellOwnProps = {
|
|
28
|
+
name: ReactNode;
|
|
29
|
+
secondary?: ReactNode;
|
|
30
|
+
src?: string;
|
|
31
|
+
};
|
|
32
|
+
export type SelectUserCellProps = SelectUserCellOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectUserCellOwnProps>;
|
|
33
|
+
export declare const SelectUserCell: import('react').ForwardRefExoticComponent<SelectUserCellOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, keyof SelectUserCellOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
34
|
+
export declare function SelectTableRow({ children, onClick }: {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
onClick?: () => void;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
type SelectTableCellOwnProps = {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
align?: 'start' | 'end' | 'center';
|
|
41
|
+
/** Accepted for API compatibility; column widths now come from the shared grid track set
|
|
42
|
+
* (set on .select-table from the `columns`), so a per-cell width is no longer applied. */
|
|
43
|
+
width?: string;
|
|
44
|
+
};
|
|
45
|
+
export type SelectTableCellProps = SelectTableCellOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableCellOwnProps>;
|
|
46
|
+
export declare const SelectTableCell: import('react').ForwardRefExoticComponent<SelectTableCellOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableCellOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
47
|
+
type SelectTableEmptyOwnProps = {
|
|
48
|
+
icon?: ReactNode;
|
|
49
|
+
title: ReactNode;
|
|
50
|
+
subtitle?: ReactNode;
|
|
51
|
+
/** Optional CTA below the text (e.g. "Enable Billing") — for standalone empty cards. */
|
|
52
|
+
action?: ReactNode;
|
|
53
|
+
};
|
|
54
|
+
export type SelectTableEmptyProps = SelectTableEmptyOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableEmptyOwnProps>;
|
|
55
|
+
export declare const SelectTableEmpty: import('react').ForwardRefExoticComponent<SelectTableEmptyOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableEmptyOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectTab {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Status dot tone shown before the label. */
|
|
6
|
+
dot?: 'success' | 'neutral' | 'warning';
|
|
7
|
+
}
|
|
8
|
+
type SelectTabsOwnProps = {
|
|
9
|
+
tabs: SelectTab[];
|
|
10
|
+
value: string;
|
|
11
|
+
onChange: (id: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export type SelectTabsProps = SelectTabsOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTabsOwnProps>;
|
|
14
|
+
export declare function SelectTabs({ tabs, value, onChange, className, ...rest }: SelectTabsProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectTagOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
secondary?: string;
|
|
6
|
+
}
|
|
7
|
+
type SelectTagSelectOwnProps = {
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
options: SelectTagOption[];
|
|
10
|
+
selected: string[];
|
|
11
|
+
onChange: (next: string[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
hint?: ReactNode;
|
|
14
|
+
/** Validation message below the control; also flips the control to its error style. */
|
|
15
|
+
error?: string;
|
|
16
|
+
/** Fires when focus leaves the control (closes the popover) — for validate-on-blur. */
|
|
17
|
+
onBlur?: () => void;
|
|
18
|
+
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms. */
|
|
19
|
+
size?: 'sm' | 'md';
|
|
20
|
+
};
|
|
21
|
+
export type SelectTagSelectProps = SelectTagSelectOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTagSelectOwnProps>;
|
|
22
|
+
export declare const SelectTagSelect: import('react').ForwardRefExoticComponent<SelectTagSelectOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTagSelectOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type SelectTextVariant = 'heading3xl' | 'heading2xl' | 'headingXl' | 'headingLg' | 'headingMd' | 'headingSm' | 'headingXs' | 'bodyLg' | 'bodyMd' | 'bodySm' | 'bodyXs';
|
|
3
|
+
export type SelectTextTone = 'base' | 'subdued' | 'success' | 'critical' | 'caution' | 'disabled';
|
|
4
|
+
export type SelectFontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
5
|
+
/** Elements SelectText may render as (a subset of Polaris `as`). */
|
|
6
|
+
type SelectTextEl = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'legend' | 'dt' | 'dd' | 'strong' | 'em';
|
|
7
|
+
type SelectTextOwnProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
as?: SelectTextEl;
|
|
10
|
+
variant?: SelectTextVariant;
|
|
11
|
+
tone?: SelectTextTone;
|
|
12
|
+
fontWeight?: SelectFontWeight;
|
|
13
|
+
alignment?: 'start' | 'center' | 'end' | 'justify';
|
|
14
|
+
/** Truncate to a single line with an ellipsis. */
|
|
15
|
+
truncate?: boolean;
|
|
16
|
+
/** Tabular figures (align numbers in tables/amounts). */
|
|
17
|
+
numeric?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export type SelectTextProps = SelectTextOwnProps & Omit<HTMLAttributes<HTMLElement>, keyof SelectTextOwnProps>;
|
|
21
|
+
export declare function SelectText({ children, as, variant, tone, fontWeight, alignment, truncate, numeric, className, ...rest }: SelectTextProps): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectTextareaOwnProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
labelAction?: ReactNode;
|
|
7
|
+
info?: string;
|
|
8
|
+
/** Helper text shown under the label, above the textarea (Clerk pattern). */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
hint?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
rows?: number;
|
|
14
|
+
/** Monospace the content (scripts, JSON, codes). */
|
|
15
|
+
mono?: boolean;
|
|
16
|
+
name?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
maxLength?: number;
|
|
20
|
+
onBlur?: () => void;
|
|
21
|
+
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms. */
|
|
22
|
+
size?: 'sm' | 'md';
|
|
23
|
+
};
|
|
24
|
+
export type SelectTextareaProps = SelectTextareaOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTextareaOwnProps>;
|
|
25
|
+
export declare const SelectTextarea: import('react').ForwardRefExoticComponent<SelectTextareaOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTextareaOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type SelectTheme = 'light' | 'dark' | 'system';
|
|
3
|
+
/** Resolve a theme choice to the concrete 'light' | 'dark' to apply as data-theme. */
|
|
4
|
+
export declare function resolveSelectTheme(theme: SelectTheme): 'light' | 'dark';
|
|
5
|
+
type SelectThemeSwitcherOwnProps = {
|
|
6
|
+
value: SelectTheme;
|
|
7
|
+
onChange: (value: SelectTheme) => void;
|
|
8
|
+
};
|
|
9
|
+
export type SelectThemeSwitcherProps = SelectThemeSwitcherOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectThemeSwitcherOwnProps>;
|
|
10
|
+
export declare function SelectThemeSwitcher({ value, onChange, className, ...rest }: SelectThemeSwitcherProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectThumbnailOwnProps = {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
};
|
|
7
|
+
export type SelectThumbnailProps = SelectThumbnailOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectThumbnailOwnProps>;
|
|
8
|
+
export declare const SelectThumbnail: import('react').ForwardRefExoticComponent<SelectThumbnailOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, keyof SelectThumbnailOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectTickerOwnProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Slide speed in px/second (only applies when the content overflows). Default 28. */
|
|
5
|
+
speed?: number;
|
|
6
|
+
};
|
|
7
|
+
export type SelectTickerProps = SelectTickerOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTickerOwnProps>;
|
|
8
|
+
export declare function SelectTicker({ children, speed, className, ...rest }: SelectTickerProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectAppTileOwnProps = {
|
|
3
|
+
media?: ReactNode;
|
|
4
|
+
sublabel?: ReactNode;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
badge?: ReactNode;
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
/** Show the colored top strip. */
|
|
9
|
+
accent?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type SelectAppTileProps = SelectAppTileOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectAppTileOwnProps>;
|
|
13
|
+
export declare const SelectAppTile: import('react').ForwardRefExoticComponent<SelectAppTileOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectAppTileOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
type SelectCreateTileOwnProps = {
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type SelectCreateTileProps = SelectCreateTileOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectCreateTileOwnProps>;
|
|
19
|
+
export declare const SelectCreateTile: import('react').ForwardRefExoticComponent<SelectCreateTileOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectCreateTileOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type SelectTimelineTone = 'default' | 'success' | 'critical' | 'warning' | 'info';
|
|
3
|
+
export interface SelectTimelineItem {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
timestamp?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
content?: ReactNode;
|
|
8
|
+
tone?: SelectTimelineTone;
|
|
9
|
+
}
|
|
10
|
+
type SelectTimelineOwnProps = {
|
|
11
|
+
items: SelectTimelineItem[];
|
|
12
|
+
};
|
|
13
|
+
export type SelectTimelineProps = SelectTimelineOwnProps & Omit<ComponentPropsWithoutRef<'ul'>, keyof SelectTimelineOwnProps>;
|
|
14
|
+
export declare const SelectTimeline: import('react').ForwardRefExoticComponent<SelectTimelineOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "items"> & import('react').RefAttributes<HTMLUListElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SelectToastVariant = 'success' | 'error' | 'info' | 'neutral';
|
|
3
|
+
export interface SelectToastApi {
|
|
4
|
+
show: (content: ReactNode, opts?: {
|
|
5
|
+
variant?: SelectToastVariant;
|
|
6
|
+
duration?: number;
|
|
7
|
+
}) => void;
|
|
8
|
+
success: (content: ReactNode, duration?: number) => void;
|
|
9
|
+
error: (content: ReactNode, duration?: number) => void;
|
|
10
|
+
info: (content: ReactNode, duration?: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function SelectToastProvider({ children }: {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function useSelectToast(): SelectToastApi;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectToggleListOwnProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
scroll?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type SelectToggleListProps = SelectToggleListOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectToggleListOwnProps>;
|
|
7
|
+
export declare const SelectToggleList: import('react').ForwardRefExoticComponent<SelectToggleListOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectToggleListOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
type SelectToggleRowOwnProps = {
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
checked: boolean;
|
|
12
|
+
onChange: (checked: boolean) => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type SelectToggleRowProps = SelectToggleRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectToggleRowOwnProps>;
|
|
16
|
+
export declare const SelectToggleRow: import('react').ForwardRefExoticComponent<SelectToggleRowOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectToggleRowOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectTogglePanelOwnProps = {
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange: (checked: boolean) => void;
|
|
7
|
+
/** Body shown when enabled. */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type SelectTogglePanelProps = SelectTogglePanelOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTogglePanelOwnProps>;
|
|
12
|
+
export declare const SelectTogglePanel: import('react').ForwardRefExoticComponent<SelectTogglePanelOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTogglePanelOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SelectPlacement } from './positioning';
|
|
3
|
+
export declare function SelectTooltip({ content, children, placement, delay, }: {
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
placement?: SelectPlacement;
|
|
7
|
+
delay?: number;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectTreeNode {
|
|
3
|
+
label: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
children?: SelectTreeNode[];
|
|
6
|
+
}
|
|
7
|
+
type SelectTreeOwnProps = {
|
|
8
|
+
data: SelectTreeNode;
|
|
9
|
+
height?: number;
|
|
10
|
+
};
|
|
11
|
+
export type SelectTreeProps = SelectTreeOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTreeOwnProps>;
|
|
12
|
+
export declare function SelectTree({ data, height, className, ...rest }: SelectTreeProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectTreemapDatum {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
type SelectTreemapOwnProps = {
|
|
8
|
+
data: SelectTreemapDatum[];
|
|
9
|
+
height?: number;
|
|
10
|
+
format?: (n: number) => string;
|
|
11
|
+
};
|
|
12
|
+
export type SelectTreemapProps = SelectTreemapOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTreemapOwnProps>;
|
|
13
|
+
export declare function SelectTreemap({ data, height, format, className, ...rest }: SelectTreemapProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectUnitInputOwnProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
unit: ReactNode;
|
|
7
|
+
info?: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
};
|
|
15
|
+
export type SelectUnitInputProps = SelectUnitInputOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectUnitInputOwnProps>;
|
|
16
|
+
export declare const SelectUnitInput: import('react').ForwardRefExoticComponent<SelectUnitInputOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectUnitInputOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectVennSet {
|
|
3
|
+
label: string;
|
|
4
|
+
size: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
type SelectVennOwnProps = {
|
|
8
|
+
sets: SelectVennSet[];
|
|
9
|
+
size?: number;
|
|
10
|
+
};
|
|
11
|
+
export type SelectVennProps = SelectVennOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectVennOwnProps>;
|
|
12
|
+
export declare const SelectVenn: import('react').ForwardRefExoticComponent<SelectVennOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectVennOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectViolinDatum {
|
|
3
|
+
label: string;
|
|
4
|
+
/** Density samples low→high (e.g. a histogram/KDE). */
|
|
5
|
+
bins: number[];
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
median?: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
}
|
|
11
|
+
type SelectViolinOwnProps = {
|
|
12
|
+
data: SelectViolinDatum[];
|
|
13
|
+
height?: number;
|
|
14
|
+
format?: (n: number) => string;
|
|
15
|
+
};
|
|
16
|
+
export type SelectViolinProps = SelectViolinOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectViolinOwnProps>;
|
|
17
|
+
export declare function SelectViolin({ data, height, format, className, ...rest }: SelectViolinProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SelectDonutSegment } from './chartUtils';
|
|
3
|
+
type SelectWaffleOwnProps = {
|
|
4
|
+
segments: SelectDonutSegment[];
|
|
5
|
+
cols?: number;
|
|
6
|
+
rows?: number;
|
|
7
|
+
format?: (n: number) => string;
|
|
8
|
+
};
|
|
9
|
+
export type SelectWaffleProps = SelectWaffleOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectWaffleOwnProps>;
|
|
10
|
+
export declare const SelectWaffle: import('react').ForwardRefExoticComponent<SelectWaffleOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectWaffleOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectWaterfallStep {
|
|
3
|
+
label: string;
|
|
4
|
+
/** Delta for a step, or the absolute amount when `total` is set. */
|
|
5
|
+
value: number;
|
|
6
|
+
/** Absolute bar from zero (e.g. an opening/closing total). */
|
|
7
|
+
total?: boolean;
|
|
8
|
+
}
|
|
9
|
+
type SelectWaterfallOwnProps = {
|
|
10
|
+
data: SelectWaterfallStep[];
|
|
11
|
+
height?: number;
|
|
12
|
+
format?: (n: number) => string;
|
|
13
|
+
};
|
|
14
|
+
export type SelectWaterfallProps = SelectWaterfallOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectWaterfallOwnProps>;
|
|
15
|
+
export declare function SelectWaterfall({ data, height, format, className, ...rest }: SelectWaterfallProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SelectWord {
|
|
3
|
+
text: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
type SelectWordCloudOwnProps = {
|
|
8
|
+
words: SelectWord[];
|
|
9
|
+
minSize?: number;
|
|
10
|
+
maxSize?: number;
|
|
11
|
+
};
|
|
12
|
+
export type SelectWordCloudProps = SelectWordCloudOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectWordCloudOwnProps>;
|
|
13
|
+
export declare const SelectWordCloud: import('react').ForwardRefExoticComponent<SelectWordCloudOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectWordCloudOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectWorkspaceSwitcherOwnProps = {
|
|
3
|
+
avatar?: ReactNode;
|
|
4
|
+
name: ReactNode;
|
|
5
|
+
badge?: ReactNode;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type SelectWorkspaceSwitcherProps = SelectWorkspaceSwitcherOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectWorkspaceSwitcherOwnProps>;
|
|
9
|
+
export declare const SelectWorkspaceSwitcher: import('react').ForwardRefExoticComponent<SelectWorkspaceSwitcherOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectWorkspaceSwitcherOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface ChartTipRow {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChartTipState {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
rows: ChartTipRow[];
|
|
12
|
+
/** Where the tip sits relative to (x,y). 'top' (default) floats it above the point;
|
|
13
|
+
* 'bottom' drops it below — use it near the top edge so it never clips the header. */
|
|
14
|
+
place?: 'top' | 'bottom';
|
|
15
|
+
}
|
|
16
|
+
export declare function useChartTooltip(): {
|
|
17
|
+
tip: ChartTipState | null;
|
|
18
|
+
show: (t: ChartTipState) => void;
|
|
19
|
+
hide: () => void;
|
|
20
|
+
};
|
|
21
|
+
type ChartTooltipOwnProps = {
|
|
22
|
+
tip: ChartTipState | null;
|
|
23
|
+
};
|
|
24
|
+
export type ChartTooltipProps = ChartTooltipOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof ChartTooltipOwnProps>;
|
|
25
|
+
export declare function ChartTooltip({ tip, className, ...rest }: ChartTooltipProps): import("react").JSX.Element | null;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Measure the container width so the chart is responsive. Height is caller-fixed but scaled
|
|
2
|
+
* by the fluid root (useRootScale) so chart height grows with the rest of the UI. */
|
|
3
|
+
export declare function useChartSize(height: number): {
|
|
4
|
+
ref: import('react').RefObject<HTMLDivElement>;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
/** Live pixel width of a ref'd element, for viewBox SVGs whose box is sized in rem (so it
|
|
9
|
+
* scales with the fluid root): feeding the measured px back into the geometry keeps the
|
|
10
|
+
* viewBox 1:1 with the rendered px, so px-positioned HTML overlays (tooltips) stay aligned.
|
|
11
|
+
* `basePx` is the first-paint fallback before the observer fires. */
|
|
12
|
+
export declare function useMeasuredWidth(ref: {
|
|
13
|
+
readonly current: HTMLElement | null;
|
|
14
|
+
}, basePx: number): number;
|
|
15
|
+
/** Round a max up to a "nice" axis value (1/2/5 × 10^n). */
|
|
16
|
+
export declare function niceMax(value: number): number;
|
|
17
|
+
/** count+1 evenly spaced tick values from 0..max. */
|
|
18
|
+
export declare function ticks(max: number, count?: number): number[];
|
|
19
|
+
/**
|
|
20
|
+
* d3-style "nice" ticks: pick a round STEP (1/2/5 × 10ⁿ) near max/target, then emit ticks
|
|
21
|
+
* from 0 up to the smallest multiple of that step ≥ the data. This gives clean axis labels
|
|
22
|
+
* (0, 1, 2 … not 1,3 / 2,5 / 3,8) AND a domain that hugs the data instead of overshooting
|
|
23
|
+
* to a round max÷4. Returns the rounded max + the tick values.
|
|
24
|
+
*/
|
|
25
|
+
export declare function niceTicks(maxData: number, target?: number): {
|
|
26
|
+
max: number;
|
|
27
|
+
values: number[];
|
|
28
|
+
};
|
|
29
|
+
export declare function linePath(pts: Array<[number, number]>): string;
|
|
30
|
+
export declare function areaPath(pts: Array<[number, number]>, baseY: number): string;
|
|
31
|
+
/**
|
|
32
|
+
* Monotone cubic interpolation (à la d3 curveMonotoneX): smooth curves that never
|
|
33
|
+
* overshoot the data — no phantom dips below zero between points. Assumes x increasing.
|
|
34
|
+
* This is what makes the lines read as a polished analytics chart instead of a polyline.
|
|
35
|
+
*/
|
|
36
|
+
export declare function smoothLinePath(pts: Array<[number, number]>): string;
|
|
37
|
+
export declare function smoothAreaPath(pts: Array<[number, number]>, baseY: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Smooth filled band between an upper and a lower boundary (true stacked-area bands, so
|
|
40
|
+
* each band is its own shape and can carry its own gradient without bleeding onto the
|
|
41
|
+
* one below). Both arrays share the same x positions, left→right.
|
|
42
|
+
*/
|
|
43
|
+
export declare function smoothBandPath(upper: Array<[number, number]>, lower: Array<[number, number]>): string;
|
|
44
|
+
/** Donut/pie segment path (outer arc out, inner arc back). Angles in degrees, 0 = top. */
|
|
45
|
+
export declare function donutSegment(cx: number, cy: number, rOut: number, rIn: number, startDeg: number, endDeg: number): string;
|
|
46
|
+
export declare function chartColor(i: number): string;
|
|
47
|
+
/** Compact number for axis labels (1.2k, 3.4M). */
|
|
48
|
+
export declare function formatCompact(n: number): string;
|
|
49
|
+
/** Standard plot insets — room for Y labels (left) and X labels (bottom), plus a small
|
|
50
|
+
* top/right margin so lines/areas and the first/last X labels never touch the edges. */
|
|
51
|
+
export declare const CHART_PAD: {
|
|
52
|
+
readonly top: 16;
|
|
53
|
+
readonly right: 22;
|
|
54
|
+
readonly bottom: 32;
|
|
55
|
+
readonly left: 48;
|
|
56
|
+
};
|
|
57
|
+
export interface SelectChartSeries {
|
|
58
|
+
name: string;
|
|
59
|
+
data: number[];
|
|
60
|
+
color?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SelectBarDatum {
|
|
63
|
+
label: string;
|
|
64
|
+
value: number;
|
|
65
|
+
/** Optional per-row bar colour (else the chart ramp / single `color`). */
|
|
66
|
+
color?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface SelectDonutSegment {
|
|
69
|
+
label: string;
|
|
70
|
+
value: number;
|
|
71
|
+
color?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface SelectFunnelStage {
|
|
74
|
+
label: string;
|
|
75
|
+
value: number;
|
|
76
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* detectSelectTheme — best-effort current Select theme for PORTALED components (modals,
|
|
3
|
+
* popovers, tooltips), which render outside the app's `.select`/data-theme subtree. Reads
|
|
4
|
+
* the nearest `[data-theme]` ancestor of `anchor` (the trigger), or falls back to
|
|
5
|
+
* `<html data-theme>` (set by ThemeProvider). Lets those components theme themselves
|
|
6
|
+
* without every caller passing a `theme` prop.
|
|
7
|
+
*/
|
|
8
|
+
export declare function detectSelectTheme(anchor?: Element | null): 'light' | 'dark';
|