@geomak/ui 1.4.0 → 1.5.1
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 +154 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +138 -2
- package/dist/index.d.ts +138 -2
- package/dist/index.js +128 -3
- 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 +7 -2
- package/dist/chunk-OSWZRIGC.js +0 -152
- package/dist/chunk-OSWZRIGC.js.map +0 -1
- package/dist/chunk-RLL7ES4F.cjs +0 -157
- package/dist/chunk-RLL7ES4F.cjs.map +0 -1
- package/dist/index-DLGzTj3K.d.cts +0 -191
- package/dist/index-DLGzTj3K.d.ts +0 -191
package/dist/index.d.cts
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.cjs';
|
|
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';
|
|
@@ -965,6 +965,142 @@ interface AppShellProps {
|
|
|
965
965
|
*/
|
|
966
966
|
declare function AppShell({ topBar, sidebarSections, sidebarExpandedWidth, sidebarCollapsedWidth, sidebarDefaultExpanded, sidebarFooter, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
967
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
|
+
|
|
968
1104
|
/** ─────────────────── base ─────────────────── */
|
|
969
1105
|
interface SkeletonBaseProps {
|
|
970
1106
|
className?: string;
|
|
@@ -1447,4 +1583,4 @@ declare const Temporal: {
|
|
|
1447
1583
|
TemporalPicker: typeof TemporalPickerBase;
|
|
1448
1584
|
};
|
|
1449
1585
|
|
|
1450
|
-
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, 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 };
|
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';
|
|
@@ -965,6 +965,142 @@ interface AppShellProps {
|
|
|
965
965
|
*/
|
|
966
966
|
declare function AppShell({ topBar, sidebarSections, sidebarExpandedWidth, sidebarCollapsedWidth, sidebarDefaultExpanded, sidebarFooter, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
967
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
|
+
|
|
968
1104
|
/** ─────────────────── base ─────────────────── */
|
|
969
1105
|
interface SkeletonBaseProps {
|
|
970
1106
|
className?: string;
|
|
@@ -1447,4 +1583,4 @@ declare const Temporal: {
|
|
|
1447
1583
|
TemporalPicker: typeof TemporalPickerBase;
|
|
1448
1584
|
};
|
|
1449
1585
|
|
|
1450
|
-
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { colors_default } from './chunk-
|
|
2
|
-
export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-
|
|
1
|
+
import { colors_default } from './chunk-GKXP6OJJ.js';
|
|
2
|
+
export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-GKXP6OJJ.js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import React9, { createContext, useMemo, useState, useEffect, useContext, useRef, useCallback, useId } from 'react';
|
|
5
5
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
@@ -2071,6 +2071,131 @@ function AppShell({
|
|
|
2071
2071
|
] })
|
|
2072
2072
|
] });
|
|
2073
2073
|
}
|
|
2074
|
+
function px(v) {
|
|
2075
|
+
return typeof v === "number" ? `${v}px` : v;
|
|
2076
|
+
}
|
|
2077
|
+
function str(v) {
|
|
2078
|
+
return v == null ? void 0 : String(v);
|
|
2079
|
+
}
|
|
2080
|
+
function toCssVars(theme) {
|
|
2081
|
+
if (!theme) return {};
|
|
2082
|
+
const out = {};
|
|
2083
|
+
if (theme.colors) {
|
|
2084
|
+
for (const [k, v] of Object.entries(theme.colors)) {
|
|
2085
|
+
if (v != null) out[`--color-${k}`] = v;
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
if (theme.radius) {
|
|
2089
|
+
for (const [k, v] of Object.entries(theme.radius)) {
|
|
2090
|
+
if (v != null) out[`--radius-${k}`] = px(v);
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
if (theme.shadows) {
|
|
2094
|
+
for (const [k, v] of Object.entries(theme.shadows)) {
|
|
2095
|
+
if (v != null) out[`--shadow-${k}`] = v;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
if (theme.typography) {
|
|
2099
|
+
const t = theme.typography;
|
|
2100
|
+
const map = [
|
|
2101
|
+
["--font-family-sans", t.fontFamily],
|
|
2102
|
+
["--font-size-xs", t.fontSizeXs],
|
|
2103
|
+
["--font-size-sm", t.fontSizeSm],
|
|
2104
|
+
["--font-size-base", t.fontSizeBase],
|
|
2105
|
+
["--font-size-lg", t.fontSizeLg],
|
|
2106
|
+
["--font-size-xl", t.fontSizeXl],
|
|
2107
|
+
["--font-size-2xl", t.fontSize2xl],
|
|
2108
|
+
["--font-size-3xl", t.fontSize3xl],
|
|
2109
|
+
["--font-weight-normal", t.fontWeightNormal],
|
|
2110
|
+
["--font-weight-medium", t.fontWeightMedium],
|
|
2111
|
+
["--font-weight-semibold", t.fontWeightSemibold],
|
|
2112
|
+
["--font-weight-bold", t.fontWeightBold],
|
|
2113
|
+
["--line-height-tight", t.lineHeightTight],
|
|
2114
|
+
["--line-height-snug", t.lineHeightSnug],
|
|
2115
|
+
["--line-height-normal", t.lineHeightNormal],
|
|
2116
|
+
["--line-height-relaxed", t.lineHeightRelaxed]
|
|
2117
|
+
];
|
|
2118
|
+
for (const [cssVar, val] of map) {
|
|
2119
|
+
const s = str(val);
|
|
2120
|
+
if (s != null) out[cssVar] = s;
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
if (theme.density) {
|
|
2124
|
+
const d = theme.density;
|
|
2125
|
+
const map = [
|
|
2126
|
+
["--height-control-xs", d.controlXs],
|
|
2127
|
+
["--height-control-sm", d.controlSm],
|
|
2128
|
+
["--height-control-md", d.controlMd],
|
|
2129
|
+
["--height-control-lg", d.controlLg],
|
|
2130
|
+
["--height-topbar", d.topbar]
|
|
2131
|
+
];
|
|
2132
|
+
for (const [cssVar, val] of map) {
|
|
2133
|
+
if (val != null) out[cssVar] = px(val);
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
if (theme.motion) {
|
|
2137
|
+
const m = theme.motion;
|
|
2138
|
+
const map = [
|
|
2139
|
+
["--duration-fast", m.durationFast],
|
|
2140
|
+
["--duration-normal", m.durationNormal],
|
|
2141
|
+
["--duration-slow", m.durationSlow],
|
|
2142
|
+
["--duration-gentle", m.durationGentle]
|
|
2143
|
+
];
|
|
2144
|
+
for (const [cssVar, val] of map) {
|
|
2145
|
+
if (val != null) out[cssVar] = val;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
return out;
|
|
2149
|
+
}
|
|
2150
|
+
function varsToStyleString(vars2) {
|
|
2151
|
+
return Object.entries(vars2).map(([k, v]) => `${k}: ${v};`).join(" ");
|
|
2152
|
+
}
|
|
2153
|
+
function ThemeProvider({
|
|
2154
|
+
theme,
|
|
2155
|
+
darkTheme,
|
|
2156
|
+
colorScheme = "auto",
|
|
2157
|
+
children,
|
|
2158
|
+
className = "",
|
|
2159
|
+
style
|
|
2160
|
+
}) {
|
|
2161
|
+
const id = React9.useId().replace(/:/g, "");
|
|
2162
|
+
const scopeClass = `geo-th-${id}`;
|
|
2163
|
+
const divRef = useRef(null);
|
|
2164
|
+
useEffect(() => {
|
|
2165
|
+
const el = divRef.current;
|
|
2166
|
+
if (!el) return;
|
|
2167
|
+
if (colorScheme === "auto") return;
|
|
2168
|
+
if (colorScheme === "system") {
|
|
2169
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2170
|
+
const apply = (e) => {
|
|
2171
|
+
el.classList.toggle("dark", e.matches);
|
|
2172
|
+
};
|
|
2173
|
+
apply(mq);
|
|
2174
|
+
mq.addEventListener("change", apply);
|
|
2175
|
+
return () => mq.removeEventListener("change", apply);
|
|
2176
|
+
}
|
|
2177
|
+
el.classList.toggle("dark", colorScheme === "dark");
|
|
2178
|
+
}, [colorScheme]);
|
|
2179
|
+
const lightVars = useMemo(() => toCssVars(theme), [theme]);
|
|
2180
|
+
const darkVarStr = useMemo(() => {
|
|
2181
|
+
if (!darkTheme) return "";
|
|
2182
|
+
const dvars = toCssVars(darkTheme);
|
|
2183
|
+
if (!Object.keys(dvars).length) return "";
|
|
2184
|
+
return `.${scopeClass}.dark { ${varsToStyleString(dvars)} }`;
|
|
2185
|
+
}, [darkTheme]);
|
|
2186
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2187
|
+
darkVarStr && /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: darkVarStr } }),
|
|
2188
|
+
/* @__PURE__ */ jsx(
|
|
2189
|
+
"div",
|
|
2190
|
+
{
|
|
2191
|
+
ref: divRef,
|
|
2192
|
+
className: `${scopeClass} ${className}`.trim(),
|
|
2193
|
+
style: { ...lightVars, ...style },
|
|
2194
|
+
children
|
|
2195
|
+
}
|
|
2196
|
+
)
|
|
2197
|
+
] });
|
|
2198
|
+
}
|
|
2074
2199
|
var SHIMMER = [
|
|
2075
2200
|
"animate-shimmer rounded-sm",
|
|
2076
2201
|
"bg-[length:400%_100%]",
|
|
@@ -3065,6 +3190,6 @@ Temporal.DatePicker = DatePickerBase;
|
|
|
3065
3190
|
Temporal.TemporalPicker = TemporalPickerBase;
|
|
3066
3191
|
var DatePicker_default = Temporal;
|
|
3067
3192
|
|
|
3068
|
-
export { AppShell, AutoComplete, Button, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ContextMenu, Drawer, Dropdown, DropdownPill, FadingBase, FileInput, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, MenuBar, MenuBarItem, Modal, NotificationProvider, NumberInput, OpaqueGridCard, Password, ScalableContainer, SearchInput_default as SearchInput, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Switch, Table, Tabs, DatePicker_default as Temporal, TextInput, ThemeSwitch, ToggleButton, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Wizard, useNotification };
|
|
3193
|
+
export { AppShell, AutoComplete, Button, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ContextMenu, Drawer, Dropdown, DropdownPill, FadingBase, FileInput, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, MenuBar, MenuBarItem, Modal, NotificationProvider, NumberInput, OpaqueGridCard, Password, ScalableContainer, SearchInput_default as SearchInput, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Switch, Table, Tabs, DatePicker_default as Temporal, TextInput, ThemeProvider, ThemeSwitch, ToggleButton, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Wizard, useNotification };
|
|
3069
3194
|
//# sourceMappingURL=index.js.map
|
|
3070
3195
|
//# sourceMappingURL=index.js.map
|