@optilogic/core 1.5.0 → 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/index.cjs +200 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -9
- package/dist/index.d.ts +32 -9
- package/dist/index.js +198 -97
- package/dist/index.js.map +1 -1
- package/dist/styles.css +12 -0
- package/dist/tailwind-preset.cjs +10 -2
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.js +10 -2
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +2 -2
- package/src/components/data-grid/components/CellEditor.tsx +5 -2
- package/src/components/data-grid/components/FilterPopover.tsx +7 -4
- package/src/components/data-grid/utils/dataProcessing.ts +2 -1
- package/src/components/resizable-panel.tsx +1 -1
- package/src/components/theme-picker.tsx +4 -2
- package/src/index.ts +3 -0
- package/src/styles.css +12 -0
- package/src/tailwind-preset.ts +9 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/presets.ts +166 -91
- package/src/theme/types.ts +8 -0
- package/src/theme/utils.ts +57 -0
package/dist/index.d.cts
CHANGED
|
@@ -2411,6 +2411,12 @@ interface Theme {
|
|
|
2411
2411
|
border: string;
|
|
2412
2412
|
input: string;
|
|
2413
2413
|
ring: string;
|
|
2414
|
+
/** Hover states (optional, with fallbacks) */
|
|
2415
|
+
primaryHover?: string;
|
|
2416
|
+
accentHover?: string;
|
|
2417
|
+
/** Brand identity gradient (optional, with fallbacks) */
|
|
2418
|
+
brandGradientFrom?: string;
|
|
2419
|
+
brandGradientTo?: string;
|
|
2414
2420
|
/** Elevated surface border (optional, with fallback) */
|
|
2415
2421
|
popoverBorder?: string;
|
|
2416
2422
|
/** Divider/separator color (optional, with fallback) */
|
|
@@ -2558,18 +2564,24 @@ interface ColorFieldConfig {
|
|
|
2558
2564
|
*/
|
|
2559
2565
|
|
|
2560
2566
|
/**
|
|
2561
|
-
* Optilogic
|
|
2567
|
+
* Optilogic Light Theme - Default light theme
|
|
2562
2568
|
*
|
|
2563
|
-
*
|
|
2569
|
+
* The current Optilogic light theme, synced from platform-leapfrog. Indigo
|
|
2570
|
+
* (#5766F2) primary on a soft lavender-white surface.
|
|
2564
2571
|
*/
|
|
2565
|
-
declare const
|
|
2572
|
+
declare const OPTILOGIC_LIGHT_THEME: Theme;
|
|
2566
2573
|
/**
|
|
2567
|
-
* Optilogic Dark Theme -
|
|
2574
|
+
* Optilogic Dark Theme - Default dark mode
|
|
2568
2575
|
*
|
|
2569
|
-
*
|
|
2570
|
-
*
|
|
2576
|
+
* The current Optilogic dark theme, synced from platform-leapfrog. Indigo
|
|
2577
|
+
* primary on a deep navy surface.
|
|
2571
2578
|
*/
|
|
2572
2579
|
declare const OPTILOGIC_DARK_THEME: Theme;
|
|
2580
|
+
/**
|
|
2581
|
+
* @deprecated Use OPTILOGIC_LIGHT_THEME. Retained so existing imports resolve;
|
|
2582
|
+
* now points at the current Optilogic Light theme.
|
|
2583
|
+
*/
|
|
2584
|
+
declare const OPTILOGIC_LEGACY_THEME: Theme;
|
|
2573
2585
|
/**
|
|
2574
2586
|
* Modern Light Theme - Clean, readable light mode
|
|
2575
2587
|
*
|
|
@@ -2593,7 +2605,13 @@ declare const MODERN_DARK_THEME: Theme;
|
|
|
2593
2605
|
*/
|
|
2594
2606
|
declare const DARK_ELEGANT_THEME: Theme;
|
|
2595
2607
|
/**
|
|
2596
|
-
*
|
|
2608
|
+
* Green Theme - Natural, earthy greens
|
|
2609
|
+
*
|
|
2610
|
+
* Synced from platform-leapfrog. Soft green primary on deep forest surfaces.
|
|
2611
|
+
*/
|
|
2612
|
+
declare const GREEN_THEME: Theme;
|
|
2613
|
+
/**
|
|
2614
|
+
* All available preset themes (shown in the theme picker).
|
|
2597
2615
|
*/
|
|
2598
2616
|
declare const PRESET_THEMES: Theme[];
|
|
2599
2617
|
/**
|
|
@@ -2601,7 +2619,12 @@ declare const PRESET_THEMES: Theme[];
|
|
|
2601
2619
|
*/
|
|
2602
2620
|
declare const ALL_THEMES: Theme[];
|
|
2603
2621
|
/**
|
|
2604
|
-
*
|
|
2622
|
+
* Retired preset IDs mapped to their current replacement, so themes saved
|
|
2623
|
+
* under an old ID (e.g. in localStorage) resolve to a shipping preset.
|
|
2624
|
+
*/
|
|
2625
|
+
declare const LEGACY_THEME_ID_MAP: Record<string, string>;
|
|
2626
|
+
/**
|
|
2627
|
+
* Get a preset theme by ID, transparently resolving retired IDs.
|
|
2605
2628
|
*/
|
|
2606
2629
|
declare function getPresetTheme(id: string): Theme | undefined;
|
|
2607
2630
|
/**
|
|
@@ -3274,4 +3297,4 @@ type SortingConfig = {
|
|
|
3274
3297
|
onSort: (field: string) => void;
|
|
3275
3298
|
};
|
|
3276
3299
|
|
|
3277
|
-
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, type BuiltInContentType, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, CodeRenderer, type ColorFieldConfig, type ColumnDef, Combobox, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, type ContentType, type ContentTypeDetectionResult, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, CosmicFrogIcon, type CosmicFrogIconProps, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataStarIcon, type DataStarIconProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, type FileRenderer, type FileRendererProps, FileView, type FileViewError, type FileViewProps, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, HtmlRenderer, IconButton, type IconButtonProps, ImageRenderer, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, type ModalButtonProps, type ModalProps, MultiSelect, type MultiSelectProps, type NumberFilterOperator, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OptilogicLogo, type OptilogicLogoProps, OptilogicLogoWithText, type OptilogicLogoWithTextProps, PRESET_THEMES, type PaginationConfig, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, type RendererRegistry, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, type ResolveImageUrl, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, type SelectItemDescriptionProps, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContentTypeOptions, type UseContentTypeReturn, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
3300
|
+
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, type BuiltInContentType, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, CodeRenderer, type ColorFieldConfig, type ColumnDef, Combobox, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, type ContentType, type ContentTypeDetectionResult, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, CosmicFrogIcon, type CosmicFrogIconProps, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataStarIcon, type DataStarIconProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, type FileRenderer, type FileRendererProps, FileView, type FileViewError, type FileViewProps, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, HtmlRenderer, IconButton, type IconButtonProps, ImageRenderer, Input, type InputProps, LEGACY_THEME_ID_MAP, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, type ModalButtonProps, type ModalProps, MultiSelect, type MultiSelectProps, type NumberFilterOperator, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OPTILOGIC_LIGHT_THEME, OptilogicLogo, type OptilogicLogoProps, OptilogicLogoWithText, type OptilogicLogoWithTextProps, PRESET_THEMES, type PaginationConfig, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, type RendererRegistry, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, type ResolveImageUrl, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, type SelectItemDescriptionProps, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContentTypeOptions, type UseContentTypeReturn, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -2411,6 +2411,12 @@ interface Theme {
|
|
|
2411
2411
|
border: string;
|
|
2412
2412
|
input: string;
|
|
2413
2413
|
ring: string;
|
|
2414
|
+
/** Hover states (optional, with fallbacks) */
|
|
2415
|
+
primaryHover?: string;
|
|
2416
|
+
accentHover?: string;
|
|
2417
|
+
/** Brand identity gradient (optional, with fallbacks) */
|
|
2418
|
+
brandGradientFrom?: string;
|
|
2419
|
+
brandGradientTo?: string;
|
|
2414
2420
|
/** Elevated surface border (optional, with fallback) */
|
|
2415
2421
|
popoverBorder?: string;
|
|
2416
2422
|
/** Divider/separator color (optional, with fallback) */
|
|
@@ -2558,18 +2564,24 @@ interface ColorFieldConfig {
|
|
|
2558
2564
|
*/
|
|
2559
2565
|
|
|
2560
2566
|
/**
|
|
2561
|
-
* Optilogic
|
|
2567
|
+
* Optilogic Light Theme - Default light theme
|
|
2562
2568
|
*
|
|
2563
|
-
*
|
|
2569
|
+
* The current Optilogic light theme, synced from platform-leapfrog. Indigo
|
|
2570
|
+
* (#5766F2) primary on a soft lavender-white surface.
|
|
2564
2571
|
*/
|
|
2565
|
-
declare const
|
|
2572
|
+
declare const OPTILOGIC_LIGHT_THEME: Theme;
|
|
2566
2573
|
/**
|
|
2567
|
-
* Optilogic Dark Theme -
|
|
2574
|
+
* Optilogic Dark Theme - Default dark mode
|
|
2568
2575
|
*
|
|
2569
|
-
*
|
|
2570
|
-
*
|
|
2576
|
+
* The current Optilogic dark theme, synced from platform-leapfrog. Indigo
|
|
2577
|
+
* primary on a deep navy surface.
|
|
2571
2578
|
*/
|
|
2572
2579
|
declare const OPTILOGIC_DARK_THEME: Theme;
|
|
2580
|
+
/**
|
|
2581
|
+
* @deprecated Use OPTILOGIC_LIGHT_THEME. Retained so existing imports resolve;
|
|
2582
|
+
* now points at the current Optilogic Light theme.
|
|
2583
|
+
*/
|
|
2584
|
+
declare const OPTILOGIC_LEGACY_THEME: Theme;
|
|
2573
2585
|
/**
|
|
2574
2586
|
* Modern Light Theme - Clean, readable light mode
|
|
2575
2587
|
*
|
|
@@ -2593,7 +2605,13 @@ declare const MODERN_DARK_THEME: Theme;
|
|
|
2593
2605
|
*/
|
|
2594
2606
|
declare const DARK_ELEGANT_THEME: Theme;
|
|
2595
2607
|
/**
|
|
2596
|
-
*
|
|
2608
|
+
* Green Theme - Natural, earthy greens
|
|
2609
|
+
*
|
|
2610
|
+
* Synced from platform-leapfrog. Soft green primary on deep forest surfaces.
|
|
2611
|
+
*/
|
|
2612
|
+
declare const GREEN_THEME: Theme;
|
|
2613
|
+
/**
|
|
2614
|
+
* All available preset themes (shown in the theme picker).
|
|
2597
2615
|
*/
|
|
2598
2616
|
declare const PRESET_THEMES: Theme[];
|
|
2599
2617
|
/**
|
|
@@ -2601,7 +2619,12 @@ declare const PRESET_THEMES: Theme[];
|
|
|
2601
2619
|
*/
|
|
2602
2620
|
declare const ALL_THEMES: Theme[];
|
|
2603
2621
|
/**
|
|
2604
|
-
*
|
|
2622
|
+
* Retired preset IDs mapped to their current replacement, so themes saved
|
|
2623
|
+
* under an old ID (e.g. in localStorage) resolve to a shipping preset.
|
|
2624
|
+
*/
|
|
2625
|
+
declare const LEGACY_THEME_ID_MAP: Record<string, string>;
|
|
2626
|
+
/**
|
|
2627
|
+
* Get a preset theme by ID, transparently resolving retired IDs.
|
|
2605
2628
|
*/
|
|
2606
2629
|
declare function getPresetTheme(id: string): Theme | undefined;
|
|
2607
2630
|
/**
|
|
@@ -3274,4 +3297,4 @@ type SortingConfig = {
|
|
|
3274
3297
|
onSort: (field: string) => void;
|
|
3275
3298
|
};
|
|
3276
3299
|
|
|
3277
|
-
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, type BuiltInContentType, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, CodeRenderer, type ColorFieldConfig, type ColumnDef, Combobox, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, type ContentType, type ContentTypeDetectionResult, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, CosmicFrogIcon, type CosmicFrogIconProps, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataStarIcon, type DataStarIconProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, type FileRenderer, type FileRendererProps, FileView, type FileViewError, type FileViewProps, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, HtmlRenderer, IconButton, type IconButtonProps, ImageRenderer, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, type ModalButtonProps, type ModalProps, MultiSelect, type MultiSelectProps, type NumberFilterOperator, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OptilogicLogo, type OptilogicLogoProps, OptilogicLogoWithText, type OptilogicLogoWithTextProps, PRESET_THEMES, type PaginationConfig, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, type RendererRegistry, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, type ResolveImageUrl, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, type SelectItemDescriptionProps, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContentTypeOptions, type UseContentTypeReturn, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
3300
|
+
export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, type BuiltInContentType, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, CodeRenderer, type ColorFieldConfig, type ColumnDef, Combobox, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, type ContentType, type ContentTypeDetectionResult, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, CosmicFrogIcon, type CosmicFrogIconProps, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataStarIcon, type DataStarIconProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, type FileRenderer, type FileRendererProps, FileView, type FileViewError, type FileViewProps, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, HtmlRenderer, IconButton, type IconButtonProps, ImageRenderer, Input, type InputProps, LEGACY_THEME_ID_MAP, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, type ModalButtonProps, type ModalProps, MultiSelect, type MultiSelectProps, type NumberFilterOperator, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OPTILOGIC_LIGHT_THEME, OptilogicLogo, type OptilogicLogoProps, OptilogicLogoWithText, type OptilogicLogoWithTextProps, PRESET_THEMES, type PaginationConfig, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, type RendererRegistry, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, type ResolveImageUrl, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, type SelectItemDescriptionProps, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContentTypeOptions, type UseContentTypeReturn, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
package/dist/index.js
CHANGED
|
@@ -2453,7 +2453,7 @@ function ResizablePanel({
|
|
|
2453
2453
|
const currentWidthVW = isExpanded ? (isDragging && localWidth !== null ? localWidth : expandedWidthVW) || collapsedSizeVW : collapsedSizeVW;
|
|
2454
2454
|
const clampWidth = React20.useCallback(
|
|
2455
2455
|
(width) => {
|
|
2456
|
-
|
|
2456
|
+
const effectiveMinWidth = minWidthVW;
|
|
2457
2457
|
let effectiveMaxWidth = maxWidthVW;
|
|
2458
2458
|
if (orientation === "right" && leftWidthVW !== void 0 && !isOverlay) {
|
|
2459
2459
|
const availableSpace = 100 - leftWidthVW - 3;
|
|
@@ -3343,7 +3343,7 @@ function FilterPopover({
|
|
|
3343
3343
|
] })
|
|
3344
3344
|
] });
|
|
3345
3345
|
const renderDateFilter = () => {
|
|
3346
|
-
const dateValue =
|
|
3346
|
+
const dateValue = (() => {
|
|
3347
3347
|
if (!value) return void 0;
|
|
3348
3348
|
if (value instanceof Date) return value;
|
|
3349
3349
|
if (typeof value === "string") {
|
|
@@ -3351,8 +3351,8 @@ function FilterPopover({
|
|
|
3351
3351
|
return isValid(parsed) ? parsed : void 0;
|
|
3352
3352
|
}
|
|
3353
3353
|
return void 0;
|
|
3354
|
-
}
|
|
3355
|
-
const dateToValue =
|
|
3354
|
+
})();
|
|
3355
|
+
const dateToValue = (() => {
|
|
3356
3356
|
if (!valueTo) return void 0;
|
|
3357
3357
|
if (valueTo instanceof Date) return valueTo;
|
|
3358
3358
|
if (typeof valueTo === "string") {
|
|
@@ -3360,7 +3360,7 @@ function FilterPopover({
|
|
|
3360
3360
|
return isValid(parsed) ? parsed : void 0;
|
|
3361
3361
|
}
|
|
3362
3362
|
return void 0;
|
|
3363
|
-
}
|
|
3363
|
+
})();
|
|
3364
3364
|
const handleDateChange = (date) => {
|
|
3365
3365
|
setValue(date ? format(date, "yyyy-MM-dd") : "");
|
|
3366
3366
|
};
|
|
@@ -3750,7 +3750,7 @@ function CellEditor({
|
|
|
3750
3750
|
}
|
|
3751
3751
|
);
|
|
3752
3752
|
const renderDateEditor = () => {
|
|
3753
|
-
const dateValue =
|
|
3753
|
+
const dateValue = (() => {
|
|
3754
3754
|
if (!currentValue) return void 0;
|
|
3755
3755
|
if (currentValue instanceof Date) return currentValue;
|
|
3756
3756
|
if (typeof currentValue === "string") {
|
|
@@ -3758,7 +3758,7 @@ function CellEditor({
|
|
|
3758
3758
|
return isValid(parsed) ? parsed : void 0;
|
|
3759
3759
|
}
|
|
3760
3760
|
return void 0;
|
|
3761
|
-
}
|
|
3761
|
+
})();
|
|
3762
3762
|
const handleDateChange = (date) => {
|
|
3763
3763
|
const stringValue = date ? format(date, "yyyy-MM-dd") : "";
|
|
3764
3764
|
if (validate(stringValue)) {
|
|
@@ -4721,10 +4721,11 @@ function applyFilterOperator(value, filterValue, filterValueTo, operator, filter
|
|
|
4721
4721
|
return numValue < numFilterValue;
|
|
4722
4722
|
case "lte":
|
|
4723
4723
|
return numValue <= numFilterValue;
|
|
4724
|
-
case "between":
|
|
4724
|
+
case "between": {
|
|
4725
4725
|
const singleFilterValueTo = extractSingleValue(filterValueTo);
|
|
4726
4726
|
const numFilterValueTo = Number(singleFilterValueTo);
|
|
4727
4727
|
return numValue >= numFilterValue && numValue <= numFilterValueTo;
|
|
4728
|
+
}
|
|
4728
4729
|
default:
|
|
4729
4730
|
return true;
|
|
4730
4731
|
}
|
|
@@ -6412,104 +6413,112 @@ function CopyButton({ content, className, size = "md" }) {
|
|
|
6412
6413
|
}
|
|
6413
6414
|
|
|
6414
6415
|
// src/theme/presets.ts
|
|
6415
|
-
var
|
|
6416
|
-
id: "optilogic-
|
|
6417
|
-
name: "Optilogic
|
|
6418
|
-
description: "
|
|
6416
|
+
var OPTILOGIC_LIGHT_THEME = {
|
|
6417
|
+
id: "optilogic-light",
|
|
6418
|
+
name: "Optilogic Light",
|
|
6419
|
+
description: "The default Optilogic light theme",
|
|
6419
6420
|
author: "Optilogic",
|
|
6420
|
-
background: "#
|
|
6421
|
-
foreground: "#
|
|
6422
|
-
card: "#
|
|
6423
|
-
cardForeground: "#
|
|
6424
|
-
popover: "#
|
|
6425
|
-
popoverForeground: "#
|
|
6426
|
-
primary: "#
|
|
6427
|
-
primaryForeground: "#
|
|
6428
|
-
|
|
6421
|
+
background: "#F3F4FF",
|
|
6422
|
+
foreground: "#000000",
|
|
6423
|
+
card: "#EDEEFF",
|
|
6424
|
+
cardForeground: "#000000",
|
|
6425
|
+
popover: "#EDEEFF",
|
|
6426
|
+
popoverForeground: "#000000",
|
|
6427
|
+
primary: "#5766F2",
|
|
6428
|
+
primaryForeground: "#000000",
|
|
6429
|
+
primaryHover: "#4555E0",
|
|
6430
|
+
accent: "#929BEF",
|
|
6429
6431
|
accentForeground: "#0C0A5A",
|
|
6430
|
-
secondary: "#
|
|
6431
|
-
secondaryForeground: "#
|
|
6432
|
-
muted: "#
|
|
6433
|
-
mutedForeground: "#
|
|
6434
|
-
destructive: "#
|
|
6432
|
+
secondary: "#CFD4FB",
|
|
6433
|
+
secondaryForeground: "#000000",
|
|
6434
|
+
muted: "#E8ECFF",
|
|
6435
|
+
mutedForeground: "#2E2D5E",
|
|
6436
|
+
destructive: "#DC2626",
|
|
6435
6437
|
destructiveForeground: "#FFFFFF",
|
|
6436
|
-
success: "#
|
|
6437
|
-
successForeground: "#
|
|
6438
|
-
warning: "#
|
|
6439
|
-
warningForeground: "#
|
|
6440
|
-
chip: "#
|
|
6441
|
-
chipForeground: "#
|
|
6442
|
-
border: "#
|
|
6443
|
-
input: "#
|
|
6438
|
+
success: "#929BEF",
|
|
6439
|
+
successForeground: "#0C0A5A",
|
|
6440
|
+
warning: "#B45309",
|
|
6441
|
+
warningForeground: "#FFFFFF",
|
|
6442
|
+
chip: "#5766F2",
|
|
6443
|
+
chipForeground: "#FFFFFF",
|
|
6444
|
+
border: "#C8CEFF",
|
|
6445
|
+
input: "#C8CEFF",
|
|
6444
6446
|
ring: "#5766F2",
|
|
6445
|
-
popoverBorder: "#
|
|
6446
|
-
divider: "#
|
|
6447
|
-
toggleTrack: "#
|
|
6447
|
+
popoverBorder: "#C8CEFF",
|
|
6448
|
+
divider: "#B8BEE0",
|
|
6449
|
+
toggleTrack: "#929BEF",
|
|
6448
6450
|
toggleTrackForeground: "#FFFFFF",
|
|
6449
6451
|
inputHover: "#5766F2",
|
|
6450
|
-
chart1: "#
|
|
6451
|
-
chart2: "#
|
|
6452
|
-
chart3: "#
|
|
6453
|
-
chart4: "#
|
|
6454
|
-
chart5: "#
|
|
6455
|
-
chart6: "#
|
|
6456
|
-
chart7: "#
|
|
6457
|
-
chart8: "#
|
|
6458
|
-
chart9: "#
|
|
6459
|
-
chart10: "#
|
|
6460
|
-
chart11: "#
|
|
6461
|
-
chart12: "#
|
|
6462
|
-
radius: "0.5rem"
|
|
6452
|
+
chart1: "#5766F2",
|
|
6453
|
+
chart2: "#929BEF",
|
|
6454
|
+
chart3: "#CFD4FB",
|
|
6455
|
+
chart4: "#0C0A5A",
|
|
6456
|
+
chart5: "#B45309",
|
|
6457
|
+
chart6: "#DC2626",
|
|
6458
|
+
chart7: "#A855F7",
|
|
6459
|
+
chart8: "#EC4899",
|
|
6460
|
+
chart9: "#55548C",
|
|
6461
|
+
chart10: "#0C0A5A",
|
|
6462
|
+
chart11: "#C05621",
|
|
6463
|
+
chart12: "#06B6D4",
|
|
6464
|
+
radius: "0.5rem",
|
|
6465
|
+
brandGradientFrom: "#1A7B4A",
|
|
6466
|
+
brandGradientTo: "#72DA60"
|
|
6463
6467
|
};
|
|
6464
6468
|
var OPTILOGIC_DARK_THEME = {
|
|
6465
6469
|
id: "optilogic-dark",
|
|
6466
6470
|
name: "Optilogic Dark",
|
|
6467
|
-
description: "Optilogic
|
|
6471
|
+
description: "The default Optilogic dark theme",
|
|
6468
6472
|
author: "Optilogic",
|
|
6469
|
-
background: "#
|
|
6470
|
-
foreground: "#
|
|
6471
|
-
card: "#
|
|
6472
|
-
cardForeground: "#
|
|
6473
|
-
popover: "#
|
|
6474
|
-
popoverForeground: "#
|
|
6475
|
-
primary: "#
|
|
6476
|
-
primaryForeground: "#
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6473
|
+
background: "#141826",
|
|
6474
|
+
foreground: "#E8EAF0",
|
|
6475
|
+
card: "#2D3252",
|
|
6476
|
+
cardForeground: "#E8EAF0",
|
|
6477
|
+
popover: "#2D3252",
|
|
6478
|
+
popoverForeground: "#E8EAF0",
|
|
6479
|
+
primary: "#5766F2",
|
|
6480
|
+
primaryForeground: "#FFFFFF",
|
|
6481
|
+
primaryHover: "#7B8FF7",
|
|
6482
|
+
accent: "#5766F2",
|
|
6483
|
+
accentForeground: "#FFFFFF",
|
|
6484
|
+
accentHover: "#7B8FF7",
|
|
6485
|
+
secondary: "#2D3252",
|
|
6486
|
+
secondaryForeground: "#E8EAF0",
|
|
6487
|
+
muted: "#2D3252",
|
|
6488
|
+
mutedForeground: "#C5C9D4",
|
|
6483
6489
|
destructive: "#EF4444",
|
|
6484
6490
|
destructiveForeground: "#FFFFFF",
|
|
6485
|
-
success: "#
|
|
6486
|
-
successForeground: "#
|
|
6487
|
-
warning: "#
|
|
6488
|
-
warningForeground: "#
|
|
6489
|
-
chip: "#
|
|
6490
|
-
chipForeground: "#
|
|
6491
|
-
border: "#
|
|
6492
|
-
input: "#
|
|
6493
|
-
ring: "#
|
|
6494
|
-
popoverBorder: "#
|
|
6495
|
-
divider: "#
|
|
6496
|
-
toggleTrack: "#
|
|
6497
|
-
toggleTrackForeground: "#
|
|
6498
|
-
inputHover: "#
|
|
6499
|
-
chart1: "#
|
|
6500
|
-
chart2: "#
|
|
6501
|
-
chart3: "#
|
|
6502
|
-
chart4: "#
|
|
6503
|
-
chart5: "#
|
|
6491
|
+
success: "#22C55E",
|
|
6492
|
+
successForeground: "#141826",
|
|
6493
|
+
warning: "#F59E0B",
|
|
6494
|
+
warningForeground: "#141826",
|
|
6495
|
+
chip: "#5766F2",
|
|
6496
|
+
chipForeground: "#FFFFFF",
|
|
6497
|
+
border: "#3A3F5C",
|
|
6498
|
+
input: "#2D3252",
|
|
6499
|
+
ring: "#7B8FF7",
|
|
6500
|
+
popoverBorder: "#3A3F5C",
|
|
6501
|
+
divider: "#363B5C",
|
|
6502
|
+
toggleTrack: "#4A5068",
|
|
6503
|
+
toggleTrackForeground: "#141826",
|
|
6504
|
+
inputHover: "#7B8FF7",
|
|
6505
|
+
chart1: "#7B8FF7",
|
|
6506
|
+
chart2: "#5766F2",
|
|
6507
|
+
chart3: "#22D3EE",
|
|
6508
|
+
chart4: "#22C55E",
|
|
6509
|
+
chart5: "#F59E0B",
|
|
6504
6510
|
chart6: "#EF4444",
|
|
6505
|
-
chart7: "#
|
|
6511
|
+
chart7: "#A855F7",
|
|
6506
6512
|
chart8: "#EC4899",
|
|
6507
|
-
chart9: "#
|
|
6513
|
+
chart9: "#C5C9D4",
|
|
6508
6514
|
chart10: "#14B8A6",
|
|
6509
|
-
chart11: "#
|
|
6510
|
-
chart12: "#
|
|
6511
|
-
radius: "0.5rem"
|
|
6515
|
+
chart11: "#FB923C",
|
|
6516
|
+
chart12: "#60A5FA",
|
|
6517
|
+
radius: "0.5rem",
|
|
6518
|
+
brandGradientFrom: "#1A7B4A",
|
|
6519
|
+
brandGradientTo: "#50FFA7"
|
|
6512
6520
|
};
|
|
6521
|
+
var OPTILOGIC_LEGACY_THEME = OPTILOGIC_LIGHT_THEME;
|
|
6513
6522
|
var MODERN_LIGHT_THEME = {
|
|
6514
6523
|
id: "modern-light",
|
|
6515
6524
|
name: "Modern Light",
|
|
@@ -6658,22 +6667,72 @@ var DARK_ELEGANT_THEME = {
|
|
|
6658
6667
|
chart12: "#F06292",
|
|
6659
6668
|
radius: "0.5rem"
|
|
6660
6669
|
};
|
|
6670
|
+
var GREEN_THEME = {
|
|
6671
|
+
id: "green-theme",
|
|
6672
|
+
name: "Green Theme",
|
|
6673
|
+
description: "A green theme with natural, earthy tones",
|
|
6674
|
+
author: "Optilogic",
|
|
6675
|
+
background: "#1a2820",
|
|
6676
|
+
foreground: "#E6F5EC",
|
|
6677
|
+
card: "#2d4038",
|
|
6678
|
+
cardForeground: "#E6F5EC",
|
|
6679
|
+
popover: "#243630",
|
|
6680
|
+
popoverForeground: "#E6F5EC",
|
|
6681
|
+
primary: "#6FCF97",
|
|
6682
|
+
primaryForeground: "#1a2820",
|
|
6683
|
+
accent: "#6FCF97",
|
|
6684
|
+
accentForeground: "#1a2820",
|
|
6685
|
+
secondary: "#1f3329",
|
|
6686
|
+
secondaryForeground: "#E6F5EC",
|
|
6687
|
+
muted: "#354840",
|
|
6688
|
+
mutedForeground: "#9DB8A8",
|
|
6689
|
+
destructive: "#EB5757",
|
|
6690
|
+
destructiveForeground: "#E6F5EC",
|
|
6691
|
+
success: "#6FCF97",
|
|
6692
|
+
successForeground: "#1a2820",
|
|
6693
|
+
warning: "#F2C94C",
|
|
6694
|
+
warningForeground: "#1a2820",
|
|
6695
|
+
chip: "#3a5045",
|
|
6696
|
+
chipForeground: "#C5E3D1",
|
|
6697
|
+
border: "#243630",
|
|
6698
|
+
input: "#243630",
|
|
6699
|
+
ring: "#6FCF97",
|
|
6700
|
+
chart1: "#6FCF97",
|
|
6701
|
+
chart2: "#8FE3B0",
|
|
6702
|
+
chart3: "#9DB8A8",
|
|
6703
|
+
chart4: "#2d4038",
|
|
6704
|
+
chart5: "#354840",
|
|
6705
|
+
chart6: "#EB5757",
|
|
6706
|
+
chart7: "#F2C94C",
|
|
6707
|
+
chart8: "#56CCF2",
|
|
6708
|
+
chart9: "#BB6BD9",
|
|
6709
|
+
chart10: "#4ECDC4",
|
|
6710
|
+
chart11: "#A8D8B9",
|
|
6711
|
+
chart12: "#E07B39",
|
|
6712
|
+
radius: "0.5rem"
|
|
6713
|
+
};
|
|
6661
6714
|
var PRESET_THEMES = [
|
|
6662
|
-
|
|
6715
|
+
OPTILOGIC_LIGHT_THEME,
|
|
6663
6716
|
OPTILOGIC_DARK_THEME,
|
|
6664
6717
|
MODERN_LIGHT_THEME,
|
|
6665
6718
|
MODERN_DARK_THEME,
|
|
6666
|
-
|
|
6719
|
+
GREEN_THEME
|
|
6667
6720
|
];
|
|
6668
6721
|
var ALL_THEMES = PRESET_THEMES;
|
|
6722
|
+
var LEGACY_THEME_ID_MAP = {
|
|
6723
|
+
"optilogic-legacy": OPTILOGIC_LIGHT_THEME.id,
|
|
6724
|
+
"dark-elegant": OPTILOGIC_DARK_THEME.id
|
|
6725
|
+
};
|
|
6669
6726
|
function getPresetTheme(id) {
|
|
6670
|
-
|
|
6727
|
+
const resolvedId = LEGACY_THEME_ID_MAP[id] ?? id;
|
|
6728
|
+
return ALL_THEMES.find((theme) => theme.id === resolvedId);
|
|
6671
6729
|
}
|
|
6672
6730
|
function getDefaultTheme() {
|
|
6673
|
-
return
|
|
6731
|
+
return OPTILOGIC_LIGHT_THEME;
|
|
6674
6732
|
}
|
|
6675
6733
|
function isPresetTheme(themeId) {
|
|
6676
|
-
|
|
6734
|
+
const resolvedId = LEGACY_THEME_ID_MAP[themeId] ?? themeId;
|
|
6735
|
+
return ALL_THEMES.some((theme) => theme.id === resolvedId);
|
|
6677
6736
|
}
|
|
6678
6737
|
|
|
6679
6738
|
// src/theme/utils.ts
|
|
@@ -6755,6 +6814,21 @@ function themeToHsl(theme) {
|
|
|
6755
6814
|
chart12: hexToHsl(theme.chart12)
|
|
6756
6815
|
};
|
|
6757
6816
|
}
|
|
6817
|
+
function blendHex(base, blend, amount) {
|
|
6818
|
+
const a = base.replace(/^#/, "");
|
|
6819
|
+
const b = blend.replace(/^#/, "");
|
|
6820
|
+
const ar = parseInt(a.substring(0, 2), 16);
|
|
6821
|
+
const ag = parseInt(a.substring(2, 4), 16);
|
|
6822
|
+
const ab = parseInt(a.substring(4, 6), 16);
|
|
6823
|
+
const br = parseInt(b.substring(0, 2), 16);
|
|
6824
|
+
const bg = parseInt(b.substring(2, 4), 16);
|
|
6825
|
+
const bb = parseInt(b.substring(4, 6), 16);
|
|
6826
|
+
const r = Math.round(ar + (br - ar) * amount);
|
|
6827
|
+
const g = Math.round(ag + (bg - ag) * amount);
|
|
6828
|
+
const bl = Math.round(ab + (bb - ab) * amount);
|
|
6829
|
+
const hex = (v) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, "0");
|
|
6830
|
+
return "#" + hex(r) + hex(g) + hex(bl);
|
|
6831
|
+
}
|
|
6758
6832
|
function deriveInputHoverHsl(hslTheme) {
|
|
6759
6833
|
const parts = hslTheme.foreground.split(/\s+/);
|
|
6760
6834
|
if (parts.length >= 3) {
|
|
@@ -6827,6 +6901,27 @@ function applyTheme(theme, targetElement) {
|
|
|
6827
6901
|
"--hover",
|
|
6828
6902
|
`${hslTheme.hover ?? deriveHoverChannels(theme, hslTheme)} / 0.18`
|
|
6829
6903
|
);
|
|
6904
|
+
if (theme.primaryHover) {
|
|
6905
|
+
element.style.setProperty("--primary-hover", hexToHsl(theme.primaryHover));
|
|
6906
|
+
} else {
|
|
6907
|
+
element.style.removeProperty("--primary-hover");
|
|
6908
|
+
}
|
|
6909
|
+
if (theme.card && theme.accent) {
|
|
6910
|
+
const accentHover = theme.accentHover ? theme.accentHover : blendHex(theme.card, theme.accent, 0.08);
|
|
6911
|
+
const accentActive = blendHex(theme.card, theme.accent, 0.15);
|
|
6912
|
+
element.style.setProperty("--accent-hover", hexToHsl(accentHover));
|
|
6913
|
+
element.style.setProperty("--accent-active", hexToHsl(accentActive));
|
|
6914
|
+
}
|
|
6915
|
+
if (theme.brandGradientFrom) {
|
|
6916
|
+
element.style.setProperty("--brand-from", hexToHsl(theme.brandGradientFrom));
|
|
6917
|
+
} else {
|
|
6918
|
+
element.style.removeProperty("--brand-from");
|
|
6919
|
+
}
|
|
6920
|
+
if (theme.brandGradientTo) {
|
|
6921
|
+
element.style.setProperty("--brand-to", hexToHsl(theme.brandGradientTo));
|
|
6922
|
+
} else {
|
|
6923
|
+
element.style.removeProperty("--brand-to");
|
|
6924
|
+
}
|
|
6830
6925
|
element.style.setProperty("--chart-1", hslTheme.chart1);
|
|
6831
6926
|
element.style.setProperty("--chart-2", hslTheme.chart2);
|
|
6832
6927
|
element.style.setProperty("--chart-3", hslTheme.chart3);
|
|
@@ -6945,6 +7040,10 @@ function areThemesEqual(theme1, theme2) {
|
|
|
6945
7040
|
"toggleTrackForeground",
|
|
6946
7041
|
"inputHover",
|
|
6947
7042
|
"hover",
|
|
7043
|
+
"primaryHover",
|
|
7044
|
+
"accentHover",
|
|
7045
|
+
"brandGradientFrom",
|
|
7046
|
+
"brandGradientTo",
|
|
6948
7047
|
"chart1",
|
|
6949
7048
|
"chart2",
|
|
6950
7049
|
"chart3",
|
|
@@ -7099,17 +7198,19 @@ function ThemePicker({
|
|
|
7099
7198
|
const currentIndex = themes.findIndex((t) => t.id === selectedTheme?.id);
|
|
7100
7199
|
switch (e.key) {
|
|
7101
7200
|
case "ArrowRight":
|
|
7102
|
-
case "ArrowDown":
|
|
7201
|
+
case "ArrowDown": {
|
|
7103
7202
|
e.preventDefault();
|
|
7104
7203
|
const nextIndex = (currentIndex + 1) % themes.length;
|
|
7105
7204
|
handleThemeSelect(themes[nextIndex]);
|
|
7106
7205
|
break;
|
|
7206
|
+
}
|
|
7107
7207
|
case "ArrowLeft":
|
|
7108
|
-
case "ArrowUp":
|
|
7208
|
+
case "ArrowUp": {
|
|
7109
7209
|
e.preventDefault();
|
|
7110
7210
|
const prevIndex = currentIndex <= 0 ? themes.length - 1 : currentIndex - 1;
|
|
7111
7211
|
handleThemeSelect(themes[prevIndex]);
|
|
7112
7212
|
break;
|
|
7213
|
+
}
|
|
7113
7214
|
}
|
|
7114
7215
|
};
|
|
7115
7216
|
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
@@ -8581,6 +8682,6 @@ var DataStarIcon = forwardRef(
|
|
|
8581
8682
|
);
|
|
8582
8683
|
DataStarIcon.displayName = "DataStarIcon";
|
|
8583
8684
|
|
|
8584
|
-
export { ALL_THEMES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, Badge, Board, BoardContent, BoardHeader, Button, Calendar, Card, CardActions, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardImage, CardList, CardTitle, CellEditor, Checkbox, Chip, CodeRenderer, Combobox, ConfirmationModal, ContextMenu, CopyButton, CosmicFrogIcon, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, DataStarIcon, DataTable, DatePicker, DatePickerInput, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileView, FilterPopover, HeaderCell, HtmlRenderer, IconButton, ImageRenderer, Input, Label, LoadingSpinner, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, MultiSelect, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OptilogicLogo, OptilogicLogoWithText, PRESET_THEMES, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ResizablePanel, ResizeHandle, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, Separator, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemePicker, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
8685
|
+
export { ALL_THEMES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, Badge, Board, BoardContent, BoardHeader, Button, Calendar, Card, CardActions, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardImage, CardList, CardTitle, CellEditor, Checkbox, Chip, CodeRenderer, Combobox, ConfirmationModal, ContextMenu, CopyButton, CosmicFrogIcon, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, DataStarIcon, DataTable, DatePicker, DatePickerInput, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileView, FilterPopover, GREEN_THEME, HeaderCell, HtmlRenderer, IconButton, ImageRenderer, Input, LEGACY_THEME_ID_MAP, Label, LoadingSpinner, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, MultiSelect, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OPTILOGIC_LIGHT_THEME, OptilogicLogo, OptilogicLogoWithText, PRESET_THEMES, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ResizablePanel, ResizeHandle, Select, SelectContent, SelectGroup, SelectItem, SelectItemDescription, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, Separator, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemePicker, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, tabsListVariants, tabsTriggerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
8585
8686
|
//# sourceMappingURL=index.js.map
|
|
8586
8687
|
//# sourceMappingURL=index.js.map
|