@mt-gloss/ui 0.0.6 → 0.0.8
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/index.d.ts +77 -75
- package/index.js +13027 -12107
- package/lib/composites/cards/BarChartCard.d.ts +43 -0
- package/lib/composites/cards/ComparisonCard.d.ts +46 -0
- package/lib/composites/cards/DirectionCard.d.ts +43 -0
- package/lib/composites/cards/DistributionCard.d.ts +45 -0
- package/lib/composites/cards/HighlightCard.d.ts +41 -0
- package/lib/composites/cards/ProgressCard.d.ts +43 -0
- package/lib/composites/cards/SegmentCard.d.ts +45 -0
- package/lib/composites/cards/SimpleMetricCard.d.ts +39 -0
- package/lib/composites/cards/TrendCard.d.ts +43 -0
- package/lib/composites/cards/index.d.ts +18 -0
- package/lib/composites/forms/PasswordInput.d.ts +79 -0
- package/lib/{composed → composites/forms}/PhoneInput.d.ts +26 -28
- package/lib/composites/forms/SearchInput.d.ts +89 -0
- package/lib/composites/index.d.ts +2 -0
- package/lib/compositions/index.d.ts +3 -0
- package/lib/{Button.d.ts → primitives/Button.d.ts} +1 -1
- package/lib/{Link.d.ts → primitives/Link.d.ts} +1 -1
- package/lib/{SegmentedControl.d.ts → primitives/SegmentedControl.d.ts} +1 -1
- package/lib/{Select.d.ts → primitives/Select.d.ts} +1 -1
- package/lib/{SplitButton.d.ts → primitives/SplitButton.d.ts} +1 -1
- package/lib/{Transition.d.ts → primitives/Transition.d.ts} +1 -1
- package/lib/{dashboard → primitives/dashboard}/ChartControlBar/types.d.ts +4 -1
- package/lib/primitives/dashboard/MetricCard/CardBack.d.ts +31 -0
- package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +22 -0
- package/lib/{dashboard → primitives/dashboard}/MetricCard/index.d.ts +2 -0
- package/lib/{dashboard → primitives/dashboard}/MetricCard/types.d.ts +17 -0
- package/lib/{dashboard → primitives/dashboard}/UnifiedContextMenu/UnifiedContextMenu.d.ts +1 -1
- package/lib/primitives/dashboard/UnifiedContextMenu/config.d.ts +42 -0
- package/lib/{dashboard → primitives/dashboard}/UnifiedContextMenu/index.d.ts +2 -0
- package/lib/{dashboard → primitives/dashboard}/UnifiedContextMenu/types.d.ts +24 -4
- package/package.json +10 -2
- package/lib/composed/PasswordInput.d.ts +0 -75
- package/lib/composed/SearchInput.d.ts +0 -80
- package/lib/dashboard/MetricCard/CardShell.d.ts +0 -22
- package/lib/patterns/index.d.ts +0 -14
- /package/lib/{composed → composites/forms}/AddressSelect.d.ts +0 -0
- /package/lib/{composed → composites/forms}/PaymentMethodSelect.d.ts +0 -0
- /package/lib/{composed → composites/forms}/TagInput.d.ts +0 -0
- /package/lib/{composed → composites/forms}/index.d.ts +0 -0
- /package/lib/{patterns → compositions}/feedback/DestructiveModal.d.ts +0 -0
- /package/lib/{patterns → compositions}/feedback/index.d.ts +0 -0
- /package/lib/{patterns → compositions}/forms/AddressGroup.d.ts +0 -0
- /package/lib/{patterns → compositions}/forms/CreditCardForm.d.ts +0 -0
- /package/lib/{patterns → compositions}/forms/LoginForm.d.ts +0 -0
- /package/lib/{patterns → compositions}/forms/index.d.ts +0 -0
- /package/lib/{patterns → compositions}/types.d.ts +0 -0
- /package/lib/{Accordion.d.ts → primitives/Accordion.d.ts} +0 -0
- /package/lib/{AsyncLoader.d.ts → primitives/AsyncLoader.d.ts} +0 -0
- /package/lib/{Badge.d.ts → primitives/Badge.d.ts} +0 -0
- /package/lib/{ButtonGroup.d.ts → primitives/ButtonGroup.d.ts} +0 -0
- /package/lib/{Card.d.ts → primitives/Card.d.ts} +0 -0
- /package/lib/{Checkbox.d.ts → primitives/Checkbox.d.ts} +0 -0
- /package/lib/{CheckboxGroup.d.ts → primitives/CheckboxGroup.d.ts} +0 -0
- /package/lib/{Chip.d.ts → primitives/Chip.d.ts} +0 -0
- /package/lib/{ColorPicker.d.ts → primitives/ColorPicker.d.ts} +0 -0
- /package/lib/{DatePicker.d.ts → primitives/DatePicker.d.ts} +0 -0
- /package/lib/{DateRangePicker.d.ts → primitives/DateRangePicker.d.ts} +0 -0
- /package/lib/{Dropdown.d.ts → primitives/Dropdown.d.ts} +0 -0
- /package/lib/{FileUpload.d.ts → primitives/FileUpload.d.ts} +0 -0
- /package/lib/{Form.d.ts → primitives/Form.d.ts} +0 -0
- /package/lib/{FormField.d.ts → primitives/FormField.d.ts} +0 -0
- /package/lib/{Input.d.ts → primitives/Input.d.ts} +0 -0
- /package/lib/{InputGroup.d.ts → primitives/InputGroup.d.ts} +0 -0
- /package/lib/{MaskedInput.d.ts → primitives/MaskedInput.d.ts} +0 -0
- /package/lib/{Menu.d.ts → primitives/Menu.d.ts} +0 -0
- /package/lib/{NumberInput.d.ts → primitives/NumberInput.d.ts} +0 -0
- /package/lib/{Radio.d.ts → primitives/Radio.d.ts} +0 -0
- /package/lib/{RadioGroup.d.ts → primitives/RadioGroup.d.ts} +0 -0
- /package/lib/{RangeSlider.d.ts → primitives/RangeSlider.d.ts} +0 -0
- /package/lib/{Rating.d.ts → primitives/Rating.d.ts} +0 -0
- /package/lib/{Slider.d.ts → primitives/Slider.d.ts} +0 -0
- /package/lib/{Textarea.d.ts → primitives/Textarea.d.ts} +0 -0
- /package/lib/{TimePicker.d.ts → primitives/TimePicker.d.ts} +0 -0
- /package/lib/{Toggle.d.ts → primitives/Toggle.d.ts} +0 -0
- /package/lib/{Tooltip.d.ts → primitives/Tooltip.d.ts} +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/ChartControlBar.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/FilterInput.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/FusedShape.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/Row1Controls.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/Row2FilterTray.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/fixtures/controlBarStates.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/ChartControlBar/useFilterLayout.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/FilterChip/FilterChip.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/FilterChip/fixtures/filterChips.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/FilterChip/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/FilterChip/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/GutterActions.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/MetricCard.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/StackedGroupCard.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/TrendIndicator.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/fixtures/allVariants.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/fixtures/sparklineCard.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/fixtures/standardCard.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/fixtures/states.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/useSlideOutReveal.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/utils/formatTrend.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/utils/formatValue.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/visualizations/BarsBg.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/visualizations/DonutChart.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/visualizations/ObjectArrow.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCard/visualizations/SparklineBg.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCardGrid/MetricCardGrid.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCardGrid/fixtures/gridCards.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCardGrid/fixtures/layouts.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCardGrid/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/MetricCardGrid/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/Skeleton.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/SkeletonCard.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/SkeletonChart.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/SkeletonTable.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/fixtures/skeletonSamples.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/Skeleton/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabGroup/TabGroup.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabGroup/fixtures/tabGroups.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabGroup/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabGroup/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabbedDataView/TabbedDataView.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabbedDataView/fixtures/tabConfigs.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabbedDataView/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TabbedDataView/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/ExpandableChip.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/HybridDatePicker.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/MarketPresetRow.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/MiniCalendar.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/TimeFrame.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/fixtures/timeFrameSamples.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/utils/dateHelpers.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/utils/presets.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/TimeFrame/utils/smartDateFormat.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/UnifiedBreakdownTable.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/fixtures/columns.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/fixtures/itemRows.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/fixtures/orderRows.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/index.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedBreakdownTable/types.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/UnifiedContextMenu/fixtures/menuActions.d.ts +0 -0
- /package/lib/{dashboard → primitives/dashboard}/index.d.ts +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Props for the BarChartCard composite (wraps BarsVariant). */
|
|
2
|
+
export interface BarChartCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Bar chart data points */
|
|
8
|
+
barData: number[];
|
|
9
|
+
/** Optional value formatting */
|
|
10
|
+
format?: {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
abbreviated?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** Trend direction and magnitude */
|
|
16
|
+
trend?: {
|
|
17
|
+
value: number;
|
|
18
|
+
direction: 'up' | 'down' | 'flat';
|
|
19
|
+
label?: string;
|
|
20
|
+
} | null;
|
|
21
|
+
/** Secondary descriptive text */
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
/** Show as loading state */
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
/** Show as error state */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** Show as empty/no-data state */
|
|
28
|
+
empty?: boolean;
|
|
29
|
+
/** Whether data is stale (triggers blur animation) */
|
|
30
|
+
stale?: boolean;
|
|
31
|
+
/** Accent color for bars */
|
|
32
|
+
accentColor?: string;
|
|
33
|
+
/** Open detail graph view */
|
|
34
|
+
onDetails?: () => void;
|
|
35
|
+
/** Remove card from grid */
|
|
36
|
+
onRemove?: () => void;
|
|
37
|
+
/** Navigate to source data */
|
|
38
|
+
onNavigate?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const BarChartCard: {
|
|
41
|
+
(props: BarChartCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Props for the ComparisonCard composite (wraps VersusVariant). */
|
|
2
|
+
export interface ComparisonCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value (optional since versus shows dual values) */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Comparison data with current and prior period values */
|
|
8
|
+
comparison: {
|
|
9
|
+
current: number | string;
|
|
10
|
+
prior: number | string;
|
|
11
|
+
currentLabel?: string;
|
|
12
|
+
priorLabel?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Optional value formatting */
|
|
15
|
+
format?: {
|
|
16
|
+
prefix?: string;
|
|
17
|
+
suffix?: string;
|
|
18
|
+
abbreviated?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** Trend direction and magnitude */
|
|
21
|
+
trend?: {
|
|
22
|
+
value: number;
|
|
23
|
+
direction: 'up' | 'down' | 'flat';
|
|
24
|
+
label?: string;
|
|
25
|
+
} | null;
|
|
26
|
+
/** Secondary descriptive text */
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
/** Show as loading state */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/** Show as error state */
|
|
31
|
+
error?: boolean;
|
|
32
|
+
/** Show as empty/no-data state */
|
|
33
|
+
empty?: boolean;
|
|
34
|
+
/** Whether data is stale (triggers blur animation) */
|
|
35
|
+
stale?: boolean;
|
|
36
|
+
/** Open detail graph view */
|
|
37
|
+
onDetails?: () => void;
|
|
38
|
+
/** Remove card from grid */
|
|
39
|
+
onRemove?: () => void;
|
|
40
|
+
/** Navigate to source data */
|
|
41
|
+
onNavigate?: () => void;
|
|
42
|
+
}
|
|
43
|
+
export declare const ComparisonCard: {
|
|
44
|
+
(props: ComparisonCardProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Props for the DirectionCard composite (wraps ArrowVariant). */
|
|
2
|
+
export interface DirectionCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Arrow pointing direction */
|
|
8
|
+
direction: 'up' | 'down';
|
|
9
|
+
/** Arrow visual shape */
|
|
10
|
+
shape?: 'chevron' | 'triple' | 'bars';
|
|
11
|
+
/** Optional value formatting */
|
|
12
|
+
format?: {
|
|
13
|
+
prefix?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
abbreviated?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Trend direction and magnitude */
|
|
18
|
+
trend?: {
|
|
19
|
+
value: number;
|
|
20
|
+
direction: 'up' | 'down' | 'flat';
|
|
21
|
+
label?: string;
|
|
22
|
+
} | null;
|
|
23
|
+
/** Secondary descriptive text */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/** Show as loading state */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Show as error state */
|
|
28
|
+
error?: boolean;
|
|
29
|
+
/** Show as empty/no-data state */
|
|
30
|
+
empty?: boolean;
|
|
31
|
+
/** Whether data is stale (triggers blur animation) */
|
|
32
|
+
stale?: boolean;
|
|
33
|
+
/** Open detail graph view */
|
|
34
|
+
onDetails?: () => void;
|
|
35
|
+
/** Remove card from grid */
|
|
36
|
+
onRemove?: () => void;
|
|
37
|
+
/** Navigate to source data */
|
|
38
|
+
onNavigate?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const DirectionCard: {
|
|
41
|
+
(props: DirectionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Props for the DistributionCard composite (wraps DonutVariant). */
|
|
2
|
+
export interface DistributionCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Current donut value */
|
|
8
|
+
donutValue: number;
|
|
9
|
+
/** Maximum donut value (100% ring) */
|
|
10
|
+
donutMax?: number;
|
|
11
|
+
/** Optional value formatting */
|
|
12
|
+
format?: {
|
|
13
|
+
prefix?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
abbreviated?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Trend direction and magnitude */
|
|
18
|
+
trend?: {
|
|
19
|
+
value: number;
|
|
20
|
+
direction: 'up' | 'down' | 'flat';
|
|
21
|
+
label?: string;
|
|
22
|
+
} | null;
|
|
23
|
+
/** Secondary descriptive text */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/** Show as loading state */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Show as error state */
|
|
28
|
+
error?: boolean;
|
|
29
|
+
/** Show as empty/no-data state */
|
|
30
|
+
empty?: boolean;
|
|
31
|
+
/** Whether data is stale (triggers blur animation) */
|
|
32
|
+
stale?: boolean;
|
|
33
|
+
/** Accent color for donut */
|
|
34
|
+
accentColor?: string;
|
|
35
|
+
/** Open detail graph view */
|
|
36
|
+
onDetails?: () => void;
|
|
37
|
+
/** Remove card from grid */
|
|
38
|
+
onRemove?: () => void;
|
|
39
|
+
/** Navigate to source data */
|
|
40
|
+
onNavigate?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const DistributionCard: {
|
|
43
|
+
(props: DistributionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Props for the HighlightCard composite (wraps HighlightVariant). */
|
|
2
|
+
export interface HighlightCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Semantic highlight color (hex or CSS variable) */
|
|
8
|
+
highlightColor: string;
|
|
9
|
+
/** Optional value formatting */
|
|
10
|
+
format?: {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
abbreviated?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** Trend direction and magnitude */
|
|
16
|
+
trend?: {
|
|
17
|
+
value: number;
|
|
18
|
+
direction: 'up' | 'down' | 'flat';
|
|
19
|
+
label?: string;
|
|
20
|
+
} | null;
|
|
21
|
+
/** Secondary descriptive text */
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
/** Show as loading state */
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
/** Show as error state */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** Show as empty/no-data state */
|
|
28
|
+
empty?: boolean;
|
|
29
|
+
/** Whether data is stale (triggers blur animation) */
|
|
30
|
+
stale?: boolean;
|
|
31
|
+
/** Open detail graph view */
|
|
32
|
+
onDetails?: () => void;
|
|
33
|
+
/** Remove card from grid */
|
|
34
|
+
onRemove?: () => void;
|
|
35
|
+
/** Navigate to source data */
|
|
36
|
+
onNavigate?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export declare const HighlightCard: {
|
|
39
|
+
(props: HighlightCardProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Props for the ProgressCard composite (wraps ObjectArrowVariant). */
|
|
2
|
+
export interface ProgressCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Current progress value */
|
|
8
|
+
progressValue: number;
|
|
9
|
+
/** Maximum progress value */
|
|
10
|
+
progressMax: number;
|
|
11
|
+
/** Optional value formatting */
|
|
12
|
+
format?: {
|
|
13
|
+
prefix?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
abbreviated?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Trend direction and magnitude */
|
|
18
|
+
trend?: {
|
|
19
|
+
value: number;
|
|
20
|
+
direction: 'up' | 'down' | 'flat';
|
|
21
|
+
label?: string;
|
|
22
|
+
} | null;
|
|
23
|
+
/** Secondary descriptive text */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/** Show as loading state */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Show as error state */
|
|
28
|
+
error?: boolean;
|
|
29
|
+
/** Show as empty/no-data state */
|
|
30
|
+
empty?: boolean;
|
|
31
|
+
/** Whether data is stale (triggers blur animation) */
|
|
32
|
+
stale?: boolean;
|
|
33
|
+
/** Open detail graph view */
|
|
34
|
+
onDetails?: () => void;
|
|
35
|
+
/** Remove card from grid */
|
|
36
|
+
onRemove?: () => void;
|
|
37
|
+
/** Navigate to source data */
|
|
38
|
+
onNavigate?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const ProgressCard: {
|
|
41
|
+
(props: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Props for the SegmentCard composite (wraps SegmentedVariant). */
|
|
2
|
+
export interface SegmentCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Segment data for segmented bar visualization */
|
|
8
|
+
segments: Array<{
|
|
9
|
+
value: number;
|
|
10
|
+
color: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** Optional value formatting */
|
|
14
|
+
format?: {
|
|
15
|
+
prefix?: string;
|
|
16
|
+
suffix?: string;
|
|
17
|
+
abbreviated?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** Trend direction and magnitude */
|
|
20
|
+
trend?: {
|
|
21
|
+
value: number;
|
|
22
|
+
direction: 'up' | 'down' | 'flat';
|
|
23
|
+
label?: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/** Secondary descriptive text */
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
/** Show as loading state */
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
/** Show as error state */
|
|
30
|
+
error?: boolean;
|
|
31
|
+
/** Show as empty/no-data state */
|
|
32
|
+
empty?: boolean;
|
|
33
|
+
/** Whether data is stale (triggers blur animation) */
|
|
34
|
+
stale?: boolean;
|
|
35
|
+
/** Open detail graph view */
|
|
36
|
+
onDetails?: () => void;
|
|
37
|
+
/** Remove card from grid */
|
|
38
|
+
onRemove?: () => void;
|
|
39
|
+
/** Navigate to source data */
|
|
40
|
+
onNavigate?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const SegmentCard: {
|
|
43
|
+
(props: SegmentCardProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Props for the SimpleMetricCard composite (wraps StandardVariant). */
|
|
2
|
+
export interface SimpleMetricCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Optional value formatting */
|
|
8
|
+
format?: {
|
|
9
|
+
prefix?: string;
|
|
10
|
+
suffix?: string;
|
|
11
|
+
abbreviated?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** Trend direction and magnitude */
|
|
14
|
+
trend?: {
|
|
15
|
+
value: number;
|
|
16
|
+
direction: 'up' | 'down' | 'flat';
|
|
17
|
+
label?: string;
|
|
18
|
+
} | null;
|
|
19
|
+
/** Secondary descriptive text */
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
/** Show as loading state */
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/** Show as error state */
|
|
24
|
+
error?: boolean;
|
|
25
|
+
/** Show as empty/no-data state */
|
|
26
|
+
empty?: boolean;
|
|
27
|
+
/** Whether data is stale (triggers blur animation) */
|
|
28
|
+
stale?: boolean;
|
|
29
|
+
/** Open detail graph view */
|
|
30
|
+
onDetails?: () => void;
|
|
31
|
+
/** Remove card from grid */
|
|
32
|
+
onRemove?: () => void;
|
|
33
|
+
/** Navigate to source data */
|
|
34
|
+
onNavigate?: () => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const SimpleMetricCard: {
|
|
37
|
+
(props: SimpleMetricCardProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Props for the TrendCard composite (wraps SparklineVariant). */
|
|
2
|
+
export interface TrendCardProps {
|
|
3
|
+
/** KPI label displayed in the card header */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Primary metric value */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
/** Sparkline data points for trend visualization */
|
|
8
|
+
trendData: number[];
|
|
9
|
+
/** Optional value formatting */
|
|
10
|
+
format?: {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
abbreviated?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** Trend direction and magnitude */
|
|
16
|
+
trend?: {
|
|
17
|
+
value: number;
|
|
18
|
+
direction: 'up' | 'down' | 'flat';
|
|
19
|
+
label?: string;
|
|
20
|
+
} | null;
|
|
21
|
+
/** Secondary descriptive text */
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
/** Show as loading state */
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
/** Show as error state */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** Show as empty/no-data state */
|
|
28
|
+
empty?: boolean;
|
|
29
|
+
/** Whether data is stale (triggers blur animation) */
|
|
30
|
+
stale?: boolean;
|
|
31
|
+
/** Accent color for sparkline */
|
|
32
|
+
accentColor?: string;
|
|
33
|
+
/** Open detail graph view */
|
|
34
|
+
onDetails?: () => void;
|
|
35
|
+
/** Remove card from grid */
|
|
36
|
+
onRemove?: () => void;
|
|
37
|
+
/** Navigate to source data */
|
|
38
|
+
onNavigate?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const TrendCard: {
|
|
41
|
+
(props: TrendCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { TrendCard } from './TrendCard';
|
|
2
|
+
export type { TrendCardProps } from './TrendCard';
|
|
3
|
+
export { BarChartCard } from './BarChartCard';
|
|
4
|
+
export type { BarChartCardProps } from './BarChartCard';
|
|
5
|
+
export { DistributionCard } from './DistributionCard';
|
|
6
|
+
export type { DistributionCardProps } from './DistributionCard';
|
|
7
|
+
export { HighlightCard } from './HighlightCard';
|
|
8
|
+
export type { HighlightCardProps } from './HighlightCard';
|
|
9
|
+
export { DirectionCard } from './DirectionCard';
|
|
10
|
+
export type { DirectionCardProps } from './DirectionCard';
|
|
11
|
+
export { ProgressCard } from './ProgressCard';
|
|
12
|
+
export type { ProgressCardProps } from './ProgressCard';
|
|
13
|
+
export { ComparisonCard } from './ComparisonCard';
|
|
14
|
+
export type { ComparisonCardProps } from './ComparisonCard';
|
|
15
|
+
export { SegmentCard } from './SegmentCard';
|
|
16
|
+
export type { SegmentCardProps } from './SegmentCard';
|
|
17
|
+
export { SimpleMetricCard } from './SimpleMetricCard';
|
|
18
|
+
export type { SimpleMetricCardProps } from './SimpleMetricCard';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PasswordStrengthRule {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the rule
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Display label for the rule
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Validation function
|
|
13
|
+
*/
|
|
14
|
+
validate: (password: string) => boolean;
|
|
15
|
+
}
|
|
16
|
+
export type PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';
|
|
17
|
+
export interface PasswordInputProps {
|
|
18
|
+
/** Current password value */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** Default password value (uncontrolled) */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** Change handler */
|
|
23
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
/** Blur handler */
|
|
25
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
/** Field label */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Placeholder text */
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
/** Validation status */
|
|
31
|
+
status?: 'default' | 'success' | 'error' | 'pending';
|
|
32
|
+
/** Helper/error text below field */
|
|
33
|
+
helperText?: string;
|
|
34
|
+
/** Required field indicator */
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/** Disabled state */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Input name attribute */
|
|
39
|
+
name?: string;
|
|
40
|
+
/** Input id attribute */
|
|
41
|
+
id?: string;
|
|
42
|
+
/** CSS class name */
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Auto-complete hint */
|
|
45
|
+
autoComplete?: string;
|
|
46
|
+
/** Whether to show the visibility toggle button @default true */
|
|
47
|
+
showToggle?: boolean;
|
|
48
|
+
/** Whether to show the password strength indicator @default false */
|
|
49
|
+
showStrength?: boolean;
|
|
50
|
+
/** Pre-calculated password strength (if you want to control it externally) */
|
|
51
|
+
strength?: PasswordStrength;
|
|
52
|
+
/** Custom strength calculation rules. If not provided, uses default rules */
|
|
53
|
+
strengthRules?: PasswordStrengthRule[];
|
|
54
|
+
/** Whether to show a generate password button @default false */
|
|
55
|
+
showGenerate?: boolean;
|
|
56
|
+
/** Callback when generate button is clicked. If not provided, uses built-in generator */
|
|
57
|
+
onGenerate?: (password: string) => void;
|
|
58
|
+
/** Length of generated password @default 16 */
|
|
59
|
+
generateLength?: number;
|
|
60
|
+
/** Whether to show rule checklist @default false */
|
|
61
|
+
showRules?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* PasswordInput - Specialized input for password entry
|
|
65
|
+
*
|
|
66
|
+
* Features visibility toggle, strength indicator, rule checklist,
|
|
67
|
+
* and password generation.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <PasswordInput
|
|
72
|
+
* label="Password"
|
|
73
|
+
* showStrength
|
|
74
|
+
* showRules
|
|
75
|
+
* showGenerate
|
|
76
|
+
* />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { InputProps } from '../Input';
|
|
3
2
|
export interface Country {
|
|
4
3
|
/**
|
|
5
4
|
* ISO 3166-1 alpha-2 country code
|
|
@@ -19,39 +18,38 @@ export interface Country {
|
|
|
19
18
|
*/
|
|
20
19
|
format?: string;
|
|
21
20
|
}
|
|
22
|
-
export interface PhoneInputProps
|
|
23
|
-
/**
|
|
24
|
-
* Current value in E.164 format (e.g., +14155551234)
|
|
25
|
-
*/
|
|
21
|
+
export interface PhoneInputProps {
|
|
22
|
+
/** Current value in E.164 format (e.g., +14155551234) */
|
|
26
23
|
value?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Default value
|
|
29
|
-
*/
|
|
24
|
+
/** Default value */
|
|
30
25
|
defaultValue?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Callback when value changes
|
|
33
|
-
* Returns E.164 formatted value
|
|
34
|
-
*/
|
|
26
|
+
/** Callback when value changes. Returns E.164 formatted value */
|
|
35
27
|
onChange?: (value: string) => void;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
/** Field label */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Placeholder text */
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/** Validation status */
|
|
33
|
+
status?: 'default' | 'success' | 'error' | 'pending';
|
|
34
|
+
/** Helper/error text below field */
|
|
35
|
+
helperText?: string;
|
|
36
|
+
/** Required field indicator */
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/** Disabled state */
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/** Input name attribute */
|
|
41
|
+
name?: string;
|
|
42
|
+
/** Input id attribute */
|
|
43
|
+
id?: string;
|
|
44
|
+
/** CSS class name */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Default selected country code @default 'US' */
|
|
40
47
|
defaultCountry?: string;
|
|
41
|
-
/**
|
|
42
|
-
* List of countries to show in selector
|
|
43
|
-
* Uses default list if not provided
|
|
44
|
-
*/
|
|
48
|
+
/** List of countries to show in selector. Uses default list if not provided */
|
|
45
49
|
countries?: Country[];
|
|
46
|
-
/**
|
|
47
|
-
* Whether to show country selector
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
+
/** Whether to show country selector @default true */
|
|
50
51
|
showCountrySelect?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Format for display
|
|
53
|
-
* @default 'national'
|
|
54
|
-
*/
|
|
52
|
+
/** Format for display @default 'national' */
|
|
55
53
|
format?: 'national' | 'international';
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SearchSuggestion {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the suggestion
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Display text for the suggestion
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Optional description text
|
|
13
|
+
*/
|
|
14
|
+
description?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional icon name
|
|
17
|
+
*/
|
|
18
|
+
icon?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SearchInputProps {
|
|
21
|
+
/** Current search value */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Default search value (uncontrolled) */
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/** Change handler */
|
|
26
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
+
/** Key down handler */
|
|
28
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
29
|
+
/** Focus handler */
|
|
30
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
31
|
+
/** Blur handler */
|
|
32
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
33
|
+
/** Field label */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** Placeholder text @default 'Search...' */
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
/** Validation status */
|
|
38
|
+
status?: 'default' | 'success' | 'error' | 'pending';
|
|
39
|
+
/** Helper/error text below field */
|
|
40
|
+
helperText?: string;
|
|
41
|
+
/** Required field indicator */
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/** Disabled state */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Input name attribute */
|
|
46
|
+
name?: string;
|
|
47
|
+
/** Input id attribute */
|
|
48
|
+
id?: string;
|
|
49
|
+
/** CSS class name */
|
|
50
|
+
className?: string;
|
|
51
|
+
/** Auto-complete hint */
|
|
52
|
+
autoComplete?: string;
|
|
53
|
+
/** Callback when search is triggered (Enter key or search button) */
|
|
54
|
+
onSearch?: (value: string) => void;
|
|
55
|
+
/** Debounce delay in milliseconds for onChange @default 0 */
|
|
56
|
+
debounce?: number;
|
|
57
|
+
/** Whether a search is currently in progress */
|
|
58
|
+
isSearching?: boolean;
|
|
59
|
+
/** List of suggestions to display in dropdown */
|
|
60
|
+
suggestions?: SearchSuggestion[];
|
|
61
|
+
/** Callback when a suggestion is selected */
|
|
62
|
+
onSuggestionSelect?: (suggestion: SearchSuggestion) => void;
|
|
63
|
+
/** Whether to show suggestions dropdown @default false */
|
|
64
|
+
showSuggestions?: boolean;
|
|
65
|
+
/** Show keyboard shortcut hint (e.g., Cmd+K) */
|
|
66
|
+
showShortcut?: boolean;
|
|
67
|
+
/** Keyboard shortcut key (works with Cmd/Ctrl) @default 'k' */
|
|
68
|
+
shortcutKey?: string;
|
|
69
|
+
/** Whether the search input should always show clear button when has value @default true */
|
|
70
|
+
clearable?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* SearchInput - Specialized input for search functionality
|
|
74
|
+
*
|
|
75
|
+
* Features search icon, debounced onChange, suggestions dropdown,
|
|
76
|
+
* keyboard shortcut support, and loading state.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <SearchInput
|
|
81
|
+
* placeholder="Search..."
|
|
82
|
+
* onSearch={(query) => searchProducts(query)}
|
|
83
|
+
* suggestions={suggestions}
|
|
84
|
+
* onSuggestionSelect={handleSelect}
|
|
85
|
+
* showShortcut
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IconSlotProps } from '
|
|
2
|
+
import { IconSlotProps } from '../types/icon';
|
|
3
3
|
import { TooltipPlacement } from './Tooltip';
|
|
4
4
|
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'outline' | 'danger' | 'danger-outline';
|
|
5
5
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, IconSlotProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IconValue } from '
|
|
2
|
+
import { IconValue } from '../types/icon';
|
|
3
3
|
export type LinkVariant = 'default' | 'muted' | 'danger';
|
|
4
4
|
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
5
5
|
/**
|