@geomak/ui 1.3.0 → 1.5.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/chunk-255PCZIW.cjs +238 -0
- package/dist/chunk-255PCZIW.cjs.map +1 -0
- package/dist/chunk-GKXP6OJJ.js +233 -0
- package/dist/chunk-GKXP6OJJ.js.map +1 -0
- package/dist/index-CvyV3YPI.d.cts +293 -0
- package/dist/index-CvyV3YPI.d.ts +293 -0
- package/dist/index.cjs +566 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -49
- package/dist/index.d.ts +329 -49
- package/dist/index.js +534 -77
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2242 -0
- package/dist/tokens/index.cjs +4 -4
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +1 -1
- package/package.json +6 -2
- package/dist/chunk-DNQSZOYD.js +0 -152
- package/dist/chunk-DNQSZOYD.js.map +0 -1
- package/dist/chunk-ZS3HB5YJ.cjs +0 -157
- package/dist/chunk-ZS3HB5YJ.cjs.map +0 -1
- package/dist/index-CPCiQllz.d.cts +0 -191
- package/dist/index-CPCiQllz.d.ts +0 -191
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as COLORS, S as SemanticColorKey, a as
|
|
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
3
|
import React$1 from 'react';
|
|
4
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -329,26 +329,31 @@ declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText,
|
|
|
329
329
|
|
|
330
330
|
interface TooltipProps {
|
|
331
331
|
children: React$1.ReactNode;
|
|
332
|
+
/** The text or node shown inside the tooltip */
|
|
332
333
|
title: React$1.ReactNode;
|
|
333
|
-
/**
|
|
334
|
+
/** Which side of the trigger the tooltip appears on */
|
|
334
335
|
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
335
|
-
/** Delay
|
|
336
|
+
/** Delay before showing, ms (default 300) */
|
|
336
337
|
delayDuration?: number;
|
|
338
|
+
/** Offset from trigger in px (default 8) */
|
|
339
|
+
sideOffset?: number;
|
|
337
340
|
}
|
|
338
341
|
/**
|
|
339
342
|
* Tooltip powered by Radix Tooltip.
|
|
340
343
|
*
|
|
341
|
-
* Radix handles keyboard navigation (
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
344
|
+
* Radix handles keyboard navigation (Escape), pointer events, and ARIA.
|
|
345
|
+
* Each placement animates in from the correct direction.
|
|
346
|
+
* Wrap your app in `<TooltipProvider>` (re-exported below) to share a
|
|
347
|
+
* single provider instead of nesting one per tooltip.
|
|
345
348
|
*
|
|
346
349
|
* @example
|
|
347
|
-
* <
|
|
348
|
-
* <
|
|
349
|
-
*
|
|
350
|
+
* <TooltipProvider>
|
|
351
|
+
* <Tooltip title="Delete record" placement="top">
|
|
352
|
+
* <IconButton icon={<TrashIcon />} />
|
|
353
|
+
* </Tooltip>
|
|
354
|
+
* </TooltipProvider>
|
|
350
355
|
*/
|
|
351
|
-
declare function Tooltip({ children, title, placement, delayDuration, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
356
|
+
declare function Tooltip({ children, title, placement, delayDuration, sideOffset, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
352
357
|
|
|
353
358
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
354
359
|
|
|
@@ -452,6 +457,7 @@ declare function ToggleButton({ items, onChange, activeKey }: ToggleButtonProps)
|
|
|
452
457
|
|
|
453
458
|
/** ─────────────────── types ─────────────────── */
|
|
454
459
|
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
460
|
+
type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
455
461
|
interface NotificationPayload {
|
|
456
462
|
title: React$1.ReactNode;
|
|
457
463
|
description?: React$1.ReactNode;
|
|
@@ -461,35 +467,20 @@ interface NotificationPayload {
|
|
|
461
467
|
}
|
|
462
468
|
/** ─────────────────── provider ─────────────────── */
|
|
463
469
|
/**
|
|
464
|
-
* Wrap your
|
|
465
|
-
* toast notifications. Then call `useNotification()` anywhere inside to
|
|
466
|
-
* trigger them.
|
|
470
|
+
* Wrap your app in `NotificationProvider`, then call `useNotification()` anywhere inside.
|
|
467
471
|
*
|
|
468
|
-
*
|
|
469
|
-
* `prefers-reduced-motion` is respected via `useReducedMotion()`.
|
|
472
|
+
* @param position One of 6 viewport positions (default: `top-right`)
|
|
470
473
|
*
|
|
471
474
|
* @example
|
|
472
|
-
*
|
|
473
|
-
* <NotificationProvider>
|
|
475
|
+
* <NotificationProvider position="bottom-right">
|
|
474
476
|
* <App />
|
|
475
477
|
* </NotificationProvider>
|
|
476
|
-
*
|
|
477
|
-
* // Inside a component
|
|
478
|
-
* const notify = useNotification()
|
|
479
|
-
* notify.success({ title: 'Saved!', description: 'Your changes were saved.' })
|
|
480
478
|
*/
|
|
481
|
-
declare function NotificationProvider({ children }: {
|
|
479
|
+
declare function NotificationProvider({ children, position, }: {
|
|
482
480
|
children: React$1.ReactNode;
|
|
481
|
+
position?: NotificationPosition;
|
|
483
482
|
}): react_jsx_runtime.JSX.Element;
|
|
484
483
|
/** ─────────────────── hook ─────────────────── */
|
|
485
|
-
/**
|
|
486
|
-
* Imperative notification API. Must be called inside `NotificationProvider`.
|
|
487
|
-
*
|
|
488
|
-
* @example
|
|
489
|
-
* const notify = useNotification()
|
|
490
|
-
* notify.success({ title: 'Done', description: 'Record saved.', duration: 3000 })
|
|
491
|
-
* notify.danger({ title: 'Error', description: err.message })
|
|
492
|
-
*/
|
|
493
484
|
declare function useNotification(): {
|
|
494
485
|
info: (props: Omit<NotificationPayload, "type">) => void;
|
|
495
486
|
success: (props: Omit<NotificationPayload, "type">) => void;
|
|
@@ -892,6 +883,295 @@ interface TopBarProps {
|
|
|
892
883
|
*/
|
|
893
884
|
declare function TopBar({ brand, center, actions, height, className, }: TopBarProps): react_jsx_runtime.JSX.Element;
|
|
894
885
|
|
|
886
|
+
/** ─────────────────── types ─────────────────── */
|
|
887
|
+
interface SidebarItem {
|
|
888
|
+
key: string;
|
|
889
|
+
icon: React$1.ReactNode;
|
|
890
|
+
label: string;
|
|
891
|
+
isActive?: boolean;
|
|
892
|
+
onClick?: () => void;
|
|
893
|
+
/** Numeric badge shown on the icon */
|
|
894
|
+
badge?: number;
|
|
895
|
+
}
|
|
896
|
+
interface SidebarSection {
|
|
897
|
+
key: string;
|
|
898
|
+
/** Section title — visible only when expanded */
|
|
899
|
+
title?: string;
|
|
900
|
+
items: SidebarItem[];
|
|
901
|
+
}
|
|
902
|
+
interface SidebarProps {
|
|
903
|
+
sections: SidebarSection[];
|
|
904
|
+
isExpanded: boolean;
|
|
905
|
+
onToggle?: () => void;
|
|
906
|
+
/** Expanded sidebar width in px (default 220) */
|
|
907
|
+
expandedWidth?: number;
|
|
908
|
+
/** Collapsed sidebar width in px (default 52) */
|
|
909
|
+
collapsedWidth?: number;
|
|
910
|
+
/** Slot rendered at the bottom of the sidebar (theme switch, user avatar…) */
|
|
911
|
+
footer?: React$1.ReactNode;
|
|
912
|
+
}
|
|
913
|
+
/** ─────────────────── main component ─────────────────── */
|
|
914
|
+
/**
|
|
915
|
+
* Collapsible application sidebar.
|
|
916
|
+
*
|
|
917
|
+
* When collapsed: icon-only with tooltips. When expanded: icon + label.
|
|
918
|
+
* Width animates with an ease-out-expo curve. The parent (AppShell) is
|
|
919
|
+
* responsible for shifting the main content by the sidebar width.
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* const [open, setOpen] = useState(true)
|
|
923
|
+
* <Sidebar
|
|
924
|
+
* sections={NAV_SECTIONS}
|
|
925
|
+
* isExpanded={open}
|
|
926
|
+
* onToggle={() => setOpen(o => !o)}
|
|
927
|
+
* />
|
|
928
|
+
*/
|
|
929
|
+
declare function Sidebar({ sections, isExpanded, onToggle, expandedWidth, collapsedWidth, footer, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
930
|
+
|
|
931
|
+
interface AppShellProps {
|
|
932
|
+
/**
|
|
933
|
+
* Top navigation bar.
|
|
934
|
+
* Typically `<TopBar brand={...} actions={...} />`.
|
|
935
|
+
*/
|
|
936
|
+
topBar?: React$1.ReactNode;
|
|
937
|
+
/** Sidebar navigation sections */
|
|
938
|
+
sidebarSections?: SidebarSection[];
|
|
939
|
+
/** Expanded width of the sidebar in px (default 220) */
|
|
940
|
+
sidebarExpandedWidth?: SidebarProps['expandedWidth'];
|
|
941
|
+
/** Collapsed width of the sidebar in px (default 52) */
|
|
942
|
+
sidebarCollapsedWidth?: SidebarProps['collapsedWidth'];
|
|
943
|
+
/** Start expanded (default false) */
|
|
944
|
+
sidebarDefaultExpanded?: boolean;
|
|
945
|
+
/** Slot rendered at the bottom of the sidebar */
|
|
946
|
+
sidebarFooter?: SidebarProps['footer'];
|
|
947
|
+
/** Main page content */
|
|
948
|
+
children?: React$1.ReactNode;
|
|
949
|
+
/** Root element className */
|
|
950
|
+
className?: string;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Full-page application layout skeleton.
|
|
954
|
+
*
|
|
955
|
+
* Composes a sticky TopBar + collapsible Sidebar + scrollable content area.
|
|
956
|
+
* The main area shifts with the sidebar width via a Framer Motion margin animation.
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* <AppShell
|
|
960
|
+
* topBar={<TopBar brand={<Logo />} actions={<ThemeSwitch ... />} />}
|
|
961
|
+
* sidebarSections={NAV_SECTIONS}
|
|
962
|
+
* >
|
|
963
|
+
* <PageContent />
|
|
964
|
+
* </AppShell>
|
|
965
|
+
*/
|
|
966
|
+
declare function AppShell({ topBar, sidebarSections, sidebarExpandedWidth, sidebarCollapsedWidth, sidebarDefaultExpanded, sidebarFooter, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
967
|
+
|
|
968
|
+
interface ThemeColors {
|
|
969
|
+
background?: string;
|
|
970
|
+
surface?: string;
|
|
971
|
+
'surface-raised'?: string;
|
|
972
|
+
border?: string;
|
|
973
|
+
'border-strong'?: string;
|
|
974
|
+
foreground?: string;
|
|
975
|
+
'foreground-secondary'?: string;
|
|
976
|
+
'foreground-muted'?: string;
|
|
977
|
+
accent?: string;
|
|
978
|
+
'accent-hover'?: string;
|
|
979
|
+
'accent-foreground'?: string;
|
|
980
|
+
error?: string;
|
|
981
|
+
warning?: string;
|
|
982
|
+
success?: string;
|
|
983
|
+
info?: string;
|
|
984
|
+
}
|
|
985
|
+
interface ThemeRadius {
|
|
986
|
+
sm?: string | number;
|
|
987
|
+
md?: string | number;
|
|
988
|
+
lg?: string | number;
|
|
989
|
+
xl?: string | number;
|
|
990
|
+
'2xl'?: string | number;
|
|
991
|
+
full?: string | number;
|
|
992
|
+
}
|
|
993
|
+
interface ThemeShadows {
|
|
994
|
+
sm?: string;
|
|
995
|
+
md?: string;
|
|
996
|
+
lg?: string;
|
|
997
|
+
xl?: string;
|
|
998
|
+
}
|
|
999
|
+
interface ThemeTypography {
|
|
1000
|
+
/** e.g. '"Geist", sans-serif' */
|
|
1001
|
+
fontFamily?: string;
|
|
1002
|
+
fontSizeXs?: string;
|
|
1003
|
+
fontSizeSm?: string;
|
|
1004
|
+
fontSizeBase?: string;
|
|
1005
|
+
fontSizeLg?: string;
|
|
1006
|
+
fontSizeXl?: string;
|
|
1007
|
+
fontSize2xl?: string;
|
|
1008
|
+
fontSize3xl?: string;
|
|
1009
|
+
fontWeightNormal?: number | string;
|
|
1010
|
+
fontWeightMedium?: number | string;
|
|
1011
|
+
fontWeightSemibold?: number | string;
|
|
1012
|
+
fontWeightBold?: number | string;
|
|
1013
|
+
lineHeightTight?: number | string;
|
|
1014
|
+
lineHeightSnug?: number | string;
|
|
1015
|
+
lineHeightNormal?: number | string;
|
|
1016
|
+
lineHeightRelaxed?: number | string;
|
|
1017
|
+
}
|
|
1018
|
+
interface ThemeDensity {
|
|
1019
|
+
/** Height of xs control (icon buttons, tiny chips). Default: 24px */
|
|
1020
|
+
controlXs?: string | number;
|
|
1021
|
+
/** Height of sm control (small inputs/buttons). Default: 28px */
|
|
1022
|
+
controlSm?: string | number;
|
|
1023
|
+
/** Height of md control (default inputs/buttons). Default: 36px */
|
|
1024
|
+
controlMd?: string | number;
|
|
1025
|
+
/** Height of lg control (large touch targets). Default: 44px */
|
|
1026
|
+
controlLg?: string | number;
|
|
1027
|
+
/** TopBar height. Default: 56px */
|
|
1028
|
+
topbar?: string | number;
|
|
1029
|
+
}
|
|
1030
|
+
interface ThemeMotion {
|
|
1031
|
+
durationFast?: string;
|
|
1032
|
+
durationNormal?: string;
|
|
1033
|
+
durationSlow?: string;
|
|
1034
|
+
durationGentle?: string;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Partial theme override configuration.
|
|
1038
|
+
* Every field is optional — only the keys you provide are overridden.
|
|
1039
|
+
*/
|
|
1040
|
+
interface ThemeConfig {
|
|
1041
|
+
colors?: ThemeColors;
|
|
1042
|
+
radius?: ThemeRadius;
|
|
1043
|
+
shadows?: ThemeShadows;
|
|
1044
|
+
typography?: ThemeTypography;
|
|
1045
|
+
density?: ThemeDensity;
|
|
1046
|
+
motion?: ThemeMotion;
|
|
1047
|
+
}
|
|
1048
|
+
interface ThemeProviderProps {
|
|
1049
|
+
/**
|
|
1050
|
+
* Token overrides applied in both light and dark mode (on top of the defaults).
|
|
1051
|
+
* For dark-specific overrides see `darkTheme`.
|
|
1052
|
+
*/
|
|
1053
|
+
theme?: ThemeConfig;
|
|
1054
|
+
/**
|
|
1055
|
+
* Additional token overrides applied only when the wrapper element carries
|
|
1056
|
+
* the `.dark` class (i.e. when `colorScheme="dark"` or when a parent sets `.dark`).
|
|
1057
|
+
* Injected via a scoped `<style>` tag — no inline-style limitations.
|
|
1058
|
+
*/
|
|
1059
|
+
darkTheme?: ThemeConfig;
|
|
1060
|
+
/**
|
|
1061
|
+
* Managed color scheme.
|
|
1062
|
+
* - `'light'` — removes `.dark` class from the wrapper
|
|
1063
|
+
* - `'dark'` — adds `.dark` class to the wrapper
|
|
1064
|
+
* - `'system'` — follows `prefers-color-scheme` media query
|
|
1065
|
+
* - `'auto'` — do nothing; inherit from an ancestor (default)
|
|
1066
|
+
*/
|
|
1067
|
+
colorScheme?: 'light' | 'dark' | 'system' | 'auto';
|
|
1068
|
+
children: React$1.ReactNode;
|
|
1069
|
+
className?: string;
|
|
1070
|
+
style?: React$1.CSSProperties;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Scoped theme provider.
|
|
1074
|
+
*
|
|
1075
|
+
* Wraps children in a `<div>` that carries CSS custom-property overrides
|
|
1076
|
+
* as inline styles. A scoped `<style>` tag handles dark-mode overrides.
|
|
1077
|
+
*
|
|
1078
|
+
* @example Basic brand color swap
|
|
1079
|
+
* <ThemeProvider theme={{ colors: { accent: '#e63946', 'accent-hover': '#c1121f' } }}>
|
|
1080
|
+
* <App />
|
|
1081
|
+
* </ThemeProvider>
|
|
1082
|
+
*
|
|
1083
|
+
* @example Compact density + custom font
|
|
1084
|
+
* <ThemeProvider
|
|
1085
|
+
* theme={{
|
|
1086
|
+
* density: { controlMd: 30, controlLg: 38, topbar: 48 },
|
|
1087
|
+
* typography: { fontFamily: '"Geist", sans-serif' },
|
|
1088
|
+
* }}
|
|
1089
|
+
* >
|
|
1090
|
+
* <Dashboard />
|
|
1091
|
+
* </ThemeProvider>
|
|
1092
|
+
*
|
|
1093
|
+
* @example Managed dark mode
|
|
1094
|
+
* <ThemeProvider
|
|
1095
|
+
* colorScheme="dark"
|
|
1096
|
+
* theme={{ colors: { accent: '#60a5fa' } }}
|
|
1097
|
+
* darkTheme={{ colors: { accent: '#93c5fd' } }}
|
|
1098
|
+
* >
|
|
1099
|
+
* <App />
|
|
1100
|
+
* </ThemeProvider>
|
|
1101
|
+
*/
|
|
1102
|
+
declare function ThemeProvider({ theme, darkTheme, colorScheme, children, className, style, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1103
|
+
|
|
1104
|
+
/** ─────────────────── base ─────────────────── */
|
|
1105
|
+
interface SkeletonBaseProps {
|
|
1106
|
+
className?: string;
|
|
1107
|
+
/** Override inline styles */
|
|
1108
|
+
style?: React$1.CSSProperties;
|
|
1109
|
+
}
|
|
1110
|
+
/** ─────────────────── SkeletonBox ─────────────────── */
|
|
1111
|
+
interface SkeletonBoxProps extends SkeletonBaseProps {
|
|
1112
|
+
width?: number | string;
|
|
1113
|
+
height?: number | string;
|
|
1114
|
+
/** Override border-radius (defaults to token --radius-md) */
|
|
1115
|
+
radius?: number | string;
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Generic rectangular loading placeholder.
|
|
1119
|
+
* Use for images, cards, headers, or any block element.
|
|
1120
|
+
*
|
|
1121
|
+
* @example
|
|
1122
|
+
* <SkeletonBox width={240} height={160} />
|
|
1123
|
+
* <SkeletonBox width="100%" height={48} radius="var(--radius-lg)" />
|
|
1124
|
+
*/
|
|
1125
|
+
declare function SkeletonBox({ width, height, radius, className, style }: SkeletonBoxProps): react_jsx_runtime.JSX.Element;
|
|
1126
|
+
/** ─────────────────── SkeletonText ─────────────────── */
|
|
1127
|
+
interface SkeletonTextProps extends SkeletonBaseProps {
|
|
1128
|
+
/** Number of lines (default 3) */
|
|
1129
|
+
lines?: number;
|
|
1130
|
+
/** Width of the last (shortest) line as a percentage (default 60) */
|
|
1131
|
+
lastLineWidth?: number;
|
|
1132
|
+
/** Line height in px (default 14) */
|
|
1133
|
+
lineHeight?: number;
|
|
1134
|
+
/** Gap between lines in px (default 8) */
|
|
1135
|
+
gap?: number;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Multi-line text loading placeholder.
|
|
1139
|
+
* Last line is shorter to mimic real paragraph layout.
|
|
1140
|
+
*
|
|
1141
|
+
* @example
|
|
1142
|
+
* <SkeletonText lines={4} lastLineWidth={45} />
|
|
1143
|
+
*/
|
|
1144
|
+
declare function SkeletonText({ lines, lastLineWidth, lineHeight, gap, className, style, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
|
|
1145
|
+
/** ─────────────────── SkeletonCircle ─────────────────── */
|
|
1146
|
+
interface SkeletonCircleProps extends SkeletonBaseProps {
|
|
1147
|
+
/** Diameter in px (default 40) */
|
|
1148
|
+
size?: number;
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Circular loading placeholder — avatars, icons, status indicators.
|
|
1152
|
+
*
|
|
1153
|
+
* @example
|
|
1154
|
+
* <SkeletonCircle size={48} />
|
|
1155
|
+
*/
|
|
1156
|
+
declare function SkeletonCircle({ size, className, style }: SkeletonCircleProps): react_jsx_runtime.JSX.Element;
|
|
1157
|
+
/** ─────────────────── SkeletonCard ─────────────────── */
|
|
1158
|
+
interface SkeletonCardProps extends SkeletonBaseProps {
|
|
1159
|
+
/** Include a circular avatar in the header (default true) */
|
|
1160
|
+
hasAvatar?: boolean;
|
|
1161
|
+
/** Number of text lines in the body (default 3) */
|
|
1162
|
+
lines?: number;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Composite card skeleton — avatar + heading + body text + action strip.
|
|
1166
|
+
* Use as a drop-in while real card data loads.
|
|
1167
|
+
*
|
|
1168
|
+
* @example
|
|
1169
|
+
* <div className="grid grid-cols-3 gap-4">
|
|
1170
|
+
* {loading && Array.from({ length: 3 }).map((_, i) => <SkeletonCard key={i} />)}
|
|
1171
|
+
* </div>
|
|
1172
|
+
*/
|
|
1173
|
+
declare function SkeletonCard({ hasAvatar, lines, className, style }: SkeletonCardProps): react_jsx_runtime.JSX.Element;
|
|
1174
|
+
|
|
895
1175
|
interface ButtonProps {
|
|
896
1176
|
content?: React$1.ReactNode;
|
|
897
1177
|
/** Visual style variant */
|
|
@@ -1030,40 +1310,40 @@ interface DropdownPillProps {
|
|
|
1030
1310
|
declare function DropdownPill({ value, hasSiblings }: DropdownPillProps): react_jsx_runtime.JSX.Element;
|
|
1031
1311
|
|
|
1032
1312
|
interface CheckboxProps {
|
|
1033
|
-
/**
|
|
1034
|
-
|
|
1035
|
-
/** 'left' | 'right' (label side when horizontal) */
|
|
1036
|
-
labelPosition?: string;
|
|
1037
|
-
label?: React$1.ReactNode;
|
|
1038
|
-
name?: string;
|
|
1039
|
-
htmlFor?: string;
|
|
1040
|
-
errorMessage?: React$1.ReactNode;
|
|
1041
|
-
value?: boolean;
|
|
1313
|
+
/** Controlled checked state */
|
|
1314
|
+
checked?: boolean;
|
|
1042
1315
|
onChange?: (e: {
|
|
1043
1316
|
target: {
|
|
1044
|
-
|
|
1317
|
+
checked: boolean;
|
|
1045
1318
|
id?: string;
|
|
1046
1319
|
name?: string;
|
|
1047
1320
|
};
|
|
1048
1321
|
}) => void;
|
|
1049
|
-
|
|
1322
|
+
label?: React$1.ReactNode;
|
|
1323
|
+
name?: string;
|
|
1324
|
+
/** `id` for the hidden input and the `<label htmlFor>` link */
|
|
1325
|
+
htmlFor?: string;
|
|
1326
|
+
errorMessage?: React$1.ReactNode;
|
|
1327
|
+
disabled?: boolean;
|
|
1328
|
+
/** @deprecated Use `checked` */
|
|
1329
|
+
value?: boolean;
|
|
1050
1330
|
}
|
|
1051
1331
|
/**
|
|
1052
1332
|
* Accessible checkbox powered by Radix Checkbox.
|
|
1053
1333
|
*
|
|
1054
|
-
* Radix handles keyboard activation, focus ring, and ARIA
|
|
1055
|
-
*
|
|
1056
|
-
* compatible with existing form-change handlers.
|
|
1334
|
+
* Radix handles keyboard activation, focus ring, and `role="checkbox"` ARIA.
|
|
1335
|
+
* The check mark pops in with a spring animation on first check.
|
|
1057
1336
|
*
|
|
1058
1337
|
* @example
|
|
1059
1338
|
* <Checkbox
|
|
1060
1339
|
* htmlFor="agree"
|
|
1061
1340
|
* label="I agree to the terms"
|
|
1062
|
-
*
|
|
1063
|
-
* onChange={({ target }) => setField('agree', target.
|
|
1341
|
+
* checked={form.agree}
|
|
1342
|
+
* onChange={({ target }) => setField('agree', target.checked)}
|
|
1064
1343
|
* />
|
|
1065
1344
|
*/
|
|
1066
|
-
declare function Checkbox({
|
|
1345
|
+
declare function Checkbox({ checked, value, // legacy alias
|
|
1346
|
+
onChange, label, name, htmlFor, errorMessage, disabled, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
1067
1347
|
|
|
1068
1348
|
interface SwitchInputProps {
|
|
1069
1349
|
checked?: boolean;
|
|
@@ -1303,4 +1583,4 @@ declare const Temporal: {
|
|
|
1303
1583
|
TemporalPicker: typeof TemporalPickerBase;
|
|
1304
1584
|
};
|
|
1305
1585
|
|
|
1306
|
-
export { AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
|
|
1586
|
+
export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
|