@optilogic/core 1.0.0 → 1.2.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 +491 -486
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -33
- package/dist/index.d.ts +66 -33
- package/dist/index.js +486 -480
- package/dist/index.js.map +1 -1
- package/dist/styles.css +84 -80
- package/dist/tailwind-preset.cjs +1 -0
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.js +1 -0
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +1 -1
- package/src/components/branding/CosmicFrogIcon.tsx +59 -0
- package/src/components/branding/DataStarIcon.tsx +35 -0
- package/src/components/branding/OptilogicLogo.tsx +88 -0
- package/src/components/branding/OptilogicLogoWithText.tsx +110 -0
- package/src/components/branding/index.ts +7 -0
- package/src/components/calendar.tsx +7 -2
- package/src/components/context-menu.tsx +2 -2
- package/src/components/data-grid/DataGrid.tsx +1 -1
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/select.tsx +1 -1
- package/src/components/tooltip.tsx +2 -2
- package/src/index.ts +15 -8
- package/src/styles.css +84 -80
- package/src/tailwind-preset.ts +1 -0
- package/src/theme/index.ts +3 -8
- package/src/theme/presets.ts +211 -497
- package/src/theme/types.ts +10 -0
- package/src/theme/utils.ts +24 -0
|
@@ -217,7 +217,7 @@ function MenuItem({ item, onClose, depth = 0 }: MenuItemProps) {
|
|
|
217
217
|
<div
|
|
218
218
|
className={cn(
|
|
219
219
|
"fixed z-[60] min-w-[180px] max-w-[280px]",
|
|
220
|
-
"rounded-md border border-border",
|
|
220
|
+
"rounded-md border border-popover-border",
|
|
221
221
|
"bg-popover text-popover-foreground",
|
|
222
222
|
"shadow-lg",
|
|
223
223
|
"animate-in fade-in-0 zoom-in-95",
|
|
@@ -337,7 +337,7 @@ export function ContextMenu({
|
|
|
337
337
|
ref={menuRef}
|
|
338
338
|
className={cn(
|
|
339
339
|
"fixed z-50 min-w-[180px] max-w-[280px]",
|
|
340
|
-
"rounded-md border border-border",
|
|
340
|
+
"rounded-md border border-popover-border",
|
|
341
341
|
"bg-popover text-popover-foreground",
|
|
342
342
|
"shadow-lg",
|
|
343
343
|
"animate-in fade-in-0 zoom-in-95",
|
|
@@ -756,7 +756,7 @@ export function DataGrid<T = Record<string, CellValue>>({
|
|
|
756
756
|
{/* Tooltip for long content */}
|
|
757
757
|
{hoveredCell && (
|
|
758
758
|
<div
|
|
759
|
-
className="fixed z-[200] p-3 bg-popover text-popover-foreground border border-border rounded-md shadow-xl max-w-md break-words text-sm pointer-events-none"
|
|
759
|
+
className="fixed z-[200] p-3 bg-popover text-popover-foreground border border-popover-border rounded-md shadow-xl max-w-md break-words text-sm pointer-events-none"
|
|
760
760
|
style={{
|
|
761
761
|
left: `${hoveredCell.x}px`,
|
|
762
762
|
top: `${hoveredCell.y}px`,
|
|
@@ -50,7 +50,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
50
50
|
<DropdownMenuPrimitive.SubContent
|
|
51
51
|
ref={ref}
|
|
52
52
|
className={cn(
|
|
53
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
53
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-popover-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
54
54
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
55
55
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
56
56
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -73,7 +73,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
73
73
|
ref={ref}
|
|
74
74
|
sideOffset={sideOffset}
|
|
75
75
|
className={cn(
|
|
76
|
-
"z-50 min-w-[8rem] max-w-[90vw] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-
|
|
76
|
+
"z-50 min-w-[8rem] max-w-[90vw] overflow-hidden rounded-md border border-popover-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
77
77
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
78
78
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
79
79
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -44,7 +44,7 @@ const PopoverContent = React.forwardRef<
|
|
|
44
44
|
align={align}
|
|
45
45
|
sideOffset={sideOffset}
|
|
46
46
|
className={cn(
|
|
47
|
-
"z-50 w-auto max-w-[90vw] rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-
|
|
47
|
+
"z-50 w-auto max-w-[90vw] rounded-md border border-popover-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
|
|
48
48
|
// Animation
|
|
49
49
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
50
50
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -76,7 +76,7 @@ const SelectContent = React.forwardRef<
|
|
|
76
76
|
<SelectPrimitive.Content
|
|
77
77
|
ref={ref}
|
|
78
78
|
className={cn(
|
|
79
|
-
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-
|
|
79
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-popover-border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
80
80
|
position === "popper" &&
|
|
81
81
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
82
82
|
className
|
|
@@ -53,11 +53,11 @@ const TooltipContent = React.forwardRef<
|
|
|
53
53
|
"px-2.5 py-1.5 rounded-md",
|
|
54
54
|
// Colors
|
|
55
55
|
"bg-popover text-popover-foreground",
|
|
56
|
-
"border border-border",
|
|
56
|
+
"border border-popover-border",
|
|
57
57
|
// Typography
|
|
58
58
|
"text-xs font-medium",
|
|
59
59
|
// Shadow
|
|
60
|
-
"shadow-
|
|
60
|
+
"shadow-lg",
|
|
61
61
|
// Animation
|
|
62
62
|
"animate-in fade-in-0 zoom-in-95",
|
|
63
63
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
package/src/index.ts
CHANGED
|
@@ -360,6 +360,18 @@ export {
|
|
|
360
360
|
resolveRenderer,
|
|
361
361
|
} from "./components/file-view/index";
|
|
362
362
|
|
|
363
|
+
// Branding
|
|
364
|
+
export {
|
|
365
|
+
OptilogicLogo,
|
|
366
|
+
type OptilogicLogoProps,
|
|
367
|
+
OptilogicLogoWithText,
|
|
368
|
+
type OptilogicLogoWithTextProps,
|
|
369
|
+
CosmicFrogIcon,
|
|
370
|
+
type CosmicFrogIconProps,
|
|
371
|
+
DataStarIcon,
|
|
372
|
+
type DataStarIconProps,
|
|
373
|
+
} from "./components/branding";
|
|
374
|
+
|
|
363
375
|
// Theme system
|
|
364
376
|
export {
|
|
365
377
|
// Types
|
|
@@ -368,16 +380,11 @@ export {
|
|
|
368
380
|
type ThemeHSL,
|
|
369
381
|
type ColorFieldConfig,
|
|
370
382
|
// Presets
|
|
371
|
-
GREEN_THEME,
|
|
372
383
|
OPTILOGIC_LEGACY_THEME,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
SCIFI_THEME,
|
|
376
|
-
OCEAN_THEME,
|
|
377
|
-
SUNSET_THEME,
|
|
378
|
-
FOREST_THEME,
|
|
379
|
-
CYBERPUNK_THEME,
|
|
384
|
+
OPTILOGIC_DARK_THEME,
|
|
385
|
+
MODERN_LIGHT_THEME,
|
|
380
386
|
MINIMALIST_LIGHT_THEME,
|
|
387
|
+
MODERN_DARK_THEME,
|
|
381
388
|
DARK_ELEGANT_THEME,
|
|
382
389
|
PRESET_THEMES,
|
|
383
390
|
ALL_THEMES,
|
package/src/styles.css
CHANGED
|
@@ -17,94 +17,98 @@
|
|
|
17
17
|
|
|
18
18
|
@layer base {
|
|
19
19
|
:root {
|
|
20
|
+
/* Matches OPTILOGIC_LEGACY_THEME */
|
|
20
21
|
--background: 0 0% 100%;
|
|
21
|
-
--foreground:
|
|
22
|
-
--card: 0 0%
|
|
23
|
-
--card-foreground:
|
|
22
|
+
--foreground: 243 82% 20%;
|
|
23
|
+
--card: 0 0% 98%;
|
|
24
|
+
--card-foreground: 243 82% 20%;
|
|
24
25
|
--popover: 0 0% 100%;
|
|
25
|
-
--popover-foreground:
|
|
26
|
-
--primary:
|
|
27
|
-
--primary-foreground:
|
|
28
|
-
--secondary:
|
|
29
|
-
--secondary-foreground:
|
|
30
|
-
--muted:
|
|
31
|
-
--muted-foreground:
|
|
32
|
-
--accent:
|
|
33
|
-
--accent-foreground:
|
|
34
|
-
--destructive: 0
|
|
35
|
-
--destructive-foreground:
|
|
36
|
-
--success:
|
|
37
|
-
--success-foreground:
|
|
38
|
-
--warning:
|
|
39
|
-
--warning-foreground:
|
|
40
|
-
--border:
|
|
41
|
-
--input:
|
|
42
|
-
--ring:
|
|
43
|
-
--
|
|
44
|
-
--toggle-track
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--
|
|
48
|
-
--chip
|
|
26
|
+
--popover-foreground: 243 82% 20%;
|
|
27
|
+
--primary: 243 82% 20%;
|
|
28
|
+
--primary-foreground: 0 0% 100%;
|
|
29
|
+
--secondary: 234 86% 67%;
|
|
30
|
+
--secondary-foreground: 0 0% 100%;
|
|
31
|
+
--muted: 216 27% 92%;
|
|
32
|
+
--muted-foreground: 0 1% 45%;
|
|
33
|
+
--accent: 229 87% 90%;
|
|
34
|
+
--accent-foreground: 243 82% 20%;
|
|
35
|
+
--destructive: 0 72% 51%;
|
|
36
|
+
--destructive-foreground: 0 0% 100%;
|
|
37
|
+
--success: 151 48% 50%;
|
|
38
|
+
--success-foreground: 0 0% 100%;
|
|
39
|
+
--warning: 45 90% 62%;
|
|
40
|
+
--warning-foreground: 243 82% 20%;
|
|
41
|
+
--border: 0 0% 82%;
|
|
42
|
+
--input: 0 0% 82%;
|
|
43
|
+
--ring: 234 86% 67%;
|
|
44
|
+
--popover-border: var(--border);
|
|
45
|
+
--toggle-track: 0 0% 82%;
|
|
46
|
+
--toggle-track-foreground: 0 0% 100%;
|
|
47
|
+
--input-hover: 234 86% 67%;
|
|
48
|
+
--divider: 0 0% 82%;
|
|
49
|
+
--chip: 227 88% 85%;
|
|
50
|
+
--chip-foreground: 243 82% 20%;
|
|
49
51
|
--disabled-opacity: 0.5;
|
|
50
52
|
--radius: 0.5rem;
|
|
51
|
-
--chart-1:
|
|
52
|
-
--chart-2:
|
|
53
|
-
--chart-3:
|
|
54
|
-
--chart-4:
|
|
55
|
-
--chart-5:
|
|
56
|
-
--chart-6:
|
|
57
|
-
--chart-7:
|
|
58
|
-
--chart-8:
|
|
59
|
-
--chart-9:
|
|
60
|
-
--chart-10:
|
|
61
|
-
--chart-11:
|
|
62
|
-
--chart-12:
|
|
53
|
+
--chart-1: 100 63% 51%;
|
|
54
|
+
--chart-2: 45 90% 62%;
|
|
55
|
+
--chart-3: 234 86% 67%;
|
|
56
|
+
--chart-4: 151 48% 50%;
|
|
57
|
+
--chart-5: 233 80% 76%;
|
|
58
|
+
--chart-6: 0 72% 51%;
|
|
59
|
+
--chart-7: 24 73% 55%;
|
|
60
|
+
--chart-8: 170 69% 46%;
|
|
61
|
+
--chart-9: 25 38% 44%;
|
|
62
|
+
--chart-10: 174 100% 34%;
|
|
63
|
+
--chart-11: 266 54% 50%;
|
|
64
|
+
--chart-12: 326 72% 55%;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
.dark {
|
|
66
|
-
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--card
|
|
70
|
-
--
|
|
71
|
-
--popover
|
|
72
|
-
--
|
|
73
|
-
--primary
|
|
74
|
-
--
|
|
75
|
-
--secondary
|
|
76
|
-
--
|
|
77
|
-
--muted
|
|
78
|
-
--
|
|
79
|
-
--accent
|
|
80
|
-
--
|
|
81
|
-
--destructive
|
|
82
|
-
--
|
|
83
|
-
--success
|
|
84
|
-
--
|
|
85
|
-
--warning
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
--
|
|
89
|
-
--
|
|
90
|
-
--
|
|
91
|
-
--
|
|
92
|
-
--
|
|
93
|
-
--
|
|
94
|
-
--
|
|
68
|
+
/* Matches MODERN_DARK_THEME */
|
|
69
|
+
--background: 240 6% 4%;
|
|
70
|
+
--foreground: 0 0% 98%;
|
|
71
|
+
--card: 240 6% 10%;
|
|
72
|
+
--card-foreground: 0 0% 98%;
|
|
73
|
+
--popover: 240 6% 10%;
|
|
74
|
+
--popover-foreground: 0 0% 98%;
|
|
75
|
+
--primary: 217 91% 60%;
|
|
76
|
+
--primary-foreground: 0 0% 100%;
|
|
77
|
+
--secondary: 240 4% 16%;
|
|
78
|
+
--secondary-foreground: 0 0% 98%;
|
|
79
|
+
--muted: 240 4% 16%;
|
|
80
|
+
--muted-foreground: 240 5% 65%;
|
|
81
|
+
--accent: 240 4% 16%;
|
|
82
|
+
--accent-foreground: 0 0% 98%;
|
|
83
|
+
--destructive: 0 84% 60%;
|
|
84
|
+
--destructive-foreground: 0 0% 100%;
|
|
85
|
+
--success: 142 71% 45%;
|
|
86
|
+
--success-foreground: 0 0% 100%;
|
|
87
|
+
--warning: 48 96% 53%;
|
|
88
|
+
--warning-foreground: 240 6% 4%;
|
|
89
|
+
--border: 240 4% 26%;
|
|
90
|
+
--input: 240 4% 26%;
|
|
91
|
+
--ring: 217 91% 60%;
|
|
92
|
+
--popover-border: 240 4% 34%;
|
|
93
|
+
--toggle-track: 240 4% 26%;
|
|
94
|
+
--toggle-track-foreground: 0 0% 98%;
|
|
95
|
+
--input-hover: 217 91% 60%;
|
|
96
|
+
--divider: 240 4% 26%;
|
|
97
|
+
--chip: 240 4% 16%;
|
|
98
|
+
--chip-foreground: 240 5% 83%;
|
|
95
99
|
--disabled-opacity: 0.5;
|
|
96
|
-
--chart-1:
|
|
97
|
-
--chart-2:
|
|
98
|
-
--chart-3:
|
|
99
|
-
--chart-4:
|
|
100
|
-
--chart-5:
|
|
101
|
-
--chart-6:
|
|
102
|
-
--chart-7:
|
|
103
|
-
--chart-8:
|
|
104
|
-
--chart-9:
|
|
105
|
-
--chart-10:
|
|
106
|
-
--chart-11:
|
|
107
|
-
--chart-12:
|
|
100
|
+
--chart-1: 217 91% 60%;
|
|
101
|
+
--chart-2: 142 71% 45%;
|
|
102
|
+
--chart-3: 38 92% 50%;
|
|
103
|
+
--chart-4: 0 84% 60%;
|
|
104
|
+
--chart-5: 270 60% 60%;
|
|
105
|
+
--chart-6: 174 60% 50%;
|
|
106
|
+
--chart-7: 24 95% 53%;
|
|
107
|
+
--chart-8: 330 80% 60%;
|
|
108
|
+
--chart-9: 199 89% 48%;
|
|
109
|
+
--chart-10: 48 96% 53%;
|
|
110
|
+
--chart-11: 162 63% 41%;
|
|
111
|
+
--chart-12: 292 84% 61%;
|
|
108
112
|
}
|
|
109
113
|
}
|
|
110
114
|
|
package/src/tailwind-preset.ts
CHANGED
package/src/theme/index.ts
CHANGED
|
@@ -9,16 +9,11 @@ export type { Theme, ThemeHex, ThemeHSL, ColorFieldConfig } from "./types";
|
|
|
9
9
|
|
|
10
10
|
// Presets
|
|
11
11
|
export {
|
|
12
|
-
GREEN_THEME,
|
|
13
12
|
OPTILOGIC_LEGACY_THEME,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
SCIFI_THEME,
|
|
17
|
-
OCEAN_THEME,
|
|
18
|
-
SUNSET_THEME,
|
|
19
|
-
FOREST_THEME,
|
|
20
|
-
CYBERPUNK_THEME,
|
|
13
|
+
OPTILOGIC_DARK_THEME,
|
|
14
|
+
MODERN_LIGHT_THEME,
|
|
21
15
|
MINIMALIST_LIGHT_THEME,
|
|
16
|
+
MODERN_DARK_THEME,
|
|
22
17
|
DARK_ELEGANT_THEME,
|
|
23
18
|
PRESET_THEMES,
|
|
24
19
|
ALL_THEMES,
|