@middag-io/react 0.33.0 → 0.34.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 (131) hide show
  1. package/README.md +2 -2
  2. package/dist-lib/base/shell/AuthShell.js +39 -0
  3. package/dist-lib/base/shell/BasicShell.js +207 -0
  4. package/dist-lib/base/shell/ImmersiveShell.js +55 -0
  5. package/dist-lib/base/shell/partials/InspectorContext.js +60 -0
  6. package/dist-lib/base/shell/partials/InspectorPanel.js +22 -0
  7. package/dist-lib/base/shell/partials/NavErrorBoundary.js +66 -0
  8. package/dist-lib/base/shell/partials/OverlayScreen.js +36 -0
  9. package/dist-lib/base/shell/partials/PageActionButton.js +4 -0
  10. package/dist-lib/base/theme/appearance.js +39 -0
  11. package/dist-lib/base/theme/host-layout-detector.js +39 -0
  12. package/dist-lib/base/theme/host-theme-detector.js +131 -0
  13. package/dist-lib/base/theme/sidebar-safelist.txt +20 -0
  14. package/dist-lib/base/theme/theme-bridge.css +164 -0
  15. package/dist-lib/base/theme/theme-context.js +103 -0
  16. package/dist-lib/base/theme/themes/classic.css +174 -0
  17. package/dist-lib/base/theme/tokens.css +290 -0
  18. package/dist-lib/base/theme/useHostTheme.js +34 -0
  19. package/dist-lib/base/utils/clipboard.js +16 -0
  20. package/dist-lib/base/utils/conditions.js +13 -0
  21. package/dist-lib/base/utils/icon-registry.js +16 -0
  22. package/dist-lib/base/utils/icons.js +11 -0
  23. package/dist-lib/base/utils/interpolate.js +6 -0
  24. package/dist-lib/base/utils/register-default-icons.js +9 -0
  25. package/dist-lib/base/utils/storage.js +30 -0
  26. package/dist-lib/base/utils/time.js +59 -0
  27. package/dist-lib/chunks/subpath-BD_PKGUX.js +146 -0
  28. package/dist-lib/chunks/subpath-DLFO_UGQ.js +604 -0
  29. package/dist-lib/components/reui/accordion.js +43 -0
  30. package/dist-lib/components/reui/alert-dialog.js +101 -0
  31. package/dist-lib/components/reui/alert.js +55 -0
  32. package/dist-lib/components/reui/aspect-ratio.js +11 -0
  33. package/dist-lib/components/reui/autocomplete.js +170 -0
  34. package/dist-lib/components/reui/avatar.js +51 -0
  35. package/dist-lib/components/reui/badge.js +64 -0
  36. package/dist-lib/components/reui/breadcrumb.js +69 -0
  37. package/dist-lib/components/reui/button-group.js +38 -0
  38. package/dist-lib/components/reui/button.js +47 -0
  39. package/dist-lib/components/reui/calendar.js +89 -0
  40. package/dist-lib/components/reui/card.js +55 -0
  41. package/dist-lib/components/reui/carousel.js +110 -0
  42. package/dist-lib/components/reui/chart.js +130 -0
  43. package/dist-lib/components/reui/checkbox.js +20 -0
  44. package/dist-lib/components/reui/collapsible.js +23 -0
  45. package/dist-lib/components/reui/combobox.js +166 -0
  46. package/dist-lib/components/reui/command.js +85 -0
  47. package/dist-lib/components/reui/context-menu.js +121 -0
  48. package/dist-lib/components/reui/data-grid/data-grid-column-filter.js +108 -0
  49. package/dist-lib/components/reui/data-grid/data-grid-column-header.js +217 -0
  50. package/dist-lib/components/reui/data-grid/data-grid-column-visibility.js +25 -0
  51. package/dist-lib/components/reui/data-grid/data-grid-pagination.js +132 -0
  52. package/dist-lib/components/reui/data-grid/data-grid-scroll-area.js +183 -0
  53. package/dist-lib/components/reui/data-grid/data-grid-table-dnd-rows.js +125 -0
  54. package/dist-lib/components/reui/data-grid/data-grid-table-dnd.js +130 -0
  55. package/dist-lib/components/reui/data-grid/data-grid-table-virtual.js +156 -0
  56. package/dist-lib/components/reui/data-grid/data-grid-table.js +546 -0
  57. package/dist-lib/components/reui/data-grid/data-grid.js +113 -0
  58. package/dist-lib/components/reui/data-grid-pagination.js +131 -0
  59. package/dist-lib/components/reui/date-selector.js +642 -0
  60. package/dist-lib/components/reui/dialog.js +94 -0
  61. package/dist-lib/components/reui/drawer.js +77 -0
  62. package/dist-lib/components/reui/dropdown-menu.js +123 -0
  63. package/dist-lib/components/reui/empty.js +59 -0
  64. package/dist-lib/components/reui/field.js +115 -0
  65. package/dist-lib/components/reui/filters.js +873 -0
  66. package/dist-lib/components/reui/frame.js +97 -0
  67. package/dist-lib/components/reui/hover-card.js +31 -0
  68. package/dist-lib/components/reui/icon-placeholder.js +14 -0
  69. package/dist-lib/components/reui/index.js +18 -0
  70. package/dist-lib/components/reui/input-group.js +78 -0
  71. package/dist-lib/components/reui/input-otp.js +44 -0
  72. package/dist-lib/components/reui/input.js +14 -0
  73. package/dist-lib/components/reui/item.js +116 -0
  74. package/dist-lib/components/reui/kanban.js +316 -0
  75. package/dist-lib/components/reui/kbd.js +19 -0
  76. package/dist-lib/components/reui/label.js +14 -0
  77. package/dist-lib/components/reui/menubar.js +132 -0
  78. package/dist-lib/components/reui/native-select.js +37 -0
  79. package/dist-lib/components/reui/navigation-menu.js +80 -0
  80. package/dist-lib/components/reui/number-field.js +126 -0
  81. package/dist-lib/components/reui/pagination.js +78 -0
  82. package/dist-lib/components/reui/phone-input.js +124 -0
  83. package/dist-lib/components/reui/popover.js +55 -0
  84. package/dist-lib/components/reui/progress.js +20 -0
  85. package/dist-lib/components/reui/radio-group.js +27 -0
  86. package/dist-lib/components/reui/rating.js +81 -0
  87. package/dist-lib/components/reui/resizable.js +31 -0
  88. package/dist-lib/components/reui/scroll-area.js +36 -0
  89. package/dist-lib/components/reui/scrollspy.js +104 -0
  90. package/dist-lib/components/reui/select.js +97 -0
  91. package/dist-lib/components/reui/separator.js +17 -0
  92. package/dist-lib/components/reui/sheet.js +81 -0
  93. package/dist-lib/components/reui/sidebar.js +350 -0
  94. package/dist-lib/components/reui/skeleton.js +12 -0
  95. package/dist-lib/components/reui/slider.js +35 -0
  96. package/dist-lib/components/reui/sonner.js +28 -0
  97. package/dist-lib/components/reui/sortable.js +172 -0
  98. package/dist-lib/components/reui/spinner.js +14 -0
  99. package/dist-lib/components/reui/stepper.js +193 -0
  100. package/dist-lib/components/reui/svgs/claudeAiIcon.js +13 -0
  101. package/dist-lib/components/reui/svgs/gemini.js +257 -0
  102. package/dist-lib/components/reui/svgs/openai.js +10 -0
  103. package/dist-lib/components/reui/svgs/openaiDark.js +13 -0
  104. package/dist-lib/components/reui/switch.js +19 -0
  105. package/dist-lib/components/reui/table.js +66 -0
  106. package/dist-lib/components/reui/tabs.js +47 -0
  107. package/dist-lib/components/reui/textarea.js +13 -0
  108. package/dist-lib/components/reui/timeline.js +84 -0
  109. package/dist-lib/components/reui/toggle-group.js +48 -0
  110. package/dist-lib/components/reui/toggle.js +36 -0
  111. package/dist-lib/components/reui/tooltip.js +35 -0
  112. package/dist-lib/components/reui/tree.js +102 -0
  113. package/dist-lib/i18n/I18nProvider.js +23 -0
  114. package/dist-lib/i18n/host-resolver.js +10 -0
  115. package/dist-lib/i18n/instance.js +2 -0
  116. package/dist-lib/i18n/locales/en/ui.json +266 -0
  117. package/dist-lib/i18n/locales/en/validators.json +13 -0
  118. package/dist-lib/i18n/locales/pt-BR/ui.json +266 -0
  119. package/dist-lib/i18n/locales/pt-BR/validators.json +13 -0
  120. package/dist-lib/i18n/register-strings.js +7 -0
  121. package/dist-lib/i18n/render-label.js +13 -0
  122. package/dist-lib/i18n/resolve-field-error.js +10 -0
  123. package/dist-lib/i18n/useHostString.js +31 -0
  124. package/dist-lib/i18n/useTranslation.js +48 -0
  125. package/dist-lib/lib/actions/resolve-action-target.js +48 -0
  126. package/dist-lib/lib/hooks/use-copy-to-clipboard.js +18 -0
  127. package/dist-lib/lib/hooks/use-file-upload.js +171 -0
  128. package/dist-lib/lib/hooks/use-mobile.js +18 -0
  129. package/dist-lib/lib/portal-container.js +7 -0
  130. package/dist-lib/lib/utils.js +8 -0
  131. package/package.json +39 -7
@@ -0,0 +1,131 @@
1
+ //#region src/base/theme/host-theme-detector.ts
2
+ var e = [
3
+ "dark",
4
+ "theme-dark",
5
+ "dark-mode",
6
+ "darkmode",
7
+ "is-dark",
8
+ "night",
9
+ "bp-dark"
10
+ ], t = [
11
+ {
12
+ attr: "data-theme",
13
+ value: "dark"
14
+ },
15
+ {
16
+ attr: "data-bs-theme",
17
+ value: "dark"
18
+ },
19
+ {
20
+ attr: "data-color-scheme",
21
+ value: "dark"
22
+ },
23
+ {
24
+ attr: "data-color-mode",
25
+ value: "dark"
26
+ },
27
+ {
28
+ attr: "data-moodle-theme-mode",
29
+ value: "dark"
30
+ },
31
+ {
32
+ attr: "data-wp-dark",
33
+ value: "true"
34
+ }
35
+ ];
36
+ function n(n) {
37
+ let r = n.classList;
38
+ for (let t of e) if (r.contains(t)) return !0;
39
+ for (let { attr: e, value: r } of t) if (n.getAttribute(e) === r) return !0;
40
+ return n.style.colorScheme === "dark";
41
+ }
42
+ var r = [
43
+ {
44
+ key: "theme-dark-mode",
45
+ darkValues: [
46
+ "true",
47
+ "1",
48
+ "dark"
49
+ ]
50
+ },
51
+ {
52
+ key: "darkmode",
53
+ darkValues: [
54
+ "true",
55
+ "1",
56
+ "dark",
57
+ "enabled"
58
+ ]
59
+ },
60
+ {
61
+ key: "dark-mode",
62
+ darkValues: [
63
+ "true",
64
+ "1",
65
+ "dark"
66
+ ]
67
+ },
68
+ {
69
+ key: "moodle-theme-mode",
70
+ darkValues: ["dark"]
71
+ },
72
+ {
73
+ key: "boost-dark-mode",
74
+ darkValues: ["true", "1"]
75
+ },
76
+ {
77
+ key: "moove-dark-mode",
78
+ darkValues: ["true", "1"]
79
+ },
80
+ {
81
+ key: "wp-dark-mode",
82
+ darkValues: [
83
+ "true",
84
+ "1",
85
+ "dark"
86
+ ]
87
+ },
88
+ {
89
+ key: "flavor",
90
+ darkValues: ["dark"]
91
+ },
92
+ {
93
+ key: "theme",
94
+ darkValues: ["dark"]
95
+ },
96
+ {
97
+ key: "color-scheme",
98
+ darkValues: ["dark"]
99
+ },
100
+ {
101
+ key: "color-mode",
102
+ darkValues: ["dark"]
103
+ }
104
+ ];
105
+ function i() {
106
+ try {
107
+ for (let { key: e, darkValues: t } of r) {
108
+ let n = localStorage.getItem(e);
109
+ if (n !== null && t.includes(n.toLowerCase())) return !0;
110
+ }
111
+ } catch {}
112
+ return null;
113
+ }
114
+ function a() {
115
+ return typeof window > "u" ? "auto" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "auto";
116
+ }
117
+ function o() {
118
+ return typeof document > "u" ? "auto" : n(document.documentElement) || n(document.body) ? "dark" : document.documentElement.getAttribute("data-theme") === "light" || document.documentElement.getAttribute("data-bs-theme") === "light" || document.body.getAttribute("data-theme") === "light" ? "light" : i() === !0 ? "dark" : a();
119
+ }
120
+ var s = [
121
+ "class",
122
+ "data-theme",
123
+ "data-bs-theme",
124
+ "data-color-scheme",
125
+ "data-color-mode",
126
+ "data-moodle-theme-mode",
127
+ "data-wp-dark",
128
+ "style"
129
+ ];
130
+ //#endregion
131
+ export { s as OBSERVED_ATTRIBUTES, o as detectHostTheme };
@@ -0,0 +1,20 @@
1
+ w-(--sidebar-width)
2
+ w-(--sidebar-width-icon)
3
+ w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]
4
+ w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]
5
+ group-data-[collapsible=icon]:w-(--sidebar-width-icon)
6
+ group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]
7
+ group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]
8
+ group-data-[collapsible=icon]:hidden
9
+ group-data-[collapsible=icon]:overflow-hidden
10
+ group-data-[collapsible=icon]:p-0!
11
+ group-data-[collapsible=icon]:size-8!
12
+ group-data-[collapsible=icon]:p-2!
13
+ group-data-[collapsible=icon]:-mt-8
14
+ group-data-[collapsible=icon]:opacity-0
15
+ group-data-[collapsible=offcanvas]:w-0
16
+ group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]
17
+ group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]
18
+ group-data-[collapsible=offcanvas]:bg-sidebar
19
+ group-data-[collapsible=offcanvas]:translate-x-0
20
+ group-data-[collapsible=offcanvas]:after:left-full
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Theme Bridge — forces re-resolution of Tailwind --color-* tokens at theme scope.
3
+ *
4
+ * Problem: Tailwind v4 @theme generates `--color-primary: var(--primary)` on :root.
5
+ * CSS resolves `var(--primary)` at :root level (computed value = classic default),
6
+ * and descendants inherit the resolved value. When .theme-enterprise sets
7
+ * `--primary: new-value`, it doesn't affect --color-primary because that was
8
+ * already computed on :root.
9
+ *
10
+ * Fix: Re-declare ALL --color-* mappings on .theme-* selectors. This forces
11
+ * the browser to re-evaluate var(--primary) at the theme class level, where
12
+ * the theme's own --primary is in scope.
13
+ *
14
+ * This file must be imported AFTER tailwind.css (so it overrides @layer theme).
15
+ * It does NOT need updating when theme files change — it just re-maps the same
16
+ * var() references. Only update when NEW --color-* tokens are added to @theme.
17
+ */
18
+
19
+ /* ── Light mode ────────────────────────────────────────────────────────────── */
20
+
21
+ .theme-classic,
22
+ .theme-enterprise,
23
+ .theme-soft,
24
+ .theme-midnight {
25
+ /* Canvas */
26
+ --color-background: var(--background);
27
+ --color-foreground: var(--foreground);
28
+
29
+ /* Primary */
30
+ --color-primary: var(--middag-brand, var(--primary));
31
+ --color-primary-foreground: var(--primary-foreground);
32
+ --color-primary-subtle: var(--primary-subtle);
33
+ --color-primary-muted: var(--primary-muted);
34
+
35
+ /* Secondary */
36
+ --color-secondary: var(--secondary);
37
+ --color-secondary-foreground: var(--secondary-foreground);
38
+
39
+ /* Destructive */
40
+ --color-destructive: var(--destructive);
41
+ --color-destructive-foreground: var(--destructive-foreground);
42
+ --color-destructive-subtle: var(--destructive-subtle);
43
+ --color-destructive-muted: var(--destructive-muted);
44
+
45
+ /* Success */
46
+ --color-success: var(--success);
47
+ --color-success-foreground: var(--success-foreground);
48
+ --color-success-subtle: var(--success-subtle);
49
+ --color-success-muted: var(--success-muted);
50
+
51
+ /* Warning */
52
+ --color-warning: var(--warning);
53
+ --color-warning-foreground: var(--warning-foreground);
54
+ --color-warning-subtle: var(--warning-subtle);
55
+ --color-warning-muted: var(--warning-muted);
56
+
57
+ /* Info */
58
+ --color-info: var(--info);
59
+ --color-info-foreground: var(--info-foreground);
60
+ --color-info-subtle: var(--info-subtle);
61
+ --color-info-muted: var(--info-muted);
62
+
63
+ /* Neutral */
64
+ --color-muted: var(--muted);
65
+ --color-muted-foreground: var(--muted-foreground);
66
+ --color-accent: var(--accent);
67
+ --color-accent-foreground: var(--accent-foreground);
68
+
69
+ /* Structure */
70
+ --color-border: var(--border);
71
+ --color-input: var(--input);
72
+ --color-ring: var(--ring);
73
+
74
+ /* Overlays */
75
+ --color-card: var(--card);
76
+ --color-card-foreground: var(--card-foreground);
77
+ --color-popover: var(--popover);
78
+ --color-popover-foreground: var(--popover-foreground);
79
+
80
+ /* Chart */
81
+ --color-chart-1: var(--chart-1);
82
+ --color-chart-2: var(--chart-2);
83
+ --color-chart-3: var(--chart-3);
84
+ --color-chart-4: var(--chart-4);
85
+ --color-chart-5: var(--chart-5);
86
+
87
+ /* Sidebar */
88
+ --color-sidebar: var(--sidebar);
89
+ --color-sidebar-foreground: var(--sidebar-foreground);
90
+ --color-sidebar-primary: var(--sidebar-primary);
91
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
92
+ --color-sidebar-accent: var(--sidebar-accent);
93
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
94
+ --color-sidebar-hover: var(--sidebar-hover);
95
+ --color-sidebar-border: var(--sidebar-border);
96
+ --color-sidebar-ring: var(--ring);
97
+
98
+ /* Invert */
99
+ --color-invert: var(--invert);
100
+ --color-invert-foreground: var(--invert-foreground);
101
+ }
102
+
103
+ /* ── Dark mode ─────────────────────────────────────────────────────────────── */
104
+
105
+ :root.dark .theme-classic,
106
+ :root.dark .theme-enterprise,
107
+ :root.dark .theme-soft,
108
+ :root.dark .theme-midnight,
109
+ [data-theme="dark"] .theme-classic,
110
+ [data-theme="dark"] .theme-enterprise,
111
+ [data-theme="dark"] .theme-soft,
112
+ [data-theme="dark"] .theme-midnight {
113
+ --color-background: var(--background);
114
+ --color-foreground: var(--foreground);
115
+ --color-primary: var(--middag-brand, var(--primary));
116
+ --color-primary-foreground: var(--primary-foreground);
117
+ --color-primary-subtle: var(--primary-subtle);
118
+ --color-primary-muted: var(--primary-muted);
119
+ --color-secondary: var(--secondary);
120
+ --color-secondary-foreground: var(--secondary-foreground);
121
+ --color-destructive: var(--destructive);
122
+ --color-destructive-foreground: var(--destructive-foreground);
123
+ --color-destructive-subtle: var(--destructive-subtle);
124
+ --color-destructive-muted: var(--destructive-muted);
125
+ --color-success: var(--success);
126
+ --color-success-foreground: var(--success-foreground);
127
+ --color-success-subtle: var(--success-subtle);
128
+ --color-success-muted: var(--success-muted);
129
+ --color-warning: var(--warning);
130
+ --color-warning-foreground: var(--warning-foreground);
131
+ --color-warning-subtle: var(--warning-subtle);
132
+ --color-warning-muted: var(--warning-muted);
133
+ --color-info: var(--info);
134
+ --color-info-foreground: var(--info-foreground);
135
+ --color-info-subtle: var(--info-subtle);
136
+ --color-info-muted: var(--info-muted);
137
+ --color-muted: var(--muted);
138
+ --color-muted-foreground: var(--muted-foreground);
139
+ --color-accent: var(--accent);
140
+ --color-accent-foreground: var(--accent-foreground);
141
+ --color-border: var(--border);
142
+ --color-input: var(--input);
143
+ --color-ring: var(--ring);
144
+ --color-card: var(--card);
145
+ --color-card-foreground: var(--card-foreground);
146
+ --color-popover: var(--popover);
147
+ --color-popover-foreground: var(--popover-foreground);
148
+ --color-chart-1: var(--chart-1);
149
+ --color-chart-2: var(--chart-2);
150
+ --color-chart-3: var(--chart-3);
151
+ --color-chart-4: var(--chart-4);
152
+ --color-chart-5: var(--chart-5);
153
+ --color-sidebar: var(--sidebar);
154
+ --color-sidebar-foreground: var(--sidebar-foreground);
155
+ --color-sidebar-primary: var(--sidebar-primary);
156
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
157
+ --color-sidebar-accent: var(--sidebar-accent);
158
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
159
+ --color-sidebar-hover: var(--sidebar-hover);
160
+ --color-sidebar-border: var(--sidebar-border);
161
+ --color-sidebar-ring: var(--ring);
162
+ --color-invert: var(--invert);
163
+ --color-invert-foreground: var(--invert-foreground);
164
+ }
@@ -0,0 +1,103 @@
1
+ import { createContext as e, useContext as t, useMemo as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region src/base/theme/theme-context.tsx
4
+ var i = [
5
+ "classic",
6
+ "enterprise",
7
+ "soft",
8
+ "midnight"
9
+ ], a = {
10
+ classic: {
11
+ id: "classic",
12
+ badge: {
13
+ variant: "default",
14
+ rounded: !1
15
+ },
16
+ button: { size: "default" },
17
+ tabs: { variant: "default" },
18
+ table: {
19
+ density: "comfortable",
20
+ stripedRows: !1
21
+ },
22
+ card: { bordered: !1 }
23
+ },
24
+ enterprise: {
25
+ id: "enterprise",
26
+ badge: {
27
+ variant: "outline",
28
+ rounded: !1
29
+ },
30
+ button: { size: "sm" },
31
+ tabs: { variant: "line" },
32
+ table: {
33
+ density: "compact",
34
+ stripedRows: !0
35
+ },
36
+ card: { bordered: !0 }
37
+ },
38
+ soft: {
39
+ id: "soft",
40
+ badge: {
41
+ variant: "soft",
42
+ rounded: !0
43
+ },
44
+ button: { size: "default" },
45
+ tabs: { variant: "pill" },
46
+ table: {
47
+ density: "spacious",
48
+ stripedRows: !1
49
+ },
50
+ card: { bordered: !1 }
51
+ },
52
+ midnight: {
53
+ id: "midnight",
54
+ badge: {
55
+ variant: "outline",
56
+ rounded: !1
57
+ },
58
+ button: { size: "sm" },
59
+ tabs: { variant: "line" },
60
+ table: {
61
+ density: "compact",
62
+ stripedRows: !1
63
+ },
64
+ card: { bordered: !0 }
65
+ }
66
+ }, o = e(a.classic);
67
+ function s() {
68
+ return t(o);
69
+ }
70
+ function c(e) {
71
+ return a[e];
72
+ }
73
+ var l = {
74
+ classic: "theme-classic",
75
+ enterprise: "theme-enterprise",
76
+ soft: "theme-soft",
77
+ midnight: "theme-midnight"
78
+ }, u = {
79
+ classic: {
80
+ width: "260px",
81
+ icon: "60px"
82
+ },
83
+ enterprise: {
84
+ width: "248px",
85
+ icon: "56px"
86
+ },
87
+ soft: {
88
+ width: "272px",
89
+ icon: "64px"
90
+ },
91
+ midnight: {
92
+ width: "240px",
93
+ icon: "52px"
94
+ }
95
+ };
96
+ function d({ theme: e, children: t }) {
97
+ return /* @__PURE__ */ r(o, {
98
+ value: n(() => a[e], [e]),
99
+ children: t
100
+ });
101
+ }
102
+ //#endregion
103
+ export { d as MIDDAGThemeProvider, l as THEME_CLASSES, i as THEME_IDS, u as THEME_SIDEBAR_DIMS, c as getThemeOverrides, s as useThemeOverrides };
@@ -0,0 +1,174 @@
1
+ /* =============================================================================
2
+ * MIDDAG React — Theme: classic (Maia)
3
+ * -----------------------------------------------------------------------------
4
+ * The default MIDDAG design language. Warm neutral base (hue 286), dark
5
+ * blue-charcoal primary, generous radii, comfortable density.
6
+ *
7
+ * This file exists for symmetry with other named themes (enterprise, soft).
8
+ * It re-declares the token values from tokens.css so that consumers can
9
+ * apply `.theme-classic` alongside other theme classes for explicit switching.
10
+ *
11
+ * If no theme class is applied, the app renders with these same values
12
+ * because tokens.css sets them on :root.
13
+ *
14
+ * Usage:
15
+ * import "@middag-io/react/style.css";
16
+ * import "@middag-io/react/themes/classic.css";
17
+ *
18
+ * <div className="theme-classic">...</div>
19
+ *
20
+ * ============================================================================= */
21
+
22
+ /* ---------------------------------------------------------------------------
23
+ * LIGHT MODE
24
+ * ------------------------------------------------------------------------- */
25
+ .theme-classic {
26
+ /* --- Colors: brand & accents ------------------------------------------- */
27
+ --primary: oklch(0.21 0.034 264.06);
28
+ --primary-foreground: oklch(0.98 0 0);
29
+ --primary-subtle: oklch(0.95 0.012 264.06);
30
+ --primary-muted: oklch(0.88 0.02 264.06);
31
+
32
+ --secondary: oklch(0.97 0.001 286);
33
+ --secondary-foreground: oklch(0.45 0.01 286);
34
+
35
+ --accent: oklch(0.97 0.001 286);
36
+ --accent-foreground: oklch(0.21 0.014 285.82);
37
+
38
+ /* --- Colors: status ---------------------------------------------------- */
39
+ --success: oklch(0.55 0.17 155);
40
+ --success-foreground: oklch(0.98 0 0);
41
+ --success-subtle: oklch(0.95 0.04 155);
42
+ --success-muted: oklch(0.88 0.06 155);
43
+
44
+ --warning: oklch(0.75 0.18 75);
45
+ --warning-foreground: oklch(0.18 0.02 75);
46
+ --warning-subtle: oklch(0.96 0.04 75);
47
+ --warning-muted: oklch(0.9 0.06 75);
48
+
49
+ --destructive: oklch(0.577 0.245 27.33);
50
+ --destructive-foreground: oklch(0.98 0 0);
51
+ --destructive-subtle: oklch(0.95 0.05 27.33);
52
+ --destructive-muted: oklch(0.88 0.08 27.33);
53
+
54
+ --info: oklch(0.58 0.16 250);
55
+ --info-foreground: oklch(0.98 0 0);
56
+ --info-subtle: oklch(0.95 0.04 250);
57
+ --info-muted: oklch(0.88 0.06 250);
58
+
59
+ /* --- Colors: surfaces & neutrals (warm) -------------------------------- */
60
+ --background: oklch(0.99 0.001 286);
61
+ --foreground: oklch(0.17 0.01 286);
62
+ --card: oklch(1 0 0);
63
+ --card-foreground: oklch(0.145 0.014 285.82);
64
+ --popover: oklch(1 0 0);
65
+ --popover-foreground: oklch(0.145 0.014 285.82);
66
+ --muted: oklch(0.97 0.001 286);
67
+ --muted-foreground: oklch(0.58 0.008 286);
68
+
69
+ --border: oklch(0.975 0.001 286);
70
+ --input: oklch(0.89 0.004 286);
71
+ --ring: oklch(0.708 0.028 256.85);
72
+
73
+ /* --- Colors: sidebar --------------------------------------------------- */
74
+ --sidebar: oklch(0.975 0.002 286);
75
+ --sidebar-foreground: oklch(0.45 0.01 286);
76
+ --sidebar-primary: oklch(0.21 0.034 264.06);
77
+ --sidebar-primary-foreground: oklch(0.98 0 0);
78
+ --sidebar-accent: oklch(0.93 0.012 264);
79
+ --sidebar-accent-foreground: oklch(0.21 0.014 285.82);
80
+ --sidebar-hover: oklch(0.955 0.003 286);
81
+ --sidebar-border: oklch(0.91 0.005 286);
82
+
83
+ /* --- Colors: chart palette --------------------------------------------- */
84
+ --chart-1: oklch(0.646 0.222 41.116);
85
+ --chart-2: oklch(0.6 0.118 184.714);
86
+ --chart-3: oklch(0.398 0.07 227.392);
87
+ --chart-4: oklch(0.828 0.189 84.429);
88
+ --chart-5: oklch(0.769 0.188 70.08);
89
+
90
+ /* --- Radii (Maia — generous) ------------------------------------------- */
91
+ --radius: 0.625rem;
92
+ --radius-sm: 4px;
93
+ --radius-md: 6px;
94
+ --radius-lg: 8px;
95
+ --radius-xl: 12px;
96
+ --radius-2xl: 16px;
97
+
98
+ /* --- Layout ------------------------------------------------------------- */
99
+ --sidebar-width: 260px;
100
+ --sidebar-width-collapsed: 60px;
101
+ --sidebar-width-mobile: 300px;
102
+
103
+ /* --- Component sizing -------------------------------------------------- */
104
+ --size-table-row: 48px;
105
+ --size-sidebar-item: 40px;
106
+ --size-button-md: 36px;
107
+ --size-button-sm: 32px;
108
+ --size-input: 36px;
109
+ }
110
+
111
+ /* ---------------------------------------------------------------------------
112
+ * DARK MODE
113
+ * ------------------------------------------------------------------------- */
114
+ :root.dark .theme-classic,
115
+ [data-theme="dark"] .theme-classic {
116
+ --primary: oklch(0.6 0.06 264.06);
117
+ --primary-foreground: oklch(0.1 0.01 264.06);
118
+ --primary-subtle: oklch(0.22 0.03 264.06);
119
+ --primary-muted: oklch(0.28 0.04 264.06);
120
+
121
+ --secondary: oklch(0.2 0.005 286.38);
122
+ --secondary-foreground: oklch(0.9 0.005 285.82);
123
+
124
+ --accent: oklch(0.22 0.005 286.38);
125
+ --accent-foreground: oklch(0.9 0.005 285.82);
126
+
127
+ --success: oklch(0.62 0.17 155);
128
+ --success-foreground: oklch(0.1 0.01 155);
129
+ --success-subtle: oklch(0.2 0.04 155);
130
+ --success-muted: oklch(0.26 0.06 155);
131
+
132
+ --warning: oklch(0.78 0.18 75);
133
+ --warning-foreground: oklch(0.15 0.02 75);
134
+ --warning-subtle: oklch(0.22 0.04 75);
135
+ --warning-muted: oklch(0.28 0.06 75);
136
+
137
+ --destructive: oklch(0.63 0.24 27.33);
138
+ --destructive-foreground: oklch(0.1 0.01 27.33);
139
+ --destructive-subtle: oklch(0.22 0.06 27.33);
140
+ --destructive-muted: oklch(0.28 0.08 27.33);
141
+
142
+ --info: oklch(0.65 0.16 250);
143
+ --info-foreground: oklch(0.1 0.01 250);
144
+ --info-subtle: oklch(0.2 0.04 250);
145
+ --info-muted: oklch(0.26 0.06 250);
146
+
147
+ --background: oklch(0.13 0.01 285.82);
148
+ --foreground: oklch(0.93 0.005 285.82);
149
+ --card: oklch(0.17 0.008 285.82);
150
+ --card-foreground: oklch(0.93 0.005 285.82);
151
+ --popover: oklch(0.18 0.008 285.82);
152
+ --popover-foreground: oklch(0.93 0.005 285.82);
153
+ --muted: oklch(0.2 0.005 286.38);
154
+ --muted-foreground: oklch(0.6 0.01 285.82);
155
+
156
+ --border: oklch(0.24 0.004 286.32);
157
+ --input: oklch(0.32 0.005 286.32);
158
+ --ring: oklch(0.55 0.04 256.85);
159
+
160
+ --sidebar: oklch(0.12 0.008 285.82);
161
+ --sidebar-foreground: oklch(0.7 0.01 264.06);
162
+ --sidebar-primary: oklch(0.6 0.06 264.06);
163
+ --sidebar-primary-foreground: oklch(0.1 0.01 264.06);
164
+ --sidebar-accent: oklch(0.22 0.02 264.06);
165
+ --sidebar-accent-foreground: oklch(0.9 0.005 285.82);
166
+ --sidebar-hover: oklch(0.185 0.006 286);
167
+ --sidebar-border: oklch(0.25 0.005 286.32);
168
+
169
+ --chart-1: oklch(0.7 0.2 41.116);
170
+ --chart-2: oklch(0.65 0.12 184.714);
171
+ --chart-3: oklch(0.5 0.07 227.392);
172
+ --chart-4: oklch(0.85 0.17 84.429);
173
+ --chart-5: oklch(0.8 0.17 70.08);
174
+ }