@geomak/ui 1.7.4 → 1.8.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.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-CvyV3YPI.cjs';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import React$1 from 'react';
3
+ import React$1, { ReactNode } from 'react';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
6
  declare const Icon: {
@@ -587,45 +587,82 @@ declare function useNotification(): {
587
587
  danger: (props: Omit<NotificationPayload, "type">) => void;
588
588
  };
589
589
 
590
+ type LoadingSpinnerSize = 'sm' | 'md' | 'lg';
590
591
  interface LoadingSpinnerProps {
591
- /** Text revealed letter-by-letter beneath the spinner. */
592
- prompt: string;
592
+ /**
593
+ * Text revealed letter-by-letter beneath the spinner. Optional — pass
594
+ * `undefined` for a pure spinner with no caption (e.g. inline mode).
595
+ */
596
+ prompt?: string;
597
+ /** Spinner size variant. Defaults to `'md'`. */
598
+ size?: LoadingSpinnerSize;
599
+ /**
600
+ * When `true`, renders inline at the call site (no portal, no fullscreen
601
+ * overlay, no backdrop). Useful inside cards, table rows, drawers, or
602
+ * empty-state slots. Defaults to `false` (fullscreen overlay).
603
+ */
604
+ inline?: boolean;
593
605
  /**
594
606
  * Optional override for the spinner ring colour. Accepts any CSS colour.
595
- * Defaults to the accent token so it picks up theme overrides.
607
+ * Defaults to the `--color-accent` token so it picks up theme overrides.
596
608
  */
597
609
  spinnerColor?: string;
598
610
  /**
599
611
  * Optional override for the prompt text colour.
600
- * Defaults to the foreground token (light/dark aware).
612
+ * Defaults to the `--color-foreground` token (light/dark aware).
601
613
  */
602
614
  textColor?: string;
603
615
  /**
604
- * Backdrop opacity (0 – 1). Defaults to 0.92 close enough to opaque to
605
- * block UI underneath while still hinting at the previous state.
616
+ * Backdrop opacity (0 – 1) for the fullscreen overlay. Defaults to 0.8
617
+ * close enough to opaque to block UI underneath while still hinting at the
618
+ * previous state. Ignored when `inline` is true.
606
619
  */
607
620
  backdropOpacity?: number;
608
621
  }
609
622
  /**
610
- * Full-screen loading overlay with a spinning ring and a staggered text
611
- * reveal. Portaled into `document.body` so it always covers the actual
612
- * viewport regardless of where it's rendered in the React tree.
613
- *
614
- * Honours `prefers-reduced-motion`: the spinner still rotates (continuous
615
- * spin is informative, not decorative) but the letter stagger collapses to
616
- * an instant reveal.
617
- *
618
- * @example
623
+ * Enterprise-grade loading indicator.
624
+ *
625
+ * Two concentric arcs counter-rotating around a breathing centre dot, with
626
+ * an optional staggered letter reveal beneath. Portaled to `document.body`
627
+ * for the fullscreen overlay so it always covers the actual viewport
628
+ * regardless of where it sits in the React tree.
629
+ *
630
+ * **Two modes:**
631
+ * - **Fullscreen overlay** (default): semi-opaque backdrop with
632
+ * `backdrop-blur-sm` for a modern depth effect. Use during page-level
633
+ * loading, route transitions, or critical mutations.
634
+ * - **Inline** (`inline`): just the spinner + optional caption rendered at
635
+ * the call site. Use inside cards, table rows, drawers, empty states,
636
+ * or anywhere a smaller loading affordance is appropriate.
637
+ *
638
+ * **Accessibility**: `role="status"` + `aria-label`/`aria-live` make the
639
+ * indicator announce-able to screen readers. `prefers-reduced-motion`
640
+ * collapses the letter stagger to instant reveal — the spinner rings keep
641
+ * rotating since a continuous spinner is informative, not decorative.
642
+ *
643
+ * @example Fullscreen overlay (page load)
644
+ * ```tsx
619
645
  * {isLoading && <LoadingSpinner prompt="Loading vessels…" />}
646
+ * ```
620
647
  *
621
- * @example
648
+ * @example Inline (inside a card)
649
+ * ```tsx
650
+ * <Card>
651
+ * {data ? <Chart data={data} /> : <LoadingSpinner inline size="sm" />}
652
+ * </Card>
653
+ * ```
654
+ *
655
+ * @example Themed overlay
656
+ * ```tsx
622
657
  * <LoadingSpinner
623
658
  * prompt="Saving"
659
+ * size="lg"
624
660
  * spinnerColor="#10b981"
625
661
  * backdropOpacity={0.7}
626
662
  * />
663
+ * ```
627
664
  */
628
- declare function LoadingSpinner({ prompt, spinnerColor, textColor, backdropOpacity, }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
665
+ declare function LoadingSpinner({ prompt, size, inline, spinnerColor, textColor, backdropOpacity, }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
629
666
 
630
667
  interface FadingBaseProps {
631
668
  className?: string;
@@ -652,7 +689,6 @@ declare function FadingBase({ className, isMounted, children, }: FadingBaseProps
652
689
  interface ListItem {
653
690
  key: string | number;
654
691
  label: React$1.ReactNode;
655
- [key: string]: any;
656
692
  }
657
693
  interface ListProps {
658
694
  items: ListItem[];
@@ -1399,7 +1435,7 @@ interface ButtonProps {
1399
1435
  declare function Button({ content, variant, size, buttonType, loading, disabled, style, icon, onClick, }: ButtonProps): react_jsx_runtime.JSX.Element;
1400
1436
 
1401
1437
  interface TextInputProps {
1402
- value?: any;
1438
+ value?: string;
1403
1439
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1404
1440
  disabled?: boolean;
1405
1441
  label?: React$1.ReactNode;
@@ -1408,13 +1444,12 @@ interface TextInputProps {
1408
1444
  name?: string;
1409
1445
  inputStyle?: React$1.CSSProperties;
1410
1446
  style?: React$1.CSSProperties;
1411
- /** 'horizontal' | 'vertical' */
1412
- layout?: string;
1447
+ /** Label/input orientation. Defaults to `'horizontal'`. */
1448
+ layout?: 'horizontal' | 'vertical';
1413
1449
  onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
1414
1450
  errorMessage?: React$1.ReactNode;
1415
1451
  labelColor?: string;
1416
1452
  id?: string;
1417
- [key: string]: any;
1418
1453
  }
1419
1454
  /**
1420
1455
  * Standard text input with label and validation message.
@@ -1453,7 +1488,7 @@ interface NumberInputProps {
1453
1488
  declare function NumberInput({ step, value, onChange, label, htmlFor, name, disabled, layout, errorMessage, inputStyle, labelStyle, placeholder, style, min, max, readOnly, }: NumberInputProps): react_jsx_runtime.JSX.Element;
1454
1489
 
1455
1490
  interface PasswordProps {
1456
- value?: any;
1491
+ value?: string;
1457
1492
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1458
1493
  disabled?: boolean;
1459
1494
  label?: React$1.ReactNode;
@@ -1462,12 +1497,12 @@ interface PasswordProps {
1462
1497
  name?: string;
1463
1498
  inputStyle?: React$1.CSSProperties;
1464
1499
  style?: React$1.CSSProperties;
1465
- layout?: string;
1500
+ /** Label/input orientation. Defaults to `'horizontal'`. */
1501
+ layout?: 'horizontal' | 'vertical';
1466
1502
  onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
1467
1503
  errorMessage?: React$1.ReactNode;
1468
1504
  labelColor?: string;
1469
1505
  iconColor?: string;
1470
- [key: string]: any;
1471
1506
  }
1472
1507
  /**
1473
1508
  * Password input with show/hide toggle.
@@ -1475,7 +1510,7 @@ interface PasswordProps {
1475
1510
  declare function Password({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, onBlur, errorMessage, labelColor, iconColor, }: PasswordProps): react_jsx_runtime.JSX.Element;
1476
1511
 
1477
1512
  interface SearchInputProps {
1478
- value?: any;
1513
+ value?: string;
1479
1514
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1480
1515
  disabled?: boolean;
1481
1516
  label?: React$1.ReactNode;
@@ -1484,16 +1519,16 @@ interface SearchInputProps {
1484
1519
  name?: string;
1485
1520
  inputStyle?: React$1.CSSProperties;
1486
1521
  style?: React$1.CSSProperties;
1487
- layout?: string;
1488
- [key: string]: any;
1522
+ /** Label/input orientation. Defaults to `'vertical'`. */
1523
+ layout?: 'horizontal' | 'vertical';
1489
1524
  }
1490
1525
  /**
1491
1526
  * Search text field with a magnifier icon on the right.
1492
1527
  */
1493
- declare const SearchInput: React$1.ForwardRefExoticComponent<Omit<SearchInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
1528
+ declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
1494
1529
 
1495
1530
  interface DropdownPillProps {
1496
- value?: React.ReactNode;
1531
+ value?: ReactNode;
1497
1532
  hasSiblings?: boolean;
1498
1533
  }
1499
1534
  /**
@@ -1546,7 +1581,6 @@ interface SwitchInputProps {
1546
1581
  }) => void;
1547
1582
  checkedIcon?: React$1.ReactNode;
1548
1583
  uncheckedIcon?: React$1.ReactNode;
1549
- [key: string]: any;
1550
1584
  }
1551
1585
  /**
1552
1586
  * Form switch (on/off toggle) powered by Radix Switch.
@@ -1569,30 +1603,39 @@ interface DropdownItem {
1569
1603
  label: React$1.ReactNode;
1570
1604
  icon?: React$1.ReactNode;
1571
1605
  }
1606
+ /**
1607
+ * Item key type — DOM-friendly subset of `React.Key` (no bigint, since UI
1608
+ * keys are always strings or numbers in practice).
1609
+ */
1610
+ type DropdownKey = string | number;
1611
+ /**
1612
+ * Selected value(s). In single-select mode this is a single key matching
1613
+ * one of the items. In multi-select mode it is an array of keys.
1614
+ */
1615
+ type DropdownValue = DropdownKey | DropdownKey[];
1572
1616
  interface DropdownProps {
1573
1617
  isMultiselect?: boolean;
1574
1618
  hasSearch?: boolean;
1575
1619
  label?: React$1.ReactNode;
1576
1620
  name?: string;
1577
- value?: any;
1621
+ value?: DropdownValue;
1578
1622
  onChange?: (e: {
1579
1623
  target: {
1580
- value: any;
1624
+ value: DropdownValue;
1581
1625
  id?: string;
1582
1626
  name?: string;
1583
1627
  };
1584
1628
  }) => void;
1585
1629
  onBlur?: React$1.FocusEventHandler;
1586
1630
  disabled?: boolean;
1587
- /** 'horizontal' | 'vertical' */
1588
- layout?: string;
1631
+ /** Label/input orientation. Defaults to `'vertical'`. */
1632
+ layout?: 'horizontal' | 'vertical';
1589
1633
  errorMessage?: React$1.ReactNode;
1590
1634
  style?: React$1.CSSProperties;
1591
1635
  htmlFor?: string;
1592
1636
  items?: DropdownItem[];
1593
1637
  labelStyle?: React$1.CSSProperties;
1594
1638
  placeholder?: string;
1595
- [key: string]: any;
1596
1639
  }
1597
1640
  /**
1598
1641
  * Select / multi-select dropdown powered by Radix Popover.
@@ -1624,13 +1667,12 @@ interface AutoCompleteProps {
1624
1667
  name?: string;
1625
1668
  inputStyle?: React$1.CSSProperties;
1626
1669
  style?: React$1.CSSProperties;
1627
- /** 'horizontal' | 'vertical' */
1628
- layout?: string;
1670
+ /** Label/input orientation. Defaults to `'vertical'`. */
1671
+ layout?: 'horizontal' | 'vertical';
1629
1672
  items?: AutoCompleteItem[];
1630
1673
  onItemClick?: (value: string) => void;
1631
1674
  /** Custom "empty" message */
1632
1675
  emptyText?: string;
1633
- [key: string]: any;
1634
1676
  }
1635
1677
  /**
1636
1678
  * Search-as-you-type autocomplete powered by Radix Popover.
@@ -1695,7 +1737,6 @@ interface FileInputProps {
1695
1737
  name?: string;
1696
1738
  /** Accepted MIME types / extensions */
1697
1739
  accept?: string;
1698
- [key: string]: any;
1699
1740
  }
1700
1741
  /**
1701
1742
  * Drag-and-drop / click file input.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-CvyV3YPI.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import React$1 from 'react';
3
+ import React$1, { ReactNode } from 'react';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
6
  declare const Icon: {
@@ -587,45 +587,82 @@ declare function useNotification(): {
587
587
  danger: (props: Omit<NotificationPayload, "type">) => void;
588
588
  };
589
589
 
590
+ type LoadingSpinnerSize = 'sm' | 'md' | 'lg';
590
591
  interface LoadingSpinnerProps {
591
- /** Text revealed letter-by-letter beneath the spinner. */
592
- prompt: string;
592
+ /**
593
+ * Text revealed letter-by-letter beneath the spinner. Optional — pass
594
+ * `undefined` for a pure spinner with no caption (e.g. inline mode).
595
+ */
596
+ prompt?: string;
597
+ /** Spinner size variant. Defaults to `'md'`. */
598
+ size?: LoadingSpinnerSize;
599
+ /**
600
+ * When `true`, renders inline at the call site (no portal, no fullscreen
601
+ * overlay, no backdrop). Useful inside cards, table rows, drawers, or
602
+ * empty-state slots. Defaults to `false` (fullscreen overlay).
603
+ */
604
+ inline?: boolean;
593
605
  /**
594
606
  * Optional override for the spinner ring colour. Accepts any CSS colour.
595
- * Defaults to the accent token so it picks up theme overrides.
607
+ * Defaults to the `--color-accent` token so it picks up theme overrides.
596
608
  */
597
609
  spinnerColor?: string;
598
610
  /**
599
611
  * Optional override for the prompt text colour.
600
- * Defaults to the foreground token (light/dark aware).
612
+ * Defaults to the `--color-foreground` token (light/dark aware).
601
613
  */
602
614
  textColor?: string;
603
615
  /**
604
- * Backdrop opacity (0 – 1). Defaults to 0.92 close enough to opaque to
605
- * block UI underneath while still hinting at the previous state.
616
+ * Backdrop opacity (0 – 1) for the fullscreen overlay. Defaults to 0.8
617
+ * close enough to opaque to block UI underneath while still hinting at the
618
+ * previous state. Ignored when `inline` is true.
606
619
  */
607
620
  backdropOpacity?: number;
608
621
  }
609
622
  /**
610
- * Full-screen loading overlay with a spinning ring and a staggered text
611
- * reveal. Portaled into `document.body` so it always covers the actual
612
- * viewport regardless of where it's rendered in the React tree.
613
- *
614
- * Honours `prefers-reduced-motion`: the spinner still rotates (continuous
615
- * spin is informative, not decorative) but the letter stagger collapses to
616
- * an instant reveal.
617
- *
618
- * @example
623
+ * Enterprise-grade loading indicator.
624
+ *
625
+ * Two concentric arcs counter-rotating around a breathing centre dot, with
626
+ * an optional staggered letter reveal beneath. Portaled to `document.body`
627
+ * for the fullscreen overlay so it always covers the actual viewport
628
+ * regardless of where it sits in the React tree.
629
+ *
630
+ * **Two modes:**
631
+ * - **Fullscreen overlay** (default): semi-opaque backdrop with
632
+ * `backdrop-blur-sm` for a modern depth effect. Use during page-level
633
+ * loading, route transitions, or critical mutations.
634
+ * - **Inline** (`inline`): just the spinner + optional caption rendered at
635
+ * the call site. Use inside cards, table rows, drawers, empty states,
636
+ * or anywhere a smaller loading affordance is appropriate.
637
+ *
638
+ * **Accessibility**: `role="status"` + `aria-label`/`aria-live` make the
639
+ * indicator announce-able to screen readers. `prefers-reduced-motion`
640
+ * collapses the letter stagger to instant reveal — the spinner rings keep
641
+ * rotating since a continuous spinner is informative, not decorative.
642
+ *
643
+ * @example Fullscreen overlay (page load)
644
+ * ```tsx
619
645
  * {isLoading && <LoadingSpinner prompt="Loading vessels…" />}
646
+ * ```
620
647
  *
621
- * @example
648
+ * @example Inline (inside a card)
649
+ * ```tsx
650
+ * <Card>
651
+ * {data ? <Chart data={data} /> : <LoadingSpinner inline size="sm" />}
652
+ * </Card>
653
+ * ```
654
+ *
655
+ * @example Themed overlay
656
+ * ```tsx
622
657
  * <LoadingSpinner
623
658
  * prompt="Saving"
659
+ * size="lg"
624
660
  * spinnerColor="#10b981"
625
661
  * backdropOpacity={0.7}
626
662
  * />
663
+ * ```
627
664
  */
628
- declare function LoadingSpinner({ prompt, spinnerColor, textColor, backdropOpacity, }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
665
+ declare function LoadingSpinner({ prompt, size, inline, spinnerColor, textColor, backdropOpacity, }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
629
666
 
630
667
  interface FadingBaseProps {
631
668
  className?: string;
@@ -652,7 +689,6 @@ declare function FadingBase({ className, isMounted, children, }: FadingBaseProps
652
689
  interface ListItem {
653
690
  key: string | number;
654
691
  label: React$1.ReactNode;
655
- [key: string]: any;
656
692
  }
657
693
  interface ListProps {
658
694
  items: ListItem[];
@@ -1399,7 +1435,7 @@ interface ButtonProps {
1399
1435
  declare function Button({ content, variant, size, buttonType, loading, disabled, style, icon, onClick, }: ButtonProps): react_jsx_runtime.JSX.Element;
1400
1436
 
1401
1437
  interface TextInputProps {
1402
- value?: any;
1438
+ value?: string;
1403
1439
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1404
1440
  disabled?: boolean;
1405
1441
  label?: React$1.ReactNode;
@@ -1408,13 +1444,12 @@ interface TextInputProps {
1408
1444
  name?: string;
1409
1445
  inputStyle?: React$1.CSSProperties;
1410
1446
  style?: React$1.CSSProperties;
1411
- /** 'horizontal' | 'vertical' */
1412
- layout?: string;
1447
+ /** Label/input orientation. Defaults to `'horizontal'`. */
1448
+ layout?: 'horizontal' | 'vertical';
1413
1449
  onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
1414
1450
  errorMessage?: React$1.ReactNode;
1415
1451
  labelColor?: string;
1416
1452
  id?: string;
1417
- [key: string]: any;
1418
1453
  }
1419
1454
  /**
1420
1455
  * Standard text input with label and validation message.
@@ -1453,7 +1488,7 @@ interface NumberInputProps {
1453
1488
  declare function NumberInput({ step, value, onChange, label, htmlFor, name, disabled, layout, errorMessage, inputStyle, labelStyle, placeholder, style, min, max, readOnly, }: NumberInputProps): react_jsx_runtime.JSX.Element;
1454
1489
 
1455
1490
  interface PasswordProps {
1456
- value?: any;
1491
+ value?: string;
1457
1492
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1458
1493
  disabled?: boolean;
1459
1494
  label?: React$1.ReactNode;
@@ -1462,12 +1497,12 @@ interface PasswordProps {
1462
1497
  name?: string;
1463
1498
  inputStyle?: React$1.CSSProperties;
1464
1499
  style?: React$1.CSSProperties;
1465
- layout?: string;
1500
+ /** Label/input orientation. Defaults to `'horizontal'`. */
1501
+ layout?: 'horizontal' | 'vertical';
1466
1502
  onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
1467
1503
  errorMessage?: React$1.ReactNode;
1468
1504
  labelColor?: string;
1469
1505
  iconColor?: string;
1470
- [key: string]: any;
1471
1506
  }
1472
1507
  /**
1473
1508
  * Password input with show/hide toggle.
@@ -1475,7 +1510,7 @@ interface PasswordProps {
1475
1510
  declare function Password({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, onBlur, errorMessage, labelColor, iconColor, }: PasswordProps): react_jsx_runtime.JSX.Element;
1476
1511
 
1477
1512
  interface SearchInputProps {
1478
- value?: any;
1513
+ value?: string;
1479
1514
  onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
1480
1515
  disabled?: boolean;
1481
1516
  label?: React$1.ReactNode;
@@ -1484,16 +1519,16 @@ interface SearchInputProps {
1484
1519
  name?: string;
1485
1520
  inputStyle?: React$1.CSSProperties;
1486
1521
  style?: React$1.CSSProperties;
1487
- layout?: string;
1488
- [key: string]: any;
1522
+ /** Label/input orientation. Defaults to `'vertical'`. */
1523
+ layout?: 'horizontal' | 'vertical';
1489
1524
  }
1490
1525
  /**
1491
1526
  * Search text field with a magnifier icon on the right.
1492
1527
  */
1493
- declare const SearchInput: React$1.ForwardRefExoticComponent<Omit<SearchInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
1528
+ declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
1494
1529
 
1495
1530
  interface DropdownPillProps {
1496
- value?: React.ReactNode;
1531
+ value?: ReactNode;
1497
1532
  hasSiblings?: boolean;
1498
1533
  }
1499
1534
  /**
@@ -1546,7 +1581,6 @@ interface SwitchInputProps {
1546
1581
  }) => void;
1547
1582
  checkedIcon?: React$1.ReactNode;
1548
1583
  uncheckedIcon?: React$1.ReactNode;
1549
- [key: string]: any;
1550
1584
  }
1551
1585
  /**
1552
1586
  * Form switch (on/off toggle) powered by Radix Switch.
@@ -1569,30 +1603,39 @@ interface DropdownItem {
1569
1603
  label: React$1.ReactNode;
1570
1604
  icon?: React$1.ReactNode;
1571
1605
  }
1606
+ /**
1607
+ * Item key type — DOM-friendly subset of `React.Key` (no bigint, since UI
1608
+ * keys are always strings or numbers in practice).
1609
+ */
1610
+ type DropdownKey = string | number;
1611
+ /**
1612
+ * Selected value(s). In single-select mode this is a single key matching
1613
+ * one of the items. In multi-select mode it is an array of keys.
1614
+ */
1615
+ type DropdownValue = DropdownKey | DropdownKey[];
1572
1616
  interface DropdownProps {
1573
1617
  isMultiselect?: boolean;
1574
1618
  hasSearch?: boolean;
1575
1619
  label?: React$1.ReactNode;
1576
1620
  name?: string;
1577
- value?: any;
1621
+ value?: DropdownValue;
1578
1622
  onChange?: (e: {
1579
1623
  target: {
1580
- value: any;
1624
+ value: DropdownValue;
1581
1625
  id?: string;
1582
1626
  name?: string;
1583
1627
  };
1584
1628
  }) => void;
1585
1629
  onBlur?: React$1.FocusEventHandler;
1586
1630
  disabled?: boolean;
1587
- /** 'horizontal' | 'vertical' */
1588
- layout?: string;
1631
+ /** Label/input orientation. Defaults to `'vertical'`. */
1632
+ layout?: 'horizontal' | 'vertical';
1589
1633
  errorMessage?: React$1.ReactNode;
1590
1634
  style?: React$1.CSSProperties;
1591
1635
  htmlFor?: string;
1592
1636
  items?: DropdownItem[];
1593
1637
  labelStyle?: React$1.CSSProperties;
1594
1638
  placeholder?: string;
1595
- [key: string]: any;
1596
1639
  }
1597
1640
  /**
1598
1641
  * Select / multi-select dropdown powered by Radix Popover.
@@ -1624,13 +1667,12 @@ interface AutoCompleteProps {
1624
1667
  name?: string;
1625
1668
  inputStyle?: React$1.CSSProperties;
1626
1669
  style?: React$1.CSSProperties;
1627
- /** 'horizontal' | 'vertical' */
1628
- layout?: string;
1670
+ /** Label/input orientation. Defaults to `'vertical'`. */
1671
+ layout?: 'horizontal' | 'vertical';
1629
1672
  items?: AutoCompleteItem[];
1630
1673
  onItemClick?: (value: string) => void;
1631
1674
  /** Custom "empty" message */
1632
1675
  emptyText?: string;
1633
- [key: string]: any;
1634
1676
  }
1635
1677
  /**
1636
1678
  * Search-as-you-type autocomplete powered by Radix Popover.
@@ -1695,7 +1737,6 @@ interface FileInputProps {
1695
1737
  name?: string;
1696
1738
  /** Accepted MIME types / extensions */
1697
1739
  accept?: string;
1698
- [key: string]: any;
1699
1740
  }
1700
1741
  /**
1701
1742
  * Drag-and-drop / click file input.