@santi020k/lumen-react 3.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +692 -13
- package/dist/ai-surfaces.d.ts +49 -0
- package/dist/ai-surfaces.d.ts.map +1 -0
- package/dist/ai-surfaces.js +88 -0
- package/dist/amount-field.d.ts +11 -0
- package/dist/amount-field.d.ts.map +1 -0
- package/dist/amount-field.js +37 -0
- package/dist/attachments.d.ts +17 -0
- package/dist/attachments.d.ts.map +1 -0
- package/dist/attachments.js +23 -0
- package/dist/bullet-chart.d.ts +14 -0
- package/dist/bullet-chart.d.ts.map +1 -0
- package/dist/bullet-chart.js +22 -0
- package/dist/change-summary.d.ts +14 -0
- package/dist/change-summary.d.ts.map +1 -0
- package/dist/change-summary.js +4 -0
- package/dist/chart-inspection.d.ts +10 -0
- package/dist/chart-inspection.d.ts.map +1 -0
- package/dist/chart-inspection.js +11 -0
- package/dist/chart-interaction.d.ts +17 -0
- package/dist/chart-interaction.d.ts.map +1 -0
- package/dist/chart-interaction.js +50 -0
- package/dist/chart-label.d.ts +3 -0
- package/dist/chart-label.d.ts.map +1 -0
- package/dist/chart-label.js +1 -0
- package/dist/chart-recipes.d.ts +8 -0
- package/dist/chart-recipes.d.ts.map +1 -1
- package/dist/chart-recipes.js +35 -0
- package/dist/combobox.d.ts +9 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +137 -0
- package/dist/comparison-chart.d.ts +13 -0
- package/dist/comparison-chart.d.ts.map +1 -0
- package/dist/comparison-chart.js +18 -0
- package/dist/components.d.ts +106 -70
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -1949
- package/dist/dashboard.d.ts +20 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/dashboard.js +19 -0
- package/dist/data-table-range-model.d.ts +8 -0
- package/dist/data-table-range-model.d.ts.map +1 -0
- package/dist/data-table-range-model.js +31 -0
- package/dist/data-table-range.d.ts +17 -0
- package/dist/data-table-range.d.ts.map +1 -0
- package/dist/data-table-range.js +8 -0
- package/dist/data-table-saved-views.d.ts +30 -0
- package/dist/data-table-saved-views.d.ts.map +1 -0
- package/dist/data-table-saved-views.js +49 -0
- package/dist/data-table-selection-model.d.ts +23 -0
- package/dist/data-table-selection-model.d.ts.map +1 -0
- package/dist/data-table-selection-model.js +36 -0
- package/dist/data-table-selection.d.ts +11 -0
- package/dist/data-table-selection.d.ts.map +1 -0
- package/dist/data-table-selection.js +10 -0
- package/dist/data-table-state.d.ts +6 -0
- package/dist/data-table-state.d.ts.map +1 -0
- package/dist/data-table-state.js +38 -0
- package/dist/data-table-view.d.ts +88 -0
- package/dist/data-table-view.d.ts.map +1 -0
- package/dist/data-table-view.js +1 -0
- package/dist/data-table.d.ts +60 -0
- package/dist/data-table.d.ts.map +1 -0
- package/dist/data-table.js +1 -0
- package/dist/date-range-calendar.d.ts +29 -0
- package/dist/date-range-calendar.d.ts.map +1 -0
- package/dist/date-range-calendar.js +69 -0
- package/dist/date-range-input.d.ts +25 -0
- package/dist/date-range-input.d.ts.map +1 -0
- package/dist/date-range-input.js +195 -0
- package/dist/device-frame.d.ts +13 -0
- package/dist/device-frame.d.ts.map +1 -0
- package/dist/device-frame.js +23 -0
- package/dist/dialog-lifecycle.d.ts +3 -0
- package/dist/dialog-lifecycle.d.ts.map +1 -0
- package/dist/dialog-lifecycle.js +70 -0
- package/dist/expanded-charts.d.ts +26 -0
- package/dist/expanded-charts.d.ts.map +1 -0
- package/dist/expanded-charts.js +46 -0
- package/dist/floating-panel.d.ts +12 -0
- package/dist/floating-panel.d.ts.map +1 -0
- package/dist/floating-panel.js +1 -0
- package/dist/form-workflow.d.ts +77 -0
- package/dist/form-workflow.d.ts.map +1 -0
- package/dist/form-workflow.js +337 -0
- package/dist/hooks.d.ts +24 -21
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +1 -2468
- package/dist/image-comparison.d.ts +20 -0
- package/dist/image-comparison.d.ts.map +1 -0
- package/dist/image-comparison.js +55 -0
- package/dist/index.d.ts +25 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/interval-charts.d.ts +21 -0
- package/dist/interval-charts.d.ts.map +1 -0
- package/dist/interval-charts.js +23 -0
- package/dist/media-selection.d.ts +18 -0
- package/dist/media-selection.d.ts.map +1 -0
- package/dist/media-selection.js +12 -0
- package/dist/media-viewport.d.ts +16 -0
- package/dist/media-viewport.d.ts.map +1 -0
- package/dist/media-viewport.js +37 -0
- package/dist/motion.d.ts +597 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +22 -0
- package/dist/review-workflow.d.ts +32 -0
- package/dist/review-workflow.d.ts.map +1 -0
- package/dist/review-workflow.js +76 -0
- package/dist/rich-text-editor.d.ts +21 -0
- package/dist/rich-text-editor.d.ts.map +1 -0
- package/dist/rich-text-editor.js +143 -0
- package/dist/select-form.d.ts +3 -0
- package/dist/select-form.d.ts.map +1 -0
- package/dist/select-form.js +1 -0
- package/dist/server-components.d.ts +33 -6
- package/dist/server-components.d.ts.map +1 -1
- package/dist/server-components.js +26 -10
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -0
- package/dist/toast-context.d.ts +4 -0
- package/dist/toast-context.d.ts.map +1 -0
- package/dist/toast-context.js +10 -0
- package/dist/toast-provider.d.ts +3 -0
- package/dist/toast-provider.d.ts.map +1 -0
- package/dist/toast-provider.js +3 -0
- package/dist/use-copy-feedback.d.ts +17 -0
- package/dist/use-copy-feedback.d.ts.map +1 -0
- package/dist/use-copy-feedback.js +54 -0
- package/dist/virtual-list-data.d.ts +13 -0
- package/dist/virtual-list-data.d.ts.map +1 -0
- package/dist/virtual-list-data.js +87 -0
- package/dist/virtual-list.d.ts +14 -0
- package/dist/virtual-list.d.ts.map +1 -0
- package/dist/virtual-list.js +24 -0
- package/dist/visual-interactions.d.ts +16 -0
- package/dist/visual-interactions.d.ts.map +1 -0
- package/dist/visual-interactions.js +30 -0
- package/dist/world-map.d.ts +26 -0
- package/dist/world-map.d.ts.map +1 -0
- package/dist/world-map.js +81 -0
- package/package.json +99 -11
- package/styles/critical.css +696 -66
- package/styles/data-table-view.css +36 -0
package/dist/combobox.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { composeClassName } from '@santi020k/lumen-core';
|
|
5
|
+
const emptyOptions = [];
|
|
6
|
+
const isOptions = (value) => Array.isArray(value) && Array.from(value).every(option => typeof option === 'string');
|
|
7
|
+
const ignoresComboboxKeyboard = (event, composing) => event.defaultPrevented || event.nativeEvent.isComposing || composing ||
|
|
8
|
+
event.altKey || event.ctrlKey || event.metaKey;
|
|
9
|
+
const comboboxActiveId = (list, expanded, index) => expanded && index >= 0 ? `${list}-option-${index}` : undefined;
|
|
10
|
+
const comboboxIsExpanded = (open, disabled, readOnly) => open && !disabled && !readOnly;
|
|
11
|
+
export const Combobox = ({ className, defaultValue, disabled, readOnly, form, id, label, list, onBlur, onChange, onFocus, onKeyDown, options: rawOptions = emptyOptions, type = 'text', value: valueProp, wrapperClassName, ...props }) => {
|
|
12
|
+
const options = isOptions(rawOptions) ? rawOptions : emptyOptions;
|
|
13
|
+
const inputId = id ?? `${list}-input`;
|
|
14
|
+
const rootRef = useRef(null);
|
|
15
|
+
const [open, setOpen] = useState(false);
|
|
16
|
+
const [activeValue, setActiveValue] = useState();
|
|
17
|
+
const composingRef = useRef(false);
|
|
18
|
+
const [value, setValue] = useState(() => String(defaultValue ?? ''));
|
|
19
|
+
const renderedValue = valueProp ?? value;
|
|
20
|
+
const query = String(renderedValue).trim().toLowerCase();
|
|
21
|
+
const visibleOptions = useMemo(() => options.filter(option => !query || option.toLowerCase().includes(query)), [options, query]);
|
|
22
|
+
const activeIndex = activeValue === undefined ? -1 : visibleOptions.indexOf(activeValue);
|
|
23
|
+
const expanded = comboboxIsExpanded(open, disabled, readOnly);
|
|
24
|
+
const activeId = comboboxActiveId(list, expanded, activeIndex);
|
|
25
|
+
const close = () => {
|
|
26
|
+
setOpen(false);
|
|
27
|
+
setActiveValue(undefined);
|
|
28
|
+
};
|
|
29
|
+
const selectOption = (option) => {
|
|
30
|
+
const input = rootRef.current?.querySelector('input');
|
|
31
|
+
if (!input || disabled || readOnly)
|
|
32
|
+
return;
|
|
33
|
+
// Use the native setter so React's change event observes the selected value.
|
|
34
|
+
const descriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');
|
|
35
|
+
descriptor?.set?.call(input, option);
|
|
36
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
37
|
+
if (valueProp === undefined)
|
|
38
|
+
setValue(option);
|
|
39
|
+
input.focus({ preventScroll: true });
|
|
40
|
+
close();
|
|
41
|
+
};
|
|
42
|
+
const navigate = (key) => {
|
|
43
|
+
setOpen(true);
|
|
44
|
+
const index = expanded ? activeIndex : -1;
|
|
45
|
+
let next = (index + 1) % visibleOptions.length;
|
|
46
|
+
if (key === 'ArrowUp') {
|
|
47
|
+
next = index < 0 ? visibleOptions.length - 1 : (index - 1 + visibleOptions.length) % visibleOptions.length;
|
|
48
|
+
}
|
|
49
|
+
setActiveValue(visibleOptions[next]);
|
|
50
|
+
};
|
|
51
|
+
const commitActive = (event) => {
|
|
52
|
+
const option = visibleOptions[activeIndex];
|
|
53
|
+
if (!expanded || option === undefined)
|
|
54
|
+
return;
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
selectOption(option);
|
|
57
|
+
};
|
|
58
|
+
const handleKeyDown = (event) => {
|
|
59
|
+
onKeyDown?.(event);
|
|
60
|
+
if (ignoresComboboxKeyboard(event, composingRef.current) || disabled || readOnly)
|
|
61
|
+
return;
|
|
62
|
+
switch (event.key) {
|
|
63
|
+
case 'Escape':
|
|
64
|
+
if (!expanded)
|
|
65
|
+
return;
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
close();
|
|
68
|
+
break;
|
|
69
|
+
case 'ArrowDown':
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
navigate(event.key);
|
|
72
|
+
break;
|
|
73
|
+
case 'ArrowUp':
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
navigate(event.key);
|
|
76
|
+
break;
|
|
77
|
+
case 'Enter':
|
|
78
|
+
commitActive(event);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
const option = activeId ? rootRef.current?.ownerDocument.getElementById(activeId) : null;
|
|
84
|
+
if (typeof option?.scrollIntoView === 'function')
|
|
85
|
+
option.scrollIntoView({ block: 'nearest' });
|
|
86
|
+
}, [activeId]);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const input = rootRef.current?.querySelector('input');
|
|
89
|
+
const owner = input?.form;
|
|
90
|
+
let active = true;
|
|
91
|
+
let resetTimer;
|
|
92
|
+
const reset = (event) => {
|
|
93
|
+
globalThis.clearTimeout(resetTimer);
|
|
94
|
+
resetTimer = globalThis.setTimeout(() => {
|
|
95
|
+
if (!active || event.defaultPrevented || !input?.isConnected)
|
|
96
|
+
return;
|
|
97
|
+
if (valueProp === undefined)
|
|
98
|
+
setValue(String(defaultValue ?? ''));
|
|
99
|
+
setOpen(false);
|
|
100
|
+
setActiveValue(undefined);
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
owner?.addEventListener('reset', reset);
|
|
104
|
+
return () => {
|
|
105
|
+
active = false;
|
|
106
|
+
globalThis.clearTimeout(resetTimer);
|
|
107
|
+
owner?.removeEventListener('reset', reset);
|
|
108
|
+
};
|
|
109
|
+
}, [defaultValue, form, valueProp]);
|
|
110
|
+
return (_jsxs("div", { className: composeClassName('ui-combobox', wrapperClassName), "data-ui-combobox": true, onBlur: event => {
|
|
111
|
+
const nextTarget = event.relatedTarget;
|
|
112
|
+
if (!nextTarget || !event.currentTarget.contains(nextTarget)) {
|
|
113
|
+
close();
|
|
114
|
+
}
|
|
115
|
+
}, ref: rootRef, children: [label && (_jsx("label", { className: "ui-label", htmlFor: inputId, id: `${inputId}-label`, children: label })), _jsx("input", { ...props, "aria-autocomplete": "list", "aria-controls": list, "aria-expanded": expanded, "aria-activedescendant": activeId, className: composeClassName('ui-input', className), id: inputId, disabled: disabled, form: form, readOnly: readOnly, role: "combobox", type: type, value: renderedValue, onBlur: onBlur, onChange: event => {
|
|
116
|
+
if (valueProp === undefined) {
|
|
117
|
+
setValue(event.currentTarget.value);
|
|
118
|
+
}
|
|
119
|
+
setActiveValue(undefined);
|
|
120
|
+
setOpen(true);
|
|
121
|
+
onChange?.(event);
|
|
122
|
+
}, onFocus: event => {
|
|
123
|
+
if (!disabled && !readOnly)
|
|
124
|
+
setOpen(true);
|
|
125
|
+
onFocus?.(event);
|
|
126
|
+
}, onKeyDown: handleKeyDown, onCompositionStart: event => {
|
|
127
|
+
composingRef.current = true;
|
|
128
|
+
props.onCompositionStart?.(event);
|
|
129
|
+
}, onCompositionEnd: event => {
|
|
130
|
+
composingRef.current = false;
|
|
131
|
+
props.onCompositionEnd?.(event);
|
|
132
|
+
} }), _jsx("div", { className: "ui-combobox__list", hidden: !expanded, id: list, role: "listbox", "aria-label": props['aria-label'], "aria-labelledby": props['aria-labelledby'] ?? (label ? `${inputId}-label` : undefined), children: visibleOptions.map((option, index) => (_jsx("button", { id: `${list}-option-${index}`, "aria-selected": activeId === `${list}-option-${index}`, "data-ui-combobox-option": true, "data-value": option, role: "option", tabIndex: -1, type: "button", onClick: () => {
|
|
133
|
+
selectOption(option);
|
|
134
|
+
}, onMouseDown: event => {
|
|
135
|
+
event.preventDefault();
|
|
136
|
+
}, children: option }, option))) })] }));
|
|
137
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type LumenChartLabels, type LumenComparisonDatum, type LumenComparisonOptions } from '@santi020k/lumen-core';
|
|
2
|
+
import { type ChartProps } from './components.js';
|
|
3
|
+
export interface ComparisonChartProps extends Omit<ChartProps, 'children'>, Omit<LumenComparisonOptions, 'paired'> {
|
|
4
|
+
data: readonly LumenComparisonDatum[];
|
|
5
|
+
formatValue?: (value: number) => string;
|
|
6
|
+
labels?: Partial<LumenChartLabels>;
|
|
7
|
+
referenceLabel?: string;
|
|
8
|
+
valueLabel?: string;
|
|
9
|
+
showTable?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const LollipopChart: (props: ComparisonChartProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const DumbbellChart: (props: ComparisonChartProps) => import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=comparison-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparison-chart.d.ts","sourceRoot":"","sources":["../src/comparison-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+E,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAA2B,MAAM,uBAAuB,CAAA;AAE3N,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IAChH,IAAI,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACrC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAkGD,eAAO,MAAM,aAAa,GAAI,OAAO,oBAAoB,gCAAoK,CAAA;AAC7N,eAAO,MAAM,aAAa,GAAI,OAAO,oBAAoB,gCAA4J,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { composeClassName, createLumenComparisonGeometry, getLumenChartToneClassName, resolveLumenChartLabels } from '@santi020k/lumen-core';
|
|
4
|
+
import { Chart } from './components.js';
|
|
5
|
+
const resolveComparisonProps = (props) => ({
|
|
6
|
+
...props, formatValue: props.formatValue ?? String, referenceLabel: props.referenceLabel ?? 'Before', showTable: props.showTable ?? true
|
|
7
|
+
});
|
|
8
|
+
const ComparisonChart = ({ data, domain, paired, formatValue, labels, referenceLabel, valueLabel, showTable, ...props }) => {
|
|
9
|
+
const text = resolveLumenChartLabels(labels);
|
|
10
|
+
const title = valueLabel ?? text.value;
|
|
11
|
+
const model = createLumenComparisonGeometry(data, { domain, paired });
|
|
12
|
+
const format = (value) => value === null ? text.notAvailable : formatValue(value);
|
|
13
|
+
return (_jsx(Chart, { ...props, children: !model.valid || model.rows.length === 0 ?
|
|
14
|
+
_jsx("p", { className: "ui-chart__empty", role: "status", children: model.valid ? text.empty : text.invalidData }) :
|
|
15
|
+
(_jsxs(_Fragment, { children: [_jsxs("div", { className: "ui-comparison-chart__legend", children: [_jsx("span", { children: text.category }), _jsx("span", { children: paired ? `${referenceLabel} → ${title}` : title })] }), _jsx("ul", { className: "ui-comparison-chart__rows", children: model.rows.map((row, index) => (_jsxs("li", { className: getLumenChartToneClassName(row.tone, index), children: [_jsxs("div", { className: "ui-comparison-chart__label", children: [_jsx("span", { children: row.label }), _jsxs("span", { children: [paired && (_jsxs(_Fragment, { children: [format(row.reference), ' ', _jsx("span", { "aria-hidden": "true", children: "\u2192" }), ' '] })), _jsx("strong", { children: format(row.value) })] })] }), _jsxs("div", { className: "ui-comparison-chart__track", "aria-hidden": "true", children: [row.valuePosition !== null && row.referencePosition !== null && (_jsx("span", { className: "ui-comparison-chart__connector", style: { left: `${row.start * 100}%`, width: `${row.width * 100}%` } })), paired && row.referencePosition !== null && (_jsx("span", { className: "ui-comparison-chart__reference", style: { left: `${row.referencePosition * 100}%` } })), row.valuePosition !== null && (_jsx("span", { className: "ui-comparison-chart__dot", style: { left: `${row.valuePosition * 100}%` } }))] })] }, row.id))) }), _jsx("div", { className: "ui-bullet-chart__ticks", "aria-hidden": "true", children: model.ticks.map(tick => _jsx("span", { children: formatValue(tick) }, tick)) }), showTable && (_jsxs("details", { className: "ui-chart__data", children: [_jsx("summary", { children: text.viewData }), _jsx("div", { role: "group", tabIndex: 0, "aria-label": text.chartData, children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: text.category }), paired && _jsx("th", { scope: "col", children: referenceLabel }), _jsx("th", { scope: "col", children: title })] }) }), _jsx("tbody", { children: model.rows.map(row => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: row.label }), paired && _jsx("td", { children: format(row.reference) }), _jsx("td", { children: format(row.value) })] }, row.id))) })] }) })] }))] })) }));
|
|
16
|
+
};
|
|
17
|
+
export const LollipopChart = (props) => _jsx(ComparisonChart, { ...resolveComparisonProps(props), paired: false, className: composeClassName('ui-comparison-chart', 'ui-lollipop-chart', props.className) });
|
|
18
|
+
export const DumbbellChart = (props) => _jsx(ComparisonChart, { ...resolveComparisonProps(props), paired: true, className: composeClassName('ui-comparison-chart', 'ui-dumbbell-chart', props.className) });
|
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, ElementType, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
-
import { type LumenBarChartLayout, type
|
|
2
|
+
import { type LumenBarChartLayout, type LumenChartDatumActivationDetail, type LumenChartDomain, type LumenChartLabels, type LumenChartOrientation, type LumenChartSeries, type LumenChartTone, type LumenComboSeries, type LumenControlVisualSize, type LumenErrorStateAnnouncement, type LumenErrorStateKind, type LumenErrorStateLayout, type LumenFormErrorInput, type LumenFormStatus, type LumenHeatmapDatum, type LumenHeatmapOptions, type LumenIconName, type LumenLineChartOptions, type LumenPhoneCountry, type LumenPhoneCountryOptions, type LumenPhoneNumber, type LumenPieChartVariant, type LumenRangeDatum, type LumenScatterReference, type LumenScatterScaleType } from '@santi020k/lumen-core';
|
|
3
|
+
import { type ChartInteractionProps } from './chart-interaction.js';
|
|
3
4
|
import { type DialogOptions, type DropdownMenuOptions, type LanguageToggleOptions, type PopoverOptions, type ResizableDirection, type SelectOptions, type TabsOptions, type ToastPlacement, type TooltipOptions } from './hooks.js';
|
|
4
5
|
import { type InputProps } from './server-components.js';
|
|
5
6
|
export { Badge, type BadgeProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Container, type ContainerProps, Direction, type DirectionProps, Grid, type GridProps, Input, type InputProps, Label, type LabelProps, Progress, type ProgressProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Stack, type StackProps, Textarea, type TextareaProps, Typography, type TypographyProps, VisuallyHidden, type VisuallyHiddenProps } from './server-components.js';
|
|
@@ -10,23 +11,6 @@ type ButtonVariant = 'default' | 'destructive' | 'ghost' | 'link' | 'outline' |
|
|
|
10
11
|
type CodeTheme = 'auto' | 'lumen' | 'santi020k';
|
|
11
12
|
type CodeVariant = 'block' | 'inline';
|
|
12
13
|
type IconSize = 'default' | 'lg' | 'sm' | 'xl';
|
|
13
|
-
export type DataTableCell = boolean | null | number | string | undefined | {
|
|
14
|
-
label?: boolean | null | number | string;
|
|
15
|
-
sortValue?: boolean | null | number | string;
|
|
16
|
-
value?: boolean | null | number | string;
|
|
17
|
-
};
|
|
18
|
-
export interface DataTableColumn {
|
|
19
|
-
header?: string;
|
|
20
|
-
key: string;
|
|
21
|
-
label?: string;
|
|
22
|
-
sort?: 'number' | 'string';
|
|
23
|
-
sortable?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type DataTableRow = Record<string, DataTableCell> & {
|
|
26
|
-
id?: number | string;
|
|
27
|
-
rowValue?: number | string;
|
|
28
|
-
value?: number | string;
|
|
29
|
-
};
|
|
30
14
|
type MessageFrom = 'assistant' | 'user';
|
|
31
15
|
type MarkerVariant = 'danger' | 'default' | 'success' | 'warning';
|
|
32
16
|
type Orientation = 'horizontal' | 'vertical';
|
|
@@ -56,7 +40,7 @@ export interface AlertProps extends ComponentPropsWithoutRef<'aside'> {
|
|
|
56
40
|
}
|
|
57
41
|
export declare const Alert: ({ className, glass, variant, ...props }: AlertProps) => import("react").JSX.Element;
|
|
58
42
|
export type AlertDialogProps = Omit<ComponentPropsWithoutRef<'dialog'>, 'open'> & SurfaceProps & Omit<DialogOptions, 'id'>;
|
|
59
|
-
export declare const AlertDialog: ({ className, defaultOpen, glass, onClick, onClose, onOpenChange, open, ...props }: AlertDialogProps) => import("react").JSX.Element;
|
|
43
|
+
export declare const AlertDialog: ({ className, defaultOpen, dismissOnEscape, dismissOnOutsidePress, glass, onCancel, onClick, onClose, onOpenChange, onPointerDown, open, ...props }: AlertDialogProps) => import("react").JSX.Element;
|
|
60
44
|
export interface AgendaProps extends ComponentPropsWithoutRef<'section'> {
|
|
61
45
|
glass?: LumenGlassProp;
|
|
62
46
|
}
|
|
@@ -100,15 +84,20 @@ export interface CalendarProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
100
84
|
defaultValue?: string | undefined;
|
|
101
85
|
disabled?: boolean | undefined;
|
|
102
86
|
glass?: LumenGlassProp;
|
|
87
|
+
labels?: {
|
|
88
|
+
previousMonth?: string;
|
|
89
|
+
nextMonth?: string;
|
|
90
|
+
} | undefined;
|
|
103
91
|
locale?: string | undefined;
|
|
104
92
|
max?: string | undefined;
|
|
105
93
|
min?: string | undefined;
|
|
106
94
|
month?: string | undefined;
|
|
107
95
|
name?: string | undefined;
|
|
108
96
|
onValueChange?: ((value: string) => void) | undefined;
|
|
97
|
+
readOnly?: boolean | undefined;
|
|
109
98
|
value?: string | undefined;
|
|
110
99
|
}
|
|
111
|
-
export declare const Calendar: ({ className, defaultValue, disabled, glass, locale, max, min, month, name, onValueChange, value, ...props }: CalendarProps) => import("react").JSX.Element;
|
|
100
|
+
export declare const Calendar: ({ className, defaultValue, disabled, glass, labels, locale, max, min, month, name, onValueChange, readOnly, value, ...props }: CalendarProps) => import("react").JSX.Element;
|
|
112
101
|
export interface CarouselProps extends ComponentPropsWithoutRef<'section'> {
|
|
113
102
|
glass?: LumenGlassProp;
|
|
114
103
|
}
|
|
@@ -132,6 +121,7 @@ export interface SparklineProps extends Omit<ComponentPropsWithoutRef<'span'>, '
|
|
|
132
121
|
}
|
|
133
122
|
export declare const Sparkline: ({ area, className, label, showEndpoint, tone, values, ...props }: SparklineProps) => import("react").JSX.Element;
|
|
134
123
|
export interface BarChartProps extends Omit<ChartProps, 'children'> {
|
|
124
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
135
125
|
categoryWidth?: number;
|
|
136
126
|
emptyLabel?: ReactNode;
|
|
137
127
|
formatCategory?: (category: number | string) => string;
|
|
@@ -143,8 +133,9 @@ export interface BarChartProps extends Omit<ChartProps, 'children'> {
|
|
|
143
133
|
showLegend?: boolean;
|
|
144
134
|
showTable?: boolean;
|
|
145
135
|
}
|
|
146
|
-
export declare const BarChart: ({ categoryWidth, className, emptyLabel, formatCategory, formatValue, layout, labels, orientation, series, showLegend, showTable, summary, ...props }: BarChartProps) => import("react").JSX.Element;
|
|
147
|
-
export interface LineChartProps extends Omit<ChartProps, 'children'
|
|
136
|
+
export declare const BarChart: ({ categoryWidth, className, onDatumActivate, emptyLabel, formatCategory, formatValue, layout, labels, orientation, series, showLegend, showTable, summary, ...props }: BarChartProps) => import("react").JSX.Element;
|
|
137
|
+
export interface LineChartProps extends Omit<ChartProps, 'children'>, LumenLineChartOptions, ChartInteractionProps {
|
|
138
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
148
139
|
area?: boolean;
|
|
149
140
|
emptyLabel?: ReactNode;
|
|
150
141
|
formatCategory?: (category: number | string) => string;
|
|
@@ -156,8 +147,9 @@ export interface LineChartProps extends Omit<ChartProps, 'children'> {
|
|
|
156
147
|
showLegend?: boolean;
|
|
157
148
|
showTable?: boolean;
|
|
158
149
|
}
|
|
159
|
-
export declare const LineChart: ({ area, className, emptyLabel, formatCategory, formatValue, labels, markers, referenceValue, series, showLegend, showTable, summary, ...props }: LineChartProps) => import("react").JSX.Element;
|
|
150
|
+
export declare const LineChart: ({ area, onDatumActivate, annotations, domain: requestedDomain, height: requestedHeight, width: requestedWidth, xDomain, xScale, interactive, syncGroup, cursor, onCursorChange, className, emptyLabel, formatCategory, formatValue, labels, markers, referenceValue, series, showLegend, showTable, summary, ...props }: LineChartProps) => import("react").JSX.Element;
|
|
160
151
|
export interface PieChartProps extends Omit<ChartProps, 'children'> {
|
|
152
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
161
153
|
centerLabel?: ReactNode;
|
|
162
154
|
centerValue?: ReactNode;
|
|
163
155
|
labels?: Partial<LumenChartLabels>;
|
|
@@ -167,39 +159,49 @@ export interface PieChartProps extends Omit<ChartProps, 'children'> {
|
|
|
167
159
|
valueFormatter?: (value: number) => string;
|
|
168
160
|
variant?: LumenPieChartVariant;
|
|
169
161
|
}
|
|
170
|
-
export declare const PieChart: ({ centerLabel, centerValue, className, labels, series, showLegend, showTable, summary, valueFormatter, variant, ...props }: PieChartProps) => import("react").JSX.Element;
|
|
162
|
+
export declare const PieChart: ({ centerLabel, centerValue, className, onDatumActivate, labels, series, showLegend, showTable, summary, valueFormatter, variant, ...props }: PieChartProps) => import("react").JSX.Element;
|
|
171
163
|
export interface ScatterChartProps extends Omit<ChartProps, 'children'> {
|
|
164
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
172
165
|
formatValue?: (value: number) => string;
|
|
166
|
+
formatX?: (value: number | string) => string;
|
|
167
|
+
formatY?: (value: number) => string;
|
|
168
|
+
xDomain?: Partial<LumenChartDomain>;
|
|
169
|
+
domain?: Partial<LumenChartDomain>;
|
|
170
|
+
references?: readonly LumenScatterReference[];
|
|
173
171
|
labels?: Partial<LumenChartLabels>;
|
|
174
172
|
series?: readonly LumenChartSeries[];
|
|
175
173
|
showLegend?: boolean;
|
|
176
174
|
showTable?: boolean;
|
|
177
|
-
xScale?:
|
|
175
|
+
xScale?: LumenScatterScaleType;
|
|
178
176
|
}
|
|
179
|
-
export declare const ScatterChart: ({ className, formatValue, labels, series, showLegend, showTable, summary, xScale, ...props }: ScatterChartProps) => import("react").JSX.Element;
|
|
180
|
-
export interface HeatmapProps extends Omit<ChartProps, 'children'
|
|
177
|
+
export declare const ScatterChart: ({ className, onDatumActivate, formatValue, formatX, formatY, xDomain, domain, references, labels, series, showLegend, showTable, summary, xScale, ...props }: ScatterChartProps) => import("react").JSX.Element;
|
|
178
|
+
export interface HeatmapProps extends Omit<ChartProps, 'children'>, LumenHeatmapOptions {
|
|
179
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
180
|
+
showLegend?: boolean;
|
|
181
181
|
data?: readonly LumenHeatmapDatum[];
|
|
182
182
|
formatValue?: (value: number) => string;
|
|
183
183
|
labels?: Partial<LumenChartLabels>;
|
|
184
184
|
showTable?: boolean;
|
|
185
185
|
}
|
|
186
|
-
export declare const Heatmap: ({ className, data, formatValue, labels, showTable, summary, ...props }: HeatmapProps) => import("react").JSX.Element;
|
|
186
|
+
export declare const Heatmap: ({ onDatumActivate, colorScale, midpoint, domain, showLegend, className, data, formatValue, labels, showTable, summary, ...props }: HeatmapProps) => import("react").JSX.Element;
|
|
187
187
|
export interface RangeChartProps extends Omit<ChartProps, 'children'> {
|
|
188
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
188
189
|
data?: readonly LumenRangeDatum[];
|
|
189
190
|
formatValue?: (value: number) => string;
|
|
190
191
|
labels?: Partial<LumenChartLabels>;
|
|
191
192
|
showTable?: boolean;
|
|
192
193
|
tone?: LumenChartTone;
|
|
193
194
|
}
|
|
194
|
-
export declare const RangeChart: ({ className, data, formatValue, labels, showTable, summary, tone, ...props }: RangeChartProps) => import("react").JSX.Element;
|
|
195
|
+
export declare const RangeChart: ({ className, onDatumActivate, data, formatValue, labels, showTable, summary, tone, ...props }: RangeChartProps) => import("react").JSX.Element;
|
|
195
196
|
export interface ComboChartProps extends Omit<ChartProps, 'children'> {
|
|
197
|
+
onDatumActivate?: (detail: LumenChartDatumActivationDetail) => void;
|
|
196
198
|
formatValue?: (value: number) => string;
|
|
197
199
|
labels?: Partial<LumenChartLabels>;
|
|
198
200
|
series?: readonly LumenComboSeries[];
|
|
199
201
|
showLegend?: boolean;
|
|
200
202
|
showTable?: boolean;
|
|
201
203
|
}
|
|
202
|
-
export declare const ComboChart: ({ className, formatValue, labels, series, showLegend, showTable, summary, ...props }: ComboChartProps) => import("react").JSX.Element;
|
|
204
|
+
export declare const ComboChart: ({ className, onDatumActivate, formatValue, labels, series, showLegend, showTable, summary, ...props }: ComboChartProps) => import("react").JSX.Element;
|
|
203
205
|
export type CheckboxProps = Omit<ComponentPropsWithRef<'input'>, 'type'>;
|
|
204
206
|
export declare const Checkbox: ({ className, ref, ...props }: CheckboxProps) => import("react").JSX.Element;
|
|
205
207
|
export interface CheckboxGroupProps extends ComponentPropsWithRef<'fieldset'> {
|
|
@@ -211,6 +213,10 @@ export declare const CheckboxGroup: ({ children, className, invalid, legend, ori
|
|
|
211
213
|
export type CollapsibleProps = ComponentPropsWithoutRef<'details'>;
|
|
212
214
|
export declare const Collapsible: ({ className, ...props }: CollapsibleProps) => import("react").JSX.Element;
|
|
213
215
|
export interface CodeProps extends ComponentPropsWithoutRef<'figure'> {
|
|
216
|
+
codeLabel?: string;
|
|
217
|
+
copyLabel?: string;
|
|
218
|
+
copiedLabel?: string;
|
|
219
|
+
errorLabel?: string;
|
|
214
220
|
code?: string;
|
|
215
221
|
copy?: boolean;
|
|
216
222
|
highlighted?: boolean;
|
|
@@ -220,7 +226,7 @@ export interface CodeProps extends ComponentPropsWithoutRef<'figure'> {
|
|
|
220
226
|
variant?: CodeVariant;
|
|
221
227
|
wrap?: boolean;
|
|
222
228
|
}
|
|
223
|
-
export declare const Code: ({ children, className, code, copy, highlighted, label, language, theme, variant, wrap, ...props }: CodeProps) => import("react").JSX.Element;
|
|
229
|
+
export declare const Code: ({ children, className, code, copy, codeLabel, copyLabel, copiedLabel, errorLabel, highlighted, label, language, theme, variant, wrap, ...props }: CodeProps) => import("react").JSX.Element;
|
|
224
230
|
export interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
225
231
|
copiedContent?: ReactNode;
|
|
226
232
|
copiedLabel?: string;
|
|
@@ -244,19 +250,17 @@ export interface CodeTabItem {
|
|
|
244
250
|
export interface CodeTabsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'defaultValue'> {
|
|
245
251
|
ariaLabel?: string;
|
|
246
252
|
copy?: boolean;
|
|
253
|
+
codeLabel?: string;
|
|
254
|
+
copyLabel?: string;
|
|
255
|
+
copiedLabel?: string;
|
|
256
|
+
errorLabel?: string;
|
|
247
257
|
initialValue?: string;
|
|
248
258
|
items?: readonly CodeTabItem[];
|
|
249
259
|
storageKey?: string;
|
|
250
260
|
theme?: CodeTheme;
|
|
251
261
|
wrap?: boolean;
|
|
252
262
|
}
|
|
253
|
-
export
|
|
254
|
-
label?: ReactNode;
|
|
255
|
-
list: string;
|
|
256
|
-
options?: string[];
|
|
257
|
-
wrapperClassName?: string;
|
|
258
|
-
}
|
|
259
|
-
export declare const Combobox: ({ className, defaultValue, id, label, list, onBlur, onChange, onFocus, onKeyDown, options, type, value: valueProp, wrapperClassName, ...props }: ComboboxProps) => import("react").JSX.Element;
|
|
263
|
+
export { Combobox, type ComboboxProps } from './combobox.js';
|
|
260
264
|
export interface CommandProps extends ComponentPropsWithoutRef<'div'> {
|
|
261
265
|
glass?: LumenGlassProp;
|
|
262
266
|
}
|
|
@@ -266,22 +270,21 @@ export interface ContextMenuProps extends ComponentPropsWithoutRef<'menu'>, Surf
|
|
|
266
270
|
export declare const ContextMenu: ({ className, glass, ...props }: ContextMenuProps) => import("react").JSX.Element;
|
|
267
271
|
export type ColorPickerProps = ComponentPropsWithoutRef<'input'>;
|
|
268
272
|
export declare const ColorPicker: ({ className, type, ...props }: ColorPickerProps) => import("react").JSX.Element;
|
|
269
|
-
export interface DataTableProps extends ComponentPropsWithoutRef<'div'> {
|
|
270
|
-
columns?: DataTableColumn[];
|
|
271
|
-
glass?: LumenGlassProp;
|
|
272
|
-
name?: string;
|
|
273
|
-
rows?: DataTableRow[];
|
|
274
|
-
selectable?: boolean;
|
|
275
|
-
}
|
|
276
|
-
export declare const DataTable: ({ children, className, columns, glass, name, rows, selectable, ...props }: DataTableProps) => import("react").JSX.Element;
|
|
277
273
|
export type DatePickerProps = Omit<ComponentPropsWithoutRef<'input'>, 'defaultValue' | 'type' | 'value'> & SurfaceProps & {
|
|
278
274
|
defaultValue?: string;
|
|
275
|
+
formatDate?: (value: string) => string;
|
|
279
276
|
inputRef?: Ref<HTMLInputElement>;
|
|
277
|
+
labels?: {
|
|
278
|
+
chooseDate?: string;
|
|
279
|
+
previousMonth?: string;
|
|
280
|
+
nextMonth?: string;
|
|
281
|
+
};
|
|
282
|
+
locale?: string;
|
|
280
283
|
onValueChange?: (value: string) => void;
|
|
281
284
|
placeholder?: string;
|
|
282
285
|
value?: string;
|
|
283
286
|
};
|
|
284
|
-
export declare const DatePicker: ({ className, defaultValue, disabled, glass, id, inputRef, max, min, name, onChange, onInvalid, onValueChange, placeholder, required, value, ...props }: DatePickerProps) => import("react").JSX.Element;
|
|
287
|
+
export declare const DatePicker: ({ className, defaultValue, disabled, formatDate, glass, id, inputRef, labels, locale, max, min, name, onChange, onInvalid, onValueChange, placeholder, readOnly, required, value, ...props }: DatePickerProps) => import("react").JSX.Element;
|
|
285
288
|
export type DateRangePickerProps = ComponentPropsWithoutRef<'div'> & {
|
|
286
289
|
onRangeChange?: (range: {
|
|
287
290
|
end?: string;
|
|
@@ -292,12 +295,24 @@ export declare const DateRangePicker: ({ className, onInput, onRangeChange, ...p
|
|
|
292
295
|
export type DialogProps = Omit<ComponentPropsWithoutRef<'dialog'>, 'open'> & SurfaceProps & Omit<DialogOptions, 'id'> & {
|
|
293
296
|
layout?: 'centered' | 'fullscreen';
|
|
294
297
|
};
|
|
295
|
-
export
|
|
298
|
+
export type DialogHeaderProps = ComponentPropsWithRef<'header'>;
|
|
299
|
+
export declare const DialogHeader: ({ className, ...props }: DialogHeaderProps) => import("react").JSX.Element;
|
|
300
|
+
export type DialogTitleProps = ComponentPropsWithRef<'h2'> & {
|
|
301
|
+
as?: 'h2' | 'h3' | 'h4';
|
|
302
|
+
};
|
|
303
|
+
export declare const DialogTitle: ({ as: Tag, className, ...props }: DialogTitleProps) => import("react").JSX.Element;
|
|
304
|
+
export type DialogBodyProps = ComponentPropsWithRef<'div'>;
|
|
305
|
+
export declare const DialogBody: ({ className, ...props }: DialogBodyProps) => import("react").JSX.Element;
|
|
306
|
+
export type DialogFooterProps = ComponentPropsWithRef<'footer'>;
|
|
307
|
+
export declare const DialogFooter: ({ className, ...props }: DialogFooterProps) => import("react").JSX.Element;
|
|
308
|
+
export type DialogCloseProps = ButtonProps;
|
|
309
|
+
export declare const DialogClose: ({ className, onClick, ...props }: DialogCloseProps) => import("react").JSX.Element;
|
|
310
|
+
export declare const Dialog: ({ children, className, defaultOpen, dismissOnEscape, dismissOnOutsidePress, glass, layout, onCancel, onClick, onClose, onOpenChange, onPointerDown, open, ...props }: DialogProps) => import("react").JSX.Element;
|
|
296
311
|
export interface DrawerProps extends ComponentPropsWithoutRef<'dialog'>, SurfaceProps {
|
|
297
312
|
}
|
|
298
313
|
export declare const Drawer: ({ className, glass, ...props }: DrawerProps) => import("react").JSX.Element;
|
|
299
314
|
export type DropdownMenuProps = ComponentPropsWithoutRef<'menu'> & SurfaceProps & Omit<DropdownMenuOptions, 'id'>;
|
|
300
|
-
export declare const DropdownMenu: ({ children, className, defaultOpen, glass, onOpenChange, open, ...props }: DropdownMenuProps) => import("react").JSX.Element;
|
|
315
|
+
export declare const DropdownMenu: ({ children, className, collisionPadding, defaultOpen, glass, offset, onOpenChange, open, placement, positioning, ...props }: DropdownMenuProps) => import("react").JSX.Element;
|
|
301
316
|
export type DropdownMenuTriggerProps = ComponentPropsWithoutRef<'button'>;
|
|
302
317
|
export declare const DropdownMenuTrigger: ({ onClick, onKeyDown, ...props }: DropdownMenuTriggerProps) => import("react").JSX.Element;
|
|
303
318
|
export type DropdownMenuContentProps = ComponentPropsWithoutRef<'div'>;
|
|
@@ -692,17 +707,25 @@ export interface MessageProps extends ComponentPropsWithoutRef<'article'> {
|
|
|
692
707
|
export declare const Message: ({ className, from, ...props }: MessageProps) => import("react").JSX.Element;
|
|
693
708
|
export interface MessageScrollerProps extends ComponentPropsWithoutRef<'div'> {
|
|
694
709
|
glass?: LumenGlassProp;
|
|
710
|
+
autoScroll?: boolean;
|
|
711
|
+
scrollThreshold?: number;
|
|
695
712
|
}
|
|
696
|
-
export declare const MessageScroller: ({ className, glass, ...props }: MessageScrollerProps) => import("react").JSX.Element;
|
|
713
|
+
export declare const MessageScroller: ({ className, glass, autoScroll, scrollThreshold, ...props }: MessageScrollerProps) => import("react").JSX.Element;
|
|
697
714
|
export interface NativeSelectProps extends ComponentPropsWithRef<'select'> {
|
|
698
715
|
options?: SelectOption[];
|
|
699
716
|
placeholder?: string;
|
|
700
|
-
visualSize?:
|
|
717
|
+
visualSize?: LumenControlVisualSize;
|
|
701
718
|
}
|
|
702
719
|
export declare const NativeSelect: ({ children, className, defaultValue, options, placeholder, ref, value, visualSize, ...props }: NativeSelectProps) => import("react").JSX.Element;
|
|
703
720
|
export interface PhoneInputProps extends Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> {
|
|
704
721
|
countries?: SelectOption[];
|
|
705
722
|
countryOptions?: readonly LumenPhoneCountry[];
|
|
723
|
+
disabled?: boolean;
|
|
724
|
+
readOnly?: boolean;
|
|
725
|
+
required?: boolean;
|
|
726
|
+
errorMessage?: string;
|
|
727
|
+
inputProps?: Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'defaultValue' | 'onChange' | 'name' | 'type'>;
|
|
728
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
706
729
|
countryLabel?: string;
|
|
707
730
|
countryName?: string;
|
|
708
731
|
defaultCountryValue?: string;
|
|
@@ -713,9 +736,19 @@ export interface PhoneInputProps extends Omit<ComponentPropsWithoutRef<'div'>, '
|
|
|
713
736
|
onValueChange?: (value: LumenPhoneNumber) => void;
|
|
714
737
|
placeholder?: string;
|
|
715
738
|
showValidationError?: boolean;
|
|
716
|
-
|
|
739
|
+
visualSize?: LumenControlVisualSize;
|
|
717
740
|
value?: LumenPhoneNumber;
|
|
718
741
|
}
|
|
742
|
+
export interface CountryFlagProps extends ComponentPropsWithoutRef<'span'> {
|
|
743
|
+
regionCode: string;
|
|
744
|
+
decorative?: boolean;
|
|
745
|
+
}
|
|
746
|
+
export declare const CountryFlag: ({ regionCode, decorative, className, ...props }: CountryFlagProps) => import("react").JSX.Element;
|
|
747
|
+
export interface PhoneNumberProps extends ComponentPropsWithoutRef<'span'> {
|
|
748
|
+
value: LumenPhoneNumber;
|
|
749
|
+
link?: boolean;
|
|
750
|
+
}
|
|
751
|
+
export declare const PhoneNumber: ({ value, link, className, ...props }: PhoneNumberProps) => import("react").JSX.Element;
|
|
719
752
|
export declare const PhoneInput: (props: PhoneInputProps) => import("react").JSX.Element;
|
|
720
753
|
export interface NavigationMenuProps extends ComponentPropsWithoutRef<'nav'>, SurfaceProps {
|
|
721
754
|
variant?: 'default' | 'unstyled';
|
|
@@ -729,11 +762,11 @@ export declare const ContextNavigation: ({ children, className, context, variant
|
|
|
729
762
|
export type PaginationProps = ComponentPropsWithoutRef<'nav'>;
|
|
730
763
|
export declare const Pagination: ({ "aria-label": ariaLabel, className, ...props }: PaginationProps) => import("react").JSX.Element;
|
|
731
764
|
export type PopoverProps = ComponentPropsWithoutRef<'div'> & SurfaceProps & Omit<PopoverOptions, 'id'>;
|
|
732
|
-
export declare const Popover: ({ children, className, defaultOpen, glass, onOpenChange, open, ...props }: PopoverProps) => import("react").JSX.Element;
|
|
733
|
-
export type PopoverTriggerProps =
|
|
765
|
+
export declare const Popover: ({ children, className, collisionPadding, defaultOpen, glass, offset, onOpenChange, open, placement, positioning, ...props }: PopoverProps) => import("react").JSX.Element;
|
|
766
|
+
export type PopoverTriggerProps = ButtonProps;
|
|
734
767
|
export declare const PopoverTrigger: ({ onClick, onKeyDown, ...props }: PopoverTriggerProps) => import("react").JSX.Element;
|
|
735
768
|
export type PopoverPanelProps = ComponentPropsWithoutRef<'div'>;
|
|
736
|
-
export declare const PopoverPanel: ({ onKeyDown, ...props }: PopoverPanelProps) => import("react").JSX.Element;
|
|
769
|
+
export declare const PopoverPanel: ({ className, onKeyDown, ...props }: PopoverPanelProps) => import("react").JSX.Element;
|
|
737
770
|
export type RadioGroupProps = ComponentPropsWithoutRef<'fieldset'>;
|
|
738
771
|
export declare const RadioGroup: ({ className, ...props }: RadioGroupProps) => import("react").JSX.Element;
|
|
739
772
|
export interface ResizableProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -762,13 +795,13 @@ export interface ScheduleProps extends ComponentPropsWithoutRef<'section'> {
|
|
|
762
795
|
export declare const Schedule: ({ className, glass, ...props }: ScheduleProps) => import("react").JSX.Element;
|
|
763
796
|
export type SearchFieldProps = ComponentPropsWithRef<'input'>;
|
|
764
797
|
export declare const SearchField: ({ className, ref, type, ...props }: SearchFieldProps) => import("react").JSX.Element;
|
|
765
|
-
export interface SelectProps extends Omit<NativeSelectProps, 'defaultValue' | 'disabled' | 'id' | 'name' | 'onChange' | 'options' | 'placeholder' | 'required' | '
|
|
798
|
+
export interface SelectProps extends Omit<NativeSelectProps, 'defaultValue' | 'disabled' | 'id' | 'name' | 'onChange' | 'options' | 'placeholder' | 'required' | 'value'>, SelectOptions {
|
|
766
799
|
glass?: LumenGlassProp;
|
|
767
800
|
inputRef?: Ref<HTMLSelectElement>;
|
|
768
801
|
onChange?: ComponentPropsWithoutRef<'select'>['onChange'];
|
|
769
|
-
|
|
802
|
+
visualSize?: LumenControlVisualSize;
|
|
770
803
|
}
|
|
771
|
-
export declare const Select: ({ children, className, defaultValue, disabled, glass, id, inputRef, name, onChange, onValueChange, options, placeholder, required,
|
|
804
|
+
export declare const Select: ({ children, className, defaultValue, disabled, glass, id, inputRef, name, onChange, onValueChange, options, placeholder, required, visualSize, value, ...props }: SelectProps) => import("react").JSX.Element;
|
|
772
805
|
export interface ListBoxProps extends Omit<ComponentPropsWithRef<'select'>, 'children' | 'defaultValue' | 'onChange' | 'size' | 'value'> {
|
|
773
806
|
defaultValue?: string | string[];
|
|
774
807
|
emptyMessage?: ReactNode;
|
|
@@ -803,9 +836,10 @@ export interface TableProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
803
836
|
}
|
|
804
837
|
export declare const Table: ({ className, glass, layout, ...props }: TableProps) => import("react").JSX.Element;
|
|
805
838
|
export interface TabsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'id' | 'onChange'>, Omit<TabsOptions, 'id'> {
|
|
839
|
+
indicator?: boolean;
|
|
806
840
|
glass?: LumenGlassProp;
|
|
807
841
|
}
|
|
808
|
-
export declare const Tabs: ({ children, className, defaultValue, glass, onValueChange, orientation, value, ...props }: TabsProps) => import("react").JSX.Element;
|
|
842
|
+
export declare const Tabs: ({ children, className, defaultValue, glass, indicator, onValueChange, orientation, value, ...props }: TabsProps) => import("react").JSX.Element;
|
|
809
843
|
export type TabsListProps = ComponentPropsWithoutRef<'div'>;
|
|
810
844
|
export declare const TabsList: ({ ...props }: TabsListProps) => import("react").JSX.Element;
|
|
811
845
|
export interface TabsTriggerProps extends ComponentPropsWithoutRef<'button'> {
|
|
@@ -816,7 +850,7 @@ export interface TabsPanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
816
850
|
value: string;
|
|
817
851
|
}
|
|
818
852
|
export declare const TabsPanel: ({ value, ...props }: TabsPanelProps) => import("react").JSX.Element;
|
|
819
|
-
export declare const CodeTabs: ({ ariaLabel, className, copy, initialValue, items, storageKey, theme, wrap, ...props }: CodeTabsProps) => import("react").JSX.Element;
|
|
853
|
+
export declare const CodeTabs: ({ ariaLabel, className, copy, codeLabel, copyLabel, copiedLabel, errorLabel, initialValue, items, storageKey, theme, wrap, ...props }: CodeTabsProps) => import("react").JSX.Element;
|
|
820
854
|
export type TagGroupProps = ComponentPropsWithoutRef<'div'>;
|
|
821
855
|
export declare const TagGroup: ({ className, role, ...props }: TagGroupProps) => import("react").JSX.Element;
|
|
822
856
|
export interface ThemeBuilderProps extends ComponentPropsWithoutRef<'section'> {
|
|
@@ -848,12 +882,7 @@ export interface TreeGridProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
848
882
|
glass?: LumenGlassProp;
|
|
849
883
|
}
|
|
850
884
|
export declare const TreeGrid: ({ className, glass, role, ...props }: TreeGridProps) => import("react").JSX.Element;
|
|
851
|
-
export
|
|
852
|
-
glass?: LumenGlassProp;
|
|
853
|
-
itemSize?: number | string;
|
|
854
|
-
overscan?: number | string;
|
|
855
|
-
}
|
|
856
|
-
export declare const VirtualList: ({ className, glass, itemSize, overscan, ...props }: VirtualListProps) => import("react").JSX.Element;
|
|
885
|
+
export { VirtualList, type VirtualListDataProps, type VirtualListProps } from './virtual-list.js';
|
|
857
886
|
export type BackToTopProps = ComponentPropsWithoutRef<'button'>;
|
|
858
887
|
export declare const BackToTop: ({ className, type, ...props }: BackToTopProps) => import("react").JSX.Element;
|
|
859
888
|
export type CalloutProps = ComponentPropsWithoutRef<'aside'>;
|
|
@@ -1007,12 +1036,13 @@ export interface StepperProps extends ComponentPropsWithoutRef<'ol'> {
|
|
|
1007
1036
|
steps?: StepItem[];
|
|
1008
1037
|
}
|
|
1009
1038
|
export declare const Stepper: ({ children, className, currentStep, orientation, steps, ...props }: StepperProps) => import("react").JSX.Element;
|
|
1010
|
-
export interface FileUploadProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {
|
|
1039
|
+
export interface FileUploadProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size' | 'value' | 'defaultValue'> {
|
|
1011
1040
|
hint?: ReactNode;
|
|
1012
1041
|
inputClassName?: string;
|
|
1013
1042
|
label?: ReactNode;
|
|
1043
|
+
selectedFilesLabel?: string;
|
|
1014
1044
|
}
|
|
1015
|
-
export declare const FileUpload: ({ children, className, hint, id, inputClassName, label, onChange, ref, ...props }: FileUploadProps) => import("react").JSX.Element;
|
|
1045
|
+
export declare const FileUpload: ({ children, className, hint, id, inputClassName, label, selectedFilesLabel, onChange, ref, ...props }: FileUploadProps) => import("react").JSX.Element;
|
|
1016
1046
|
export interface TourStep {
|
|
1017
1047
|
content: ReactNode;
|
|
1018
1048
|
target: string;
|
|
@@ -1041,10 +1071,10 @@ export interface SegmentedProps extends Omit<ComponentPropsWithoutRef<'div'>, 'o
|
|
|
1041
1071
|
name?: string;
|
|
1042
1072
|
onValueChange?: (value: string) => void;
|
|
1043
1073
|
options?: SelectOption[];
|
|
1044
|
-
|
|
1074
|
+
visualSize?: LumenControlVisualSize;
|
|
1045
1075
|
value?: string;
|
|
1046
1076
|
}
|
|
1047
|
-
export declare const Segmented: ({ children, className, defaultValue, name, onValueChange, options,
|
|
1077
|
+
export declare const Segmented: ({ children, className, defaultValue, name, onValueChange, options, visualSize, value, ...props }: SegmentedProps) => import("react").JSX.Element;
|
|
1048
1078
|
export interface ToolbarProps extends ComponentPropsWithoutRef<'div'> {
|
|
1049
1079
|
orientation?: Orientation;
|
|
1050
1080
|
}
|
|
@@ -1141,4 +1171,10 @@ export interface SpeedDialProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
1141
1171
|
label?: string;
|
|
1142
1172
|
}
|
|
1143
1173
|
export declare const SpeedDial: ({ actions, children, className, defaultOpen, direction, label, onBlur, ...props }: SpeedDialProps) => import("react").JSX.Element;
|
|
1174
|
+
export type DescriptionItemProps = ComponentPropsWithRef<'div'>;
|
|
1175
|
+
export declare const DescriptionItem: ({ className, ...props }: DescriptionItemProps) => import("react").JSX.Element;
|
|
1176
|
+
export type DescriptionTermProps = ComponentPropsWithRef<'dt'>;
|
|
1177
|
+
export declare const DescriptionTerm: ({ className, ...props }: DescriptionTermProps) => import("react").JSX.Element;
|
|
1178
|
+
export type DescriptionDetailProps = ComponentPropsWithRef<'dd'>;
|
|
1179
|
+
export declare const DescriptionDetail: ({ className, ...props }: DescriptionDetailProps) => import("react").JSX.Element;
|
|
1144
1180
|
//# sourceMappingURL=components.d.ts.map
|