@texturehq/edges 1.5.2 → 1.6.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/components.manifest.json +170 -10
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +306 -82
- package/dist/index.d.ts +306 -82
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/{server-Cz62pUnv.d.cts → server-C20rH2CQ.d.cts} +1 -0
- package/dist/{server-Cz62pUnv.d.ts → server-C20rH2CQ.d.ts} +1 -0
- package/dist/server.cjs +15 -15
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +15 -15
- package/dist/server.js.map +1 -1
- package/dist/styles/animations.css +40 -0
- package/dist/styles.css +94 -10
- package/dist/utilities.manifest.json +2 -2
- package/package.json +1 -1
- package/scripts/generate-components-manifest.js +6 -6
- package/scripts/generate-utilities-manifest.js +66 -43
- package/scripts/generate-viz-runtime.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Key, ValidationResult, BreadcrumbProps, BreadcrumbsProps, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, CheckboxGroupProps as CheckboxGroupProps$1, DateRangePickerProps as DateRangePickerProps$1, TextProps, FormProps, ListBoxProps as ListBoxProps$1, ListBoxItemProps, ModalOverlayProps, NumberFieldProps as NumberFieldProps$1, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, RangeCalendarProps as RangeCalendarProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps, TabsProps as TabsProps$2, TextFieldProps as TextFieldProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, TooltipProps as TooltipProps$1 } from 'react-aria-components';
|
|
2
2
|
export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger } from 'react-aria-components';
|
|
3
|
-
import { I as Icon, B as BaseDataPoint, Y as YFormatType, T as TooltipData, a as IconName$2, L as LayerSpec, C as CustomPinsSpec, G as GeoJsonLayerSpec, R as RasterLayerSpec, V as VectorLayerSpec } from './server-
|
|
4
|
-
export { A as ActionItem, c as ActionMenu, b as ActionMenuProps, e as AppShell, d as AppShellProps, g as Avatar, f as AvatarProps, i as Badge, h as BadgeProps, l as Card, j as CardProps, k as CardVariant, a4 as ChartContext, a6 as ChartMargin, p as CodeEditor, m as CodeEditorProps, n as CodeLanguage, o as CodeTheme, u as ColorSpec, q as DateField, D as DateFieldProps, r as FileUpload, F as FileUploadProps, H as Heading, z as InteractiveMap, v as InteractiveMapProps, w as LayerFeature, x as LayerStyle, s as Loader, t as Logo, E as MAP_TYPES, M as MapPoint, N as Meter, K as MeterProps, y as RenderType, P as RichTextEditor, O as RichTextEditorProps, U as SegmentOption, W as SegmentedControl, Q as SegmentedControlProps, $ as SideNav, X as SideNavItem, _ as SideNavProps, J as StaticMap, S as StaticMapProps, a0 as TextLink, a3 as TooltipSeries, a2 as TopNav, a1 as TopNavProps, ab as YFormatSettings, Z as ZoomStops, ac as clearColorCache, ad as createCategoryColorMap, a7 as createXScale, a8 as createYScale, a9 as defaultMargin, ae as getContrastingTextColor, af as getDefaultChartColor, ag as getDefaultColors, ah as getResolvedColor, ai as getThemeCategoricalColors, aa as getYFormatSettings, aj as isLightColor, a5 as useChartContext } from './server-
|
|
3
|
+
import { I as Icon, B as BaseDataPoint, Y as YFormatType, T as TooltipData, a as IconName$2, L as LayerSpec, C as CustomPinsSpec, G as GeoJsonLayerSpec, R as RasterLayerSpec, V as VectorLayerSpec } from './server-C20rH2CQ.js';
|
|
4
|
+
export { A as ActionItem, c as ActionMenu, b as ActionMenuProps, e as AppShell, d as AppShellProps, g as Avatar, f as AvatarProps, i as Badge, h as BadgeProps, l as Card, j as CardProps, k as CardVariant, a4 as ChartContext, a6 as ChartMargin, p as CodeEditor, m as CodeEditorProps, n as CodeLanguage, o as CodeTheme, u as ColorSpec, q as DateField, D as DateFieldProps, r as FileUpload, F as FileUploadProps, H as Heading, z as InteractiveMap, v as InteractiveMapProps, w as LayerFeature, x as LayerStyle, s as Loader, t as Logo, E as MAP_TYPES, M as MapPoint, N as Meter, K as MeterProps, y as RenderType, P as RichTextEditor, O as RichTextEditorProps, U as SegmentOption, W as SegmentedControl, Q as SegmentedControlProps, $ as SideNav, X as SideNavItem, _ as SideNavProps, J as StaticMap, S as StaticMapProps, a0 as TextLink, a3 as TooltipSeries, a2 as TopNav, a1 as TopNavProps, ab as YFormatSettings, Z as ZoomStops, ac as clearColorCache, ad as createCategoryColorMap, a7 as createXScale, a8 as createYScale, a9 as defaultMargin, ae as getContrastingTextColor, af as getDefaultChartColor, ag as getDefaultColors, ah as getResolvedColor, ai as getThemeCategoricalColors, aa as getYFormatSettings, aj as isLightColor, a5 as useChartContext } from './server-C20rH2CQ.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
|
-
import React__default, { ReactNode, ComponentProps, ComponentType, Component, ErrorInfo
|
|
7
|
+
import React__default, { ReactNode, ComponentProps, CSSProperties, ComponentType, Component, ErrorInfo } from 'react';
|
|
8
8
|
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
9
9
|
import '@phosphor-icons/react';
|
|
10
10
|
import 'react-map-gl';
|
|
@@ -955,15 +955,19 @@ interface DialogFooterConfig {
|
|
|
955
955
|
footerContent?: ReactNode;
|
|
956
956
|
}
|
|
957
957
|
|
|
958
|
-
interface DialogProps extends DialogHeaderConfig, DialogFooterConfig {
|
|
958
|
+
interface DialogProps extends Omit<DialogHeaderConfig, "onClose">, DialogFooterConfig {
|
|
959
959
|
/**
|
|
960
|
-
* Whether the dialog is open
|
|
960
|
+
* Whether the dialog is open (controlled mode)
|
|
961
|
+
* When using DialogTrigger, leave this undefined for automatic state management
|
|
962
|
+
* @default undefined
|
|
961
963
|
*/
|
|
962
|
-
isOpen
|
|
964
|
+
isOpen?: boolean;
|
|
963
965
|
/**
|
|
964
|
-
* Callback when the dialog is closed
|
|
966
|
+
* Callback when the dialog is closed (controlled mode)
|
|
967
|
+
* When using DialogTrigger, leave this undefined for automatic state management
|
|
968
|
+
* @default undefined
|
|
965
969
|
*/
|
|
966
|
-
onClose
|
|
970
|
+
onClose?: () => void;
|
|
967
971
|
/**
|
|
968
972
|
* Dialog content
|
|
969
973
|
*/
|
|
@@ -978,6 +982,11 @@ interface DialogProps extends DialogHeaderConfig, DialogFooterConfig {
|
|
|
978
982
|
* @default "600px"
|
|
979
983
|
*/
|
|
980
984
|
maxWidth?: string;
|
|
985
|
+
/**
|
|
986
|
+
* Minimum width of the dialog (desktop only, mobile uses full width)
|
|
987
|
+
* @default "400px"
|
|
988
|
+
*/
|
|
989
|
+
minWidth?: string;
|
|
981
990
|
/**
|
|
982
991
|
* Whether to include padding inside the content area
|
|
983
992
|
* @default true
|
|
@@ -997,8 +1006,31 @@ interface DialogProps extends DialogHeaderConfig, DialogFooterConfig {
|
|
|
997
1006
|
* **Mobile (<768px):** Bottom sheet that slides up from bottom
|
|
998
1007
|
*
|
|
999
1008
|
* Includes optional header with title/back button and footer with action buttons.
|
|
1009
|
+
*
|
|
1010
|
+
* ## Usage Patterns
|
|
1011
|
+
*
|
|
1012
|
+
* ### Uncontrolled with DialogTrigger (Recommended)
|
|
1013
|
+
* ```tsx
|
|
1014
|
+
* import { DialogTrigger, Dialog, Button } from "@texturehq/edges";
|
|
1015
|
+
*
|
|
1016
|
+
* <DialogTrigger>
|
|
1017
|
+
* <Button>Open Dialog</Button>
|
|
1018
|
+
* <Dialog title="My Dialog">
|
|
1019
|
+
* <p>Dialog content</p>
|
|
1020
|
+
* </Dialog>
|
|
1021
|
+
* </DialogTrigger>
|
|
1022
|
+
* ```
|
|
1023
|
+
*
|
|
1024
|
+
* ### Controlled (Advanced)
|
|
1025
|
+
* ```tsx
|
|
1026
|
+
* const [isOpen, setIsOpen] = useState(false);
|
|
1027
|
+
*
|
|
1028
|
+
* <Dialog isOpen={isOpen} onClose={() => setIsOpen(false)} title="My Dialog">
|
|
1029
|
+
* <p>Dialog content</p>
|
|
1030
|
+
* </Dialog>
|
|
1031
|
+
* ```
|
|
1000
1032
|
*/
|
|
1001
|
-
declare function Dialog({ isOpen, onClose, title, headerContent, titleAlign, hideCloseIcon, hasBackArrow, onBack, children, primaryAction, secondaryAction, footerContent, transparentOverlay, maxWidth, contentPadding, className, }: DialogProps): react_jsx_runtime.JSX.Element | null;
|
|
1033
|
+
declare function Dialog({ isOpen, onClose, title, headerContent, titleAlign, hideCloseIcon, hasBackArrow, onBack, children, primaryAction, secondaryAction, footerContent, transparentOverlay, maxWidth, minWidth, contentPadding, className, }: DialogProps): react_jsx_runtime.JSX.Element | null;
|
|
1002
1034
|
|
|
1003
1035
|
interface AlertProps {
|
|
1004
1036
|
/**
|
|
@@ -1032,6 +1064,11 @@ interface AlertProps {
|
|
|
1032
1064
|
* @default "400px"
|
|
1033
1065
|
*/
|
|
1034
1066
|
maxWidth?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Minimum width of the alert dialog (desktop only)
|
|
1069
|
+
* @default "320px"
|
|
1070
|
+
*/
|
|
1071
|
+
minWidth?: string;
|
|
1035
1072
|
}
|
|
1036
1073
|
/**
|
|
1037
1074
|
* Alert
|
|
@@ -1039,7 +1076,7 @@ interface AlertProps {
|
|
|
1039
1076
|
* A simple alert dialog with a single action button.
|
|
1040
1077
|
* Use for informational messages that require acknowledgment.
|
|
1041
1078
|
*/
|
|
1042
|
-
declare function Alert({ isOpen, onClose, title, message, confirmLabel, confirmVariant, maxWidth, }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
1079
|
+
declare function Alert({ isOpen, onClose, title, message, confirmLabel, confirmVariant, maxWidth, minWidth, }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
1043
1080
|
|
|
1044
1081
|
/**
|
|
1045
1082
|
* Control-specific style utilities for form elements and interactive components.
|
|
@@ -1277,6 +1314,11 @@ interface ConfirmProps {
|
|
|
1277
1314
|
* @default "500px"
|
|
1278
1315
|
*/
|
|
1279
1316
|
maxWidth?: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* Minimum width of the confirm dialog (desktop only)
|
|
1319
|
+
* @default "400px"
|
|
1320
|
+
*/
|
|
1321
|
+
minWidth?: string;
|
|
1280
1322
|
}
|
|
1281
1323
|
/**
|
|
1282
1324
|
* Confirm
|
|
@@ -1284,7 +1326,7 @@ interface ConfirmProps {
|
|
|
1284
1326
|
* A confirmation dialog with confirm and cancel actions.
|
|
1285
1327
|
* Use for actions that require user confirmation before proceeding.
|
|
1286
1328
|
*/
|
|
1287
|
-
declare function Confirm({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, confirmVariant, isDestructive, isLoading, maxWidth, }: ConfirmProps): react_jsx_runtime.JSX.Element;
|
|
1329
|
+
declare function Confirm({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, confirmVariant, isDestructive, isLoading, maxWidth, minWidth, }: ConfirmProps): react_jsx_runtime.JSX.Element;
|
|
1288
1330
|
|
|
1289
1331
|
interface CopyToClipboardProps {
|
|
1290
1332
|
/**
|
|
@@ -1465,6 +1507,230 @@ interface LineSeriesProps {
|
|
|
1465
1507
|
*/
|
|
1466
1508
|
declare const LineSeries: React__default.FC<LineSeriesProps>;
|
|
1467
1509
|
|
|
1510
|
+
interface Filter {
|
|
1511
|
+
id: string;
|
|
1512
|
+
label: string;
|
|
1513
|
+
value: string;
|
|
1514
|
+
}
|
|
1515
|
+
interface FilterChipsProps {
|
|
1516
|
+
/** Active filters to display */
|
|
1517
|
+
filters: Filter[];
|
|
1518
|
+
/** Callback when a single filter is removed */
|
|
1519
|
+
onRemove: (id: string) => void;
|
|
1520
|
+
/** Callback to clear all filters */
|
|
1521
|
+
onClearAll?: () => void;
|
|
1522
|
+
/** Callback to open filter management UI */
|
|
1523
|
+
onManageFilters?: () => void;
|
|
1524
|
+
/** Maximum number of chips to show before "+ X more" */
|
|
1525
|
+
maxVisibleChips?: number;
|
|
1526
|
+
/** Display mode: "chips" shows individual removable chips, "button" shows compact count button */
|
|
1527
|
+
mode?: "chips" | "button";
|
|
1528
|
+
/** Show "Filters" button in chips mode to open filter panel */
|
|
1529
|
+
showManageButton?: boolean;
|
|
1530
|
+
/** Size variant */
|
|
1531
|
+
size?: Size;
|
|
1532
|
+
/** Additional CSS classes */
|
|
1533
|
+
className?: string;
|
|
1534
|
+
}
|
|
1535
|
+
/**
|
|
1536
|
+
* FilterChips
|
|
1537
|
+
*
|
|
1538
|
+
* Displays active filters as removable chips or a compact button.
|
|
1539
|
+
* This is a presentational component - responsive behavior is handled by the parent.
|
|
1540
|
+
*
|
|
1541
|
+
* Example usage:
|
|
1542
|
+
* ```tsx
|
|
1543
|
+
* <FilterChips
|
|
1544
|
+
* filters={[
|
|
1545
|
+
* { id: '1', label: 'Region', value: 'West' },
|
|
1546
|
+
* { id: '2', label: 'Status', value: 'Active' }
|
|
1547
|
+
* ]}
|
|
1548
|
+
* onRemove={(id) => removeFilter(id)}
|
|
1549
|
+
* onClearAll={clearAllFilters}
|
|
1550
|
+
* onManageFilters={() => setDrawerOpen(true)}
|
|
1551
|
+
* mode="chips"
|
|
1552
|
+
* />
|
|
1553
|
+
* ```
|
|
1554
|
+
*/
|
|
1555
|
+
declare function FilterChips({ filters, onRemove, onClearAll, onManageFilters, maxVisibleChips, mode, showManageButton, size, className, }: FilterChipsProps): react_jsx_runtime.JSX.Element | null;
|
|
1556
|
+
|
|
1557
|
+
interface SortOption {
|
|
1558
|
+
value: string;
|
|
1559
|
+
label: string;
|
|
1560
|
+
}
|
|
1561
|
+
interface SortControlProps {
|
|
1562
|
+
/** Currently selected sort value */
|
|
1563
|
+
value: string;
|
|
1564
|
+
/** Available sort options */
|
|
1565
|
+
options: SortOption[];
|
|
1566
|
+
/** Callback when sort selection changes */
|
|
1567
|
+
onChange: (value: string) => void;
|
|
1568
|
+
/** Whether to show "Sort by:" label */
|
|
1569
|
+
showLabel?: boolean;
|
|
1570
|
+
/** Size variant */
|
|
1571
|
+
size?: Size;
|
|
1572
|
+
/** Additional CSS classes */
|
|
1573
|
+
className?: string;
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* SortControl
|
|
1577
|
+
*
|
|
1578
|
+
* A dropdown for selecting sort order with optional label.
|
|
1579
|
+
* Wraps Select component with consistent styling for data controls.
|
|
1580
|
+
*
|
|
1581
|
+
* Example usage:
|
|
1582
|
+
* ```tsx
|
|
1583
|
+
* <SortControl
|
|
1584
|
+
* value={sortBy}
|
|
1585
|
+
* options={[
|
|
1586
|
+
* { value: 'name', label: 'Name' },
|
|
1587
|
+
* { value: 'date', label: 'Date' }
|
|
1588
|
+
* ]}
|
|
1589
|
+
* onChange={setSortBy}
|
|
1590
|
+
* showLabel={true}
|
|
1591
|
+
* />
|
|
1592
|
+
* ```
|
|
1593
|
+
*/
|
|
1594
|
+
declare function SortControl({ value, options, onChange, showLabel, size, className, }: SortControlProps): react_jsx_runtime.JSX.Element;
|
|
1595
|
+
|
|
1596
|
+
interface DataControlsProps {
|
|
1597
|
+
/** Search configuration */
|
|
1598
|
+
search?: {
|
|
1599
|
+
value: string;
|
|
1600
|
+
onChange: (value: string) => void;
|
|
1601
|
+
onClear?: () => void;
|
|
1602
|
+
placeholder?: string;
|
|
1603
|
+
};
|
|
1604
|
+
/** How to display search on narrow containers */
|
|
1605
|
+
searchMobileMode?: "expanded" | "collapsed";
|
|
1606
|
+
/** Active filters */
|
|
1607
|
+
filters?: Filter[];
|
|
1608
|
+
/** Callback when a filter is removed */
|
|
1609
|
+
onRemoveFilter?: (id: string) => void;
|
|
1610
|
+
/** Callback to clear all filters */
|
|
1611
|
+
onClearAllFilters?: () => void;
|
|
1612
|
+
/** Callback to open filter management UI (drawer/modal) */
|
|
1613
|
+
onManageFilters?: () => void;
|
|
1614
|
+
/** Maximum visible filter chips before "+ X more" */
|
|
1615
|
+
maxVisibleFilterChips?: number;
|
|
1616
|
+
/** Sort configuration */
|
|
1617
|
+
sort?: {
|
|
1618
|
+
value: string;
|
|
1619
|
+
options: SortOption[];
|
|
1620
|
+
onChange: (value: string) => void;
|
|
1621
|
+
showLabel?: boolean;
|
|
1622
|
+
};
|
|
1623
|
+
/** Results count configuration */
|
|
1624
|
+
resultsCount?: {
|
|
1625
|
+
count: number;
|
|
1626
|
+
label?: string;
|
|
1627
|
+
isLoading?: boolean;
|
|
1628
|
+
};
|
|
1629
|
+
/** Additional CSS classes */
|
|
1630
|
+
className?: string;
|
|
1631
|
+
/** Inline styles */
|
|
1632
|
+
style?: CSSProperties;
|
|
1633
|
+
}
|
|
1634
|
+
/**
|
|
1635
|
+
* DataControls
|
|
1636
|
+
*
|
|
1637
|
+
* A unified control bar for data display components (Lists, DataTables).
|
|
1638
|
+
* Provides search, filtering, sorting, results count, and action controls
|
|
1639
|
+
* with responsive layout.
|
|
1640
|
+
*
|
|
1641
|
+
* All data operations (search, filter, sort) are handled server-side.
|
|
1642
|
+
* This component is purely presentational and controlled.
|
|
1643
|
+
*
|
|
1644
|
+
* **Responsive Behavior:**
|
|
1645
|
+
* - Narrow containers (< 640px): Two rows - Row 1: inputs (search + filter icon), Row 2: outputs (results + sort + actions)
|
|
1646
|
+
* - Wide containers (≥ 640px): Single row with all controls visible
|
|
1647
|
+
*
|
|
1648
|
+
* Example usage:
|
|
1649
|
+
* ```tsx
|
|
1650
|
+
* <DataControls
|
|
1651
|
+
* resultsCount={{ count: 23, label: "sites" }}
|
|
1652
|
+
* search={{
|
|
1653
|
+
* value: searchQuery,
|
|
1654
|
+
* onChange: setSearchQuery,
|
|
1655
|
+
* onClear: () => setSearchQuery(''),
|
|
1656
|
+
* placeholder: "Search sites..."
|
|
1657
|
+
* }}
|
|
1658
|
+
* filters={activeFilters}
|
|
1659
|
+
* onRemoveFilter={removeFilter}
|
|
1660
|
+
* onClearAllFilters={clearAllFilters}
|
|
1661
|
+
* onManageFilters={() => setFilterDrawerOpen(true)}
|
|
1662
|
+
* sort={{
|
|
1663
|
+
* value: sortBy,
|
|
1664
|
+
* options: sortOptions,
|
|
1665
|
+
* onChange: setSortBy
|
|
1666
|
+
* }}
|
|
1667
|
+
* />
|
|
1668
|
+
* ```
|
|
1669
|
+
*/
|
|
1670
|
+
declare function DataControls({ search, searchMobileMode, filters, onRemoveFilter, onClearAllFilters, onManageFilters, maxVisibleFilterChips, sort, resultsCount, className, style, }: DataControlsProps): react_jsx_runtime.JSX.Element | null;
|
|
1671
|
+
|
|
1672
|
+
interface ResultsCountProps {
|
|
1673
|
+
/** Number of results/items */
|
|
1674
|
+
count: number;
|
|
1675
|
+
/** Label to use (e.g., "results", "items", "sites") */
|
|
1676
|
+
label?: string;
|
|
1677
|
+
/** Whether the count is loading */
|
|
1678
|
+
isLoading?: boolean;
|
|
1679
|
+
/** Additional CSS classes */
|
|
1680
|
+
className?: string;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* ResultsCount
|
|
1684
|
+
*
|
|
1685
|
+
* Displays a count of results or items with proper singular/plural handling.
|
|
1686
|
+
* Shows a loading skeleton when data is being fetched.
|
|
1687
|
+
*
|
|
1688
|
+
* Example usage:
|
|
1689
|
+
* ```tsx
|
|
1690
|
+
* <ResultsCount count={23} label="results" />
|
|
1691
|
+
* // Renders: "23 results"
|
|
1692
|
+
*
|
|
1693
|
+
* <ResultsCount count={1} label="site" />
|
|
1694
|
+
* // Renders: "1 site"
|
|
1695
|
+
*
|
|
1696
|
+
* <ResultsCount count={42} label="items" isLoading={true} />
|
|
1697
|
+
* // Renders: loading skeleton
|
|
1698
|
+
* ```
|
|
1699
|
+
*/
|
|
1700
|
+
declare function ResultsCount({ count, label, isLoading, className }: ResultsCountProps): react_jsx_runtime.JSX.Element;
|
|
1701
|
+
|
|
1702
|
+
interface SearchControlProps {
|
|
1703
|
+
/** Current search value */
|
|
1704
|
+
value: string;
|
|
1705
|
+
/** Callback when search value changes */
|
|
1706
|
+
onChange: (value: string) => void;
|
|
1707
|
+
/** Optional callback to clear search */
|
|
1708
|
+
onClear?: () => void;
|
|
1709
|
+
/** Placeholder text */
|
|
1710
|
+
placeholder?: string;
|
|
1711
|
+
/** Size variant */
|
|
1712
|
+
size?: Size;
|
|
1713
|
+
/** Additional CSS classes */
|
|
1714
|
+
className?: string;
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* SearchControl
|
|
1718
|
+
*
|
|
1719
|
+
* A search input with magnifying glass icon and optional clear button.
|
|
1720
|
+
* Thin wrapper around TextField configured for search use cases.
|
|
1721
|
+
*
|
|
1722
|
+
* Example usage:
|
|
1723
|
+
* ```tsx
|
|
1724
|
+
* <SearchControl
|
|
1725
|
+
* value={searchQuery}
|
|
1726
|
+
* onChange={setSearchQuery}
|
|
1727
|
+
* onClear={() => setSearchQuery('')}
|
|
1728
|
+
* placeholder="Search sites..."
|
|
1729
|
+
* />
|
|
1730
|
+
* ```
|
|
1731
|
+
*/
|
|
1732
|
+
declare function SearchControl({ value, onChange, onClear, placeholder, size, className, }: SearchControlProps): react_jsx_runtime.JSX.Element;
|
|
1733
|
+
|
|
1468
1734
|
type SortDirection = "asc" | "desc";
|
|
1469
1735
|
type CellAlignment = "left" | "center" | "right";
|
|
1470
1736
|
type TableDensity = "compact" | "default" | "relaxed";
|
|
@@ -1733,6 +1999,29 @@ interface DateRangePickerProps<T extends DateValue> extends DateRangePickerProps
|
|
|
1733
1999
|
}
|
|
1734
2000
|
declare function DateRangePicker<T extends DateValue>({ label, description, errorMessage, ...props }: DateRangePickerProps<T>): react_jsx_runtime.JSX.Element;
|
|
1735
2001
|
|
|
2002
|
+
type BaseDialogHeaderProps = {
|
|
2003
|
+
title?: string;
|
|
2004
|
+
onClose: () => void;
|
|
2005
|
+
hideCloseIcon?: boolean;
|
|
2006
|
+
titleAlign?: "left" | "center";
|
|
2007
|
+
headerContent?: React__default.ReactNode;
|
|
2008
|
+
};
|
|
2009
|
+
type WithBackArrow = BaseDialogHeaderProps & {
|
|
2010
|
+
hasBackArrow: true;
|
|
2011
|
+
onBack: () => void;
|
|
2012
|
+
};
|
|
2013
|
+
type WithoutBackArrow = BaseDialogHeaderProps & {
|
|
2014
|
+
hasBackArrow?: false;
|
|
2015
|
+
onBack?: never;
|
|
2016
|
+
};
|
|
2017
|
+
/**
|
|
2018
|
+
* DialogHeader
|
|
2019
|
+
*
|
|
2020
|
+
* Header area for dialogs with optional back arrow.
|
|
2021
|
+
*/
|
|
2022
|
+
type DialogHeaderProps = WithBackArrow | WithoutBackArrow;
|
|
2023
|
+
declare const DialogHeader: React__default.FC<DialogHeaderProps>;
|
|
2024
|
+
|
|
1736
2025
|
interface DrawerProps extends DialogHeaderConfig, DialogFooterConfig {
|
|
1737
2026
|
/**
|
|
1738
2027
|
* Drawer content
|
|
@@ -1873,7 +2162,7 @@ declare function useInputFocus(): {
|
|
|
1873
2162
|
/**
|
|
1874
2163
|
* Wrapper component for input containers
|
|
1875
2164
|
*/
|
|
1876
|
-
declare function InputWrapper({ children, className
|
|
2165
|
+
declare function InputWrapper({ children, className }: {
|
|
1877
2166
|
children: React__default.ReactNode;
|
|
1878
2167
|
className?: string;
|
|
1879
2168
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -1954,7 +2243,7 @@ declare function getFieldGroupStyles(props: FieldGroupProps): string;
|
|
|
1954
2243
|
* </Label>
|
|
1955
2244
|
* ```
|
|
1956
2245
|
*/
|
|
1957
|
-
declare function Label({ children, size, tooltip, isRequired, className, htmlFor
|
|
2246
|
+
declare function Label({ children, size, tooltip, isRequired, className, htmlFor }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
1958
2247
|
/**
|
|
1959
2248
|
* Description component for providing additional context about a form field.
|
|
1960
2249
|
*
|
|
@@ -2278,71 +2567,6 @@ interface ListProps<T = unknown> {
|
|
|
2278
2567
|
*/
|
|
2279
2568
|
declare function List<T>({ items, renderItem, selectedId, onSelect, onHoverChange, isLoading, error, emptyMessage, variant, showDividers, "aria-label": ariaLabel, className, style, }: ListProps<T>): react_jsx_runtime.JSX.Element;
|
|
2280
2569
|
|
|
2281
|
-
interface Filter {
|
|
2282
|
-
id: string;
|
|
2283
|
-
label: string;
|
|
2284
|
-
value: string;
|
|
2285
|
-
onRemove: (id: string) => void;
|
|
2286
|
-
}
|
|
2287
|
-
interface SortOption {
|
|
2288
|
-
value: string;
|
|
2289
|
-
label: string;
|
|
2290
|
-
}
|
|
2291
|
-
interface ListHeaderProps {
|
|
2292
|
-
/** Optional title for the list context */
|
|
2293
|
-
title?: string;
|
|
2294
|
-
/** Search input props */
|
|
2295
|
-
search?: {
|
|
2296
|
-
value: string;
|
|
2297
|
-
placeholder?: string;
|
|
2298
|
-
onChange: (value: string) => void;
|
|
2299
|
-
onClear?: () => void;
|
|
2300
|
-
};
|
|
2301
|
-
/** Active filters to display as chips */
|
|
2302
|
-
filters?: Filter[];
|
|
2303
|
-
/** Sort options */
|
|
2304
|
-
sort?: {
|
|
2305
|
-
value: string;
|
|
2306
|
-
options: SortOption[];
|
|
2307
|
-
onChange: (value: string) => void;
|
|
2308
|
-
};
|
|
2309
|
-
/** Optional actions aligned to the right */
|
|
2310
|
-
actions?: ReactNode;
|
|
2311
|
-
/** Clear all filters action */
|
|
2312
|
-
onClearAll?: () => void;
|
|
2313
|
-
/** Layout variant for responsive behavior */
|
|
2314
|
-
variant?: "compact" | "spacious";
|
|
2315
|
-
className?: string;
|
|
2316
|
-
style?: CSSProperties;
|
|
2317
|
-
}
|
|
2318
|
-
/**
|
|
2319
|
-
* ListHeader
|
|
2320
|
-
*
|
|
2321
|
-
* A control bar that sits above any list, providing search, filters, sort, and actions.
|
|
2322
|
-
* Layout is responsive: compact in a sidebar, spacious in a full-page list.
|
|
2323
|
-
*
|
|
2324
|
-
* Example usage:
|
|
2325
|
-
* ```tsx
|
|
2326
|
-
* <ListHeader
|
|
2327
|
-
* title="Sites"
|
|
2328
|
-
* search={{
|
|
2329
|
-
* value: searchQuery,
|
|
2330
|
-
* placeholder: "Search sites...",
|
|
2331
|
-
* onChange: setSearchQuery,
|
|
2332
|
-
* }}
|
|
2333
|
-
* filters={activeFilters}
|
|
2334
|
-
* sort={{
|
|
2335
|
-
* value: sortBy,
|
|
2336
|
-
* options: sortOptions,
|
|
2337
|
-
* onChange: setSortBy,
|
|
2338
|
-
* }}
|
|
2339
|
-
* actions={<Button variant="primary">Save Collection</Button>}
|
|
2340
|
-
* onClearAll={clearAllFilters}
|
|
2341
|
-
* />
|
|
2342
|
-
* ```
|
|
2343
|
-
*/
|
|
2344
|
-
declare function ListHeader({ title, search, filters, sort, actions, onClearAll, variant, className, style, }: ListHeaderProps): react_jsx_runtime.JSX.Element;
|
|
2345
|
-
|
|
2346
2570
|
interface ListItemProps {
|
|
2347
2571
|
id: string;
|
|
2348
2572
|
title: ReactNode;
|
|
@@ -2386,7 +2610,7 @@ interface ListItemProps {
|
|
|
2386
2610
|
declare function ListItem({ id, title, subtitle, meta, leading, trailing, isSelected, isHovered, disabled, href, size, onClick, onMouseEnter, onMouseLeave, className, style, }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
2387
2611
|
|
|
2388
2612
|
interface ListPaneProps {
|
|
2389
|
-
/** Content for the header area (typically
|
|
2613
|
+
/** Content for the header area (typically DataControls or custom header) */
|
|
2390
2614
|
header?: ReactNode;
|
|
2391
2615
|
/** Main content area (typically List with ListItems) */
|
|
2392
2616
|
children: ReactNode;
|
|
@@ -2409,13 +2633,13 @@ interface ListPaneProps {
|
|
|
2409
2633
|
*
|
|
2410
2634
|
* A simple container component for list-driven UIs.
|
|
2411
2635
|
* Provides a structured layout with optional header and footer,
|
|
2412
|
-
* suitable for wrapping
|
|
2636
|
+
* suitable for wrapping DataControls, List, and ListItem components.
|
|
2413
2637
|
*
|
|
2414
2638
|
* Example usage:
|
|
2415
2639
|
* ```tsx
|
|
2416
2640
|
* <ListPane
|
|
2417
2641
|
* width="md"
|
|
2418
|
-
* header={<
|
|
2642
|
+
* header={<DataControls search={...} filters={...} sort={...} />}
|
|
2419
2643
|
* footer={<Button>Add Site</Button>}
|
|
2420
2644
|
* >
|
|
2421
2645
|
* <List items={sites} renderItem={...} />
|
|
@@ -3337,4 +3561,4 @@ interface ColorModeProviderProps {
|
|
|
3337
3561
|
}
|
|
3338
3562
|
declare const ColorModeProvider: React.FC<ColorModeProviderProps>;
|
|
3339
3563
|
|
|
3340
|
-
export { type Action, ActionCell, type ActionCellProps, Alert, type AlertProps, AreaSeries, AutoMobileRenderer, Autocomplete, BREAKPOINTS, BarSeries, BaseDataPoint, type BaseFormat, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, type BooleanFormat, Breadcrumb, type BreadcrumbItem, Breadcrumbs, type Breakpoint, type BreakpointState, Button, Calendar, CardMobileRenderer, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, ColorModeProvider, type Column, type ComponentFormatOptions, type ComponentFormatter, Confirm, type ConfirmProps, CopyToClipboard, type CurrencyFormat, type CurrentFormat, type CurrentUnit, type CustomFormat, CustomPinsSpec, DataTable, type DataTableProps, DateCell, type DateCellProps, type DateFormat, type DateFormatStyle, DateRangePicker, Description, type DescriptionProps, Dialog, type DialogAction, type DialogFooterConfig, type DialogHeaderConfig, type DialogProps, type DistanceFormat, type DistanceUnit, Drawer, type DrawerProps, type EnergyFormat, type EnergyUnit, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, type FieldFormat, FieldGroup, type FieldGroupProps, type FieldValue, type
|
|
3564
|
+
export { type Action, ActionCell, type ActionCellProps, Alert, type AlertProps, AreaSeries, AutoMobileRenderer, Autocomplete, BREAKPOINTS, BarSeries, BaseDataPoint, type BaseFormat, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, type BooleanFormat, Breadcrumb, type BreadcrumbItem, Breadcrumbs, type Breakpoint, type BreakpointState, Button, Calendar, CardMobileRenderer, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, ColorModeProvider, type Column, type ComponentFormatOptions, type ComponentFormatter, Confirm, type ConfirmProps, CopyToClipboard, type CurrencyFormat, type CurrentFormat, type CurrentUnit, type CustomFormat, CustomPinsSpec, DataControls, type Filter as DataControlsFilter, type DataControlsProps, type SortOption as DataControlsSortOption, DataTable, type DataTableProps, DateCell, type DateCellProps, type DateFormat, type DateFormatStyle, DateRangePicker, Description, type DescriptionProps, Dialog, type DialogAction, type DialogFooterConfig, DialogHeader, type DialogHeaderConfig, type DialogHeaderProps, type DialogProps, type DistanceFormat, type DistanceUnit, Drawer, type DrawerProps, type EnergyFormat, type EnergyUnit, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, type FieldFormat, FieldGroup, type FieldGroupProps, type FieldValue, FilterChips, type FilterChipsProps, Form, FormatRegistry, type FormattedValue, type FormatterFunction, GeoJsonLayerSpec, Grid, type GridAlign, type GridCols, type GridFlow, type GridGap, type GridItemProps, type GridJustify, type GridProps, type GridSpan, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, Kpi, KpiGroup, type KpiGroupAlign, type KpiGroupCols, type KpiGroupGap, type KpiGroupProps, type KpiOrientation, type KpiProps, type KpiSize, type KpiStatus, Label, type LabelProps, LayerSpec, LineSeries, type LinkBehavior, List, ListBox, ListBoxItem, ListItem, type ListItemProps, ListPane, type ListPaneProps, type ListProps, type MobileBreakpoint, type MobileConfig, type MobileRenderer, ModalBackdrop, type ModalBackdropProps, Notice, NoticeContainer, type NoticeContainerProps, type NoticeOptions, type NoticeProps, NoticeProvider, type NoticeProviderProps, type NoticeVariant, NumberCell, type NumberCellProps, NumberField, type NumberFormat, type PageActionsProps, type PageAsideProps, type PageContentProps, type PageFiltersProps, type PageHeaderProps, PageLayout, type PageLayoutProps, type PhoneFormat, PlaceSearch, Popover, type PowerFormat, type PowerUnit, ProgressBar, Radio, RadioGroup, RangeCalendar, RasterLayerSpec, type ResistanceFormat, type ResistanceUnit, type ResponsiveValue, ResultsCount, type ResultsCountProps, SKELETON_SIZES, SearchControl, type SearchControlProps, Section, type SectionProps, type SectionSpacing, type SectionVariant, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, SortControl, type SortControlProps, type SortDirection, SplitPane, type SplitPaneOrientation, type SplitPanePanelProps, type SplitPaneProps, type StatAlign, type StatFormatter, type StatItem, type StatLayout, StatList, type StatListProps, type StatThreshold, type StatTone, type StatValue, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, type TabsProps$1 as TabsProps, type TemperatureFormat, type TemperatureUnit, type TemperatureUnitString, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, type TextFormat, type TextTransform, type TextTruncatePosition, TimeField, ToggleButton, Tooltip, TooltipData, type TrendPoint, type UseBreakpointReturn, VectorLayerSpec, type VoltageFormat, type VoltageUnit, YFormatType, autoScaleCurrent, autoScaleDistance, autoScaleEnergy, autoScalePower, autoScaleResistance, autoScaleVoltage, camelCaseToWords, capitalize, celsiusToFahrenheit, celsiusToKelvin, centimetersToInches, createFormat, enumToSentenceCase, exportChart, fahrenheitToCelsius, fahrenheitToKelvin, feetToMeters, feetToMiles, formatBoolean, formatComponentValue, formatCurrency, formatCurrent, formatDate, formatDistance, formatEmptyValue, formatEnergy, formatFieldValue, formatInternationalPhone, formatNumber, formatPhone, formatPhoneNumber, formatPower, formatResistance, formatTemperature, formatText, formatUSPhone, formatVoltage, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getDateParts, getExportFormatName, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getSkeletonSize, inchesToCentimeters, isCustomPinsLayer, isExportSupported, isGeoJsonLayer, isNil, isRasterLayer, isVectorLayer, kelvinToCelsius, kelvinToFahrenheit, kilometersToMiles, layer, metersToFeet, metersToMiles, metersToYards, milesToFeet, milesToKilometers, milesToMeters, parseBoolean, resolveValue, snakeCaseToWords, temperatureStringToSymbol, toA, toActiveInactive, toAmps, toBoolean, toCelsius, toCentimeters, toCheckmark, toCompactNumber, toCurrency, toCustomDateFormat, toDateString, toEnabledDisabled, toFahrenheit, toFeet, toFloat, toFormattedNumber, toFullDateTime, toGW, toGWh, toGigawatts, toISOString, toInches, toInteger, toKA, toKV, toKW, toKelvin, toKiloamps, toKilohms, toKilometers, toKilovolts, toKilowatts, toLowerCase, toMA, toMV, toMW, toMWh, toMegawatts, toMegohms, toMeters, toMiles, toMilliamps, toMillimeters, toMilliohms, toMillivolts, toNauticalMiles, toOhms, toOnOff, toPercentage, toRelativeTime, toScientificNotation, toSecret, toSentenceCase, toTemperature, toTitleCase, toTrueFalse, toUpperCase, toV, toVolts, toW, toWatts, toWh, toYards, tokWh, truncateEnd, truncateMiddle, truncateStart, ucFirst, useBreakpoint, useColorMode, useComponentFormatter, useDebounce, useInputFocus, useLocalStorage, useMediaQuery, useNotice, yardsToMeters };
|