@geomak/ui 5.7.2 → 5.9.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/dist/index.cjs +285 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +387 -29
- package/dist/index.d.ts +387 -29
- package/dist/index.js +276 -40
- package/dist/index.js.map +1 -1
- package/dist/styles.css +30 -52
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -614,6 +614,10 @@ interface IconButtonProps {
|
|
|
614
614
|
loading?: boolean;
|
|
615
615
|
loadingIcon?: React.ReactNode;
|
|
616
616
|
title?: string;
|
|
617
|
+
/** Extra classes appended to the button. */
|
|
618
|
+
className?: string;
|
|
619
|
+
/** Inline style on the button. */
|
|
620
|
+
style?: React.CSSProperties;
|
|
617
621
|
}
|
|
618
622
|
/**
|
|
619
623
|
* Square icon-only button.
|
|
@@ -622,7 +626,7 @@ interface IconButtonProps {
|
|
|
622
626
|
* <IconButton icon={<Icon.Search />} onClick={doSearch} />
|
|
623
627
|
* <IconButton type="bordered" icon={<Icon.Edit />} />
|
|
624
628
|
*/
|
|
625
|
-
declare function IconButton({ icon, onClick, type, buttonType, disabled, size, loading, loadingIcon, }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
629
|
+
declare function IconButton({ icon, onClick, type, buttonType, disabled, size, loading, loadingIcon, className, style, }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
626
630
|
|
|
627
631
|
interface ModalProps {
|
|
628
632
|
/**
|
|
@@ -646,6 +650,8 @@ interface ModalProps {
|
|
|
646
650
|
hasFooter?: boolean;
|
|
647
651
|
title?: React__default.ReactNode;
|
|
648
652
|
children?: React__default.ReactNode;
|
|
653
|
+
/** Extra classes merged onto the modal panel. */
|
|
654
|
+
className?: string;
|
|
649
655
|
}
|
|
650
656
|
/**
|
|
651
657
|
* Centred modal dialog powered by Radix Dialog + Framer Motion.
|
|
@@ -659,7 +665,7 @@ interface ModalProps {
|
|
|
659
665
|
* Are you sure you want to delete this item?
|
|
660
666
|
* </Modal>
|
|
661
667
|
*/
|
|
662
|
-
declare function Modal({ width, size, isOpen, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
668
|
+
declare function Modal({ width, size, isOpen, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
663
669
|
|
|
664
670
|
interface DrawerProps {
|
|
665
671
|
isOpen?: boolean;
|
|
@@ -674,6 +680,8 @@ interface DrawerProps {
|
|
|
674
680
|
onCancel?: () => void;
|
|
675
681
|
title?: React__default.ReactNode;
|
|
676
682
|
children?: React__default.ReactNode;
|
|
683
|
+
/** Extra classes merged onto the drawer panel. */
|
|
684
|
+
className?: string;
|
|
677
685
|
}
|
|
678
686
|
/**
|
|
679
687
|
* Side-sliding drawer panel powered by Radix Dialog + Framer Motion.
|
|
@@ -687,7 +695,7 @@ interface DrawerProps {
|
|
|
687
695
|
* <FilterForm />
|
|
688
696
|
* </Drawer>
|
|
689
697
|
*/
|
|
690
|
-
declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText, cancelText, onOk, onCancel, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
698
|
+
declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
691
699
|
|
|
692
700
|
interface TooltipProps {
|
|
693
701
|
children: React__default.ReactNode;
|
|
@@ -959,6 +967,10 @@ interface ListProps {
|
|
|
959
967
|
* `'comfortable'` (default) for typical UI, `'spacious'` for hero rows.
|
|
960
968
|
*/
|
|
961
969
|
density?: 'compact' | 'comfortable' | 'spacious';
|
|
970
|
+
/** Extra classes merged onto the list root. */
|
|
971
|
+
className?: string;
|
|
972
|
+
/** Inline style on the list root. */
|
|
973
|
+
style?: React__default.CSSProperties;
|
|
962
974
|
}
|
|
963
975
|
/**
|
|
964
976
|
* Vertical clickable list with optional avatar / description / trailing
|
|
@@ -998,7 +1010,7 @@ interface ListProps {
|
|
|
998
1010
|
* />
|
|
999
1011
|
* ```
|
|
1000
1012
|
*/
|
|
1001
|
-
declare function List({ items, onItemClick, activeKey, density, }: ListProps): react_jsx_runtime.JSX.Element;
|
|
1013
|
+
declare function List({ items, onItemClick, activeKey, density, className, style, }: ListProps): react_jsx_runtime.JSX.Element;
|
|
1002
1014
|
|
|
1003
1015
|
interface ScalableContainerProps {
|
|
1004
1016
|
/** Resting width. Any CSS length / percent. Default `'100%'`. */
|
|
@@ -1071,6 +1083,10 @@ interface GridCardProps {
|
|
|
1071
1083
|
buttonText?: string;
|
|
1072
1084
|
/** Called when the button is clicked. Receives the full item. */
|
|
1073
1085
|
onOpen?: (item: GridCardItem) => void;
|
|
1086
|
+
/** Extra classes merged onto the card root. */
|
|
1087
|
+
className?: string;
|
|
1088
|
+
/** Inline style on the card root. */
|
|
1089
|
+
style?: React__default.CSSProperties;
|
|
1074
1090
|
}
|
|
1075
1091
|
/**
|
|
1076
1092
|
* Application card tile (grid layout).
|
|
@@ -1083,7 +1099,7 @@ interface GridCardProps {
|
|
|
1083
1099
|
* onOpen={({ to }) => navigate(to!)}
|
|
1084
1100
|
* />
|
|
1085
1101
|
*/
|
|
1086
|
-
declare function GridCard({ item, buttonText, onOpen }: GridCardProps): react_jsx_runtime.JSX.Element;
|
|
1102
|
+
declare function GridCard({ item, buttonText, onOpen, className, style }: GridCardProps): react_jsx_runtime.JSX.Element;
|
|
1087
1103
|
|
|
1088
1104
|
interface OpaqueGridCardProps {
|
|
1089
1105
|
item: GridCardItem;
|
|
@@ -1376,6 +1392,10 @@ interface TableProps<T extends Record<string, any> = Record<string, any>> {
|
|
|
1376
1392
|
loading?: boolean;
|
|
1377
1393
|
/** Number of skeleton rows to render when `loading` is true. Default `8`. */
|
|
1378
1394
|
loadingRowCount?: number;
|
|
1395
|
+
/** Extra classes merged onto the table wrapper root. */
|
|
1396
|
+
className?: string;
|
|
1397
|
+
/** Inline style on the table wrapper root. */
|
|
1398
|
+
style?: React__default.CSSProperties;
|
|
1379
1399
|
}
|
|
1380
1400
|
/** ─────────────────── main component ─────────────────── */
|
|
1381
1401
|
/**
|
|
@@ -1418,7 +1438,7 @@ interface TableProps<T extends Record<string, any> = Record<string, any>> {
|
|
|
1418
1438
|
* />
|
|
1419
1439
|
* ```
|
|
1420
1440
|
*/
|
|
1421
|
-
declare function Table<T extends Record<string, any> = Record<string, any>>({ columns, rows, getRowKey, pagination, expandRow, hasSearch, footer, header, loading, loadingRowCount, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1441
|
+
declare function Table<T extends Record<string, any> = Record<string, any>>({ columns, rows, getRowKey, pagination, expandRow, hasSearch, footer, header, loading, loadingRowCount, className, style, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1422
1442
|
|
|
1423
1443
|
interface ThemeSwitchProps {
|
|
1424
1444
|
checked: boolean;
|
|
@@ -1515,6 +1535,8 @@ interface SidebarProps {
|
|
|
1515
1535
|
collapsedWidth?: number;
|
|
1516
1536
|
/** Slot rendered at the bottom of the sidebar (theme switch, user avatar…) */
|
|
1517
1537
|
footer?: React__default.ReactNode;
|
|
1538
|
+
/** Extra classes merged onto the sidebar root (`<aside>`). */
|
|
1539
|
+
className?: string;
|
|
1518
1540
|
}
|
|
1519
1541
|
/** ─────────────────── main component ─────────────────── */
|
|
1520
1542
|
/**
|
|
@@ -1532,7 +1554,7 @@ interface SidebarProps {
|
|
|
1532
1554
|
* onToggle={() => setOpen(o => !o)}
|
|
1533
1555
|
* />
|
|
1534
1556
|
*/
|
|
1535
|
-
declare function Sidebar({ sections, isExpanded, onToggle, expandedWidth, collapsedWidth, footer, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
1557
|
+
declare function Sidebar({ sections, isExpanded, onToggle, expandedWidth, collapsedWidth, footer, className, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
1536
1558
|
|
|
1537
1559
|
interface AppShellProps {
|
|
1538
1560
|
/**
|
|
@@ -1787,6 +1809,7 @@ interface SkeletonCardProps extends SkeletonBaseProps {
|
|
|
1787
1809
|
declare function SkeletonCard({ hasAvatar, lines, className, style }: SkeletonCardProps): react_jsx_runtime.JSX.Element;
|
|
1788
1810
|
|
|
1789
1811
|
interface ButtonProps {
|
|
1812
|
+
/** Button content (text or nodes). */
|
|
1790
1813
|
content?: React__default.ReactNode;
|
|
1791
1814
|
/** Visual style variant */
|
|
1792
1815
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
@@ -1794,12 +1817,17 @@ interface ButtonProps {
|
|
|
1794
1817
|
size?: 'sm' | 'md' | 'lg';
|
|
1795
1818
|
/** HTML button type */
|
|
1796
1819
|
buttonType?: 'button' | 'submit' | 'reset';
|
|
1820
|
+
/** Show a loading spinner and disable the control. */
|
|
1797
1821
|
loading?: boolean;
|
|
1822
|
+
/** Disable interaction and dim the control. */
|
|
1798
1823
|
disabled?: boolean;
|
|
1799
1824
|
/** Inline style overrides (width, etc.). Margins/layout belong in the parent. */
|
|
1800
1825
|
style?: React__default.CSSProperties;
|
|
1826
|
+
/** Extra classes appended to the button (override variant/size styles). */
|
|
1827
|
+
className?: string;
|
|
1801
1828
|
/** Leading icon — rendered before content */
|
|
1802
1829
|
icon?: React__default.ReactNode;
|
|
1830
|
+
/** Click handler. */
|
|
1803
1831
|
onClick?: React__default.MouseEventHandler<HTMLButtonElement>;
|
|
1804
1832
|
/**
|
|
1805
1833
|
* @deprecated Pass `variant` instead. Kept for API compat — currently no-op.
|
|
@@ -1818,7 +1846,7 @@ interface ButtonProps {
|
|
|
1818
1846
|
* <Button content="Cancel" variant="secondary" />
|
|
1819
1847
|
* <Button content="Loading…" loading buttonType="submit" />
|
|
1820
1848
|
*/
|
|
1821
|
-
declare function Button({ content, variant, size, buttonType, loading, disabled, style, icon, onClick, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
1849
|
+
declare function Button({ content, variant, size, buttonType, loading, disabled, style, icon, onClick, className, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
1822
1850
|
|
|
1823
1851
|
/**
|
|
1824
1852
|
* Shared field foundation for all oxygen-ui inputs.
|
|
@@ -1937,31 +1965,45 @@ interface FieldProps {
|
|
|
1937
1965
|
declare function Field({ label, htmlFor, errorId, errorMessage, layout, required, helperText, labelAlign, labelStyle, labelWidth, className, children, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
1938
1966
|
|
|
1939
1967
|
interface TextInputProps {
|
|
1968
|
+
/** Controlled string value. */
|
|
1940
1969
|
value?: string;
|
|
1970
|
+
/** Native change handler — read `e.target.value`. */
|
|
1941
1971
|
onChange?: React__default.ChangeEventHandler<HTMLInputElement>;
|
|
1972
|
+
/** Disable interaction and dim the field. */
|
|
1942
1973
|
disabled?: boolean;
|
|
1974
|
+
/** Field label rendered above (vertical) or beside (horizontal) the input. */
|
|
1943
1975
|
label?: React__default.ReactNode;
|
|
1976
|
+
/** `id` for the input + the `<label htmlFor>` link. */
|
|
1944
1977
|
htmlFor?: string;
|
|
1978
|
+
/** Placeholder shown when the field is empty. */
|
|
1945
1979
|
placeholder?: string;
|
|
1980
|
+
/** Native form field name (used for `FormData` serialisation). */
|
|
1946
1981
|
name?: string;
|
|
1947
1982
|
/** Native input type. Defaults to `'text'`. */
|
|
1948
1983
|
type?: 'text' | 'email' | 'url' | 'tel';
|
|
1984
|
+
/** Inline style applied to the `<input>` element. */
|
|
1949
1985
|
inputStyle?: React__default.CSSProperties;
|
|
1986
|
+
/** Inline style applied to the field shell / adornment wrapper. */
|
|
1950
1987
|
style?: React__default.CSSProperties;
|
|
1951
1988
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
1952
1989
|
layout?: 'horizontal' | 'vertical';
|
|
1953
1990
|
/** Size preset — controls height, padding, and font. Default `'md'`. */
|
|
1954
1991
|
size?: FieldSize;
|
|
1992
|
+
/** Native blur handler. */
|
|
1955
1993
|
onBlur?: React__default.FocusEventHandler<HTMLInputElement>;
|
|
1994
|
+
/** Validation message — shown under the input; also flags it red + `aria-invalid`. */
|
|
1956
1995
|
errorMessage?: React__default.ReactNode;
|
|
1957
1996
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
1958
1997
|
helperText?: React__default.ReactNode;
|
|
1998
|
+
/** Extra classes merged onto the field root element. */
|
|
1999
|
+
className?: string;
|
|
1959
2000
|
/** Mark the field required (renders an asterisk after the label). */
|
|
1960
2001
|
required?: boolean;
|
|
1961
2002
|
/** Optional leading adornment (icon / prefix). */
|
|
1962
2003
|
prefix?: React__default.ReactNode;
|
|
1963
2004
|
/** Optional trailing adornment (icon / suffix / unit). */
|
|
1964
2005
|
suffix?: React__default.ReactNode;
|
|
2006
|
+
/** @deprecated Use `htmlFor`. */
|
|
1965
2007
|
id?: string;
|
|
1966
2008
|
}
|
|
1967
2009
|
/**
|
|
@@ -1985,7 +2027,7 @@ interface TextInputProps {
|
|
|
1985
2027
|
* />
|
|
1986
2028
|
* ```
|
|
1987
2029
|
*/
|
|
1988
|
-
declare function TextInput({ value, onChange, disabled, label, htmlFor, placeholder, name, type, inputStyle, style, layout, size, onBlur, errorMessage, helperText, required, prefix, suffix, }: TextInputProps): react_jsx_runtime.JSX.Element;
|
|
2030
|
+
declare function TextInput({ value, onChange, disabled, label, htmlFor, placeholder, name, type, inputStyle, style, layout, size, onBlur, errorMessage, helperText, className, required, prefix, suffix, }: TextInputProps): react_jsx_runtime.JSX.Element;
|
|
1989
2031
|
|
|
1990
2032
|
interface NumberInputProps {
|
|
1991
2033
|
/** Step size for the up/down buttons and native arrow-key handling. Default `1`. */
|
|
@@ -2000,24 +2042,39 @@ interface NumberInputProps {
|
|
|
2000
2042
|
name?: string;
|
|
2001
2043
|
};
|
|
2002
2044
|
}) => void;
|
|
2045
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2003
2046
|
label?: React__default.ReactNode;
|
|
2047
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2004
2048
|
htmlFor?: string;
|
|
2049
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2005
2050
|
name?: string;
|
|
2051
|
+
/** Disable interaction and dim the control. */
|
|
2006
2052
|
disabled?: boolean;
|
|
2007
2053
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
2008
2054
|
layout?: 'horizontal' | 'vertical';
|
|
2009
2055
|
/** Size preset. Default `'md'`. */
|
|
2010
2056
|
size?: FieldSize;
|
|
2057
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2011
2058
|
errorMessage?: React__default.ReactNode;
|
|
2012
2059
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2013
2060
|
helperText?: React__default.ReactNode;
|
|
2061
|
+
/** Extra classes merged onto the field root element. */
|
|
2062
|
+
className?: string;
|
|
2063
|
+
/** Show a required asterisk after the label. */
|
|
2014
2064
|
required?: boolean;
|
|
2065
|
+
/** Inline style applied to the inner input element. */
|
|
2015
2066
|
inputStyle?: React__default.CSSProperties;
|
|
2067
|
+
/** Inline style applied to the label. */
|
|
2016
2068
|
labelStyle?: React__default.CSSProperties;
|
|
2069
|
+
/** Placeholder shown when the field is empty. */
|
|
2017
2070
|
placeholder?: string;
|
|
2071
|
+
/** Inline style applied to the control shell. */
|
|
2018
2072
|
style?: React__default.CSSProperties;
|
|
2073
|
+
/** Minimum allowed value. */
|
|
2019
2074
|
min?: number;
|
|
2075
|
+
/** Maximum allowed value. */
|
|
2020
2076
|
max?: number;
|
|
2077
|
+
/** Render read-only — visible but not editable. */
|
|
2021
2078
|
readOnly?: boolean;
|
|
2022
2079
|
/** Optional precision for floating-point steps (number of decimal places to round to). */
|
|
2023
2080
|
precision?: number;
|
|
@@ -2054,26 +2111,40 @@ interface NumberInputProps {
|
|
|
2054
2111
|
* <NumberInput label="Tonnage" step={0.25} precision={2} />
|
|
2055
2112
|
* ```
|
|
2056
2113
|
*/
|
|
2057
|
-
declare function NumberInput({ step, value, onChange, label, htmlFor, name, disabled, layout, size, errorMessage, helperText, required, inputStyle, labelStyle, placeholder, style, min, max, readOnly, precision, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
2114
|
+
declare function NumberInput({ step, value, onChange, label, htmlFor, name, disabled, layout, size, errorMessage, helperText, className, required, inputStyle, labelStyle, placeholder, style, min, max, readOnly, precision, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
2058
2115
|
|
|
2059
2116
|
interface PasswordProps {
|
|
2117
|
+
/** Controlled value. */
|
|
2060
2118
|
value?: string;
|
|
2119
|
+
/** Fires when the value changes. */
|
|
2061
2120
|
onChange?: React__default.ChangeEventHandler<HTMLInputElement>;
|
|
2121
|
+
/** Disable interaction and dim the control. */
|
|
2062
2122
|
disabled?: boolean;
|
|
2123
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2063
2124
|
label?: React__default.ReactNode;
|
|
2125
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2064
2126
|
htmlFor?: string;
|
|
2127
|
+
/** Placeholder shown when the field is empty. */
|
|
2065
2128
|
placeholder?: string;
|
|
2129
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2066
2130
|
name?: string;
|
|
2131
|
+
/** Inline style applied to the inner input element. */
|
|
2067
2132
|
inputStyle?: React__default.CSSProperties;
|
|
2133
|
+
/** Inline style applied to the control shell. */
|
|
2068
2134
|
style?: React__default.CSSProperties;
|
|
2069
2135
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
2070
2136
|
layout?: 'horizontal' | 'vertical';
|
|
2071
2137
|
/** Size preset — controls height, padding, and font. Default `'md'`. */
|
|
2072
2138
|
size?: FieldSize;
|
|
2139
|
+
/** Blur handler — useful for touched/validation timing. */
|
|
2073
2140
|
onBlur?: React__default.FocusEventHandler<HTMLInputElement>;
|
|
2141
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2074
2142
|
errorMessage?: React__default.ReactNode;
|
|
2075
2143
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2076
2144
|
helperText?: React__default.ReactNode;
|
|
2145
|
+
/** Extra classes merged onto the field root element. */
|
|
2146
|
+
className?: string;
|
|
2147
|
+
/** Show a required asterisk after the label. */
|
|
2077
2148
|
required?: boolean;
|
|
2078
2149
|
/** Override the "reveal" (password hidden) icon. */
|
|
2079
2150
|
showIcon?: React__default.ReactNode;
|
|
@@ -2089,17 +2160,26 @@ interface PasswordProps {
|
|
|
2089
2160
|
* <Password label="Password" value={pw} onChange={(e) => setPw(e.target.value)} />
|
|
2090
2161
|
* ```
|
|
2091
2162
|
*/
|
|
2092
|
-
declare function Password({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, size, onBlur, errorMessage, helperText, required, showIcon, hideIcon, }: PasswordProps): react_jsx_runtime.JSX.Element;
|
|
2163
|
+
declare function Password({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, size, onBlur, errorMessage, helperText, className, required, showIcon, hideIcon, }: PasswordProps): react_jsx_runtime.JSX.Element;
|
|
2093
2164
|
|
|
2094
2165
|
interface SearchInputProps {
|
|
2166
|
+
/** Controlled value. */
|
|
2095
2167
|
value?: string;
|
|
2168
|
+
/** Fires when the value changes. */
|
|
2096
2169
|
onChange?: React__default.ChangeEventHandler<HTMLInputElement>;
|
|
2170
|
+
/** Disable interaction and dim the control. */
|
|
2097
2171
|
disabled?: boolean;
|
|
2172
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2098
2173
|
label?: React__default.ReactNode;
|
|
2174
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2099
2175
|
htmlFor?: string;
|
|
2176
|
+
/** Placeholder shown when the field is empty. */
|
|
2100
2177
|
placeholder?: string;
|
|
2178
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2101
2179
|
name?: string;
|
|
2180
|
+
/** Inline style applied to the inner input element. */
|
|
2102
2181
|
inputStyle?: React__default.CSSProperties;
|
|
2182
|
+
/** Inline style applied to the control shell. */
|
|
2103
2183
|
style?: React__default.CSSProperties;
|
|
2104
2184
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
2105
2185
|
layout?: 'horizontal' | 'vertical';
|
|
@@ -2109,6 +2189,8 @@ interface SearchInputProps {
|
|
|
2109
2189
|
icon?: React__default.ReactNode;
|
|
2110
2190
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2111
2191
|
helperText?: React__default.ReactNode;
|
|
2192
|
+
/** Extra classes merged onto the field root element. */
|
|
2193
|
+
className?: string;
|
|
2112
2194
|
}
|
|
2113
2195
|
/**
|
|
2114
2196
|
* Search field with a leading magnifier icon. Uses `type="search"` for the
|
|
@@ -2163,6 +2245,8 @@ interface CheckboxProps {
|
|
|
2163
2245
|
labelPosition?: 'left' | 'right';
|
|
2164
2246
|
/** @deprecated Use `checked`. Kept for API compatibility. */
|
|
2165
2247
|
value?: boolean;
|
|
2248
|
+
/** Extra classes merged onto the component root. */
|
|
2249
|
+
className?: string;
|
|
2166
2250
|
}
|
|
2167
2251
|
/**
|
|
2168
2252
|
* Accessible checkbox powered by Radix Checkbox.
|
|
@@ -2185,7 +2269,7 @@ interface CheckboxProps {
|
|
|
2185
2269
|
* />
|
|
2186
2270
|
*/
|
|
2187
2271
|
declare function Checkbox({ checked, value, // legacy alias
|
|
2188
|
-
onChange, label, description, name, htmlFor, errorMessage, helperText, disabled, required, layout, labelPosition, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
2272
|
+
onChange, label, description, name, htmlFor, errorMessage, helperText, disabled, required, layout, labelPosition, className, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
2189
2273
|
|
|
2190
2274
|
interface RadioOption {
|
|
2191
2275
|
/** Stable value submitted / reported on change. */
|
|
@@ -2198,13 +2282,17 @@ interface RadioOption {
|
|
|
2198
2282
|
disabled?: boolean;
|
|
2199
2283
|
}
|
|
2200
2284
|
interface RadioGroupProps {
|
|
2285
|
+
/** The selectable options. */
|
|
2201
2286
|
options: RadioOption[];
|
|
2202
2287
|
/** Controlled selected value. */
|
|
2203
2288
|
value?: string;
|
|
2204
2289
|
/** Uncontrolled initial value. */
|
|
2205
2290
|
defaultValue?: string;
|
|
2291
|
+
/** Fires when the value changes. */
|
|
2206
2292
|
onChange?: (value: string) => void;
|
|
2293
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2207
2294
|
name?: string;
|
|
2295
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2208
2296
|
label?: React__default.ReactNode;
|
|
2209
2297
|
/**
|
|
2210
2298
|
* Option arrangement. `'vertical'` (default) stacks options in a column;
|
|
@@ -2219,10 +2307,15 @@ interface RadioGroupProps {
|
|
|
2219
2307
|
labelPosition?: 'left' | 'right';
|
|
2220
2308
|
/** Size preset — controls the dot + text size. Default `'md'`. */
|
|
2221
2309
|
size?: FieldSize;
|
|
2310
|
+
/** Disable interaction and dim the control. */
|
|
2222
2311
|
disabled?: boolean;
|
|
2312
|
+
/** Show a required asterisk after the label. */
|
|
2223
2313
|
required?: boolean;
|
|
2224
2314
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2225
2315
|
helperText?: React__default.ReactNode;
|
|
2316
|
+
/** Extra classes merged onto the field root element. */
|
|
2317
|
+
className?: string;
|
|
2318
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2226
2319
|
errorMessage?: React__default.ReactNode;
|
|
2227
2320
|
}
|
|
2228
2321
|
/**
|
|
@@ -2248,13 +2341,14 @@ interface RadioGroupProps {
|
|
|
2248
2341
|
* />
|
|
2249
2342
|
* ```
|
|
2250
2343
|
*/
|
|
2251
|
-
declare function RadioGroup({ options, value, defaultValue, onChange, name, label, layout, labelPosition, size, disabled, required, helperText, errorMessage, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
2344
|
+
declare function RadioGroup({ options, value, defaultValue, onChange, name, label, layout, labelPosition, size, disabled, required, helperText, className, errorMessage, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
2252
2345
|
|
|
2253
2346
|
interface SwitchInputProps {
|
|
2254
2347
|
/** Controlled on/off state. */
|
|
2255
2348
|
checked?: boolean;
|
|
2256
2349
|
/** Uncontrolled initial state. */
|
|
2257
2350
|
defaultChecked?: boolean;
|
|
2351
|
+
/** Fires when the value changes. */
|
|
2258
2352
|
onChange?: (e: {
|
|
2259
2353
|
target: {
|
|
2260
2354
|
checked: boolean;
|
|
@@ -2274,13 +2368,19 @@ interface SwitchInputProps {
|
|
|
2274
2368
|
layout?: 'horizontal' | 'vertical';
|
|
2275
2369
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2276
2370
|
helperText?: React__default.ReactNode;
|
|
2371
|
+
/** Extra classes merged onto the field root element. */
|
|
2372
|
+
className?: string;
|
|
2277
2373
|
/** Label rendered to the left of the track, emphasised while off. */
|
|
2278
2374
|
offLabel?: React__default.ReactNode;
|
|
2279
2375
|
/** Label rendered to the right of the track, emphasised while on. */
|
|
2280
2376
|
onLabel?: React__default.ReactNode;
|
|
2377
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2281
2378
|
name?: string;
|
|
2379
|
+
/** Show a required asterisk after the label. */
|
|
2282
2380
|
required?: boolean;
|
|
2381
|
+
/** Disable interaction and dim the control. */
|
|
2283
2382
|
disabled?: boolean;
|
|
2383
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2284
2384
|
errorMessage?: React__default.ReactNode;
|
|
2285
2385
|
}
|
|
2286
2386
|
/**
|
|
@@ -2300,7 +2400,7 @@ interface SwitchInputProps {
|
|
|
2300
2400
|
* <Switch label="Email notifications" checked={on} onChange={({ target }) => setOn(target.checked)} />
|
|
2301
2401
|
* <Switch offLabel="Monthly" onLabel="Yearly" checked={yearly} onChange={...} />
|
|
2302
2402
|
*/
|
|
2303
|
-
declare function Switch({ checked, defaultChecked, onChange, checkedIcon, uncheckedIcon, label, layout, helperText, offLabel, onLabel, name, required, disabled, errorMessage, }: SwitchInputProps): react_jsx_runtime.JSX.Element;
|
|
2403
|
+
declare function Switch({ checked, defaultChecked, onChange, checkedIcon, uncheckedIcon, label, layout, helperText, className, offLabel, onLabel, name, required, disabled, errorMessage, }: SwitchInputProps): react_jsx_runtime.JSX.Element;
|
|
2304
2404
|
|
|
2305
2405
|
interface DropdownItem {
|
|
2306
2406
|
key: string | number;
|
|
@@ -2318,11 +2418,17 @@ type DropdownKey = string | number;
|
|
|
2318
2418
|
*/
|
|
2319
2419
|
type DropdownValue = DropdownKey | DropdownKey[];
|
|
2320
2420
|
interface DropdownProps {
|
|
2421
|
+
/** Enable multi-select (value becomes an array of keys). */
|
|
2321
2422
|
isMultiselect?: boolean;
|
|
2423
|
+
/** Show a search box inside the dropdown panel. */
|
|
2322
2424
|
hasSearch?: boolean;
|
|
2425
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2323
2426
|
label?: React__default.ReactNode;
|
|
2427
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2324
2428
|
name?: string;
|
|
2429
|
+
/** Controlled value. */
|
|
2325
2430
|
value?: DropdownValue;
|
|
2431
|
+
/** Fires when the value changes. */
|
|
2326
2432
|
onChange?: (e: {
|
|
2327
2433
|
target: {
|
|
2328
2434
|
value: DropdownValue;
|
|
@@ -2330,21 +2436,32 @@ interface DropdownProps {
|
|
|
2330
2436
|
name?: string;
|
|
2331
2437
|
};
|
|
2332
2438
|
}) => void;
|
|
2439
|
+
/** Blur handler — useful for touched/validation timing. */
|
|
2333
2440
|
onBlur?: React__default.FocusEventHandler;
|
|
2441
|
+
/** Disable interaction and dim the control. */
|
|
2334
2442
|
disabled?: boolean;
|
|
2335
2443
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
2336
2444
|
layout?: 'horizontal' | 'vertical';
|
|
2337
2445
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2338
2446
|
helperText?: React__default.ReactNode;
|
|
2447
|
+
/** Show a required asterisk after the label. */
|
|
2339
2448
|
required?: boolean;
|
|
2449
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2340
2450
|
errorMessage?: React__default.ReactNode;
|
|
2451
|
+
/** Inline style applied to the control shell. */
|
|
2341
2452
|
style?: React__default.CSSProperties;
|
|
2453
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2342
2454
|
htmlFor?: string;
|
|
2455
|
+
/** The selectable items. */
|
|
2343
2456
|
items?: DropdownItem[];
|
|
2457
|
+
/** Inline style applied to the label. */
|
|
2344
2458
|
labelStyle?: React__default.CSSProperties;
|
|
2459
|
+
/** Placeholder shown when the field is empty. */
|
|
2345
2460
|
placeholder?: string;
|
|
2346
2461
|
/** Size preset. Default `'md'`. */
|
|
2347
2462
|
size?: FieldSize;
|
|
2463
|
+
/** Extra classes merged onto the component root. */
|
|
2464
|
+
className?: string;
|
|
2348
2465
|
}
|
|
2349
2466
|
/**
|
|
2350
2467
|
* Select / multi-select dropdown powered by Radix Popover.
|
|
@@ -2361,7 +2478,7 @@ interface DropdownProps {
|
|
|
2361
2478
|
* // Multi-select
|
|
2362
2479
|
* <Dropdown isMultiselect label="Fuels" items={fuels} value={form.fuels} onChange={handleChange} />
|
|
2363
2480
|
*/
|
|
2364
|
-
declare function Dropdown({ isMultiselect, hasSearch, label, name, value, onChange, disabled, layout, helperText, required, errorMessage, style, htmlFor, items, labelStyle, placeholder, size, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
2481
|
+
declare function Dropdown({ isMultiselect, hasSearch, label, name, value, onChange, disabled, layout, helperText, required, errorMessage, style, htmlFor, items, labelStyle, placeholder, size, className, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
2365
2482
|
|
|
2366
2483
|
interface AutoCompleteItem {
|
|
2367
2484
|
key: string;
|
|
@@ -2370,11 +2487,17 @@ interface AutoCompleteItem {
|
|
|
2370
2487
|
icon?: React__default.ReactNode;
|
|
2371
2488
|
}
|
|
2372
2489
|
interface AutoCompleteProps {
|
|
2490
|
+
/** Disable interaction and dim the control. */
|
|
2373
2491
|
disabled?: boolean;
|
|
2492
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2374
2493
|
label?: React__default.ReactNode;
|
|
2494
|
+
/** Placeholder shown when the field is empty. */
|
|
2375
2495
|
placeholder?: string;
|
|
2496
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2376
2497
|
name?: string;
|
|
2498
|
+
/** Inline style applied to the inner input element. */
|
|
2377
2499
|
inputStyle?: React__default.CSSProperties;
|
|
2500
|
+
/** Inline style applied to the control shell. */
|
|
2378
2501
|
style?: React__default.CSSProperties;
|
|
2379
2502
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
2380
2503
|
layout?: 'horizontal' | 'vertical';
|
|
@@ -2396,6 +2519,7 @@ interface AutoCompleteProps {
|
|
|
2396
2519
|
* typing. Default `250`. Ignored when `items` is used.
|
|
2397
2520
|
*/
|
|
2398
2521
|
debounce?: number;
|
|
2522
|
+
/** Fires when a suggestion is selected, with its value. */
|
|
2399
2523
|
onItemClick?: (value: string) => void;
|
|
2400
2524
|
/** Custom "empty" message */
|
|
2401
2525
|
emptyText?: string;
|
|
@@ -2409,8 +2533,11 @@ interface AutoCompleteProps {
|
|
|
2409
2533
|
errorMessage?: React__default.ReactNode;
|
|
2410
2534
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2411
2535
|
helperText?: React__default.ReactNode;
|
|
2536
|
+
/** Extra classes merged onto the field root element. */
|
|
2537
|
+
className?: string;
|
|
2412
2538
|
/** Mark required (asterisk after the label). */
|
|
2413
2539
|
required?: boolean;
|
|
2540
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2414
2541
|
htmlFor?: string;
|
|
2415
2542
|
}
|
|
2416
2543
|
/**
|
|
@@ -2449,7 +2576,7 @@ interface AutoCompleteProps {
|
|
|
2449
2576
|
* />
|
|
2450
2577
|
* ```
|
|
2451
2578
|
*/
|
|
2452
|
-
declare function AutoComplete({ disabled, label, placeholder, name, inputStyle, style, layout, items, onSearch, debounce, onItemClick, emptyText, loadingText, size, icon, errorMessage, helperText, required, htmlFor, }: AutoCompleteProps): react_jsx_runtime.JSX.Element;
|
|
2579
|
+
declare function AutoComplete({ disabled, label, placeholder, name, inputStyle, style, layout, items, onSearch, debounce, onItemClick, emptyText, loadingText, size, icon, errorMessage, helperText, className, required, htmlFor, }: AutoCompleteProps): react_jsx_runtime.JSX.Element;
|
|
2453
2580
|
|
|
2454
2581
|
interface TreeSelectNode {
|
|
2455
2582
|
key: string | number;
|
|
@@ -2473,19 +2600,27 @@ interface TreeSelectProps {
|
|
|
2473
2600
|
name?: string;
|
|
2474
2601
|
};
|
|
2475
2602
|
}) => void;
|
|
2603
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2476
2604
|
label?: React__default.ReactNode;
|
|
2605
|
+
/** Placeholder shown when the field is empty. */
|
|
2477
2606
|
placeholder?: string;
|
|
2478
2607
|
/** Form control id linkage. */
|
|
2479
2608
|
htmlFor?: string;
|
|
2609
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2480
2610
|
name?: string;
|
|
2481
2611
|
/** Label/trigger orientation. Defaults to `'horizontal'`. */
|
|
2482
2612
|
layout?: 'horizontal' | 'vertical';
|
|
2483
2613
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2484
2614
|
helperText?: React__default.ReactNode;
|
|
2615
|
+
/** Extra classes merged onto the field root element. */
|
|
2616
|
+
className?: string;
|
|
2485
2617
|
/** Show a required asterisk after the label. */
|
|
2486
2618
|
required?: boolean;
|
|
2619
|
+
/** Disable interaction and dim the control. */
|
|
2487
2620
|
disabled?: boolean;
|
|
2621
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2488
2622
|
errorMessage?: React__default.ReactNode;
|
|
2623
|
+
/** Inline style applied to the control shell. */
|
|
2489
2624
|
style?: React__default.CSSProperties;
|
|
2490
2625
|
/**
|
|
2491
2626
|
* Whether parent (branch) nodes can be selected. When `false`, parents
|
|
@@ -2534,10 +2669,12 @@ interface TreeSelectProps {
|
|
|
2534
2669
|
* />
|
|
2535
2670
|
* ```
|
|
2536
2671
|
*/
|
|
2537
|
-
declare function TreeSelect({ label, name, value, onChange, disabled, layout, helperText, required, errorMessage, style, htmlFor, items, placeholder, parentsSelectable, defaultExpandedKeys, size, }: TreeSelectProps): react_jsx_runtime.JSX.Element;
|
|
2672
|
+
declare function TreeSelect({ label, name, value, onChange, disabled, layout, helperText, className, required, errorMessage, style, htmlFor, items, placeholder, parentsSelectable, defaultExpandedKeys, size, }: TreeSelectProps): react_jsx_runtime.JSX.Element;
|
|
2538
2673
|
|
|
2539
2674
|
interface FileInputProps {
|
|
2675
|
+
/** Allow selecting more than one file. */
|
|
2540
2676
|
allowMultiple?: boolean;
|
|
2677
|
+
/** Fires when the value changes. */
|
|
2541
2678
|
onChange?: (e: {
|
|
2542
2679
|
target: {
|
|
2543
2680
|
files: File[];
|
|
@@ -2546,8 +2683,11 @@ interface FileInputProps {
|
|
|
2546
2683
|
value?: string;
|
|
2547
2684
|
};
|
|
2548
2685
|
}) => void;
|
|
2686
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2549
2687
|
name?: string;
|
|
2688
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2550
2689
|
htmlFor?: string;
|
|
2690
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2551
2691
|
label?: React__default.ReactNode;
|
|
2552
2692
|
/** Accepted MIME types / extensions, e.g. `'.xlsx,application/pdf'`. */
|
|
2553
2693
|
accept?: string;
|
|
@@ -2557,10 +2697,15 @@ interface FileInputProps {
|
|
|
2557
2697
|
hint?: React__default.ReactNode;
|
|
2558
2698
|
/** Maximum file size in bytes. Files above this are rejected with an error. */
|
|
2559
2699
|
maxSize?: number;
|
|
2700
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2560
2701
|
errorMessage?: React__default.ReactNode;
|
|
2561
2702
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2562
2703
|
helperText?: React__default.ReactNode;
|
|
2704
|
+
/** Extra classes merged onto the field root element. */
|
|
2705
|
+
className?: string;
|
|
2706
|
+
/** Disable interaction and dim the control. */
|
|
2563
2707
|
disabled?: boolean;
|
|
2708
|
+
/** Show a required asterisk after the label. */
|
|
2564
2709
|
required?: boolean;
|
|
2565
2710
|
/** Override the upload glyph in the empty state. */
|
|
2566
2711
|
icon?: React__default.ReactNode;
|
|
@@ -2585,17 +2730,20 @@ interface FileInputProps {
|
|
|
2585
2730
|
* />
|
|
2586
2731
|
* ```
|
|
2587
2732
|
*/
|
|
2588
|
-
declare function FileInput({ allowMultiple, onChange, name, htmlFor, label, accept, prompt, hint, maxSize, errorMessage, helperText, disabled, required, icon, }: FileInputProps): react_jsx_runtime.JSX.Element;
|
|
2733
|
+
declare function FileInput({ allowMultiple, onChange, name, htmlFor, label, accept, prompt, hint, maxSize, errorMessage, helperText, className, disabled, required, icon, }: FileInputProps): react_jsx_runtime.JSX.Element;
|
|
2589
2734
|
|
|
2590
2735
|
interface DatePickerProps {
|
|
2591
2736
|
/** Current date. `null` / `undefined` means "no date selected". */
|
|
2592
2737
|
value?: Date | null;
|
|
2593
2738
|
/** Fires with the next date (or `null` if cleared via the clear button). */
|
|
2594
2739
|
onChange?: (date: Date | null) => void;
|
|
2740
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2595
2741
|
label?: React__default.ReactNode;
|
|
2596
2742
|
/** Text shown in the trigger when no date is selected. Default `"Select a date…"`. */
|
|
2597
2743
|
placeholder?: string;
|
|
2744
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2598
2745
|
htmlFor?: string;
|
|
2746
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2599
2747
|
name?: string;
|
|
2600
2748
|
/** Label/trigger orientation. Defaults to `'horizontal'`. */
|
|
2601
2749
|
layout?: 'horizontal' | 'vertical';
|
|
@@ -2603,12 +2751,15 @@ interface DatePickerProps {
|
|
|
2603
2751
|
helperText?: React__default.ReactNode;
|
|
2604
2752
|
/** Show a required asterisk after the label. */
|
|
2605
2753
|
required?: boolean;
|
|
2754
|
+
/** Disable interaction and dim the control. */
|
|
2606
2755
|
disabled?: boolean;
|
|
2756
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2607
2757
|
errorMessage?: React__default.ReactNode;
|
|
2608
2758
|
/** Earliest selectable date. Dates before this render disabled. */
|
|
2609
2759
|
min?: Date;
|
|
2610
2760
|
/** Latest selectable date. Dates after this render disabled. */
|
|
2611
2761
|
max?: Date;
|
|
2762
|
+
/** Inline style applied to the control shell. */
|
|
2612
2763
|
style?: React__default.CSSProperties;
|
|
2613
2764
|
/**
|
|
2614
2765
|
* Custom formatter for the trigger display. Defaults to
|
|
@@ -2661,13 +2812,21 @@ type TemporalPickerProps = DatePickerProps;
|
|
|
2661
2812
|
declare function DatePicker({ value, onChange, label, placeholder, htmlFor, name: _name, layout, helperText, required, disabled, errorMessage, min, max, style, format, weekStartsOn, clearable, size, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2662
2813
|
|
|
2663
2814
|
interface TextAreaProps {
|
|
2815
|
+
/** Controlled value. */
|
|
2664
2816
|
value?: string;
|
|
2817
|
+
/** Fires when the value changes. */
|
|
2665
2818
|
onChange?: React__default.ChangeEventHandler<HTMLTextAreaElement>;
|
|
2819
|
+
/** Blur handler — useful for touched/validation timing. */
|
|
2666
2820
|
onBlur?: React__default.FocusEventHandler<HTMLTextAreaElement>;
|
|
2821
|
+
/** Disable interaction and dim the control. */
|
|
2667
2822
|
disabled?: boolean;
|
|
2823
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2668
2824
|
label?: React__default.ReactNode;
|
|
2825
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2669
2826
|
htmlFor?: string;
|
|
2827
|
+
/** Placeholder shown when the field is empty. */
|
|
2670
2828
|
placeholder?: string;
|
|
2829
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2671
2830
|
name?: string;
|
|
2672
2831
|
/** Label/control orientation. Default `'vertical'`. */
|
|
2673
2832
|
layout?: 'horizontal' | 'vertical';
|
|
@@ -2688,11 +2847,17 @@ interface TextAreaProps {
|
|
|
2688
2847
|
showCount?: boolean;
|
|
2689
2848
|
/** CSS `resize` behaviour. Default `'vertical'` (or `'none'` when autoGrow). */
|
|
2690
2849
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
2850
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2691
2851
|
errorMessage?: React__default.ReactNode;
|
|
2692
2852
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2693
2853
|
helperText?: React__default.ReactNode;
|
|
2854
|
+
/** Extra classes merged onto the field root element. */
|
|
2855
|
+
className?: string;
|
|
2856
|
+
/** Show a required asterisk after the label. */
|
|
2694
2857
|
required?: boolean;
|
|
2858
|
+
/** Inline style applied to the control shell. */
|
|
2695
2859
|
style?: React__default.CSSProperties;
|
|
2860
|
+
/** Inline style applied to the inner input element. */
|
|
2696
2861
|
inputStyle?: React__default.CSSProperties;
|
|
2697
2862
|
}
|
|
2698
2863
|
/**
|
|
@@ -2711,7 +2876,7 @@ interface TextAreaProps {
|
|
|
2711
2876
|
* <TextArea label="Bio" maxLength={280} showCount value={bio} onChange={onChange} />
|
|
2712
2877
|
* ```
|
|
2713
2878
|
*/
|
|
2714
|
-
declare function TextArea({ value, onChange, onBlur, disabled, label, htmlFor, placeholder, name, layout, size, rows, autoGrow, maxRows, maxLength, showCount, resize, errorMessage, helperText, required, style, inputStyle, }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
2879
|
+
declare function TextArea({ value, onChange, onBlur, disabled, label, htmlFor, placeholder, name, layout, size, rows, autoGrow, maxRows, maxLength, showCount, resize, errorMessage, helperText, className, required, style, inputStyle, }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
2715
2880
|
|
|
2716
2881
|
interface SegmentedOption {
|
|
2717
2882
|
value: string;
|
|
@@ -2720,16 +2885,19 @@ interface SegmentedOption {
|
|
|
2720
2885
|
disabled?: boolean;
|
|
2721
2886
|
}
|
|
2722
2887
|
interface SegmentedControlProps {
|
|
2888
|
+
/** The selectable options. */
|
|
2723
2889
|
options: SegmentedOption[];
|
|
2724
2890
|
/** Controlled selected value. */
|
|
2725
2891
|
value?: string;
|
|
2726
2892
|
/** Uncontrolled initial value. */
|
|
2727
2893
|
defaultValue?: string;
|
|
2894
|
+
/** Fires when the value changes. */
|
|
2728
2895
|
onChange?: (value: string) => void;
|
|
2729
2896
|
/** Size preset. Default `'md'`. */
|
|
2730
2897
|
size?: FieldSize;
|
|
2731
2898
|
/** Stretch to fill the container, segments share the width equally. */
|
|
2732
2899
|
fullWidth?: boolean;
|
|
2900
|
+
/** Disable interaction and dim the control. */
|
|
2733
2901
|
disabled?: boolean;
|
|
2734
2902
|
/** Optional label, positioned per `layout`. */
|
|
2735
2903
|
label?: React__default.ReactNode;
|
|
@@ -2737,10 +2905,15 @@ interface SegmentedControlProps {
|
|
|
2737
2905
|
layout?: 'horizontal' | 'vertical';
|
|
2738
2906
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2739
2907
|
helperText?: React__default.ReactNode;
|
|
2908
|
+
/** Extra classes merged onto the field root element. */
|
|
2909
|
+
className?: string;
|
|
2740
2910
|
/** Native form field name (emits a hidden input carrying the value). */
|
|
2741
2911
|
name?: string;
|
|
2912
|
+
/** Show a required asterisk after the label. */
|
|
2742
2913
|
required?: boolean;
|
|
2914
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2743
2915
|
errorMessage?: React__default.ReactNode;
|
|
2916
|
+
/** Accessible label for the control. */
|
|
2744
2917
|
'aria-label'?: string;
|
|
2745
2918
|
}
|
|
2746
2919
|
/**
|
|
@@ -2770,7 +2943,7 @@ interface SegmentedControlProps {
|
|
|
2770
2943
|
* />
|
|
2771
2944
|
* ```
|
|
2772
2945
|
*/
|
|
2773
|
-
declare function SegmentedControl({ options, value, defaultValue, onChange, size, fullWidth, disabled, label, layout, helperText, name, required, errorMessage, 'aria-label': ariaLabel, }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
2946
|
+
declare function SegmentedControl({ options, value, defaultValue, onChange, size, fullWidth, disabled, label, layout, helperText, className, name, required, errorMessage, 'aria-label': ariaLabel, }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
2774
2947
|
|
|
2775
2948
|
/**
|
|
2776
2949
|
* Slider value. A single number for a one-thumb slider, or a `[min, max]`
|
|
@@ -2782,14 +2955,21 @@ interface SliderMark {
|
|
|
2782
2955
|
label?: React__default.ReactNode;
|
|
2783
2956
|
}
|
|
2784
2957
|
interface SliderProps {
|
|
2958
|
+
/** Controlled value. */
|
|
2785
2959
|
value?: SliderValue;
|
|
2960
|
+
/** Uncontrolled initial value. */
|
|
2786
2961
|
defaultValue?: SliderValue;
|
|
2962
|
+
/** Fires when the value changes. */
|
|
2787
2963
|
onChange?: (value: SliderValue) => void;
|
|
2788
2964
|
/** Fired once at the end of a drag/keyboard interaction. */
|
|
2789
2965
|
onChangeEnd?: (value: SliderValue) => void;
|
|
2966
|
+
/** Minimum allowed value. */
|
|
2790
2967
|
min?: number;
|
|
2968
|
+
/** Maximum allowed value. */
|
|
2791
2969
|
max?: number;
|
|
2970
|
+
/** Step increment between values. */
|
|
2792
2971
|
step?: number;
|
|
2972
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2793
2973
|
label?: React__default.ReactNode;
|
|
2794
2974
|
/** Show the current value(s) next to the label. */
|
|
2795
2975
|
showValue?: boolean;
|
|
@@ -2799,14 +2979,21 @@ interface SliderProps {
|
|
|
2799
2979
|
marks?: SliderMark[];
|
|
2800
2980
|
/** Show a value tooltip above the thumb while dragging. */
|
|
2801
2981
|
tooltip?: boolean;
|
|
2982
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
2802
2983
|
size?: FieldSize;
|
|
2984
|
+
/** Disable interaction and dim the control. */
|
|
2803
2985
|
disabled?: boolean;
|
|
2986
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2804
2987
|
errorMessage?: React__default.ReactNode;
|
|
2805
2988
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2806
2989
|
helperText?: React__default.ReactNode;
|
|
2990
|
+
/** Extra classes merged onto the field root element. */
|
|
2991
|
+
className?: string;
|
|
2807
2992
|
/** Show a required asterisk after the label. */
|
|
2808
2993
|
required?: boolean;
|
|
2994
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2809
2995
|
name?: string;
|
|
2996
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2810
2997
|
htmlFor?: string;
|
|
2811
2998
|
}
|
|
2812
2999
|
/**
|
|
@@ -2830,24 +3017,36 @@ interface SliderProps {
|
|
|
2830
3017
|
* />
|
|
2831
3018
|
* ```
|
|
2832
3019
|
*/
|
|
2833
|
-
declare function Slider({ value, defaultValue, onChange, onChangeEnd, min, max, step, label, showValue, formatValue, marks, tooltip, size, disabled, errorMessage, helperText, required, name, htmlFor, }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
3020
|
+
declare function Slider({ value, defaultValue, onChange, onChangeEnd, min, max, step, label, showValue, formatValue, marks, tooltip, size, disabled, errorMessage, helperText, className, required, name, htmlFor, }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
2834
3021
|
|
|
2835
3022
|
interface TagsInputProps {
|
|
2836
3023
|
/** Controlled list of tags. */
|
|
2837
3024
|
value?: string[];
|
|
2838
3025
|
/** Uncontrolled initial tags. */
|
|
2839
3026
|
defaultValue?: string[];
|
|
3027
|
+
/** Fires when the value changes. */
|
|
2840
3028
|
onChange?: (tags: string[]) => void;
|
|
3029
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2841
3030
|
label?: React__default.ReactNode;
|
|
3031
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2842
3032
|
htmlFor?: string;
|
|
3033
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2843
3034
|
name?: string;
|
|
3035
|
+
/** Placeholder shown when the field is empty. */
|
|
2844
3036
|
placeholder?: string;
|
|
3037
|
+
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
2845
3038
|
layout?: 'horizontal' | 'vertical';
|
|
3039
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
2846
3040
|
size?: FieldSize;
|
|
3041
|
+
/** Disable interaction and dim the control. */
|
|
2847
3042
|
disabled?: boolean;
|
|
3043
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2848
3044
|
errorMessage?: React__default.ReactNode;
|
|
2849
3045
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2850
3046
|
helperText?: React__default.ReactNode;
|
|
3047
|
+
/** Extra classes merged onto the field root element. */
|
|
3048
|
+
className?: string;
|
|
3049
|
+
/** Show a required asterisk after the label. */
|
|
2851
3050
|
required?: boolean;
|
|
2852
3051
|
/** Maximum number of tags. Further input is ignored once reached. */
|
|
2853
3052
|
maxTags?: number;
|
|
@@ -2873,30 +3072,41 @@ interface TagsInputProps {
|
|
|
2873
3072
|
* validate={(t) => /.+@.+\..+/.test(t) || 'Not a valid email'} />
|
|
2874
3073
|
* ```
|
|
2875
3074
|
*/
|
|
2876
|
-
declare function TagsInput({ value, defaultValue, onChange, label, htmlFor, name, placeholder, layout, size, disabled, errorMessage, helperText, required, maxTags, dedupe, validate, separators, }: TagsInputProps): react_jsx_runtime.JSX.Element;
|
|
3075
|
+
declare function TagsInput({ value, defaultValue, onChange, label, htmlFor, name, placeholder, layout, size, disabled, errorMessage, helperText, className, required, maxTags, dedupe, validate, separators, }: TagsInputProps): react_jsx_runtime.JSX.Element;
|
|
2877
3076
|
|
|
2878
3077
|
interface OtpInputProps {
|
|
2879
3078
|
/** Number of code boxes. Default `6`. */
|
|
2880
3079
|
length?: number;
|
|
3080
|
+
/** Controlled value. */
|
|
2881
3081
|
value?: string;
|
|
3082
|
+
/** Fires when the value changes. */
|
|
2882
3083
|
onChange?: (code: string) => void;
|
|
2883
3084
|
/** Fired when every box is filled. */
|
|
2884
3085
|
onComplete?: (code: string) => void;
|
|
3086
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2885
3087
|
label?: React__default.ReactNode;
|
|
3088
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2886
3089
|
htmlFor?: string;
|
|
3090
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2887
3091
|
name?: string;
|
|
2888
3092
|
/** `'numeric'` (default) restricts to digits; `'alphanumeric'` allows letters too. */
|
|
2889
3093
|
mode?: 'numeric' | 'alphanumeric';
|
|
2890
3094
|
/** Render boxes as masked dots (for PIN entry). */
|
|
2891
3095
|
masked?: boolean;
|
|
3096
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
2892
3097
|
size?: FieldSize;
|
|
3098
|
+
/** Disable interaction and dim the control. */
|
|
2893
3099
|
disabled?: boolean;
|
|
3100
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2894
3101
|
errorMessage?: React__default.ReactNode;
|
|
3102
|
+
/** Show a required asterisk after the label. */
|
|
2895
3103
|
required?: boolean;
|
|
2896
3104
|
/** Label/control orientation. Default `'vertical'`. */
|
|
2897
3105
|
layout?: 'horizontal' | 'vertical';
|
|
2898
3106
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2899
3107
|
helperText?: React__default.ReactNode;
|
|
3108
|
+
/** Extra classes merged onto the field root element. */
|
|
3109
|
+
className?: string;
|
|
2900
3110
|
/** Render a visual gap after this many boxes (e.g. `3` → `123 456`). */
|
|
2901
3111
|
groupAfter?: number;
|
|
2902
3112
|
}
|
|
@@ -2910,11 +3120,14 @@ interface OtpInputProps {
|
|
|
2910
3120
|
* <OtpInput length={6} value={code} onChange={setCode} onComplete={verify} />
|
|
2911
3121
|
* ```
|
|
2912
3122
|
*/
|
|
2913
|
-
declare function OtpInput({ length, value, onChange, onComplete, label, htmlFor, name, mode, masked, size, disabled, errorMessage, required, layout, helperText, groupAfter, }: OtpInputProps): react_jsx_runtime.JSX.Element;
|
|
3123
|
+
declare function OtpInput({ length, value, onChange, onComplete, label, htmlFor, name, mode, masked, size, disabled, errorMessage, required, layout, helperText, className, groupAfter, }: OtpInputProps): react_jsx_runtime.JSX.Element;
|
|
2914
3124
|
|
|
2915
3125
|
interface RatingProps {
|
|
3126
|
+
/** Controlled value. */
|
|
2916
3127
|
value?: number;
|
|
3128
|
+
/** Uncontrolled initial value. */
|
|
2917
3129
|
defaultValue?: number;
|
|
3130
|
+
/** Fires when the value changes. */
|
|
2918
3131
|
onChange?: (value: number) => void;
|
|
2919
3132
|
/** Number of icons. Default `5`. */
|
|
2920
3133
|
count?: number;
|
|
@@ -2924,17 +3137,24 @@ interface RatingProps {
|
|
|
2924
3137
|
readOnly?: boolean;
|
|
2925
3138
|
/** Clicking the current value again clears to 0. Default `true`. */
|
|
2926
3139
|
clearable?: boolean;
|
|
3140
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2927
3141
|
label?: React__default.ReactNode;
|
|
3142
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
2928
3143
|
size?: FieldSize;
|
|
3144
|
+
/** Disable interaction and dim the control. */
|
|
2929
3145
|
disabled?: boolean;
|
|
2930
3146
|
/** Override the icon. Receives a `filled` flag. Default is a star. */
|
|
2931
3147
|
icon?: (filled: boolean) => React__default.ReactNode;
|
|
3148
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2932
3149
|
errorMessage?: React__default.ReactNode;
|
|
3150
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2933
3151
|
name?: string;
|
|
2934
3152
|
/** Label/control orientation. Default `'vertical'`. */
|
|
2935
3153
|
layout?: 'horizontal' | 'vertical';
|
|
2936
3154
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2937
3155
|
helperText?: React__default.ReactNode;
|
|
3156
|
+
/** Extra classes merged onto the field root element. */
|
|
3157
|
+
className?: string;
|
|
2938
3158
|
/** Show a required asterisk after the label. */
|
|
2939
3159
|
required?: boolean;
|
|
2940
3160
|
}
|
|
@@ -2953,17 +3173,24 @@ interface RatingProps {
|
|
|
2953
3173
|
* <Rating value={4.5} allowHalf readOnly />
|
|
2954
3174
|
* ```
|
|
2955
3175
|
*/
|
|
2956
|
-
declare function Rating({ value, defaultValue, onChange, count, allowHalf, readOnly, clearable, label, size, disabled, icon, errorMessage, name, layout, helperText, required, }: RatingProps): react_jsx_runtime.JSX.Element;
|
|
3176
|
+
declare function Rating({ value, defaultValue, onChange, count, allowHalf, readOnly, clearable, label, size, disabled, icon, errorMessage, name, layout, helperText, className, required, }: RatingProps): react_jsx_runtime.JSX.Element;
|
|
2957
3177
|
|
|
2958
3178
|
interface TimePickerProps {
|
|
2959
3179
|
/** Value as `"HH:mm"` (24h) or `"HH:mm:ss"`. `null`/`undefined` = unset. */
|
|
2960
3180
|
value?: string | null;
|
|
3181
|
+
/** Fires when the value changes. */
|
|
2961
3182
|
onChange?: (value: string | null) => void;
|
|
3183
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
2962
3184
|
label?: React__default.ReactNode;
|
|
3185
|
+
/** The control id; the field label links to it for accessibility. */
|
|
2963
3186
|
htmlFor?: string;
|
|
3187
|
+
/** Native form field name (used for FormData serialisation). */
|
|
2964
3188
|
name?: string;
|
|
3189
|
+
/** Placeholder shown when the field is empty. */
|
|
2965
3190
|
placeholder?: string;
|
|
3191
|
+
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
2966
3192
|
layout?: 'horizontal' | 'vertical';
|
|
3193
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
2967
3194
|
size?: FieldSize;
|
|
2968
3195
|
/** Display in 12-hour format with AM/PM (value stays 24h `"HH:mm"`). */
|
|
2969
3196
|
use12Hours?: boolean;
|
|
@@ -2971,11 +3198,17 @@ interface TimePickerProps {
|
|
|
2971
3198
|
withSeconds?: boolean;
|
|
2972
3199
|
/** Minute step. Default `1`. Use `5` / `15` for coarse pickers. */
|
|
2973
3200
|
minuteStep?: number;
|
|
3201
|
+
/** Disable interaction and dim the control. */
|
|
2974
3202
|
disabled?: boolean;
|
|
3203
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
2975
3204
|
errorMessage?: React__default.ReactNode;
|
|
2976
3205
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
2977
3206
|
helperText?: React__default.ReactNode;
|
|
3207
|
+
/** Extra classes merged onto the field root element. */
|
|
3208
|
+
className?: string;
|
|
3209
|
+
/** Show a required asterisk after the label. */
|
|
2978
3210
|
required?: boolean;
|
|
3211
|
+
/** Inline style applied to the control shell. */
|
|
2979
3212
|
style?: React__default.CSSProperties;
|
|
2980
3213
|
}
|
|
2981
3214
|
/**
|
|
@@ -2988,7 +3221,7 @@ interface TimePickerProps {
|
|
|
2988
3221
|
* <TimePicker label="Departure" value={time} onChange={setTime} minuteStep={15} use12Hours />
|
|
2989
3222
|
* ```
|
|
2990
3223
|
*/
|
|
2991
|
-
declare function TimePicker({ value, onChange, label, htmlFor, name, placeholder, layout, size, use12Hours, withSeconds, minuteStep, disabled, errorMessage, helperText, required, style, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
3224
|
+
declare function TimePicker({ value, onChange, label, htmlFor, name, placeholder, layout, size, use12Hours, withSeconds, minuteStep, disabled, errorMessage, helperText, className, required, style, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
2992
3225
|
|
|
2993
3226
|
interface DateRange {
|
|
2994
3227
|
start: Date | null;
|
|
@@ -3000,25 +3233,41 @@ interface DateRangePreset {
|
|
|
3000
3233
|
range: () => DateRange;
|
|
3001
3234
|
}
|
|
3002
3235
|
interface DateRangePickerProps {
|
|
3236
|
+
/** Controlled value. */
|
|
3003
3237
|
value?: DateRange;
|
|
3238
|
+
/** Fires when the value changes. */
|
|
3004
3239
|
onChange?: (range: DateRange) => void;
|
|
3240
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
3005
3241
|
label?: React__default.ReactNode;
|
|
3242
|
+
/** The control id; the field label links to it for accessibility. */
|
|
3006
3243
|
htmlFor?: string;
|
|
3244
|
+
/** Placeholder shown when the field is empty. */
|
|
3007
3245
|
placeholder?: string;
|
|
3246
|
+
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
3008
3247
|
layout?: 'horizontal' | 'vertical';
|
|
3248
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
3009
3249
|
size?: FieldSize;
|
|
3250
|
+
/** Earliest selectable date. */
|
|
3010
3251
|
min?: Date;
|
|
3252
|
+
/** Latest selectable date. */
|
|
3011
3253
|
max?: Date;
|
|
3012
3254
|
/** 0 = Sunday, 1 = Monday. Default `0`. */
|
|
3013
3255
|
weekStartsOn?: 0 | 1;
|
|
3014
3256
|
/** Quick-select presets shown in a rail beside the calendars. */
|
|
3015
3257
|
presets?: DateRangePreset[];
|
|
3258
|
+
/** Custom formatter for the displayed value. */
|
|
3016
3259
|
format?: (d: Date) => string;
|
|
3260
|
+
/** Disable interaction and dim the control. */
|
|
3017
3261
|
disabled?: boolean;
|
|
3262
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
3018
3263
|
errorMessage?: React__default.ReactNode;
|
|
3019
3264
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3020
3265
|
helperText?: React__default.ReactNode;
|
|
3266
|
+
/** Extra classes merged onto the field root element. */
|
|
3267
|
+
className?: string;
|
|
3268
|
+
/** Show a required asterisk after the label. */
|
|
3021
3269
|
required?: boolean;
|
|
3270
|
+
/** Inline style applied to the control shell. */
|
|
3022
3271
|
style?: React__default.CSSProperties;
|
|
3023
3272
|
}
|
|
3024
3273
|
/**
|
|
@@ -3038,26 +3287,38 @@ interface DateRangePickerProps {
|
|
|
3038
3287
|
* />
|
|
3039
3288
|
* ```
|
|
3040
3289
|
*/
|
|
3041
|
-
declare function DateRangePicker({ value, onChange, label, htmlFor, placeholder, layout, size, min, max, weekStartsOn, presets, format, disabled, errorMessage, helperText, required, style, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
3290
|
+
declare function DateRangePicker({ value, onChange, label, htmlFor, placeholder, layout, size, min, max, weekStartsOn, presets, format, disabled, errorMessage, helperText, className, required, style, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
3042
3291
|
|
|
3043
3292
|
interface ColorPickerProps {
|
|
3044
3293
|
/** Hex string, e.g. `"#0466c8"`. */
|
|
3045
3294
|
value?: string;
|
|
3295
|
+
/** Fires when the value changes. */
|
|
3046
3296
|
onChange?: (hex: string) => void;
|
|
3297
|
+
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
3047
3298
|
label?: React__default.ReactNode;
|
|
3299
|
+
/** The control id; the field label links to it for accessibility. */
|
|
3048
3300
|
htmlFor?: string;
|
|
3301
|
+
/** Native form field name (used for FormData serialisation). */
|
|
3049
3302
|
name?: string;
|
|
3303
|
+
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
3050
3304
|
layout?: 'horizontal' | 'vertical';
|
|
3305
|
+
/** Size preset — controls height, padding, and font. Default 'md'. */
|
|
3051
3306
|
size?: FieldSize;
|
|
3052
3307
|
/** Preset swatches shown in the popover. Defaults to a balanced 12-color set. */
|
|
3053
3308
|
swatches?: string[];
|
|
3054
3309
|
/** Show the native eyedropper / full picker fallback via `<input type="color">`. Default `true`. */
|
|
3055
3310
|
allowCustom?: boolean;
|
|
3311
|
+
/** Disable interaction and dim the control. */
|
|
3056
3312
|
disabled?: boolean;
|
|
3313
|
+
/** Validation message — shown under the control; also flags it red and sets aria-invalid. */
|
|
3057
3314
|
errorMessage?: React__default.ReactNode;
|
|
3058
3315
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3059
3316
|
helperText?: React__default.ReactNode;
|
|
3317
|
+
/** Extra classes merged onto the field root element. */
|
|
3318
|
+
className?: string;
|
|
3319
|
+
/** Show a required asterisk after the label. */
|
|
3060
3320
|
required?: boolean;
|
|
3321
|
+
/** Placeholder shown when the field is empty. */
|
|
3061
3322
|
placeholder?: string;
|
|
3062
3323
|
}
|
|
3063
3324
|
/**
|
|
@@ -3070,7 +3331,7 @@ interface ColorPickerProps {
|
|
|
3070
3331
|
* <ColorPicker label="Brand colour" value={color} onChange={setColor} />
|
|
3071
3332
|
* ```
|
|
3072
3333
|
*/
|
|
3073
|
-
declare function ColorPicker({ value, onChange, label, htmlFor, name, layout, size, swatches, allowCustom, disabled, errorMessage, helperText, required, placeholder, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
3334
|
+
declare function ColorPicker({ value, onChange, label, htmlFor, name, layout, size, swatches, allowCustom, disabled, errorMessage, helperText, className, required, placeholder, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
3074
3335
|
|
|
3075
3336
|
/**
|
|
3076
3337
|
* Native, dependency-free validation. A field carries one rule or an array of
|
|
@@ -3239,7 +3500,10 @@ interface UseFormReturn {
|
|
|
3239
3500
|
isValid: boolean;
|
|
3240
3501
|
getValue: (name: string) => unknown;
|
|
3241
3502
|
getValues: () => FormValues;
|
|
3242
|
-
setValue: (name: string, value: unknown
|
|
3503
|
+
setValue: (name: string, value: unknown, opts?: {
|
|
3504
|
+
validate?: boolean;
|
|
3505
|
+
touch?: boolean;
|
|
3506
|
+
}) => void;
|
|
3243
3507
|
setValues: (patch: FormValues) => void;
|
|
3244
3508
|
setError: (name: string, error: string | undefined) => void;
|
|
3245
3509
|
validateField: (name: string) => Promise<string | undefined>;
|
|
@@ -3386,4 +3650,98 @@ declare const FormContext: React$1.Context<FormStore>;
|
|
|
3386
3650
|
/** Read the enclosing `<Form>`'s store. Throws if used outside a `<Form>`. */
|
|
3387
3651
|
declare function useFormStore(): FormStore;
|
|
3388
3652
|
|
|
3389
|
-
|
|
3653
|
+
/** The normalised value emitted on change / submit. */
|
|
3654
|
+
interface CreditCardValue {
|
|
3655
|
+
/** Digits only (no spaces). */
|
|
3656
|
+
number: string;
|
|
3657
|
+
/** Cardholder name. */
|
|
3658
|
+
name: string;
|
|
3659
|
+
/** `MM/YY`. */
|
|
3660
|
+
expiry: string;
|
|
3661
|
+
/** Digits only. */
|
|
3662
|
+
cvv: string;
|
|
3663
|
+
/** Detected brand id (`'visa'`, `'amex'`…) or `null`. */
|
|
3664
|
+
brand: string | null;
|
|
3665
|
+
}
|
|
3666
|
+
interface CreditCardFormProps {
|
|
3667
|
+
/** Called with the validated card once every field passes on submit. */
|
|
3668
|
+
onSubmit?: (card: CreditCardValue) => void | Promise<void>;
|
|
3669
|
+
/** Called on every keystroke with the current (possibly invalid) card. */
|
|
3670
|
+
onChange?: (card: CreditCardValue) => void;
|
|
3671
|
+
/** Seed the fields (uncontrolled). Number/expiry are auto-formatted. */
|
|
3672
|
+
defaultValue?: Partial<CreditCardValue>;
|
|
3673
|
+
/** Size preset for the inner fields. Default `'md'`. */
|
|
3674
|
+
size?: FieldSize;
|
|
3675
|
+
/** Disable every field + the submit button. */
|
|
3676
|
+
disabled?: boolean;
|
|
3677
|
+
/** Require the cardholder name. Default `true`. */
|
|
3678
|
+
requireName?: boolean;
|
|
3679
|
+
/** Hide the built-in submit button (when embedding in a larger form). */
|
|
3680
|
+
hideSubmit?: boolean;
|
|
3681
|
+
/** Submit button label. Default `'Pay'`. */
|
|
3682
|
+
submitLabel?: React__default.ReactNode;
|
|
3683
|
+
/** Extra classes on the root `<form>`. */
|
|
3684
|
+
className?: string;
|
|
3685
|
+
/** Inline style on the root `<form>`. */
|
|
3686
|
+
style?: React__default.CSSProperties;
|
|
3687
|
+
}
|
|
3688
|
+
/**
|
|
3689
|
+
* Unified credit-card form built on the oxygen-ui {@link useForm} Form API.
|
|
3690
|
+
*
|
|
3691
|
+
* One component owns all four fields and their cross-field rules — card number
|
|
3692
|
+
* (brand detection + grouping + Luhn), expiry (`MM/YY`, real month, not past),
|
|
3693
|
+
* CVV (brand-aware length), and cardholder name. It is deliberately NOT shipped
|
|
3694
|
+
* as separate inputs: a CVV or expiry field has no meaning outside a card form.
|
|
3695
|
+
*
|
|
3696
|
+
* Self-contained: render it and handle `onSubmit(card)`; the card is only
|
|
3697
|
+
* delivered once everything validates. Use `onChange` for live updates (e.g. a
|
|
3698
|
+
* card preview) and `hideSubmit` to embed it inside a larger form.
|
|
3699
|
+
*
|
|
3700
|
+
* @example
|
|
3701
|
+
* <CreditCardForm onSubmit={(card) => pay(card)} submitLabel="Pay $49" />
|
|
3702
|
+
*/
|
|
3703
|
+
declare function CreditCardForm({ onSubmit, onChange, defaultValue, size, disabled, requireName, hideSubmit, submitLabel, className, style, }: CreditCardFormProps): react_jsx_runtime.JSX.Element;
|
|
3704
|
+
|
|
3705
|
+
/**
|
|
3706
|
+
* Zero-dependency credit-card helpers: brand detection, Luhn checksum, and
|
|
3707
|
+
* display formatting. Pure functions — no React, no deps — so they're unit
|
|
3708
|
+
* testable and reusable.
|
|
3709
|
+
*/
|
|
3710
|
+
interface CardBrand {
|
|
3711
|
+
/** Stable id, e.g. `'visa'`. */
|
|
3712
|
+
id: string;
|
|
3713
|
+
/** Human label, e.g. `'Visa'`. */
|
|
3714
|
+
label: string;
|
|
3715
|
+
/** Short badge text, e.g. `'VISA'`. */
|
|
3716
|
+
short: string;
|
|
3717
|
+
/** Accent colour for the brand badge (hex). */
|
|
3718
|
+
color: string;
|
|
3719
|
+
/** Matches the leading digits of the card number. */
|
|
3720
|
+
pattern: RegExp;
|
|
3721
|
+
/** Valid total digit lengths for this brand. */
|
|
3722
|
+
lengths: number[];
|
|
3723
|
+
/** Expected CVV length (3 for most, 4 for Amex). */
|
|
3724
|
+
cvv: number;
|
|
3725
|
+
/** Zero-based digit indices to insert a space before (grouping). */
|
|
3726
|
+
gaps: number[];
|
|
3727
|
+
}
|
|
3728
|
+
/** Recognised brands, in match-priority order. */
|
|
3729
|
+
declare const CARD_BRANDS: CardBrand[];
|
|
3730
|
+
/** Strip everything but digits. */
|
|
3731
|
+
declare const onlyDigits: (s: string) => string;
|
|
3732
|
+
/** Detect the card brand from a (possibly partial) number. `null` if unknown. */
|
|
3733
|
+
declare function detectBrand(value: string): CardBrand | null;
|
|
3734
|
+
/** Luhn (mod-10) checksum — the standard card-number integrity check. */
|
|
3735
|
+
declare function luhnValid(value: string): boolean;
|
|
3736
|
+
/** Format a card number with brand-aware grouping (e.g. `4242 4242 4242 4242`). */
|
|
3737
|
+
declare function formatCardNumber(value: string): string;
|
|
3738
|
+
/** Validate a card number: known brand, complete length, passing Luhn. */
|
|
3739
|
+
declare function cardNumberError(value: string): string | undefined;
|
|
3740
|
+
/** Format expiry keystrokes into `MM/YY`, auto-padding the month and slashing. */
|
|
3741
|
+
declare function formatExpiry(value: string): string;
|
|
3742
|
+
/** Validate `MM/YY`: well-formed, real month, not in the past. */
|
|
3743
|
+
declare function expiryError(value: string, now?: Date): string | undefined;
|
|
3744
|
+
/** Validate the CVV against the detected brand's expected length. */
|
|
3745
|
+
declare function cvvError(value: string, cardNumber: string): string | undefined;
|
|
3746
|
+
|
|
3747
|
+
export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Box, type BoxBackground, type BoxBorder, type BoxProps, type BoxRadius, type BoxShadow, Button, type ButtonProps, CARD_BRANDS, type CardBrand, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, CreditCardForm, type CreditCardFormProps, type CreditCardValue, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, type ErrorMap, type ExpandRowOptions, FadingBase, type FadingBaseProps, Field, type FieldArrayItem, type FieldBindings, FieldHelpIcon, type FieldKind, FieldLabel, type FieldLabelProps, type FieldProps, type FieldRule, type FieldRules, type FieldShellOptions, type FieldSize, type FieldSnapshot, FileInput, type FileInputProps, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormContext, FormField, type FormFieldProps, type FormProps, FormStore, type FormStoreOptions, type FormValues, Grid, GridCard, type GridCardItem, type GridCardProps, type GridProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, OtpInput, type OtpInputProps, type PaginationOptions, Password, type PasswordProps, Portal, type PortalProps, RadioGroup, type RadioGroupProps, type RadioOption, Rating, type RatingProps, type RulesMap, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SliderValue, type Spacing, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, TagsInput, type TagsInputProps, DatePicker as Temporal, type TemporalPickerProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, TimePicker, type TimePickerProps, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type TypographyWeight, type UseFieldArrayReturn, type UseFormFieldOptions, type UseFormReturn, type ValidateTrigger, Wizard, type WizardProps, type WizardStep, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
|