@optilogic/core 1.0.0-beta.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.
Files changed (70) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/dist/index.cjs +6003 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +2310 -0
  6. package/dist/index.d.ts +2310 -0
  7. package/dist/index.js +5828 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/styles.css +96 -0
  10. package/dist/tailwind-preset.cjs +106 -0
  11. package/dist/tailwind-preset.cjs.map +1 -0
  12. package/dist/tailwind-preset.d.cts +23 -0
  13. package/dist/tailwind-preset.d.ts +23 -0
  14. package/dist/tailwind-preset.js +101 -0
  15. package/dist/tailwind-preset.js.map +1 -0
  16. package/package.json +154 -0
  17. package/src/components/accordion.tsx +187 -0
  18. package/src/components/alert-dialog.tsx +143 -0
  19. package/src/components/autocomplete.tsx +271 -0
  20. package/src/components/badge.tsx +62 -0
  21. package/src/components/button.tsx +85 -0
  22. package/src/components/calendar.tsx +235 -0
  23. package/src/components/card.tsx +94 -0
  24. package/src/components/checkbox.tsx +77 -0
  25. package/src/components/chip.tsx +77 -0
  26. package/src/components/confirmation-modal.tsx +195 -0
  27. package/src/components/context-menu.tsx +406 -0
  28. package/src/components/copy-button.tsx +84 -0
  29. package/src/components/data-grid/DataGrid.tsx +1027 -0
  30. package/src/components/data-grid/components/CellEditor.tsx +346 -0
  31. package/src/components/data-grid/components/FilterPopover.tsx +459 -0
  32. package/src/components/data-grid/components/HeaderCell.tsx +207 -0
  33. package/src/components/data-grid/components/index.ts +14 -0
  34. package/src/components/data-grid/hooks/index.ts +28 -0
  35. package/src/components/data-grid/hooks/useColumnResize.ts +378 -0
  36. package/src/components/data-grid/hooks/useDataGridState.ts +346 -0
  37. package/src/components/data-grid/hooks/useKeyboardNavigation.ts +361 -0
  38. package/src/components/data-grid/index.ts +71 -0
  39. package/src/components/data-grid/types.ts +478 -0
  40. package/src/components/data-grid/utils/dataProcessing.ts +277 -0
  41. package/src/components/data-grid/utils/index.ts +12 -0
  42. package/src/components/date-picker.tsx +366 -0
  43. package/src/components/dropdown-menu.tsx +230 -0
  44. package/src/components/icon-button.tsx +157 -0
  45. package/src/components/input.tsx +40 -0
  46. package/src/components/label.tsx +37 -0
  47. package/src/components/loading-spinner.tsx +113 -0
  48. package/src/components/modal.tsx +207 -0
  49. package/src/components/popover.tsx +62 -0
  50. package/src/components/progress.tsx +41 -0
  51. package/src/components/resizable-panel.tsx +434 -0
  52. package/src/components/resize-handle.tsx +187 -0
  53. package/src/components/select.tsx +160 -0
  54. package/src/components/separator.tsx +50 -0
  55. package/src/components/skeleton.tsx +37 -0
  56. package/src/components/switch.tsx +59 -0
  57. package/src/components/table.tsx +136 -0
  58. package/src/components/tabs.tsx +102 -0
  59. package/src/components/textarea.tsx +36 -0
  60. package/src/components/theme-picker.tsx +245 -0
  61. package/src/components/toaster.tsx +84 -0
  62. package/src/components/tooltip.tsx +199 -0
  63. package/src/index.ts +318 -0
  64. package/src/styles.css +96 -0
  65. package/src/tailwind-preset.ts +129 -0
  66. package/src/theme/index.ts +41 -0
  67. package/src/theme/presets.ts +502 -0
  68. package/src/theme/types.ts +164 -0
  69. package/src/theme/utils.ts +309 -0
  70. package/src/utils/cn.ts +14 -0
@@ -0,0 +1,96 @@
1
+ /**
2
+ * opti-ui Base Styles
3
+ *
4
+ * This file contains the CSS variables required for opti-ui components.
5
+ * Import this file or define these variables in your own CSS.
6
+ *
7
+ * Usage:
8
+ * import '@optilogic/core/styles.css';
9
+ *
10
+ * Or define in your own CSS:
11
+ * :root { --background: 0 0% 100%; ... }
12
+ */
13
+
14
+ @tailwind base;
15
+ @tailwind components;
16
+ @tailwind utilities;
17
+
18
+ @layer base {
19
+ :root {
20
+ --background: 0 0% 100%;
21
+ --foreground: 222.2 84% 4.9%;
22
+ --card: 0 0% 100%;
23
+ --card-foreground: 222.2 84% 4.9%;
24
+ --popover: 0 0% 100%;
25
+ --popover-foreground: 222.2 84% 4.9%;
26
+ --primary: 222.2 47.4% 11.2%;
27
+ --primary-foreground: 210 40% 98%;
28
+ --secondary: 210 40% 96.1%;
29
+ --secondary-foreground: 222.2 47.4% 11.2%;
30
+ --muted: 210 40% 96.1%;
31
+ --muted-foreground: 215.4 16.3% 46.9%;
32
+ --accent: 210 40% 96.1%;
33
+ --accent-foreground: 222.2 47.4% 11.2%;
34
+ --destructive: 0 84.2% 60.2%;
35
+ --destructive-foreground: 210 40% 98%;
36
+ --success: 142 76% 36%;
37
+ --success-foreground: 210 40% 98%;
38
+ --warning: 38 92% 50%;
39
+ --warning-foreground: 222.2 47.4% 11.2%;
40
+ --border: 214.3 31.8% 91.4%;
41
+ --input: 214.3 31.8% 91.4%;
42
+ --ring: 222.2 84% 4.9%;
43
+ --divider: 214.3 31.8% 91.4%;
44
+ --chip: 210 40% 96.1%;
45
+ --chip-foreground: 222.2 47.4% 11.2%;
46
+ --radius: 0.5rem;
47
+ --chart-1: 12 76% 61%;
48
+ --chart-2: 173 58% 39%;
49
+ --chart-3: 197 37% 24%;
50
+ --chart-4: 43 74% 66%;
51
+ --chart-5: 27 87% 67%;
52
+ }
53
+
54
+ .dark {
55
+ --background: 222.2 84% 4.9%;
56
+ --foreground: 210 40% 98%;
57
+ --card: 222.2 84% 4.9%;
58
+ --card-foreground: 210 40% 98%;
59
+ --popover: 222.2 84% 4.9%;
60
+ --popover-foreground: 210 40% 98%;
61
+ --primary: 210 40% 98%;
62
+ --primary-foreground: 222.2 47.4% 11.2%;
63
+ --secondary: 217.2 32.6% 17.5%;
64
+ --secondary-foreground: 210 40% 98%;
65
+ --muted: 217.2 32.6% 17.5%;
66
+ --muted-foreground: 215 20.2% 65.1%;
67
+ --accent: 217.2 32.6% 17.5%;
68
+ --accent-foreground: 210 40% 98%;
69
+ --destructive: 0 62.8% 30.6%;
70
+ --destructive-foreground: 210 40% 98%;
71
+ --success: 142 76% 36%;
72
+ --success-foreground: 210 40% 98%;
73
+ --warning: 38 92% 50%;
74
+ --warning-foreground: 222.2 47.4% 11.2%;
75
+ --border: 217.2 32.6% 17.5%;
76
+ --input: 217.2 32.6% 17.5%;
77
+ --ring: 212.7 26.8% 83.9%;
78
+ --divider: 217.2 32.6% 17.5%;
79
+ --chip: 217.2 32.6% 17.5%;
80
+ --chip-foreground: 210 40% 98%;
81
+ --chart-1: 220 70% 50%;
82
+ --chart-2: 160 60% 45%;
83
+ --chart-3: 30 80% 55%;
84
+ --chart-4: 280 65% 60%;
85
+ --chart-5: 340 75% 55%;
86
+ }
87
+ }
88
+
89
+ @layer base {
90
+ * {
91
+ @apply border-border;
92
+ }
93
+ body {
94
+ @apply bg-background text-foreground;
95
+ }
96
+ }
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ // src/tailwind-preset.ts
6
+ var optiUiPreset = {
7
+ darkMode: ["class"],
8
+ theme: {
9
+ extend: {
10
+ colors: {
11
+ // Background colors
12
+ background: "hsl(var(--background))",
13
+ foreground: "hsl(var(--foreground))",
14
+ // Card
15
+ card: {
16
+ DEFAULT: "hsl(var(--card))",
17
+ foreground: "hsl(var(--card-foreground))"
18
+ },
19
+ // Popover
20
+ popover: {
21
+ DEFAULT: "hsl(var(--popover))",
22
+ foreground: "hsl(var(--popover-foreground))"
23
+ },
24
+ // Primary
25
+ primary: {
26
+ DEFAULT: "hsl(var(--primary))",
27
+ foreground: "hsl(var(--primary-foreground))"
28
+ },
29
+ // Secondary
30
+ secondary: {
31
+ DEFAULT: "hsl(var(--secondary))",
32
+ foreground: "hsl(var(--secondary-foreground))"
33
+ },
34
+ // Muted
35
+ muted: {
36
+ DEFAULT: "hsl(var(--muted))",
37
+ foreground: "hsl(var(--muted-foreground))"
38
+ },
39
+ // Accent
40
+ accent: {
41
+ DEFAULT: "hsl(var(--accent))",
42
+ foreground: "hsl(var(--accent-foreground))"
43
+ },
44
+ // Destructive
45
+ destructive: {
46
+ DEFAULT: "hsl(var(--destructive))",
47
+ foreground: "hsl(var(--destructive-foreground))"
48
+ },
49
+ // Success
50
+ success: {
51
+ DEFAULT: "hsl(var(--success))",
52
+ foreground: "hsl(var(--success-foreground))"
53
+ },
54
+ // Warning
55
+ warning: {
56
+ DEFAULT: "hsl(var(--warning))",
57
+ foreground: "hsl(var(--warning-foreground))"
58
+ },
59
+ // Border, input, ring
60
+ border: "hsl(var(--border))",
61
+ input: "hsl(var(--input))",
62
+ ring: "hsl(var(--ring))",
63
+ divider: "hsl(var(--divider))",
64
+ // Chip
65
+ chip: {
66
+ DEFAULT: "hsl(var(--chip))",
67
+ foreground: "hsl(var(--chip-foreground))"
68
+ },
69
+ // Chart colors
70
+ chart: {
71
+ 1: "hsl(var(--chart-1))",
72
+ 2: "hsl(var(--chart-2))",
73
+ 3: "hsl(var(--chart-3))",
74
+ 4: "hsl(var(--chart-4))",
75
+ 5: "hsl(var(--chart-5))"
76
+ }
77
+ },
78
+ borderRadius: {
79
+ lg: "var(--radius)",
80
+ md: "calc(var(--radius) - 2px)",
81
+ sm: "calc(var(--radius) - 4px)"
82
+ },
83
+ keyframes: {
84
+ "accordion-down": {
85
+ from: { height: "0" },
86
+ to: { height: "var(--radix-accordion-content-height)" }
87
+ },
88
+ "accordion-up": {
89
+ from: { height: "var(--radix-accordion-content-height)" },
90
+ to: { height: "0" }
91
+ }
92
+ },
93
+ animation: {
94
+ "accordion-down": "accordion-down 0.2s ease-out",
95
+ "accordion-up": "accordion-up 0.2s ease-out"
96
+ }
97
+ }
98
+ },
99
+ plugins: []
100
+ };
101
+ var tailwind_preset_default = optiUiPreset;
102
+
103
+ exports.default = tailwind_preset_default;
104
+ exports.optiUiPreset = optiUiPreset;
105
+ //# sourceMappingURL=tailwind-preset.cjs.map
106
+ //# sourceMappingURL=tailwind-preset.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tailwind-preset.ts"],"names":[],"mappings":";;;;;AAoB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AAS,kBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,KAAA,EAAO;AAAA,UACL,CAAA,EAAG,qBAAA;AAAA,UACH,CAAA,EAAG,qBAAA;AAAA,UACH,CAAA,EAAG,qBAAA;AAAA,UACH,CAAA,EAAG,qBAAA;AAAA,UACH,CAAA,EAAG;AAAA;AACL,OACF;AAAA,MACA,YAAA,EAAc;AAAA,QACZ,EAAA,EAAI,eAAA;AAAA,QACJ,EAAA,EAAI,2BAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,SAAA,EAAW;AAAA,QACT,gBAAA,EAAkB;AAAA,UAChB,IAAA,EAAM,EAAE,MAAA,EAAQ,GAAA,EAAI;AAAA,UACpB,EAAA,EAAI,EAAE,MAAA,EAAQ,uCAAA;AAAwC,SACxD;AAAA,QACA,cAAA,EAAgB;AAAA,UACd,IAAA,EAAM,EAAE,MAAA,EAAQ,uCAAA,EAAwC;AAAA,UACxD,EAAA,EAAI,EAAE,MAAA,EAAQ,GAAA;AAAI;AACpB,OACF;AAAA,MACA,SAAA,EAAW;AAAA,QACT,gBAAA,EAAkB,8BAAA;AAAA,QAClB,cAAA,EAAgB;AAAA;AAClB;AACF,GACF;AAAA,EACA,SAAS;AACX;AAEA,IAAO,uBAAA,GAAQ","file":"tailwind-preset.cjs","sourcesContent":["import type { Config } from \"tailwindcss\";\n\n/**\n * opti-ui Tailwind CSS preset\n *\n * This preset provides the theme configuration required for opti-ui components.\n * Consumers should extend their Tailwind config with this preset.\n *\n * @example\n * // tailwind.config.js\n * import { optiUiPreset } from '@optilogic/core/tailwind-preset';\n *\n * export default {\n * presets: [optiUiPreset],\n * content: [\n * './src/**\\/*.{js,ts,jsx,tsx}',\n * './node_modules/@optilogic/core/dist/**\\/*.{js,mjs}'\n * ]\n * }\n */\nexport const optiUiPreset: Partial<Config> = {\n darkMode: [\"class\"],\n theme: {\n extend: {\n colors: {\n // Background colors\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n\n // Card\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n\n // Popover\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n\n // Primary\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n\n // Secondary\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n\n // Muted\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n\n // Accent\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n\n // Destructive\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n\n // Success\n success: {\n DEFAULT: \"hsl(var(--success))\",\n foreground: \"hsl(var(--success-foreground))\",\n },\n\n // Warning\n warning: {\n DEFAULT: \"hsl(var(--warning))\",\n foreground: \"hsl(var(--warning-foreground))\",\n },\n\n // Border, input, ring\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n divider: \"hsl(var(--divider))\",\n\n // Chip\n chip: {\n DEFAULT: \"hsl(var(--chip))\",\n foreground: \"hsl(var(--chip-foreground))\",\n },\n\n // Chart colors\n chart: {\n 1: \"hsl(var(--chart-1))\",\n 2: \"hsl(var(--chart-2))\",\n 3: \"hsl(var(--chart-3))\",\n 4: \"hsl(var(--chart-4))\",\n 5: \"hsl(var(--chart-5))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: { height: \"0\" },\n to: { height: \"var(--radix-accordion-content-height)\" },\n },\n \"accordion-up\": {\n from: { height: \"var(--radix-accordion-content-height)\" },\n to: { height: \"0\" },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [],\n};\n\nexport default optiUiPreset;\n"]}
@@ -0,0 +1,23 @@
1
+ import { Config } from 'tailwindcss';
2
+
3
+ /**
4
+ * opti-ui Tailwind CSS preset
5
+ *
6
+ * This preset provides the theme configuration required for opti-ui components.
7
+ * Consumers should extend their Tailwind config with this preset.
8
+ *
9
+ * @example
10
+ * // tailwind.config.js
11
+ * import { optiUiPreset } from '@optilogic/core/tailwind-preset';
12
+ *
13
+ * export default {
14
+ * presets: [optiUiPreset],
15
+ * content: [
16
+ * './src/**\/*.{js,ts,jsx,tsx}',
17
+ * './node_modules/@optilogic/core/dist/**\/*.{js,mjs}'
18
+ * ]
19
+ * }
20
+ */
21
+ declare const optiUiPreset: Partial<Config>;
22
+
23
+ export { optiUiPreset as default, optiUiPreset };
@@ -0,0 +1,23 @@
1
+ import { Config } from 'tailwindcss';
2
+
3
+ /**
4
+ * opti-ui Tailwind CSS preset
5
+ *
6
+ * This preset provides the theme configuration required for opti-ui components.
7
+ * Consumers should extend their Tailwind config with this preset.
8
+ *
9
+ * @example
10
+ * // tailwind.config.js
11
+ * import { optiUiPreset } from '@optilogic/core/tailwind-preset';
12
+ *
13
+ * export default {
14
+ * presets: [optiUiPreset],
15
+ * content: [
16
+ * './src/**\/*.{js,ts,jsx,tsx}',
17
+ * './node_modules/@optilogic/core/dist/**\/*.{js,mjs}'
18
+ * ]
19
+ * }
20
+ */
21
+ declare const optiUiPreset: Partial<Config>;
22
+
23
+ export { optiUiPreset as default, optiUiPreset };
@@ -0,0 +1,101 @@
1
+ // src/tailwind-preset.ts
2
+ var optiUiPreset = {
3
+ darkMode: ["class"],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ // Background colors
8
+ background: "hsl(var(--background))",
9
+ foreground: "hsl(var(--foreground))",
10
+ // Card
11
+ card: {
12
+ DEFAULT: "hsl(var(--card))",
13
+ foreground: "hsl(var(--card-foreground))"
14
+ },
15
+ // Popover
16
+ popover: {
17
+ DEFAULT: "hsl(var(--popover))",
18
+ foreground: "hsl(var(--popover-foreground))"
19
+ },
20
+ // Primary
21
+ primary: {
22
+ DEFAULT: "hsl(var(--primary))",
23
+ foreground: "hsl(var(--primary-foreground))"
24
+ },
25
+ // Secondary
26
+ secondary: {
27
+ DEFAULT: "hsl(var(--secondary))",
28
+ foreground: "hsl(var(--secondary-foreground))"
29
+ },
30
+ // Muted
31
+ muted: {
32
+ DEFAULT: "hsl(var(--muted))",
33
+ foreground: "hsl(var(--muted-foreground))"
34
+ },
35
+ // Accent
36
+ accent: {
37
+ DEFAULT: "hsl(var(--accent))",
38
+ foreground: "hsl(var(--accent-foreground))"
39
+ },
40
+ // Destructive
41
+ destructive: {
42
+ DEFAULT: "hsl(var(--destructive))",
43
+ foreground: "hsl(var(--destructive-foreground))"
44
+ },
45
+ // Success
46
+ success: {
47
+ DEFAULT: "hsl(var(--success))",
48
+ foreground: "hsl(var(--success-foreground))"
49
+ },
50
+ // Warning
51
+ warning: {
52
+ DEFAULT: "hsl(var(--warning))",
53
+ foreground: "hsl(var(--warning-foreground))"
54
+ },
55
+ // Border, input, ring
56
+ border: "hsl(var(--border))",
57
+ input: "hsl(var(--input))",
58
+ ring: "hsl(var(--ring))",
59
+ divider: "hsl(var(--divider))",
60
+ // Chip
61
+ chip: {
62
+ DEFAULT: "hsl(var(--chip))",
63
+ foreground: "hsl(var(--chip-foreground))"
64
+ },
65
+ // Chart colors
66
+ chart: {
67
+ 1: "hsl(var(--chart-1))",
68
+ 2: "hsl(var(--chart-2))",
69
+ 3: "hsl(var(--chart-3))",
70
+ 4: "hsl(var(--chart-4))",
71
+ 5: "hsl(var(--chart-5))"
72
+ }
73
+ },
74
+ borderRadius: {
75
+ lg: "var(--radius)",
76
+ md: "calc(var(--radius) - 2px)",
77
+ sm: "calc(var(--radius) - 4px)"
78
+ },
79
+ keyframes: {
80
+ "accordion-down": {
81
+ from: { height: "0" },
82
+ to: { height: "var(--radix-accordion-content-height)" }
83
+ },
84
+ "accordion-up": {
85
+ from: { height: "var(--radix-accordion-content-height)" },
86
+ to: { height: "0" }
87
+ }
88
+ },
89
+ animation: {
90
+ "accordion-down": "accordion-down 0.2s ease-out",
91
+ "accordion-up": "accordion-up 0.2s ease-out"
92
+ }
93
+ }
94
+ },
95
+ plugins: []
96
+ };
97
+ var tailwind_preset_default = optiUiPreset;
98
+
99
+ export { tailwind_preset_default as default, optiUiPreset };
100
+ //# sourceMappingURL=tailwind-preset.js.map
101
+ //# sourceMappingURL=tailwind-preset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tailwind-preset.ts"],"names":[],"mappings":";AAoBO,IAAM,YAAA,GAAgC;AAAA,EAC3C,QAAA,EAAU,CAAC,OAAO,CAAA;AAAA,EAClB,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ;AAAA;AAAA,QAEN,UAAA,EAAY,wBAAA;AAAA,QACZ,UAAA,EAAY,wBAAA;AAAA;AAAA,QAGZ,IAAA,EAAM;AAAA,UACJ,OAAA,EAAS,kBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,OAAA,EAAS;AAAA,UACP,OAAA,EAAS,qBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,OAAA,EAAS;AAAA,UACP,OAAA,EAAS,qBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,SAAA,EAAW;AAAA,UACT,OAAA,EAAS,uBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,KAAA,EAAO;AAAA,UACL,OAAA,EAAS,mBAAA;AAAA,UACT,UAAA,EAAY;AAAA,SACd;AAAA;AAAA,QAGA,MAAA,EAAQ;AAAA,UACN,OAAA,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AA,QAClB,cAAA,EAAgB;AAAA;AAClB;AACF,GACF;AAAA,EACA,SAAS;AACX;AAEA,IAAO,uBAAA,GAAQ","file":"tailwind-preset.js","sourcesContent":["import type { Config } from \"tailwindcss\";\n\n/**\n * opti-ui Tailwind CSS preset\n *\n * This preset provides the theme configuration required for opti-ui components.\n * Consumers should extend their Tailwind config with this preset.\n *\n * @example\n * // tailwind.config.js\n * import { optiUiPreset } from '@optilogic/core/tailwind-preset';\n *\n * export default {\n * presets: [optiUiPreset],\n * content: [\n * './src/**\\/*.{js,ts,jsx,tsx}',\n * './node_modules/@optilogic/core/dist/**\\/*.{js,mjs}'\n * ]\n * }\n */\nexport const optiUiPreset: Partial<Config> = {\n darkMode: [\"class\"],\n theme: {\n extend: {\n colors: {\n // Background colors\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n\n // Card\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n\n // Popover\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n\n // Primary\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n\n // Secondary\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n\n // Muted\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n\n // Accent\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n\n // Destructive\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n\n // Success\n success: {\n DEFAULT: \"hsl(var(--success))\",\n foreground: \"hsl(var(--success-foreground))\",\n },\n\n // Warning\n warning: {\n DEFAULT: \"hsl(var(--warning))\",\n foreground: \"hsl(var(--warning-foreground))\",\n },\n\n // Border, input, ring\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n divider: \"hsl(var(--divider))\",\n\n // Chip\n chip: {\n DEFAULT: \"hsl(var(--chip))\",\n foreground: \"hsl(var(--chip-foreground))\",\n },\n\n // Chart colors\n chart: {\n 1: \"hsl(var(--chart-1))\",\n 2: \"hsl(var(--chart-2))\",\n 3: \"hsl(var(--chart-3))\",\n 4: \"hsl(var(--chart-4))\",\n 5: \"hsl(var(--chart-5))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: { height: \"0\" },\n to: { height: \"var(--radix-accordion-content-height)\" },\n },\n \"accordion-up\": {\n from: { height: \"var(--radix-accordion-content-height)\" },\n to: { height: \"0\" },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [],\n};\n\nexport default optiUiPreset;\n"]}
package/package.json ADDED
@@ -0,0 +1,154 @@
1
+ {
2
+ "name": "@optilogic/core",
3
+ "version": "1.0.0-beta.0",
4
+ "description": "Core UI components for Optilogic - A professional React component library",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./styles.css": "./dist/styles.css",
21
+ "./tailwind-preset": {
22
+ "import": {
23
+ "types": "./dist/tailwind-preset.d.ts",
24
+ "default": "./dist/tailwind-preset.js"
25
+ },
26
+ "require": {
27
+ "types": "./dist/tailwind-preset.d.cts",
28
+ "default": "./dist/tailwind-preset.cjs"
29
+ }
30
+ }
31
+ },
32
+ "sideEffects": [
33
+ "**/*.css"
34
+ ],
35
+ "files": [
36
+ "dist",
37
+ "src",
38
+ "README.md"
39
+ ],
40
+ "dependencies": {
41
+ "class-variance-authority": "^0.7.1",
42
+ "clsx": "^2.1.1",
43
+ "tailwind-merge": "^3.0.1"
44
+ },
45
+ "peerDependencies": {
46
+ "@radix-ui/react-accordion": "^1.2.0",
47
+ "@radix-ui/react-alert-dialog": "^1.1.0",
48
+ "@radix-ui/react-checkbox": "^1.1.0",
49
+ "@radix-ui/react-dropdown-menu": "^2.1.0",
50
+ "@radix-ui/react-label": "^2.1.0",
51
+ "@radix-ui/react-popover": "^1.1.0",
52
+ "@radix-ui/react-progress": "^1.1.0",
53
+ "@radix-ui/react-select": "^2.1.0",
54
+ "@radix-ui/react-separator": "^1.1.0",
55
+ "@radix-ui/react-slot": "^1.1.0",
56
+ "@radix-ui/react-switch": "^1.1.0",
57
+ "@radix-ui/react-tabs": "^1.1.0",
58
+ "@radix-ui/react-tooltip": "^1.1.0",
59
+ "@tanstack/react-virtual": "^3.10.0",
60
+ "date-fns": "^3.0.0 || ^4.0.0",
61
+ "lucide-react": "^0.400.0",
62
+ "react": "^18.0.0 || ^19.0.0",
63
+ "react-day-picker": "^9.0.0",
64
+ "react-dom": "^18.0.0 || ^19.0.0",
65
+ "sonner": "^2.0.0",
66
+ "tailwindcss": "^3.4.0"
67
+ },
68
+ "peerDependenciesMeta": {
69
+ "@radix-ui/react-accordion": {
70
+ "optional": true
71
+ },
72
+ "@radix-ui/react-alert-dialog": {
73
+ "optional": true
74
+ },
75
+ "@radix-ui/react-checkbox": {
76
+ "optional": true
77
+ },
78
+ "@radix-ui/react-dropdown-menu": {
79
+ "optional": true
80
+ },
81
+ "@radix-ui/react-label": {
82
+ "optional": true
83
+ },
84
+ "@radix-ui/react-popover": {
85
+ "optional": true
86
+ },
87
+ "@radix-ui/react-progress": {
88
+ "optional": true
89
+ },
90
+ "@radix-ui/react-select": {
91
+ "optional": true
92
+ },
93
+ "@radix-ui/react-separator": {
94
+ "optional": true
95
+ },
96
+ "@radix-ui/react-switch": {
97
+ "optional": true
98
+ },
99
+ "@radix-ui/react-tabs": {
100
+ "optional": true
101
+ },
102
+ "@radix-ui/react-tooltip": {
103
+ "optional": true
104
+ },
105
+ "@tanstack/react-virtual": {
106
+ "optional": true
107
+ },
108
+ "date-fns": {
109
+ "optional": true
110
+ },
111
+ "react-day-picker": {
112
+ "optional": true
113
+ },
114
+ "sonner": {
115
+ "optional": true
116
+ }
117
+ },
118
+ "devDependencies": {
119
+ "@types/react": "^18.3.0",
120
+ "@types/react-dom": "^18.3.0",
121
+ "autoprefixer": "^10.4.20",
122
+ "date-fns": "^4.1.0",
123
+ "postcss": "^8.4.49",
124
+ "react": "^18.3.1",
125
+ "react-day-picker": "^9.13.0",
126
+ "react-dom": "^18.3.1",
127
+ "tailwindcss": "^3.4.16",
128
+ "tsup": "^8.3.5",
129
+ "typescript": "^5.7.2"
130
+ },
131
+ "keywords": [
132
+ "react",
133
+ "components",
134
+ "ui",
135
+ "design-system",
136
+ "tailwindcss",
137
+ "radix-ui"
138
+ ],
139
+ "license": "MIT",
140
+ "repository": {
141
+ "type": "git",
142
+ "url": "https://github.com/optilogic/opti-ui"
143
+ },
144
+ "publishConfig": {
145
+ "access": "public"
146
+ },
147
+ "scripts": {
148
+ "build": "tsup && cp src/styles.css dist/styles.css",
149
+ "dev": "tsup --watch",
150
+ "typecheck": "tsc --noEmit",
151
+ "lint": "eslint src --ext .ts,.tsx",
152
+ "clean": "rm -rf dist .turbo"
153
+ }
154
+ }